/* app/static/css/style.css */

/* [색상 변수 정의] */
:root {
    --raon-bg: #f3f4f6;          
    --raon-dark: #312e81;        
    --raon-gradient: linear-gradient(135deg, #00b4db 0%, #6a1b9a 100%);
    --raon-gray: #9ca3af;
}

/* [공통] 전체 기본 설정 */
html {
    height: 100%;
}
/* 강사/관리자 셸: body만 막으면 일부 브라우저에서 html이 스크롤되므로 둘 다 고정 */
html.teacher-shell {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
}
body {
    background-color: var(--raon-bg);
    font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
    margin: 0;
    padding: 0;
    /* [수정] 2단 헤더 높이(46px + 65px = 111px)만큼 상단 여백 확보 */
    padding-top: 111px;
}

/* 강사/관리자 공통 레이아웃: 창 전체 스크롤 제거, 헤더 고정 + 본문만 스크롤 */
body.teacher-app {
    padding-top: 0;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
}
.teacher-main-fill {
    margin-top: 111px;
    /* 100dvh: 모바일 주소창 보정 / fallback은 아래 height */
    height: calc(100vh - 111px);
    height: calc(100dvh - 111px);
    min-height: 0;
    width: 100%;
    /* 스크롤은 하위 .container에 두면 긴 페이지(대시보드 달력 등)에서 창 스크롤이 섞이지 않음 */
    display: flex;
    flex-direction: column;
    align-items: stretch;
    overflow: hidden;
    box-sizing: border-box;
}
/* flex 자식 + overflow 조합 시 가로가 min-content로 붕괴하는 것 방지 (전 화면 가로 유지) */
.teacher-main-fill > .container {
    flex: 1 1 auto;
    align-self: stretch;
    width: 100%;
    min-height: 0;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}
/* /teacher/dashboard: 한 화면에 맞추고 패널 내부만 스크롤 — 1400px 제한 해제(가로 꽉 참), 음수마진 풀블리드는 쓰지 않음 */
.teacher-main-fill > .container:has(.dashboard-page-shell) {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-width: none;
    width: 100%;
    padding-left: clamp(16px, 2.5vw, 40px);
    padding-right: clamp(16px, 2.5vw, 40px);
}
.teacher-main-fill > .container:has(.dashboard-page-shell) .dashboard-page-shell {
    flex: 1 1 auto;
    min-height: 0;
}

/* /teacher/learning: 고정 헤더·본문 높이 1판, 좌 트리·우 학습 패널만 세로 스크롤 */
.teacher-main-fill > .container:has(.learning-page-frame) {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.learning-page-frame {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}
.learning-page-frame > .dashboard-split {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: stretch;
}
.learning-page-frame .learning-tree {
    height: auto !important;
    max-height: none;
    align-self: stretch;
    min-height: 0;
    flex: 0 0 210px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.learning-page-frame .learning-content {
    height: auto !important;
    min-height: 0;
    flex: 1 1 auto;
    /* 패널 전체 스크롤 금지 — 툴바 고정, 학생 목록만 스크롤 */
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.learning-page-frame .learning-toolbar {
    flex-shrink: 0;
    margin-bottom: 0;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}
/* 학생 카드 DOM·기능 변경 없음 — 이 영역만 세로 스크롤 (가로 클립으로 하단 그리드가 안 보이던 문제 방지) */
.learning-page-frame .student-list-container {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}
.learning-page-frame .student-list-container > .student-card {
    flex-shrink: 0;
}
.learning-page-frame .student-list-container .card-row-bottom {
    min-width: 0;
}
.learning-page-frame .learning-empty-state {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #ccc;
}

/* /admin/student: 전역 스크롤 없음 — 상단 툴바 고정, 좌·우 패널만 세로 스크롤, 우측은 기본정보 고정·하단만 스크롤 */
.teacher-main-fill > .container:has(.admin-student-page-frame) {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.admin-student-page-frame {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}
.admin-student-page-frame > .panel-header {
    flex-shrink: 0;
    margin-bottom: 12px;
}
.admin-student-page-frame .admin-container {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    height: auto !important;
    gap: 16px;
}

/* /admin/class: 전역 스크롤 없음 — 3열 각각 내부 스크롤 */
.teacher-main-fill > .container:has(.admin-class-page-frame) {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-top: 16px;
    padding-bottom: 16px;
}
.admin-class-page-frame {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    width: 100%;
}
.admin-class-page-frame .admin-layout-3col {
    display: flex;
    gap: 16px;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    align-items: stretch;
}
.admin-class-page-frame .col-tree {
    flex: 0 0 260px;
    min-width: 0;
    min-height: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.admin-class-page-frame .tree-header {
    padding: 12px 14px;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
    flex-shrink: 0;
    gap: 8px;
}
.admin-class-page-frame .tree-body {
    padding: 10px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.admin-class-page-frame .col-detail {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
}
.admin-class-page-frame .col-detail-form {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 18px 22px 24px;
    -webkit-overflow-scrolling: touch;
}
.admin-class-page-frame .col-members {
    flex: 0 0 320px;
    min-width: 0;
    min-height: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.admin-class-page-frame .member-header {
    flex-shrink: 0;
}
.admin-class-page-frame .member-search-row {
    flex-shrink: 0;
}
.admin-class-page-frame .member-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* 반 관리 — 보라 톤 액션 버튼 (배정 패널 「반 이동」과 통일) */
.cls-mgmt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: -0.02em;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.18s, box-shadow 0.18s, transform 0.1s;
    box-shadow: 0 1px 2px rgba(91, 33, 182, 0.2);
}
.cls-mgmt-btn i {
    font-size: 11px;
    opacity: 0.95;
}
.cls-mgmt-btn:hover {
    box-shadow: 0 2px 8px rgba(91, 33, 182, 0.28);
}
.cls-mgmt-btn:active {
    transform: translateY(1px);
}
.cls-mgmt-btn--primary {
    background: linear-gradient(180deg, #8b5cf6 0%, #7c3aed 100%);
    color: #fff;
}
.cls-mgmt-btn--primary:hover {
    background: linear-gradient(180deg, #7c3aed 0%, #6d28d9 100%);
    color: #fff;
}
.cls-mgmt-btn--danger {
    background: linear-gradient(180deg, #fb7185 0%, #e11d48 100%);
    color: #fff;
    box-shadow: 0 1px 2px rgba(225, 29, 72, 0.25);
}
.cls-mgmt-btn--danger:hover {
    background: linear-gradient(180deg, #f43f5e 0%, #be123c 100%);
    color: #fff;
}
.admin-class-page-frame .detail-header__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* /admin/teacher: 전역 스크롤 없음 — 좌·우 패널만 내부 스크롤 */
.teacher-main-fill > .container:has(.admin-teacher-page-frame) {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-top: 16px;
    padding-bottom: 16px;
    max-height: 100%;
    min-height: 0;
}
.admin-teacher-page-frame {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    width: 100%;
}
.admin-teacher-page-frame .admin-container {
    flex: 1 1 auto;
    min-height: 0;
    height: auto !important;
    max-height: none;
    overflow: hidden;
    gap: 16px;
    align-items: stretch;
}
.admin-teacher-page-frame .admin-list-section {
    flex: 0 0 300px;
    min-width: 240px;
    max-width: 360px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}
.admin-teacher-page-frame .admin-detail-section {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}
.admin-search-bar--with-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
}
.admin-search-bar--with-actions .form-input-box {
    flex: 1 1 auto;
    min-width: 0;
}
.admin-teacher-toolbar {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 18px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(180deg, #fafafa 0%, #f8fafc 100%);
    flex-shrink: 0;
}
.admin-teacher-toolbar .status-bar {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}
.admin-teacher-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* ===== 학생 관리 Center — 여백·통일감·가독성 (판매용 UI) ===== */
.admin-student-page-frame {
    --adm-r: 10px;
    --adm-r-lg: 12px;
    --adm-space: 16px;
    --adm-space-sm: 12px;
    --adm-border: #e5e7eb;
    --adm-border-soft: #f1f5f9;
    --adm-surface: #f8fafc;
    --adm-surface-2: #f1f5f9;
    --adm-text: #111827;
    --adm-muted: #64748b;
    --adm-label: #475569;
    --adm-brand: #312e81;
    --adm-accent: #2563eb;
}

/* 좌측: 제목·버튼·필터·목록 */
.admin-student-page-frame .admin-search-bar {
    padding: 10px 12px 12px;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid var(--adm-border);
}
.admin-student-page-frame .adm-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    min-height: 32px;
}
.admin-student-page-frame .adm-list-head__titlewrap {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 10px;
    min-width: 0;
}
.admin-student-page-frame .adm-list-head__title {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: var(--adm-text);
    letter-spacing: -0.03em;
    flex-shrink: 0;
}
.admin-student-page-frame .adm-list-head__count {
    font-size: 14px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: -0.02em;
    white-space: nowrap;
}
.admin-student-page-frame .adm-list-head__btns {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.admin-student-page-frame .adm-head-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #475569;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.admin-student-page-frame .adm-head-btn i {
    font-size: 10px;
    opacity: 0.85;
}
.admin-student-page-frame .adm-head-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}
.admin-student-page-frame .adm-head-btn--primary {
    background: var(--adm-brand);
    border-color: var(--adm-brand);
    color: #fff;
}
.admin-student-page-frame .adm-head-btn--primary:hover {
    background: #1e1b4b;
    border-color: #1e1b4b;
    color: #fff;
}
.admin-student-page-frame .adm-head-btn--danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}
.admin-student-page-frame .adm-head-btn--danger:hover {
    background: #fee2e2;
    border-color: #f87171;
    color: #991b1b;
}
.admin-student-page-frame .adm-filter-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    align-items: stretch;
    margin-bottom: 8px;
}
.admin-student-page-frame .adm-filter-row--compact select.form-input-box {
    flex: 1;
    min-width: 0;
    font-size: 11px;
    padding: 5px 8px;
    border-radius: 6px;
    line-height: 1.3;
    min-height: 30px;
}
.admin-student-page-frame .adm-search-status-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.admin-student-page-frame .adm-search-input {
    flex: 1 1 120px;
    min-width: 0;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 8px;
    min-height: 32px;
}
.admin-student-page-frame .adm-status-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}
.admin-student-page-frame .adm-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.admin-student-page-frame .adm-status-chip input {
    margin: 0;
    width: 12px;
    height: 12px;
    accent-color: var(--adm-brand);
    cursor: pointer;
}
.admin-student-page-frame .adm-status-chip:has(input:checked) {
    background: #eef2ff;
    border-color: #a5b4fc;
    color: var(--adm-brand);
    box-shadow: 0 0 0 1px rgba(49, 46, 129, 0.12);
}
.admin-student-page-frame .student-list-item {
    padding: 7px 12px;
    gap: 0;
    border-bottom: 1px solid var(--adm-border-soft);
    align-items: center;
    min-height: 0;
}
.admin-student-page-frame #studentList .student-list-item:nth-child(even) {
    background: #f9fafb;
}
.admin-student-page-frame #studentList .student-list-item:nth-child(odd) {
    background: #ffffff;
}
.admin-student-page-frame .student-list-item:hover {
    background: #eff6ff !important;
}
.admin-student-page-frame .student-list-item.active {
    background: linear-gradient(90deg, #e0e7ff 0%, #eef2ff 55%, #f8fafc 100%) !important;
    border-left: 3px solid var(--adm-brand);
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.15);
}
.admin-student-page-frame .adm-list-text--single {
    min-width: 0;
    flex: 1;
    width: 100%;
}
.admin-student-page-frame .adm-student-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    width: 100%;
    font-size: 12px;
    line-height: 1.35;
}
.admin-student-page-frame .adm-student-line__who {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 1;
    min-width: 0;
    flex-wrap: nowrap;
}
.admin-student-page-frame .adm-student-line__name {
    font-weight: 800;
    color: var(--adm-text);
    letter-spacing: -0.02em;
    flex-shrink: 0;
}
.admin-student-page-frame .adm-student-line__id {
    font-weight: 600;
    color: var(--adm-muted);
    font-size: 11px;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-student-page-frame .adm-student-line__meta {
    flex: 1 1 40%;
    min-width: 0;
    text-align: right;
    font-size: 11px;
    font-weight: 500;
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-student-page-frame .adm-status-pill {
    font-size: 9px;
    font-weight: 800;
    padding: 2px 5px;
    border-radius: 4px;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}
.admin-student-page-frame .adm-status-pill--wait { color: #b45309; background: #fffbeb; border: 1px solid #fde68a; }
.admin-student-page-frame .adm-status-pill--out { color: #4b5563; background: #f3f4f6; border: 1px solid #e5e7eb; }

/* 우측 상단 고정 블록 */
.admin-student-page-frame .admin-detail-fixed {
    padding: var(--adm-space) var(--adm-space) 14px;
    border-bottom: 1px solid var(--adm-border);
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
}
.admin-student-page-frame .adm-toolbar {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: var(--adm-space-sm);
}
.admin-student-page-frame .adm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid var(--adm-border);
    background: #fff;
    color: #374151;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.admin-student-page-frame .adm-btn:hover {
    background: var(--adm-surface);
    border-color: #cbd5e1;
}
.admin-student-page-frame .adm-btn--primary {
    background: var(--adm-brand);
    border-color: var(--adm-brand);
    color: #fff;
    box-shadow: 0 1px 3px rgba(49, 46, 129, 0.25);
}
.admin-student-page-frame .adm-btn--primary:hover {
    background: #1e1b4b;
    border-color: #1e1b4b;
    color: #fff;
}
.admin-student-page-frame .adm-btn--accent {
    background: var(--adm-accent);
    border-color: var(--adm-accent);
    color: #fff;
}
.admin-student-page-frame .adm-btn--accent:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
}
.admin-student-page-frame .adm-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: var(--adm-space-sm);
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-r-lg);
}
.admin-student-page-frame .adm-status-bar__radios {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.admin-student-page-frame .adm-status-bar__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-left: auto;
}
.admin-student-page-frame .status-option {
    font-size: 13px;
    font-weight: 600;
    gap: 6px;
}
.admin-student-page-frame .status-option input {
    transform: scale(1.05);
    accent-color: var(--adm-brand);
}
.admin-student-page-frame #notiDateWrapper {
    display: none;
    align-items: center;
    gap: 8px;
    background: #fffbeb;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #fde68a;
    font-size: 13px;
}
.admin-student-page-frame #notiDateWrapper.is-visible {
    display: flex;
}

/* 상단 상태줄 · 기본정보 — 슬림 · 샤프 */
.admin-student-page-frame .admin-detail-fixed--stack {
    padding: 10px var(--adm-space) 10px;
}
.admin-student-page-frame .adm-status-bar--slim {
    padding: 6px 10px;
    margin-bottom: 8px;
    gap: 8px;
    border-radius: 10px;
}
.admin-student-page-frame .adm-status-bar--slim .adm-status-bar__radios {
    gap: 10px;
}
.admin-student-page-frame .adm-status-bar--slim .status-option {
    font-size: 12px;
    font-weight: 700;
}
.admin-student-page-frame .adm-btn--slim {
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 8px;
}
.admin-student-page-frame .adm-autosave-hint {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 6px;
    white-space: nowrap;
}
.admin-student-page-frame .adm-autosave-hint.is-ok {
    color: #059669;
}
.admin-student-page-frame .adm-autosave-hint.is-busy {
    color: var(--adm-accent);
}

.admin-student-page-frame .adm-detail-tabs {
    display: flex;
    gap: 6px;
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--adm-border);
}
.admin-student-page-frame .adm-tab-btn {
    flex: 1;
    min-width: 0;
    padding: 8px 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--adm-muted);
    background: #fff;
    border: 1px solid var(--adm-border);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.admin-student-page-frame .adm-tab-btn.is-active {
    color: var(--adm-brand);
    background: linear-gradient(180deg, #eef2ff 0%, #ffffff 100%);
    border-color: #a5b4fc;
    box-shadow: 0 1px 3px rgba(49, 46, 129, 0.12);
}
.admin-student-page-frame .admin-detail-scroll--tabbed {
    padding-top: 8px;
}
.admin-student-page-frame .adm-tab-panel {
    animation: admFadeIn 0.2s ease;
}
@keyframes admFadeIn {
    from { opacity: 0.6; }
    to { opacity: 1; }
}

/* 기본정보 카드 */
.admin-student-page-frame .adm-identity-card {
    padding: var(--adm-space-sm) var(--adm-space);
    background: #fff;
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-r-lg);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.admin-student-page-frame .adm-identity-card--dense {
    padding: 10px 12px;
    border-radius: 10px;
}
.admin-student-page-frame .adm-identity-card--dense .adm-identity-card__head {
    font-size: 10px;
    margin-bottom: 8px;
    letter-spacing: 0.06em;
}
.admin-student-page-frame .adm-identity-card--dense .adm-basic-row .adm-photo-col {
    width: 92px;
}
.admin-student-page-frame .adm-identity-card--dense .photo-upload-box {
    width: 92px;
    height: 114px;
    border-radius: 8px;
    border-width: 1px;
}
.admin-student-page-frame .adm-identity-card--dense .admin-basic-compact .form-grid-3 {
    margin-bottom: 8px;
    gap: 8px 10px;
}
.admin-student-page-frame .adm-identity-card--dense .form-label {
    font-size: 11px;
    margin-bottom: 4px;
}
.admin-student-page-frame .adm-identity-card--dense .form-input-box {
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 7px;
}
.admin-student-page-frame .adm-identity-card--dense .family-relation-slot {
    min-height: 36px;
    padding: 6px 9px;
}
.admin-student-page-frame .adm-identity-card__head {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--adm-muted);
    margin: 0 0 12px 0;
}
.admin-student-page-frame .adm-basic-row {
    display: flex;
    gap: var(--adm-space);
    align-items: flex-start;
}
.admin-student-page-frame .adm-basic-row .adm-photo-col {
    display: flex;
    flex-direction: column;
    width: 120px;
    gap: 8px;
    flex-shrink: 0;
}
.admin-student-page-frame .adm-basic-row .adm-fields-col {
    flex: 1;
    min-width: 0;
}
.admin-student-page-frame .admin-basic-compact .form-grid-3 {
    margin-bottom: 10px;
    gap: 12px;
}
.admin-student-page-frame .admin-basic-compact .form-grid-3:last-child {
    margin-bottom: 0;
}
.admin-student-page-frame .form-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--adm-label);
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}
.admin-student-page-frame .form-input-box {
    border-radius: 8px;
    padding: 9px 11px;
    font-size: 14px;
    border-color: #d1d5db;
}
.admin-student-page-frame .family-relation-slot {
    min-height: 42px;
    padding: 8px 11px;
    border-radius: 8px;
    background: var(--adm-surface);
    border-color: #e2e8f0;
}
.admin-student-page-frame .family-badge {
    border-radius: 999px;
    font-weight: 600;
    font-size: 12px;
}
.admin-student-page-frame .family-relation-placeholder {
    font-size: 12px;
    color: #cbd5e1;
}

