/* ═══════════════════════════════════════════════════════════════════════════
   Alliance Jiu Jitsu – Design System  (Dark Dojo Theme)
   Font: Syne (Google Fonts) — loaded in each page <head>
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
    /* ── Brand ── */
    --red:           #e8303f;
    --red-dark:      #c52832;
    --red-dim:       #a01f28;
    --red-glow:      rgba(232, 48, 63, 0.22);
    --red-subtle:    rgba(232, 48, 63, 0.10);
    --gold:          #EBAB1E;
    --gold-dim:      rgba(235, 171, 30, 0.15);

    /* ── Backgrounds ── */
    --bg:            #0d0e11;
    --bg-card:       #14161b;
    --bg-elevated:   #1c1f27;
    --bg-subtle:     #191c23;
    --bg-input:      #0f1116;

    /* ── Borders ── */
    --border:        rgba(255, 255, 255, 0.07);
    --border-mid:    rgba(255, 255, 255, 0.12);
    --border-strong: rgba(255, 255, 255, 0.20);

    /* ── Text ── */
    --text-primary:   #edecea;
    --text-secondary: #9b9790;
    --text-muted:     #5a5652;
    --text-white:     #ffffff;

    /* ── Semantic ── */
    --success:      #22c55e;
    --success-bg:   rgba(34, 197, 94, 0.12);
    --warning:      #f59e0b;
    --warning-bg:   rgba(245, 158, 11, 0.12);
    --danger:       #e8303f;
    --danger-bg:    rgba(232, 48, 63, 0.12);
    --info:         #60a5fa;
    --info-bg:      rgba(96, 165, 250, 0.12);

    /* ── Belt colors (adjusted for dark bg) ── */
    --belt-white:   rgba(255,255,255,0.15);
    --belt-blue:    rgba(30, 79, 168, 0.30);
    --belt-purple:  rgba(107, 63, 160, 0.30);
    --belt-brown:   rgba(122, 74, 30, 0.30);
    --belt-black:   rgba(255,255,255,0.08);

    /* ── Stripe gold ── */
    --stripe:        #EBAB1E;

    /* ── Spacing / Radius / Shadow ── */
    --radius:        10px;
    --radius-sm:     6px;
    --radius-lg:     16px;
    --shadow-sm:     0 1px 4px rgba(0,0,0,0.4);
    --shadow:        0 4px 16px rgba(0,0,0,0.5);
    --shadow-lg:     0 12px 40px rgba(0,0,0,0.6);
    --shadow-red:    0 4px 24px var(--red-glow);
    --transition:    all 0.20s ease;

    /* ── Legacy aliases (keep old pages compiling) ── */
    --primary:          #1a2744;
    --accent:           #e8303f;
    --accent-dark:      #c52832;
    --text-light:       #ffffff;
    --bg-light:         #0d0e11;
    --bg-page:          #0d0e11;
    --bg-page-alt:      #14161b;
    --border-radius:    10px;
    --shadow-default:   0 4px 6px rgba(0,0,0,0.4);
    --primary-color:    #1a2744;
    --accent-color:     #e8303f;
    --success-color:    #22c55e;
    --warning-color:    #EBAB1E;
    --text-dark:        #edecea;
    --navy:             #1e3a6e;
    --navy-mid:         #2d56a8;
    --red-light:        rgba(232,48,63,0.12);
    --border-dark:      rgba(255,255,255,0.14);
}

/* ─── Reset + Base ─────────────────────────────────────────────────────────── */

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

html { -webkit-font-smoothing: antialiased; }

