/* =========================================================================
   SchoolSys design layer
   -------------------------------------------------------------------------
   Loaded after the purchased Bootstrap 4 theme, so it wins the cascade on
   equal specificity. Purely additive - no template needs changing.

   Palette and type are taken from ebtihaj.dev: a dark, technical, editorial
   system. The craft rules behind it come from Apple's design guidance -
   size-specific tracking, translucent chrome with content scrolling under,
   feedback on press rather than release, and motion that respects the
   reduced-motion, reduced-transparency and contrast preferences.
   ========================================================================= */

:root {
    color-scheme: dark;

    /* Core palette, as rgb triplets so they compose with alpha. */
    --ink: 5 6 10;              /* page            #05060a */
    --surface: 14 16 22;        /* cards           #0e1016 */
    --raised: 22 25 33;         /* inputs, wells   #161921 */
    --fg: 242 244 248;          /* primary text    #f2f4f8 */
    --dim: 152 158 172;         /* secondary text  #989eac */
    --faint: 108 114 128;       /* tertiary        #6c7280 - lifted from the
                                   portfolio's #5c6270 so placeholders and meta
                                   text clear 3:1 on the input surface */
    --signal: 120 170 255;      /* accent          #78aaff */
    --go: 74 222 150;           /* success         #4ade96 */
    --stop: 255 112 112;        /* error           #ff7070 */
    --warn: 240 190 100;        /* warning         #f0be64 */

    --line: rgb(var(--fg) / .09);
    --line-strong: rgb(var(--fg) / .16);

    --r-xs: 8px;
    --r-sm: 12px;
    --r-md: 16px;
    --r-lg: 24px;
    --r-pill: 9999px;

    /* Dark surfaces separate by light and border, not by drop shadow. */
    --shadow: 0 1px 2px rgb(0 0 0 / .5), 0 12px 32px rgb(0 0 0 / .35);
    --shadow-lg: 0 24px 64px rgb(0 0 0 / .55);

    --sans: -apple-system, BlinkMacSystemFont, 'Inter', system-ui, 'Segoe UI', sans-serif;
    --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', 'Menlo', monospace;

    /* Critically damped by default; overshoot is reserved for momentum. */
    --ease: cubic-bezier(.2, .7, .3, 1);
    --fast: 120ms;
    --base: 220ms;
}

/* ---------- Base ------------------------------------------------------ */

body {
    font-family: var(--sans);
    background: rgb(var(--ink));
    color: rgb(var(--dim));
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    font-optical-sizing: auto;
}

.wrapper { font-family: var(--sans) !important; background: transparent; }

/* Tracking is size-specific: large type tightens, small type opens up. */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--sans) !important;
    color: rgb(var(--fg));
    font-weight: 600;
    line-height: 1.15;
}

h1, .h1 { font-size: 2rem;    letter-spacing: -.035em; }
h2, .h2 { font-size: 1.6rem;  letter-spacing: -.03em; }
h3, .h3 { font-size: 1.35rem; letter-spacing: -.025em; }
h4, .h4 { font-size: 1.15rem; letter-spacing: -.02em; }
h5, .h5 { font-size: 1rem;    letter-spacing: -.015em; }
h6, .h6 { font-size: .9rem;   letter-spacing: -.01em; }

a, a:hover, a:focus, a:visited { text-decoration: none; }
a { color: rgb(var(--signal)); transition: color var(--fast) var(--ease); }
a:hover { color: rgb(var(--signal) / .8); }

p { color: rgb(var(--dim)); }
small, .small { font-size: 12.5px; }
hr { border-color: var(--line); }
::selection { background: rgb(var(--signal) / .3); color: rgb(var(--fg)); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgb(var(--fg) / .12); border-radius: var(--r-pill); }
::-webkit-scrollbar-thumb:hover { background: rgb(var(--fg) / .2); }

/* Focus must stay obvious on a dark ground. */
a:focus-visible, button:focus-visible, .btn:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
    outline: 2px solid rgb(var(--signal));
    outline-offset: 2px;
}

#pre-loader { display: none !important; }

/* Numeric columns line up when the figures are tabular. */
.table td, .table th, .stat-value, .pagination { font-variant-numeric: tabular-nums; }

/* The uppercase micro-label: the one place tracking opens up. */
.eyebrow,
.table thead th,
.page-title .breadcrumb,
.card-header .label {
    font-size: 11px;
    font-weight: 650;
    letter-spacing: .14em;
    text-transform: uppercase;
}

/* ---------- Chrome: translucent, content scrolls under ---------------- */

.admin-header,
.navbar.admin-header {
    background: rgb(var(--ink) / .72);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--line);
    box-shadow: none;
    height: 64px;
}

.admin-header .navbar-brand-wrapper { background: transparent; }

.admin-header .nav-link,
.admin-header .top-nav {
    color: rgb(var(--dim));
    border-radius: var(--r-xs);
    transition: color var(--fast) var(--ease), background var(--fast) var(--ease);
}

.admin-header .nav-link:hover,
.admin-header .top-nav:hover { color: rgb(var(--fg)); background: rgb(var(--fg) / .06); }

.admin-header .search-box input.form-control {
    background: rgb(var(--fg) / .05);
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    color: rgb(var(--fg));
}

/* ---------- Sidebar: heavier material, it is structure ---------------- */

.side-menu-fixed,
.side-menu-fixed .scrollbar,
.sidebar, .left-sidebar, .side-menu-bg, .bg-sidebar {
    background: rgb(var(--surface)) !important;
    border-right: 1px solid var(--line);
}

.side-menu-fixed .side-menu li a,
.sidebar .side-menu li a,
.side-menu li a {
    color: rgb(var(--dim));
    border-radius: var(--r-xs);
    margin: 2px 10px;
    padding: 10px 12px;
    font-weight: 500;
    transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}