/* 스크롤 영역 */
.admin-student-page-frame .admin-detail-scroll {
    padding: var(--adm-space) var(--adm-space) 28px;
    background: #fff;
}
.admin-student-page-frame .section-divider {
    border-top: 1px solid var(--adm-border);
    margin: 22px 0 14px;
    padding-top: 14px;
    font-size: 14px;
    font-weight: 700;
    color: var(--adm-brand);
    letter-spacing: -0.02em;
    gap: 8px;
}
.admin-student-page-frame .admin-detail-scroll .section-divider:first-of-type {
    margin-top: 0;
    padding-top: 4px;
    border-top: none;
}
.admin-student-page-frame .section-divider i {
    opacity: 0.85;
    font-size: 15px;
}
.admin-student-page-frame .adm-surface-panel {
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-r);
    padding: 14px 16px;
    margin-bottom: 0;
}
.admin-student-page-frame .adm-surface-panel--class {
    margin-top: 4px;
}
.admin-student-page-frame .adm-parents-panel {
    background: #fff;
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-r-lg);
    padding: 16px;
    margin-bottom: 4px;
}
.admin-student-page-frame .adm-parent-block {
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px dashed #e2e8f0;
}
.admin-student-page-frame .adm-parent-block:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
}
.admin-student-page-frame .adm-parent-line {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.admin-student-page-frame .adm-rel-select {
    width: 72px;
    min-width: 72px;
    flex-shrink: 0;
}
.admin-student-page-frame .adm-phone-flex {
    flex: 1;
    min-width: 120px;
}
.admin-student-page-frame .adm-main-check {
    font-weight: 700;
    font-size: 13px;
    color: var(--adm-brand);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.admin-student-page-frame .adm-main-check--sub {
    color: var(--adm-label);
    font-weight: 600;
}
.admin-student-page-frame .adm-main-check input {
    transform: scale(1.08);
    accent-color: var(--adm-brand);
}
.admin-student-page-frame .adm-form-tight {
    margin-bottom: 12px;
}
.admin-student-page-frame .adm-class-assign-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.admin-student-page-frame .adm-class-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.admin-student-page-frame .adm-class-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.admin-student-page-frame .adm-class-row--follow {
    margin-top: 6px;
}
.admin-student-page-frame .adm-class-select,
.admin-student-page-frame .adm-class-row .form-input-box {
    flex: 1;
    min-width: 0;
}
.admin-student-page-frame .adm-noti-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    padding-left: 4px;
    margin-top: 8px;
    font-size: 13px;
    color: var(--adm-label);
}
.admin-student-page-frame .adm-noti-checks label {
    cursor: pointer;
    font-weight: 500;
}
.admin-student-page-frame .adm-app-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--adm-surface-2);
    color: var(--adm-muted);
    min-width: 76px;
    text-align: center;
}
.admin-student-page-frame .adm-stack-block {
    margin-bottom: 18px;
}
.admin-student-page-frame .adm-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.admin-student-page-frame .adm-link-upload {
    cursor: pointer;
    color: var(--adm-accent);
    font-size: 13px;
    font-weight: 600;
}
.admin-student-page-frame .adm-link-upload:hover {
    text-decoration: underline;
}
.admin-student-page-frame #consultation_log {
    min-height: 96px;
    resize: vertical;
}
.admin-student-page-frame .adm-cash-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}
.admin-student-page-frame .adm-cash-row .form-input-box:first-child {
    flex: 1;
    min-width: 0;
}
.admin-student-page-frame .adm-cash-row .form-input-box:last-child {
    flex: 2;
    min-width: 0;
}

