/* ============================================================
   Next Age Solutions — Student Portal
   Central Stylesheet  |  assets/css/style.css
   ============================================================ */

/* ---------- RESET + TOKENS ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --brand:        #2563eb;
    --brand-dark:   #1d4ed8;
    --brand-light:  #dbeafe;
    --accent:       #9333ea;
    --accent-light: #f3e8ff;
    --success:      #10b981;
    --success-light:#d1fae5;
    --warning:      #f59e0b;
    --warning-light:#fef3c7;
    --danger:       #ef4444;
    --danger-light: #fee2e2;
    --ink:          #0f172a;
    --ink-2:        #334155;
    --ink-3:        #64748b;
    --line:         #e2e8f0;
    --bg:           #ffffff;
    --bg-2:         #f8fafc;
    --bg-3:         #f1f5f9;
    --radius:       12px;
    --radius-lg:    20px;
    --shadow-sm:    0 1px 2px rgba(15,23,42,0.06);
    --shadow:       0 10px 30px -10px rgba(15,23,42,0.15);
    --shadow-lg:    0 25px 50px -12px rgba(15,23,42,0.25);
    --grad:         linear-gradient(135deg, #2563eb 0%, #9333ea 100%);
    --grad-soft:    linear-gradient(135deg, #dbeafe 0%, #f3e8ff 100%);
    --sidebar-w:    264px;
}

html { scroll-behavior: smooth; height: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--ink);
    line-height: 1.6;
    background: var(--bg);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100%;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }
img, svg { max-width: 100%; height: auto; display: block; }

/* ---------- ANIMATIONS ---------- */
@keyframes fadeUp   { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn   { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin     { to   { transform: rotate(360deg); } }
@keyframes scaleIn  { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes bounce   { 0%, 80%, 100% { transform: translateY(0); opacity: 0.4; } 40% { transform: translateY(-8px); opacity: 1; } }

.anim   { animation: fadeUp 0.6s ease-out both; }
.anim-2 { animation-delay: 0.1s; }
.anim-3 { animation-delay: 0.2s; }

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    line-height: 1;
    font-family: inherit;
}
.btn-primary {
    background: var(--grad);
    color: #fff;
    box-shadow: 0 4px 14px rgba(37,99,235,0.35);
    width: 100%;
}
.btn-primary:hover  { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(37,99,235,0.45); color: #fff; text-decoration: none; }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }

.btn-ghost {
    background: none;
    color: var(--ink-2);
    border: 1.5px solid var(--line);
    margin-top: 12px;
    width: 100%;
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }

.btn-outline {
    background: var(--bg);
    color: var(--ink-2);
    border: 1.5px solid var(--line);
}
.btn-outline:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }

.btn-block { width: 100%; }

.btn-sm {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.btn-sm-primary { background: var(--grad); color: #fff; box-shadow: 0 3px 10px rgba(37,99,235,0.3); }
.btn-sm-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(37,99,235,0.4); }
.btn-sm-outline { background: var(--bg); color: var(--ink-2); border: 1.5px solid var(--line); }
.btn-sm-outline:hover { border-color: var(--brand); color: var(--brand); }

.btn-white {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255,255,255,0.15);
    border: 1.5px solid rgba(255,255,255,0.3);
    border-radius: var(--radius);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}
.btn-white:hover { background: rgba(255,255,255,0.25); color: #fff; }

/* Spinner inside buttons */
.btn-spinner {
    display: none;
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
.loading .btn-spinner { display: block; }
.loading .btn-text   { display: none; }

/* ---------- ALERTS ---------- */
.alert {
    display: none;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 20px;
    align-items: center;
    gap: 10px;
}
.alert.show       { display: flex; }
.alert-error      { background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; }
.alert-success    { background: #f0fdf4; border: 1px solid #bbf7d0; color: #16a34a; }
.alert-warning    { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }

/* ---------- FORM ELEMENTS ---------- */
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--ink-2);
    margin-bottom: 6px;
}
.form-group label span.req { color: var(--danger); margin-left: 2px; }

.input-wrap { position: relative; }
.input-wrap .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ink-3);
    pointer-events: none;
    font-size: 1rem;
    line-height: 1;
}

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 13px 16px 13px 42px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    color: var(--ink);
    background: var(--bg);
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}
.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}
.form-group textarea {
    resize: vertical;
    min-height: 80px;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.form-group input::placeholder { color: var(--ink-3); }
.form-group input.error { border-color: var(--danger); }

.input-action {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ink-3);
    padding: 4px;
    font-size: 1rem;
    transition: color 0.2s;
    line-height: 1;
}
.input-action:hover { color: var(--brand); }