.side-menu li a:hover { background: rgb(var(--fg) / .06); color: rgb(var(--fg)); }

.side-menu li a.active,
.side-menu li.active > a {
    background: rgb(var(--signal) / .14);
    color: rgb(var(--signal));
    font-weight: 600;
}

.side-menu .sub-menu li a { font-size: 13px; padding-left: 34px; color: rgb(var(--faint)); }
.menu-title { color: rgb(var(--faint)) !important; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }

/* ---------- Page header ----------------------------------------------- */

.content-wrapper { background: transparent; }
.page-title { padding: 24px 0 8px; background: transparent; border: 0; }
.page-title h4 { font-size: 24px; font-weight: 650; letter-spacing: -.03em; color: rgb(var(--fg)); }

.breadcrumb { background: transparent; padding: 0; margin: 0; }
.breadcrumb-item a { color: rgb(var(--faint)); }
.breadcrumb-item.active { color: rgb(var(--dim)); }
.breadcrumb-item + .breadcrumb-item::before { color: rgb(var(--faint)); }

/* ---------- Cards ------------------------------------------------------ */

.card, .card-statistics {
    background: rgb(var(--surface));
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: none;
    transition: border-color var(--base) var(--ease);
}

.card:hover { border-color: var(--line-strong); }

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--line);
    font-weight: 600;
    color: rgb(var(--fg));
    padding: 16px 20px;
    font-size: 14px;
    letter-spacing: -.01em;
}

.card-body { padding: 20px; }
.card-statistics h4 { font-size: 28px; font-weight: 650; color: rgb(var(--fg)); letter-spacing: -.03em; }

/* ---------- Tables ----------------------------------------------------- */

.table { color: rgb(var(--dim)); margin-bottom: 0; }

.table thead th,
.table thead tr th,
.table thead tr.table-info th,
.table thead th.alert-success,
.table thead th.table-info {
    background: transparent !important;
    color: rgb(var(--faint)) !important;
    border: 0;
    border-bottom: 1px solid var(--line) !important;
    padding: 12px 14px;
    white-space: nowrap;
}

.table tbody td {
    border-top: 1px solid rgb(var(--fg) / .05);
    padding: 13px 14px;
    vertical-align: middle;
    color: rgb(var(--dim));
}

.table tbody tr { transition: background var(--fast) var(--ease); }
.table tbody tr:hover { background: rgb(var(--fg) / .035); }
.table tbody tr:hover td { color: rgb(var(--fg)); }

.table-bordered, .table-bordered td, .table-bordered th { border-color: rgb(var(--fg) / .06); }
.table-responsive { border-radius: var(--r-sm); }
.table a { color: rgb(var(--fg)); }
.table a:hover { color: rgb(var(--signal)); }

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    background: rgb(var(--raised));
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    padding: 5px 12px;
    color: rgb(var(--fg));
}

.dataTables_wrapper, .dataTables_info, .dataTables_length, .dataTables_filter { color: rgb(var(--faint)); }

.dataTables_wrapper .dataTables_paginate .paginate_button { color: rgb(var(--dim)) !important; }
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: rgb(var(--signal) / .15) !important;
    border-color: transparent !important;
    color: rgb(var(--signal)) !important;
    border-radius: var(--r-xs);
}

/* ---------- Forms ------------------------------------------------------ */

label, .control-label {
    font-weight: 600;
    font-size: 12.5px;
    color: rgb(var(--dim));
    margin-bottom: 7px;
    letter-spacing: .01em;
}

.form-control, .custom-select,
select.form-control, textarea.form-control, input.form-control {
    background: rgb(var(--raised));
    border: 1px solid var(--line);
    border-radius: var(--r-xs);
    color: rgb(var(--fg));
    padding: 10px 13px;
    height: auto;
    font-size: 14px;
    font-family: var(--sans);
    transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease), background var(--fast) var(--ease);
}

.form-control:focus, .custom-select:focus {
    background: rgb(var(--raised));
    border-color: rgb(var(--signal) / .7);
    box-shadow: 0 0 0 3px rgb(var(--signal) / .18);
    color: rgb(var(--fg));
}

.form-control::placeholder { color: rgb(var(--faint)); }
.form-control:disabled, .form-control[readonly] { background: rgb(var(--fg) / .04); color: rgb(var(--faint)); }
.custom-select option, select option { background: rgb(var(--surface)); color: rgb(var(--fg)); }

.form-control.is-invalid, .is-invalid .form-control { border-color: rgb(var(--stop) / .8); }
.invalid-feedback, .text-danger { color: rgb(var(--stop)) !important; }
.form-text, .text-muted { color: rgb(var(--faint)) !important; }
.text-dark { color: rgb(var(--fg)) !important; }
.text-white { color: rgb(var(--fg)) !important; }
.text-secondary { color: rgb(var(--dim)) !important; }
.bg-white { background: rgb(var(--surface)) !important; }

/* ---------- Buttons: feedback on press, not release -------------------- */

.btn {
    border-radius: var(--r-xs);
    font-weight: 600;
    font-size: 13.5px;
    padding: 9px 18px;
    border: 1px solid transparent;
    letter-spacing: -.005em;
    transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}

.btn:active { transform: scale(.975); }
.btn-sm { padding: 6px 13px; font-size: 12.5px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }

.btn-primary {
    background: rgb(var(--signal));
    border-color: rgb(var(--signal));
    color: rgb(var(--ink));
}
.btn-primary:hover, .btn-primary:focus {
    background: rgb(var(--signal) / .88);
    border-color: rgb(var(--signal) / .88);
    color: rgb(var(--ink));
}