/* 좌·우 패널 톤 통일 (스플릿 뷰) */
.admin-student-page-frame .admin-list-section,
.admin-student-page-frame .admin-detail-section {
    border: 1px solid var(--adm-border);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

/* 파일 첨부·보조 컨트롤 (페이지 인라인 최소화) */
.admin-student-page-frame .file-control-box {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    margin-top: 8px;
    flex-wrap: wrap;
}
.admin-student-page-frame .file-link {
    color: #059669;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
}
.admin-student-page-frame .btn-file-del {
    color: #dc2626;
    cursor: pointer;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
}
.admin-student-page-frame .btn-icon-action {
    border: none;
    border-radius: 8px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.admin-student-page-frame .btn-add {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}
.admin-student-page-frame .btn-remove {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}
.admin-student-page-frame .btn-icon-action:hover {
    filter: brightness(0.97);
}
.admin-student-page-frame .adm-input-date-compact {
    width: auto;
    min-width: 9.5rem;
    padding: 6px 10px;
    font-size: 12px;
}
.admin-student-page-frame .adm-photo-placeholder-icon {
    font-size: 22px;
    margin-bottom: 4px;
    opacity: 0.45;
}
.admin-student-page-frame .adm-noti-bell--p1 {
    color: #d97706;
}
.admin-student-page-frame .adm-noti-bell--p2 {
    color: #94a3b8;
}

/* 엑셀 일괄 등록 모달 */
.adm-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(3px);
}
.adm-modal-overlay--wide {
    z-index: 1100;
    padding: 12px;
    align-items: center;
}
.adm-modal-card--student {
    width: min(1180px, 99vw);
    height: min(92vh, 900px);
    max-height: min(94vh, 920px);
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
}
.adm-modal-student-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 22px;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
    background: linear-gradient(180deg, #fafafa 0%, #f4f4f5 100%);
}
.adm-modal-card__title--flat {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    gap: 10px;
    display: flex;
    align-items: center;
}
.adm-modal-card__title--flat i {
    color: #4f46e5;
}
.adm-modal-close {
    border: none;
    background: #e2e8f0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    color: #475569;
    transition: background 0.15s;
}
.adm-modal-close:hover {
    background: #cbd5e1;
}
/* 신규 학생 폼: 본문이 남는 높이를 채우고 탭 영역만 스크롤 */
.adm-modal-card--student .adm-modal-student-form {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.adm-modal-student-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.adm-modal-student-toolbar {
    flex-shrink: 0;
    padding: 12px 22px;
    border-bottom: 1px solid #f1f5f9;
    background: #fafafa;
}
.adm-modal-status-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
}
.adm-modal-status-label {
    font-size: 12px;
    font-weight: 800;
    color: #64748b;
    text-transform: none;
    letter-spacing: -0.02em;
}
.adm-modal-status-radios {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    flex: 1;
    min-width: 0;
}
.adm-modal-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    user-select: none;
}
.adm-modal-pill input {
    margin: 0;
    accent-color: #4f46e5;
}
.adm-modal-pill--primary:has(input:checked) {
    border-color: #a5b4fc;
    background: #eef2ff;
    color: #312e81;
}
.adm-modal-pill:has(input:checked) {
    border-color: #c7d2fe;
    background: #f5f3ff;
}
.adm-modal-noti-inline {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px dashed #fbbf24;
    background: #fffbeb;
    font-size: 12px;
}
.adm-modal-student-form #m_notiDateWrapper.is-visible {
    display: inline-flex !important;
}
.adm-modal-noti-label {
    color: #92400e;
    font-weight: 700;
    white-space: nowrap;
}
.adm-modal-autosave {
    margin-left: auto;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
}
.adm-modal-student-basic {
    flex-shrink: 0;
    padding: 16px 22px 18px;
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
}
.adm-modal-section-title {
    margin: 0 0 12px 0;
    font-size: 13px;
    font-weight: 800;
    color: #312e81;
    letter-spacing: -0.02em;
}
.adm-modal-basic-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.adm-modal-photo-cell {
    flex-shrink: 0;
}
.adm-modal-photo-box.photo-upload-box {
    width: 132px;
    height: 168px;
    border-radius: 12px;
    border-width: 2px;
}
.adm-modal-photo-box .photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    line-height: 1.3;
    padding: 8px;
}
.adm-modal-fields-grid {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 18px;
    align-items: start;
}
.adm-modal-field .form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
}
.adm-modal-field .form-input-box {
    width: 100%;
    min-height: 40px;
    font-size: 14px;
    border-radius: 10px;
}
.adm-modal-field--note {
    grid-column: 1 / -1;
}
.adm-modal-family-slot.family-relation-slot {
    min-height: 48px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    align-items: flex-start;
}
.adm-modal-family-slot .family-relation-placeholder {
    font-size: 12px;
    line-height: 1.45;
    color: #64748b;
    white-space: normal;
}
.adm-modal-student-detail-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 22px 20px;
    -webkit-overflow-scrolling: touch;
}
.adm-modal-tabs.adm-detail-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}
.adm-modal-tabs .adm-tab-btn {
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    text-align: center;
    white-space: nowrap;
}
.adm-modal-tabs .adm-tab-btn.is-active {
    border-color: #a5b4fc;
    background: #eef2ff;
    color: #312e81;
    box-shadow: 0 1px 2px rgba(79, 70, 229, 0.12);
}
.adm-modal-tab-grid.form-grid-3 {
    margin-bottom: 14px;
}
.adm-modal-class-panel.adm-surface-panel--class {
    border-radius: 12px;
    padding: 14px;
}
.adm-modal-parents .adm-modal-parent-card {
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #fafafa;
    margin-bottom: 12px;
}
.adm-modal-parents .adm-modal-parent-card:last-child {
    margin-bottom: 0;
}
.adm-modal-subhead {
    margin: 0 0 10px 0;
    font-size: 12px;
    font-weight: 800;
    color: #475569;
}
.adm-modal-parent-grid {
    display: grid;
    grid-template-columns: minmax(100px, auto) 90px minmax(160px, 1fr) auto;
    gap: 10px 12px;
    align-items: center;
}
@media (max-width: 900px) {
    .adm-modal-fields-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .adm-modal-parent-grid {
        grid-template-columns: 1fr 1fr;
    }
    .adm-modal-parent-grid .adm-app-badge {
        grid-column: 1 / -1;
        justify-self: start;
    }
}
.adm-modal-noti-checks.adm-noti-checks {
    margin-top: 10px;
    flex-wrap: wrap;
    gap: 8px 12px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}