.hint { font-size: 0.8125rem; color: var(--ink-3); margin-top: 6px; }

.field-error { font-size: 0.8125rem; color: var(--danger); margin-top: 4px; display: none; }
.field-error.show { display: block; }

.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 540px) { .form-grid-2 { grid-template-columns: 1fr; } }

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 8px;
}

.checkbox-wrap {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
}
.checkbox-wrap input[type="checkbox"] {
    width: 16px; height: 16px;
    accent-color: var(--brand);
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}
.checkbox-wrap span {
    font-size: 0.875rem;
    color: var(--ink-2);
    line-height: 1.5;
}

.forgot-link { font-size: 0.875rem; font-weight: 600; color: var(--brand); }
.forgot-link:hover { color: var(--brand-dark); }

.form-footer { text-align: center; margin-top: 24px; font-size: 0.9375rem; color: var(--ink-3); }
.form-footer a { font-weight: 600; }

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--ink-3);
    font-size: 0.8125rem;
}
.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--line);
}

/* ---------- LOGIN METHOD TOGGLE ---------- */
.login-method-tabs {
    display: flex;
    background: var(--bg-3);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 24px;
    gap: 4px;
}
.login-method-tab {
    flex: 1;
    padding: 9px 12px;
    border-radius: 7px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: none;
    color: var(--ink-3);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: inherit;
}
.login-method-tab.active {
    background: var(--bg);
    color: var(--brand);
    box-shadow: var(--shadow-sm);
}
.login-method-tab:hover:not(.active) { color: var(--ink-2); }

/* Phone prefix selector inside input */
.phone-input-wrap {
    display: flex;
    gap: 0;
}
.phone-prefix {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    background: var(--bg-3);
    border: 1.5px solid var(--line);
    border-right: none;
    border-radius: var(--radius) 0 0 var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ink-2);
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.2s;
    user-select: none;
    position: relative;
}
.phone-prefix:hover { border-color: var(--brand); }
.phone-prefix-flag { font-size: 1.1rem; line-height: 1; }
.phone-prefix-code { font-size: 0.875rem; }
.phone-prefix-arrow { font-size: 0.6rem; color: var(--ink-3); }

.phone-prefix-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: var(--bg);
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 100;
    width: 220px;
    max-height: 240px;
    overflow-y: auto;
}
.phone-prefix-dropdown.open { display: block; }
.phone-prefix-dropdown::-webkit-scrollbar { width: 4px; }
.phone-prefix-dropdown::-webkit-scrollbar-thumb { background: var(--line); border-radius: 2px; }

.prefix-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--ink-2);
    transition: background 0.15s;
}
.prefix-option:hover { background: var(--bg-2); }
.prefix-option.selected { background: var(--brand-light); color: var(--brand-dark); font-weight: 600; }
.prefix-option .flag { font-size: 1.1rem; }
.prefix-option .country { flex: 1; }
.prefix-option .code { color: var(--ink-3); font-size: 0.8125rem; }

.phone-input-wrap .form-group input[type="tel"],
.phone-input-wrap input[type="tel"] {
    border-radius: 0 var(--radius) var(--radius) 0;
    padding-left: 14px;
}

/* ---------- SPLIT-PANEL LAYOUT (login / register) ---------- */
.page-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}
@media (max-width: 860px) { .page-wrap { grid-template-columns: 1fr; } }

