/* ===== SuneungCoach — Navy Dark + Cream Design ===== */
/* Adapted from suneung_ui_mockup.html */

/* ===== CSS Custom Properties ===== */
:root {
    /* Backgrounds */
    --bg-deep: #0a1628;
    --bg-main: #0d1b2a;
    --bg-card: #152238;
    --bg-elevated: #1b2d4b;

    /* Text */
    --cream: #ffffff;
    --cream-soft: #ffffff;
    --cream-dim: #94a3b8;
    --white: #ffffff;

    /* Accent */
    --accent-blue: #3a7bd5;
    --accent-glow: rgba(58,123,213,0.15);

    /* Semantic (used in templates) */
    --primary: #3a7bd5;
    --primary-dark: #2e6bc4;
    --primary-light: rgba(58,123,213,0.15);
    --accent: #3a7bd5;
    --success: #3a7bd5;
    --success-light: rgba(58,123,213,0.15);
    --warning: #d4a843;
    --warning-light: rgba(212,168,67,0.15);
    --danger: #e74c3c;
    --danger-light: rgba(231,76,60,0.15);
    --info: #3a7bd5;
    --info-light: rgba(58,123,213,0.15);

    /* Gray scale (dark-to-light for dark theme) */
    --gray-50: #0a1628;
    --gray-100: #0d1b2a;
    --gray-200: rgba(245,240,224,0.06);
    --gray-300: rgba(245,240,224,0.1);
    --gray-400: #94a3b8;
    --gray-500: #94a3b8;
    --gray-600: #e8e0cc;
    --gray-700: #f5f0e0;
    --gray-800: #f5f0e0;
    --gray-900: #ffffff;

    /* Borders & Muted */
    --border: rgba(245,240,224,0.06);
    --text-muted: #94a3b8;
    --error-red: #e74c3c;

    /* Aliases */
    --bg: #0a1628;
    --bg-secondary: #0d1b2a;
    --card-bg: #152238;
    --card-border: rgba(245,240,224,0.06);
    --card-shadow: 0 1px 4px rgba(0,0,0,0.3);
    --card-shadow-hover: 0 4px 16px rgba(0,0,0,0.4);

    /* Layout */
    --nav-h: 54px;
    --radius: 8px;
    --radius-sm: 5px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --transition: all 0.2s ease;
    --font-sans: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; caret-color: transparent; }
input, textarea, select, [contenteditable] { caret-color: auto; }
::placeholder { color: var(--cream-dim); opacity: 1; }
html { font-size: 16px; scroll-behavior: smooth; height: 100%; overflow: auto; }
body {
    font-family: var(--font-sans);
    background: var(--bg-deep);
    color: var(--cream);
    line-height: 1.6;
    min-height: 100%;
    overflow: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
}

body.page-scroll,
body.page-scroll html { overflow: auto; height: auto; }
body.page-scroll .container { height: auto; max-height: none; }

@media (max-width: 768px) {
    html, body { overflow: auto; height: auto; }
    .container { height: auto !important; max-height: none !important; overflow: visible !important; }
}