.btn-success  { background: rgb(var(--go) / .15);     color: rgb(var(--go)); }
.btn-success:hover  { background: rgb(var(--go) / .24);     color: rgb(var(--go)); }
.btn-danger   { background: rgb(var(--stop) / .15);   color: rgb(var(--stop)); }
.btn-danger:hover   { background: rgb(var(--stop) / .24);   color: rgb(var(--stop)); }
.btn-warning  { background: rgb(var(--warn) / .15);   color: rgb(var(--warn)); }
.btn-warning:hover  { background: rgb(var(--warn) / .24);   color: rgb(var(--warn)); }
.btn-info, .btn-secondary { background: rgb(var(--fg) / .08); color: rgb(var(--fg)); }
.btn-info:hover, .btn-secondary:hover { background: rgb(var(--fg) / .14); color: rgb(var(--fg)); }

.btn-outline-info    { border-color: rgb(var(--signal) / .4); color: rgb(var(--signal)); background: transparent; }
.btn-outline-info:hover { background: rgb(var(--signal) / .12); color: rgb(var(--signal)); }
.btn-outline-danger  { border-color: rgb(var(--stop) / .4); color: rgb(var(--stop)); background: transparent; }
.btn-outline-danger:hover { background: rgb(var(--stop) / .12); color: rgb(var(--stop)); }
.btn-outline-success { border-color: rgb(var(--go) / .4); color: rgb(var(--go)); background: transparent; }
.btn-outline-success:hover { background: rgb(var(--go) / .12); color: rgb(var(--go)); }

.btn-link { color: rgb(var(--signal)); font-weight: 600; }
.dropdown-toggle::after { margin-left: .4em; opacity: .5; }

/* ---------- Badges, alerts, toasts ------------------------------------- */

.badge {
    border-radius: var(--r-pill);
    font-weight: 600;
    padding: 5px 11px;
    font-size: 11.5px;
    letter-spacing: .01em;
}

.badge-success { background: rgb(var(--go) / .16);     color: rgb(var(--go)); }
.badge-danger  { background: rgb(var(--stop) / .16);   color: rgb(var(--stop)); }
.badge-warning { background: rgb(var(--warn) / .16);   color: rgb(var(--warn)); }
.badge-primary, .badge-info { background: rgb(var(--signal) / .16); color: rgb(var(--signal)); }

.alert {
    border: 1px solid transparent;
    border-radius: var(--r-sm);
    padding: 13px 16px;
    font-size: 13.5px;
}

.alert-danger  { background: rgb(var(--stop) / .1);   border-color: rgb(var(--stop) / .25);   color: rgb(var(--stop)); }
.alert-success { background: rgb(var(--go) / .1);     border-color: rgb(var(--go) / .25);     color: rgb(var(--go)); }
.alert-warning { background: rgb(var(--warn) / .1);   border-color: rgb(var(--warn) / .25);   color: rgb(var(--warn)); }
.alert-info    { background: rgb(var(--signal) / .1); border-color: rgb(var(--signal) / .25); color: rgb(var(--signal)); }
.alert a { color: inherit; font-weight: 650; }

#toast-container > div {
    border-radius: var(--r-sm) !important;
    box-shadow: var(--shadow) !important;
    opacity: 1 !important;
    font-family: var(--sans);
    background-image: none !important;
}

/* ---------- Modals: dim to focus, materialise on enter ----------------- */

.modal-backdrop { background: rgb(var(--ink)); }
.modal-backdrop.show { opacity: .72; }

.modal-content {
    background: rgb(var(--surface));
    border: 1px solid var(--line-strong);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    color: rgb(var(--dim));
}

.modal-header { border-bottom: 1px solid var(--line); padding: 18px 22px; }
.modal-title { font-size: 17px; font-weight: 650; color: rgb(var(--fg)); letter-spacing: -.02em; }
.modal-body { padding: 22px; }
.modal-footer { border-top: 1px solid var(--line); padding: 14px 22px; }
.close { color: rgb(var(--dim)); opacity: .75; text-shadow: none; }
.close:hover { color: rgb(var(--fg)); opacity: 1; }

/* The surface arrives as a material: blur and scale together, not a fade. */
.modal.fade .modal-dialog {
    transform: scale(.97) translateY(8px);
    transition: transform var(--base) var(--ease);
}
.modal.show .modal-dialog { transform: none; }

.dropdown-menu {
    background: rgb(var(--surface) / .92);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-sm);
    box-shadow: var(--shadow);
    padding: 6px;
}

.dropdown-item { border-radius: var(--r-xs); padding: 8px 12px; font-size: 13.5px; color: rgb(var(--dim)); }
.dropdown-item:hover { background: rgb(var(--fg) / .07); color: rgb(var(--fg)); }
.dropdown-header { color: rgb(var(--faint)); }
.dropdown-divider { border-color: var(--line); }

/* ---------- Pagination -------------------------------------------------- */

.pagination { margin: 0; gap: 4px; }

.page-link {
    background: transparent;
    border: 1px solid var(--line);
    border-radius: var(--r-xs);
    color: rgb(var(--dim));
    padding: 7px 13px;
    font-size: 13.5px;
}

.page-link:hover { background: rgb(var(--fg) / .06); color: rgb(var(--fg)); border-color: var(--line-strong); }
.page-item.active .page-link { background: rgb(var(--signal)); border-color: rgb(var(--signal)); color: rgb(var(--ink)); }
.page-item.disabled .page-link { color: rgb(var(--faint)); background: transparent; }

/* ---------- Footer ------------------------------------------------------ */

footer, footer.bg-white {
    background: transparent !important;
    border-top: 1px solid var(--line);
    color: rgb(var(--faint));
    font-size: 12.5px;
}
footer a { color: rgb(var(--dim)); }
footer a:hover { color: rgb(var(--fg)); }

/* ---------- App brand ---------------------------------------------------- */

.app-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 18px;
    height: 64px;
    font-size: 15px;
    font-weight: 650;
    color: rgb(var(--fg)) !important;
    letter-spacing: -.02em;
    white-space: nowrap;
    overflow: hidden;
}