/* ---------- BRAND PANEL ---------- */
.brand-panel {
    background: var(--grad);
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}
.brand-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(255,255,255,0.18), transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255,255,255,0.08), transparent 50%);
    pointer-events: none;
}
@media (max-width: 860px) { .brand-panel { display: none; } }

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-weight: 800;
    font-size: 1.25rem;
    position: relative;
    z-index: 1;
}
.brand-logo-mark {
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 1.25rem;
    font-weight: 900;
    color: #fff;
    backdrop-filter: blur(10px);
}
.brand-content { position: relative; z-index: 1; }
.brand-content h1, .brand-content h2 {
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 16px;
}
.brand-content h1 { font-size: clamp(1.75rem, 2.5vw + 1rem, 3rem); }
.brand-content h2 { font-size: clamp(1.5rem, 2vw + 1rem, 2.5rem); }
.brand-content p { font-size: 1.0625rem; color: rgba(255,255,255,0.85); margin-bottom: 0; line-height: 1.7; }

.brand-stats { display: flex; gap: 32px; flex-wrap: wrap; position: relative; z-index: 1; }
.brand-stat { text-align: center; }
.brand-stat .num {
    display: block;
    font-size: 1.75rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.03em;
    line-height: 1;
}
.brand-stat .lbl { display: block; font-size: 0.8125rem; color: rgba(255,255,255,0.7); margin-top: 4px; }

.feature-list { list-style: none; position: relative; z-index: 1; margin-top: 32px; }
.feature-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.9);
    font-size: 0.9375rem;
    padding: 6px 0;
}
.feature-list li::before {
    content: '✓';
    width: 20px; height: 20px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.75rem;
    font-weight: 900;
    flex-shrink: 0;
}

.perks { list-style: none; position: relative; z-index: 1; margin-top: 28px; }
.perks li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.9);
    font-size: 0.9375rem;
    line-height: 1.5;
}
.perks li:last-child { border-bottom: none; }
.perks li .perk-icon {
    width: 32px; height: 32px;
    background: rgba(255,255,255,0.15);
    border-radius: 8px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-size: 1rem;
}
.perks li .perk-text strong { display: block; color: #fff; font-size: 0.9375rem; margin-bottom: 2px; }
.perks li .perk-text span { font-size: 0.8125rem; color: rgba(255,255,255,0.7); }

.brand-footer { position: relative; z-index: 1; }
.trust-pills { display: flex; gap: 12px; flex-wrap: wrap; }
.trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 100px;
    padding: 6px 14px;
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.9);
    font-weight: 500;
}

/* ---------- FORM PANEL ---------- */
.form-panel {
    background: var(--bg);
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
}
@media (max-width: 860px) { .form-panel { padding: 40px 24px; min-height: 100vh; } }

.form-box { width: 100%; max-width: 440px; margin: 0 auto; }
.form-box-wide { max-width: 520px; }

.mobile-logo {
    display: none;
    align-items: center;
    gap: 10px;
    justify-content: center;
    margin-bottom: 24px;
    color: var(--ink);
    font-weight: 800;
    font-size: 1.125rem;
}
.mobile-logo-mark {
    width: 36px; height: 36px;
    background: var(--grad);
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 900;
    font-size: 1rem;
}
@media (max-width: 860px) { .mobile-logo { display: flex; } }

.form-header { text-align: center; margin-bottom: 32px; }
.form-header h1, .form-header h2 {
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 8px;
    line-height: 1.2;
}
.form-header h1 { font-size: 1.875rem; }
.form-header h2 { font-size: 1.875rem; }
.form-header p { color: var(--ink-3); font-size: 0.9375rem; margin: 0; }

/* ---------- CENTERED PAGE LAYOUT (forgot-password) ---------- */
body.page-centered {
    background: var(--bg-2);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 24px;
    position: relative;
}
body.page-centered::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(1200px 600px at 50% -100px, rgba(147,51,234,0.10), transparent 60%),
        radial-gradient(800px 400px at 0% 300px, rgba(37,99,235,0.07), transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* ---------- TOP NAV (standalone pages) ---------- */
.top-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 64px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    padding: 0 32px;
    z-index: 10;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-weight: 800;
    font-size: 1.0625rem;
    text-decoration: none !important;
}
.nav-logo-mark {
    width: 32px; height: 32px;
    background: var(--grad);
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 900;
    font-size: 0.9rem;
}

/* ---------- AUTH CARD (forgot-password) ---------- */
.auth-card {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 48px;
    width: 100%;
    max-width: 460px;
    position: relative;
    z-index: 1;
    margin-top: 32px;
}
@media (max-width: 540px) { .auth-card { padding: 32px 24px; } }