a { color: var(--accent-blue); text-decoration: none; transition: var(--transition); }
a:hover { color: #4a8be5; }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(245,240,224,0.12); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(245,240,224,0.2); }

/* ===== Navbar ===== */
/* ── 베타 배너 ── */
.beta-banner {
    position: relative;
    background: #1a3a5c;
    color: #fff;
    text-align: center;
    padding: 10px 24px;
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    position: sticky;
    top: var(--nav-h);
    z-index: 99;
}
.beta-banner a { color: #fff; text-decoration: underline; font-weight: 600; }
.beta-banner a:hover { opacity: 0.85; }
.beta-banner-close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}
.beta-banner-close:hover { color: #fff; }

.navbar {
    height: var(--nav-h);
    background: rgba(10,22,40,0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
}
.nav-left {
    display: flex;
    align-items: center;
    gap: 24px;
}
.nav-brand a {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--cream);
    letter-spacing: -0.5px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0;
    white-space: nowrap;
}
.nav-brand a i { color: var(--accent-blue); font-size: 1rem; margin-right: 6px; }
.nav-main {
    display: flex;
    align-items: center;
    gap: 0;
}
.nav-main a {
    color: var(--cream);
    text-decoration: none;
    font-size: 1.125rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 6px;
    transition: all 0.15s;
    white-space: nowrap;
}
.nav-divider {
    width: 1px;
    height: 14px;
    background: rgba(245,240,224,0.2);
    flex-shrink: 0;
}
.nav-main a:hover { color: var(--cream-dim); }
.nav-main a.active { color: var(--white); background: rgba(245,240,224,0.08); }
.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.nav-right a {
    color: var(--cream);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 400;
    transition: color 0.2s;
    white-space: nowrap;
}
.nav-right a:hover { color: var(--cream-dim); }
.nav-user {
    color: var(--cream);
    font-size: 0.8125rem;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.nav-user i { font-size: 0.88rem; }

/* Mobile navbar */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--cream);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.5rem;
}
/* PC: 사이드바 전용 요소 숨김 */
.nav-sidebar-header { display: none; }
.nav-sidebar-label { display: none; }
.nav-sidebar-close { display: none; }
.nav-sidebar-overlay { display: none; }
/* PC: section은 내용물 보여야 하므로 inline 처리 */
.nav-sidebar-section { display: contents; }
/* PC: 메인탭 복제용 섹션 숨김 */
#navSidebarMain { display: none; }

@media (max-width: 768px) {
    .navbar { padding: 0 20px; }
    .nav-toggle { display: block; }
    .nav-main { display: none; }

    /* ── Sidebar Overlay ── */
    .nav-sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.6);
        z-index: 998;
        opacity: 0;
        transition: opacity 0.3s;
    }
    .nav-sidebar-overlay.open {
        display: block;
        opacity: 1;
    }

    /* ── Sidebar ── */
    .nav-right {
        position: fixed;
        top: 0;
        right: -280px;
        width: 280px;
        height: 100%;
        background: var(--bg-card);
        border-left: 1px solid rgba(245,240,224,0.1);
        flex-direction: column;
        gap: 0;
        padding: 0;
        z-index: 999;
        overflow-y: auto;
        transition: right 0.3s ease;
        box-shadow: -4px 0 20px rgba(0,0,0,0.3);
    }
    .nav-right.open {
        display: flex;
        right: 0;
    }

    .nav-sidebar-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px;
        border-bottom: 1px solid rgba(245,240,224,0.1);
        flex-shrink: 0;
    }
    .nav-sidebar-header .sidebar-title {
        font-size: 1rem;
        font-weight: 600;
        color: var(--white);
    }
    .nav-sidebar-close {
        background: none;
        border: none;
        color: var(--cream-dim);
        font-size: 1.2rem;
        cursor: pointer;
        padding: 8px;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: var(--radius-sm);
        transition: all 0.2s;
    }
    .nav-sidebar-close:hover { color: var(--white); background: rgba(245,240,224,0.06); }

    .nav-sidebar-section {
        padding: 8px 0;
        border-bottom: 1px solid rgba(245,240,224,0.06);
    }
    .nav-sidebar-label {
        padding: 8px 16px 4px;
        font-size: 0.7rem;
        font-weight: 600;
        color: var(--cream-dim);
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .nav-right a {
        padding: 12px 16px;
        width: 100%;
        font-size: 0.95rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        gap: 8px;
        transition: background 0.15s;
    }
    .nav-right a:hover { background: rgba(245,240,224,0.04); }
    .nav-right a i { width: 20px; text-align: center; font-size: 0.9rem; color: var(--cream-dim); }

    .nav-user {
        padding: 14px 16px;
        font-size: 0.85rem;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .nav-user i { width: 20px; text-align: center; color: var(--accent-blue); }

    .nav-sidebar-header { display: flex; }
    .nav-sidebar-section { display: block; }
    #navSidebarMain { display: block; }
    .nav-sidebar-label { display: block; }
    .nav-sidebar-overlay { display: none; }
    .nav-sidebar-overlay.open { display: block; }
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 16px 24px;
    flex: 1;
    min-height: 0;
    overflow: auto;
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    .container { padding: 12px; }
}

/* ===== Page Header ===== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
}
.page-header h1 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 8px;
}
.page-header h1 i { color: var(--accent-blue); font-size: 1rem; }

/* ===== Breadcrumb ===== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
    color: var(--cream-dim);
    margin-bottom: 8px;
    flex-shrink: 0;
}
.breadcrumb a { color: var(--cream-dim); font-weight: 500; }
.breadcrumb a:hover { color: var(--accent-blue); }
.breadcrumb .separator { color: var(--cream-dim); opacity: 0.5; }

/* ===== Alert / Toast ===== */
.alert {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    flex-shrink: 0;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideDown 0.3s ease;
    position: relative;
}
.alert::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 1rem;
}
.alert-success { background: var(--accent-glow); color: var(--accent-blue); border-left: 3px solid var(--accent-blue); }
.alert-success::before { content: '\f058'; }
.alert-error { background: var(--danger-light); color: var(--danger); border-left: 3px solid var(--danger); }
.alert-error::before { content: '\f06a'; }
.alert-info { background: var(--accent-glow); color: var(--accent-blue); border-left: 3px solid var(--accent-blue); }
.alert-info::before { content: '\f05a'; }
.alert-warning { background: var(--warning-light); color: var(--warning); border-left: 3px solid var(--warning); }
.alert-warning::before { content: '\f071'; }
.alert-close {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: inherit;
    opacity: 0.5;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
}
.alert-close:hover { opacity: 1; }

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Auth Pages ===== */
.auth-wrapper {
    height: calc(100vh - var(--nav-h));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: linear-gradient(135deg, var(--bg-deep) 0%, #0f2036 50%, var(--bg-main) 100%);
    overflow: hidden;
}
.auth-container {
    width: 360px;
    max-width: 100%;
    background: var(--bg-card);
    border: 1px solid rgba(245,240,224,0.06);
    border-radius: var(--radius);
    padding: 40px 32px;
    text-align: center;
}
.auth-logo {
    text-align: center;
    margin-bottom: 24px;
}
.auth-logo i {
    display: none;
}
.auth-logo h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.5px;
}
.auth-logo h1 .brand-accent { color: var(--accent-blue); }
.auth-logo p {
    font-size: 0.92rem;
    color: var(--cream);
    margin-top: 6px;
}
.auth-link {
    text-align: center;
    margin-top: 16px;
    font-size: 0.92rem;
    color: var(--cream);
}
.auth-link a { color: var(--accent-blue); font-weight: 500; }
.auth-link a:hover { text-decoration: underline; }