.app-brand-mark {
    width: 30px; height: 30px; flex: none;
    border-radius: var(--r-xs);
    background: rgb(var(--signal) / .16);
    color: rgb(var(--signal));
    display: grid; place-items: center;
    font-family: var(--mono);
    font-weight: 700; font-size: 13px;
    border: 1px solid rgb(var(--signal) / .25);
}

.app-brand-img { max-height: 32px; max-width: 128px; object-fit: contain; }
.app-brand-name { overflow: hidden; text-overflow: ellipsis; max-width: 170px; }

@media (max-width: 991px) {
    .app-brand-name { display: none; }
    .app-brand { padding: 0 12px; }
}

/* Section headings inside the multi-part student and parent forms. */
.section-heading {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgb(var(--signal));
    padding-bottom: 8px;
    border-bottom: 1px solid rgb(var(--signal) / .25);
    display: inline-block;
}

/* Portal stat values. */
.stat-clay  { color: rgb(var(--signal)); }
.stat-sage  { color: rgb(var(--go)); }
.stat-sky   { color: rgb(var(--signal)); }
.stat-ochre { color: rgb(var(--warn)); }

/* =========================================================================
   Public pages (landing, sign-in, legal)
   ========================================================================= */

.pub {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: rgb(var(--ink));
    color: rgb(var(--dim));
    font-family: var(--sans);
    position: relative;
    overflow-x: hidden;
}

/* Signal bleeding in from the edges, the way the portfolio lights its ground. */
.pub::before {
    content: '';
    position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background:
        radial-gradient(48rem 32rem at 12% -8%, rgb(var(--signal) / .16) 0%, transparent 62%),
        radial-gradient(40rem 28rem at 92% 106%, rgb(var(--go) / .07) 0%, transparent 60%);
}

/* A faint dot grid: technical, and it gives the dark ground some tooth. */
.pub::after {
    content: '';
    position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background-image: radial-gradient(rgb(var(--fg) / .055) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(70% 60% at 50% 40%, #000 0%, transparent 100%);
    -webkit-mask-image: radial-gradient(70% 60% at 50% 40%, #000 0%, transparent 100%);
}

.pub > * { position: relative; z-index: 1; }

.pub-header { padding: 24px 32px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.pub-brand {
    display: inline-flex; align-items: center; gap: 11px;
    font-size: 15.5px; font-weight: 650;
    color: rgb(var(--fg)); letter-spacing: -.02em;
}
.pub-brand:hover { color: rgb(var(--fg)); }

.pub-brand-mark {
    width: 32px; height: 32px;
    border-radius: var(--r-xs);
    background: rgb(var(--signal) / .16);
    border: 1px solid rgb(var(--signal) / .25);
    color: rgb(var(--signal));
    display: grid; place-items: center;
    font-family: var(--mono); font-weight: 700; font-size: 13px;
}

.pub-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px 20px 64px; }

.pub-footer { padding: 24px 32px 32px; text-align: center; font-size: 12.5px; color: rgb(var(--faint)); }
.pub-footer nav { margin-bottom: 6px; }
.pub-footer a { color: rgb(var(--dim)); margin: 0 10px; font-weight: 500; }
.pub-footer a:hover { color: rgb(var(--fg)); }

/* ---------- Entrance ---------------------------------------------------- */

@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.rise { animation: rise .5s var(--ease) both; }
.rise-1 { animation-delay: .05s; } .rise-2 { animation-delay: .1s; }
.rise-3 { animation-delay: .15s; } .rise-4 { animation-delay: .2s; }

/* ---------- Decorative canvas panel ------------------------------------- */

.canvas-panel {
    position: relative; overflow: hidden;
    background: linear-gradient(165deg, rgb(var(--signal) / .1) 0%, rgb(var(--surface)) 55%, rgb(var(--go) / .05) 100%);
    border-right: 1px solid var(--line);
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 40px 38px;
    isolation: isolate;
}

.canvas-motif { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .9; }

.canvas-kicker {
    font-family: var(--mono);
    font-size: 11px; font-weight: 600;
    letter-spacing: .14em; text-transform: uppercase;
    color: rgb(var(--signal));
}

.canvas-title {
    font-size: 29px; line-height: 1.15; font-weight: 650;
    color: rgb(var(--fg)); letter-spacing: -.035em;
    margin: 14px 0 12px;
}

.canvas-copy { font-size: 14px; line-height: 1.65; color: rgb(var(--dim)); max-width: 32ch; margin: 0; }

.canvas-points { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-direction: column; gap: 10px; }
.canvas-points li { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 500; color: rgb(var(--dim)); }

.canvas-points .dot {
    width: 26px; height: 26px; flex: none;
    border-radius: var(--r-xs);
    display: grid; place-items: center;
    background: rgb(var(--fg) / .06);
    border: 1px solid var(--line);
    color: rgb(var(--signal));
}
.canvas-points .dot svg { width: 14px; height: 14px; }
.canvas-points li:nth-child(2) .dot { color: rgb(var(--go)); }
.canvas-points li:nth-child(3) .dot { color: rgb(var(--warn)); }

/* ---------- Sign in ------------------------------------------------------ */

.auth-shell {
    width: 100%; max-width: 900px;
    display: grid; grid-template-columns: 1.02fr 1fr;
    background: rgb(var(--surface) / .82);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    backdrop-filter: blur(24px) saturate(160%);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.auth-form-side { padding: 42px 42px 36px; }

.auth-badge {
    display: inline-flex; align-items: center; gap: 7px;
    font-family: var(--mono);
    font-size: 11px; font-weight: 600;
    letter-spacing: .1em; text-transform: uppercase;
    padding: 6px 12px; border-radius: var(--r-pill);
    margin-bottom: 20px;
    background: rgb(var(--signal) / .14); color: rgb(var(--signal));
    border: 1px solid rgb(var(--signal) / .22);
}
.auth-badge svg { width: 14px; height: 14px; }
.auth-badge[data-role='parent']  { background: rgb(var(--go) / .14);   color: rgb(var(--go));   border-color: rgb(var(--go) / .22); }
.auth-badge[data-role='teacher'] { background: rgb(var(--warn) / .14); color: rgb(var(--warn)); border-color: rgb(var(--warn) / .22); }

.auth-title { font-size: 30px; font-weight: 650; color: rgb(var(--fg)); margin: 0 0 7px; letter-spacing: -.035em; }
.auth-sub { font-size: 14px; color: rgb(var(--dim)); margin-bottom: 28px; }

.field { margin-bottom: 18px; }
.field label {
    display: block; font-size: 11px; font-weight: 650;
    letter-spacing: .12em; text-transform: uppercase;
    color: rgb(var(--faint)); margin-bottom: 8px;
}

.field input[type='email'], .field input[type='password'], .field input[type='text'] {
    width: 100%;
    background: rgb(var(--ink) / .6);
    border: 1px solid var(--line);
    border-radius: var(--r-xs);
    padding: 12px 14px;
    font-size: 14.5px; font-family: var(--sans);
    color: rgb(var(--fg));
    transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}

.field input:focus {
    outline: none;
    border-color: rgb(var(--signal) / .7);
    box-shadow: 0 0 0 3px rgb(var(--signal) / .18);
}
.field input::placeholder { color: rgb(var(--faint)); }
.field input.has-error { border-color: rgb(var(--stop) / .7); }
.field input.has-error:focus { box-shadow: 0 0 0 3px rgb(var(--stop) / .18); }
.field-error { display: block; margin-top: 7px; font-size: 12.5px; color: rgb(var(--stop)); font-weight: 550; }

.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 24px; font-size: 13.5px; }
.auth-remember { display: inline-flex; align-items: center; gap: 8px; color: rgb(var(--dim)); font-weight: 500; cursor: pointer; }
.auth-remember input { width: 15px; height: 15px; accent-color: rgb(var(--signal)); cursor: pointer; }

.btn-auth {
    width: 100%; border: 0;
    border-radius: var(--r-xs);
    background: rgb(var(--signal));
    color: rgb(var(--ink));
    font-family: var(--sans); font-weight: 650; font-size: 15px;
    padding: 13px 18px; cursor: pointer;
    letter-spacing: -.01em;
    transition: background var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.btn-auth:hover { background: rgb(var(--signal) / .88); }
.btn-auth:active { transform: scale(.985); }

.auth-back { display: block; text-align: center; margin-top: 22px; font-size: 13.5px; color: rgb(var(--faint)); font-weight: 500; }
.auth-back:hover { color: rgb(var(--signal)); }

.auth-alert {
    background: rgb(var(--stop) / .1);
    border: 1px solid rgb(var(--stop) / .25);
    color: rgb(var(--stop));
    border-radius: var(--r-xs);
    padding: 11px 14px; font-size: 13.5px; font-weight: 550; margin-bottom: 20px;
}

/* ---------- Landing / role picker ---------------------------------------- */

.pub-hero { width: 100%; max-width: 1000px; text-align: center; }

.pub-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--mono);
    font-size: 11px; font-weight: 600;
    letter-spacing: .14em; text-transform: uppercase;
    color: rgb(var(--signal));
    background: rgb(var(--signal) / .09);
    border: 1px solid rgb(var(--signal) / .2);
    padding: 7px 15px; border-radius: var(--r-pill);
    margin-bottom: 26px;
}
.pub-eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: rgb(var(--go)); }

.pub-title {
    font-size: clamp(2.4rem, 6vw, 4.2rem);
    line-height: 1.05; font-weight: 650;
    color: rgb(var(--fg));
    letter-spacing: -.045em;
    margin: 0 0 18px;
}
.pub-title em { font-style: normal; color: rgb(var(--signal)); }

.pub-lede { font-size: 16px; color: rgb(var(--dim)); max-width: 48ch; margin: 0 auto 46px; line-height: 1.65; }

.role-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; max-width: 900px; margin: 0 auto; }