.card-icon {
    width: 64px; height: 64px;
    background: var(--grad-soft);
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 2rem;
    margin: 0 auto 24px;
}
.auth-card h1 {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ink);
    text-align: center;
    margin-bottom: 8px;
    line-height: 1.2;
}
.auth-card .sub {
    text-align: center;
    color: var(--ink-3);
    font-size: 0.9375rem;
    margin-bottom: 32px;
    line-height: 1.6;
}

.back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
    font-size: 0.9375rem;
    color: var(--ink-3);
    position: relative;
    z-index: 1;
}
.back-link a { font-weight: 600; color: var(--brand); }

/* ---------- STEP DOTS ---------- */
.steps-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
}
.step-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--line);
    transition: all 0.3s ease;
}
.step-dot.active { width: 24px; border-radius: 4px; background: var(--grad); }
.step-dot.done   { background: var(--success); }

/* ---------- SUCCESS STATES ---------- */
.success-state { display: none; text-align: center; }
.success-state.show { display: block; }

.success-icon {
    width: 72px; height: 72px;
    background: #f0fdf4;
    border: 2px solid #bbf7d0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 2rem;
    margin: 0 auto 24px;
    animation: scaleIn 0.4s ease-out;
}
.success-state h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}
.success-state p { color: var(--ink-3); font-size: 0.9375rem; margin-bottom: 0; line-height: 1.7; }
.sent-display {
    display: inline-block;
    background: var(--brand-light);
    color: var(--brand-dark);
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9375rem;
    margin: 4px 0;
}
.resend-row { margin-top: 20px; font-size: 0.875rem; color: var(--ink-3); }
.resend-row a { font-weight: 600; }

.success-screen { display: none; text-align: center; padding: 40px 0; }
.success-screen.show { display: block; animation: fadeUp 0.5s ease-out both; }
.success-ring {
    width: 80px; height: 80px;
    background: var(--grad);
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin: 0 auto 24px;
    font-size: 2.5rem;
    box-shadow: 0 10px 30px rgba(37,99,235,0.4);
    animation: scaleIn 0.5s ease-out;
}
.success-screen h2 { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); margin-bottom: 12px; }
.success-screen p  { color: var(--ink-3); font-size: 0.9375rem; margin-bottom: 0; line-height: 1.7; }

/* ---------- REGISTER: MULTI-STEP PROGRESS ---------- */
.progress-steps {
    display: flex;
    align-items: center;
    margin-bottom: 32px;
    gap: 0;
    padding-bottom: 24px;
}
.progress-step {
    display: flex;
    align-items: center;
    flex: 1;
    position: relative;
}
.progress-step:last-child { flex: none; }
.step-circle {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--bg-3);
    border: 2px solid var(--line);
    display: grid;
    place-items: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--ink-3);
    flex-shrink: 0;
    transition: all 0.3s;
    position: relative;
    z-index: 1;
}
.step-circle.active { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 4px 10px rgba(37,99,235,0.3); }
.step-circle.done   { background: var(--success); border-color: transparent; color: #fff; }
.step-connector {
    flex: 1;
    height: 2px;
    background: var(--line);
    transition: background 0.3s;
    margin: 0 4px;
}
.step-connector.done { background: var(--success); }

.form-section { display: none; }
.form-section.active { display: block; animation: fadeUp 0.4s ease-out both; }
.section-title {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--brand);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--brand-light); }

.btn-row { display: flex; gap: 12px; margin-top: 8px; }
.btn-row .btn-outline { flex: 0 0 auto; padding: 14px 20px; }
.btn-row .btn-primary { flex: 1; }

/* ---------- PASSWORD STRENGTH ---------- */
.password-strength { margin-top: 8px; display: none; }
.password-strength.show { display: block; }
.strength-bars { display: flex; gap: 4px; margin-bottom: 4px; }
.strength-bar {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: var(--line);
    transition: background 0.3s;
}
.strength-bar.weak   { background: var(--danger); }
.strength-bar.medium { background: var(--warning); }
.strength-bar.strong { background: var(--success); }
.strength-label { font-size: 0.75rem; color: var(--ink-3); }