/* ===== Forms ===== */
.form-group { margin-bottom: 12px; }
.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    font-size: 1rem;
    color: var(--cream);
}
.form-group label i { margin-right: 4px; opacity: 0.6; font-size: 0.92rem; }
.form-group label .required { color: var(--danger); margin-left: 2px; }
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-elevated);
    border: 1px solid rgba(245,240,224,0.1);
    border-radius: var(--radius-sm);
    color: var(--cream);
    font-family: var(--font-sans);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--cream-dim);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent-blue);
}
.form-group input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.form-group .form-hint {
    font-size: 0.88rem;
    color: var(--cream-dim);
    margin-top: 4px;
}
.form-group .form-error {
    font-size: 0.88rem;
    color: var(--danger);
    margin-top: 4px;
}
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }
.inline-form {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    margin-bottom: 12px;
    flex-shrink: 0;
}
.inline-form input {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-elevated);
    border: 1px solid rgba(245,240,224,0.1);
    border-radius: var(--radius-sm);
    color: var(--cream);
    font-family: var(--font-sans);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}
.inline-form input:focus {
    border-color: var(--accent-blue);
}
.hint { color: var(--cream-dim); font-size: 0.92rem; margin-bottom: 8px; }

/* File upload */
.file-upload-area {
    border: 1px dashed rgba(245,240,224,0.15);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-elevated);
    position: relative;
}
.file-upload-area:hover {
    border-color: var(--accent-blue);
    background: rgba(58,123,213,0.05);
}
.file-upload-area.dragover {
    border-color: var(--accent-blue);
    background: rgba(58,123,213,0.08);
}
.file-upload-area i {
    font-size: 1.5rem;
    color: var(--cream-dim);
    margin-bottom: 8px;
    display: block;
}
.file-upload-area p {
    font-size: 1rem;
    color: var(--cream-dim);
}
.file-upload-area .file-name {
    font-size: 0.92rem;
    color: var(--accent-blue);
    font-weight: 600;
    margin-top: 8px;
}
.file-upload-area input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