.role-card {
    position: relative;
    display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
    padding: 24px 20px 20px;
    background: rgb(var(--surface) / .7);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    color: rgb(var(--fg));
    text-align: left; overflow: hidden;
    transition: transform var(--base) var(--ease), border-color var(--base) var(--ease), background var(--base) var(--ease);
}

.role-card:hover, .role-card:focus-visible {
    transform: translateY(-4px);
    border-color: rgb(var(--signal) / .4);
    background: rgb(var(--surface) / .92);
    color: rgb(var(--fg));
}
.role-card:active { transform: translateY(-2px) scale(.99); }

/* The numeric index: the portfolio's 01-04 motif. */
.role-card::after {
    content: attr(data-index);
    position: absolute; top: 18px; right: 18px;
    font-family: var(--mono); font-size: 11px;
    color: rgb(var(--faint));
    letter-spacing: .06em;
}

.role-icon {
    width: 46px; height: 46px;
    border-radius: var(--r-sm);
    display: grid; place-items: center;
    background: rgb(var(--fg) / .06);
    border: 1px solid var(--line);
    transition: background var(--base) var(--ease), border-color var(--base) var(--ease);
}
.role-icon svg { width: 23px; height: 23px; }

.role-card[data-role='student'] .role-icon { color: rgb(var(--signal)); }
.role-card[data-role='parent']  .role-icon { color: rgb(var(--go)); }
.role-card[data-role='teacher'] .role-icon { color: rgb(var(--warn)); }
.role-card[data-role='admin']   .role-icon { color: rgb(var(--fg)); }
.role-card:hover .role-icon { background: rgb(var(--fg) / .1); border-color: var(--line-strong); }