.adm-modal-noti-title {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    margin-right: 4px;
}
.adm-modal-textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.5;
}
.adm-modal-cash-row.adm-cash-row {
    gap: 12px;
}
.adm-modal-save-btn.adm-btn--accent {
    min-width: 120px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 10px;
}
.adm-modal-actions--footer {
    padding: 10px 14px;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
    background: #fafafa;
}
.adm-modal-actions--student-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 22px;
}
.adm-req {
    color: #dc2626;
    font-weight: 700;
}
/* 엑셀 등 좁은 모달 — 신규 학생용 넓은 카드(.adm-modal-card--student)는 제외 */
.adm-modal-card:not(.adm-modal-card--student) {
    width: min(440px, 100%);
    max-height: min(90vh, 640px);
    overflow-y: auto;
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    padding: 24px;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.28);
}
.adm-modal-card__title {
    margin: 0 0 18px 0;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.02em;
}
.adm-modal-card__title i {
    color: #059669;
    font-size: 20px;
}
.adm-modal-hint {
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
    padding: 16px;
    border-radius: 10px;
    border: 1px solid #bbf7d0;
    margin-bottom: 18px;
}
.adm-modal-hint__lead {
    margin: 0 0 12px 0;
    font-size: 13px;
    color: #166534;
    font-weight: 700;
}
.adm-modal-btn-block {
    width: 100%;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #166534;
    color: #166534;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: background 0.15s, color 0.15s;
}
.adm-modal-btn-block:hover {
    background: #f0fdf4;
}
.adm-modal-hint__note {
    font-size: 11px;
    color: #15803d;
    margin: 10px 0 0 0;
    line-height: 1.55;
}
.adm-modal-step {
    font-size: 13px;
    color: #475569;
    font-weight: 700;
    margin: 0 0 10px 0;
}
.adm-modal-dropzone {
    background: #f8fafc;
    padding: 16px;
    border-radius: 10px;
    border: 1px dashed #cbd5e1;
    text-align: center;
    margin-bottom: 20px;
}
.adm-modal-dropzone input[type="file"] {
    font-size: 14px;
    max-width: 100%;
}
.adm-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}
.adm-modal-actions .adm-btn--ghost {
    min-width: 88px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.adm-modal-actions .adm-btn--ghost:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}
