/* ============================================================
   A/L LMS — Polished Light Theme
   White surfaces · Red accents · Crisp borders · Clean shadows
   ============================================================ */

:root {
    --font: 'Plus Jakarta Sans', 'Segoe UI', -apple-system, Roboto, Arial, sans-serif;

    /* Backgrounds */
    --bg:             #f4f5f7;
    --surface:        #ffffff;
    --surface-soft:   #f8f9fb;
    --surface-raised: #f0f2f5;

    /* Borders */
    --border:         #e5e7eb;
    --border-strong:  #d1d5db;

    /* Text */
    --ink:       #111827;
    --ink-soft:  #4b5563;
    --ink-faint: #9ca3af;

    /* Red accent */
    --primary:        #dc2626;
    --primary-strong: #ef4444;
    --primary-deep:   #991b1b;
    --primary-soft:   rgba(220, 38, 38, .07);

    /* Gradients */
    --grad:      linear-gradient(135deg, #7f1d1d 0%, #dc2626 55%, #ef4444 100%);
    --grad-fire: linear-gradient(135deg, #fff1f2 0%, #fee2e2 60%, #fecaca 100%);

    /* Semantic colours */
    --green:      #16a34a;
    --green-soft: rgba(22, 163, 74, .08);
    --amber:      #d97706;
    --amber-soft: rgba(217, 119, 6, .08);
    --red:        #ef4444;
    --red-soft:   rgba(239, 68, 68, .08);
    --slate:      #64748b;
    --slate-soft: rgba(100, 116, 139, .10);

    /* Shape */
    --radius:    16px;
    --radius-sm: 10px;
    --radius-lg: 22px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04);
    --shadow:    0 4px 16px -4px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.06);
    --shadow-lg: 0 20px 48px -12px rgba(0,0,0,.13);
    --glow-red:  0 0 0 3px rgba(220,38,38,.10), 0 8px 24px -6px rgba(220,38,38,.18);
    --ring:      0 0 0 3px rgba(220,38,38,.14);

    --topbar-h: 73px;
}

/* ── Reset ─────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.55;
    min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-deep); }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.01em; }
p { margin: 0 0 .9em; }

::selection { background: rgba(220,38,38,.15); color: var(--primary-deep); }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* ── Topbar ─────────────────────────────────────────────────── */

.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    height: var(--topbar-h);
    padding: 0 28px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.12rem;
    letter-spacing: -.02em;
    color: var(--ink);
}
.brand:hover { color: var(--primary-strong); }
.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    border-radius: 11px;
    background: var(--grad);
    color: #fff;
    font-weight: 800;
    font-size: 1rem;
    box-shadow: 0 6px 16px -4px rgba(220,38,38,.55);
}
.brand .brand-accent { color: var(--primary-strong); }

.topbar-nav { display: flex; align-items: center; gap: 6px; }
.topbar-nav a {
    color: var(--ink-soft);
    font-weight: 600;
    font-size: .92rem;
    padding: 8px 14px;
    border-radius: 999px;
    transition: background .15s, color .15s;
}
.topbar-nav a:hover { background: var(--primary-soft); color: var(--primary); }

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-right: 4px;
    padding: 5px 12px 5px 5px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-weight: 700;
    font-size: .88rem;
    color: var(--ink);
}
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--grad);
    color: #fff;
    font-size: .78rem;
    font-weight: 800;
    box-shadow: 0 4px 10px -3px rgba(220,38,38,.50);
}
.avatar.avatar-admin { background: linear-gradient(135deg, #7f1d1d, #ef4444); }

/* ── Page shell ─────────────────────────────────────────────── */

.page { max-width: 1120px; margin: 0 auto; padding: 28px 24px 56px; }

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.page-head h1 { font-size: 1.5rem; margin: 0; }
.page-head .subhead { color: var(--ink-soft); font-size: .93rem; }

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .86rem;
    color: var(--ink-faint);
    margin-bottom: 14px;
}
.breadcrumb a { color: var(--ink-faint); font-weight: 600; }
.breadcrumb a:hover { color: var(--primary-strong); }
.breadcrumb .sep { color: var(--border-strong); }

.layout-main {
    display: block;
    padding-top: var(--topbar-h);
    min-height: 100vh;
}

.layout {
    display: flex;
    gap: 0;
    align-items: stretch;
    min-height: calc(100vh - var(--topbar-h));
}

/* ── Sidebar ────────────────────────────────────────────────── */

.sidebar {
    width: 240px;
    flex-shrink: 0;
    position: sticky;
    top: var(--topbar-h);
    height: calc(100vh - var(--topbar-h));
    overflow-y: auto;
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
}

/* Search at top */
.sidebar-search {
    padding: 12px 12px 8px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.sidebar-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-raised);
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 7px 10px;
    transition: border-color .15s, box-shadow .15s;
}
.sidebar-search-wrap:focus-within {
    border-color: var(--primary);
    box-shadow: var(--ring);
}
.sidebar-search-wrap svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--ink-faint); }
.sidebar-search-wrap input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-family: var(--font);
    font-size: .82rem;
    color: var(--ink);
    padding: 0;
    width: 100%;
    box-shadow: none;
}
.sidebar-search-wrap input::placeholder { color: var(--ink-faint); }