/* ---------- REGISTER PAGE LAYOUT ---------- */
.page-wrap-register {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    min-height: 100vh;
}
@media (max-width: 900px) { .page-wrap-register { grid-template-columns: 1fr; } }
.brand-panel-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
}

/* ---------- DASHBOARD SIDEBAR ---------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    background: var(--ink);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.3s ease;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

.sidebar-logo {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}
.logo-mark {
    width: 36px; height: 36px;
    background: var(--grad);
    border-radius: 9px;
    display: grid;
    place-items: center;
    font-weight: 900;
    color: #fff;
    font-size: 1rem;
    flex-shrink: 0;
}
.logo-text { font-weight: 800; font-size: 0.9375rem; color: #fff; line-height: 1.2; }
.logo-text small { display: block; font-size: 0.6875rem; color: rgba(255,255,255,0.5); font-weight: 400; }

.sidebar-nav { flex: 1; padding: 16px 12px; }
.nav-section-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.35);
    padding: 12px 8px 6px;
    margin-top: 8px;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: rgba(255,255,255,0.65);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 2px;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    text-decoration: none;
}
.nav-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-item.active { background: var(--grad); color: #fff; box-shadow: 0 4px 12px rgba(37,99,235,0.3); }
.nav-item .nav-icon { font-size: 1.1rem; flex-shrink: 0; width: 20px; text-align: center; }
.nav-item .nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 100px;
    min-width: 20px;
    text-align: center;
}

.sidebar-footer { padding: 16px 12px; border-top: 1px solid rgba(255,255,255,0.08); flex-shrink: 0; }
.user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
}
.user-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--grad);
    display: grid;
    place-items: center;
    font-weight: 700;
    color: #fff;
    font-size: 0.8125rem;
    flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name  { font-size: 0.875rem; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role  { font-size: 0.75rem; color: rgba(255,255,255,0.5); }
.logout-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    font-size: 1rem;
    transition: color 0.2s;
    flex-shrink: 0;
}
.logout-btn:hover { color: var(--danger); }

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.6);
    z-index: 99;
    backdrop-filter: blur(4px);
}
.sidebar-backdrop.show { display: block; }

@media (max-width: 1024px) {
    .sidebar { transform: translateX(calc(-1 * var(--sidebar-w))); }
    .sidebar.open { transform: translateX(0); }
}

/* ---------- DASHBOARD MAIN CONTENT ---------- */
.main-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
@media (max-width: 1024px) { .main-content { margin-left: 0; } }

/* ---------- TOPBAR ---------- */
.topbar {
    position: sticky;
    top: 0;
    background: rgba(248,250,252,0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    padding: 0 28px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    z-index: 50;
    flex-shrink: 0;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.menu-toggle {
    display: none;
    background: none;
    border: 1.5px solid var(--line);
    border-radius: 8px;
    width: 36px; height: 36px;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--ink-2);
    cursor: pointer;
    transition: all 0.2s;
}
.menu-toggle:hover { border-color: var(--brand); color: var(--brand); }
@media (max-width: 1024px) { .menu-toggle { display: flex; } }
.page-title      { font-size: 1.0625rem; font-weight: 700; color: var(--ink); }
.page-breadcrumb { font-size: 0.8125rem; color: var(--ink-3); display: flex; align-items: center; gap: 4px; }

.topbar-right { display: flex; align-items: center; gap: 10px; }
.topbar-search { position: relative; }
.topbar-search input {
    padding: 8px 14px 8px 36px;
    border: 1.5px solid var(--line);
    border-radius: 8px;
    font-size: 0.875rem;
    color: var(--ink);
    background: var(--bg);
    font-family: inherit;
    outline: none;
    width: 220px;
    transition: all 0.2s;
}
.topbar-search input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); width: 260px; }
.topbar-search input::placeholder { color: var(--ink-3); }
.search-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: 0.875rem; pointer-events: none; }
@media (max-width: 680px) { .topbar-search { display: none; } }