body {
    font-family: 'Syne', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

button { cursor: pointer; font-family: inherit; }

/* ─── Logo Placeholder ──────────────────────────────────────────────────────── */

/* Temporary gi emoji logo — swap back to <img> when copyright is confirmed */
.logo-emoji {
    font-size: 1.8rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    user-select: none;
}
.hero-logo-emoji {
    font-size: 5rem;
    display: block;
    margin: 0 auto 20px;
}

.logo-placeholder {
    width: 90px;
    height: 90px;
    background: var(--red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
    box-shadow: var(--shadow-red);
    flex-shrink: 0;
}

.logo-placeholder.sm {
    width: 42px;
    height: 42px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* ─── Navigation Bar ─────────────────────────────────────────────────────── */

.nav-bar {
    background: rgba(13,14,17,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.nav-brand span {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.2px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ─── Page Shell ─────────────────────────────────────────────────────────── */

.page-shell {
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 16px 60px;
}

.page-shell.wide   { max-width: 1200px; }
.page-shell.narrow { max-width: 480px; }

/* ─── Hero (Home) ────────────────────────────────────────────────────────── */

.hero {
    background: linear-gradient(160deg, #0d0e11 0%, #14161b 100%);
    color: #fff;
    padding: 64px 24px 56px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.hero .logo-placeholder { margin: 0 auto 20px; }

.hero h1 {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.hero p.tagline {
    font-size: 0.85rem;
    opacity: 0.5;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ─── Path Cards (Home CTAs) ─────────────────────────────────────────────── */

.path-section {
    padding: 40px 24px;
    max-width: 600px;
    margin: 0 auto;
}

.path-section h2 {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.path-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 420px) { .path-cards { grid-template-columns: 1fr; } }

.path-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 20px;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.path-card:hover {
    border-color: var(--red);
    box-shadow: var(--shadow-red);
    transform: translateY(-2px);
    text-decoration: none;
}

.path-card .icon  { font-size: 2rem; line-height: 1; }
.path-card .label { font-size: 1rem; font-weight: 700; color: var(--text-primary); }
.path-card .sub   { font-size: 0.8rem; color: var(--text-muted); }

/* Coach access at the bottom of home */
.coach-access {
    border-top: 1px solid var(--border);
    padding: 20px 24px;
    text-align: center;
}

.coach-access p {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.coach-link {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.coach-link:hover { color: var(--red); text-decoration: none; }

/* ─── Auth Pages (Login / Register) ─────────────────────────────────────── */

.auth-page {
    min-height: 100vh;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}

.auth-card .auth-logo {
    text-align: center;
    margin-bottom: 24px;
}

.auth-card .auth-logo .logo-placeholder { margin: 0 auto 12px; }

.auth-card h1 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 4px;
}

.auth-card .auth-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 28px;
}

.auth-back {
    margin-top: 20px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ─── Form Controls ──────────────────────────────────────────────────────── */

.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    font-size: 0.80rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 6px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.form-control {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    line-height: 1.5;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-input);
    transition: var(--transition);
    outline: none;
}

.form-control::placeholder { color: var(--text-muted); }

.form-control:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px var(--red-glow);
}

.form-control:disabled {
    opacity: 0.45;
    background: var(--bg-subtle);
    cursor: not-allowed;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239b9790' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: 0.2px;
    font-family: inherit;
}

.btn-primary {
    background: var(--red);
    color: #fff;
    box-shadow: 0 2px 12px var(--red-glow);
}
.btn-primary:hover { background: var(--red-dark); text-decoration: none; color: #fff; box-shadow: var(--shadow-red); }

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-mid);
}
.btn-secondary:hover { background: var(--bg-subtle); border-color: var(--border-strong); text-decoration: none; color: var(--text-primary); }

.btn-outline {
    background: transparent;
    color: var(--red);
    border: 1px solid var(--red);
}
.btn-outline:hover { background: var(--red-subtle); text-decoration: none; }

.btn-navy {
    background: var(--navy);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.12);
}
.btn-navy:hover { background: var(--navy-mid); text-decoration: none; color: #fff; }

.btn-danger {
    background: var(--danger);
    color: #fff;
    border: none;
    box-shadow: 0 2px 10px rgba(232,48,63,0.3);
}
.btn-danger:hover { background: var(--red-dark); text-decoration: none; color: #fff; }

.btn-sm  { padding: 6px 14px; font-size: 0.82rem; }
.btn-lg  { padding: 14px 28px; font-size: 1rem; }
.btn-block { width: 100%; }

.btn:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }

/* ─── Cards ──────────────────────────────────────────────────────────────── */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.card-title {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* ─── Stats Grid ─────────────────────────────────────────────────────────── */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--red), transparent);
    opacity: 0.6;
}

.stat-card .stat-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 6px;
    letter-spacing: -1px;
}

.stat-card .stat-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

/* ─── Belt Badge ─────────────────────────────────────────────────────────── */

.belt-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: capitalize;
    letter-spacing: 0.3px;
}

.belt-badge.white  { background: rgba(255,255,255,0.12); color: #edecea; border: 1px solid rgba(255,255,255,0.25); }
.belt-badge.blue   { background: rgba(30,79,168,0.25);   color: #93c5fd; border: 1px solid rgba(30,79,168,0.4); }
.belt-badge.purple { background: rgba(107,63,160,0.25);  color: #c084fc; border: 1px solid rgba(107,63,160,0.4); }
.belt-badge.brown  { background: rgba(122,74,30,0.25);   color: #f59e0b; border: 1px solid rgba(122,74,30,0.4); }
.belt-badge.black  { background: rgba(255,255,255,0.06); color: #edecea; border: 1px solid rgba(255,255,255,0.18); }

/* ─── Stripe Dots ────────────────────────────────────────────────────────── */

.stripe-dots {
    display: flex;
    gap: 5px;
    align-items: center;
}

.stripe-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 1px solid var(--border-mid);
    transition: var(--transition);
}

.stripe-dots .dot.earned {
    background: var(--gold);
    border-color: #c78a10;
    box-shadow: 0 0 6px rgba(235,171,30,0.45);
}

/* ─── Tab Bar ────────────────────────────────────────────────────────────── */

.tab-bar {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
    gap: 0;
}

.tab-btn {
    padding: 12px 20px;
    background: none;
    border: none;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: var(--transition);
    font-family: inherit;
    letter-spacing: 0.2px;
}

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

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

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ─── Tables ─────────────────────────────────────────────────────────────── */

.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

thead th {
    background: var(--bg-subtle);
    padding: 11px 14px;
    text-align: left;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-mid);
}

tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--bg-subtle); }

/* ─── Modals ─────────────────────────────────────────────────────────────── */

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.70);
    backdrop-filter: blur(4px);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-overlay.open { display: flex; }

.modal-box {
    background: var(--bg-elevated);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-lg);
    padding: 32px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.modal-box h2 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}

.modal-close:hover { background: var(--bg-elevated); border-color: var(--border-strong); color: var(--text-primary); }

.modal-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* ─── Form Row (side-by-side) ────────────────────────────────────────────── */

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: end;
}

@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

/* ── Modal: mobile centered ──────────────────────────────────────────────── */
@media (max-width: 600px) {
    .modal-overlay {
        padding: 16px;
        align-items: center;
    }
    .modal-box {
        padding: 24px 20px;
        border-radius: var(--radius-lg);
        max-width: 100%;
        max-height: 90vh;
        width: 100%;
    }
    .modal-box h2 {
        font-size: 1.05rem;
        margin-bottom: 16px;
    }
    .modal-close {
        top: 14px;
        right: 14px;
    }
}

/* ─── Progress Bar ───────────────────────────────────────────────────────── */

.progress-bar-wrap {
    background: var(--bg-elevated);
    border-radius: 20px;
    height: 8px;
    overflow: hidden;
    margin: 8px 0 4px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--red), #ff5a66);
    border-radius: 20px;
    transition: width 0.5s ease;
    box-shadow: 0 0 8px var(--red-glow);
}

/* ─── Alert / Notification ───────────────────────────────────────────────── */

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.alert-error   { background: var(--danger-bg);  color: #fca5a5; border: 1px solid rgba(232,48,63,0.30); }
.alert-success { background: var(--success-bg); color: #86efac; border: 1px solid rgba(34,197,94,0.30); }
.alert-info    { background: var(--info-bg);    color: #93c5fd; border: 1px solid rgba(96,165,250,0.30); }
.alert-warning { background: var(--warning-bg); color: #fcd34d; border: 1px solid rgba(245,158,11,0.30); }

/* ─── Check-In Page ──────────────────────────────────────────────────────── */

.checkin-page {
    min-height: 100vh;
    background: var(--bg);
}

.checkin-header {
    background: linear-gradient(160deg, #0d0e11 0%, #14161b 100%);
    border-bottom: 1px solid var(--border);
    color: #fff;
    padding: 32px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.checkin-header::before {
    content: '';
    position: absolute;
    top: -60%;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(232,48,63,0.10) 0%, transparent 70%);
    pointer-events: none;
}

.checkin-header .logo-placeholder { margin: 0 auto 12px; }

.checkin-header h1 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 4px;
    letter-spacing: -0.3px;
}

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

.checkin-body {
    max-width: 500px;
    margin: 0 auto;
    padding: 32px 16px;
}

.class-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 8px;
}

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

.class-card {
    border: 1px solid var(--border-mid);
    border-radius: var(--radius);
    padding: 16px;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-card);
    text-align: center;
}

.class-card:hover {
    border-color: var(--red);
    box-shadow: 0 0 0 1px var(--red), var(--shadow-red);
    transform: translateY(-1px);
}

.class-card.selected {
    border-color: var(--red);
    background: var(--red-subtle);
    box-shadow: 0 0 0 1px var(--red), var(--shadow-red);
}

.class-card .class-time       { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); }
.class-card .class-type        { font-size: 0.8rem;  color: var(--text-secondary); margin-top: 3px; }
.class-card .class-instructor  { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }

.success-card {
    background: var(--success-bg);
    border: 1px solid rgba(34,197,94,0.30);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    text-align: center;
}

.success-card .big-check { font-size: 3rem; margin-bottom: 12px; }
.success-card h2 { color: var(--success); font-size: 1.5rem; margin-bottom: 8px; font-weight: 800; }
.success-card p  { color: var(--text-secondary); }

/* ─── Student Dashboard ──────────────────────────────────────────────────── */

.dashboard-header {
    background: linear-gradient(160deg, #0d0e11 0%, var(--bg-card) 100%);
    border-bottom: 1px solid var(--border);
    color: #fff;
    padding: 32px 24px;
}

.dashboard-header .student-info {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 800px;
    margin: 0 auto;
}

.student-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--red-subtle);
    border: 2px solid var(--red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--red);
    flex-shrink: 0;
}

.dashboard-header h1 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.badge-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ─── Admin Dashboard ────────────────────────────────────────────────────── */

.admin-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    color: #fff;
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-header .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.admin-body {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 16px 60px;
}

/* ─── Promo Item ──────────────────────────────────────────────────────────── */

.promo-list { display: flex; flex-direction: column; gap: 8px; padding: 8px;}

.promo-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--gold-dim);
    border: 1px solid rgba(235,171,30,0.28);
    border-left: 3px solid var(--gold);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    gap: 12px;
    flex-wrap: wrap;
}