/* Scrollable nav body */
.sidebar-body { flex: 1; overflow-y: auto; padding: 8px 8px 14px; }

.sidebar-section { margin-bottom: 4px; }
.sidebar-section:last-child { margin-bottom: 0; }

.sidebar-label {
    padding: 8px 8px 4px;
    font-size: .66rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--ink-faint);
}

.sidebar-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.sidebar-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4px;
    border-radius: 8px;
}
.sidebar-list li a {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink-soft);
    font-weight: 600;
    font-size: .85rem;
    padding: 9px 10px;
    border-radius: 8px;
    transition: background .15s, color .15s;
    text-decoration: none;
}
.sidebar-list li a:hover {
    background: var(--surface-raised);
    color: var(--ink);
}
.sidebar-list li a.active {
    background: #fef2f2;
    color: #dc2626;
    font-weight: 700;
    position: relative;
}
.sidebar-list li a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: #dc2626;
    border-radius: 0 3px 3px 0;
}

/* Icon box per item */
.sidebar-list li a .s-icon {
    width: 32px; height: 32px;
    flex-shrink: 0;
    border-radius: 8px;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, border-color .15s;
}
.sidebar-list li a .s-icon svg { width: 16px; height: 16px; color: var(--ink-soft); transition: color .15s; }
.sidebar-list li a:hover .s-icon { background: var(--primary-soft); border-color: rgba(220,38,38,.15); }
.sidebar-list li a:hover .s-icon svg { color: var(--primary); }
.sidebar-list li a.active .s-icon { background: var(--primary); border-color: transparent; }
.sidebar-list li a.active .s-icon svg { color: #fff; }

.sidebar-list li a > .s-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-list li .link-btn { opacity: 0; transition: opacity .15s; flex-shrink: 0; }
.sidebar-list li:hover .link-btn { opacity: 1; }

/* Bottom add-batch form */
.sidebar-add {
    flex-shrink: 0;
    padding: 10px 10px 12px;
    border-top: 1px solid var(--border);
}
.sidebar-add form { display: flex; flex-direction: column; gap: 6px; }
.sidebar-add input[type=text] {
    width: 100%;
    padding: 8px 10px;
    background: #ffffff;
    border: 1.5px solid var(--border-strong);
    border-radius: 8px;
    font-family: var(--font);
    font-size: .81rem;
    color: var(--ink);
    outline: none;
    box-shadow: none;
    display: block;
    transition: border-color .15s, box-shadow .15s;
}
.sidebar-add input[type=text]:focus { border-color: var(--primary); box-shadow: var(--ring); }
.sidebar-add input[type=text]::placeholder { color: var(--ink-faint); }
.sidebar-add button { width: 100%; padding: 7px 10px; font-size: .8rem; border-radius: 8px; }

/* ── Sidebar footer + divider ─────────────────────────────── */
.sidebar-footer { flex-shrink: 0; padding: 4px 8px 12px; }
.sidebar-divider { height: 1px; background: var(--border); margin: 8px 12px; opacity: 0.6; }

/* ── Sidebar bottom user strip ── */
.sidebar-bottom-user {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 12px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}
.sbu-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg,#dc2626,#ef4444);
    color: #fff; font-weight: 800; font-size: .78rem;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.sbu-info { flex: 1; min-width: 0; }
.sbu-name { font-size: .78rem; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sbu-role { font-size: .66rem; color: var(--ink-faint); }
.sbu-logout {
    width: 28px; height: 28px; border-radius: 7px;
    border: 1.5px solid #fecaca; background: #fff5f5; color: #dc2626;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: background .13s; text-decoration: none;
}
.sbu-logout:hover { background: #fee2e2; }

/* Sidebar user block — mobile only (top of drawer) */
.sidebar-user { padding: 14px 12px 10px; border-bottom: 1px solid var(--border); display: none; align-items: center; gap: 9px; }
@media(max-width:700px){ .sidebar-user { display: flex; } }
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    color: var(--ink-soft);
    font-weight: 600;
    font-size: .85rem;
    transition: background .15s, color .15s;
    text-decoration: none;
}
.sidebar-link:hover { background: var(--primary-soft); color: var(--primary); }
.sidebar-link .s-icon {
    width: 32px; height: 32px;
    flex-shrink: 0;
    border-radius: 8px;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.sidebar-link .s-icon svg { width: 16px; height: 16px; color: var(--ink-soft); }
.sidebar-link:hover .s-icon { background: var(--primary-soft); border-color: rgba(220,38,38,.15); }
.sidebar-link:hover .s-icon svg { color: var(--primary); }

.sidebar-muted { padding: 4px 8px; font-size: .78rem; color: var(--ink-faint); }

/* ── Content area ───────────────────────────────────────────── */

.content {
    flex: 1;
    min-width: 0;
    padding: 28px 24px 56px;
}

/* ── Cards ──────────────────────────────────────────────────── */

.card {
    background: var(--surface);
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04);
}
.card h2 { font-size: 1.2rem; }

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.card-header h2 { margin: 0; }
.card-header .card-tag {
    font-size: .74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--primary-strong);
    background: var(--primary-soft);
    padding: 5px 12px;
    border-radius: 999px;
}

.banner-card {
    background: var(--grad);
    color: #fff;
    border: none;
    border-radius: var(--radius-lg);
    padding: 28px 30px;
    box-shadow: 0 12px 32px -8px rgba(220,38,38,.32);
    position: relative;
    overflow: hidden;
}
.banner-card::after {
    content: '';
    position: absolute;
    right: -60px; top: -60px;
    width: 240px; height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.1), transparent 60%);
}
.banner-card::before {
    content: '';
    position: absolute;
    left: -40px; bottom: -90px;
    width: 220px; height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(239,68,68,.3), transparent 65%);
}
.banner-card h2 { color: #fff; margin-bottom: 4px; position: relative; }
.banner-card p  { color: rgba(255,255,255,.82); margin: 0; font-size: .95rem; max-width: 46ch; position: relative; }

/* ── Stat cards ─────────────────────────────────────────────── */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid #e5e7eb;
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    padding: 20px 22px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04);
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    overflow: hidden;
    transition: transform .18s, border-color .18s, box-shadow .18s;
}
.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: var(--glow-red);
}
.stat-card::after {
    content: '';
    position: absolute;
    right: -30px; top: -30px;
    width: 110px; height: 110px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(220,38,38,.08), transparent 65%);
    pointer-events: none;
}
.stat-icon {
    width: 46px; height: 46px;
    flex-shrink: 0;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--grad);
    box-shadow: 0 8px 18px -6px rgba(220,38,38,.50);
}
.stat-icon.alt  { background: linear-gradient(135deg, #7f1d1d, #dc2626); }
.stat-icon.mint { background: linear-gradient(135deg, #9f1239, #f43f5e); box-shadow: 0 8px 18px -6px rgba(244,63,94,.45); }
.stat-icon.sun  { background: linear-gradient(135deg, #450a0a, #ef4444); box-shadow: 0 8px 18px -6px rgba(239,68,68,.45); }
.stat-icon svg { width: 22px; height: 22px; }
.stat-meta { min-width: 0; }
.stat-value { font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.stat-label { color: var(--ink-faint); font-size: .8rem; font-weight: 600; }

/* ── Content head ───────────────────────────────────────────── */

.content-head { margin-bottom: 24px; }
.content-head-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 6px;
}
.content-head h1 { font-size: 1.5rem; margin: 0 0 4px; }

/* ── Module grid ────────────────────────────────────────────── */

.module-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 8px;
}

.module-card {
    background: var(--surface);
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    padding: 24px 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04);
    transition: box-shadow .18s, transform .18s;
}
.module-card:hover {
    box-shadow: 0 0 0 3px rgba(220,38,38,.08), 0 8px 24px -6px rgba(220,38,38,.16);
    transform: translateY(-2px);
}

.module-card-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.35;
    text-align: center;
    padding-bottom: 16px;
}
.module-card-divider { border: none; border-top: 1px solid var(--border); margin: 0 0 16px; }

/* Optional admin-uploaded cover image (modules.thumbnail) */
.module-card-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    border-radius: 10px;
    background: #f7f8fa;
    border: 1px solid #e5e7eb;
    margin: 0 0 16px;
}

.module-card-desc {
    flex: 1;
    font-size: .875rem;
    color: var(--ink-soft);
    line-height: 1.65;
    min-height: 80px;
}
.module-card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

@media (max-width: 860px) {
    .module-grid { grid-template-columns: 1fr; }
}

/* ── Lists ──────────────────────────────────────────────────── */

.module-list, .video-list, .receipt-list { list-style: none; margin: 0; padding: 0; }

.module-list li, .video-list li, .receipt-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    margin-bottom: 10px;
    background: var(--surface);
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-sm);
    transition: transform .15s, box-shadow .15s, border-color .15s;
}
.module-list li:hover, .video-list li:hover, .receipt-list li:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
    border-color: rgba(220,38,38,.30);
}
.module-list li:last-child, .video-list li:last-child, .receipt-list li:last-child { margin-bottom: 0; }

