/* 이루하국어학원 브랜드 컬러 (청록색 그라데이션) */
:root {
  --iruha-teal-50: #eefaf9;
  --iruha-teal-100: #d4f1ee;
  --iruha-teal-200: #a8e3dd;
  --iruha-teal-300: #7bd2c8;
  --iruha-teal-400: #5BAFAF;
  --iruha-teal-500: #4a9a9a;
  --iruha-teal-600: #3d8080;
  --iruha-teal-700: #336666;
}

* {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
  background-color: #f8fafc;
}

.iruha-bg {
  background: linear-gradient(135deg, #a8e3dd 0%, #5BAFAF 50%, #336666 100%);
}

.iruha-bg-teal {
  background: linear-gradient(135deg, #7bd2c8 0%, #5BAFAF 100%);
}

.iruha-text-teal {
  color: var(--iruha-teal-500);
}

.iruha-btn-primary {
  background: linear-gradient(135deg, #5BAFAF 0%, #3d8080 100%);
  color: white;
}

.iruha-btn-primary:hover {
  background: linear-gradient(135deg, #4a9a9a 0%, #336666 100%);
}

.iruha-btn-secondary {
  background-color: #f1f5f9;
  color: #475569;
}

.iruha-btn-secondary:hover {
  background-color: #e2e8f0;
}

/* 사이드바 네비 */
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: 0.5rem;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
  font-weight: 500;
}

.nav-item:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

.nav-item.active {
  background: linear-gradient(135deg, #5BAFAF 0%, #3d8080 100%);
  color: white;
  font-weight: 600;
}

.nav-item.active i {
  color: white;
}

.nav-item i {
  width: 1.25rem;
  text-align: center;
  color: #94a3b8;
}

.nav-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: #94a3b8;
  padding: 0.75rem 0.875rem 0.375rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* 학생 관리 등 하위 메뉴 토글 버튼 */
.nav-group-toggle {
  user-select: none;
}

.nav-group-toggle.active-parent {
  background-color: #f1f5f9;
  color: #0f172a;
  font-weight: 600;
}

.nav-group-toggle.active-parent i.fa-user-graduate {
  color: #3d8080;
}

/* 하위 메뉴 컨테이너 */
.nav-subgroup {
  margin-left: 0.75rem;
  padding-left: 0.75rem;
  border-left: 2px solid #e2e8f0;
  margin-top: 0.125rem;
  margin-bottom: 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.nav-subgroup.hidden {
  display: none;
}

/* 하위 메뉴 항목 — 상위 항목보다 살짝 작고 컴팩트 */
.nav-item.nav-sub {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}

.nav-item.nav-sub i {
  font-size: 0.85rem;
}

/* 배지 */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
}

.badge-new {
  background-color: #fef3c7;
  color: #b45309;
  border: 1px solid #fcd34d;
}

.badge-active {
  background-color: #dcfce7;
  color: #166534;
}

.badge-leave {
  background-color: #dbeafe;
  color: #1e40af;
}

.badge-withdrawn {
  background-color: #fee2e2;
  color: #991b1b;
}

.badge-pending {
  background-color: #fef3c7;
  color: #b45309;
}

.badge-registered {
  background-color: #dcfce7;
  color: #166534;
}

.badge-rejected {
  background-color: #fee2e2;
  color: #991b1b;
}

/* 카드 */
.card {
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid #f1f5f9;
}

/* 테이블 */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  background-color: #f8fafc;
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.data-table td {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
}

.data-table tr:hover td {
  background-color: #f8fafc;
}

/* 입력 */
.form-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  outline: none;
  transition: all 0.15s;
  background: white;
}

.form-input:focus {
  border-color: #5BAFAF;
  box-shadow: 0 0 0 3px rgba(91, 175, 175, 0.15);
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.35rem;
}

/* 학생 상세 조회 탭 전용 */
.detail-label {
  display: inline-block;
  width: 80px;
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  text-align: right;
  padding-right: 0.5rem;
}

.detail-label-sm {
  display: inline-block;
  width: 48px;
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  text-align: right;
  padding-right: 0.25rem;
}

.detail-input {
  padding: 0.35rem 0.6rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  font-size: 0.85rem;
  outline: none;
  transition: all 0.15s;
  background: white;
  min-width: 0;
}

.detail-input:focus {
  border-color: #5BAFAF;
  box-shadow: 0 0 0 2px rgba(91, 175, 175, 0.15);
}

.detail-input[readonly] {
  background: #f8fafc;
  color: #475569;
}

.detail-input-sm {
  padding: 0.2rem 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.25rem;
  font-size: 0.8rem;
  outline: none;
  background: white;
}

.detail-input-sm:focus {
  border-color: #5BAFAF;
  box-shadow: 0 0 0 2px rgba(91, 175, 175, 0.15);
}

.detail-tab {
  cursor: pointer;
  transition: all 0.15s;
}

/* 모달 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 1rem;
  backdrop-filter: blur(4px);
}

.modal {
  background: white;
  border-radius: 1rem;
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* 토스트 */
.toast {
  background: white;
  border-radius: 0.5rem;
  padding: 0.875rem 1.25rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 280px;
  animation: slideIn 0.25s ease-out;
  border-left: 4px solid #5BAFAF;
}

.toast.success {
  border-left-color: #10b981;
}

.toast.error {
  border-left-color: #ef4444;
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* 캘린더 */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: #e2e8f0;
  border-radius: 0.5rem;
  overflow: hidden;
}

.calendar-day {
  background: white;
  min-height: 90px;
  padding: 0.5rem;
  position: relative;
  cursor: pointer;
  transition: background 0.1s;
}

.calendar-day:hover {
  background: #f8fafc;
}

.calendar-day.other-month {
  background: #f8fafc;
  color: #cbd5e1;
}

.calendar-day.today {
  background: #eefaf9;
}

.calendar-day.today .day-number {
  background: #5BAFAF;
  color: white;
  border-radius: 9999px;
  width: 1.5rem;
  height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.calendar-day-header {
  background: #f8fafc;
  padding: 0.5rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
}

.calendar-event {
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  margin-top: 0.15rem;
  color: white;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

/* 프린트 */
@media print {
  aside, header, .no-print, #toastRoot, #modalRoot {
    display: none !important;
  }
  main {
    overflow: visible !important;
    padding: 0 !important;
  }
  .card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }
}

/* 스크롤바 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