.icon-btn {
    width: 36px; height: 36px;
    border-radius: 8px;
    background: var(--bg);
    border: 1.5px solid var(--line);
    display: grid;
    place-items: center;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    color: var(--ink-2);
}
.icon-btn:hover { border-color: var(--brand); color: var(--brand); }
.icon-btn .badge {
    position: absolute;
    top: -4px; right: -4px;
    width: 16px; height: 16px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--bg-2);
    font-size: 0.5625rem;
    font-weight: 700;
    color: #fff;
    display: grid;
    place-items: center;
}

/* ---------- PAGE BODY ---------- */
.page-body { padding: 28px; flex: 1; background: var(--bg-2); }
@media (max-width: 640px) { .page-body { padding: 20px 16px; } }

.section { display: none; }
.section.active { display: block; animation: fadeIn 0.3s ease-out; }

/* ---------- DASHBOARD COMPONENTS ---------- */
.welcome-banner {
    background: var(--grad);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    position: relative;
    overflow: hidden;
}
.welcome-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 80% 50%, rgba(255,255,255,0.12), transparent 50%),
        radial-gradient(circle at 10% 90%, rgba(255,255,255,0.07), transparent 40%);
    pointer-events: none;
}
.welcome-text { position: relative; z-index: 1; }
.welcome-text h2 { font-size: 1.375rem; font-weight: 800; color: #fff; margin-bottom: 4px; letter-spacing: -0.02em; }
.welcome-text p  { color: rgba(255,255,255,0.8); font-size: 0.9rem; margin: 0; }
.welcome-action  { position: relative; z-index: 1; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
@media (max-width: 900px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .stats-grid { grid-template-columns: 1fr; } }

.stat-card {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; border-radius: var(--radius) var(--radius) 0 0; }
.stat-card.blue::before   { background: var(--brand); }
.stat-card.purple::before { background: var(--accent); }
.stat-card.green::before  { background: var(--success); }
.stat-card.orange::before { background: var(--warning); }
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.stat-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.stat-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 1.25rem;
}
.stat-card.blue .stat-icon   { background: var(--brand-light); }
.stat-card.purple .stat-icon { background: var(--accent-light); }
.stat-card.green .stat-icon  { background: var(--success-light); }
.stat-card.orange .stat-icon { background: var(--warning-light); }

.stat-trend { font-size: 0.75rem; font-weight: 600; padding: 3px 8px; border-radius: 100px; }
.stat-trend.up      { background: var(--success-light); color: var(--success); }
.stat-trend.neutral { background: var(--bg-3); color: var(--ink-3); }

.stat-value { font-size: 2rem; font-weight: 800; color: var(--ink); letter-spacing: -0.03em; line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 0.8125rem; color: var(--ink-3); }

.grid-2 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; margin-bottom: 24px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

.card {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}
.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.card-header h3 { font-size: 0.9375rem; font-weight: 700; color: var(--ink); margin: 0; }
.card-header .card-action { font-size: 0.8125rem; font-weight: 600; color: var(--brand); background: none; border: none; cursor: pointer; padding: 0; }
.card-header .card-action:hover { color: var(--brand-dark); }
.card-body { padding: 20px; }

.enroll-table, .fee-table { width: 100%; border-collapse: collapse; }
.enroll-table th, .fee-table th {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-3);
    padding: 10px 12px;
    background: var(--bg-2);
    text-align: left;
    border-bottom: 1px solid var(--line);
}
.enroll-table td, .fee-table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
    font-size: 0.875rem;
    vertical-align: middle;
}
.enroll-table tbody tr:last-child td,
.fee-table tbody tr:last-child td { border-bottom: none; }
.enroll-table tbody tr:hover,
.fee-table tbody tr:hover { background: var(--bg-2); }

.course-cell { display: flex; align-items: center; gap: 12px; }
.course-icon { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; font-size: 1.1rem; flex-shrink: 0; }
.course-title { font-weight: 600; color: var(--ink); font-size: 0.875rem; }
.course-meta  { font-size: 0.75rem; color: var(--ink-3); }