@media (max-width: 768px) {
    .form-row { flex-direction: column; gap: 0; }
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(245,240,224,0.15);
    background: transparent;
    color: var(--cream);
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
    white-space: nowrap;
}
.btn:hover { border-color: var(--cream); color: var(--cream); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn i { font-size: 0.88rem; }

.btn-primary { background: var(--accent-blue); color: var(--white); border-color: var(--accent-blue); }
.btn-primary:hover { background: #4a8be5; color: var(--white); border-color: #4a8be5; }

.btn-success { background: var(--accent-blue); color: var(--white); border-color: var(--accent-blue); }
.btn-success:hover { background: #4a8be5; color: var(--white); }

.btn-danger { background: var(--danger); color: var(--white); border-color: var(--danger); }
.btn-danger:hover { background: #d94335; color: var(--white); }

.btn-cream { background: var(--cream); color: var(--bg-main); border-color: var(--cream); }
.btn-cream:hover { background: var(--white); color: var(--bg-main); }

.btn-ghost { background: transparent; border-color: rgba(245,240,224,0.15); color: var(--cream); }
.btn-ghost:hover { border-color: var(--cream); color: var(--cream); }

.btn-sm { padding: 4px 10px; font-size: 0.88rem; }
.btn-lg { padding: 11px 24px; font-size: 0.95rem; }
.btn-full { width: 100%; }

.btn-tutor {
    background: var(--accent-blue);
    color: var(--white);
    border-color: var(--accent-blue);
}
.btn-tutor:hover { background: #4a8be5; color: var(--white); }

.btn-end {
    background: var(--danger);
    color: var(--white);
    border-color: var(--danger);
    width: 100%;
    margin-top: 8px;
}
.btn-end:hover { background: #d94335; color: var(--white); }

.btn-group { display: flex; gap: 6px; flex-wrap: wrap; }

/* ===== Stat Cards ===== */
.stat-grid {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex-shrink: 0;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid rgba(245,240,224,0.06);
    border-radius: var(--radius);
    padding: 14px 20px;
    flex: 1;
    text-align: center;
    transition: var(--transition);
}
.stat-card:hover { border-color: rgba(245,240,224,0.12); }
.stat-icon {
    display: none;
}
.stat-info h3 { font-size: 1.8rem; font-weight: 700; color: var(--white); line-height: 1.2; }
.stat-info p { font-size: 0.88rem; color: var(--cream); margin-top: 2px; }

/* Stat color overrides */
.stat-card:nth-child(2) .stat-info h3 { color: var(--accent-blue); }
.stat-card:nth-child(3) .stat-info h3 { color: var(--danger); }

@media (max-width: 768px) {
    .stat-grid { flex-wrap: wrap; }
    .stat-card { min-width: calc(50% - 8px); }
}

/* ===== Cards ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    align-content: start;
}
.card {
    background: var(--bg-card);
    padding: 14px;
    border-radius: var(--radius);
    border: 1px solid rgba(245,240,224,0.06);
    transition: var(--transition);
}
.card:hover { border-color: rgba(245,240,224,0.12); }
.card h3 {
    margin-bottom: 4px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 8px;
}
.card h3 i { color: var(--accent-blue); font-size: 0.92rem; }
.card-actions { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }

@media (max-width: 768px) {
    .card-grid { grid-template-columns: 1fr; }
}

/* ===== Tables ===== */
.table-wrapper {
    background: transparent;
    border-radius: var(--radius);
    overflow: auto;
    border: none;
    box-shadow: none;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
    cursor: default;
    user-select: none;
}
.data-table th {
    text-align: left;
    padding: 8px 12px;
    color: var(--cream-dim);
    font-weight: 500;
    font-size: 0.92rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(245,240,224,0.08);
    background: transparent;
}
.data-table th i { margin-right: 4px; opacity: 0.6; }
.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(245,240,224,0.04);
    color: var(--cream);
    font-size: 1rem;
}
.data-table tbody tr { transition: var(--transition); }
.data-table tbody tr:hover td { background: rgba(245,240,224,0.02); }
.data-table tbody tr:last-child td { border-bottom: none; }

@media (max-width: 768px) {
    .data-table th, .data-table td { padding: 8px; font-size: 0.92rem; }
}

/* ===== Section ===== */
.section { margin-bottom: 12px; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
}
.section h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 8px;
}
.section h2 i { color: var(--accent-blue); font-size: 1rem; }

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 32px 20px;
    color: var(--cream-dim);
}
.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: block;
    opacity: 0.4;
}
.empty-state h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--cream);
    margin-bottom: 6px;
}
.empty-state p {
    font-size: 1rem;
    color: var(--cream-dim);
    max-width: 380px;
    margin: 0 auto;
}
.empty {
    color: var(--cream-dim);
    font-style: italic;
    padding: 12px 0;
}

