/* ============================================================================
   SAMPATHBANDARA MATHS.LK — STUDENT PORTAL  ·  navy + orange, maths grid
   ---------------------------------------------------------------------------
   The admin panel is the crest at night; the student side is the banner by
   day: a soft lavender page, a white sidebar carrying the indigo crest, and
   the current page as a solid indigo tab with the banner's cut corner. The
   dashboard hero is the college banner itself, the lion looking out over the
   student's welcome. Roomier and friendlier than the admin side, same family:
   Montserrat headings, wide-tracked caps for labels, a cyan glint for "now".

   Loaded only on student pages and the student login/register pages by
   database/brand.php, after each page's own CSS and after brand.css (whose
   --ca-* tokens this file uses). Pages keep their markup.
   Companion script: assets/brand/student.js
   ========================================================================== */

/* ── tokens ──────────────────────────────────────────────────────────────── */
html[data-bm="student"], html[data-bm="login"] {
    --nw-indigo: #0b3a70; --nw-indigo-d: #082e5a; --nw-night: #051d3d; --nw-ink: #061a33;
    --nw-lav: #eef2fb; --nw-lav-2: #dfe6f5; --nw-cyan: #f5b301; --nw-cyan-hi: #ffd54f;
    --nw-circuit: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%27220%27 height=%27220%27 fill=%27none%27 stroke=%27%23ffffff%27 stroke-width=%271%27%3E%3Cpath d=%27M0 .5h220M0 55.5h220M0 110.5h220M0 165.5h220M.5 0v220M55.5 0v220M110.5 0v220M165.5 0v220%27 opacity=%27.22%27/%3E%3Cpath d=%27M120 205c18-62 40-92 92-98%27 stroke=%27%23ffffff%27 stroke-width=%271.6%27 opacity=%27.9%27/%3E%3Cg fill=%27%23ffffff%27 stroke=%27none%27 font-family=%27Georgia,Times New Roman,serif%27 font-style=%27italic%27 opacity=%27.75%27%3E%3Ctext x=%2716%27 y=%2740%27 font-size=%2726%27%3E%CF%80%3C/text%3E%3Ctext x=%27128%27 y=%2744%27 font-size=%2720%27%3E%E2%88%9Ax%3C/text%3E%3Ctext x=%2770%27 y=%27104%27 font-size=%2724%27 font-style=%27normal%27%3E%CE%A3%3C/text%3E%3Ctext x=%27176%27 y=%2794%27 font-size=%2722%27 font-style=%27normal%27%3E%E2%88%9E%3C/text%3E%3Ctext x=%2720%27 y=%27160%27 font-size=%2719%27%3Ex%C2%B2%3C/text%3E%3Ctext x=%2772%27 y=%27206%27 font-size=%2720%27 font-style=%27normal%27%3E%C3%B7%3C/text%3E%3Ctext x=%27182%27 y=%27204%27 font-size=%2718%27 font-style=%27normal%27%3E%2B%3C/text%3E%3C/g%3E%3Ccircle cx=%27110.5%27 cy=%27110.5%27 r=%272.5%27 fill=%27%23ffffff%27 stroke=%27none%27/%3E%3C/svg%3E");
    --nw-cut: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}
html[data-bm="student"] {
    --bg-app: #f4f6fb !important; --bg-card: #fff !important;
    --text-primary: var(--nw-ink) !important; --text-secondary: #56617f !important;
    --accent: var(--nw-indigo) !important; --accent-soft: var(--nw-lav) !important;
    --primary: var(--nw-indigo) !important;
    --border: #e1e6f1 !important;
    --shadow: 0 1px 2px rgba(6,26,51,.05), 0 8px 22px rgba(11,58,112,.06) !important;
    --radius-lg: 18px !important; --radius-md: 14px !important;
    /* full-page gate screens (terms, registration fee, intro video) */
    --bg: #f4f6fb !important; --card: #fff !important; --tx: var(--nw-ink) !important; --tx2: #56617f !important;
    --st-surface: #fff; --st-soft: var(--nw-lav); --st-hover: #f6f8fd;
    --st-side: #fff; --st-side-ink: #33405f; --st-side-icon: #7a8bb5; --st-side-line: #eaeef7;
}
html[data-bm="student"][data-theme="dark"] {
    --bg-app: #050c1c !important; --bg-card: #0c1f3a !important;
    --text-primary: #eaf0fd !important; --text-secondary: #a3b1d4 !important;
    --accent: #8cc0f2 !important; --accent-soft: rgba(140,192,242,.12) !important;
    --primary: #8cc0f2 !important;
    --border: rgba(255,255,255,.08) !important;
    --shadow: none !important;
    --bg: #050c1c !important; --card: #0c1f3a !important; --tx: #eaf0fd !important; --tx2: #a3b1d4 !important;
    --st-surface: #0c1f3a; --st-soft: rgba(140,192,242,.12); --st-hover: rgba(255,255,255,.03);
    --st-side: #0a1a33; --st-side-ink: rgba(255,255,255,.78); --st-side-icon: rgba(255,255,255,.5); --st-side-line: rgba(255,255,255,.07);
}