.progress-cell { min-width: 120px; }
.progress-bar-wrap { background: var(--bg-3); border-radius: 100px; height: 6px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: var(--grad); border-radius: 100px; transition: width 1s ease-out; }
.progress-pct { font-size: 0.75rem; font-weight: 600; color: var(--ink-2); margin-top: 4px; }

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}
.status-pill::before      { content: '●'; font-size: 0.5rem; }
.status-pill.active       { background: var(--success-light); color: var(--success); }
.status-pill.pending      { background: var(--warning-light); color: #92400e; }
.status-pill.completed    { background: var(--brand-light); color: var(--brand-dark); }
.status-pill.cancelled    { background: var(--danger-light); color: var(--danger); }

.fee-amount          { font-weight: 700; font-size: 0.9375rem; }
.fee-amount.credit   { color: var(--success); }
.fee-amount.debit    { color: var(--danger); }

.receipt-btn {
    background: none;
    border: 1.5px solid var(--line);
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ink-2);
    cursor: pointer;
    transition: all 0.2s;
}
.receipt-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-light); }

.quick-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.quick-action {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    cursor: pointer;
    background: var(--bg);
    transition: all 0.2s;
    text-decoration: none;
}
.quick-action:hover { border-color: var(--brand); background: var(--brand-light); transform: translateY(-2px); box-shadow: var(--shadow); }
.quick-action .qa-icon {
    width: 36px; height: 36px;
    border-radius: 8px;
    background: var(--grad-soft);
    display: grid;
    place-items: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.quick-action .qa-text strong { display: block; font-size: 0.8125rem; font-weight: 600; color: var(--ink); }
.quick-action .qa-text span   { font-size: 0.75rem; color: var(--ink-3); }

.schedule-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}
.schedule-item:last-child { border-bottom: none; }
.schedule-date { width: 40px; text-align: center; flex-shrink: 0; }
.schedule-date .day   { font-size: 1.125rem; font-weight: 800; color: var(--brand); line-height: 1; }
.schedule-date .month { font-size: 0.6875rem; text-transform: uppercase; color: var(--ink-3); letter-spacing: 0.05em; }
.schedule-info { flex: 1; }
.schedule-info strong { display: block; font-size: 0.875rem; color: var(--ink); font-weight: 600; margin-bottom: 2px; }
.schedule-info span   { font-size: 0.8125rem; color: var(--ink-3); }
.schedule-time {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--brand);
    background: var(--brand-light);
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.section-header h2 { font-size: 1.1875rem; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }

.filter-tabs { display: flex; gap: 4px; background: var(--bg-3); border-radius: 10px; padding: 4px; width: fit-content; margin-bottom: 20px; }
.filter-tab {
    padding: 7px 16px;
    border-radius: 7px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: none;
    color: var(--ink-3);
    transition: all 0.2s;
    font-family: inherit;
}
.filter-tab.active        { background: var(--bg); color: var(--brand); box-shadow: var(--shadow-sm); }
.filter-tab:hover:not(.active) { color: var(--ink-2); }

.profile-grid { display: grid; grid-template-columns: 300px 1fr; gap: 20px; }
@media (max-width: 860px) { .profile-grid { grid-template-columns: 1fr; } }

.profile-card { text-align: center; padding: 32px 20px; }
.profile-avatar-wrap { position: relative; display: inline-block; margin-bottom: 16px; }
.profile-avatar {
    width: 88px; height: 88px;
    border-radius: 50%;
    background: var(--grad);
    display: grid;
    place-items: center;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin: 0 auto;
    box-shadow: 0 8px 24px rgba(37,99,235,0.3);
}
.avatar-edit-btn {
    position: absolute;
    bottom: 0; right: 0;
    width: 28px; height: 28px;
    background: var(--bg);
    border: 2px solid var(--line);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}