.role-name { font-size: 15px; font-weight: 650; letter-spacing: -.015em; color: rgb(var(--fg)); }
.role-hint { font-size: 12.5px; font-weight: 450; color: rgb(var(--faint)); line-height: 1.5; }

.role-go {
    margin-top: auto; padding-top: 14px;
    font-family: var(--mono); font-size: 11px; font-weight: 600;
    letter-spacing: .08em; text-transform: uppercase;
    color: rgb(var(--signal));
    display: inline-flex; align-items: center; gap: 6px;
    opacity: 0; transform: translateX(-4px);
    transition: opacity var(--base) var(--ease), transform var(--base) var(--ease);
}
.role-card:hover .role-go { opacity: 1; transform: none; }

/* ---------- Legal pages --------------------------------------------------- */

.legal {
    width: 100%; max-width: 760px;
    background: rgb(var(--surface) / .7);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 50px 54px 54px;
}

.legal h1 { font-size: 36px; font-weight: 650; letter-spacing: -.04em; margin: 0 0 10px; color: rgb(var(--fg)); }
.legal .legal-meta {
    font-family: var(--mono); font-size: 11.5px;
    color: rgb(var(--faint)); letter-spacing: .04em;
    padding-bottom: 26px; margin-bottom: 30px; border-bottom: 1px solid var(--line);
}
.legal h2 { font-size: 19px; font-weight: 650; margin: 36px 0 10px; color: rgb(var(--fg)); letter-spacing: -.025em; scroll-margin-top: 20px; }
.legal p, .legal li { font-size: 15px; line-height: 1.75; color: rgb(var(--dim)); }
.legal ul { padding-left: 20px; margin-bottom: 14px; }
.legal li { margin-bottom: 8px; }
.legal li::marker { color: rgb(var(--faint)); }
.legal strong { color: rgb(var(--fg)); font-weight: 650; }
.legal a { color: rgb(var(--signal)); font-weight: 550; }

.legal-toc { background: rgb(var(--fg) / .04); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 20px 26px; margin-bottom: 8px; }
.legal-toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 28px; }
.legal-toc li { font-size: 13.5px; margin-bottom: 5px; break-inside: avoid; }
.legal-toc a { color: rgb(var(--dim)); font-weight: 450; }
.legal-toc a:hover { color: rgb(var(--signal)); }

/* ---------- Responsive ----------------------------------------------------- */

@media (max-width: 880px) {
    .auth-shell { grid-template-columns: 1fr; max-width: 460px; }
    .canvas-panel { padding: 28px 30px; border-right: 0; border-bottom: 1px solid var(--line); }
    .canvas-title { font-size: 23px; }
    .canvas-points { flex-direction: row; flex-wrap: wrap; gap: 8px 18px; margin-top: 20px; }
    .auth-form-side { padding: 32px 30px 28px; }
    .role-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .legal { padding: 32px 24px 38px; border-radius: var(--r-md); }
    .legal h1 { font-size: 28px; }
    .legal-toc ol { columns: 1; }
}

@media (max-width: 460px) {
    .role-grid { grid-template-columns: 1fr; }
    .pub-header { padding: 18px 20px; }
    .canvas-points { display: none; }
}

/* ---------- Accessibility preferences --------------------------------------
   Reduced motion means a gentler equivalent, not the loss of feedback;
   reduced transparency means frostier, more solid surfaces; more contrast
   means defined borders and near-solid grounds.
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
    .role-card:hover, .btn:active, .btn-auth:active { transform: none !important; }
}

@media (prefers-reduced-transparency: reduce) {
    .admin-header, .dropdown-menu, .auth-shell, .role-card, .legal {
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        background: rgb(var(--surface));
    }
    .admin-header { background: rgb(var(--ink)); }
    .pub::after { display: none; }
}

@media (prefers-contrast: more) {
    :root { --line: rgb(var(--fg) / .28); --line-strong: rgb(var(--fg) / .45); }
    body { color: rgb(var(--fg)); }
    .table tbody td, p, .role-hint, .legal p, .legal li { color: rgb(var(--fg)); }
    .text-muted, .form-text { color: rgb(var(--dim)) !important; }
    .card, .modal-content, .auth-shell, .role-card { background: rgb(var(--ink)); }
}

/* ---------- Guided setup ------------------------------------------------- */

.setup-card { border-color: rgb(var(--signal) / .25); background: rgb(var(--surface)); }
.setup-intro { font-size: 13px; color: rgb(var(--dim)); max-width: 62ch; }
.setup-count { font-family: var(--mono); letter-spacing: .04em; white-space: nowrap; }

.setup-bar {
    height: 4px; border-radius: var(--r-pill);
    background: rgb(var(--fg) / .08);
    margin: 16px 0 20px; overflow: hidden;
}
.setup-bar span {
    display: block; height: 100%;
    background: rgb(var(--signal));
    border-radius: var(--r-pill);
    transition: width var(--base) var(--ease);
}

.setup-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }

.setup-step {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: rgb(var(--fg) / .02);
}

.setup-step.is-next { border-color: rgb(var(--signal) / .4); background: rgb(var(--signal) / .06); }
.setup-step.is-blocked { opacity: .5; }

.setup-index {
    width: 28px; height: 28px; flex: none;
    border-radius: var(--r-xs);
    display: grid; place-items: center;
    font-family: var(--mono); font-size: 11.5px; font-weight: 600;
    background: rgb(var(--fg) / .06);
    color: rgb(var(--faint));
    border: 1px solid var(--line);
}
.setup-step.is-next .setup-index { background: rgb(var(--signal) / .16); color: rgb(var(--signal)); border-color: rgb(var(--signal) / .3); }
.setup-step.is-done .setup-index { background: rgb(var(--go) / .16); color: rgb(var(--go)); border-color: rgb(var(--go) / .3); }

.setup-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.setup-name { font-size: 13.5px; font-weight: 600; color: rgb(var(--fg)); }
.setup-step.is-done .setup-name { color: rgb(var(--dim)); }
.setup-hint { font-size: 12px; color: rgb(var(--faint)); }