.promo-item .promo-name { font-weight: 700; color: var(--text-primary); }
.promo-item .promo-belt { font-size: 0.8rem; color: var(--text-secondary); }

/* ─── Search ─────────────────────────────────────────────────────────────── */

.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.search-input {
    flex: 1;
    padding: 9px 14px;
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    background: var(--bg-input);
    color: var(--text-primary);
    transition: var(--transition);
}

.search-input::placeholder { color: var(--text-muted); }
.search-input:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-glow); }

/* ─── Spinner ────────────────────────────────────────────────────────────── */

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-mid);
    border-top-color: var(--red);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 24px auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-wrap { display: flex; justify-content: center; padding: 32px; }

/* ─── Section Header ─────────────────────────────────────────────────────── */

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.1px;
}

/* ─── Empty State ────────────────────────────────────────────────────────── */

.empty-state {
    text-align: center;
    padding: 40px 24px;
    color: var(--text-muted);
}

.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: 10px; }
.empty-state p { font-size: 0.9rem; }

/* ─── Utility ────────────────────────────────────────────────────────────── */

.text-center  { text-align: center; }
.text-muted   { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.gap-8 { gap: 8px; }
.flex  { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.hidden { display: none !important; }

/* ─── Logo image override ───────────────────────────────────────────────── */

img.logo-placeholder {
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    object-fit: contain;
}

/* ─── Hamburger Menu ─────────────────────────────────────────────────────── */

.hamburger-menu { position: relative; }

.hamburger-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: 1px solid var(--border-mid);
    cursor: pointer;
    transition: var(--transition);
}

.hamburger-btn:hover { background: var(--bg-elevated); border-color: var(--border-strong); }

.hamburger-btn span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: var(--transition);
}