.list-title { font-weight: 700; font-size: .97rem; display: flex; align-items: center; gap: 10px; }
.list-title svg { width: 16px; height: 16px; color: var(--primary-strong); flex-shrink: 0; }
.list-sub { color: var(--ink-faint); font-size: .84rem; margin-top: 1px; }

.video-list li { display: block; }
.video-card-title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.play-chip {
    width: 34px; height: 34px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--grad);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px -4px rgba(220,38,38,.55);
}
.play-chip svg { width: 14px; height: 14px; margin-left: 2px; }

.video-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.video-embed iframe { width: 100%; height: 100%; border: 0; border-radius: 12px; }

/* ── Enrollments ────────────────────────────────────────────── */

.receipt-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.view-receipt {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .84rem;
    font-weight: 600;
    color: var(--primary-strong);
    background: var(--primary-soft);
    padding: 6px 12px;
    border-radius: 999px;
    transition: background .15s;
}
.view-receipt:hover { background: rgba(220,38,38,.18); color: var(--primary-deep); }
.view-receipt svg { width: 14px; height: 14px; }

/* ── Status pills ───────────────────────────────────────────── */

.status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: .76rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 999px;
    white-space: nowrap;
}
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-pending  { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.status-approved { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.status-rejected { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.status-locked   { background: #f8fafc; color: #475569; border: 1px solid #e2e8f0; }

/* ── Badge ──────────────────────────────────────────────────── */

.badge {
    background: var(--grad);
    color: #fff;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: .72rem;
    font-weight: 800;
    margin-left: 6px;
    box-shadow: 0 4px 10px -3px rgba(239,68,68,.55);
}

/* ── Buttons ────────────────────────────────────────────────── */

.btn, button, input[type=submit], input[type=button] {
    font-family: var(--font);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 12px;
    cursor: pointer;
    font-size: .9rem;
    font-weight: 700;
    transition: background .15s, transform .1s, box-shadow .15s;
    box-shadow: 0 6px 16px -6px rgba(220,38,38,.50);
}
.btn:hover, button:hover, input[type=submit]:hover {
    background: var(--primary-strong);
    transform: translateY(-1px);
}
.btn:active, button:active { transform: translateY(0); }

.btn .btn-arrow { transition: transform .15s; }
.btn:hover .btn-arrow { transform: translateX(3px); }

a.btn { color: #fff; text-decoration: none; }
a.btn.btn-ghost, a.btn-ghost { color: #dc2626; }

/* Ghost / secondary — clearly visible on white */
.btn.secondary, .btn-ghost {
    background: #ffffff;
    color: #dc2626;
    border: 1.5px solid #fca5a5;
    box-shadow: none;
}
.btn.secondary:hover, .btn-ghost:hover {
    background: #fff5f5;
    color: #b91c1c;
    border-color: #dc2626;
    transform: translateY(-1px);
}

/* Primary gradient */
.btn.btn-primary, .btn-hero-primary {
    background: var(--grad);
    box-shadow: 0 10px 24px -8px rgba(220,38,38,.55);
}
.btn.btn-primary:hover { box-shadow: 0 14px 30px -8px rgba(239,68,68,.65); }

.btn-danger  { background: var(--red); box-shadow: 0 6px 16px -6px rgba(239,68,68,.48); }
.btn-danger:hover  { background: #f87171; }

.btn-success { background: var(--primary); box-shadow: 0 6px 16px -6px rgba(220,38,38,.48); }
.btn-success:hover { background: var(--primary-strong); }

.btn-sm { padding: 7px 13px; font-size: .82rem; border-radius: 10px; }

.link-btn {
    background: none;
    border: none;
    color: var(--ink-faint);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 4px 7px;
    border-radius: 8px;
    box-shadow: none;
    line-height: 1;
    transition: background .15s, color .15s;
}
.link-btn:hover { background: #fee2e2; color: #dc2626; }
.inline-form { display: inline; }

/* ── Forms ──────────────────────────────────────────────────── */

.auth-wrap {
    min-height: calc(100vh - 73px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 20px;
}
.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-lg);
    padding: 32px 32px 26px;
    box-shadow: var(--shadow-lg);
}
.auth-card .auth-logo { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 22px; }
.auth-card .auth-logo .brand-mark { width: 52px; height: 52px; border-radius: 16px; font-size: 1.4rem; margin-bottom: 14px; box-shadow: 0 12px 26px -8px rgba(220,38,38,.65); }
.auth-card .auth-logo h1 { font-size: 1.35rem; margin: 0 0 4px; }
.auth-card .auth-logo p  { color: var(--ink-faint); margin: 0; font-size: .88rem; }

.auth-switch { text-align: center; margin-top: 18px; color: var(--ink-soft); font-size: .9rem; }
.auth-switch a { font-weight: 700; }

.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-weight: 700;
    font-size: .82rem;
    color: var(--ink-soft);
    margin-bottom: 7px;
}

/* All text inputs, selects, textareas */
.form-group input, .form-group select, .form-group textarea,
form.card input, form.card select, form.card textarea,
.stack-form input, .stack-form select, .stack-form textarea {
    display: block;
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 12px;
    background: #ffffff;
    font-family: var(--font);
    font-size: .94rem;
    color: var(--ink);
    transition: border-color .15s, box-shadow .15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus,
form.card input:focus, form.card select:focus, form.card textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--ring);
}
.form-group input::placeholder { color: var(--ink-faint); }
.form-group select option { background: var(--surface-soft); }

form.card { max-width: 560px; }
form.card label { display: block; font-weight: 700; font-size: .82rem; color: var(--ink-soft); margin-bottom: 7px; }
form.card input, form.card select, form.card textarea { margin-bottom: 16px; }

.stack-form { margin-top: 12px; }
.stack-form input { margin-bottom: 8px; }

/* Add panel summary — polished red accent button */
details.add-panel { margin-top: 18px; }
details.add-panel summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    background: var(--grad);
    color: #ffffff;
    border: none;
    padding: 10px 18px;
    border-radius: 12px;
    font-weight: 700;
    font-size: .9rem;
    width: fit-content;
    transition: box-shadow .15s, transform .12s;
    box-shadow: 0 6px 16px -6px rgba(220,38,38,.50);
    list-style: none;
}
details.add-panel summary:hover {
    box-shadow: 0 10px 22px -6px rgba(220,38,38,.60);
    transform: translateY(-1px);
}
details.add-panel summary::-webkit-details-marker { display: none; }
details.add-panel summary::before { content: '+'; font-weight: 800; font-size: 1rem; }
.add-panel .panel-body { margin-top: 14px; padding-top: 18px; border-top: 1px dashed var(--border); }

/* ── Modal ──────────────────────────────────────────────────── */

.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(107, 114, 128, .45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-backdrop.open {
    display: flex;
    animation: modal-fade-in .18s ease;
}
@keyframes modal-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal-box {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 48px -12px rgba(0,0,0,.18);
    width: 100%;
    max-width: 520px;
    padding: 28px 28px 24px;
    animation: modal-slide-in .2s cubic-bezier(.22,.68,0,1.2);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}
@keyframes modal-slide-in {
    from { opacity: 0; transform: translateY(22px) scale(.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}
.modal-title { font-size: 1.1rem; font-weight: 800; margin: 0 0 3px; color: var(--ink); }
.modal-sub   { font-size: .82rem; color: var(--ink-faint); margin: 0; }

.modal-close {
    flex-shrink: 0;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    color: var(--ink-soft);
    width: 32px; height: 32px;
    border-radius: 8px;
    font-size: 1.3rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    box-shadow: none;
    transition: background .15s, color .15s;
}
.modal-close:hover { background: #fee2e2; color: #dc2626; transform: none; }

/* ── Enroll / Receipt upload ────────────────────────────────── */

.enroll-card {
    max-width: 640px;
    background: var(--surface);
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-lg);
    padding: 32px 32px 28px;
    box-shadow: var(--shadow);
}

.enroll-card-head { margin-bottom: 20px; }
.enroll-title { font-size: 1.25rem; font-weight: 800; margin: 0 0 4px; color: var(--ink); }
.enroll-title span { color: var(--primary-strong); }
.enroll-batch { color: var(--ink-faint); font-size: .88rem; margin: 0; }

.upload-label {
    display: block;
    font-weight: 700;
    font-size: .82rem;
    color: var(--ink-soft);
    margin-bottom: 10px;
    letter-spacing: .01em;
}

/* Drop zone */
.upload-drop {
    position: relative;
    border: 2px dashed #d1d5db;
    border-radius: 14px;
    background: #f9fafb;
    cursor: pointer;
    transition: border-color .18s, background .18s, box-shadow .18s;
    overflow: hidden;
    margin-bottom: 22px;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.upload-drop:hover,
.upload-drop.drag-over {
    border-color: var(--primary);
    background: #fff5f5;
    box-shadow: var(--ring);
}
.upload-drop.has-file {
    border-color: var(--green);
    border-style: solid;
    background: var(--green-soft);
}

/* Hidden file input covers the full zone */
.upload-drop input[type=file] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%; height: 100%;
    z-index: 2;
    padding: 0;
    border: none;
    background: none;
    box-shadow: none;
}

.upload-drop-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 32px 24px;
    pointer-events: none;
    user-select: none;
    gap: 6px;
    width: 100%;
}

.upload-drop-icon {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: var(--primary-soft);
    border: 1px solid rgba(220,38,38,.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}
.upload-drop-icon svg { width: 24px; height: 24px; color: var(--primary-strong); }

.upload-drop-main {
    font-size: .92rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0;
}
.upload-browse {
    color: var(--primary-strong);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.upload-drop-hint { font-size: .78rem; color: var(--ink-faint); margin: 0; }

/* Chosen state */
.upload-chosen-icon {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}
.upload-chosen-icon svg { width: 26px; height: 26px; color: #16a34a; }
.upload-chosen-name {
    font-size: .9rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0;
    word-break: break-all;
    max-width: 36ch;
}
.upload-chosen-change { font-size: .78rem; color: var(--ink-faint); margin: 0; }

.enroll-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}
.enroll-actions button:disabled {
    opacity: .45;
    cursor: not-allowed;
    transform: none;
    pointer-events: none;
}

/* ── Legacy upload-box ──────────────────────────────────────── */

.upload-box {
    border: 2px dashed #d1d5db;
    border-radius: 14px;
    padding: 26px 18px;
    text-align: center;
    color: var(--ink-faint);
    background: #f9fafb;
    transition: border-color .15s, background .15s;
    margin-bottom: 16px;
    position: relative;
}
.upload-box:hover { border-color: var(--primary); background: #fff5f5; }
.upload-box input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-box svg { width: 34px; height: 34px; color: var(--primary-strong); margin-bottom: 8px; }
.upload-box strong { display: block; color: var(--ink); font-size: .95rem; }
.upload-box small { font-size: .8rem; }

/* ── Alerts ─────────────────────────────────────────────────── */

.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: .9rem;
    font-weight: 600;
}
.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.alert-error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.alert-info    { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }

.error, .success { border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; font-weight: 600; font-size: .9rem; }
.error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

/* ── Admin Dashboard ────────────────────────────────────────── */

.dash-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}
.dash-page-title { font-size: 1.55rem; font-weight: 800; margin: 0 0 4px; letter-spacing: -.02em; }
.dash-page-sub { color: var(--ink-faint); font-size: .88rem; margin: 0; }
.dash-page-sub strong { color: var(--ink-soft); }

/* Stat row */
.dash-stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}

.dash-stat-card {
    background: var(--surface);
    border: 1px solid #e5e7eb;
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    padding: 18px 18px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--ink);
    position: relative;
    overflow: hidden;
    transition: transform .16s, border-color .16s, box-shadow .16s;
    box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04);
}
.dash-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--glow-red);
    color: var(--ink);
}
.dash-stat-card::after {
    content: '';
    position: absolute;
    right: -24px; top: -24px;
    width: 90px; height: 90px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(220,38,38,.08), transparent 65%);
    pointer-events: none;
}

/* Colour variants for left border */
.dsc-alt  { border-left-color: #dc2626; }
.dsc-mint { border-left-color: #f43f5e; }
.dsc-sun  { border-left-color: #ef4444; }
.dsc-warn { border-left-color: #f59e0b; }

.dsc-icon {
    width: 42px; height: 42px;
    flex-shrink: 0;
    border-radius: 12px;
    background: var(--grad);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px -6px rgba(220,38,38,.50);
}
.dsc-icon svg { width: 20px; height: 20px; }
.dsc-alt  .dsc-icon { background: linear-gradient(135deg,#7f1d1d,#dc2626); }
.dsc-mint .dsc-icon { background: linear-gradient(135deg,#9f1239,#f43f5e); box-shadow: 0 6px 16px -6px rgba(244,63,94,.45); }
.dsc-sun  .dsc-icon { background: linear-gradient(135deg,#450a0a,#ef4444); box-shadow: 0 6px 16px -6px rgba(239,68,68,.45); }
.dsc-warn .dsc-icon { background: linear-gradient(135deg,#78350f,#f59e0b); box-shadow: 0 6px 16px -6px rgba(245,158,11,.45); }

.dsc-body { flex: 1; min-width: 0; }
.dsc-value { font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; margin-bottom: 3px; }
.dsc-label { font-size: .76rem; font-weight: 600; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .06em; }
.dsc-trend { color: var(--ink-faint); flex-shrink: 0; }
.dsc-trend-warn { color: #f59e0b; }

/* Two-column panels */
.dash-main-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.dash-panel {
    background: var(--surface);
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    padding: 22px 22px 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04);
}

.dash-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.dash-panel-head h2 { font-size: 1rem; font-weight: 800; margin: 0; color: var(--ink); }
.dash-panel-action { font-size: .8rem; font-weight: 700; color: var(--primary-strong); text-decoration: none; transition: color .15s; }
.dash-panel-action:hover { color: var(--primary-deep); }
.dash-panel-tag {
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--primary-strong);
    background: var(--primary-soft);
    padding: 4px 10px;
    border-radius: 999px;
}

/* List inside panels */
.dash-list { list-style: none; margin: 0; padding: 0; }
.dash-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
}
.dash-list-item:last-child { border-bottom: none; padding-bottom: 0; }

.dli-avatar {
    width: 34px; height: 34px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--grad);
    color: #fff;
    font-size: .8rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px -3px rgba(220,38,38,.45);
}
.dli-batch-icon {
    width: 34px; height: 34px;
    flex-shrink: 0;
    border-radius: 9px;
    background: var(--primary-soft);
    border: 1px solid rgba(220,38,38,.22);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.dli-batch-icon svg { width: 16px; height: 16px; color: var(--primary-strong); }

.dli-body { flex: 1; min-width: 0; }
.dli-name { font-size: .9rem; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dli-sub  { font-size: .78rem; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Empty state */
.dash-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 16px;
    gap: 10px;
    color: var(--ink-faint);
}
.dash-empty svg { width: 36px; height: 36px; opacity: .45; }
.dash-empty p { margin: 0; font-size: .88rem; }

@media (max-width: 860px) {
    .dash-main-cols { grid-template-columns: 1fr; }
    .dash-stat-row  { grid-template-columns: repeat(2, 1fr); }
}

/* ── Dashboard legacy ───────────────────────────────────────── */

.dash-hero { margin-bottom: 20px; }
.dash-title-row { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.dash-title-row h1 { margin: 0; font-size: 1.55rem; }
.dash-title-row .dash-kicker {
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--primary-strong);
    background: var(--primary-soft);
    border: 1px solid rgba(239,68,68,.28);
    padding: 5px 12px;
    border-radius: 999px;
}
.dash-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }

/* Quick action tiles */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}
.quick-tile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-sm);
    color: var(--ink);
    font-weight: 700;
    font-size: .92rem;
    transition: transform .15s, border-color .15s, box-shadow .15s;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.quick-tile:hover {
    transform: translateY(-2px);
    border-color: rgba(220,38,38,.35);
    box-shadow: var(--glow-red);
    color: var(--ink);
}
.quick-tile .tile-ic {
    width: 38px; height: 38px;
    flex-shrink: 0;
    border-radius: 11px;
    background: var(--primary-soft);
    color: var(--primary-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.quick-tile .tile-ic svg { width: 18px; height: 18px; }
.quick-tile .tile-sub { display: block; font-size: .76rem; color: var(--ink-faint); font-weight: 600; }

/* Side-by-side cards */
.dash-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.dash-cols .card { margin-bottom: 0; }

.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
}
.mini-list li:last-child { border-bottom: none; padding-bottom: 0; }
.mini-list .mini-main { min-width: 0; }
.mini-list .mini-title { font-weight: 700; font-size: .92rem; }
.mini-list .mini-sub   { color: var(--ink-faint); font-size: .8rem; }

.empty-note { color: var(--ink-faint); font-size: .88rem; padding: 8px 0; }

/* ── Landing ────────────────────────────────────────────────── */

.landing { min-height: calc(100vh - 73px); display: flex; flex-direction: column; }

.hero-landing {
    position: relative;
    overflow: hidden;
    background: var(--grad);
    color: #fff;
    padding: 84px 28px 100px;
    text-align: center;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.hero-landing .hero-inner { max-width: 720px; margin: 0 auto; position: relative; }

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(239,68,68,.35);
    padding: 7px 16px;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #fca5a5;
    margin-bottom: 22px;
    backdrop-filter: blur(6px);
}
.hero-eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 12px #ef4444; }

.hero-landing h1 {
    font-size: clamp(2.1rem, 5vw, 3.4rem);
    font-weight: 800;
    letter-spacing: -.03em;
    margin: 0 auto 16px;
    max-width: 17ch;
}
/* grad-text on red bg — just inherit white */
.hero-landing h1 .grad-text {
    background: linear-gradient(135deg, #ffffff 0%, #fca5a5 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.hero-landing .hero-sub {
    color: rgba(255,255,255,.78);
    font-size: clamp(1rem, 2vw, 1.12rem);
    max-width: 52ch;
    margin: 0 auto 32px;
}

.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-cta .btn { padding: 13px 26px; font-size: .96rem; border-radius: 14px; }

.btn-hero-ghost {
    background: rgba(255,255,255,.08);
    color: #fff;
    border: 1px solid rgba(255,255,255,.30);
    box-shadow: none;
    backdrop-filter: blur(6px);
}
.btn-hero-ghost:hover { background: rgba(255,255,255,.16); color: #fff; }

.hero-stats {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 44px;
    flex-wrap: wrap;
}
.hero-stat {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(239,68,68,.22);
    backdrop-filter: blur(8px);
    border-radius: 14px;
    padding: 14px 24px;
    min-width: 128px;
}
.hero-stat strong { display: block; font-size: 1.4rem; font-weight: 800; color: #fff; }
.hero-stat span   { font-size: .8rem; color: rgba(255,255,255,.65); font-weight: 600; }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
    max-width: 1120px;
    margin: -56px auto 0;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}
.feature-card {
    background: var(--surface);
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04);
    transition: transform .18s, box-shadow .18s, border-color .18s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(220,38,38,.30); }
.feature-icon {
    width: 52px; height: 52px;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--grad);
    margin-bottom: 16px;
    box-shadow: 0 10px 22px -8px rgba(220,38,38,.60);
}
.feature-icon.mint { background: linear-gradient(135deg,#7f1d1d,#f43f5e); box-shadow: 0 10px 22px -8px rgba(244,63,94,.55); }
.feature-icon.sun  { background: linear-gradient(135deg,#450a0a,#ef4444); box-shadow: 0 10px 22px -8px rgba(239,68,68,.55); }
.feature-icon svg { width: 24px; height: 24px; }
.feature-card h3  { font-size: 1.02rem; margin-bottom: 8px; }
.feature-card p   { color: var(--ink-soft); font-size: .9rem; margin: 0; }

.landing-cta-band {
    max-width: 1120px;
    margin: 70px auto 0;
    padding: 0 24px;
    width: 100%;
    text-align: center;
    color: var(--ink-soft);
}
.landing-cta-band h2  { font-size: 1.6rem; color: var(--ink); }
.landing-cta-band .btn { margin-top: 6px; padding: 13px 26px; }

/* ── Helpers ────────────────────────────────────────────────── */

.muted  { color: var(--ink-faint); font-size: .88rem; }
.hidden { display: none; }

/* ── Responsive ─────────────────────────────────────────────── */

@media (max-width: 900px) {
    .topbar { padding: 0 16px; }
    .topbar-nav a { padding: 8px 10px; }
    .page { padding: 20px 16px 48px; }
    .sidebar { width: 200px; }
    .content { padding: 20px 20px 48px; }
    .dash-cols { grid-template-columns: 1fr; }
    .hero-landing { padding: 64px 20px 92px; }
}

@media (max-width: 700px) {
    /* ── Topbar ── */
    .topbar { padding: 0 14px; }
    .user-chip .chip-name { display: none; }
    .topbar-nav .hide-sm { display: none; }

    /* ── Layout: sidebar off-canvas ── */
    .layout { display: block; position: relative; }

    .sidebar {
        position: fixed;
        top: var(--topbar-h); 
        left: 0; 
        bottom: 0;
        width: 280px;
        height: calc(100dvh - var(--topbar-h));
        z-index: 500;
        transform: translateX(-100%);
        transition: transform .28s cubic-bezier(.4,0,.2,1);
        box-shadow: 4px 0 24px rgba(0,0,0,.18);
        border-right: none;
        overflow-y: auto;
    }
    .sidebar.mob-open {
        transform: translateX(0);
    }
    /* Overlay behind sidebar */
    .mob-sidebar-overlay {
        display: none;
        position: fixed;
        top: var(--topbar-h);
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,.45);
        z-index: 499;
        backdrop-filter: blur(2px);
    }
    .mob-sidebar-overlay.active { display: block; }

    /* Hamburger button */
    .mob-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 38px; height: 38px;
        border-radius: 10px;
        border: 1.5px solid var(--border);
        background: var(--surface);
        cursor: pointer;
        margin-right: 10px;
        flex-shrink: 0;
    }
    .mob-menu-btn svg { color: var(--ink); }

    /* ── Content ── */
    .content {
        padding: 16px 14px 48px;
        min-height: calc(100vh - var(--topbar-h));
    }

    /* ── Module grid single column ── */
    .module-grid { grid-template-columns: 1fr !important; }
    .vg-grid { grid-template-columns: 1fr !important; column-gap: 0 !important; row-gap: 24px !important; }
    .dash-stat-row { grid-template-columns: repeat(2,1fr); }
    .dash-main-cols { grid-template-columns: 1fr; }
    .sv-cols { grid-template-columns: 1fr; }
    .sm-table th:nth-child(3),
    .sm-table td:nth-child(3),
    .sm-table th:nth-child(4),
    .sm-table td:nth-child(4),
    .sm-table th:nth-child(6),
    .sm-table td:nth-child(6) { display: none; }
    .module-list li, .receipt-list li { flex-direction: column; align-items: flex-start; }
    .receipt-actions { width: 100%; }

    /* ── Video modal full screen ── */
    .vm-overlay { padding: 0; }
    .vm-box { border-radius: 0; max-width: 100%; height: 100%; display: flex; flex-direction: column; }
    .vm-player { flex: 1; aspect-ratio: unset; }
    .vm-player iframe { position: static; width: 100%; height: 100%; }
}