.setup-action { flex: none; }
.setup-done { font-family: var(--mono); font-size: 11.5px; color: rgb(var(--go)); letter-spacing: .04em; }

@media (max-width: 560px) {
    .setup-step { flex-wrap: wrap; }
    .setup-action { margin-left: 42px; }
}

/* ---------- Empty states --------------------------------------------------- */

.empty-row td { border-top: 0 !important; }

.empty-state {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    padding: 44px 20px;
    text-align: center;
}

.empty-mark {
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border-radius: var(--r-sm);
    background: rgb(var(--fg) / .05);
    border: 1px solid var(--line);
    color: rgb(var(--faint));
    font-family: var(--mono);
}

.empty-message { margin: 0; font-size: 13.5px; color: rgb(var(--faint)); max-width: 44ch; }

/* ---------- Command palette ------------------------------------------------ */

.cmdk-trigger {
    display: inline-flex; align-items: center; gap: 8px;
    margin-left: 14px; padding: 6px 10px 6px 12px;
    background: rgb(var(--fg) / .05);
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    color: rgb(var(--faint));
    font-family: var(--sans); font-size: 12.5px;
    cursor: pointer;
    transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.cmdk-trigger:hover { background: rgb(var(--fg) / .09); border-color: var(--line-strong); color: rgb(var(--dim)); }
.cmdk-trigger svg { width: 14px; height: 14px; }
.cmdk-trigger kbd {
    font-family: var(--mono); font-size: 10.5px;
    background: rgb(var(--fg) / .08);
    border: 1px solid var(--line);
    border-radius: 5px; padding: 1px 5px;
    color: rgb(var(--faint));
}

@media (max-width: 767px) { .cmdk-trigger span, .cmdk-trigger kbd { display: none; } }

.cmdk { position: fixed; inset: 0; z-index: 1080; display: grid; place-items: start center; padding-top: 12vh; }
.cmdk[hidden] { display: none; }

.cmdk-scrim {
    position: absolute; inset: 0;
    background: rgb(var(--ink) / .72);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.cmdk-panel {
    position: relative;
    width: min(560px, calc(100vw - 32px));
    background: rgb(var(--surface) / .96);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: cmdk-in .18s var(--ease) both;
}

@keyframes cmdk-in { from { opacity: 0; transform: scale(.97) translateY(-6px); } to { opacity: 1; transform: none; } }

.cmdk-input-row { display: flex; align-items: center; gap: 11px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.cmdk-input-row svg { width: 17px; height: 17px; color: rgb(var(--faint)); flex: none; }
.cmdk-input-row kbd {
    font-family: var(--mono); font-size: 10.5px;
    background: rgb(var(--fg) / .07); border: 1px solid var(--line);
    border-radius: 5px; padding: 2px 6px; color: rgb(var(--faint));
}

#cmdk-input {
    flex: 1; background: none; border: 0; outline: none;
    color: rgb(var(--fg)); font-family: var(--sans); font-size: 15.5px;
    letter-spacing: -.01em;
}
#cmdk-input::placeholder { color: rgb(var(--faint)); }

.cmdk-list { list-style: none; margin: 0; padding: 8px; max-height: 46vh; overflow-y: auto; }

.cmdk-item {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 12px; border-radius: var(--r-xs);
    cursor: pointer; font-size: 14px;
    color: rgb(var(--dim));
}
.cmdk-item.is-active { background: rgb(var(--signal) / .14); color: rgb(var(--fg)); }
.cmdk-label { font-weight: 500; }
.cmdk-group { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: rgb(var(--faint)); flex: none; }
.cmdk-item.is-active .cmdk-group { color: rgb(var(--signal)); }

.cmdk-empty { padding: 28px 18px; text-align: center; color: rgb(var(--faint)); font-size: 13.5px; margin: 0; }

.cmdk-foot {
    display: flex; gap: 18px; padding: 10px 18px;
    border-top: 1px solid var(--line);
    font-size: 11.5px; color: rgb(var(--faint));
}
.cmdk-foot kbd {
    font-family: var(--mono); font-size: 10px;
    background: rgb(var(--fg) / .07); border: 1px solid var(--line);
    border-radius: 4px; padding: 1px 5px; margin-right: 3px; color: rgb(var(--faint));
}

@media (prefers-reduced-motion: reduce) { .cmdk-panel { animation: none; } }

.cmdk-heading {
    padding: 10px 12px 4px;
    font-family: var(--mono); font-size: 10px; font-weight: 600;
    letter-spacing: .14em; text-transform: uppercase;
    color: rgb(var(--faint));
}

/* ---------- Teacher: today's registers ------------------------------------ */

.register-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }

.register-card {
    display: flex; flex-direction: column; gap: 8px;
    padding: 18px 18px 16px;
    background: rgb(var(--surface));
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    color: rgb(var(--fg));
    transition: border-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.register-card:hover { border-color: rgb(var(--signal) / .45); color: rgb(var(--fg)); transform: translateY(-2px); }
.register-card:active { transform: none; }
.register-card.is-pending { border-color: rgb(var(--warn) / .35); }

.register-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.register-card-name { font-size: 18px; font-weight: 650; letter-spacing: -.02em; }
.register-card-status { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: rgb(var(--signal)); white-space: nowrap; }
.register-card-meta { font-size: 12.5px; color: rgb(var(--faint)); }
.register-card-result { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: rgb(var(--dim)); font-variant-numeric: tabular-nums; }

.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot-go { background: rgb(var(--go)); box-shadow: 0 0 0 3px rgb(var(--go) / .18); }
.dot-warn { background: rgb(var(--warn)); box-shadow: 0 0 0 3px rgb(var(--warn) / .18); }

/* ---------- Teacher: the register itself ----------------------------------- */

.register-toolbar { display: flex; justify-content: flex-end; margin-bottom: 10px; }

.register-list { list-style: none; margin: 0 0 92px; padding: 0; display: flex; flex-direction: column; gap: 6px; }

/* The real control is a checkbox; the row is its label, so the whole row is the
   tap target. Visually hidden, still focusable and announced. */
.register-toggle { position: absolute; width: 1px; height: 1px; margin: -1px; opacity: 0; pointer-events: none; }

.register-row {
    display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px;
    min-height: 60px; padding: 10px 12px 10px 14px; margin: 0;
    background: rgb(var(--surface));
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    cursor: pointer; user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease), transform 80ms var(--ease);
}
.register-row:active { transform: scale(.995); }
.register-toggle:focus-visible + .register-row { outline: 2px solid rgb(var(--signal)); outline-offset: 2px; }

.register-index { font-family: var(--mono); font-size: 11.5px; color: rgb(var(--faint)); letter-spacing: .04em; }
.register-name { font-size: 15.5px; font-weight: 550; color: rgb(var(--fg)); letter-spacing: -.01em; }

/* Segmented pill: shows the current state and flips on tap. */
.register-pill {
    display: inline-grid; grid-template-columns: 1fr 1fr;
    background: rgb(var(--fg) / .06); border: 1px solid var(--line);
    border-radius: var(--r-pill); padding: 3px;
    font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
}
.register-pill span { padding: 6px 12px; border-radius: var(--r-pill); color: rgb(var(--faint)); transition: background var(--fast) var(--ease), color var(--fast) var(--ease); }
.register-toggle:not(:checked) + .register-row .pill-present { background: rgb(var(--go) / .18); color: rgb(var(--go)); }
.register-toggle:checked + .register-row .pill-absent { background: rgb(var(--stop) / .2); color: rgb(var(--stop)); }
.register-toggle:checked + .register-row { border-color: rgb(var(--stop) / .4); background: rgb(var(--stop) / .05); }
.register-toggle:checked + .register-row .register-name { color: rgb(var(--stop)); }

/* Sticky save bar: counts and the one action, always within thumb reach. */
.register-bar {
    position: sticky; bottom: 0; z-index: 5;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    margin: 0 -4px; padding: 14px 18px;
    background: rgb(var(--ink) / .82);
    -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
    border-top: 1px solid var(--line);
}
.register-count { font-size: 14px; color: rgb(var(--dim)); font-variant-numeric: tabular-nums; }
.register-count strong { color: rgb(var(--fg)); font-weight: 650; }
.register-bar .btn { padding: 12px 22px; font-size: 15px; }

@media (max-width: 560px) {
    .register-row { grid-template-columns: 1fr auto; padding-left: 14px; }
    .register-index { display: none; }
    .register-bar { margin: 0 -15px; }
}
@media (prefers-reduced-transparency: reduce) { .register-bar { background: rgb(var(--ink)); backdrop-filter: none; } }

/* ---------- Student 360 --------------------------------------------------- */

.s360-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.s360-facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; margin: 0; font-size: 13.5px; }
.s360-facts dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: rgb(var(--faint)); padding-top: 3px; }
.s360-facts dd { margin: 0; color: rgb(var(--fg)); }
.s360-tel { font-family: var(--mono); font-size: 13px; color: rgb(var(--signal)); }
.s360-balance { font-size: 13px; color: rgb(var(--dim)); font-variant-numeric: tabular-nums; }
.s360-balance strong { color: rgb(var(--fg)); }
.s360-balance.is-owed strong { color: rgb(var(--warn)); }
.s360-days { display: flex; flex-wrap: wrap; gap: 6px; }
.s360-day { width: 34px; height: 34px; display: grid; place-items: center; border-radius: var(--r-xs); font-family: var(--mono); font-size: 11.5px; border: 1px solid var(--line); color: rgb(var(--dim)); }
.s360-day.is-present { background: rgb(var(--go) / .14); color: rgb(var(--go)); border-color: rgb(var(--go) / .3); }
.s360-day.is-absent  { background: rgb(var(--stop) / .14); color: rgb(var(--stop)); border-color: rgb(var(--stop) / .3); }