.avatar-edit-btn:hover { border-color: var(--brand); background: var(--brand-light); }
.profile-name   { font-size: 1.125rem; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.profile-email  { font-size: 0.875rem; color: var(--ink-3); margin-bottom: 16px; }
.profile-tags   { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.profile-tag    { display: inline-block; padding: 4px 12px; border-radius: 100px; font-size: 0.75rem; font-weight: 600; }
.profile-tag.enrolled { background: var(--success-light); color: var(--success); }
.profile-tag.student  { background: var(--brand-light); color: var(--brand-dark); }
.profile-stats  { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; border-top: 1px solid var(--line); padding-top: 16px; }
.pstat          { text-align: center; }
.pstat .num     { font-size: 1.25rem; font-weight: 800; color: var(--ink); }
.pstat .lbl     { font-size: 0.6875rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.05em; }

/* ---------- CHAT ---------- */
.chat-section { display: flex; flex-direction: column; height: calc(100vh - 160px); min-height: 500px; }
.chat-window {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--bg-2);
    border-radius: var(--radius) var(--radius) 0 0;
    border: 1px solid var(--line);
    border-bottom: none;
}
.chat-window::-webkit-scrollbar { width: 4px; }
.chat-window::-webkit-scrollbar-thumb { background: var(--line); border-radius: 2px; }
.chat-msg { display: flex; gap: 10px; max-width: 80%; }
.chat-msg.user { flex-direction: row-reverse; margin-left: auto; }
.chat-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.chat-msg.bot  .chat-avatar { background: var(--grad); color: #fff; }
.chat-msg.user .chat-avatar { background: var(--bg-3); }
.chat-bubble {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--ink-2);
}
.chat-msg.bot  .chat-bubble { background: var(--bg); border: 1px solid var(--line); border-top-left-radius: 4px; }
.chat-msg.user .chat-bubble { background: var(--grad); color: #fff; border-top-right-radius: 4px; }
.chat-time { font-size: 0.6875rem; color: var(--ink-3); margin-top: 4px; display: block; }
.chat-msg.user .chat-time { text-align: right; }
.typing-dots { display: flex; gap: 5px; align-items: center; padding: 12px 16px; }
.typing-dots span {
    width: 8px; height: 8px;
    background: var(--ink-3);
    border-radius: 50%;
    animation: bounce 1.2s infinite ease-in-out;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
.chat-suggestions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 16px 0;
    background: var(--bg);
    border: 1px solid var(--line);
    border-top: none;
    border-bottom: none;
}
.chat-suggestion-btn {
    padding: 5px 12px;
    border-radius: 100px;
    background: var(--bg-2);
    border: 1.5px solid var(--line);
    font-size: 0.8rem;
    color: var(--ink-2);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    font-weight: 500;
}
.chat-suggestion-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-light); }
.chat-input-bar {
    background: var(--bg);
    border: 1px solid var(--line);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 16px;
    display: flex;
    gap: 10px;
    align-items: flex-end;
}
.chat-input {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--ink);
    background: var(--bg-2);
    outline: none;
    resize: none;
    min-height: 42px;
    max-height: 120px;
    transition: border-color 0.2s;
    line-height: 1.5;
}
.chat-input:focus { border-color: var(--brand); }
.chat-input::placeholder { color: var(--ink-3); }
.chat-send-btn {
    width: 42px; height: 42px;
    background: var(--grad);
    border: none;
    border-radius: 10px;
    display: grid;
    place-items: center;
    cursor: pointer;
    font-size: 1.1rem;
    color: #fff;
    flex-shrink: 0;
    transition: all 0.2s;
    box-shadow: 0 3px 10px rgba(37,99,235,0.3);
}
.chat-send-btn:hover { transform: scale(1.05); box-shadow: 0 5px 16px rgba(37,99,235,0.45); }

/* ---------- TOGGLE SWITCH ---------- */
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--line);
    border-radius: 100px;
    transition: 0.3s;
}
.slider::before {
    content: '';
    position: absolute;
    height: 18px; width: 18px;
    left: 3px; top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .slider { background: var(--brand); }
.toggle-switch input:checked + .slider::before { transform: translateX(20px); }

/* ---------- MOBILE BOTTOM NAV ---------- */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--bg);
    border-top: 1px solid var(--line);
    padding: 8px 0;
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(15,23,42,0.08);
}
.mobile-nav-items { display: flex; justify-content: space-around; }
.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 12px;
    cursor: pointer;
    border: none;
    background: none;
    color: var(--ink-3);
    font-family: inherit;
    border-radius: 8px;
    transition: color 0.2s;
}
.mobile-nav-item.active { color: var(--brand); }
.mobile-nav-item .m-icon  { font-size: 1.3rem; }
.mobile-nav-item .m-label { font-size: 0.6rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
@media (max-width: 640px) {
    .mobile-bottom-nav { display: block; }
    .page-body { padding-bottom: 72px; }
}