/* ── page canvas: the banner's lavender light ────────────────────────────── */
html[data-bm="student"] body {
    background:
        radial-gradient(900px 500px at 110% -10%, rgba(11,58,112,.08), transparent 60%),
        radial-gradient(700px 400px at 20% 110%, rgba(245,179,1,.06), transparent 60%),
        var(--bg-app) !important;
    background-attachment: fixed !important;
    color: var(--text-primary);
}
html[data-bm="student"] .main-content { background: transparent !important; }

/* gate screens */
html[data-bm="student"] .wrap > .card { border-radius: 18px !important; border: 1px solid var(--border) !important; box-shadow: 0 20px 50px rgba(11,58,112,.12) !important; }
html[data-bm="student"] .wrap > .card .brand { font-family: var(--ca-head); font-weight: 800; letter-spacing: .02em; color: var(--nw-indigo); }
html[data-bm="student"] .wrap > .card .brand i { color: var(--nw-cyan) !important; }
html[data-bm="student"] .wrap > .card h1 { font-family: var(--ca-head) !important; font-weight: 800 !important; letter-spacing: -.02em; font-variant: normal; text-transform: none; }

/* ── sidebar: white, the indigo crest on top ─────────────────────────────── */
html[data-bm="student"] .sidebar {
    background: var(--st-side) !important; border: 0 !important; border-right: 1px solid var(--st-side-line) !important; color: var(--st-side-ink);
    box-shadow: 8px 0 30px rgba(11,58,112,.06) !important;
    scrollbar-width: thin; scrollbar-color: rgba(11,58,112,.2) transparent;
    padding: 22px 14px !important; isolation: isolate;
}
html[data-bm="student"] .sidebar::after {            /* the lion, faint, at the foot */
    content: ''; position: absolute; right: -30px; bottom: -6px; width: 200px; height: 186px; z-index: -1; pointer-events: none;
    background: url("../../uploads/settings/bm-logo-mark-color.png?v=nw1") center / contain no-repeat; opacity: .05;
}
html[data-bm="student"][data-theme="dark"] .sidebar::after { background-image: url("../../uploads/settings/bm-logo-mark.png?v=nw1"); opacity: .05; }
@media (min-width: 769px) {
    html[data-bm="student"] .sidebar { top: 0 !important; left: 0 !important; height: 100vh !important; width: 264px !important; border-radius: 0 !important; }
    html[data-bm="student"] .main-content { margin-left: 264px !important; padding: 28px 36px 48px !important; }
}
html[data-bm="student"] .sidebar .logo {
    display: flex !important; flex-direction: column; align-items: flex-start !important; flex-shrink: 0; gap: 12px;
    margin: 0 0 14px !important; padding: 2px 8px 18px !important; min-height: 0 !important; position: relative;
    background: none !important; border-radius: 0 !important; box-shadow: none !important;
}
html[data-bm="student"] .sidebar .logo::after {      /* the crest's rule */
    content: ''; position: absolute; left: 8px; right: 8px; bottom: 0; height: 2px; border-radius: 2px;
    background: linear-gradient(90deg, var(--nw-indigo), rgba(11,58,112,.06));
}
html[data-bm="student"][data-theme="dark"] .sidebar .logo::after { background: linear-gradient(90deg, rgba(255,255,255,.5), rgba(255,255,255,.05)); }
html[data-bm="student"] .sidebar .logo img {
    content: url("../../uploads/settings/bm-logo-horizontal.png?v=nw1");
    width: 184px !important; max-width: 100% !important; height: auto !important; max-height: none !important;
    border-radius: 0 !important; filter: none !important;
}
html[data-bm="student"][data-theme="dark"] .sidebar .logo img { content: url("../../uploads/settings/bm-logo-horizontal-light.png?v=nw1"); }
html[data-bm="student"] .sidebar .logo span:not(.bm-portal-tag), html[data-bm="student"] .sidebar .logo h2 { display: none; }
html[data-bm="student"] .sidebar .logo-icon { background: var(--nw-indigo) !important; color: #fff !important; }
.bm-portal-tag {
    display: inline-flex; align-items: center; gap: 7px; color: var(--nw-indigo); background: var(--nw-lav); border: 1px solid var(--nw-lav-2);
    padding: 4px 11px 4px 9px; clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 0 100%);
    text-transform: uppercase; letter-spacing: .22em; font-family: var(--ca-head); font-size: 9.5px; font-weight: 700;
}
.bm-portal-tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--nw-cyan); box-shadow: 0 0 6px var(--nw-cyan-hi); }
html[data-theme="dark"] .bm-portal-tag { color: #fff; background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.14); }

html[data-bm="student"] .sidebar .menu { gap: 2px !important; }
html[data-bm="student"] .sidebar .menu a {
    color: var(--st-side-ink) !important; border-radius: 10px !important; padding: 10px 12px !important;
    font-size: 14px !important; font-weight: 600 !important; gap: 12px !important; position: relative;
    transition: background .15s, color .15s !important;
}
html[data-bm="student"] .sidebar .menu a i { color: var(--st-side-icon) !important; font-size: 19px !important; transition: color .15s; }
html[data-bm="student"] .sidebar .menu a:hover { background: var(--st-soft) !important; color: var(--nw-indigo) !important; transform: none !important; }
html[data-bm="student"][data-theme="dark"] .sidebar .menu a:hover { color: #fff !important; }
html[data-bm="student"] .sidebar .menu a:hover i { color: var(--nw-indigo) !important; }
html[data-bm="student"][data-theme="dark"] .sidebar .menu a:hover i { color: #fff !important; }
/* the current page: a solid indigo tab with the banner's cut corner */
html[data-bm="student"] .sidebar .menu a.active {
    background: linear-gradient(135deg, #0e5aa8, var(--nw-indigo-d)) !important; color: #fff !important; font-weight: 700 !important;
    box-shadow: 0 8px 20px rgba(11,58,112,.28) !important; clip-path: var(--nw-cut);
}
html[data-bm="student"] .sidebar .menu a.active i { color: #fff !important; }
html[data-bm="student"] .sidebar .menu a.active::after {
    content: ''; position: absolute; right: 14px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%;
    background: var(--nw-cyan-hi); box-shadow: 0 0 8px var(--nw-cyan-hi);
}
html[data-bm="student"] .sidebar .menu a.active:has(.nav-badge)::after { display: none; }
html[data-bm="student"] .sidebar .menu a.ai-badge { border-left: 0 !important; background: linear-gradient(90deg, rgba(245,179,1,.12), transparent) !important; }
html[data-bm="student"] .sidebar .menu a.ai-badge i { color: #a87400 !important; }
html[data-bm="student"] .sidebar .menu a.ai-badge.active { background: linear-gradient(135deg, #f5b301, #a87400) !important; }
html[data-bm="student"] .sidebar .menu a.ai-badge.active i { color: #fff !important; }
html[data-bm="student"] .sidebar .menu a[href$="logout.php"], html[data-bm="student"] .sidebar .menu a[href$="logout.php"] i { color: #d93a2f !important; }
html[data-bm="student"] .sidebar .fee-note { border-radius: 12px; }

.bm-nav-search { position: relative; flex-shrink: 0; margin: 0 2px 10px; }
.bm-nav-search input {
    width: 100%; padding: 10px 12px 10px 36px; border-radius: 10px; border: 1px solid var(--st-side-line, #eaeef7); background: var(--st-hover, #f6f8fd);
    color: var(--text-primary); font: inherit; font-size: 13px; outline: 0;
}
.bm-nav-search input::placeholder { color: #8f9ab5; }
.bm-nav-search input:focus { border-color: var(--nw-indigo) !important; box-shadow: 0 0 0 3px rgba(11,58,112,.12) !important; }
.bm-nav-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #8f9ab5; font-size: 16px; }

/* notification prompt (student.js) */
.bm-push-ask {
    position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 2500; width: min(560px, calc(100vw - 24px));
    display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; color: #fff; font-size: 13.5px; font-weight: 600; line-height: 1.45;
    background: linear-gradient(135deg, #0b3a70, #06234a); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 24px 60px rgba(5,29,61,.35); animation: stIn .35s var(--ca-ease) backwards;
}
.bm-push-ask i { font-size: 22px; color: #ffd54f; flex-shrink: 0; }
.bm-push-ask span { flex: 1; }
.bm-push-ask button { flex-shrink: 0; border: 0; border-radius: 9px; padding: 9px 14px; font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }
.bm-push-ask .yes { background: #fff; color: #0b3a70; }
.bm-push-ask .no { background: transparent; color: rgba(255,255,255,.7); padding: 9px 6px; }
@media (max-width: 768px) { .bm-push-ask { bottom: 92px; flex-wrap: wrap; } .bm-push-ask span { flex-basis: calc(100% - 40px); } }

/* ── header ──────────────────────────────────────────────────────────────── */
html[data-bm="student"] .header-left h1, html[data-bm="student"] .main-content > h1 {
    font-family: var(--ca-head) !important; font-weight: 800 !important; letter-spacing: -.02em !important; color: var(--text-primary);
    font-size: clamp(21px, 2.2vw, 27px) !important; font-variant: normal !important; text-transform: none !important;
}
html[data-bm="student"] .header-left p { color: var(--text-secondary) !important; font-weight: 500 !important; }
html[data-bm="student"] .icon-btn {
    width: 42px !important; height: 42px !important; border-radius: 12px !important;
    background: var(--st-surface) !important; border: 1px solid var(--border) !important; color: var(--nw-indigo) !important;
    box-shadow: var(--shadow) !important; transition: background .15s, color .15s !important;
}
html[data-bm="student"][data-theme="dark"] .icon-btn { color: var(--text-secondary) !important; }
html[data-bm="student"] .icon-btn:hover { background: var(--nw-indigo) !important; color: #fff !important; transform: none !important; }
html[data-bm="student"] .menu-toggle { color: var(--accent) !important; }

/* ── dashboard hero: the college banner, the lion looking on ─────────────── */
html[data-bm="student"] .hero-card {
    position: relative; overflow: hidden; isolation: isolate; min-height: 230px; padding: 34px 38px !important; border-radius: 20px !important;
    background:
        url("../../uploads/settings/bm-logo-mark.png?v=sb2") right 48px center / auto 76% no-repeat,
        radial-gradient(360px 260px at calc(100% - 150px) 50%, rgba(10,120,214,.42), transparent 70%),
        radial-gradient(420px 220px at 10% 0%, rgba(245,179,1,.14), transparent 65%),
        linear-gradient(120deg, #0b3a70 0%, #06234a 60%, #03142c 100%),
        #0b3a70 !important;
    color: #fff !important; border: 0 !important;
    box-shadow: 0 18px 44px rgba(11,58,112,.22) !important;
    clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 0 100%);
}
html[data-bm="student"] .hero-card::before {           /* circuit lines over the indigo */
    content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background: var(--nw-circuit) 0 0 / 220px 220px; opacity: .22;
    -webkit-mask: linear-gradient(90deg, #000 calc(100% - 420px), transparent calc(100% - 260px)); mask: linear-gradient(90deg, #000 calc(100% - 420px), transparent calc(100% - 260px));
}
html[data-bm="student"] .hero-card::after {            /* the crest's rule under the welcome */
    content: ''; position: absolute; left: 38px; bottom: 0; width: min(46%, 420px); height: 4px; z-index: 1; pointer-events: none;
    background: linear-gradient(90deg, #fff, rgba(255,255,255,.1));
}
html[data-bm="student"] .hero-card .hero-bg-shape, html[data-bm="student"] .hero-card .bm-scene { display: none !important; }
html[data-bm="student"] .hero-card > div { position: relative; z-index: 2; max-width: calc(100% - 300px); }
html[data-bm="student"] .hero-card h2 {
    font-family: var(--ca-head) !important; font-weight: 800 !important; font-size: clamp(23px, 2.5vw, 31px) !important; line-height: 1.18;
    letter-spacing: -.02em; color: #fff !important; font-variant: normal !important; text-transform: none !important;
}
html[data-bm="student"] .hero-card p { color: rgba(255,255,255,.8) !important; }
html[data-bm="student"] .hero-card .btn {
    display: inline-flex; background: #fff !important; color: var(--nw-indigo) !important; font-weight: 700 !important; border-radius: 12px !important;
    padding: 12px 22px !important; border: 0 !important; box-shadow: 0 10px 24px rgba(3,10,25,.25) !important; transition: box-shadow .15s !important;
}
html[data-bm="student"] .hero-card .btn:hover { box-shadow: 0 0 0 4px rgba(255,213,79,.35), 0 10px 24px rgba(3,10,25,.25) !important; transform: none !important; }
.nw-hero-tag {
    display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 5px 12px 5px 10px;
    background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); color: #fff;
    font-family: var(--ca-head); font-size: 10px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
}
.nw-hero-tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #ffd54f; box-shadow: 0 0 8px #ffd54f; }
.bm-steps { display: none !important; }

/* ── cards ───────────────────────────────────────────────────────────────── */
html[data-bm="student"] .main-content .card {
    border-radius: 16px !important; border: 1px solid var(--border) !important; box-shadow: var(--shadow) !important;
    background: var(--bg-card) !important; transition: box-shadow .2s, border-color .2s;
}
html[data-bm="student"] .main-content .card::before { display: none !important; }
html[data-bm="student"] .card-title {
    font-family: var(--ca-head) !important; font-weight: 800 !important; letter-spacing: -.01em; font-variant: normal !important; text-transform: none !important;
    color: var(--text-primary);
}
html[data-bm="student"] .card-title i { color: var(--accent) !important; }

/* stat tiles: chamfered indigo / cyan icon tiles */
html[data-bm="student"] .stat-box {
    background: var(--bg-card) !important; border-radius: 16px !important; border: 1px solid var(--border) !important;
    box-shadow: var(--shadow) !important; transition: box-shadow .2s, border-color .2s, transform .2s !important; transform: none !important;
}
html[data-bm="student"] .stat-box:hover { border-color: rgba(11,58,112,.22) !important; box-shadow: 0 14px 32px rgba(11,58,112,.12) !important; transform: translateY(-2px) !important; }
html[data-bm="student"][data-theme="dark"] .stat-box:hover { border-color: rgba(140,192,242,.3) !important; box-shadow: none !important; }
html[data-bm="student"] .stat-box i {
    display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin-bottom: 12px;
    color: #fff !important; font-size: 22px !important; background: linear-gradient(135deg, #0e5aa8, #082e5a); border-radius: 4px;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px)) !important;
}
html[data-bm="student"] .stat-box:nth-child(even) i { background: linear-gradient(135deg, #f5b301, #a87400); }
html[data-bm="student"] .stat-box h3 { font-family: var(--ca-head) !important; font-weight: 800 !important; color: var(--text-primary) !important; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
html[data-bm="student"] .stat-box p { font-family: var(--ca-head); letter-spacing: .14em; font-size: 10.5px !important; font-weight: 700 !important; text-transform: uppercase !important; color: var(--text-secondary) !important; }

/* quick links */
html[data-bm="student"] .q-link {
    border-radius: 14px !important; border: 1px solid var(--border) !important; background: var(--bg-card) !important; font-weight: 600;
    transition: background .15s, border-color .15s, box-shadow .15s !important; transform: none !important; box-shadow: var(--shadow) !important;
}
html[data-bm="student"] .q-link::before { display: none !important; }
html[data-bm="student"] .q-link:hover { background: var(--bg-card) !important; border-color: var(--nw-indigo) !important; transform: none !important; box-shadow: 0 0 0 3px rgba(11,58,112,.1) !important; }
html[data-bm="student"] .q-link i { color: var(--accent) !important; transform: none !important; }

/* ── tables ──────────────────────────────────────────────────────────────── */
html[data-bm="student"] .main-content table thead th {
    background: var(--st-hover) !important; color: var(--nw-indigo) !important; font-family: var(--ca-head); font-size: 10.5px !important; font-weight: 700 !important;
    letter-spacing: .12em; text-transform: uppercase; border-bottom: 2px solid var(--nw-lav-2) !important;
}
html[data-bm="student"][data-theme="dark"] .main-content table thead th { color: var(--text-secondary) !important; border-bottom-color: var(--border) !important; }
html[data-bm="student"] .main-content table td { border-bottom-color: var(--border) !important; }

/* ── buttons & fields ────────────────────────────────────────────────────── */
html[data-bm="student"] .btn { border-radius: 10px !important; }
html[data-bm="student"] .btn-primary, html[data-bm="student"] .primary-btn, html[data-bm="student"] .btn.primary, html[data-bm="student"] .btn-submit, html[data-bm="student"] .btn-pay, html[data-bm="student"] .btn-join {
    background: linear-gradient(135deg, #0e5aa8, var(--nw-indigo-d)) !important; color: #fff !important; border: 0 !important; border-radius: 12px !important;
    box-shadow: 0 1px 2px rgba(6,26,51,.14), 0 6px 16px rgba(11,58,112,.24) !important; transition: box-shadow .15s !important;
}
html[data-bm="student"] .btn-primary:hover, html[data-bm="student"] .primary-btn:hover, html[data-bm="student"] .btn-submit:hover,
html[data-bm="student"] .btn-pay:hover, html[data-bm="student"] .btn-join:hover { box-shadow: 0 0 0 3px rgba(245,179,1,.25), 0 8px 20px rgba(11,58,112,.28) !important; transform: none !important; }
html[data-bm="student"][data-theme="dark"] .btn-primary, html[data-bm="student"][data-theme="dark"] .primary-btn, html[data-bm="student"][data-theme="dark"] .btn.primary,
html[data-bm="student"][data-theme="dark"] .btn-submit, html[data-bm="student"][data-theme="dark"] .btn-pay, html[data-bm="student"][data-theme="dark"] .btn-join {
    background: linear-gradient(135deg, #0a78d6, #0e5aa8) !important; box-shadow: none !important;
}
html[data-bm="student"] .btn-line, html[data-bm="student"] .btn-ghost { border-radius: 12px !important; }
html[data-bm="student"] input:not([type=checkbox]):not([type=radio]):not([type=range]), html[data-bm="student"] select, html[data-bm="student"] textarea { border-radius: 12px; }
html[data-bm="student"] input:focus, html[data-bm="student"] select:focus, html[data-bm="student"] textarea:focus {
    border-color: var(--nw-indigo) !important; box-shadow: 0 0 0 4px rgba(11,58,112,.12) !important; outline: 0 !important;
}
html[data-bm="student"] input[type=checkbox], html[data-bm="student"] input[type=radio] { accent-color: var(--nw-indigo); }
html[data-bm="student"] .modal-card, html[data-bm="student"] .modal-content { border-radius: 18px !important; border: 1px solid var(--border) !important; box-shadow: 0 30px 70px rgba(5,29,61,.25) !important; }
html[data-bm="student"] .live-badge { background: var(--ca-red) !important; }

/* grid columns may shrink below their content's width (long fee lines used
   to push the page sideways on phones) */
html[data-bm="student"] .main-content [class*="grid"] > * { min-width: 0; }

/* ── student login / register: indigo crest panel, as the admin login ────── */
html[data-bm="login"] body { background: #f4f6fb !important; }
html[data-bm="login"] .brand-section {
    background:
        var(--nw-circuit) 0 0 / 260px 260px,
        radial-gradient(700px 460px at 100% 0%, rgba(10,120,214,.55), transparent 60%),
        radial-gradient(520px 380px at 0% 100%, rgba(245,179,1,.22), transparent 60%),
        linear-gradient(160deg, #0b3a70, #06234a 70%, #03142c) !important;
    background-blend-mode: soft-light, normal, normal, normal;
}
html[data-bm="login"] .brand-section::after { display: none !important; }
html[data-bm="login"] .brand-section::before {
    content: ''; position: absolute; right: -60px; bottom: -40px; width: 380px; height: 350px; pointer-events: none; z-index: 0;
    background: url("../../uploads/settings/bm-logo-mark.png?v=nw1") center / contain no-repeat; opacity: .07;
    border: 0 !important; transform: none !important; animation: none !important; border-radius: 0 !important;
}
html[data-bm="login"] .brand-section h1 span, html[data-bm="login"] .brand-section h2 span { color: #ffd54f !important; }
html[data-bm="login"] .brand-title-mini { color: #ffe7a3 !important; letter-spacing: .24em; font-family: var(--ca-head); }
html[data-bm="login"] .login-box, html[data-bm="login"] .register-box, html[data-bm="login"] .form-box { border-radius: 20px !important; box-shadow: 0 24px 60px rgba(11,58,112,.12) !important; }
html[data-bm="login"] .login-btn, html[data-bm="login"] button[type="submit"]:not(.password-toggle) {
    background: linear-gradient(135deg, #0e5aa8, #082e5a) !important; border-radius: 12px !important; box-shadow: 0 10px 24px rgba(11,58,112,.3) !important;
}
html[data-bm="login"] .login-btn:hover, html[data-bm="login"] button[type="submit"]:not(.password-toggle):hover { box-shadow: 0 0 0 4px rgba(245,179,1,.22), 0 10px 24px rgba(11,58,112,.32) !important; }
html[data-bm="login"] input:focus, html[data-bm="login"] select:focus { border-color: #0b3a70 !important; box-shadow: 0 0 0 4px rgba(11,58,112,.14) !important; }

/* ── mobile: drawer + bottom dock ────────────────────────────────────────── */
@media (max-width: 480px) {
    html[data-bm="student"] .header { flex-wrap: wrap; row-gap: 12px; }
    html[data-bm="student"] .header-right { gap: 8px !important; flex-wrap: wrap; }
}
/* shared drawer backdrop (student.js) — sits just under the sidebar */
.bm-side-scrim { position: fixed; inset: 0; z-index: 2001; background: rgba(5,29,61,.45); opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s; }
.bm-side-scrim.on { opacity: 1; visibility: visible; }
@media (min-width: 769px) { .bm-side-scrim { display: none; } }
html.bm-drawer-open, html.bm-drawer-open body { overflow: hidden !important; }
@media (max-width: 768px) {
    /* 100vh runs under the phone's address bar, hiding the last links (Logout) */
    html[data-bm="student"] .sidebar { width: 280px !important; max-width: 86vw; border-radius: 0 !important; top: 0 !important; height: 100vh !important; height: 100dvh !important; z-index: 2002 !important; padding-bottom: calc(20px + env(safe-area-inset-bottom)) !important; overscroll-behavior: contain; }
    html[data-bm="student"] .main-content { padding: 18px 16px 104px !important; }
    html[data-bm="student"] .mobile-nav {
        left: 0 !important; right: 0 !important; bottom: 0 !important; width: auto !important; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)) !important;
        border-radius: 0 !important; border: 0 !important; border-top: 1px solid var(--border) !important;
        background: var(--bg-card) !important; box-shadow: 0 -8px 24px rgba(11,58,112,.08) !important;
    }
    html[data-bm="student"] .mobile-nav .nav-item { color: var(--text-secondary) !important; border-radius: 12px; padding: 6px 8px; transform: none !important; background: none !important; box-shadow: none !important; }
    html[data-bm="student"] .mobile-nav .nav-item i { color: inherit !important; }
    html[data-bm="student"] .mobile-nav .nav-item.active { color: #fff !important; background: var(--nw-indigo) !important; }
    html[data-bm="student"] .hero-card {
        padding: 26px 22px 30px !important; min-height: 0; clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
        background: linear-gradient(160deg, #0b3a70, #06234a) !important;
    }
    html[data-bm="student"] .hero-card::before { -webkit-mask: none; mask: none; opacity: .18; }
    html[data-bm="student"] .hero-card::after { left: 22px; width: 50%; }
    html[data-bm="student"] .hero-card > div { max-width: 100%; }
}

/* ── entrance ────────────────────────────────────────────────────────────── */
.bm-pop { animation: stIn .4s var(--ca-ease) backwards; animation-delay: calc(var(--i, 0) * 40ms); }
@keyframes stIn { from { opacity: 0; transform: translateY(10px); } }

@media (prefers-reduced-motion: reduce) {
    html[data-bm="student"] *, html[data-bm="student"] *::before, html[data-bm="student"] *::after,
    html[data-bm="login"] *, html[data-bm="login"] *::before, html[data-bm="login"] *::after { animation: none !important; transition-duration: .01ms !important; }
}
