/* 교사 관리 페이지 - 라이트 테마 (중간톤) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;600;700;800;900&display=swap');

:root {
	--primary-red: #e85d75;
	--primary-blue: #5c7cfa;
	--light-bg: #f8fafc;
	--light-surface: #ffffff;
	--light-card: #f1f5f9;
	--text-primary: #1e293b;
	--text-secondary: #64748b;
	--text-muted: #94a3b8;
	--border-color: #e2e8f0;
	--success-color: #10b981;
	--warning-color: #f59e0b;
	--error-color: #ef4444;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: 'Noto Sans KR', 'Inter', sans-serif;
	background: var(--light-bg);
	color: var(--text-primary);
	line-height: 1.6;
	overflow-x: hidden;
}

/* 관리자 컨테이너 */
.admin-container {
	display: flex;
	min-height: 100vh;
	position: relative;
}

/* 사이드바 */
.sidebar {
	width: 280px;
	background: var(--light-surface);
	border-right: 1px solid var(--border-color);
	display: flex;
	flex-direction: column;
	position: fixed;
	height: 100vh;
	z-index: 1000;
	overflow-y: auto;
	box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}

.sidebar-header {
	padding: 2rem 1.5rem;
	text-align: center;
	border-bottom: 1px solid var(--border-color);
}

.logo {
	width: 60px;
	height: 60px;
	background: linear-gradient(135deg, var(--primary-red), var(--primary-blue));
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 1rem;
	font-size: 1.5rem;
	color: white !important;
	box-shadow: 0 8px 25px rgba(232, 93, 117, 0.2);
}

.logo i {
	color: white !important;
}

.sidebar-header h3 {
	font-size: 1.25rem;
	font-weight: 700;
	margin-bottom: 0.5rem;
	color: var(--text-primary);
}

.sidebar-header p {
	color: var(--text-secondary);
	font-size: 0.875rem;
}

/* 사이드바 네비게이션 */
.sidebar-nav {
	flex: 1;
	padding: 1rem 0;
}

.nav-item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.875rem 1.5rem;
	color: var(--text-secondary);
	text-decoration: none;
	transition: all 0.3s ease;
	border-left: 3px solid transparent;
}

.nav-item:hover {
	background: rgba(232, 93, 117, 0.05);
	color: var(--primary-red);
	border-left-color: var(--primary-red);
}

.nav-item.active {
	background: rgba(232, 93, 117, 0.1);
	color: var(--primary-red);
	border-left-color: var(--primary-red);
}

.nav-item i {
	width: 20px;
	text-align: center;
}

/* 사이드바 푸터 */
.sidebar-footer {
	padding: 1.5rem;
	border-top: 1px solid var(--border-color);
}

.user-info {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.user-avatar {
	width: 40px;
	height: 40px;
	background: var(--primary-red);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	color: white;
}

.user-details h4 {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--text-primary);
}

.user-details p {
	font-size: 0.75rem;
	color: var(--text-muted);
}

.logout-btn {
	width: 100%;
	background: rgba(239, 68, 68, 0.1);
	border: 1px solid #ef4444;
	color: #ef4444;
	padding: 0.75rem;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
}

.logout-btn:hover {
	background: #ef4444;
	color: white;
}

/* 메인 콘텐츠 */
.main-content {
	flex: 1;
	margin-left: 280px;
	padding: 2rem;
	background: var(--light-bg);
	min-height: 100vh;
}

/* 콘텐츠 탭 */
.content-tab {
	display: none;
}

.content-tab.active {
	display: block;
	animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: translateY(0); }
}

/* 콘텐츠 헤더 */
.content-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 2rem;
}

.content-header h1 {
	font-size: 2rem;
	font-weight: 700;
	margin-bottom: 0.5rem;
	color: var(--text-primary);
}

.breadcrumb {
	color: var(--text-muted);
	font-size: 0.875rem;
}

/* 통계 그리드 */
.stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 1.5rem;
	margin-bottom: 2rem;
}

.stat-card {
	background: var(--light-surface);
	border: 1px solid var(--border-color);
	border-radius: 12px;
	padding: 1.5rem;
	position: relative;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
	transition: all 0.3s ease;
}

.stat-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.stat-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
}