/* ---------- Admin: needs attention ------------------------------------------ */

.attn-row {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 12px 20px; border-top: 1px solid rgb(var(--fg) / .05);
    color: rgb(var(--fg)); font-size: 14px;
    transition: background var(--fast) var(--ease);
}
.attn-row:first-child { border-top: 0; }
.attn-row:hover { background: rgb(var(--fg) / .035); color: rgb(var(--fg)); }
.attn-main { display: flex; flex-direction: column; gap: 2px; font-weight: 550; }
.attn-main small { font-size: 12px; color: rgb(var(--faint)); font-weight: 450; }
.attn-side { font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em; color: rgb(var(--signal)); white-space: nowrap; }
.attn-amount { color: rgb(var(--warn)); font-size: 13px; }
.attn-empty { margin: 0; padding: 18px 20px; font-size: 13px; color: rgb(var(--faint)); }

/* ---------- Sidebar: workflow groups and the collapsed rail ----------------- */

.side-menu .menu-title { padding: 18px 20px 6px !important; margin: 0 !important; }

/* The theme's toggle adds .slide-menu to collapse the sidebar to icons. Keep the
   groups' titles and labels out of the rail; the active tint still shows where
   you are. */
.slide-menu .side-menu-fixed .menu-title,
.slide-menu .side-menu-fixed .right-nav-text,
.slide-menu .side-menu-fixed .pull-right { display: none; }
.slide-menu .side-menu-fixed .side-menu li a { margin: 2px 8px; padding: 12px 0; text-align: center; }
.slide-menu .side-menu-fixed .side-menu li a i { margin: 0; font-size: 16px; }
.slide-menu .side-menu-fixed .collapse { display: none !important; }
