/**
 * 모던 폼 스타일
 * 등록/수정 페이지 공통 CSS
 */

/* 모던 컨테이너 */
.modern-container {
	max-width: 900px;
	margin: 0 auto;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 4px 24px rgba(0,0,0,0.08);
	padding: 32px;
}

/* 페이지 헤더 */
.page-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 28px;
	padding-bottom: 20px;
	border-bottom: 2px solid #f0f0f0;
}

.page-title {
	font-size: 24px;
	font-weight: 700;
	color: #1a1a2e;
	margin: 0;
}

.page-title span {
	color: #4180d9;
}

/* 버튼 그룹 */
.btn-group {
	display: flex;
	gap: 10px;
}

.btn-modern {
	padding: 12px 28px;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
}

.btn-back {
	background: #f5f5f5;
	color: #666;
}

.btn-back:hover {
	background: #e8e8e8;
}

.btn-primary {
	background: linear-gradient(135deg, #4180d9 0%, #3366cc 100%);
	color: #fff;
}

.btn-primary:hover {
	background: linear-gradient(135deg, #3570c9 0%, #2855bb 100%);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(65, 128, 217, 0.3);
}

.btn-danger {
	background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
	color: #fff;
}

.btn-danger:hover {
	background: linear-gradient(135deg, #d44637 0%, #a93226 100%);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

/* 폼 그리드 */
.form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

.form-group {
	display: flex;
	flex-direction: column;
}

.form-group.full-width {
	grid-column: 1 / -1;
}

/* 폼 라벨 */
.form-label {
	font-size: 13px;
	font-weight: 600;
	color: #555;
	margin-bottom: 8px;
	display: flex;
	align-items: center;
	gap: 4px;
}

.form-label .required {
	color: #e74c3c;
}

/* 폼 컨트롤 */
.form-control {
	padding: 12px 14px;
	border: 1px solid #ddd;
	border-radius: 8px;
	font-size: 14px;
	transition: all 0.2s ease;
	background: #fafafa;
}

.form-control:focus {
	outline: none;
	border-color: #4180d9;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(65, 128, 217, 0.1);
}

select.form-control {
	cursor: pointer;
}

textarea.form-control {
	min-height: 120px;
	resize: vertical;
}

/* 섹션 구분 */
.section-title {
	font-size: 16px;
	font-weight: 700;
	color: #1a1a2e;
	margin: 28px 0 16px 0;
	padding-bottom: 10px;
	border-bottom: 2px solid #4180d9;
	grid-column: 1 / -1;
}

.section-title:first-child {
	margin-top: 0;
}

/* 라디오 버튼 */
.radio-group {
	display: flex;
	gap: 20px;
	padding: 12px 0;
}

.radio-item {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
}

.radio-item input[type="radio"] {
	width: 18px;
	height: 18px;
	accent-color: #4180d9;
}

/* 체크박스 */
.checkbox-group {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	padding: 12px 0;
}

.checkbox-item {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
	width: 18px;
	height: 18px;
	accent-color: #4180d9;
}

/* 파일 업로드 */
.file-upload-area {
	border: 2px dashed #ddd;
	border-radius: 12px;
	padding: 24px;
	text-align: center;
	background: #fafafa;
	transition: all 0.2s ease;
	cursor: pointer;
}

.file-upload-area:hover {
	border-color: #4180d9;
	background: #f5f9ff;
}

.file-upload-area.has-file {
	border-color: #27ae60;
	background: #f0fff4;
}

.file-upload-icon {
	font-size: 36px;
	color: #bbb;
	margin-bottom: 12px;
}

.file-upload-text {
	font-size: 14px;
	color: #888;
	margin-bottom: 12px;
}

.file-upload-btn {
	display: inline-block;
	padding: 10px 24px;
	background: #4180d9;
	color: #fff;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
}

/* 파일 미리보기 */
.file-preview {
	margin-top: 16px;
	padding: 12px 16px;
	background: #fff;
	border-radius: 8px;
	display: none;
	align-items: center;
	gap: 12px;
	border: 1px solid #e0e0e0;
}

.file-preview.show {
	display: flex;
}

.file-preview-icon {
	width: 40px;
	height: 40px;
	background: #4180d9;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 18px;
}

.file-preview-info {
	flex: 1;
}

.file-preview-name {
	font-size: 14px;
	font-weight: 600;
	color: #333;
	word-break: break-all;
}

.file-preview-size {
	font-size: 12px;
	color: #888;
	margin-top: 2px;
}

.file-preview-image {
	max-width: 120px;
	max-height: 80px;
	border-radius: 6px;
	object-fit: cover;
}

.file-remove-btn {
	padding: 6px 12px;
	background: #ff4757;
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 12px;
	cursor: pointer;
}

/* 기존 파일 표시 */
.existing-file {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	background: #e8f4fd;
	border-radius: 8px;
	margin-top: 12px;
}

.existing-file-icon {
	color: #4180d9;
	font-size: 20px;
}

.existing-file-name {
	flex: 1;
	font-size: 14px;
	color: #333;
}

.existing-file-link {
	color: #4180d9;
	text-decoration: none;
	font-weight: 600;
}

/* 인라인 폼 그룹 (날짜 범위 등) */
.form-inline {
	display: flex;
	align-items: center;
	gap: 10px;
}

.form-inline .form-control {
	flex: 1;
}

.form-inline span {
	color: #888;
}

/* 정보 박스 */
.info-box {
	background: #f8f9fa;
	border: 1px solid #e9ecef;
	border-radius: 8px;
	padding: 16px;
	margin-top: 8px;
}

.info-box p {
	margin: 0;
	font-size: 13px;
	color: #666;
	line-height: 1.6;
}

/* 반응형 */
@media (max-width: 768px) {
	.modern-container {
		padding: 20px;
		border-radius: 0;
	}

	.form-grid {
		grid-template-columns: 1fr;
	}

	.page-header {
		flex-direction: column;
		gap: 16px;
		align-items: flex-start;
	}

	.btn-group {
		width: 100%;
	}

	.btn-modern {
		flex: 1;
		text-align: center;
	}
}