.stat-card.photos::before { background: #3b82f6; }
.stat-card.posts::before { background: var(--success-color); }
.stat-card.views::before { background: var(--warning-color); }
.stat-card.pending::before { background: var(--error-color); }

.stat-card .icon {
	font-size: 2rem;
	margin-bottom: 1rem;
	opacity: 0.8;
}

.stat-card.photos .icon { color: #3b82f6; }
.stat-card.posts .icon { color: var(--success-color); }
.stat-card.views .icon { color: var(--warning-color); }
.stat-card.pending .icon { color: var(--error-color); }

.stat-number {
	font-size: 2rem;
	font-weight: 700;
	margin-bottom: 0.5rem;
	color: var(--text-primary);
}

.stat-label {
	color: var(--text-secondary);
	font-size: 0.875rem;
}

/* 콘텐츠 섹션 */
.content-section {
	background: var(--light-surface);
	border: 1px solid var(--border-color);
	border-radius: 12px;
	overflow: hidden;
	margin-bottom: 2rem;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.section-header {
	padding: 1.5rem;
	border-bottom: 1px solid var(--border-color);
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.section-header h2 {
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--text-primary);
}

.section-content {
	padding: 1.5rem;
}

/* 활동 목록 */
.activity-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.activity-item {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1rem;
	background: var(--light-card);
	border-radius: 8px;
	border: 1px solid var(--border-color);
}

.activity-item i {
	width: 40px;
	height: 40px;
	background: rgba(232, 93, 117, 0.1);
	color: var(--primary-red);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.activity-item .time {
	display: block;
	color: var(--text-muted);
	font-size: 0.875rem;
	margin-top: 0.25rem;
}

/* 폼 스타일 */
.upload-form {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.5rem;
}

.form-group {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.form-group label {
	font-weight: 500;
	color: var(--text-primary);
	font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
	padding: 0.75rem;
	background: white;
	border: 1px solid var(--border-color);
	border-radius: 8px;
	color: var(--text-primary);
	font-size: 0.875rem;
	transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
	outline: none;
	border-color: var(--primary-red);
	box-shadow: 0 0 0 3px rgba(232, 93, 117, 0.1);
}

.form-group textarea {
	resize: vertical;
	min-height: 120px;
}

/* 파일 업로드 */
.file-upload {
	border: 2px dashed var(--border-color);
	border-radius: 12px;
	padding: 3rem 2rem;
	text-align: center;
	background: white;
	transition: all 0.3s ease;
	cursor: pointer;
	position: relative;
}

.file-upload:hover,
.file-upload.drag-over {
	border-color: var(--primary-red);
	background: rgba(232, 93, 117, 0.02);
}

.file-upload input[type="file"] {
	position: absolute;
	opacity: 0;
	width: 100%;
	height: 100%;
	cursor: pointer;
}

.upload-icon {
	font-size: 3rem;
	color: var(--text-muted);
	margin-bottom: 1rem;
}

.file-upload h3 {
	color: var(--text-primary);
	margin-bottom: 0.5rem;
	font-weight: 500;
}

.file-upload p {
	color: var(--text-muted);
	font-size: 0.875rem;
}

/* 파일 미리보기 */
.file-preview {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin-top: 1rem;
}

.file-preview-item {
	text-align: center;
	background: white;
	padding: 1rem;
	border-radius: 8px;
	border: 1px solid var(--border-color);
}

.file-preview-item img {
	border-radius: 6px;
	max-width: 150px;
	max-height: 150px;
	object-fit: cover;
}

.file-preview-item p {
	margin-top: 0.5rem;
	font-size: 0.75rem;
	color: var(--text-secondary);
	word-break: break-all;
}

/* 버튼 */
.btn {
	padding: 0.75rem 1.5rem;
	border-radius: 8px;
	font-size: 0.875rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.3s ease;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	text-decoration: none;
	border: none;
}

.btn-primary {
	background: linear-gradient(135deg, var(--primary-red), var(--primary-blue));
	color: white;
	box-shadow: 0 4px 15px rgba(232, 93, 117, 0.2);
	border: 1px solid transparent;
	box-sizing: border-box;
}

.btn-primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 25px rgba(232, 93, 117, 0.3);
}

.btn-secondary {
	background: white;
	color: #000000;  /* 검정색으로 변경 */
	border: 1px solid var(--border-color);
	font-weight: 600;
	box-sizing: border-box;
}

.btn-secondary:hover {
	background: #667eea;  /* 보라색 배경 */
	color: white;  /* 흰색 글자 */
	border-color: #667eea;
}

.btn-secondary i {
	color: #000000;  /* 아이콘도 검정색 */
}

.btn-secondary:hover i {
	color: white;  /* 호버시 아이콘 흰색 */
}

/* 탭 메뉴 */
.tab-menu {
	display: flex;
	gap: 0.5rem;
	margin-bottom: 2rem;
	border-bottom: 1px solid var(--border-color);
}

.tab-btn {
	padding: 0.75rem 1.5rem;
	background: none;
	border: none;
	color: var(--text-secondary);
	cursor: pointer;
	border-bottom: 2px solid transparent;
	transition: all 0.3s ease;
	font-weight: 500;
}

.tab-btn.active {
	color: var(--primary-red);
	border-bottom-color: var(--primary-red);
}

.tab-btn:hover:not(.active) {
	color: var(--text-primary);
}

/* 갤러리 그리드 */
.gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 1.5rem;
}

.gallery-item {
	background: white;
	border: 1px solid var(--border-color);
	border-radius: 12px;
	overflow: hidden;
	transition: all 0.3s ease;
}

.gallery-item:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.gallery-item img {
	width: 100%;
	height: 200px;
	object-fit: cover;
}

.gallery-item-info {
	padding: 1rem;
}

.gallery-item-info h4 {
	margin-bottom: 0.5rem;
	font-weight: 600;
	color: var(--text-primary);
}

.gallery-item-info p {
	color: var(--text-secondary);
	font-size: 0.875rem;
	margin-bottom: 0.5rem;
}

.gallery-item-info small {
	color: var(--text-muted);
	font-size: 0.75rem;
}

.gallery-item-actions {
	padding: 0 1rem 1rem;
	display: flex;
	gap: 0.5rem;
}

.btn-edit,
.btn-delete {
	flex: 1;
	padding: 0.5rem;
	border-radius: 6px;
	font-size: 0.75rem;
	cursor: pointer;
	transition: all 0.3s ease;
	border: none;
	color: white;
	font-weight: 500;
}

.btn-edit {
	background: #3b82f6;
}

.btn-edit:hover {
	background: #2563eb;
}

.btn-delete {
	background: #ef4444;
}

.btn-delete:hover {
	background: #dc2626;
}

/* 테이블 */
.board-table {
	width: 100%;
	border-collapse: collapse;
	background: white;
	border-radius: 8px;
	overflow: hidden;
}

.board-table table {
	width: 100%;
}

.board-table th,
.board-table td {
	padding: 1rem;
	text-align: left;
	border-bottom: 1px solid var(--border-color);
}

.board-table th {
	background: var(--light-card);
	font-weight: 600;
	color: var(--text-primary);
}

.board-table td {
	color: var(--text-secondary);
}

.board-table tr:hover {
	background: rgba(232, 93, 117, 0.02);
}

.board-table .badge {
	padding: 0.25rem 0.75rem;
	border-radius: 12px;
	font-size: 0.85rem;
	font-weight: 600;
}

.board-table .badge.important {
	background: #ef4444;
	color: white;
}

.board-table .badge.normal {
	background: #3b82f6;
	color: white;
}

.board-table .status {
	padding: 0.25rem 0.75rem;
	border-radius: 12px;
	font-size: 0.85rem;
	font-weight: 600;
}

.board-table .status.completed {
	background: #10b981;
	color: white;
}

.board-table .status.pending {
	background: #f59e0b;
	color: white;
}

/* 게시판 관리 스타일 */
.board-section {
	display: none;
}

.board-section.active {
	display: block;
}

/* 모달 스타일 */
.modal {
	display: none;
	position: fixed;
	z-index: 1000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(5px);
}

.modal.show {
	display: flex;
	align-items: center;
	justify-content: center;
}

.modal-content {
	background: white;
	border-radius: 12px;
	width: 90%;
	max-width: 600px;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1.5rem;
	border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
	margin: 0;
	color: var(--text-primary);
}

.modal-close {
	background: none;
	border: none;
	font-size: 1.5rem;
	color: var(--text-secondary);
	cursor: pointer;
	padding: 0;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	transition: all 0.3s;
}

.modal-close:hover {
	background: rgba(239, 68, 68, 0.1);
	color: #ef4444;
}

.modal-body {
	padding: 1.5rem;
}

.counsel-detail {
	background: var(--light-card);
	padding: 1rem;
	border-radius: 8px;
	margin-bottom: 1.5rem;
	border: 1px solid var(--border-color);
}

.counsel-detail p {
	margin: 0.5rem 0;
	color: var(--text-secondary);
}

.counsel-detail strong {
	color: var(--text-primary);
}

.btn-reply {
	background: #10b981;
	color: white;
}

.btn-reply:hover {
	background: #059669;
}

/* 알림 */
.notification {
	position: fixed;
	top: 20px;
	right: 20px;
	background: white;
	border: 1px solid var(--border-color);
	border-radius: 12px;
	padding: 1rem 1.5rem;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
	z-index: 1000;
	min-width: 300px;
	display: none;
}

.notification.success {
	border-left: 4px solid var(--success-color);
}

.notification.error {
	border-left: 4px solid var(--error-color);
}

.notification-content {
	color: var(--text-primary);
}

.notification-close {
	position: absolute;
	top: 10px;
	right: 15px;
	background: none;
	border: none;
	color: var(--text-muted);
	cursor: pointer;
	font-size: 1.2rem;
}

/* 모바일 메뉴 */
.mobile-menu-btn {
	display: none;
	position: fixed;
	top: 1rem;
	left: 1rem;
	z-index: 1001;
	background: white;
	border: 1px solid var(--border-color);
	color: var(--text-primary);
	padding: 0.75rem;
	border-radius: 8px;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 반응형 디자인 */
@media screen and (max-width: 1024px) {
	.sidebar {
		transform: translateX(-100%);
		transition: transform 0.3s ease;
	}
	
	.sidebar.open {
		transform: translateX(0);
	}
	
	.main-content {
		margin-left: 0;
	}
	
	.mobile-menu-btn {
		display: block;
	}
	
	.stats-grid {
		grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	}
}

@media screen and (max-width: 768px) {
	.main-content {
		padding: 1rem;
	}
	
	.form-row {
		grid-template-columns: 1fr;
	}
	
	.gallery-grid {
		grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	}
	
	.stats-grid {
		grid-template-columns: 1fr 1fr;
		gap: 1rem;
	}
	
	.content-header {
		flex-direction: column;
		gap: 1rem;
	}
	
	.content-header h1 {
		font-size: 1.5rem;
	}
	
	/* 모바일에서 테이블 스크롤 가능하게 */
	.board-table {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
	
	.board-table table {
		min-width: 600px;
		font-size: 0.875rem;
	}
	
	.board-table th,
	.board-table td {
		padding: 0.5rem;
		white-space: nowrap;
	}
	
	.board-table th:nth-child(4),
	.board-table td:nth-child(4) {
		white-space: normal;
		max-width: 200px;
		word-break: break-word;
	}
}

@media screen and (max-width: 480px) {
	.stats-grid {
		grid-template-columns: 1fr;
	}
	
	.gallery-grid {
		grid-template-columns: 1fr;
	}
	
	.tab-menu {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
	
	.tab-btn {
		white-space: nowrap;
	}
}

/* 스크롤바 스타일 */
::-webkit-scrollbar {
	width: 8px;
}

::-webkit-scrollbar-track {
	background: var(--light-card);
}

::-webkit-scrollbar-thumb {
	background: var(--border-color);
	border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
	background: var(--primary-red);
}

/* 선택 텍스트 색상 */
::selection {
	background: var(--primary-red);
	color: white;
}

::-moz-selection {
	background: var(--primary-red);
	color: white;
}

/* 모달 폼 그룹 스타일 수정 */
.modal-body .form-group {
	margin-bottom: 1.5rem;
}

.modal-body .form-group:last-child {
	margin-bottom: 0;
	margin-top: 2rem;
	display: flex;
	gap: 0.5rem;
	justify-content: flex-start;
}

/* 모달 버튼 크기 통일 */
.modal-body .form-group .btn {
	width: 100px;
	padding: 0.75rem 1rem;
	text-align: center;
	justify-content: center;
	box-sizing: border-box;
	height: 44px;
	line-height: 1.5;
	font-size: 0.875rem;
	font-weight: 500;
}

/* 학사일정 목록 스타일 */
.schedule-list-item {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1rem;
	background: white;
	border: 2px solid #e5e7eb;
	border-radius: 8px;
	margin-bottom: 1rem;
	transition: all 0.3s;
}

.schedule-list-item:hover {
	border-color: #667eea;
	transform: translateX(5px);
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.schedule-color-bar {
	width: 4px;
	min-height: 60px;
	border-radius: 2px;
}

.schedule-info {
	flex: 1;
}

.schedule-title {
	font-weight: bold;
	color: #333;
	margin-bottom: 0.5rem;
	font-size: 1.1rem;
}

.schedule-meta {
	font-size: 0.875rem;
	color: #6c757d;
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
}

.schedule-meta span {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
}

.schedule-actions {
	display: flex;
	gap: 0.5rem;
}

.schedule-actions .btn-edit,
.schedule-actions .btn-delete {
	padding: 0.5rem 1rem;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	font-size: 0.875rem;
	font-weight: 500;
	transition: all 0.3s;
	color: white;
}

.schedule-actions .btn-edit {
	background: #0891b2;
}

.schedule-actions .btn-edit:hover {
	background: #0e7490;
	transform: translateY(-2px);
}

.schedule-actions .btn-delete {
	background: #dc2626;
}

.schedule-actions .btn-delete:hover {
	background: #b91c1c;
	transform: translateY(-2px);
}