/* ===== Tags / Badges ===== */
.subject-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--cream-dim);
    font-size: 0.88rem;
    font-weight: 500;
}
.subject-tag i { font-size: 0.7rem; }
.badge-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
}
.badge-primary { background: var(--accent-glow); color: var(--accent-blue); }
.badge-success { background: var(--accent-glow); color: var(--accent-blue); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-warning { background: rgba(245,240,224,0.08); color: var(--cream); }
.badge-dim { background: rgba(245,240,224,0.08); color: var(--cream); }

.score { font-size: 1.2rem; font-weight: 700; color: var(--white); }

/* ===== Rates ===== */
.rate-high { color: var(--accent-blue); }
.rate-mid { color: var(--warning); }
.rate-low { color: var(--danger); }

/* ===== Result Page ===== */
.result-summary {
    display: flex;
    align-items: center;
    gap: 32px;
    justify-content: center;
    margin-bottom: 24px;
    padding: 0;
    background: none;
    border-radius: 0;
    box-shadow: none;
    border: none;
    flex-shrink: 0;
    text-align: center;
}
.result-summary .result-label { font-size: 1rem; color: var(--cream-dim); margin-bottom: 4px; }
.score-big {
    font-size: 4rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.02em;
    line-height: 1;
}
.score-big .score-total { color: var(--cream-dim); font-size: 2rem; font-weight: 400; }
.result-detail {
    color: var(--cream);
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: center;
}
.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
    gap: 8px;
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
    overflow-y: visible;
}
.result-item {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: default;
    transition: all 0.15s;
    padding: 0;
    border: none;
    box-shadow: none;
    gap: 0;
    border-left: none;
}
.result-item.correct {
    background: rgba(58,123,213,0.12);
    color: var(--accent-blue);
    border: 1px solid rgba(58,123,213,0.25);
}
.result-item.wrong {
    background: rgba(231,76,60,0.15);
    color: var(--danger);
    border: 1px solid rgba(231,76,60,0.3);
    cursor: pointer;
}
.result-item.wrong:hover {
    background: rgba(231,76,60,0.25);
    transform: scale(1.08);
}
.result-item.done {
    background: rgba(46,204,113,0.15);
    color: #2ecc71;
    border: 1px solid rgba(46,204,113,0.3);
    cursor: pointer;
}
.result-item.done:hover {
    background: rgba(46,204,113,0.25);
    transform: scale(1.08);
}
.result-item.reviewed {
    background: rgba(240,165,0,0.15);
    color: #f0a500;
    border: 1px solid rgba(240,165,0,0.3);
    cursor: pointer;
}
.result-item.reviewed:hover {
    background: rgba(240,165,0,0.25);
    transform: scale(1.08);
}
.result-item .q-num {
    background: none;
    width: auto;
    height: auto;
    min-width: auto;
    border-radius: 0;
    font-size: 1.1rem;
    color: inherit;
}
.result-item .mark, .result-item .wrong-info, .result-item .btn { display: none; }

@media (max-width: 768px) {
    .result-grid { grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; }
    .result-summary { flex-direction: column; gap: 12px; }
    .score-big { font-size: 3rem; }
}

/* ===== Solve Page (base styles) ===== */
.solve-container { background: var(--bg-card); border-radius: var(--radius); overflow: hidden; }

/* ===== Answer Grid (Admin) ===== */
.answer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 6px;
}
.answer-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(245,240,224,0.06);
}
.answer-item label { font-weight: 600; min-width: 3rem; font-size: 1rem; color: var(--cream); }
.answer-item select {
    padding: 4px 8px;
    border: 1px solid rgba(245,240,224,0.1);
    border-radius: 4px;
    font-size: 1rem;
    font-family: var(--font-sans);
    background: var(--bg-card);
    color: var(--cream);
    outline: none;
}
.answer-item select:focus { border-color: var(--accent-blue); }

/* ===== Chat (shared) ===== */
.chat-area {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.chat-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 1rem;
    line-height: 1.55;
}
.chat-msg.ai {
    align-self: flex-start;
    background: var(--bg-elevated);
    color: var(--cream);
    border-bottom-left-radius: 4px;
    border: none;
}
.chat-msg.student {
    align-self: flex-end;
    background: #2d6399;
    color: var(--white);
    border-bottom-right-radius: 4px;
}
.chat-role {
    font-weight: 600;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 4px;
    opacity: 0.6;
}
.chat-msg.student .chat-role { opacity: 0.7; color: rgba(255,255,255,0.8); }
.chat-input-area { padding: 10px 14px; border-top: 1px solid rgba(245,240,224,0.06); }
.input-row { display: flex; gap: 8px; }
.input-row textarea {
    flex: 1;
    padding: 9px 14px;
    background: var(--bg-elevated);
    border: 1px solid rgba(245,240,224,0.1);
    border-radius: 20px;
    color: var(--cream);
    font-family: var(--font-sans);
    font-size: 1rem;
    outline: none;
    resize: none;
    transition: border-color 0.2s;
}
.input-row textarea:focus { border-color: var(--accent-blue); }
.input-row textarea::placeholder { color: var(--cream-dim); }
.turn-info { font-size: 0.88rem; color: var(--cream-dim); margin-bottom: 6px; }

/* ===== Loading ===== */
.chat-loading { text-align: center; padding: 32px; color: var(--cream-dim); font-size: 1rem; }
.spinner {
    width: 28px; height: 28px;
    border: 3px solid rgba(245,240,224,0.1);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 10px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Typing indicator dots */
.typing-dots {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}
.typing-dots span {
    width: 7px;
    height: 7px;
    background: var(--cream-dim);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}
.typing-dots span:nth-child(1) { animation-delay: 0s; }
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* ===== Report ===== */
.report-container {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid rgba(245,240,224,0.06);
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    box-shadow: none;
}
.report-meta {
    background: var(--bg-elevated);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(245,240,224,0.06);
    color: var(--cream);
}
.report-meta i { font-size: 1rem; color: var(--cream-dim); }
.report-section { margin-bottom: 16px; }
.report-section h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-blue);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(58,123,213,0.2);
    display: flex;
    align-items: center;
    gap: 8px;
}
.report-section h2 i { font-size: 1rem; color: var(--accent-blue); }
.report-section p { color: var(--cream); line-height: 1.7; white-space: pre-wrap; }
.chat-log { margin-top: 8px; max-height: 40vh; overflow-y: auto; }
.chat-log .chat-msg { max-width: 420px; margin-bottom: 8px; padding: 0; background: none; border-radius: 0; }