.hamburger-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn.open span:nth-child(2) { opacity: 0; }
.hamburger-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.hamburger-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    z-index: 300;
    overflow: hidden;
}

.hamburger-dropdown.open { display: block; }

.dropdown-item {
    display: block;
    width: 100%;
    padding: 11px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    background: transparent;
    border: none;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
}

.dropdown-item:hover { background: var(--bg-subtle); text-decoration: none; color: var(--text-primary); }
.dropdown-item-danger { color: var(--danger) !important; }
.dropdown-item-danger:hover { background: var(--danger-bg) !important; }

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

/* ─── Password Strength Meter ─────────────────────────────────────────────── */

.pw-strength-wrap { margin-top: 6px; }

.pw-strength-bar {
    display: flex;
    gap: 4px;
    margin-bottom: 4px;
}

.pw-strength-bar span {
    flex: 1;
    height: 3px;
    border-radius: 2px;
    background: var(--border-mid);
    transition: background 0.25s;
}

.pw-strength-label {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.pw-strength-bar[data-level="1"] span:nth-child(1)                              { background: #ef4444; }
.pw-strength-bar[data-level="2"] span:nth-child(1),
.pw-strength-bar[data-level="2"] span:nth-child(2)                              { background: var(--warning); }
.pw-strength-bar[data-level="3"] span:nth-child(1),
.pw-strength-bar[data-level="3"] span:nth-child(2),
.pw-strength-bar[data-level="3"] span:nth-child(3)                              { background: #4ade80; }
.pw-strength-bar[data-level="4"] span                                           { background: var(--success); }

/* ─── PIN hint ───────────────────────────────────────────────────────────── */

.pin-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ─── Notification Badge ─────────────────────────────────────────────────── */

.notif-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--red);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 6px;
    vertical-align: middle;
    line-height: 1;
}

/* ─── Monthly Attendance Bar Chart ───────────────────────────────────────── */

.monthly-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 80px;
    margin-top: 12px;
}

.monthly-chart .bar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    gap: 4px;
    height: 100%;
    justify-content: flex-end;
}

.monthly-chart .bar {
    width: 100%;
    background: var(--red);
    border-radius: 4px 4px 0 0;
    min-height: 3px;
    transition: height 0.4s ease;
    opacity: 0.60;
}

.monthly-chart .bar-col.current .bar { opacity: 1; background: var(--red); box-shadow: 0 0 8px var(--red-glow); }

.monthly-chart .bar-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.monthly-chart .bar-count {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-secondary);
}

/* ─── Weekly Schedule List ───────────────────────────────────────────────── */

.sched-section {
    margin-bottom: 6px;
    border: 1px solid var(--border-mid);
    border-radius: 12px;
    overflow: hidden;
}

.sched-section.sched-today {
    border-color: var(--red);
}

.sched-day-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
}

.sched-today .sched-day-hdr {
    background: var(--red);
}