.adm-modal-actions .adm-btn--success {
    min-width: 112px;
    padding: 9px 20px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 8px;
    border: none;
    background: #059669;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(5, 150, 105, 0.35);
    transition: background 0.15s;
}
.adm-modal-actions .adm-btn--success:hover {
    background: #047857;
}

/* [로그인 화면 전용] */
body.login-mode {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding-top: 0; /* 로그인 화면은 상단 여백 제거 */
}

/* --- 로그인 페이지 스타일 (기존 유지) --- */
.login-container {
    background-color: white;
    padding: 50px 40px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 380px;
    text-align: center;
}
.login-logo { margin-bottom: 40px; }
.login-logo h1 { font-size: 26px; font-weight: 800; color: var(--raon-dark); margin: 0; letter-spacing: -0.5px; }
.logo-point { background: var(--raon-gradient); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.form-group { margin-bottom: 20px; text-align: left; }
.form-input { width: 100%; padding: 14px; border: 1px solid #e5e7eb; border-radius: 8px; box-sizing: border-box; font-size: 15px; background-color: #f9fafb; transition: all 0.2s; }
.form-input:focus { outline: none; border-color: #312e81; background-color: white; box-shadow: 0 0 0 3px rgba(49, 46, 129, 0.1); }
.btn-login { width: 100%; padding: 15px; background: var(--raon-dark); color: white; border: none; border-radius: 8px; font-size: 16px; cursor: pointer; font-weight: bold; margin-top: 10px; transition: background-color 0.2s; }
.btn-login:hover { background-color: #1e1b4b; }
.login-options { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; font-size: 13px; color: #6b7280; }
.login-links a { text-decoration: none; color: #6b7280; margin-left: 10px; }

/* --- 관리자/원장님 대시보드 스타일 (기존 유지) --- */
.app-container { display: flex; height: 100vh; width: 100%; }
.sidebar { width: 250px; background-color: var(--raon-dark); color: white; display: flex; flex-direction: column; flex-shrink: 0; }
.sidebar-header { padding: 20px; text-align: center; border-bottom: 1px solid rgba(255,255,255,0.1); }
.menu-list { list-style: none; padding: 0; margin: 20px 0; flex-grow: 1; }
.menu-category { padding: 10px 20px; font-size: 12px; color: #9ca3af; font-weight: bold; margin-top: 10px; }
.menu-list li a { display: block; padding: 12px 20px; color: #d1d5db; text-decoration: none; transition: 0.2s; }
.menu-list li a:hover { background-color: rgba(255,255,255,0.1); color: white; border-left: 4px solid #00b4db; }
.sidebar-footer { padding: 20px; background-color: rgba(0,0,0,0.2); display: flex; justify-content: space-between; align-items: center; }
.main-content { flex-grow: 1; background-color: #f3f4f6; overflow-y: auto; display: flex; flex-direction: column; }
.top-header { background-color: white; padding: 15px 30px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.content-body { padding: 30px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 30px; }
.card { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.summary-card { display: flex; align-items: center; }
.card-icon { width: 50px; height: 50px; border-radius: 10px; display: flex; justify-content: center; align-items: center; font-size: 20px; margin-right: 15px; color: white; }
.card-icon.blue { background: #3b82f6; } .card-icon.green { background: #10b981; } .card-icon.red { background: #ef4444; } .card-icon.purple { background: #8b5cf6; }
.card-info h4 { margin: 0; font-size: 14px; color: #6b7280; } .card-info .number { margin: 5px 0 0 0; font-size: 20px; font-weight: bold; color: #111; }
.dashboard-sections { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }


/* --- ★★★ [2단 상단바 스타일] (신규 추가) ★★★ --- */

/* 1. 헤더 래퍼 (고정) */
.teacher-header-wrapper {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* 2. 첫째줄: 브랜드 로고 + 유틸리티 바 */
.top-utility-bar {
    height: 46px;
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between; /* 좌: 로고 / 우: 유틸리티 */
    align-items: center;
    padding: 0 40px;
}

.utility-content {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #64748b;
}

.user-welcome { color: #334155; margin-right: 5px; }
.user-welcome b { color: var(--raon-dark); }
.v-divider { width: 1px; height: 12px; background-color: #cbd5e1; margin: 0 12px; }

.util-link {
    text-decoration: none; color: #64748b; transition: color 0.2s; position: relative;
    cursor: pointer;
}
.util-link:hover { color: var(--raon-dark); }
.util-link.logout { color: #dc2626; } /* 로그아웃은 빨간색 톤 */

.badge-dot {
    display: inline-block; width: 6px; height: 6px; background-color: #ef4444;
    border-radius: 50%; position: absolute; top: 0; right: -6px;
}

/* 3. 둘째줄: 메인 네비게이션 (기능 버튼만) */
.main-nav-bar {
    height: 65px;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 40px;
}

/* 로고 스타일 */
.brand-logo {
    font-size: 19px; font-weight: 800; color: var(--raon-dark);
    text-decoration: none; letter-spacing: -0.5px;
    display: flex; align-items: center;
}
.logo-highlight { color: #4f46e5; }

/* 메뉴 리스트 */
.gnb-menu {
    display: flex;
    gap: 5px;
    height: 100%;
}

.menu-item {
    display: flex; align-items: center; gap: 6px;
    padding: 0 18px;
    height: 100%;
    text-decoration: none;
    font-size: 15px; font-weight: 500; color: #475569;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}
.menu-item:hover { color: var(--raon-dark); background-color: #f1f5f9; }
.menu-item.active { color: var(--raon-dark); font-weight: 700; border-bottom-color: var(--raon-dark); }
.menu-divider { width: 1px; height: 20px; background-color: #e2e8f0; margin: auto 10px; }


/* --- [컨텐츠 레이아웃 복구] --- */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 40px;
    /* padding-top은 body에서 처리함 */
}

/* 대시보드 2단 분할 (좌측 공지/수업, 우측 캘린더) */
.dashboard-split {
    display: flex;
    gap: 30px;
}
.left-panel { flex: 3; display: flex; flex-direction: column; gap: 20px; }
.right-panel { flex: 7; background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); min-height: 600px; }

/* 패널 카드 공통 */
.panel-card { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; border-bottom: 2px solid #f3f4f6; padding-bottom: 10px; }
.panel-header h3 { margin: 0; font-size: 16px; color: var(--raon-dark); }
.list-basic { list-style: none; padding: 0; margin: 0; }
.list-basic li { padding: 10px 0; border-bottom: 1px solid #f3f4f6; font-size: 14px; display: flex; justify-content: space-between; }
.list-basic li:last-child { border-bottom: none; }
.list-basic .date { color: #888; font-size: 12px; }

/* --- [학습관리 등 기존 스타일 유지] --- */
.learning-tree { width: 210px; background: white; border-radius: 12px; padding: 20px 10px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); overflow-y: auto; height: 80vh; flex-shrink: 0; }
.tree-header { display: flex; justify-content: space-between; align-items: center; cursor: pointer; padding: 8px 5px; border-radius: 6px; transition: 0.2s; }
.tree-header:hover { background-color: #f3f4f6; }
.tree-category { font-size: 13px; color: #9ca3af; font-weight: bold; margin-top: 10px; padding-left: 5px; }
.tree-subject-text { font-weight: bold; color: #4b5563; font-size: 14px; }
.tree-toggle-icon { transition: transform 0.2s; font-size: 12px; color: #9ca3af; }
.tree-toggle-icon.collapsed { transform: rotate(-90deg); }
.tree-class-list { list-style: none; padding-left: 10px; margin: 0; overflow: hidden; transition: max-height 0.3s ease-out; }
.tree-class-item a { display: block; padding: 8px 10px; font-size: 13px; color: #6b7280; text-decoration: none; border-radius: 6px; transition: 0.2s; margin-bottom: 2px; }
.tree-class-item a:hover { background-color: #f3f4f6; color: var(--raon-dark); }
.tree-class-item a.active { background: #e0e7ff; color: #312e81; font-weight: bold; }
.learning-content { flex: 1; background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
.learning-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; flex-wrap: nowrap; gap: 10px; }
.btn-toolbar { padding: 6px 12px; font-size: 12px; border: none; border-radius: 6px; cursor: pointer; font-weight: bold; color: white; display: inline-flex; align-items: center; gap: 5px; transition: 0.2s; white-space: nowrap; }
.btn-batch-input { background-color: #6366f1; } .btn-ai-batch { background: linear-gradient(135deg, #8b5cf6, #d946ef); } .btn-save { background-color: #312e81; } .btn-report-view { background-color: #10b981; } .btn-report-send { background-color: #059669; }
.btn-toolbar:hover { opacity: 0.9; transform: translateY(-1px); }

/* 학생 카드 스타일 */
.student-list-container { display: flex; flex-direction: column; gap: 25px; padding-bottom: 40px; }
.student-card { border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; transition: box-shadow 0.2s; background: white; border-left: 5px solid #312e81; }
.student-card:hover { box-shadow: 0 8px 20px rgba(0,0,0,0.1); border-color: #c7d2fe; border-left-color: #312e81; }
.student-card:nth-child(even) { background-color: #f8fafc; }
.student-card:nth-child(even) .card-row-bottom { background-color: transparent; }
.card-row-top { background-color: rgba(249, 250, 251, 0.8); padding: 10px 20px; display: flex; align-items: center; gap: 15px; border-bottom: 1px solid #f3f4f6; }
.card-row-bottom { padding: 20px; background-color: white; display: grid; grid-template-columns: 1fr 1fr 1.2fr 1.2fr; gap: 20px; }
.input-cell { width: 100%; padding: 6px; border: 1px solid #e5e7eb; border-radius: 4px; font-size: 13px; box-sizing: border-box; background: white; }
.input-cell:focus { border-color: #6366f1; outline: none; }
.st-checkbox { transform: scale(1.2); cursor: pointer; }
.st-name { font-weight: bold; font-size: 15px; width: 80px; color: #111; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-attendance { width: 70px; font-size: 13px; }
.st-time-group { display: flex; align-items: center; gap: 5px; }
.st-time-input { width: 135px; font-size: 13px; text-align: center; } 
.pf-wrapper { display: flex; align-items: center; gap: 5px; }
.st-passfail { width: 90px; text-align: center; font-size: 13px; }
.pass { color: #059669; font-weight: bold; } .not-pass { color: #dc2626; font-weight: bold; }
.btn-reason { background: none; border: none; cursor: pointer; color: #9ca3af; font-size: 14px; display: none; padding: 4px; border-radius: 4px; transition: 0.2s; }
.btn-reason:hover { background-color: #e5e7eb; color: #4b5563; }
.btn-reason.has-content { color: #dc2626; background-color: #fee2e2; }
.st-test-group { display: flex; align-items: center; gap: 5px; }
.st-testpf { width: 90px; text-align: center; font-size: 13px; }
.card-section-title { font-size: 12px; font-weight: bold; color: #6b7280; margin-bottom: 8px; display: block; }
.textarea-cell { width: 100%; resize: vertical; border: 1px solid #e5e7eb; border-radius: 4px; padding: 10px; font-size: 13px; min-height: 80px; font-family: inherit; line-height: 1.5; background: white; }
.textarea-ai { background-color: #f9fafb; border-color: #e5e7eb; }
.ai-wrapper { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; }
.btn-ai-mini { position: absolute; bottom: 10px; right: 10px; background: white; border: 1px solid #d8b4fe; color: #9333ea; width: 28px; height: 28px; border-radius: 4px; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.btn-ai-mini:hover { background: #f3e8ff; } .btn-ai-mini.loading { animation: spin 1s linear infinite; border-color: #ccc; color: #ccc; }
@keyframes spin { 100% { transform: rotate(360deg); } }
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 2000; justify-content: center; align-items: center; }
.modal-box { background: white; padding: 25px; border-radius: 12px; width: 400px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.report-modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.7); z-index: 3000; justify-content: center; align-items: center; backdrop-filter: blur(3px); }
.mobile-frame { width: 375px; height: 750px; max-height: 90vh; background: #f3f4f6; border-radius: 30px; border: 8px solid #1f2937; box-shadow: 0 20px 50px rgba(0,0,0,0.5); overflow: hidden; position: relative; display: flex; flex-direction: column; }
.report-header { background: linear-gradient(135deg, #312e81, #4f46e5); color: white; padding: 25px 20px 20px 20px; text-align: center; flex-shrink: 0; }
.report-logo { font-size: 18px; font-weight: 800; letter-spacing: 1px; margin-bottom: 5px; }
.report-date { font-size: 12px; opacity: 0.8; }
.report-body { flex: 1; min-height: 0; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 15px; background: #f3f4f6; -webkit-overflow-scrolling: touch; }
.report-card { background: white; border-radius: 12px; padding: 15px; box-shadow: 0 2px 8px rgba(0,0,0,0.03); }
.report-section-title { font-size: 12px; font-weight: bold; color: #6b7280; margin-bottom: 8px; display: flex; align-items: center; gap: 5px; } .report-section-title i { color: #312e81; }
.student-info-row { display: flex; justify-content: space-between; align-items: center; } .student-name-big { font-size: 20px; font-weight: 800; color: #111; } .att-badge { padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: bold; color: white; } .att-출석 { background: #10b981; } .att-지각 { background: #f59e0b; } .att-결석 { background: #ef4444; } .att-조퇴 { background: #6366f1; } .time-info { margin-top: 10px; font-size: 13px; color: #4b5563; background: #f9fafb; padding: 8px; border-radius: 6px; text-align: center; }
.learning-box { border-left: 3px solid #e5e7eb; padding-left: 10px; margin-bottom: 10px; } .lb-content { font-size: 13px; color: #333; line-height: 1.4; white-space: pre-wrap; }

/* ── 데일리 리포트(학부모) 학습 카드 ── */
.report-body > .report-card,
.report-body > .chat-section {
    flex-shrink: 0;
}
.report-learning-card,
.report-homework-card,
.report-metrics-card {
    padding: 0;
    overflow: visible;
}
.dr-section {
    padding: 16px 16px 14px;
}
.dr-section + .dr-section {
    border-top: 1px solid #eef2f7;
}
.dr-section-title {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 800;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 7px;
}
.dr-section-title i { color: #4338ca; font-size: 14px; }
.dr-section-body { font-size: 13px; color: #1f2937; line-height: 1.55; }
.dr-empty { margin: 0; color: #9ca3af; font-size: 13px; }

.dr-progress-wrap { display: flex; flex-direction: column; gap: 10px; }
.dr-progress-block {
    border-radius: 10px;
    padding: 12px 12px 11px;
    border: 1px solid transparent;
}
.dr-progress-hak {
    background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 100%);
    border-color: #c7d2fe;
}
.dr-progress-sup {
    background: linear-gradient(135deg, #ecfdf5 0%, #f8fafc 100%);
    border-color: #a7f3d0;
}
.dr-progress-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 800;
    color: #312e81;
}
.dr-progress-sup .dr-progress-label { color: #047857; }
.dr-progress-char {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #4338ca;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    flex-shrink: 0;
}
.dr-progress-sup .dr-progress-char { background: #059669; }
.dr-progress-body {
    font-size: 13px;
    line-height: 1.6;
    color: #111827;
    word-break: break-word;
}
.dr-progress-plain,
.dr-progress-extra,
.dr-hw-plain {
    font-size: 13px;
    line-height: 1.6;
    color: #111827;
    word-break: break-word;
}
.dr-hw-list {
    margin: 0;
    padding-left: 1.25rem;
    color: #111827;
}
.dr-hw-list li {
    margin-bottom: 6px;
    line-height: 1.55;
    padding-left: 2px;
}
.dr-hw-list li:last-child { margin-bottom: 0; }

.dr-metrics-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 14px 16px 16px;
    background: #fff;
}
.report-metrics-card .dr-metrics-row {
    border-top: none;
    padding: 16px;
}
.dr-metric {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 10px;
    text-align: center;
}
.dr-metric-label {
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.dr-metric-label i { color: #4338ca; font-size: 12px; }
.dr-metric-value {
    font-size: 18px;
    font-weight: 900;
    color: #111827;
    line-height: 1.2;
}
.dr-metric-unit {
    font-size: 12px;
    font-weight: 700;
    margin-left: 1px;
}
.dr-metric-pass .dr-metric-value { color: #059669; }
.dr-metric-fail .dr-metric-value { color: #dc2626; }

.raon-view-card { background: linear-gradient(to bottom right, #ffffff, #eef2ff); border: 1px solid #c7d2fe; } .raon-title { color: #312e81; font-weight: 800; font-size: 14px; } .raon-text { font-size: 13px; line-height: 1.6; color: #1e1b4b; text-align: justify; margin-top: 10px; }
.chat-section { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; padding-bottom: 10px; } .chat-date-divider { text-align: center; font-size: 10px; color: #9ca3af; margin: 10px 0; }
.chat-bubble { max-width: 80%; padding: 8px 12px; border-radius: 12px; font-size: 12px; line-height: 1.4; position: relative; box-shadow: 0 1px 2px rgba(0,0,0,0.1); } .chat-bubble.parent { align-self: flex-end; background: #fee500; color: #111; border-top-right-radius: 2px; } .chat-bubble.teacher { align-self: flex-start; background: white; color: #111; border-top-left-radius: 2px; } .chat-time { font-size: 9px; color: #999; margin-top: 4px; display: block; text-align: right; }
.fake-reply-bar { background: white; padding: 10px 15px; border-top: 1px solid #eee; display: flex; gap: 10px; align-items: center; flex-shrink: 0; } .fake-input { flex: 1; background: #f3f4f6; border: none; height: 36px; border-radius: 18px; padding: 0 15px; font-size: 12px; color: #666; } .fake-send { width: 36px; height: 36px; border-radius: 50%; background: #312e81; color: white; display: flex; justify-content: center; align-items: center; }
.nav-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.2); color: white; border: none; font-size: 24px; cursor: pointer; width: 50px; height: 50px; border-radius: 50%; display: flex; justify-content: center; align-items: center; transition: 0.2s; } .nav-btn:hover { background: rgba(255,255,255,0.4); } .nav-prev { left: 20px; } .nav-next { right: 20px; } .close-btn-modal { position: absolute; top: 20px; right: 20px; color: white; font-size: 24px; cursor: pointer; z-index: 3001; }
.link-center-modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); z-index: 4000; justify-content: center; align-items: center; }
.link-center-box { background: white; width: 600px; max-height: 80vh; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); display: flex; flex-direction: column; overflow: hidden; }
.lc-header { background: #312e81; color: white; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; } .lc-title { font-size: 16px; font-weight: bold; display: flex; align-items: center; gap: 8px; } .lc-close { cursor: pointer; font-size: 20px; color: white; opacity: 0.8; transition: 0.2s; } .lc-close:hover { opacity: 1; }
.lc-body { padding: 20px; overflow-y: auto; flex: 1; background: #f9fafb; } .lc-list { display: flex; flex-direction: column; gap: 10px; } .lc-item { background: white; border: 1px solid #e5e7eb; border-radius: 8px; padding: 12px 15px; display: flex; align-items: center; justify-content: space-between; } .lc-info { display: flex; align-items: center; gap: 10px; flex: 1; } .lc-name { font-weight: bold; color: #111; width: 70px; } .lc-url-box { background: #f3f4f6; padding: 5px 10px; border-radius: 4px; font-size: 12px; color: #666; flex: 1; margin-right: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 250px; } .lc-actions { display: flex; gap: 5px; } .btn-copy { background: white; border: 1px solid #d1d5db; color: #4b5563; padding: 6px 10px; border-radius: 4px; font-size: 12px; cursor: pointer; transition: 0.2s; } .btn-copy:hover { background: #f3f4f6; color: #111; border-color: #9ca3af; } .btn-send-sim { background: #fee500; border: none; color: #3c1e1e; padding: 6px 10px; border-radius: 4px; font-size: 12px; cursor: pointer; font-weight: bold; } .btn-send-sim:hover { opacity: 0.9; } .lc-footer { padding: 15px 20px; border-top: 1px solid #e5e7eb; background: white; display: flex; justify-content: space-between; align-items: center; } .btn-copy-all { background: #312e81; color: white; border: none; padding: 10px 20px; border-radius: 6px; font-weight: bold; cursor: pointer; } .btn-copy-all:hover { background-color: #282566; }

/* --- [NEW] 드롭다운 메뉴 스타일 (학원관리) --- */
.dropdown {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 65px; /* 헤더 높이만큼 아래에 */
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 0 0 8px 8px;
    z-index: 2000;
    border: 1px solid #e5e7eb;
    border-top: none;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-item {
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    color: #4b5563;
    font-size: 14px;
    transition: 0.2s;
    border-bottom: 1px solid #f3f4f6;
}

.dropdown-item:last-child { border-bottom: none; border-radius: 0 0 8px 8px; }
.dropdown-item:hover { background-color: #f0f7ff; color: #312e81; font-weight: bold; }


/* --- [NEW] 관리자 페이지 레이아웃 (Split View) --- */
.admin-container {
    display: flex;
    gap: 20px;
    height: calc(100vh - 140px); /* 헤더 제외 높이 꽉 채움 */
}

/* 좌측 리스트 영역 */
.admin-list-section {
    flex: 3; /* 30% */
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.admin-search-bar {
    padding: 15px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.admin-list-content {
    flex: 1;
    overflow-y: auto;
}

.student-list-item {
    padding: 15px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}
.student-list-item:hover { background-color: #f0f7ff; }
.student-list-item.active { background-color: #e0e7ff; border-left: 4px solid #312e81; }

.st-avatar-small {
    width: 40px; height: 40px; border-radius: 50%; background: #e5e7eb;
    display: flex; justify-content: center; align-items: center; color: #fff; overflow: hidden;
}
.st-avatar-small img { width: 100%; height: 100%; object-fit: cover; }

/* 우측 상세 정보 영역 */
.admin-detail-section {
    flex: 7; /* 70% */
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    padding: 0;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.admin-detail-section > form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}
.admin-detail-fixed {
    flex-shrink: 0;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #f1f5f9;
}
.admin-detail-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px 24px 24px;
}
.admin-basic-compact .form-grid-3 {
    margin-bottom: 10px;
}
.admin-basic-compact .form-grid-3:last-child {
    margin-bottom: 0;
}

.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 15px; margin-bottom: 20px; }

.form-label { display: block; font-size: 13px; font-weight: bold; color: #4b5563; margin-bottom: 5px; }
.form-input-box {
    width: 100%; padding: 10px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px;
    box-sizing: border-box;
}
.form-input-box:focus { border-color: #312e81; outline: none; box-shadow: 0 0 0 2px rgba(49, 46, 129, 0.1); }

.section-divider {
    border-top: 2px solid #f3f4f6; margin: 30px 0 20px 0; padding-top: 10px;
    font-size: 16px; font-weight: 800; color: #312e81; display: flex; align-items: center; gap: 10px;
}

/* 사진 업로드 UI */
.photo-upload-box {
    width: 120px; height: 150px; border: 2px dashed #d1d5db; border-radius: 8px;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    cursor: pointer; background: #f9fafb; overflow: hidden; position: relative;
    transition: 0.2s;
}
.photo-upload-box:hover { border-color: #312e81; background: #eef2ff; }
.photo-preview { width: 100%; height: 100%; object-fit: cover; display: none; }
.photo-placeholder { text-align: center; color: #9ca3af; font-size: 12px; }

/* 버튼 그룹 */
.btn-action-group {
    display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px;
    position: sticky; bottom: 0; background: white; padding: 10px 0; border-top: 1px solid #eee;
}

/* 클래스 추가 버튼 */
.btn-add-class {
    background-color: #eff6ff;
    color: #3b82f6;
    border: 1px dashed #3b82f6;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    margin-left: 5px;
}
.btn-add-class:hover { background-color: #dbeafe; }

/* 학생 관리: 상태 표시줄 */
.status-bar {
    background: #f8fafc;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid #e2e8f0;
}

.status-option {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}
.status-option input { margin: 0; }
.status-waiting { color: #d97706; }
.status-enrolled { color: #10b981; }
.status-graduated { color: #6b7280; }

/* [NEW] 가족 관계 버튼 스타일 */
.family-badge {
    background: #f3e8ff; 
    color: #7e22ce; 
    border: 1px solid #d8b4fe;
    padding: 4px 10px; 
    border-radius: 20px; 
    font-size: 12px; 
    font-weight: bold;
    cursor: pointer; 
    display: inline-flex; 
    align-items: center; 
    gap: 4px;
    transition: all 0.2s;
}
.family-badge:hover {
    background: #e9d5ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* 미니 버튼 스타일 (서류함용) */
.btn-mini {
    transition: 0.2s;
}
.btn-mini:hover {
    filter: brightness(0.95);
}

/* --- 반 관리 (Class Management) --- */

/* 3단 레이아웃 */
.admin-layout-3col {
    display: flex; gap: 20px; 
    height: calc(100vh - 140px); /* 헤더 제외 높이 꽉 채움 */
}

/* 각 컬럼 */
.col-tree { flex: 0 0 260px; background: white; border-radius: 12px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); display: flex; flex-direction: column; overflow: hidden; }
.col-detail { flex: 1; background: white; border-radius: 12px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); padding: 25px; overflow-y: auto; }
.col-members { flex: 0 0 300px; background: white; border-radius: 12px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); display: flex; flex-direction: column; overflow: hidden; }

/* 트리 스타일 (Collapsible) */
.tree-header { padding: 15px; border-bottom: 1px solid #f3f4f6; display: flex; justify-content: space-between; align-items: center; background: #f9fafb; }
.tree-body { padding: 10px; overflow-y: auto; flex: 1; }

.tree-node-header { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 8px; border-radius: 4px; transition: 0.2s; user-select: none; }
.tree-node-header:hover { background: #f3f4f6; }

/* 회전 화살표 */
.tree-icon { color: #312e81; font-size: 14px; transition: transform 0.2s; width: 16px; text-align: center; }
.tree-icon.collapsed { transform: rotate(-90deg); }

.tree-text-main { font-weight: bold; color: #312e81; font-size: 15px; }
.tree-text-sub { font-weight: bold; color: #6b7280; font-size: 13px; }
.tree-icon-sub { color: #6b7280; font-size: 12px; }

.tree-children { padding-left: 14px; border-left: 1px solid #e5e7eb; margin-left: 7px; overflow: hidden; transition: max-height 0.3s ease-out; }
.tree-children.hidden { display: none; }
.tree-item { 
    padding: 8px 10px; border-radius: 6px; cursor: pointer; font-size: 14px; color: #4b5563; display: flex; align-items: center; justify-content: space-between; transition: 0.2s; 
    text-decoration: none;
}
.tree-item:hover { background: #eff6ff; color: #312e81; }
.tree-item.active { background: #e0e7ff; color: #312e81; font-weight: bold; border-left: 4px solid #312e81; }

/* 상세 정보 스타일 */
.detail-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-bottom: 2px solid #f3f4f6; padding-bottom: 10px; }
.info-box { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 15px; margin-bottom: 20px; }
.info-label { font-size: 12px; color: #64748b; font-weight: bold; margin-bottom: 5px; display: block; }

/* 시간표 리스트 */
.schedule-list { display: flex; flex-direction: column; gap: 8px; }
.schedule-item { 
    display: flex; align-items: center; gap: 10px; background: white; padding: 8px 12px; border: 1px solid #e5e7eb; border-radius: 6px; 
}

/* 학생 목록 스타일 */
.member-header { padding: 15px; border-bottom: 1px solid #f3f4f6; background: #f9fafb; display: flex; justify-content: space-between; align-items: center; }
.member-search-row { padding: 10px; border-bottom: 1px solid #f3f4f6; display: flex; gap: 5px; }
.member-search-row input { flex: 1; }
.member-list { flex: 1; overflow-y: auto; padding: 0; margin: 0; list-style: none; }

.member-item {
    padding: 12px 15px; border-bottom: 1px solid #f3f4f6; display: flex; justify-content: space-between; align-items: center; transition: 0.2s;
}
.member-item:hover { background: #f8fafc; }

/* [Hover] 배제 버튼 (평소엔 숨김) */
.btn-exclude {
    display: none; 
    font-size: 11px; color: #ef4444; border: 1px solid #fecaca; background: white; padding: 2px 6px; border-radius: 4px; cursor: pointer;
}
.member-item:hover .btn-exclude { display: inline-block; }

/* 일괄 배정 리스트 */
.bulk-list { overflow-y: auto; border: 1px solid #e5e7eb; border-radius: 6px; margin-top: 10px; padding: 5px; flex: 1; min-height: 200px; }
.bulk-item { padding: 8px; border-bottom: 1px solid #f3f4f6; display: flex; align-items: center; gap: 10px; }
.bulk-item:hover { background: #f9fafb; }

/* 테이블 스타일 */
.styled-table {
    border-collapse: collapse;
    font-size: 13px;
    background: white;
}
.styled-table th {
    background: #f1f5f9;
    padding: 8px;
    text-align: left;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
}
.styled-table td {
    padding: 8px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}