/* ===== Student Card (Admin) ===== */
.student-card {
    margin-bottom: 12px;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 14px;
    border: 1px solid rgba(245,240,224,0.06);
    box-shadow: none;
}
.student-card h3 {
    color: var(--white);
    margin-bottom: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.student-card h3 i { color: var(--accent-blue); font-size: 1rem; }
.student-card .table-wrapper { max-height: 200px; overflow-y: auto; }

/* ===== Utilities ===== */
.text-center { text-align: center; }
.text-muted { color: var(--cream-dim); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.gap-1 { gap: 8px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* ===== Tooltip ===== */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    background: var(--bg-elevated);
    color: var(--cream);
    font-size: 0.85rem;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    margin-bottom: 4px;
    border: 1px solid rgba(245,240,224,0.08);
}
[data-tooltip]:hover::after { opacity: 1; }

/* ===== Progress Bar ===== */
.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(245,240,224,0.08);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 6px;
}
.progress-bar .progress-fill {
    height: 100%;
    background: var(--accent-blue);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* ===== Skeleton Loading ===== */
.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-elevated) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== Divider ===== */
.divider {
    height: 1px;
    background: rgba(245,240,224,0.06);
    margin: 12px 0;
}

/* ===== Back Link ===== */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--cream-dim);
    font-size: 1rem;
    font-weight: 500;
    margin-top: 8px;
    padding: 4px 0;
    flex-shrink: 0;
}
.back-link:hover { color: var(--accent-blue); }
.back-link i { font-size: 0.85rem; }

/* ===== Welcome Banner ===== */
.welcome-banner {
    background: var(--bg-card);
    border: 1px solid rgba(245,240,224,0.06);
    color: var(--cream);
    padding: 14px 20px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}
.welcome-banner::after { display: none; }
.welcome-banner h1 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 2px;
    color: var(--white);
}
.welcome-banner p {
    font-size: 0.92rem;
    color: var(--cream);
    opacity: 1;
}

/* ===== Exam Form Specific ===== */
.form-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid rgba(245,240,224,0.06);
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    box-shadow: none;
}

/* ===== Scroll to Top ===== */
.scroll-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 36px;
    height: 36px;
    background: var(--accent-blue);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 999;
    font-size: 1rem;
}
.scroll-top:hover { background: #4a8be5; transform: translateY(-2px); }
.scroll-top.visible { display: flex; }

/* ===== Wrong item list (result page alternate) ===== */
.wrong-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
}
.wrong-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid rgba(245,240,224,0.06);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--danger);
    font-size: 1rem;
}
.wrong-list-item .q-num {
    font-weight: 700;
    color: var(--danger);
    min-width: 30px;
    background: none;
    width: auto;
    height: auto;
    border-radius: 0;
}
.wrong-list-item .wrong-info { flex: 1; color: var(--cream); }