.sched-day-name {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sched-today .sched-day-name { color: #fff; }

.sched-today-badge {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: rgba(255,255,255,0.25);
    color: #fff;
    border-radius: 20px;
    padding: 1px 7px;
    text-transform: uppercase;
}

.sched-add-day-btn {
    font-size: 0.75rem !important;
    padding: 4px 10px !important;
    line-height: 1.4 !important;
}

.sched-today .sched-add-day-btn {
    background: rgba(255,255,255,0.2) !important;
    border-color: rgba(255,255,255,0.4) !important;
    color: #fff !important;
}

.sched-today .sched-add-day-btn:hover {
    background: rgba(255,255,255,0.35) !important;
}

.sched-empty {
    padding: 10px 14px;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-style: italic;
}

.sched-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
}

.sched-row:last-child { border-bottom: none; }

.sched-row-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.sched-row-time {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.sched-row-type {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.sched-row-btns {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.sched-edit-btn {
    font-size: 0.75rem !important;
    padding: 4px 10px !important;
    line-height: 1.4 !important;
    color: var(--text-secondary) !important;
    border-color: var(--border-mid) !important;
}

.sched-edit-btn:hover {
    color: var(--text-primary) !important;
    border-color: var(--border-strong) !important;
    background: var(--bg-elevated) !important;
}

.sched-remove-btn {
    font-size: 0.75rem !important;
    padding: 4px 10px !important;
    line-height: 1.4 !important;
    background: transparent !important;
    border: 1px solid rgba(232,48,63,0.3) !important;
    color: var(--red) !important;
    border-radius: var(--radius-sm) !important;
}

.sched-remove-btn:hover {
    background: rgba(232,48,63,0.1) !important;
    border-color: var(--red) !important;
}

/* ─── Belt Emoji display ─────────────────────────────────────────────────── */

.belt-emoji { font-size: 1rem; vertical-align: middle; margin-right: 2px; }

/* ─── Promotion Progress Bar ─────────────────────────────────────────────── */

.promo-progress {
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.promo-progress-bar {
    background: var(--bg-elevated);
    border-radius: 20px;
    height: 5px;
    margin-top: 3px;
    overflow: hidden;
}

.promo-progress-fill {
    height: 100%;
    background: var(--gold);
    border-radius: 20px;
    transition: width 0.4s ease;
}

/* ─── Toast Notifications ─────────────────────────────────────────────────── */

.toast-container {
    position: fixed;
    top: 72px;
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    max-width: 340px;
    width: calc(100% - 32px);
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    font-size: 0.88rem;
    pointer-events: all;
    animation: toastIn 0.25s ease;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.hiding {
    opacity: 0;
    transform: translateX(20px);
}

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

.toast-success { background: var(--bg-elevated); color: #86efac; border: 1px solid rgba(34,197,94,0.30); }
.toast-error   { background: var(--bg-elevated); color: #fca5a5; border: 1px solid rgba(232,48,63,0.30); }
.toast-info    { background: var(--bg-elevated); color: #93c5fd; border: 1px solid rgba(96,165,250,0.30); }
.toast-warning { background: var(--bg-elevated); color: #fcd34d; border: 1px solid rgba(245,158,11,0.30); }

.toast-msg   { flex: 1; line-height: 1.4; }

.toast-close {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    opacity: 0.5;
    padding: 0;
    color: inherit;
    line-height: 1;
    flex-shrink: 0;
}
.toast-close:hover { opacity: 1; }

/* ─── Skeleton Loading ────────────────────────────────────────────────────── */

.skeleton {
    background: linear-gradient(90deg, var(--bg-subtle) 25%, var(--bg-elevated) 50%, var(--bg-subtle) 75%);
    background-size: 200% 100%;
    animation: skeletonPulse 1.4s ease infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeletonPulse {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
}

.skeleton-line {
    height: 14px;
    margin-bottom: 10px;
    border-radius: 4px;
}

.skeleton-line.short  { width: 40%; }
.skeleton-line.medium { width: 65%; }
.skeleton-line.long   { width: 90%; }
.skeleton-line.full   { width: 100%; }

.skeleton-circle {
    border-radius: 50%;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
}

.skeleton-stat {
    height: 70px;
    border-radius: var(--radius);
}

/* ─── Bottom Navigation Bar (mobile) ─────────────────────────────────────── */

.bottom-nav {
    display: none;
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 11, 17, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 24px;
    height: 64px;
    z-index: 100;
    box-shadow: 0 8px 40px rgba(0,0,0,0.55), 0 1px 0 rgba(255,255,255,0.06) inset;
    width: calc(100% - 32px);
    max-width: 380px;
}

.bottom-nav-items {
    display: flex;
    height: 100%;
    width: 100%;
    padding: 0 8px;
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 700;
    font-family: inherit;
    transition: color 0.15s;
    padding: 8px 4px;
    border-radius: 16px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.bottom-nav-item:hover { color: var(--text-secondary); text-decoration: none; }

.bottom-nav-item.active {
    color: var(--red);
    text-decoration: none;
    background: rgba(232, 48, 63, 0.12);
    border-radius: 14px;
}

.bottom-nav-icon { font-size: 1.3rem; line-height: 1; }

@media (max-width: 768px) {
    .bottom-nav { display: flex; }
    .page-shell { padding-bottom: 100px; }
    .hide-on-mobile { display: none !important; }
    .admin-body { padding-bottom: 100px !important; }
    .tab-bar { overflow-x: auto; white-space: nowrap; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .tab-bar::-webkit-scrollbar { display: none; }
    .table-wrap { overflow-x: auto; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-header .brand span { max-width: none; overflow: visible; text-overflow: unset; white-space: normal; }
    .admin-header .btn-sm { font-size: 0; padding: 6px 10px; }
}

/* ─── Attendance Mini-Calendar ───────────────────────────────────────────── */

.mini-cal {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-top: 10px;
}

.mini-cal-day-label {
    text-align: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    padding-bottom: 3px;
}

.mini-cal-cell {
    height: 34px;
    border-radius: 6px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.mini-cal-cell.attended {
    background: var(--red-subtle);
    border-color: rgba(232,48,63,0.40);
    color: #fca5a5;
    font-weight: 700;
}

.mini-cal-cell.today {
    outline: 2px solid var(--red);
    outline-offset: 1px;
}

.mini-cal-cell.filler {
    background: transparent;
    border-color: transparent;
}

/* ─── Weekly Classes Banner ──────────────────────────────────────────────── */

.weekly-banner {
    background: var(--bg-card);
    border: 1px solid var(--border-mid);
    border-left: 3px solid var(--red);
    border-radius: var(--radius);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.weekly-banner-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    min-width: 48px;
}

.weekly-banner-count {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1;
    color: var(--red);
    letter-spacing: -2px;
}

.weekly-banner-unit {
    font-size: 0.60rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 700;
}

.weekly-banner-msg {
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-primary);
    font-weight: 600;
}

.weekly-banner-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ─── Next Class Card ────────────────────────────────────────────────────── */

.next-class-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background: var(--success-bg);
    border: 1px solid rgba(34,197,94,0.25);
    border-radius: var(--radius);
    margin-bottom: 16px;
}

.next-class-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success);
    flex-shrink: 0;
    animation: dotPulse 2s ease infinite;
}

@keyframes dotPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
    50%       { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
}

.next-class-time { font-weight: 800; color: var(--success); font-size: 1rem; line-height: 1.2; }
.next-class-type { font-size: 0.8rem; color: var(--text-secondary); margin-top: 2px; }

/* ─── Connection Error Banner ────────────────────────────────────────────── */

.conn-banner {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--danger);
    color: #fff;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 10px 16px;
    z-index: 150;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    letter-spacing: 0.2px;
}

.conn-banner.visible { display: block; }

/* ─── Sortable Table Headers ─────────────────────────────────────────────── */

thead th.sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

thead th.sortable:hover { color: var(--text-primary); background: var(--bg-elevated); }

thead th.sortable::after {
    content: ' \2195';
    opacity: 0.3;
    font-size: 0.7em;
}

thead th.sortable.asc::after  { content: ' \2191'; opacity: 1; }
thead th.sortable.desc::after { content: ' \2193'; opacity: 1; }

.search-match { background: rgba(235,171,30,0.25); border-radius: 2px; color: #EBAB1E; }

/* ─── Promote Confirm Modal ──────────────────────────────────────────────── */

.promote-confirm-body {
    text-align: center;
    padding: 8px 0 4px;
}

.promote-confirm-icon { font-size: 2.5rem; margin-bottom: 10px; }

.promote-confirm-body p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

/* ─── Page entrance animation ────────────────────────────────────────────── */

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

.card, .stat-card, .weekly-banner, .next-class-card {
    animation: fadeUp 0.35s ease both;
}

/* ─── Coach Dashboard Overview ──────────────────────────────────────────── */

.ov-hero {
    background: linear-gradient(135deg, #16181f 0%, #1e1a14 100%);
    border: 1px solid rgba(235,171,30,0.18);
    border-radius: 16px;
    padding: 24px 20px 20px;
}

html[data-theme="light"] .ov-hero {
    background: linear-gradient(135deg, #1a2340 0%, #2a1f0e 100%);
    border-color: rgba(235,171,30,0.35);
}

html[data-theme="light"] .ov-hero .ov-hero-title,
html[data-theme="light"] .ov-hero .ov-hero-num,
html[data-theme="light"] .ov-hero .ov-hero-sublbl {
    color: #fff;
}

html[data-theme="light"] .ov-hero .ov-hero-divider {
    background: rgba(235,171,30,0.35);
}

.ov-hero-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 8px;
}

.ov-hero-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-primary);
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.ov-gold { color: var(--gold); }

.ov-hero-stats {
    display: flex;
    align-items: center;
    gap: 0;
}

.ov-hero-stat { flex: 1; }

.ov-hero-divider {
    width: 1px;
    height: 36px;
    background: rgba(235,171,30,0.2);
    margin: 0 16px;
    flex-shrink: 0;
}

.ov-hero-num {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.ov-hero-sublbl {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ── Quick action grid ── */

.ov-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.ov-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-mid);
    border-radius: 14px;
    padding: 18px 12px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.ov-action-btn:hover {
    background: var(--bg-subtle);
    border-color: var(--border-strong);
    transform: translateY(-1px);
}

.ov-action-btn:active { transform: scale(0.97); }

.ov-action-icon { font-size: 1.6rem; line-height: 1; }

.ov-action-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
}

/* ── Section header ── */

.ov-section-hdr {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ov-section-icon { font-size: 1rem; }

.ov-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-primary);
}

/* ── Today's classes ── */

.today-class-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-elevated);
    border: 1px solid var(--border-mid);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 8px;
    transition: border-color 0.15s;
}

.today-class-live {
    border-color: var(--red);
    border-left: 3px solid var(--red);
}

.today-class-done { opacity: 0.45; }

.today-class-info { flex: 1; min-width: 0; }

.today-class-type {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
}

.today-class-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.class-badge {
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 3px 8px;
    border-radius: 20px;
    flex-shrink: 0;
    margin-left: 10px;
}

.badge-live  { background: rgba(232,48,63,0.15); color: var(--red); border: 1px solid rgba(232,48,63,0.35); }
.badge-next  { background: rgba(235,171,30,0.12); color: var(--gold); border: 1px solid rgba(235,171,30,0.3); }
.badge-later { background: var(--bg-subtle); color: var(--text-muted); border: 1px solid var(--border); }
.badge-done  { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }

/* ── Promotion cards ── */

.promo-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-mid);
    border-radius: 12px;
    padding: 20px 16px;
    margin-bottom: 10px;
}

.promo-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.promo-card-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.promo-card-bar-lbl {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.promo-card-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 8px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FIXES & LIGHT MODE
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Logo: invert black logo to white in dark mode ─────────────────────── */

html:not([data-theme="light"]) img.logo-placeholder,
html:not([data-theme="light"]) img.hero-logo-img {
    filter: invert(1) brightness(0.92);
}
html[data-theme="light"] img.logo-placeholder,
html[data-theme="light"] img.hero-logo-img {
    filter: none;
}

.schedule-class-done { opacity: 0.42; }

/* ─── Gym social links card (student dashboard) ──────────────────────────── */

.gym-links-heading {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.gym-links-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gym-link-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border-mid);
    background: var(--bg-elevated);
    text-decoration: none;
    transition: var(--transition);
    color: inherit;
}

.gym-link-row:hover {
    border-color: var(--border-strong);
    text-decoration: none;
    color: inherit;
    transform: translateY(-1px);
}

.gym-link-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.gym-link-info { flex: 1; min-width: 0; }

.gym-link-label {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.gym-link-desc {
    font-size: 0.73rem;
    color: var(--text-muted);
}

/* ─── Schedule edit action buttons ──────────────────────────────────────── */

/* ─── Apple-style drum picker ────────────────────────────────────────────── */

.drum-picker-wrap {
    position: relative;
    display: flex;
    align-items: stretch;
    height: 220px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-mid);
    border-radius: 14px;
    overflow: hidden;
    user-select: none;
}

.drum-col {
    flex: 1;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.drum-col::-webkit-scrollbar { display: none; }

.drum-period-col { flex: 0 0 64px; }

.drum-sep {
    flex: 0 0 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    pointer-events: none;
    position: relative;
    z-index: 3;
}

.drum-item {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-secondary);
    scroll-snap-align: center;
    transition: color 0.1s;
    cursor: pointer;
}

.drum-pad { pointer-events: none; color: transparent; }

.drum-highlight {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 44px;
    background: rgba(232,48,63,0.07);
    border-top: 1px solid var(--border-mid);
    border-bottom: 1px solid var(--border-mid);
    pointer-events: none;
    z-index: 2;
}

html[data-theme="light"] .drum-highlight {
    background: rgba(232,48,63,0.06);
    border-color: rgba(0,0,0,0.10);
}

/* ─── Password strength meter ───────────────────────────────────────────── */

.pw-strength-wrap { margin-top: 8px; }

.pw-bar-row {
    display: flex;
    gap: 4px;
    margin-bottom: 7px;
}

.pw-bar-seg {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: var(--border-mid);
    transition: background 0.2s;
}

.pw-bar-seg.ok { background: #22c55e; }

.pw-rules {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
}

.pw-rule {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.2s;
}

.pw-rule.ok { color: #22c55e; }

html[data-theme="light"] .pw-bar-seg     { background: rgba(0,0,0,0.12); }
html[data-theme="light"] .pw-bar-seg.ok  { background: #16a34a; }
html[data-theme="light"] .pw-rule.ok     { color: #16a34a; }

/* ─── Theme toggle button ───────────────────────────────────────────────── */

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: 1px solid var(--border-mid);
    color: var(--text-secondary);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.theme-toggle:hover {
    background: var(--bg-elevated);
    border-color: var(--border-strong);
    color: var(--text-primary);
}

/* Floating variant for pages without a nav bar (login, register, check-in) */
.theme-toggle--float {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 500;
    background: var(--bg-card);
    border-color: var(--border-mid);
    box-shadow: var(--shadow-sm);
}

/* ─── Light Mode — CSS variable overrides ────────────────────────────────── */

html[data-theme="light"] {
    --bg:            #f4f3f0;
    --bg-card:       #ffffff;
    --bg-elevated:   #eceae5;
    --bg-subtle:     #f0eeea;
    --bg-input:      #fafaf8;

    --border:        rgba(0, 0, 0, 0.07);
    --border-mid:    rgba(0, 0, 0, 0.11);
    --border-strong: rgba(0, 0, 0, 0.18);

    --text-primary:   #1a1917;
    --text-secondary: #504e49;
    --text-muted:     #908d86;
    --text-white:     #ffffff;

    --red-glow:      rgba(232, 48, 63, 0.15);
    --red-subtle:    rgba(232, 48, 63, 0.07);
    --gold-dim:      rgba(232, 176, 0, 0.12);

    --success-bg:    rgba(34, 197, 94, 0.10);
    --warning-bg:    rgba(245, 158, 11, 0.10);
    --danger-bg:     rgba(232, 48, 63, 0.10);
    --info-bg:       rgba(96, 165, 250, 0.10);

    --shadow-sm:     0 1px 4px rgba(0, 0, 0, 0.09);
    --shadow:        0 4px 16px rgba(0, 0, 0, 0.11);
    --shadow-lg:     0 12px 40px rgba(0, 0, 0, 0.16);
    --shadow-red:    0 4px 24px var(--red-glow);

    /* Legacy aliases */
    --bg-light:      #f4f3f0;
    --bg-page:       #f4f3f0;
    --bg-page-alt:   #ffffff;
    --border-dark:   rgba(0, 0, 0, 0.11);
}

/* ─── Light Mode — component overrides ──────────────────────────────────── */

html[data-theme="light"] body {
    background: var(--bg);
    color: var(--text-primary);
}

/* Nav bar */
html[data-theme="light"] .nav-bar {
    background: rgba(244, 243, 240, 0.92);
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .nav-brand span { color: var(--text-primary); }

/* Admin header */
html[data-theme="light"] .admin-header {
    background: #ffffff;
    border-bottom-color: rgba(0, 0, 0, 0.08);
    color: var(--text-primary);
}
html[data-theme="light"] .admin-header .brand { color: var(--text-primary); }
html[data-theme="light"] .admin-header .btn-outline {
    border-color: rgba(0,0,0,0.25);
    color: var(--text-secondary);
}

/* Header action buttons — readable in both dark and light mode */
.admin-header .header-btn {
    border-color: rgba(255,255,255,0.35);
    color: rgba(255,255,255,0.85);
}

html[data-theme="light"] .admin-header .header-btn {
    border-color: rgba(0,0,0,0.2);
    color: var(--text-secondary);
}

/* Hero (index / home) */
html[data-theme="light"] .hero {
    background: linear-gradient(160deg, #f4f3f0 0%, #eceae5 100%);
    color: var(--text-primary);
    border-bottom-color: rgba(0,0,0,0.08);
}
html[data-theme="light"] .hero p.tagline { color: var(--text-muted); }

/* Check-in header */
html[data-theme="light"] .checkin-header {
    background: linear-gradient(160deg, #f4f3f0 0%, #eceae5 100%);
    color: var(--text-primary);
    border-bottom-color: rgba(0,0,0,0.08);
}
html[data-theme="light"] .checkin-header p { color: var(--text-secondary); }

/* Dashboard header */
html[data-theme="light"] .dashboard-header {
    background: linear-gradient(160deg, #f4f3f0 0%, #ffffff 100%);
    color: var(--text-primary);
    border-bottom-color: rgba(0,0,0,0.08);
}
html[data-theme="light"] .dashboard-header h1 { color: var(--text-primary); }

/* Bottom nav */
html[data-theme="light"] .bottom-nav {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(0, 0, 0, 0.09);
    box-shadow: 0 8px 32px rgba(0,0,0,0.10), 0 1px 0 rgba(255,255,255,0.9) inset;
}

html[data-theme="light"] .bottom-nav-item.active {
    background: rgba(232, 48, 63, 0.08);
}

/* Hamburger dropdown */
html[data-theme="light"] .hamburger-dropdown {
    background: #ffffff;
    border-color: rgba(0,0,0,0.10);
}
html[data-theme="light"] .hamburger-btn { border-color: rgba(0,0,0,0.14); }
html[data-theme="light"] .hamburger-btn span { background: var(--text-secondary); }

/* Skeleton */
html[data-theme="light"] .skeleton {
    background: linear-gradient(90deg, #e5e3df 25%, #edebe6 50%, #e5e3df 75%);
    background-size: 200% 100%;
    animation: skeletonPulse 1.4s ease infinite;
}

/* Alert text — needs to be dark on light backgrounds */
html[data-theme="light"] .alert-error   { color: #b91c1c; }
html[data-theme="light"] .alert-success { color: #15803d; }
html[data-theme="light"] .alert-info    { color: #1d4ed8; }
html[data-theme="light"] .alert-warning { color: #92400e; }

/* Toast text */
html[data-theme="light"] .toast-success { background: #fff; color: #15803d; border-color: rgba(34,197,94,0.25); }
html[data-theme="light"] .toast-error   { background: #fff; color: #b91c1c; border-color: rgba(232,48,63,0.25); }
html[data-theme="light"] .toast-info    { background: #fff; color: #1d4ed8; border-color: rgba(96,165,250,0.25); }
html[data-theme="light"] .toast-warning { background: #fff; color: #92400e; border-color: rgba(245,158,11,0.25); }

/* Belt badges */
html[data-theme="light"] .belt-badge.white  { background: rgba(0,0,0,0.06);   color: #1a1917; border-color: rgba(0,0,0,0.15); }
html[data-theme="light"] .belt-badge.blue   { background: rgba(30,79,168,0.12);  color: #1e3fa8; border-color: rgba(30,79,168,0.25); }
html[data-theme="light"] .belt-badge.purple { background: rgba(107,63,160,0.12); color: #6b3fa0; border-color: rgba(107,63,160,0.25); }
html[data-theme="light"] .belt-badge.brown  { background: rgba(122,74,30,0.12);  color: #7a4a1e; border-color: rgba(122,74,30,0.25); }
html[data-theme="light"] .belt-badge.black  { background: rgba(0,0,0,0.08);   color: #1a1917; border-color: rgba(0,0,0,0.20); }

/* Stripe dots — make unearned dots clearly visible in light mode */
html[data-theme="light"] .stripe-dots .dot {
    background: rgba(0,0,0,0.04);
    border: 2px solid rgba(0,0,0,0.32);
}
html[data-theme="light"] .stripe-dots .dot.earned {
    background: var(--gold);
    border-color: #c78a10;
    box-shadow: 0 0 6px rgba(235,171,30,0.35);
}

/* Modal */
html[data-theme="light"] .modal-overlay { background: rgba(0, 0, 0, 0.45); }
html[data-theme="light"] .modal-box     { background: #ffffff; }

/* Promo item */
html[data-theme="light"] .promo-item { background: rgba(235,171,30,0.10); border-color: rgba(235,171,30,0.22); border-left-color: var(--gold); }

/* select arrow in light mode */
html[data-theme="light"] select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23504e49' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

/* index.html inline-styled hero body text */
html[data-theme="light"] body { color: var(--text-primary); }

/* ─── Light Mode — index.html specific (inline styles use #fff color) ────── */
html[data-theme="light"] .hero-tagline { color: var(--text-secondary) !important; }
html[data-theme="light"] .cta-secondary {
    background: rgba(0,0,0,0.06) !important;
    color: var(--text-primary) !important;
    border-color: rgba(0,0,0,0.18) !important;
}
html[data-theme="light"] .cta-secondary:hover {
    background: rgba(0,0,0,0.10) !important;
}
html[data-theme="light"] .hero-footer { color: var(--text-muted); }

/* login.html body glow — tone it down in light mode */
html[data-theme="light"] body::before {
    opacity: 0.4;
}

/* search match — darker text in light mode so it's readable on light bg */
html[data-theme="light"] .search-match {
    background: rgba(235,171,30,0.22);
    color: #8a6010;
}

/* ─── Password Visibility Toggle ─────────────────────────────────────────── */

.pw-field-wrap {
    position: relative;
    display: block;
}

.pw-field-wrap .form-control {
    padding-right: 44px;
}

.pw-toggle-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    line-height: 0;
}

.pw-toggle-btn:hover { color: var(--text-primary); }

/* ─── Form input — slightly roomier for better character rendering ─────── */

.form-control {
    padding: 14px 16px;
    font-size: 1rem;
    line-height: 1.55;
}

/* ─── Calendar — improve day-label and cell readability ──────────────────── */

.mini-cal-day-label {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.mini-cal-cell {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* #profileCard stripe dot override removed — card now uses standard bg,
   so global light-mode dot rules apply correctly. */