/* ── 알림 시스템 ── */
.notif-badge {
    position: absolute; top: -6px; right: -8px;
    background: var(--danger); color: #fff; font-size: 0.65rem;
    min-width: 16px; height: 16px; line-height: 16px;
    border-radius: 8px; text-align: center; padding: 0 4px;
}
.notif-dropdown {
    position: absolute; top: 100%; right: 0; z-index: 1000;
    width: 320px; max-height: 400px; overflow-y: auto;
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.notif-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 14px; border-bottom: 1px solid var(--border);
    font-size: 0.85rem; color: var(--cream);
}
.notif-header a { color: var(--accent-blue); font-size: 0.75rem; text-decoration: none; }
.notif-item {
    padding: 10px 14px; border-bottom: 1px solid var(--border);
    cursor: pointer; transition: background 0.2s;
}
.notif-item:hover { background: var(--bg-card); }
.notif-item.unread { border-left: 3px solid var(--accent-blue); }
.notif-item.read { opacity: 0.6; }
.notif-title { font-size: 0.82rem; color: var(--cream); margin-bottom: 2px; }
.notif-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.notif-time { font-size: 0.7rem; color: var(--text-muted); }
.notif-delete { background: none; border: none; color: var(--cream-dim); font-size: 1rem; cursor: pointer; padding: 0 4px; line-height: 1; opacity: 0.5; transition: opacity 0.2s, color 0.2s; }
.notif-delete:hover { opacity: 1; color: var(--error-red, #e74c3c); }
.notif-empty { padding: 20px; text-align: center; color: var(--text-muted); font-size: 0.85rem; }

/* ── 계정관리 ── */
.acct-wrap { font-size: 0.85rem; }
.acct-card { background: var(--bg-card); border-radius: 10px; padding: 14px; margin-bottom: 10px; }
.acct-card h4 { font-size: 0.85rem; color: var(--cream); margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.acct-grid { display: grid; grid-template-columns: 50px 1fr; gap: 4px 10px; font-size: 0.8rem; }
.acct-label { color: var(--cream-dim); font-weight: 600; }
.acct-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.acct-input { width: 100%; padding: 6px 10px; margin-bottom: 6px; font-size: 0.8rem; border-radius: 6px; border: 1px solid var(--border); background: var(--bg-elevated); color: var(--cream); }
.acct-input::placeholder { color: var(--cream-dim); }
@media (max-width: 600px) { .acct-row2 { grid-template-columns: 1fr; } }

/* ── 설정 페이지 ── */
.settings-section {
    background: var(--bg-card); border-radius: 12px;
    padding: 20px; margin-bottom: 20px;
}
.settings-section h3 {
    font-size: 1rem; color: var(--cream); margin-bottom: 14px;
    padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.code-display {
    font-size: 1.8rem; font-weight: 700; color: var(--accent-blue);
    letter-spacing: 2px; text-align: center; padding: 16px;
    background: var(--bg-elevated); border-radius: 8px; margin-bottom: 12px;
}
.conn-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0; border-bottom: 1px solid var(--border);
}
.conn-item:last-child { border-bottom: none; }
.conn-info { flex: 1; }
.conn-name { font-weight: 600; color: var(--cream); }
.conn-detail { font-size: 0.8rem; color: var(--text-muted); }
.pending-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px; margin-bottom: 8px;
    background: var(--bg-elevated); border-radius: 8px;
}
.pending-info { flex: 1; }
.pending-name { font-weight: 600; color: var(--cream); }
.pending-detail { font-size: 0.8rem; color: var(--text-muted); }
.pending-actions { display: flex; gap: 8px; }

/* ── 요청 이력 ── */
.request-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0; border-bottom: 1px solid var(--border);
}
.request-item:last-child { border-bottom: none; }
.request-status { font-size: 0.75rem; padding: 2px 8px; border-radius: 10px; }
.request-status.pending { background: rgba(255,193,7,0.2); color: #ffc107; }
.request-status.approved { background: rgba(46,204,113,0.2); color: #2ecc71; }
.request-status.rejected { background: rgba(231,76,60,0.2); color: #e74c3c; }

/* ========================================
   MOBILE RESPONSIVE — 480px breakpoint
   ======================================== */
@media (max-width: 480px) {
    /* ── Base & Container ── */
    .container { padding: 8px !important; }

    /* ── Navbar ── */
    .navbar { padding: 0 20px; }
    .nav-toggle { padding: 10px; min-width: 44px; min-height: 44px; }
    .nav-notif { width: 100%; }
    .nav-notif > a { width: 100%; }

    /* ── Auth Pages ── */
    .auth-wrapper {
        height: auto;
        min-height: calc(100dvh - var(--nav-h));
        overflow-y: auto;
        padding: 24px 12px;
        align-items: flex-start;
    }
    .auth-container {
        width: 100% !important;
        max-width: 100%;
        padding: 24px 16px;
    }
    .auth-logo h1 { font-size: 1.3rem; }
    .auth-logo p { font-size: 0.85rem; }
    .auth-link { font-size: 0.88rem; min-height: 44px; display: flex; align-items: center; justify-content: center; }

    /* ── Buttons — touch targets ── */
    .btn { min-height: 44px; padding: 10px 16px; font-size: 0.92rem; }
    .btn-sm { min-height: 40px; padding: 8px 12px; font-size: 0.85rem; }
    .btn-lg { min-height: 48px; padding: 12px 20px; }
    .btn-group { flex-direction: column; }
    .btn-group .btn { width: 100%; }

    /* ── Form Inputs ── */
    .form-group { margin-bottom: 14px; }
    .form-group label { font-size: 0.92rem; }
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* iOS zoom 방지 */
        padding: 12px 14px;
        min-height: 44px;
    }
    .inline-form { flex-direction: column; }
    .inline-form input { font-size: 16px; min-height: 44px; }

    /* ── Alerts ── */
    .alert { font-size: 0.88rem; padding: 10px 40px 10px 12px; }
    .alert-close { min-width: 40px; min-height: 40px; display: flex; align-items: center; justify-content: center; padding: 8px; }

    /* ── Stat Cards ── */
    .stat-grid { flex-direction: column; gap: 8px; }
    .stat-card { min-width: 100%; padding: 12px 16px; }
    .stat-info h3 { font-size: 1.5rem; }

    /* ── Cards ── */
    .card { padding: 12px; }
    .card-grid { grid-template-columns: 1fr; }
    .card-actions { flex-direction: column; }
    .card-actions .btn { width: 100%; }

    /* ── Page Header ── */
    .page-header { flex-direction: column; align-items: flex-start; gap: 6px; }
    .page-header h1 { font-size: 1rem; }
    .breadcrumb { font-size: 0.82rem; flex-wrap: wrap; }

    /* ── Notifications ── */
    .notif-dropdown { width: calc(100vw - 16px); right: -8px; max-height: 60vh; }
    .notif-item { padding: 12px 14px; min-height: 44px; }
    .notif-delete { min-width: 40px; min-height: 40px; display: flex; align-items: center; justify-content: center; padding: 8px; }

    /* ── Tables → Card View ── */
    .data-table,
    .data-table thead,
    .data-table tbody,
    .data-table th,
    .data-table td,
    .data-table tr { display: block; }

    .data-table thead { display: none; }

    .data-table tbody tr {
        background: var(--bg-card);
        border: 1px solid rgba(245,240,224,0.08);
        border-radius: var(--radius);
        margin-bottom: 8px;
        padding: 12px;
    }

    .data-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 6px 0 !important;
        border-bottom: 1px solid rgba(245,240,224,0.04) !important;
        text-align: right !important;
        font-size: 0.88rem !important;
    }
    .data-table td:last-child { border-bottom: none !important; }

    .data-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--cream-dim);
        font-size: 0.78rem;
        text-align: left;
        flex-shrink: 0;
        margin-right: 12px;
    }

    /* ── Result Grid ── */
    .result-grid { grid-template-columns: repeat(auto-fill, minmax(36px, 1fr)); gap: 5px; }
    .result-summary { gap: 10px; }
    .score-big { font-size: 2.5rem; }
    .score-big .score-total { font-size: 1.3rem; }

    /* ── Answer Grid ── */
    .answer-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
    .answer-item label { min-width: 2.5rem; font-size: 0.85rem; }
    .answer-item select { min-height: 36px; }

    /* ── Modals ── */
    .modal-box { width: 95% !important; max-width: 100% !important; padding: 16px !important; max-height: 90vh; }
    .modal-close { min-width: 44px; min-height: 44px; }

    /* ── Settings / Account ── */
    .settings-section { padding: 14px; }
    .acct-card { padding: 12px; }
    .acct-grid { grid-template-columns: 55px 1fr; gap: 4px 8px; }
    .code-display { font-size: 1.4rem; padding: 12px; letter-spacing: 1px; }

    .pending-item { flex-direction: column; gap: 8px; align-items: flex-start; }
    .pending-actions { width: 100%; display: flex; }
    .pending-actions form { flex: 1; }
    .pending-actions form .btn { width: 100%; }

    .conn-item { flex-direction: column; gap: 8px; align-items: flex-start; }
    .conn-item form { width: 100%; }
    .conn-item form .btn { width: 100%; }

    /* ── Admin students.html — 7-column flex → card ── */
    .student-header { display: none !important; }

    .student-row {
        flex-wrap: wrap !important;
        padding: 12px !important;
        gap: 2px 0 !important;
        background: var(--bg-card);
        border: 1px solid rgba(245,240,224,0.08);
        border-radius: var(--radius);
        margin-bottom: 8px;
    }

    .student-row > span {
        flex: none !important;
        width: 100% !important;
        text-align: right !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 4px 0 !important;
        border-bottom: 1px solid rgba(245,240,224,0.04);
        font-size: 0.88rem !important;
    }
    .student-row > span:last-of-type { border-bottom: none; }

    .student-row > span::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--cream-dim);
        font-size: 0.78rem;
        text-align: left;
        flex-shrink: 0;
        margin-right: 8px;
    }

    .student-row > i.fa-chevron-right { display: none !important; }

    /* ── Chat ── */
    .chat-msg { max-width: 92%; }
    .chat-log .chat-msg { max-width: 100%; }
    .chat-area { padding: 10px 12px; }

    /* ── File Upload ── */
    .file-upload-area { padding: 14px 10px; }
    .file-upload-area i { font-size: 1.2rem; }
    .file-upload-area p { font-size: 0.88rem; }

    /* ── Scroll to Top ── */
    .scroll-top { bottom: 16px; right: 16px; width: 44px; height: 44px; }

    /* ── Back Link ── */
    .back-link { min-height: 44px; display: inline-flex; align-items: center; }

    /* ── Empty State ── */
    .empty-state { padding: 24px 12px; }
    .empty-state i { font-size: 2rem; }

    /* ── Welcome Banner ── */
    .welcome-banner { padding: 12px 14px; }
    .welcome-banner h1 { font-size: 1rem; }
}
