:root {
    --ng-bg: #07070c;
    --ng-sidebar: #0d0e15;
    --ng-panel: #11121a;
    --ng-panel-raised: #171822;
    --ng-panel-soft: #1d1e2a;
    --ng-border: #292a38;
    --ng-border-soft: #1d1e29;
    --ng-text: #f4f3f8;
    --ng-muted: #9293a4;
    --ng-subtle: #8a8b9d;
    --ng-violet: #8b5cf6;
    --ng-violet-bright: #a779ff;
    --ng-violet-soft: rgba(139, 92, 246, .16);
    --ng-green: #9be15d;
    --ng-yellow: #f5ce55;
    --ng-red: #ff6b7d;
}

* { box-sizing: border-box; }

* {
    scrollbar-color: #45465a #11121a;
    scrollbar-width: thin;
}

*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: #11121a; }
*::-webkit-scrollbar-thumb { background: #45465a; border: 2px solid #11121a; border-radius: 999px; }
::selection { color: white; background: #6841c7; }

body {
    margin: 0;
    color: var(--ng-text);
    background: var(--ng-bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}
body.light-theme { --ng-bg:#f3f5f9; --ng-sidebar:#fff; --ng-panel:#fff; --ng-panel-raised:#f8f9fc; --ng-panel-soft:#eef1f7; --ng-border:#cfd5e1; --ng-border-soft:#e1e5ed; --ng-text:#171b27; --ng-muted:#535d70; --ng-subtle:#68738a; --ng-violet:#7046d9; --ng-violet-bright:#5f38c7; --ng-green:#4f9f28; --ng-yellow:#a66d00; --ng-red:#d73e58; color-scheme:light; }
body.light-theme * { scrollbar-color:#aeb6c5 #f3f5f9; }
body.light-theme *::-webkit-scrollbar-track { background:#f3f5f9; }
body.light-theme *::-webkit-scrollbar-thumb { background:#aeb6c5; border-color:#f3f5f9; }
body.light-theme .platform-topbar,
body.light-theme .school-preview-header {
    background:rgba(255,255,255,.94);
    border-color:#dfe3ec;
    color:#1b2030;
}
body.light-theme .platform-topbar a,
body.light-theme .school-preview-header a { color:#1b2030; }
body.light-theme .school-preview-header .brand-lockup small { color:#66728a; }
body.light-theme .global-search { background:#fff; border-color:#bec6d6; }
body.light-theme .global-search input { color:#1b2030; }
body.light-theme .global-search input::placeholder { color:#6b7488; }
body.light-theme .global-search button { color:#fff; background:#7046d9; border-color:#7046d9; }
body.light-theme .environment-pill { color:#43506a; background:#fff; border-color:#bec6d6; }
body.light-theme .icon-button { color:#43506a; background:#fff; border-color:#bec6d6; }
body.light-theme .icon-button:hover { color:#2f1f69; background:#f0ebff; border-color:#a88cf0; }
body.light-theme .icon-button.active { color:#321d77; background:#f0ebff; border-color:#a88cf0; }
body.light-theme .secondary-button { color:#47318d; background:#f3efff; border-color:#c9b9fb; }
body.light-theme .secondary-button:hover { color:#321d77; background:#e9e1ff; border-color:#aa91ed; }
body.light-theme .field-group input, body.light-theme .field-group select, body.light-theme .field-group textarea, body.light-theme .field-control, body.light-theme .filter-bar input, body.light-theme .filter-bar select { background:#fff; color:#171b27; border-color:#c6cdda; }
body.light-theme .surface-card, body.light-theme .filter-bar, body.light-theme .auth-card { box-shadow:0 10px 26px rgba(26,34,52,.05); }
body.light-theme .app-table, body.light-theme .app-table th, body.light-theme .app-table td { color:#30394c; }
body.light-theme .app-table th { color:#536078; }
body.light-theme .app-table td { border-color:#e1e5ed; }
body.light-theme .app-table tbody tr:hover td { background:#f7f8fb; }
body.light-theme .status-badge { color:#354055; background:#f5f7fa; border-color:#d6dce7; }
body.light-theme .status-active { color:#286214; background:#edf8e9; border-color:#b9dfaf; }
body.light-theme .status-onboarding,
body.light-theme .status-trial { color:#54349f; background:#f3efff; border-color:#cfbef8; }
body.light-theme .status-suspended,
body.light-theme .status-closed { color:#9d243c; background:#fff0f3; border-color:#f3b8c4; }
body.light-theme .school-monogram { color:#4a2b9d; background:#f0eaff; border-color:#cdbbff; }
body.light-theme .school-cell strong { color:#222b3c; }
body.light-theme .user-avatar { color:#4a2b9d; background:#f0eaff; border-color:#cdbbff; }
body.light-theme .sidebar-user { border-color:#e1e5ed; }
body.light-theme .sidebar-link:hover { color:#32206e; background:#f5f1ff; border-color:#dfd2ff; }
body.light-theme .growth-chart { border-color:#d7dce6; background-image:linear-gradient(to bottom,transparent 24%,#e3e7ef 25%,transparent 26%,transparent 49%,#e3e7ef 50%,transparent 51%,transparent 74%,#e3e7ef 75%,transparent 76%); }
body.light-theme .growth-bar { border-color:#7f58dc; box-shadow:none; }
body.light-theme .status-ring::before { background:#fff; border-color:#d7dce6; }
body.light-theme .sidebar-link { color:#4d5870; }
body.light-theme .sidebar-link.active { color:#3f257d; }
body.light-theme .role-chip { background:var(--ng-panel-raised); border-color:var(--ng-border); }
body.light-theme .role-chip strong { color:var(--ng-text); }
body.light-theme .assignment-pill { background:var(--ng-panel-raised); border-color:var(--ng-border); }
body.light-theme .assignment-pill strong { color:var(--ng-text); }
body.light-theme .protected-action-list { color:var(--ng-muted); }
body.light-theme .inline-assignment-form select,
body.light-theme .inline-assignment-form input { color:var(--ng-text); background:var(--ng-panel); border-color:var(--ng-border); color-scheme:light; }
body.light-theme .revoke-control form { background:var(--ng-panel); border-color:var(--ng-border); box-shadow:0 14px 30px rgba(26,34,52,.13); }
body.light-theme .revoke-control input { color:var(--ng-text); background:var(--ng-panel-raised); border-color:var(--ng-border); }
body.light-theme .portal-header { background:rgba(255,255,255,.94); border-color:#dfe3ec; }
body.light-theme .portal-next-lesson { background:linear-gradient(135deg,#7046d9,#8d60e9); }
body.light-theme .portal-summary,
body.light-theme .portal-section { background:#fff; border-color:#dfe3ec; }
body.light-theme .portal-agenda > div { border-color:#e1e5ed; }
body.light-theme .portal-user { color:#354055; background:#f5f7fa; border-color:#d6dce7; }

.portal-body { min-height:100vh; background:radial-gradient(circle at 84% -8%,rgba(139,92,246,.17),transparent 30rem),var(--ng-bg); }
.portal-header { min-height:76px; display:flex; align-items:center; gap:28px; padding:12px clamp(18px,4vw,64px); border-bottom:1px solid var(--ng-border-soft); background:rgba(13,14,21,.9); backdrop-filter:blur(18px); }
.portal-header .brand-lockup { padding:0; min-width:230px; }
.portal-header .brand-lockup small { text-transform:uppercase; letter-spacing:.08em; font-size:.62rem; }
.portal-nav { display:flex; align-items:center; gap:4px; }
.portal-nav a { display:inline-flex; align-items:center; gap:7px; padding:8px 10px; color:var(--ng-muted); border:1px solid transparent; border-radius:8px; font-size:.78rem; text-decoration:none; }
.portal-nav a:hover,.portal-nav a.active { color:var(--ng-text); background:var(--ng-violet-soft); border-color:rgba(167,121,255,.34); }
.portal-actions { display:flex; align-items:center; gap:8px; margin-left:auto; }
.portal-user { display:flex; align-items:center; gap:8px; padding:4px 10px 4px 5px; color:var(--ng-text); background:var(--ng-panel-raised); border:1px solid var(--ng-border); border-radius:999px; font-size:.75rem; text-decoration:none; }
.portal-user:hover { color:var(--ng-text); border-color:rgba(167,121,255,.5); background:var(--ng-violet-soft); }
.portal-user > span { display:grid; width:25px; height:25px; place-items:center; color:#fff; background:var(--ng-violet); border-radius:50%; font-size:.68rem; font-weight:700; }
.portal-main { width:min(1180px,calc(100% - 36px)); margin:0 auto; padding:clamp(30px,6vw,68px) 0 56px; }
.portal-welcome { display:flex; align-items:flex-end; justify-content:space-between; gap:24px; margin-bottom:28px; }
.portal-welcome h1 { max-width:680px; margin:4px 0 8px; font-size:clamp(2rem,4vw,3.45rem); letter-spacing:-.04em; line-height:1; }
.portal-welcome p { max-width:620px; margin:0; color:var(--ng-muted); font-size:.92rem; line-height:1.6; }
.portal-welcome .portal-greeting { color:var(--ng-violet-bright); font-size:.78rem; font-weight:700; letter-spacing:.02em; }
.portal-date { display:inline-flex; align-items:center; gap:8px; flex:none; padding:9px 12px; color:var(--ng-text); background:var(--ng-panel-raised); border:1px solid var(--ng-border); border-radius:9px; font-size:.78rem; }
.portal-date i { color:var(--ng-violet-bright); }
.portal-hero-grid { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(320px,.9fr); gap:16px; margin-bottom:16px; }
.portal-next-lesson { display:grid; grid-template-columns:1fr auto; align-items:end; gap:8px 18px; padding:28px; color:#fff; background:linear-gradient(135deg,#6e49d8,#9a61f5); border:1px solid rgba(255,255,255,.22); border-radius:14px; box-shadow:0 18px 42px rgba(84,46,180,.22); }
.portal-next-lesson p { grid-column:1/-1; margin:0; font-size:.75rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; opacity:.8; }
.portal-next-lesson h2 { margin:0; font-size:clamp(1.25rem,2.3vw,1.85rem); letter-spacing:-.03em; }
.portal-next-lesson strong { justify-self:end; font-size:1.6rem; letter-spacing:-.04em; }
.portal-next-lesson span { grid-column:1/-1; color:rgba(255,255,255,.78); font-size:.8rem; }
.portal-next-lesson .primary-button { grid-column:1/-1; justify-self:start; margin-top:10px; color:#40217e; background:#fff; border-color:#fff; box-shadow:none; }
.portal-summary { display:grid; grid-template-columns:repeat(3,1fr); gap:0; padding:19px; background:var(--ng-panel); border:1px solid var(--ng-border-soft); border-radius:14px; }
.portal-summary div { display:flex; flex-direction:column; justify-content:center; min-width:0; padding:0 12px; border-right:1px solid var(--ng-border-soft); }
.portal-summary div:first-child { padding-left:0; }
.portal-summary div:last-of-type { border:0; }
.portal-summary span { color:var(--ng-muted); font-size:.68rem; line-height:1.3; }
.portal-summary strong { margin-top:6px; font-size:1.55rem; letter-spacing:-.05em; }
.portal-summary small { grid-column:1/-1; margin-top:20px; color:var(--ng-subtle); font-size:.7rem; }
.portal-content-grid { display:grid; grid-template-columns:minmax(0,1.65fr) minmax(280px,.8fr); gap:16px; }
.portal-section { padding:22px; background:var(--ng-panel); border:1px solid var(--ng-border-soft); border-radius:14px; }
.portal-section .surface-head { margin-bottom:13px; }
.portal-section .surface-head h2 { font-size:1.03rem; }
.portal-section .surface-head a { color:var(--ng-violet-bright); font-size:.76rem; text-decoration:none; }
.portal-agenda > div { display:grid; grid-template-columns:64px minmax(0,1fr) auto; align-items:center; gap:12px; padding:14px 0; border-top:1px solid var(--ng-border-soft); }
.portal-agenda time { color:var(--ng-violet-bright); font-size:.78rem; font-variant-numeric:tabular-nums; font-weight:700; }
.portal-agenda span { display:grid; gap:3px; }
.portal-agenda strong { font-size:.84rem; }
.portal-agenda small { color:var(--ng-muted); font-size:.74rem; }
.portal-agenda .secondary-button { min-width:74px; justify-content:center; }
.portal-agenda > div > .bi { color:var(--ng-subtle); }
.portal-note { display:flex; flex-direction:column; align-items:flex-start; background:linear-gradient(150deg,var(--ng-panel),var(--ng-panel-raised)); }
.portal-note > i { display:grid; width:34px; height:34px; place-items:center; margin-bottom:22px; color:var(--ng-violet-bright); background:var(--ng-violet-soft); border-radius:9px; }
.portal-note h2 { margin:0 0 8px; font-size:1.1rem; }
.portal-note p { margin:0; color:var(--ng-muted); font-size:.8rem; line-height:1.65; }
.portal-note .secondary-button { margin-top:auto; padding-top:20px; }
@media (max-width:820px) { .portal-header { flex-wrap:wrap; gap:12px; }.portal-header .brand-lockup { min-width:0; }.portal-nav { order:3; width:100%; overflow-x:auto; padding-bottom:2px; }.portal-hero-grid,.portal-content-grid { grid-template-columns:1fr; }.portal-summary { min-height:140px; }.portal-note { min-height:220px; } }
@media (max-width:520px) { .portal-main { width:min(100% - 28px,1180px); padding-top:34px; }.portal-header { padding:11px 14px; }.portal-user { display:none; }.portal-welcome { align-items:flex-start; flex-direction:column; margin-bottom:22px; }.portal-welcome h1 { font-size:2rem; }.portal-next-lesson { padding:22px; }.portal-summary { padding:15px; }.portal-summary div { padding:0 8px; }.portal-summary strong { font-size:1.35rem; }.portal-section { padding:18px; }.portal-agenda > div { grid-template-columns:52px minmax(0,1fr) auto; }.portal-agenda .secondary-button { min-width:0; padding:7px 9px; font-size:.7rem; } }

a { color: inherit; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #c6aaff;
    outline-offset: 3px;
}

.platform-shell {
    display: grid;
    grid-template-columns: 224px minmax(0, 1fr);
    min-height: 100vh;
}

.platform-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 24px 14px 16px;
    overflow-y: auto;
    background: var(--ng-sidebar);
    border-right: 1px solid var(--ng-border-soft);
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 10px 28px;
    color: var(--ng-text);
    text-decoration: none;
}

.brand-mark {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: white;
    background: var(--ng-violet);
    border: 1px solid #a984ff;
    border-radius: 9px;
    box-shadow: 0 0 24px rgba(139, 92, 246, .28);
}

.brand-lockup strong,
.brand-lockup small { display: block; }
.brand-lockup strong { font-size: .98rem; letter-spacing: -.02em; }
.brand-lockup small { margin-top: 1px; color: var(--ng-muted); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }

.sidebar-nav { flex: 1; }
.nav-label { margin: 0 10px 9px; color: var(--ng-subtle); font-size: .75rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.nav-label-spaced { margin-top: 28px; }

.sidebar-link {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    margin-bottom: 4px;
    padding: 9px 11px;
    color: #b9bac6;
    border: 1px solid transparent;
    border-radius: 9px;
    font-size: .82rem;
    text-decoration: none;
}

.sidebar-link i { color: #828391; font-size: .93rem; }
.sidebar-link small { color: var(--ng-subtle); font-size: .75rem; text-transform: uppercase; }
.sidebar-link:hover { color: white; background: #151620; border-color: #20212d; }
.sidebar-link.active { color: white; background: linear-gradient(90deg, rgba(139, 92, 246, .2), rgba(139, 92, 246, .06)); border-color: rgba(167, 121, 255, .34); box-shadow: inset 3px 0 0 var(--ng-violet); }
.sidebar-link.active i { color: var(--ng-violet-bright); }
.sidebar-link.disabled { opacity: .52; cursor: default; }
.sidebar-group { margin-top: 22px; }
.sidebar-group summary { display: flex; align-items: center; justify-content: space-between; min-height: 30px; padding: 0 10px; cursor: pointer; list-style: none; }
.sidebar-group summary::-webkit-details-marker { display: none; }
.sidebar-group summary .nav-label { margin: 0; }
.sidebar-group summary .group-chevron { color: var(--ng-subtle); font-size: .68rem; transition: transform .16s ease; }
.sidebar-group[open] summary .group-chevron { transform: rotate(180deg); }
.sidebar-group-links { padding-top: 8px; }
body.light-theme .sidebar-group summary .group-chevron { color:#68738a; }

.sidebar-user {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    padding: 16px 8px 0;
    border-top: 1px solid var(--ng-border-soft);
}

.user-avatar {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    color: white;
    background: #29263b;
    border: 1px solid #4a4268;
    border-radius: 50%;
    font-size: .78rem;
    font-weight: 700;
}

.user-copy { min-width: 0; }
.user-copy strong, .user-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-copy strong { font-size: .74rem; }
.user-copy small { color: var(--ng-muted); font-size: .75rem; }

.platform-workspace { min-width: 0; }
.platform-topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    padding: 13px clamp(18px, 3vw, 38px);
    background: rgba(7, 7, 12, .92);
    border-bottom: 1px solid var(--ng-border-soft);
    backdrop-filter: blur(18px);
}

.global-search {
    display: grid;
    grid-template-columns: 18px minmax(140px, 320px) auto;
    align-items: center;
    gap: 9px;
    width: min(100%, 470px);
    padding: 5px 5px 5px 13px;
    color: var(--ng-muted);
    background: #101118;
    border: 1px solid var(--ng-border);
    border-radius: 9px;
}

.global-search input { min-width: 0; padding: 6px 0; color: white; caret-color: var(--ng-violet-bright); background: transparent; border: 0; outline: 0; font-size: .78rem; }
.global-search input::placeholder { color: #9293a4; }
.global-search button { padding: 6px 14px; color: #d8d6df; background: #23242f; border: 1px solid #353645; border-radius: 7px; font-size: .75rem; }
.global-search:focus-within { border-color: var(--ng-violet); box-shadow: 0 0 0 3px rgba(139, 92, 246, .18); }

.topbar-actions { display: flex; align-items: center; gap: 9px; }
.environment-pill { display: flex; align-items: center; gap: 7px; padding: 7px 10px; color: var(--ng-muted); background: #101118; border: 1px solid var(--ng-border); border-radius: 999px; font-size: .75rem; text-transform: capitalize; }
.environment-pill span { width: 6px; height: 6px; background: var(--ng-green); border-radius: 50%; box-shadow: 0 0 9px rgba(155, 225, 93, .65); }

.icon-button {
    display: inline-grid;
    width: 34px;
    height: 34px;
    padding: 0;
    place-items: center;
    color: #a7a8b5;
    background: #14151d;
    border: 1px solid var(--ng-border);
    border-radius: 8px;
    text-decoration: none;
}
.icon-button:hover { color: white; background: #1c1d28; border-color: #404151; }
.icon-button.active { color: var(--ng-violet-bright); background: var(--ng-violet-soft); border-color: rgba(167, 121, 255, .42); }

.platform-main { width: 98%; max-width: 1780px; margin: 0 auto; padding: 30px clamp(18px, 2vw, 38px) 48px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.page-head h1 { margin: 0; font-size: clamp(1.55rem, 3vw, 2.05rem); font-weight: 600; letter-spacing: -.035em; }
.page-head p { margin: 7px 0 0; color: var(--ng-muted); font-size: .83rem; }

.primary-button, .secondary-button, .danger-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: .78rem;
    font-weight: 650;
    text-decoration: none;
}
.primary-button { color: white; background: linear-gradient(135deg, #7650e8, #9a61f5); border: 1px solid #a775ff; box-shadow: 0 8px 24px rgba(110, 67, 218, .19); }
.primary-button:hover { color: white; background: #9665ef; }
.secondary-button { color: #dad9e2; background: #181922; border: 1px solid #323342; }
.secondary-button:hover { color: white; background: #22232e; }
.danger-button { color: #ffb1ba; background: rgba(255, 107, 125, .08); border: 1px solid rgba(255, 107, 125, .32); }
.danger-button:hover { color: white; background: rgba(255, 107, 125, .18); }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.metric-card, .surface-card {
    position: relative;
    overflow: hidden;
    background: var(--ng-panel);
    border: 1px solid var(--ng-border-soft);
    border-radius: 12px;
}
.metric-card { min-height: 132px; padding: 18px; }
.metric-card::after { position: absolute; right: -35px; bottom: -55px; width: 130px; height: 110px; content: ""; background: radial-gradient(circle, rgba(139, 92, 246, .2), transparent 68%); }
.metric-top { display: flex; align-items: center; justify-content: space-between; color: var(--ng-muted); font-size: .75rem; }
.metric-top i { color: #777888; }
.metric-value { margin-top: 14px; font-size: 1.65rem; font-weight: 650; letter-spacing: -.04em; }
.metric-note { margin-top: 5px; color: var(--ng-muted); font-size: .75rem; }
.metric-note strong { color: var(--ng-green); font-weight: 600; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(310px, .9fr); gap: 16px; margin-bottom: 16px; }
.surface-card { padding: 20px; }
.surface-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 20px; }
.surface-head h2 { margin: 0; font-size: .94rem; font-weight: 600; }
.surface-head p { margin: 4px 0 0; color: var(--ng-muted); font-size: .75rem; }
.surface-meta { color: var(--ng-muted); font-size: .75rem; }

.growth-chart { display: grid; grid-template-columns: repeat(6, 1fr); align-items: end; gap: 16px; min-height: 215px; padding: 20px 8px 0; border-bottom: 1px solid #272834; background-image: linear-gradient(to bottom, transparent 24%, #1d1e28 25%, transparent 26%, transparent 49%, #1d1e28 50%, transparent 51%, transparent 74%, #1d1e28 75%, transparent 76%); }
.growth-column { display: grid; grid-template-rows: 1fr auto; align-items: end; gap: 10px; height: 190px; text-align: center; }
.growth-bar { width: min(100%, 48px); min-height: 12px; margin: auto auto 0; background: linear-gradient(180deg, #9a6cff, #5736a8); border: 1px solid #a983ff; border-bottom: 0; border-radius: 5px 5px 0 0; box-shadow: 0 -8px 20px rgba(139, 92, 246, .13); }
.growth-column span { color: var(--ng-subtle); font-size: .75rem; }

.bar-h-10 { height: 10%; } .bar-h-20 { height: 20%; } .bar-h-30 { height: 30%; } .bar-h-40 { height: 40%; } .bar-h-50 { height: 50%; }
.bar-h-60 { height: 60%; } .bar-h-70 { height: 70%; } .bar-h-80 { height: 80%; } .bar-h-90 { height: 90%; } .bar-h-100 { height: 100%; }

.status-visual { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 24px; padding: 14px 4px 9px; }
.status-ring { position: relative; display: grid; width: 142px; aspect-ratio: 1; place-items: center; margin: auto; background: conic-gradient(var(--ng-green) var(--ring-stop), #282936 0); border-radius: 50%; }
.status-ring::before { position: absolute; width: 102px; aspect-ratio: 1; content: ""; background: var(--ng-panel); border: 1px solid #292a36; border-radius: 50%; }
.status-ring strong, .status-ring span { position: relative; z-index: 1; display: block; text-align: center; }
.status-ring strong { font-size: 1.5rem; }
.status-ring span { color: var(--ng-muted); font-size: .75rem; }
.ring-0 { --ring-stop: 0%; } .ring-10 { --ring-stop: 10%; } .ring-20 { --ring-stop: 20%; } .ring-30 { --ring-stop: 30%; } .ring-40 { --ring-stop: 40%; }
.ring-50 { --ring-stop: 50%; } .ring-60 { --ring-stop: 60%; } .ring-70 { --ring-stop: 70%; } .ring-80 { --ring-stop: 80%; } .ring-90 { --ring-stop: 90%; } .ring-100 { --ring-stop: 100%; }
.status-legend { display: grid; gap: 12px; }
.legend-row { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 8px; color: var(--ng-muted); font-size: .75rem; }
.legend-row strong { color: var(--ng-text); }
.legend-dot { width: 7px; height: 7px; background: var(--ng-violet); border-radius: 2px; }
.legend-dot.green { background: var(--ng-green); } .legend-dot.yellow { background: var(--ng-yellow); } .legend-dot.red { background: var(--ng-red); }

.table-surface { padding: 0; }
.table-surface .surface-head { padding: 20px 20px 0; }
.record-actions { display: flex; justify-content: flex-end; gap: 8px; }
.record-actions form { margin: 0; }
.retired-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding: 13px 20px; color: var(--ng-muted); border-top: 1px solid var(--ng-border-soft); font-size: .74rem; }
.retired-inline span { display: inline-flex; align-items: center; gap: 7px; padding: 5px 7px; background: var(--ng-panel-soft); border: 1px solid var(--ng-border-soft); border-radius: 7px; }
.retired-inline form { margin: 0; }
.retired-inline button { padding: 0; color: var(--ng-violet-bright); background: transparent; border: 0; font: inherit; font-weight: 650; }
.app-table { width: 100%; margin: 0; color: #ceced7; border-collapse: collapse; }
.app-table th { padding: 12px 18px; color: #9293a4; background: transparent; border-bottom: 1px solid var(--ng-border-soft); font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.app-table td { padding: 14px 18px; color: #c8c8d2; background: transparent; border-bottom: 1px solid #1b1c26; font-size: .74rem; vertical-align: middle; }
.app-table tbody tr:hover td { background: rgba(255, 255, 255, .018); }
.app-table tbody tr:last-child td { border-bottom: 0; }
.school-cell { display: flex; align-items: center; gap: 10px; }
.school-monogram { display: grid; width: 30px; height: 30px; flex: 0 0 30px; place-items: center; color: #d9ccff; background: #242031; border: 1px solid #403555; border-radius: 8px; font-size: .75rem; font-weight: 700; }
.school-cell strong, .school-cell small { display: block; }
.school-cell strong { color: #eeedf3; font-size: .75rem; }
.school-cell small { color: var(--ng-subtle); font-size: .75rem; }

.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid #343541; border-radius: 999px; color: #c8c9d2; background: #1a1b24; font-size: .75rem; text-transform: capitalize; }
.status-badge::before { width: 6px; height: 6px; content: ""; background: var(--ng-muted); border-radius: 50%; }
.status-active::before { background: var(--ng-green); box-shadow: 0 0 7px rgba(155, 225, 93, .5); }
.status-trial::before, .status-onboarding::before { background: var(--ng-violet-bright); }
.status-submitted::before { background: var(--ng-violet-bright); }
.status-review::before, .status-interview::before, .status-waitlisted::before { background: var(--ng-yellow); }
.status-approved::before { background: var(--ng-green); box-shadow: 0 0 7px rgba(155, 225, 93, .5); }
.status-rejected::before { background: var(--ng-red); }
.status-suspended::before, .status-closed::before { background: var(--ng-red); }

.empty-state { padding: 48px 20px; text-align: center; }
.empty-state i { display: block; margin-bottom: 12px; color: #656677; font-size: 2rem; }
.empty-state h3 { font-size: 1rem; }
.empty-state p { max-width: 440px; margin: 0 auto 18px; color: var(--ng-muted); font-size: .76rem; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; padding: 12px; background: var(--ng-panel); border: 1px solid var(--ng-border-soft); border-radius: 11px; }
.filter-bar input, .filter-bar select { min-height: 38px; padding: 8px 11px; color: var(--ng-text); background: #0d0e14; border: 1px solid var(--ng-border); border-radius: 8px; font-size: .75rem; }
.filter-bar input { flex: 1 1 260px; }
.filter-bar select { flex: 0 1 180px; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr); gap: 16px; }
.support-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.support-access, .support-history { margin-top: 16px; }
.detail-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 0; }
.detail-list div { padding-bottom: 14px; border-bottom: 1px solid #20212b; }
.detail-list dt { margin-bottom: 5px; color: var(--ng-subtle); font-size: .75rem; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; }
.detail-list dd { margin: 0; color: #dedde5; font-size: .78rem; }
.quota-track { height: 7px; overflow: hidden; background: #262733; border-radius: 999px; }
.quota-fill { height: 100%; background: linear-gradient(90deg, #7348da, #a779ff); border-radius: inherit; }
.quota-0 { width: 0; } .quota-10 { width: 10%; } .quota-20 { width: 20%; } .quota-30 { width: 30%; } .quota-40 { width: 40%; } .quota-50 { width: 50%; }
.quota-60 { width: 60%; } .quota-70 { width: 70%; } .quota-80 { width: 80%; } .quota-90 { width: 90%; } .quota-100 { width: 100%; }

.form-card { max-width: 980px; }
.form-section { padding: 22px; border-bottom: 1px solid var(--ng-border-soft); }
.form-section:last-child { border-bottom: 0; }
.form-section h2 { margin: 0 0 4px; font-size: .9rem; }
.form-section > p { margin: 0 0 20px; color: var(--ng-muted); font-size: .75rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.field-span-2 { grid-column: span 2; }
.field-group label, .field-label { display: block; margin-bottom: 7px; color: #d3d3dc; font-size: .75rem; font-weight: 600; }
.field-group input, .field-group select, .field-group textarea, .field-control {
    width: 100%;
    color: var(--ng-text);
    background: #0b0c12;
    border: 1px solid #2b2c38;
    border-radius: 8px;
    outline: 0;
}
.field-group input, .field-group select, .field-group textarea { min-height: 42px; padding: 9px 11px; caret-color: var(--ng-violet-bright); font-size: .78rem; }
.field-group textarea { min-height: 112px; resize: vertical; }
.field-group input:focus, .field-group select:focus, .field-group textarea:focus, .field-control:focus-within { border-color: var(--ng-violet); box-shadow: 0 0 0 3px rgba(139, 92, 246, .13); }
.field-help { margin-top: 6px; color: var(--ng-subtle); font-size: .75rem; }
.field-error { margin-top: 6px; color: #ffb0ba; font-size: .75rem; }
.field-group input[aria-invalid="true"], .field-group select[aria-invalid="true"], .field-group textarea[aria-invalid="true"] { border-color: var(--ng-red); }
.form-check-control { display: inline-flex !important; align-items: center; gap: 10px; min-height: 42px; margin: 0 !important; padding: 9px 12px; color: var(--ng-text) !important; background: var(--ng-panel-soft); border: 1px solid var(--ng-border); border-radius: 8px; cursor: pointer; font-size: .78rem !important; font-weight: 500 !important; }
.form-check-control input { position: absolute; width: 1px !important; height: 1px !important; margin: -1px; padding: 0 !important; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0 !important; }
.check-indicator { display: inline-grid; width: 18px; height: 18px; flex: 0 0 18px; place-items: center; color: transparent; background: #0b0c12; border: 1px solid #4a4b5b; border-radius: 5px; transition: background .16s ease, border-color .16s ease, color .16s ease; }
.check-indicator i { font-size: .78rem; font-weight: 700; }
.form-check-control input:checked + .check-indicator { color: white; background: var(--ng-violet); border-color: var(--ng-violet-bright); }
.form-check-control:has(input:focus-visible) { border-color: var(--ng-violet); box-shadow: 0 0 0 3px rgba(139, 92, 246, .13); }
body.light-theme .form-check-control { color:#30394c !important; background:#f8f9fc; border-color:#cfd5e1; }
body.light-theme .check-indicator { background:#fff; border-color:#9ba7ba; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 18px 22px; border-top: 1px solid var(--ng-border-soft); }
.form-section-copy { margin: -4px 0 16px; color: var(--ng-muted); font-size: .78rem; line-height: 1.55; }
.compact-form-grid { gap: 13px; }

.admin-list { display: grid; }
.admin-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--ng-border-soft); }
.admin-row:first-child { padding-top: 0; }
.admin-row:last-child { padding-bottom: 0; border-bottom: 0; }
.admin-row strong, .admin-row small { display: block; }
.admin-row strong { font-size: .78rem; }
.admin-row small { margin-top: 2px; color: var(--ng-subtle); font-size: .75rem; }
.compact-empty { padding: 24px 10px; }
.decision-history-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--ng-border-soft); }
.decision-history-row:last-child { padding-bottom: 0; border-bottom: 0; }
.decision-history-row strong, .decision-history-row small { display: block; }
.decision-history-row strong { color: var(--ng-text); font-size: .78rem; }
.decision-history-row small { margin-top: 3px; color: var(--ng-subtle); font-size: .75rem; line-height: 1.5; }

.credential-alert { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; margin-bottom: 16px; padding: 16px; color: #ebe4ff; background: rgba(139, 92, 246, .12); border: 1px solid rgba(167, 121, 255, .38); border-radius: 11px; }
.credential-alert > i { color: var(--ng-violet-bright); font-size: 1.2rem; }
.credential-alert strong, .credential-alert p, .credential-alert small { display: block; }
.credential-alert p { margin: 3px 0 8px; color: var(--ng-muted); font-size: .75rem; }
.credential-alert code { display: block; max-width: 100%; padding: 7px 9px; overflow-wrap: anywhere; color: white; background: #08080e; border: 1px solid #343044; border-radius: 6px; font-size: .86rem; letter-spacing: .02em; }
.credential-alert small { margin-top: 8px; color: var(--ng-subtle); font-size: .75rem; }

.danger-zone { margin-top: 16px; border-color: rgba(255, 107, 125, .19); }
.danger-zone h2 { color: #ffabb5; }

.app-alert { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 18px; padding: 12px 14px; border: 1px solid; border-radius: 9px; font-size: .74rem; }
.app-alert-success { color: #c9f4ad; background: rgba(155, 225, 93, .08); border-color: rgba(155, 225, 93, .24); }
.app-alert-danger { color: #ffc1c8; background: rgba(255, 107, 125, .08); border-color: rgba(255, 107, 125, .25); }
.app-alert-warning { color: #ffe2a8; background: rgba(255, 190, 80, .08); border-color: rgba(255, 190, 80, .26); }

.pagination { --bs-pagination-bg: #14151d; --bs-pagination-border-color: #292a36; --bs-pagination-color: #aaa9b7; --bs-pagination-hover-bg: #20212c; --bs-pagination-hover-color: white; --bs-pagination-hover-border-color: #3a3b49; --bs-pagination-active-bg: var(--ng-violet); --bs-pagination-active-border-color: var(--ng-violet); }

.platform-main .card { color: var(--ng-text); background: var(--ng-panel); border-color: var(--ng-border-soft) !important; }
.platform-main .text-secondary { color: var(--ng-muted) !important; }
.platform-main .text-primary, .platform-main .text-primary-emphasis { color: var(--ng-violet-bright) !important; }
.platform-main .bg-primary-subtle { background: var(--ng-violet-soft) !important; }
.platform-main .border-primary-subtle { border-color: rgba(139, 92, 246, .3) !important; }
.platform-main .table { --bs-table-color: #cdccd6; --bs-table-bg: transparent; --bs-table-striped-color: #d8d7df; --bs-table-striped-bg: rgba(255,255,255,.018); --bs-table-border-color: var(--ng-border-soft); }
.platform-main code { color: #b79bff; }
.platform-main .list-group-item { color: #d1d0d8; background: transparent; border-color: var(--ng-border-soft); }
.platform-main .badge.text-bg-secondary { color: #c6c5cf !important; background: #262733 !important; }
.platform-main .alert-info { color: #cfc0ff; background: rgba(139, 92, 246, .1); border-color: rgba(139, 92, 246, .24); }

.impersonation-banner { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 54px; padding: 9px clamp(16px, 3vw, 36px); color: #120b20; background: #c6aaff; border-bottom: 1px solid #e3d7ff; font-size: .78rem; }
.impersonation-banner > div { display: flex; align-items: center; gap: 9px; }
.impersonation-banner form { margin: 0; }
.impersonation-banner button { min-height: 34px; padding: 6px 11px; color: white; background: #24153f; border: 1px solid #3d2865; border-radius: 7px; font-size: .75rem; font-weight: 650; }
.school-preview-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 76px; padding: 12px clamp(16px, 4vw, 56px); background: var(--ng-sidebar); border-bottom: 1px solid var(--ng-border-soft); }
.school-preview-header .brand-lockup { padding: 0; }
.school-header-nav { display: flex; align-items: center; gap: 6px; min-width: 0; margin-left: auto; margin-right: 18px; }
.school-header-nav a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; color: var(--ng-muted); border: 1px solid transparent; border-radius: 8px; font-size: .75rem; text-decoration: none; }
.school-header-nav a:hover, .school-header-nav a.active { color: white; background: #1c1d27; border-color: #31323e; }
.school-nav-group { position: relative; }
.school-nav-group summary { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; color: var(--ng-muted); border: 1px solid transparent; border-radius: 8px; cursor: pointer; font-size: .75rem; list-style: none; }
.school-nav-group summary::-webkit-details-marker { display: none; }
.school-nav-group summary:hover, .school-nav-group summary.active { color: white; background: #1c1d27; border-color: #31323e; }
.school-nav-group[open] .group-chevron { transform: rotate(180deg); }
.group-chevron { font-size: .65rem; transition: transform .16s ease; }
.school-nav-menu { position: absolute; top: calc(100% + 7px); right: 0; z-index: 20; display: grid; min-width: 190px; padding: 6px; background: var(--ng-panel-raised); border: 1px solid var(--ng-border); border-radius: 9px; box-shadow: 0 16px 36px rgba(0, 0, 0, .28); }
.school-nav-menu a { padding: 8px 10px; }
body.light-theme .school-header-nav a:hover, body.light-theme .school-header-nav a.active, body.light-theme .school-nav-group summary:hover, body.light-theme .school-nav-group summary.active { color:#32206e; background:#f5f1ff; border-color:#dfd2ff; }
body.light-theme .school-nav-menu { background:#fff; border-color:#d9dfeb; box-shadow:0 14px 30px rgba(26,34,52,.13); }
.school-header-actions { display: flex; align-items: center; gap: 9px; }
.school-header-actions form { margin: 0; }
.request-loader { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(7, 7, 12, .62); backdrop-filter: blur(3px); cursor: wait; }
.request-loader[hidden] { display: none; }
.request-loader-card { position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 12px; width: min(100%, 390px); min-height: 84px; padding: 15px 17px 18px; overflow: hidden; color: var(--ng-text); background: var(--ng-panel-raised); border: 1px solid var(--ng-border); border-radius: 12px; box-shadow: 0 22px 60px rgba(0, 0, 0, .36); }
.request-loader-mark { display: grid; width: 38px; height: 38px; place-items: center; color: white; background: var(--ng-violet); border: 1px solid var(--ng-violet-bright); border-radius: 10px; box-shadow: 0 8px 22px rgba(110, 67, 218, .24); }
.request-loader-mark i { font-size: 1rem; }
.request-loader-copy { min-width: 0; }
.request-loader-copy strong, .request-loader-copy small { display: block; }
.request-loader-copy strong { font-size: .82rem; font-weight: 700; }
.request-loader-copy small { margin-top: 3px; color: var(--ng-muted); font-size: .7rem; line-height: 1.35; }
.request-loader-track { position: absolute; right: 0; bottom: 0; left: 0; height: 3px; overflow: hidden; background: var(--ng-panel-soft); }
.request-loader-track span { display: block; width: 42%; height: 100%; background: var(--ng-violet-bright); }
.button-loader { display: inline-block; width: 13px; height: 13px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: button-loader-spin .7s linear infinite; }
.is-loading { gap: 8px; pointer-events: none; }
@keyframes button-loader-spin { to { transform: rotate(360deg); } }
.request-in-progress button, .request-in-progress a { cursor: wait; }
body.light-theme .request-loader { background: rgba(233, 236, 243, .72); }
body.light-theme .request-loader-card { background: var(--ng-panel); border-color: var(--ng-border); box-shadow: 0 22px 60px rgba(26, 34, 52, .22); }
.school-preview-main { width: 98%; max-width: 1780px; margin: 0 auto; padding: 32px clamp(16px, 2vw, 42px) 56px; }
.school-preview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.settings-card { width: 100%; max-width: none; margin: 0; }
.school-preview-copy { margin: 0; color: var(--ng-muted); font-size: .82rem; line-height: 1.7; }
.quick-link-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 16px; }
.quick-link-grid a { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 9px 10px; color: var(--ng-text); background: var(--ng-panel-raised); border: 1px solid var(--ng-border); border-radius: 8px; font-size: .79rem; text-decoration: none; }
.quick-link-grid a:hover { color: var(--ng-text); background: var(--ng-panel-soft); border-color: var(--ng-violet); }
.quick-link-grid i { color: var(--ng-violet-bright); }
.teacher-agenda { display: grid; gap: 10px; margin-top: 15px; }
.teacher-agenda > div { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 12px; padding: 11px 0; border-top: 1px solid var(--ng-border-soft); }
.teacher-agenda time { color: var(--ng-violet-bright); font-size: .78rem; font-variant-numeric: tabular-nums; }
.teacher-agenda strong, .teacher-agenda small { display: block; }
.teacher-agenda small { margin-top: 3px; color: var(--ng-muted); font-size: .75rem; }
.teacher-agenda > .teacher-agenda-empty { display:flex; align-items:center; justify-content:center; gap:13px; min-height:132px; padding:24px; border-top:1px solid var(--ng-border-soft); text-align:left; }.teacher-agenda-empty > i { display:grid; flex:none; width:38px; height:38px; place-items:center; color:var(--ng-violet-bright); background:var(--ng-violet-soft); border-radius:10px; font-size:1.1rem; }.teacher-agenda-empty h3 { margin:0; font-size:.9rem; }.teacher-agenda-empty p { max-width:270px; margin:4px 0 0; color:var(--ng-muted); font-size:.74rem; line-height:1.5; }
.attendance-overview { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:1px; margin-bottom:16px; overflow:hidden; background:var(--ng-border-soft); border:1px solid var(--ng-border-soft); border-radius:12px; }
.attendance-overview > div { display:grid; gap:5px; padding:15px 17px; background:var(--ng-panel); }
.attendance-overview span { color:var(--ng-subtle); font-size:.7rem; }
.attendance-overview strong { color:var(--ng-text); font-size:.82rem; }
.attendance-table select,.attendance-table input { width:100%; min-height:38px; padding:7px 9px; color:var(--ng-text); background:var(--ng-bg); border:1px solid var(--ng-border); border-radius:7px; font-size:.75rem; }
.attendance-table select:disabled,.attendance-table input:disabled { cursor:not-allowed; opacity:.76; background:var(--ng-panel-soft); }
.attendance-table .status-value-present { color:var(--ng-green); }
.attendance-table .status-value-late,.attendance-table .status-value-excused { color:var(--ng-yellow); }
.attendance-table .status-value-absent { color:var(--ng-red); }
.register-state-stack { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:7px; }
.status-present::before,.status-sent::before { background:var(--ng-green); box-shadow:0 0 7px rgba(155,225,93,.5); }
.status-late::before,.status-excused::before,.status-queued::before { background:var(--ng-yellow); }
.status-absent::before { background:var(--ng-red); }
.attendance-correction-grid { align-items:start; }
.attendance-record-context { margin-bottom:4px; }
.attendance-audit-stack { display:grid; gap:16px; min-width:0; }
.attendance-history-row { grid-template-columns:minmax(82px,auto) minmax(0,1fr); }
.correction-transition { display:flex; flex-wrap:wrap; align-items:center; gap:7px; margin:8px 0 5px; color:var(--ng-text); font-size:.75rem; }
.correction-transition i { color:var(--ng-violet-bright); }
.notice-audit-row { grid-template-columns:24px minmax(0,1fr) auto; }
.notice-audit-row > i { color:var(--ng-violet-bright); }
.notice-audit-row small { overflow-wrap:anywhere; }
.learning-workspace { display:grid; grid-template-columns:minmax(300px,.72fr) minmax(0,1.28fr); gap:18px; align-items:start; }
.learning-compose,.learning-stream,.portal-homework { padding:20px; background:var(--ng-panel); border:1px solid var(--ng-border); border-radius:12px; }
.learning-compose { position:sticky; top:18px; }
.learning-compose-head,.learning-stream-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:18px; }
.learning-compose-head h2,.learning-stream-head h2,.portal-homework h2 { margin:0; font-size:1rem; letter-spacing:-.02em; }
.learning-compose-head p,.learning-stream-head p,.portal-homework .surface-head p { margin:5px 0 0; color:var(--ng-muted); font-size:.75rem; line-height:1.5; }
.learning-compose-head > i { display:grid; width:34px; height:34px; place-items:center; color:var(--ng-violet-bright); background:var(--ng-violet-soft); border:1px solid rgba(139,92,246,.35); border-radius:9px; }
.learning-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:13px; margin-bottom:16px; }
.learning-form-grid input,.learning-form-grid select,.learning-form-grid textarea,.portal-homework textarea { width:100%; color:var(--ng-text); background:var(--ng-bg); border:1px solid var(--ng-border); border-radius:8px; font:inherit; }
.learning-form-grid input,.learning-form-grid select { min-height:40px; padding:8px 10px; }
.learning-form-grid textarea,.portal-homework textarea { padding:10px; resize:vertical; }
.learning-form-grid label span { display:block; margin-bottom:6px; color:var(--ng-muted); font-size:.7rem; font-weight:650; }
.learning-form-grid label span small { color:var(--ng-subtle); font-size:.67rem; font-weight:400; }.homework-resource-input { padding-top:2px; }.homework-resource-input input[type=file] { width:100%; min-height:38px; color:var(--ng-subtle); font-size:.72rem; }
.learning-span-2 { grid-column:span 2; }
.learning-stream { display:grid; gap:12px; }
.learning-card { padding:17px; background:var(--ng-panel-raised); border:1px solid var(--ng-border); border-radius:10px; }
.learning-card-head { display:flex; justify-content:space-between; gap:14px; }
.learning-subject { display:inline-block; margin-bottom:5px; color:var(--ng-violet-bright); font-size:.67rem; font-weight:700; letter-spacing:.04em; text-transform:uppercase; }
.learning-card h3,.portal-homework-card h3 { margin:0; color:var(--ng-text); font-size:.92rem; letter-spacing:-.015em; }
.learning-card-head p,.learning-instructions,.portal-homework-card p { margin:5px 0 0; color:var(--ng-muted); font-size:.75rem; line-height:1.55; }
.learning-instructions { max-width:72ch; margin-top:13px; white-space:pre-line; }
.learning-card-meta { display:flex; flex-wrap:wrap; gap:10px 16px; margin-top:14px; padding-top:12px; border-top:1px solid var(--ng-border-soft); color:var(--ng-subtle); font-size:.7rem; }
.learning-card-meta i,.portal-homework-card small i { margin-right:5px; color:var(--ng-violet-bright); }
.learning-card-actions { display:flex; gap:8px; margin-top:14px; }
.learning-card-actions form,.learning-submission-list form { margin:0; }
.learning-file-link { display:inline-flex; align-items:center; gap:6px; margin-top:10px; color:var(--ng-violet-bright); font-size:.72rem; text-decoration:none; }.learning-file-link:hover { color:var(--ng-text); text-decoration:underline; text-underline-offset:3px; }
.learning-attachment-form { display:flex; flex-wrap:wrap; align-items:center; gap:9px; margin-top:14px; padding-top:13px; border-top:1px solid var(--ng-border-soft); }.learning-attachment-form > label,.student-file-input { display:inline-flex; align-items:center; gap:7px; color:var(--ng-muted); font-size:.71rem; cursor:pointer; }.learning-attachment-form input[type=file],.student-file-input input[type=file] { max-width:190px; color:var(--ng-subtle); font-size:.68rem; }.file-upload-status { color:var(--ng-subtle); font-size:.67rem; }.file-upload-error { width:100%; margin:0; color:var(--ng-red); font-size:.7rem; }
.student-submission-upload { display:grid; gap:9px; margin-top:12px; padding:13px; background:var(--ng-panel-soft); border:1px dashed var(--ng-border); border-radius:11px; transition:border-color .2s ease, background .2s ease; }
.student-upload-heading { display:flex; align-items:flex-start; gap:9px; }.student-upload-heading > span:last-child { display:grid; gap:2px; }.student-upload-heading strong { font-size:.76rem; }.student-upload-heading small { color:var(--ng-muted); font-size:.68rem; line-height:1.4; }
.student-upload-icon { display:grid; flex:none; width:29px; height:29px; place-items:center; color:var(--ng-violet-bright); background:var(--ng-violet-soft); border-radius:8px; }
.student-upload-dropzone { display:flex; align-items:center; gap:9px; min-height:42px; padding:6px; color:var(--ng-muted); background:var(--ng-panel); border:1px solid var(--ng-border-soft); border-radius:8px; cursor:pointer; transition:border-color .2s ease, background .2s ease; }.student-upload-dropzone:hover { background:var(--ng-panel-raised); border-color:rgba(167,121,255,.6); }.student-upload-dropzone:focus-within { outline:2px solid var(--ng-violet-bright); outline-offset:2px; }
.student-upload-button { display:inline-flex; align-items:center; gap:6px; flex:none; min-height:28px; padding:5px 8px; color:var(--ng-violet-bright); background:var(--ng-violet-soft); border-radius:6px; font-size:.69rem; font-weight:700; }.student-upload-file { overflow:hidden; color:var(--ng-text); font-size:.69rem; text-overflow:ellipsis; white-space:nowrap; }.student-submission-upload .file-upload-status { display:flex; align-items:center; gap:5px; }.student-submission-upload .file-upload-status i { color:var(--ng-violet-bright); }.student-upload-existing { margin-top:0; }
.has-pending-file .student-submission-upload { background:var(--ng-violet-soft); border-color:rgba(167,121,255,.64); }.has-pending-file .student-upload-file { color:var(--ng-violet-bright); font-weight:700; }.is-uploading .student-upload-dropzone { pointer-events:none; opacity:.64; }.is-uploading .student-upload-button i { animation:student-upload-spin .9s linear infinite; }.has-uploaded-file .student-submission-upload { border-style:solid; border-color:rgba(107,196,126,.56); }
@keyframes student-upload-spin { to { transform:rotate(360deg); } }
.learning-edit { position:relative; }.learning-edit summary { display:inline-flex; min-height:38px; align-items:center; padding:8px 12px; color:var(--ng-text); background:var(--ng-panel-soft); border:1px solid var(--ng-border); border-radius:8px; cursor:pointer; font-size:.74rem; list-style:none; }.learning-edit summary::-webkit-details-marker { display:none; }.learning-edit[open] > form { position:absolute; z-index:12; display:grid; grid-template-columns:repeat(2,minmax(140px,1fr)); gap:10px; width:min(560px,calc(100vw - 64px)); margin-top:8px; padding:14px; background:var(--ng-panel); border:1px solid var(--ng-border); border-radius:10px; box-shadow:0 18px 45px rgba(0,0,0,.28); }.learning-edit label span { display:block; margin-bottom:4px; color:var(--ng-muted); font-size:.67rem; }.learning-edit input,.learning-edit select,.learning-edit textarea { width:100%; min-height:34px; padding:7px 8px; color:var(--ng-text); background:var(--ng-bg); border:1px solid var(--ng-border); border-radius:7px; font:inherit; font-size:.72rem; }.learning-edit textarea { resize:vertical; }.learning-edit-wide { grid-column:span 2; }
.learning-submission-list { display:grid; gap:8px; margin-top:15px; padding-top:13px; border-top:1px solid var(--ng-border-soft); }
.learning-submission-list > div { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:9px 0; }
.learning-submission-list strong,.learning-submission-list small { display:block; }
.learning-submission-list strong { font-size:.74rem; }.learning-submission-list small { margin-top:2px; color:var(--ng-subtle); font-size:.67rem; }
.text-action { padding:0; color:var(--ng-violet-bright); background:transparent; border:0; font-size:.72rem; font-weight:650; }
.text-action:hover { color:white; text-decoration:underline; text-underline-offset:3px; }
.learning-empty { display:grid; place-items:center; min-height:180px; padding:25px; text-align:center; color:var(--ng-muted); border:1px dashed var(--ng-border); border-radius:10px; }
.learning-empty i { margin-bottom:8px; color:var(--ng-violet-bright); font-size:1.25rem; }.learning-empty h3 { margin:0; color:var(--ng-text); font-size:.88rem; }.learning-empty p { max-width:38ch; margin:6px 0 0; font-size:.74rem; line-height:1.55; }
.status-draft::before { background:var(--ng-violet-bright); }.status-published::before,.status-reviewed::before { background:var(--ng-green); box-shadow:0 0 7px rgba(155,225,93,.5); }.status-closed::before { background:var(--ng-red); }.status-submitted::before { background:var(--ng-yellow); }
.portal-homework { display:grid; gap:11px; margin-top:18px; }
.portal-homework .surface-head { margin-bottom:2px; }.portal-homework-card { display:grid; grid-template-columns:minmax(0,1fr) minmax(220px,.42fr); gap:22px; padding:16px 0; border-top:1px solid var(--ng-border-soft); }
.portal-homework-card:first-of-type { border-top:0; }.portal-homework-card small { display:block; margin-top:10px; color:var(--ng-subtle); font-size:.7rem; }
.portal-homework-action { display:grid; align-content:start; justify-items:start; gap:5px; }.portal-homework-action form { display:grid; gap:9px; width:100%; margin:0; }.portal-homework-action textarea { min-height:78px; font-size:.74rem; }.portal-homework-action .primary-button { justify-self:start; }
.portal-results { display:grid; gap:11px; margin-top:18px; padding:20px; background:var(--ng-panel); border:1px solid var(--ng-border); border-radius:12px; }.portal-results .surface-head > i { display:grid; width:32px; height:32px; place-items:center; color:var(--ng-violet-bright); background:var(--ng-violet-soft); border:1px solid rgba(139,92,246,.32); border-radius:9px; }.portal-result-card { padding:16px 0; border-top:1px solid var(--ng-border-soft); }.portal-result-card:first-of-type { border-top:0; }.portal-result-top { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }.portal-result-top h3 { margin:0; color:var(--ng-text); font-size:.92rem; letter-spacing:-.015em; }.portal-result-top p { margin:4px 0 0; color:var(--ng-muted); font-size:.7rem; }.portal-result-subjects { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:8px; margin-top:13px; }.portal-result-subjects div { display:flex; align-items:center; justify-content:space-between; gap:9px; padding:9px; background:var(--ng-panel-raised); border:1px solid var(--ng-border-soft); border-radius:8px; }.portal-result-subjects strong { color:var(--ng-text); font-size:.71rem; }.portal-result-subjects span { color:var(--ng-violet-bright); font-size:.7rem; font-weight:700; }.portal-result-grade { color:var(--ng-text); font-size:.78rem; font-weight:800; }.portal-result-attendance { display:block; margin-top:10px; color:var(--ng-subtle); font-size:.69rem; }.portal-result-attendance i { margin-right:5px; color:var(--ng-violet-bright); }.portal-results-empty { display:flex; align-items:center; gap:10px; min-height:80px; padding:12px 0; color:var(--ng-muted); }.portal-results-empty i { display:grid; width:34px; height:34px; place-items:center; color:var(--ng-violet-bright); background:var(--ng-violet-soft); border-radius:9px; }.portal-results-empty strong,.portal-results-empty span { display:block; }.portal-results-empty strong { color:var(--ng-text); font-size:.75rem; }.portal-results-empty span { margin-top:3px; font-size:.69rem; }
body.light-theme .learning-compose,body.light-theme .learning-stream,body.light-theme .portal-homework { background:var(--ng-panel); border-color:var(--ng-border); } body.light-theme .learning-card { background:var(--ng-panel-raised); }
.assessment-page-head { margin-bottom:20px; }.assessment-head-signal { display:inline-flex; align-items:center; gap:8px; padding:8px 10px; color:var(--ng-violet-bright); background:var(--ng-violet-soft); border:1px solid rgba(139,92,246,.32); border-radius:999px; font-size:.72rem; font-weight:700; }.assessment-workspace { display:grid; grid-template-columns:minmax(290px,.68fr) minmax(0,1.32fr); gap:18px; align-items:start; }.assessment-compose,.assessment-stream,.report-card-workspace { background:var(--ng-panel); border:1px solid var(--ng-border); border-radius:12px; }.assessment-compose { position:sticky; top:18px; padding:20px; }.assessment-compose-head,.assessment-stream-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }.assessment-compose-head h2,.assessment-stream-head h2,.report-card-workspace h2 { margin:0; color:var(--ng-text); font-size:1rem; letter-spacing:-.02em; }.assessment-compose-head p,.assessment-stream-head p { max-width:46ch; margin:5px 0 0; color:var(--ng-muted); font-size:.75rem; line-height:1.55; }.assessment-compose-head > i { display:grid; width:34px; height:34px; flex:0 0 34px; place-items:center; color:var(--ng-violet-bright); background:var(--ng-violet-soft); border:1px solid rgba(139,92,246,.35); border-radius:9px; }.assessment-form { margin-top:18px; }.assessment-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:13px; }.assessment-field { display:block; }.assessment-field > span { display:block; margin-bottom:6px; color:var(--ng-muted); font-size:.7rem; font-weight:650; }.assessment-field small { color:var(--ng-subtle); font-size:.65rem; font-weight:400; }.assessment-field input,.assessment-field select,.assessment-edit input,.assessment-edit select,.gradebook-row input,.gradebook-row select { width:100%; min-height:40px; padding:8px 10px; color:var(--ng-text); background:var(--ng-bg); border:1px solid var(--ng-border); border-radius:8px; font:inherit; font-size:.74rem; }.assessment-form .primary-button { margin-top:16px; }.assessment-span-2 { grid-column:span 2; }.assessment-setup-empty { display:flex; align-items:flex-start; gap:9px; margin-top:17px; padding:12px; color:var(--ng-muted); background:var(--ng-panel-raised); border:1px dashed var(--ng-border); border-radius:9px; font-size:.73rem; line-height:1.55; }.assessment-setup-empty i { color:var(--ng-violet-bright); }.assessment-setup-empty p { margin:0; }.assessment-stream { display:grid; gap:12px; padding:20px; }.assessment-card { padding:17px; background:var(--ng-panel-raised); border:1px solid var(--ng-border); border-radius:10px; }.assessment-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }.assessment-card h3 { margin:0; color:var(--ng-text); font-size:.94rem; letter-spacing:-.015em; }.assessment-card-head p { margin:5px 0 0; color:var(--ng-muted); font-size:.74rem; }.assessment-meta { display:flex; flex-wrap:wrap; gap:9px 15px; margin-top:14px; padding-top:12px; color:var(--ng-subtle); border-top:1px solid var(--ng-border-soft); font-size:.7rem; }.assessment-meta i { margin-right:5px; color:var(--ng-violet-bright); }.assessment-card-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:14px; }.assessment-card-actions form,.report-card-actions form { margin:0; }.assessment-locked-note { display:inline-flex; align-items:center; gap:6px; color:var(--ng-subtle); font-size:.7rem; }.assessment-locked-note i { color:var(--ng-green); }.assessment-edit { position:relative; }.assessment-edit summary { display:inline-flex; min-height:38px; align-items:center; gap:7px; padding:8px 11px; color:var(--ng-text); background:var(--ng-panel-soft); border:1px solid var(--ng-border); border-radius:8px; cursor:pointer; font-size:.73rem; list-style:none; }.assessment-edit summary::-webkit-details-marker { display:none; }.assessment-edit[open] > form { position:absolute; z-index:12; display:grid; grid-template-columns:repeat(2,minmax(145px,1fr)); gap:9px; width:min(600px,calc(100vw - 64px)); margin-top:8px; padding:14px; background:var(--ng-panel); border:1px solid var(--ng-border); border-radius:10px; box-shadow:0 18px 45px rgba(0,0,0,.28); }.gradebook { margin-top:16px; padding-top:14px; border-top:1px solid var(--ng-border-soft); }.gradebook-head { display:flex; justify-content:space-between; gap:16px; margin-bottom:8px; color:var(--ng-muted); font-size:.7rem; line-height:1.45; }.gradebook-head strong { color:var(--ng-text); font-size:.76rem; }.gradebook-row { display:grid; grid-template-columns:minmax(130px,1.1fr) minmax(96px,.7fr) minmax(80px,.5fr) minmax(130px,1fr) minmax(125px,1fr) 38px; gap:7px; align-items:center; padding:9px 0; border-top:1px solid var(--ng-border-soft); }.gradebook-row:first-of-type { border-top:0; }.gradebook-row input,.gradebook-row select { min-height:35px; padding:6px 8px; font-size:.7rem; }.gradebook-row .icon-button { min-width:35px; min-height:35px; }.gradebook-learner strong,.gradebook-learner small { display:block; }.gradebook-learner strong { color:var(--ng-text); font-size:.73rem; }.gradebook-learner small { margin-top:2px; color:var(--ng-subtle); font-size:.66rem; }.report-card-workspace { display:grid; gap:15px; margin-top:18px; padding:20px; }.report-lock-mark { display:grid; width:36px; height:36px; place-items:center; color:var(--ng-violet-bright); background:var(--ng-violet-soft); border:1px solid rgba(139,92,246,.32); border-radius:9px; }.report-draft-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(235px,1fr)); gap:9px; }.report-draft-card { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px; background:var(--ng-panel-raised); border:1px solid var(--ng-border-soft); border-radius:9px; }.report-draft-card strong,.report-draft-card small { display:block; }.report-draft-card strong { color:var(--ng-text); font-size:.74rem; }.report-draft-card small { margin-top:3px; color:var(--ng-subtle); font-size:.67rem; }.report-draft-card .secondary-button { min-height:34px; padding:6px 9px; font-size:.68rem; white-space:nowrap; }.report-card-list { display:grid; gap:8px; }.report-card-row { display:grid; grid-template-columns:minmax(190px,1.1fr) minmax(130px,.8fr) auto auto; align-items:center; gap:16px; padding:13px 0; border-top:1px solid var(--ng-border-soft); }.report-card-row:first-child { border-top:0; }.report-card-identity { display:flex; align-items:center; gap:10px; }.report-version { display:grid; width:32px; height:32px; flex:0 0 32px; place-items:center; color:#d9ccff; background:#242031; border:1px solid #403555; border-radius:8px; font-size:.68rem; font-weight:700; }.report-card-identity strong,.report-card-identity small { display:block; }.report-card-identity strong { color:var(--ng-text); font-size:.74rem; }.report-card-identity small,.report-card-summary { margin-top:3px; color:var(--ng-subtle); font-size:.67rem; }.report-card-summary { display:flex; flex-wrap:wrap; gap:6px 10px; margin:0; }.report-card-summary span + span::before { margin-right:10px; color:var(--ng-border); content:'•'; }.report-card-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:7px; }.report-card-actions .primary-button,.report-card-actions .secondary-button { min-height:34px; padding:6px 10px; font-size:.68rem; }.status-open::before { background:var(--ng-green); box-shadow:0 0 7px rgba(155,225,93,.5); }.status-draft::before { background:var(--ng-violet-bright); }.status-in_review::before { background:var(--ng-yellow); }.status-superseded::before { background:var(--ng-subtle); }.assessment-empty { margin:0; } body.light-theme .assessment-compose,body.light-theme .assessment-stream,body.light-theme .report-card-workspace { background:var(--ng-panel); border-color:var(--ng-border); } body.light-theme .assessment-card,body.light-theme .report-draft-card { background:var(--ng-panel-raised); } body.light-theme .assessment-field input,body.light-theme .assessment-field select,body.light-theme .assessment-edit input,body.light-theme .assessment-edit select,body.light-theme .gradebook-row input,body.light-theme .gradebook-row select { background:var(--ng-panel); border-color:var(--ng-border); }
body.light-theme .attendance-overview { background:var(--ng-border); border-color:var(--ng-border); }
body.light-theme .attendance-overview > div { background:var(--ng-panel); }
body.light-theme .attendance-table select,body.light-theme .attendance-table input { color:var(--ng-text); background:var(--ng-panel); border-color:var(--ng-border); }
.protected-action-list { display: grid; gap: 9px; margin: 0; padding-left: 18px; color: #c9c9d3; font-size: .78rem; }
.access-role-catalog { margin-bottom: 16px; }
.role-chip-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; padding: 0 20px 20px; }
.role-chip { min-height: 110px; padding: 14px; background: #0d0e15; border: 1px solid var(--ng-border-soft); border-radius: 9px; }
.role-chip div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.role-chip strong { font-size: .78rem; }
.role-chip span, .role-chip p, .muted-copy { color: var(--ng-subtle); font-size: .7rem; }
.role-chip span { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.role-chip p { margin: 9px 0 0; line-height: 1.5; }
.access-table td:first-child { min-width: 210px; }
.access-table td:nth-child(2) { min-width: 245px; }
.assignment-stack { display: grid; gap: 6px; }
.assignment-pill { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 8px; background: #101118; border: 1px solid #292a35; border-radius: 7px; }
.assignment-pill strong, .assignment-pill small { display: block; }
.assignment-pill strong { color: #d9d8e0; font-size: .7rem; }
.assignment-pill small { color: var(--ng-subtle); font-size: .65rem; }
.assignment-pill form { margin: 0; }
.revoke-control { position: relative; }
.revoke-control summary { list-style: none; cursor: pointer; }
.revoke-control summary::-webkit-details-marker { display: none; }
.revoke-control form { position: absolute; top: 38px; right: 0; z-index: 8; width: 270px; padding: 12px; background: #11121a; border: 1px solid #383946; border-radius: 9px; box-shadow: 0 18px 45px rgba(0, 0, 0, .4); }
.revoke-control label { display: block; color: var(--ng-muted); font-size: .68rem; }
.revoke-control input { width: 100%; min-height: 36px; margin: 5px 0 9px; padding: 7px 8px; color: var(--ng-text); background: #090a0f; border: 1px solid var(--ng-border); border-radius: 7px; font-size: .7rem; }
.revoke-control .danger-button { width: 100%; }
.inline-assignment-form { display: grid; grid-template-columns: minmax(150px, 1fr) repeat(2, minmax(110px, .65fr)) auto; align-items: end; gap: 7px; min-width: 520px; }
.inline-assignment-form label span { display: block; margin-bottom: 4px; color: var(--ng-subtle); font-size: .65rem; }
.inline-assignment-form select, .inline-assignment-form input { width: 100%; min-height: 34px; padding: 5px 7px; color: var(--ng-text); background: #0b0c12; border: 1px solid var(--ng-border); border-radius: 7px; font-size: .7rem; color-scheme: dark; }
.inline-assignment-form .secondary-button { min-height: 34px; }
.platform-assignment-form { grid-template-columns: minmax(190px, 1fr) auto; min-width: 300px; }
.invitation-card { width: min(100%, 620px); margin: 40px auto 0; }
.invitation-card .surface-head h1 { margin: 0; font-size: clamp(1.45rem, 4vw, 1.9rem); letter-spacing: -.035em; }
.invitation-expiry { margin: 22px 0 0; padding-top: 16px; color: var(--ng-subtle); border-top: 1px solid var(--ng-border-soft); font-size: .75rem; }
.mfa-card { margin-top: 16px; }
.mfa-setup-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: center; padding: 24px; }
.mfa-qr { display: grid; place-items: center; padding: 14px; background: white; border-radius: 12px; }
.mfa-qr svg { width: 192px; height: 192px; }
.secret-key { display: block; margin: 7px 0 20px; padding: 10px; overflow-wrap: anywhere; color: #e8e0ff; background: #090910; border: 1px solid var(--ng-border); border-radius: 7px; }
.recovery-code-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.recovery-code-grid code { padding: 8px; text-align: center; }
.mfa-actions { margin: 0; padding: 22px; }
.mfa-actions > form { padding: 18px; }
.mfa-actions h3 { margin: 0 0 14px; font-size: .86rem; }
.mfa-actions .field-group { margin-bottom: 13px; }

.platform-auth-body { min-height: 100vh; overflow-x: hidden; background: radial-gradient(circle at 28% 16%, rgba(89, 49, 177, .25), transparent 30%), var(--ng-bg); }
.auth-stage { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(430px, .9fr); min-height: 100vh; }
.auth-story { display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; padding: clamp(30px, 5vw, 72px); border-right: 1px solid var(--ng-border-soft); background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px); background-size: 44px 44px; }
.auth-brand { display: flex; align-items: center; gap: 10px; font-size: .84rem; font-weight: 650; }
.auth-story h1 { max-width: 720px; margin: 0; font-size: clamp(3rem, 6.5vw, 6.5rem); font-weight: 570; letter-spacing: -.07em; line-height: .92; }
.auth-story h1 span { color: var(--ng-violet-bright); }
.auth-story > div > p:last-child { max-width: 590px; margin: 26px 0 0; color: #aaa9b7; font-size: clamp(.85rem, 1.3vw, 1rem); line-height: 1.75; }
.auth-signal-grid { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 640px; border: 1px solid var(--ng-border); background: rgba(13, 14, 21, .78); }
.auth-signal-grid div { padding: 17px; border-right: 1px solid var(--ng-border); }
.auth-signal-grid div:last-child { border-right: 0; }
.auth-signal-grid strong, .auth-signal-grid span { display: block; }
.auth-signal-grid strong { color: white; font-size: 1.08rem; }
.auth-signal-grid span { margin-top: 3px; color: var(--ng-muted); font-size: .75rem; }
.auth-panel { display: grid; place-items: center; padding: 30px; }
.auth-card { width: min(100%, 420px); padding: 34px; background: rgba(17, 18, 26, .92); border: 1px solid var(--ng-border); border-radius: 14px; }
.auth-card h2 { margin: 0; font-size: 1.7rem; letter-spacing: -.04em; }
.auth-intro { margin: 8px 0 26px; color: var(--ng-muted); font-size: .76rem; }
.auth-card .field-group { margin-bottom: 17px; }
.field-control { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 8px; padding: 0 12px; }
.field-control i { color: #6f7080; }
.field-control input { min-height: 45px; padding: 0; background: transparent; border: 0; box-shadow: none; }
.field-invalid { border-color: var(--ng-red); }
.check-row { display: flex; align-items: center; gap: 8px; margin: 3px 0 22px; color: #adaeba; font-size: .75rem; }
.check-row input { accent-color: var(--ng-violet); }
.auth-submit { width: 100%; min-height: 44px; }
.auth-footnote { display: flex; align-items: flex-start; gap: 8px; margin: 20px 0 0; padding-top: 18px; color: #9293a4; border-top: 1px solid var(--ng-border-soft); font-size: .75rem; line-height: 1.55; }

@media (max-width: 1050px) {
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-grid, .detail-grid, .support-grid { grid-template-columns: 1fr; }
    .auth-stage { grid-template-columns: 1fr; }
    .auth-story { display: none; }
}

@media (max-width: 1120px) and (min-width: 761px) {
    .school-preview-header { align-items: flex-start; flex-wrap: wrap; }
    .school-preview-header .brand-lockup { padding-bottom: 0; }
    .school-header-nav { flex: 1 1 520px; order: 3; width: 100%; margin: 0; overflow-x: auto; padding: 2px 0 4px; }
    .school-header-actions { margin-left: auto; }
}

@media (max-width: 760px) {
    .platform-shell { display: block; }
    .platform-sidebar { position: static; display: block; width: 100%; height: auto; padding: 13px; border-right: 0; border-bottom: 1px solid var(--ng-border); }
    .brand-lockup { padding: 0 4px 12px; }
    .sidebar-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
    .nav-label, .sidebar-user, .sidebar-link small { display: none; }
    .sidebar-link { display: flex; min-height: 36px; margin: 0; padding: 7px 10px; }
    .platform-topbar { position: static; padding: 11px 14px; }
    .global-search { grid-template-columns: 16px minmax(0, 1fr); }
    .global-search button, .environment-pill { display: none; }
    .platform-main { padding: 22px 14px 36px; }
    .page-head { align-items: stretch; flex-direction: column; }
    .page-head .primary-button { align-self: flex-start; }
    .metric-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
    .metric-card { min-height: 116px; padding: 14px; }
    .metric-value { font-size: 1.35rem; }
    .status-visual { grid-template-columns: 1fr; }
    .form-grid, .detail-list { grid-template-columns: 1fr; }
    .field-span-2 { grid-column: auto; }
    .app-table th, .app-table td { padding: 12px; }
    .app-table .hide-mobile { display: none; }
    .table-surface .school-cell { min-width: 150px; }
    .responsive-records { border-collapse: separate; border-spacing: 0; }
    .responsive-records thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
    .responsive-records tbody { display: grid; gap: 10px; padding: 0 12px 12px; }
    .responsive-records tr { display: grid; grid-template-columns: 1fr; gap: 9px; padding: 14px; background: #0d0e15; border: 1px solid var(--ng-border-soft); border-radius: 10px; }
    body.light-theme .responsive-records tr { background: var(--ng-panel-raised); border-color: var(--ng-border); }
    .responsive-records td { display: grid; grid-template-columns: minmax(102px, .42fr) minmax(0, 1fr); gap: 12px; padding: 0; border: 0; }
    .responsive-records td::before { color: var(--ng-subtle); content: attr(data-label); font-size: .75rem; font-weight: 650; }
    .responsive-records td:first-child { margin-bottom: 4px; }
    .responsive-records td:first-child::before, .responsive-records td:last-child::before { display: none; }
    .responsive-records td:last-child { display: flex; justify-content: flex-end; }
    .responsive-records .school-cell { min-width: 0; }
    .auth-panel { min-height: 100vh; padding: 18px; }
    .auth-card { padding: 25px; }
    .impersonation-banner { position: static; align-items: flex-start; flex-direction: column; }
    .impersonation-banner > div:last-child { width: 100%; justify-content: space-between; }
    .school-preview-header { min-height: 68px; }
    .school-preview-header { flex-wrap: wrap; gap: 10px; }
    .school-header-nav { order: 3; width: 100%; margin: 0; }
    .school-header-nav a, .school-nav-group { flex: 1; }
    .school-header-nav a { justify-content: center; }
    .school-nav-group { flex: 1; }
    .school-nav-group summary { justify-content: center; }
    .school-nav-menu { right: auto; left: 0; width: 100%; }
    .school-header-nav a, .school-nav-group summary, .primary-button, .secondary-button, .danger-button, .icon-button { min-height: 44px; }
    .icon-button { min-width: 44px; }
    .school-preview-main { padding-top: 26px; }
    .school-preview-grid, .settings-grid, .mfa-setup-grid { grid-template-columns: 1fr; }
    .quick-link-grid { grid-template-columns: 1fr; }
    .role-chip-grid { grid-template-columns: 1fr; }
    .attendance-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .recovery-code-grid { grid-template-columns: 1fr; }
    .access-users .table-responsive { overflow: visible; }
    .access-table, .access-table tbody, .access-table tr, .access-table td { display: block; width: 100%; }
    .access-table thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
    .access-table tbody { display: grid; gap: 12px; }
    .access-table tr { padding: 16px; background: var(--ng-panel-raised); border: 1px solid var(--ng-border); border-radius: 10px; }
    .access-table td { min-width: 0 !important; padding: 12px 0; border: 0; border-bottom: 1px solid var(--ng-border-soft); }
    .access-table td:first-child { padding-top: 0; }
    .access-table td:last-child { padding-bottom: 0; border-bottom: 0; }
    .access-table td::before { display: block; margin-bottom: 7px; color: var(--ng-subtle); content: attr(data-label); font-size: .72rem; font-weight: 650; }
    .inline-assignment-form { grid-template-columns: 1fr; min-width: 0; }
    .inline-assignment-form .secondary-button { width: 100%; min-height: 42px; }
    .learning-workspace { grid-template-columns:1fr; }
    .learning-compose { position:static; }
    .portal-homework-card { grid-template-columns:1fr; gap:14px; }
    .learning-edit[open] > form { position:static; width:100%; margin-top:10px; grid-template-columns:1fr; }.learning-edit-wide { grid-column:auto; }
    .assessment-workspace { grid-template-columns:1fr; }
    .assessment-compose { position:static; }
    .assessment-edit[open] > form { position:static; width:100%; margin-top:10px; grid-template-columns:1fr; }
    .gradebook-head { display:block; }.gradebook-head span { display:block; margin-top:4px; }
    .gradebook-row { grid-template-columns:1fr 1fr; gap:8px; padding:13px 0; }
    .gradebook-learner { grid-column:span 2; }.gradebook-comment,.gradebook-reason { grid-column:span 2; }
    .gradebook-row .icon-button { justify-self:end; }
    .report-card-row { grid-template-columns:1fr; gap:9px; padding:15px 0; }.report-card-actions { justify-content:flex-start; }
}

@media (max-width: 430px) {
    .topbar-actions { display: none; }
}

@media (max-width: 330px) {
    .metric-grid, .sidebar-nav { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* School finance: retained-document workspace */
.finance-page-head { margin-bottom:20px; }
.finance-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-bottom:16px; }
.finance-metrics article { min-height:112px; padding:17px; background:radial-gradient(circle at 95% 100%,rgba(139,92,246,.13),transparent 36%),var(--ng-panel); border:1px solid var(--ng-border-soft); border-radius:12px; }
.finance-metrics span,.finance-metrics small { display:block; color:var(--ng-subtle); font-size:.7rem; }.finance-metrics strong { display:block; margin:10px 0 6px; color:var(--ng-text); font-size:1.28rem; font-variant-numeric:tabular-nums; letter-spacing:-.03em; }
.finance-workspace { display:grid; grid-template-columns:minmax(280px,.72fr) minmax(0,1.55fr); gap:16px; align-items:start; }.finance-compose { position:sticky; top:18px; display:grid; gap:12px; }.finance-form { padding:18px; }.finance-form .surface-head { margin-bottom:16px; }.finance-form .surface-head h2,.finance-ledger .surface-head h2 { font-size:.93rem; }.finance-form .field-group { margin-bottom:12px; }.finance-field-pair { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }.finance-form button { width:100%; justify-content:center; margin-top:3px; }

/* Communications: one retained publishing desk, many focused portal feeds. */
.communications-workspace { display:grid; grid-template-columns:minmax(300px,.72fr) minmax(0,1.38fr); gap:18px; align-items:start; }.communications-compose,.communications-stream,.announcement-feed { background:var(--ng-panel); border:1px solid var(--ng-border); border-radius:12px; }.communications-compose { position:sticky; top:18px; display:grid; gap:14px; padding:20px; }.communications-compose-head,.communications-stream-head,.communications-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }.communications-compose-head h2,.communications-stream-head h2,.communications-card h3,.announcement-feed h2,.announcement-feed h3 { margin:0; color:var(--ng-text); letter-spacing:-.02em; }.communications-compose-head h2,.communications-stream-head h2,.announcement-feed h2 { font-size:1rem; }.communications-card h3 { font-size:.92rem; }.communications-compose-head p,.communications-stream-head p { max-width:46ch; margin:5px 0 0; color:var(--ng-muted); font-size:.74rem; line-height:1.5; }.communications-compose-head > i { display:grid; width:34px; height:34px; flex:0 0 34px; place-items:center; color:var(--ng-violet-bright); background:var(--ng-violet-soft); border:1px solid rgba(139,92,246,.35); border-radius:9px; }.communications-compose .field-group > span { display:block; margin-bottom:7px; color:var(--ng-text); font-size:.72rem; font-weight:650; }.communications-compose .field-group > span small { color:var(--ng-subtle); font-size:.65rem; font-weight:400; }.communications-form-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }.communications-audience { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }.communications-audience label { position:relative; margin:0; }.communications-audience input { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }.communications-audience span { display:flex; min-height:42px; align-items:center; justify-content:center; gap:6px; padding:8px; color:var(--ng-muted); background:var(--ng-panel-raised); border:1px solid var(--ng-border); border-radius:8px; cursor:pointer; font-size:.69rem; font-weight:650; transition:background .2s ease,border-color .2s ease,color .2s ease; }.communications-audience input:checked + span { color:var(--ng-text); background:var(--ng-violet-soft); border-color:var(--ng-violet); }.communications-audience input:focus-visible + span { outline:2px solid var(--ng-focus); outline-offset:2px; }.communications-compose-actions,.communications-card-actions { display:flex; flex-wrap:wrap; gap:8px; }.communications-compose-actions button { flex:1; justify-content:center; }.communications-stream { display:grid; gap:11px; padding:20px; }.communications-stream-head > span { flex:none; color:var(--ng-subtle); font-size:.7rem; }.communications-card { padding:16px; background:var(--ng-panel-raised); border:1px solid var(--ng-border-soft); border-radius:10px; }.communications-card.status-archived { opacity:.66; }.communications-card-head p { margin:4px 0 0; color:var(--ng-subtle); font-size:.68rem; }.communications-message { max-width:72ch; margin:14px 0 0; color:var(--ng-muted); font-size:.76rem; line-height:1.62; white-space:pre-line; }.communications-meta { display:flex; flex-wrap:wrap; gap:8px 15px; margin-top:14px; padding-top:11px; color:var(--ng-subtle); border-top:1px solid var(--ng-border-soft); font-size:.68rem; }.communications-meta i { margin-right:5px; color:var(--ng-violet-bright); }.communications-card-actions { margin-top:13px; }.communications-card-actions form { margin:0; }.communications-empty { padding:44px 20px; text-align:center; }.communications-empty > i { display:grid; width:40px; height:40px; place-items:center; margin:0 auto 12px; color:var(--ng-violet-bright); background:var(--ng-violet-soft); border-radius:10px; }.communications-empty h3 { margin:0; font-size:.9rem; }.communications-empty p { max-width:380px; margin:5px auto 0; color:var(--ng-muted); font-size:.73rem; line-height:1.55; }
.announcement-feed { margin-top:18px; padding:20px; scroll-margin-top:18px; }.announcement-feed .surface-head { margin-bottom:7px; }.announcement-feed-list { display:grid; }.announcement-feed-item { display:grid; grid-template-columns:36px minmax(0,1fr) auto; align-items:start; gap:12px; padding:15px 0; border-top:1px solid var(--ng-border-soft); }.announcement-feed-item:first-child { border-top:0; }.announcement-feed-marker { display:grid; width:36px; height:36px; place-items:center; color:var(--ng-violet-bright); background:var(--ng-violet-soft); border-radius:9px; }.announcement-feed-copy > div { display:flex; align-items:center; gap:8px; }.announcement-feed-copy h3 { font-size:.82rem; }.announcement-feed-copy p { max-width:72ch; margin:5px 0 7px; color:var(--ng-muted); font-size:.74rem; line-height:1.55; white-space:pre-line; }.announcement-feed-copy small { color:var(--ng-subtle); font-size:.67rem; }.announcement-feed-item.is-read { opacity:.72; }.announcement-feed-item form { margin:0; }.announcement-feed-item .text-action { white-space:nowrap; }.announcement-feed .compact-empty { padding:30px 16px; }
body.light-theme .communications-compose,body.light-theme .communications-stream,body.light-theme .announcement-feed { background:var(--ng-panel); border-color:var(--ng-border); } body.light-theme .communications-card,body.light-theme .communications-audience span { background:var(--ng-panel-raised); }
@media (max-width:900px) { .communications-workspace { grid-template-columns:1fr; }.communications-compose { position:static; } }
@media (max-width:620px) { .communications-form-row,.communications-audience { grid-template-columns:1fr; }.communications-audience span { justify-content:flex-start; }.announcement-feed-item { grid-template-columns:32px minmax(0,1fr); }.announcement-feed-marker { width:32px; height:32px; }.announcement-feed-item form { grid-column:2; }.communications-compose-actions { display:grid; grid-template-columns:1fr; } }
.finance-stream { display:grid; gap:16px; }.finance-ledger { padding:0; overflow:hidden; }.finance-ledger > .surface-head { padding:18px 18px 13px; border-bottom:1px solid var(--ng-border-soft); }.finance-list { padding:0 18px; }.finance-list.compact .finance-row { padding-block:11px; }.finance-row { display:grid; grid-template-columns:minmax(220px,1.1fr) minmax(135px,.55fr) auto; align-items:center; gap:14px; padding:14px 0; border-bottom:1px solid var(--ng-border-soft); }.finance-row:last-child { border-bottom:0; }.finance-row-main { display:flex; align-items:center; gap:10px; min-width:0; }.finance-document-mark { display:grid; width:34px; height:34px; flex:0 0 34px; place-items:center; color:#d8c8ff; background:#251f35; border:1px solid #443566; border-radius:9px; }.finance-document-mark.payment { color:#d9f3bd; background:#1d2a1d; border-color:#405c37; }.finance-document-mark.receipt { color:#ffdfa0; background:#302715; border-color:#625231; }.finance-row strong,.finance-row small { display:block; }.finance-row-main strong,.finance-row-amount strong { color:var(--ng-text); font-size:.76rem; }.finance-row-main small,.finance-row-amount small { margin-top:3px; overflow:hidden; color:var(--ng-subtle); font-size:.67rem; text-overflow:ellipsis; white-space:nowrap; }.finance-row-amount { font-variant-numeric:tabular-nums; }.finance-row-actions { display:flex; align-items:center; justify-content:flex-end; gap:7px; }.finance-row-actions form { margin:0; }.finance-row-actions .primary-button { min-height:34px; padding:6px 10px; font-size:.68rem; }
.status-draft::before { background:var(--ng-violet-bright); }.status-issued::before { background:var(--ng-yellow); }.status-partially_paid::before,.status-partially_allocated::before { background:var(--ng-violet-bright); }.status-paid::before,.status-allocated::before,.status-posted::before { background:var(--ng-green); }.status-refunded::before,.status-superseded::before { background:var(--ng-subtle); }
.finance-config,.finance-allocation { position:relative; }.finance-config > summary,.finance-allocation > summary { display:inline-flex; align-items:center; gap:7px; min-height:36px; padding:7px 10px; color:var(--ng-muted); background:var(--ng-panel-soft); border:1px solid var(--ng-border); border-radius:8px; cursor:pointer; font-size:.7rem; list-style:none; }.finance-config > summary::-webkit-details-marker,.finance-allocation > summary::-webkit-details-marker { display:none; }.finance-config[open] > div { display:grid; gap:13px; margin-top:10px; padding:14px; background:var(--ng-panel); border:1px solid var(--ng-border); border-radius:10px; }.finance-config form,.finance-allocation form { display:grid; gap:8px; }.finance-config label,.finance-allocation label { display:grid; gap:4px; color:var(--ng-subtle); font-size:.66rem; }.finance-config input,.finance-config select,.finance-allocation input,.finance-allocation select { width:100%; min-height:35px; padding:6px 8px; color:var(--ng-text); background:#0b0c12; border:1px solid var(--ng-border); border-radius:7px; font-size:.7rem; color-scheme:dark; }.finance-config .secondary-button { min-height:35px; font-size:.68rem; }.finance-allocation[open] > form { position:absolute; z-index:14; right:0; display:grid; width:min(285px,calc(100vw - 52px)); margin-top:8px; padding:12px; background:var(--ng-panel); border:1px solid var(--ng-border); border-radius:10px; box-shadow:0 18px 45px rgba(0,0,0,.28); }.finance-allocation .secondary-button,.finance-allocation .danger-button { justify-content:center; min-height:35px; font-size:.68rem; }
body.light-theme .finance-metrics article { background:radial-gradient(circle at 95% 100%,rgba(112,70,217,.1),transparent 36%),var(--ng-panel); border-color:var(--ng-border); }.light-theme .finance-document-mark { color:#5138a1; background:#f1ecff; border-color:#d1c2fc; }.light-theme .finance-document-mark.payment { color:#34731c; background:#edf8e9; border-color:#b9dfaf; }.light-theme .finance-document-mark.receipt { color:#855d00; background:#fff7df; border-color:#ecd18a; }.light-theme .finance-config input,.light-theme .finance-config select,.light-theme .finance-allocation input,.light-theme .finance-allocation select { color:var(--ng-text); background:var(--ng-panel); border-color:var(--ng-border); color-scheme:light; }.light-theme .finance-allocation[open] > form { box-shadow:0 14px 30px rgba(26,34,52,.13); }
@media (max-width: 960px) { .finance-workspace { grid-template-columns:1fr; }.finance-compose { position:static; grid-template-columns:repeat(2,minmax(0,1fr)); }.finance-config { grid-column:span 2; } }
@media (max-width: 760px) { .finance-metrics { grid-template-columns:1fr; }.finance-compose { grid-template-columns:1fr; }.finance-config { grid-column:auto; }.finance-row { grid-template-columns:1fr; gap:9px; padding:15px 0; }.finance-row-amount { padding-left:44px; }.finance-row-actions { justify-content:flex-start; padding-left:44px; }.finance-allocation[open] > form { position:static; width:100%; margin-top:8px; }.finance-ledger > .surface-head { align-items:flex-start; }.finance-field-pair { grid-template-columns:1fr; } }

/* Operational reports: one filter context, three evidence views. */
.reports-page-head { margin-bottom:18px; }
.report-switcher { display:flex; gap:6px; margin-bottom:10px; padding:5px; overflow-x:auto; background:var(--ng-panel); border:1px solid var(--ng-border-soft); border-radius:12px; }
.report-switcher a { display:flex; min-width:190px; flex:1 0 0; align-items:center; gap:10px; padding:10px 12px; color:var(--ng-muted); border:1px solid transparent; border-radius:8px; text-decoration:none; transition:background .2s ease,border-color .2s ease,color .2s ease; }
.report-switcher a:hover { color:var(--ng-text); background:var(--ng-panel-raised); }
.report-switcher a.active { color:var(--ng-text); background:var(--ng-violet-soft); border-color:rgba(139,92,246,.38); }
.report-switcher a > i { color:var(--ng-violet-bright); font-size:.94rem; }
.report-switcher span,.report-switcher small { display:block; }
.report-switcher span { font-size:.76rem; font-weight:650; }
.report-switcher small { margin-top:2px; color:var(--ng-subtle); font-size:.75rem; font-weight:400; }
.report-filter { display:grid; grid-template-columns:repeat(2,minmax(135px,.6fr)) minmax(165px,.8fr) minmax(210px,1fr) auto auto; align-items:end; gap:9px; margin-bottom:16px; padding:14px; background:var(--ng-panel); border:1px solid var(--ng-border-soft); border-radius:12px; }
.report-filter label { display:grid; gap:6px; margin:0; color:var(--ng-subtle); font-size:.75rem; font-weight:650; }
.report-filter input,.report-filter select { width:100%; min-height:40px; padding:8px 10px; color:var(--ng-text); background:#0b0c12; border:1px solid var(--ng-border); border-radius:8px; color-scheme:dark; font-size:.75rem; }
.report-filter input:focus,.report-filter select:focus { border-color:var(--ng-violet); outline:0; box-shadow:0 0 0 3px rgba(139,92,246,.13); }
.report-filter .secondary-button { min-height:40px; white-space:nowrap; }
.report-filter .text-button { min-height:40px; align-content:center; padding:0 5px; white-space:nowrap; }
.report-summary { display:grid; grid-template-columns:minmax(250px,.8fr) minmax(0,2fr); margin-bottom:16px; overflow:hidden; background:var(--ng-panel); border:1px solid var(--ng-border); border-radius:12px; }
.report-summary-primary { position:relative; padding:20px; overflow:hidden; border-right:1px solid var(--ng-border-soft); }
.report-summary-primary::after { position:absolute; right:-42px; bottom:-62px; width:170px; height:150px; content:""; background:radial-gradient(circle,rgba(139,92,246,.2),transparent 68%); pointer-events:none; }
.report-summary-primary > span,.report-summary-primary > p { display:block; color:var(--ng-subtle); font-size:.75rem; }
.report-summary-primary > strong { display:block; margin:8px 0 5px; color:var(--ng-text); font-size:1.65rem; font-variant-numeric:tabular-nums; letter-spacing:-.035em; }
.report-summary-primary > strong small { color:var(--ng-muted); font-size:.75rem; font-weight:600; letter-spacing:.02em; }
.report-summary-primary > p { max-width:42ch; margin:0; line-height:1.5; }
.report-summary dl { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); margin:0; }
.report-summary dl > div { display:flex; min-width:0; flex-direction:column; justify-content:center; padding:18px 14px; border-left:1px solid var(--ng-border-soft); }
.report-summary dl > div:first-child { border-left:0; }
.report-summary dt { overflow:hidden; color:var(--ng-subtle); font-size:.75rem; font-weight:500; text-overflow:ellipsis; white-space:nowrap; }
.report-summary dd { margin:6px 0 0; color:var(--ng-text); font-size:.94rem; font-variant-numeric:tabular-nums; font-weight:650; }
.report-table-surface { padding:0; overflow:hidden; }
.report-table-surface > .surface-head { margin:0; padding:18px 20px 14px; border-bottom:1px solid var(--ng-border-soft); }
.report-table { width:100%; border-collapse:collapse; }
.report-table th { padding:10px 14px; color:var(--ng-subtle); background:var(--ng-panel-raised); border-bottom:1px solid var(--ng-border-soft); font-size:.75rem; font-weight:650; letter-spacing:.03em; text-align:left; text-transform:uppercase; white-space:nowrap; }
.report-table td { padding:13px 14px; color:var(--ng-muted); border-bottom:1px solid var(--ng-border-soft); font-size:.73rem; vertical-align:middle; }
.report-table tr:last-child td { border-bottom:0; }
.report-table tbody tr:hover { background:rgba(255,255,255,.018); }
.report-table td strong,.report-table td small { display:block; }
.report-table td strong { color:var(--ng-text); font-size:.75rem; font-variant-numeric:tabular-nums; }
.report-table td small { margin-top:3px; color:var(--ng-subtle); font-size:.75rem; }
.report-rate { display:inline-block; width:64px; height:5px; margin-right:8px; overflow:hidden; vertical-align:middle; background:var(--ng-panel-soft); border-radius:5px; }
.report-rate > span { display:block; width:var(--report-value); max-width:100%; height:100%; background:var(--ng-violet); border-radius:inherit; }
.report-table td[data-label="Rate"] > strong { display:inline-block; }
.report-empty { padding:50px 20px; text-align:center; }
.report-empty > i { display:grid; width:42px; height:42px; place-items:center; margin:0 auto 13px; color:var(--ng-violet-bright); background:var(--ng-violet-soft); border-radius:10px; font-size:.94rem; }
.report-empty h3 { margin:0; color:var(--ng-text); font-size:.92rem; }
.report-empty p { max-width:480px; margin:6px auto 0; color:var(--ng-muted); font-size:.73rem; line-height:1.55; }
body.light-theme .report-switcher,body.light-theme .report-filter,body.light-theme .report-summary { background:var(--ng-panel); border-color:var(--ng-border); }
body.light-theme .report-filter input,body.light-theme .report-filter select { color:var(--ng-text); background:var(--ng-panel); border-color:var(--ng-border); color-scheme:light; }
body.light-theme .report-switcher a.active { background:var(--ng-violet-soft); border-color:var(--ng-violet); }
body.light-theme .report-table tbody tr:hover { background:rgba(26,34,52,.025); }
@media (max-width:1100px) { .report-filter { grid-template-columns:repeat(4,minmax(0,1fr)); }.report-filter .secondary-button { grid-column:span 3; }.report-summary { grid-template-columns:1fr; }.report-summary-primary { border-right:0; border-bottom:1px solid var(--ng-border-soft); } }
@media (max-width:760px) { .report-switcher a { min-width:155px; }.report-switcher small { display:none; }.report-filter { grid-template-columns:repeat(2,minmax(0,1fr)); }.report-filter .secondary-button { grid-column:span 1; }.report-summary dl { grid-template-columns:repeat(2,minmax(0,1fr)); }.report-summary dl > div { border-top:1px solid var(--ng-border-soft); }.report-summary dl > div:nth-child(odd) { border-left:0; }.report-table-surface .table-responsive { overflow:visible; }.report-table,.report-table tbody,.report-table tr,.report-table td { display:block; width:100%; }.report-table thead { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }.report-table tbody { display:grid; gap:10px; padding:12px; }.report-table tr { padding:14px; background:var(--ng-panel-raised); border:1px solid var(--ng-border-soft); border-radius:10px; }.report-table td { display:grid; grid-template-columns:minmax(105px,.42fr) minmax(0,1fr); gap:12px; padding:7px 0; border:0; }.report-table td::before { color:var(--ng-subtle); content:attr(data-label); font-size:.75rem; font-weight:650; }.report-table td:first-child { padding-top:0; }.report-table td:last-child { padding-bottom:0; }.report-table td strong { text-align:left; }.report-rate { align-self:center; }.report-table td[data-label="Rate"] { grid-template-columns:minmax(105px,.42fr) 64px auto; }.report-table td[data-label="Rate"]::before { grid-row:1; }.report-table td[data-label="Rate"] > strong { align-self:center; } }
@media (max-width:460px) { .report-filter { grid-template-columns:1fr; }.report-filter .secondary-button { grid-column:auto; }.report-summary dl { grid-template-columns:1fr 1fr; }.reports-page-head .primary-button { width:100%; justify-content:center; } }

/* Family fee statements: quiet summaries backed by the retained school ledger. */
.portal-finance-summary {
    display: grid;
    grid-template-columns: minmax(230px, 1fr) minmax(360px, 1.2fr) auto;
    align-items: center;
    gap: 22px;
    margin-top: 18px;
    padding: 20px 22px;
    background: var(--ng-panel);
    border: 1px solid var(--ng-border-soft);
    border-radius: 14px;
}
.portal-finance-copy { display: flex; align-items: center; gap: 12px; min-width: 0; }
.portal-finance-icon { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; color: var(--ng-violet-bright); background: var(--ng-violet-soft); border-radius: 10px; }
.portal-finance-copy h2 { margin: 0; color: var(--ng-text); font-size: .94rem; letter-spacing: -.02em; }
.portal-finance-copy p { max-width: 48ch; margin: 4px 0 0; color: var(--ng-muted); font-size: .78rem; line-height: 1.5; }
.portal-finance-totals { display: grid; grid-template-columns: 1.25fr repeat(2, 1fr); margin: 0; }
.portal-finance-totals > div { min-width: 0; padding: 3px 16px; border-left: 1px solid var(--ng-border-soft); }
.portal-finance-totals dt { color: var(--ng-subtle); font-size: .75rem; font-weight: 500; }
.portal-finance-totals dd { margin: 5px 0 0; color: var(--ng-text); font-size: .94rem; font-variant-numeric: tabular-nums; font-weight: 680; }
.portal-finance-totals .is-primary dd { font-size: .94rem; letter-spacing: -.025em; }
.portal-finance-totals dd small { color: var(--ng-muted); font-size: .75rem; letter-spacing: .03em; }
.portal-finance-link { justify-content: center; white-space: nowrap; }
.portal-family-finance { margin-top: 18px; padding: 20px; background: var(--ng-panel); border: 1px solid var(--ng-border-soft); border-radius: 14px; }
.portal-family-finance > .surface-head { margin-bottom: 5px; }
.portal-family-finance .portal-finance-summary { margin-top: 10px; padding: 15px 0; background: transparent; border: 0; border-top: 1px solid var(--ng-border-soft); border-radius: 0; }
.portal-family-finance .portal-finance-summary:first-of-type { border-top: 0; }

.portal-statement-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.portal-statement-head h1 { margin: 12px 0 5px; color: var(--ng-text); font-size: clamp(1.55rem, 3vw, 2.05rem); letter-spacing: -.035em; line-height: 1; }
.portal-statement-head p { margin: 0; color: var(--ng-muted); font-size: .78rem; }
.portal-back-link { display: inline-flex; align-items: center; gap: 7px; color: var(--ng-violet-bright); font-size: .75rem; text-decoration: none; }
.portal-back-link:hover { color: var(--ng-text); }
.portal-statement-balance { display: grid; grid-template-columns: minmax(260px, .82fr) minmax(0, 1.7fr); margin-bottom: 16px; overflow: hidden; background: var(--ng-panel); border: 1px solid var(--ng-border); border-radius: 14px; }
.portal-statement-balance > div { position: relative; padding: 24px; overflow: hidden; border-right: 1px solid var(--ng-border-soft); }
.portal-statement-balance > div::after { position: absolute; right: -56px; bottom: -82px; width: 190px; height: 180px; content: ""; background: radial-gradient(circle, rgba(139, 92, 246, .2), transparent 68%); pointer-events: none; }
.portal-statement-balance span, .portal-statement-balance p { color: var(--ng-subtle); font-size: .75rem; }
.portal-statement-balance strong { display: block; margin: 8px 0 5px; color: var(--ng-text); font-size: 1.65rem; font-variant-numeric: tabular-nums; letter-spacing: -.035em; }
.portal-statement-balance strong small { color: var(--ng-muted); font-size: .75rem; letter-spacing: .03em; }
.portal-statement-balance p { max-width: 45ch; margin: 0; line-height: 1.5; }
.portal-statement-balance dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.portal-statement-balance dl > div { display: flex; min-width: 0; flex-direction: column; justify-content: center; padding: 20px; border-left: 1px solid var(--ng-border-soft); }
.portal-statement-balance dl > div:first-child { border-left: 0; }
.portal-statement-balance dt { color: var(--ng-subtle); font-size: .75rem; font-weight: 500; }
.portal-statement-balance dd { margin: 6px 0 0; color: var(--ng-text); font-size: .94rem; font-variant-numeric: tabular-nums; font-weight: 680; }
.portal-statement-section { margin-top: 16px; overflow: hidden; background: var(--ng-panel); border: 1px solid var(--ng-border-soft); border-radius: 14px; }
.portal-statement-section > .surface-head { margin: 0; padding: 19px 20px 14px; border-bottom: 1px solid var(--ng-border-soft); }
.portal-statement-table { width: 100%; border-collapse: collapse; }
.portal-statement-table th { padding: 10px 14px; color: var(--ng-subtle); background: var(--ng-panel-raised); border-bottom: 1px solid var(--ng-border-soft); font-size: .75rem; font-weight: 650; letter-spacing: .035em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.portal-statement-table td { padding: 14px; color: var(--ng-muted); border-bottom: 1px solid var(--ng-border-soft); font-size: .78rem; font-variant-numeric: tabular-nums; vertical-align: middle; }
.portal-statement-table tr:last-child td { border-bottom: 0; }
.portal-statement-table td strong, .portal-statement-table td small { display: block; }
.portal-statement-table td strong { color: var(--ng-text); font-size: .75rem; }
.portal-statement-table td small { max-width: 32ch; margin-top: 3px; overflow: hidden; color: var(--ng-subtle); font-size: .75rem; text-overflow: ellipsis; white-space: nowrap; }
.portal-payment-list { padding: 0 20px; }
.portal-payment-list > article { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 20px; padding: 16px 0; border-bottom: 1px solid var(--ng-border-soft); }
.portal-payment-list > article:last-child { border-bottom: 0; }
.portal-payment-main { display: flex; align-items: center; gap: 11px; min-width: 0; }
.portal-payment-main strong, .portal-payment-main small, .portal-payment-amount strong, .portal-payment-amount small { display: block; }
.portal-payment-main strong, .portal-payment-amount strong { color: var(--ng-text); font-size: .75rem; }
.portal-payment-main small, .portal-payment-amount small { margin-top: 3px; color: var(--ng-subtle); font-size: .75rem; }
.portal-payment-amount { text-align: right; font-variant-numeric: tabular-nums; }
.portal-receipts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 7px; padding-left: 49px; }
.portal-receipts span { display: inline-flex; align-items: center; gap: 5px; padding: 6px 8px; color: var(--ng-muted); background: var(--ng-panel-raised); border-radius: 7px; font-size: .75rem; }
.portal-receipts i { color: var(--ng-violet-bright); }
.portal-receipts em { color: var(--ng-red); font-style: normal; }
.portal-adjustments { padding: 15px 20px 18px; border-top: 1px solid var(--ng-border-soft); }
.portal-adjustments h3 { margin: 0 0 9px; color: var(--ng-text); font-size: .78rem; }
.portal-adjustments p { display: flex; align-items: center; gap: 7px; margin: 6px 0 0; color: var(--ng-muted); font-size: .75rem; }
.portal-adjustments i { color: var(--ng-violet-bright); }
.portal-adjustments strong { color: var(--ng-text); }
.portal-finance-empty { display: flex; align-items: center; gap: 11px; min-height: 100px; padding: 22px; color: var(--ng-muted); }
.portal-finance-empty > i { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; color: var(--ng-violet-bright); background: var(--ng-violet-soft); border-radius: 9px; }
.portal-finance-empty strong, .portal-finance-empty span { display: block; }
.portal-finance-empty strong { color: var(--ng-text); font-size: .75rem; }
.portal-finance-empty span { max-width: 55ch; margin-top: 3px; font-size: .75rem; line-height: 1.5; }
.portal-statement-note { display: flex; align-items: flex-start; gap: 7px; margin: 14px 3px 0; color: var(--ng-subtle); font-size: .75rem; line-height: 1.5; }
.portal-statement-note i { color: var(--ng-violet-bright); }
body.light-theme .portal-finance-summary, body.light-theme .portal-family-finance, body.light-theme .portal-statement-balance, body.light-theme .portal-statement-section { background: var(--ng-panel); border-color: var(--ng-border); }

@media (max-width: 900px) {
    .portal-finance-summary { grid-template-columns: minmax(0, 1fr) auto; }
    .portal-finance-totals { grid-column: 1 / -1; grid-row: 2; }
    .portal-finance-totals > div:first-child { padding-left: 0; border-left: 0; }
    .portal-statement-balance { grid-template-columns: 1fr; }
    .portal-statement-balance > div { border-right: 0; border-bottom: 1px solid var(--ng-border-soft); }
}
@media (max-width: 620px) {
    .portal-finance-summary { grid-template-columns: 1fr; gap: 15px; padding: 18px; }
    .portal-finance-totals { grid-column: auto; grid-row: auto; }
    .portal-finance-link { width: 100%; }
    .portal-family-finance .portal-finance-summary { padding: 15px 0; }
    .portal-statement-head { align-items: flex-start; flex-direction: column; }
    .portal-print-button { width: 100%; justify-content: center; }
    .portal-statement-balance dl { grid-template-columns: 1fr; }
    .portal-statement-balance dl > div { padding: 13px 20px; border-top: 1px solid var(--ng-border-soft); border-left: 0; }
    .portal-statement-section .table-responsive { overflow: visible; }
    .portal-statement-table, .portal-statement-table tbody, .portal-statement-table tr, .portal-statement-table td { display: block; width: 100%; }
    .portal-statement-table thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
    .portal-statement-table tbody { display: grid; gap: 10px; padding: 12px; }
    .portal-statement-table tr { padding: 13px; background: var(--ng-panel-raised); border-radius: 9px; }
    .portal-statement-table td { display: grid; grid-template-columns: 95px minmax(0, 1fr); gap: 10px; padding: 6px 0; border: 0; }
    .portal-statement-table td::before { color: var(--ng-subtle); content: attr(data-label); font-size: .75rem; font-weight: 650; }
    .portal-statement-table td strong { text-align: left; }
    .portal-payment-list > article { grid-template-columns: 1fr; }
    .portal-payment-amount { padding-left: 49px; text-align: left; }
}
@media print {
    .portal-body {
        --ng-bg: white;
        --ng-sidebar: white;
        --ng-panel: white;
        --ng-panel-raised: #f4f3f8;
        --ng-panel-soft: #f4f3f8;
        --ng-border: #9293a4;
        --ng-border-soft: #8a8b9d;
        --ng-text: #07070c;
        --ng-muted: #292a38;
        --ng-subtle: #292a38;
        --ng-violet-bright: #292a38;
        --ng-violet: #292a38;
        --ng-violet-soft: #f4f3f8;
        --ng-green: #292a38;
        --ng-yellow: #292a38;
        --ng-red: #292a38;
        color: var(--ng-text);
        background: white;
        print-color-adjust: economy;
    }
    .portal-header, .portal-back-link, .portal-print-button, .request-loader { display: none !important; }
    .portal-main { width: 100%; padding: 0; }
    .portal-statement-head { margin-bottom: 18px; }
    .portal-statement-head h1, .portal-statement-head p, .portal-statement-balance strong, .portal-statement-balance dd, .portal-statement-section h2, .portal-statement-table td strong, .portal-payment-main strong, .portal-payment-amount strong { color: #07070c; }
    .portal-statement-balance { break-inside: avoid; background: white; border-color: #9293a4; }
    .portal-statement-section { background: white; border-color: #9293a4; }
    .portal-statement-balance > div, .portal-statement-balance dl > div, .portal-statement-section > .surface-head, .portal-statement-table th, .portal-statement-table td, .portal-payment-list > article { border-color: #8a8b9d; }
    .portal-statement-table th { color: #292a38; background: #f4f3f8; }
    .status-badge { color: #1d1e29 !important; background: white !important; border-color: #9293a4 !important; }
    .portal-statement-table tr, .portal-payment-list > article, .portal-adjustments p { break-inside: avoid; }
    .portal-receipts span { color: var(--ng-muted); background: var(--ng-panel-raised); }
}

/* Guardian access editor: relationship context stays visible beside each grant. */
.guardian-access { margin-top: 16px; padding: 0; overflow: hidden; }
.guardian-access > .surface-head { margin: 0; padding: 20px 22px 15px; border-bottom: 1px solid var(--ng-border-soft); }
.guardian-access > .surface-head p { max-width: 72ch; }
.guardian-access > form { margin: 0; }
.guardian-access-list { padding: 0 22px; }
.guardian-access-row { display: grid; grid-template-columns: 38px minmax(190px, .8fr) minmax(300px, 1.2fr); align-items: center; gap: 13px; padding: 17px 0; border-bottom: 1px solid var(--ng-border-soft); }
.guardian-access-row:last-child { border-bottom: 0; }
.guardian-access-avatar { display: grid; width: 38px; height: 38px; place-items: center; color: var(--ng-violet-bright); background: var(--ng-violet-soft); border: 1px solid rgba(139, 92, 246, .32); border-radius: 10px; font-size: .75rem; font-weight: 700; }
.guardian-access-child strong, .guardian-access-child span, .guardian-access-permission strong, .guardian-access-permission span { display: block; }
.guardian-access-child strong, .guardian-access-permission strong { color: var(--ng-text); font-size: .78rem; }
.guardian-access-child span, .guardian-access-permission span { margin-top: 3px; color: var(--ng-subtle); font-size: .75rem; line-height: 1.4; }
.guardian-access-permission { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.guardian-access-choice { position: relative; flex: none; margin: 0; }
.guardian-access-choice input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.guardian-access-choice > span { display: inline-flex; min-width: 82px; min-height: 38px; align-items: center; justify-content: center; gap: 6px; margin: 0; padding: 8px 12px; color: var(--ng-muted); background: var(--ng-panel-raised); border: 1px solid var(--ng-border); border-radius: 8px; cursor: pointer; font-size: .75rem; font-weight: 650; transition: color .2s ease, background .2s ease, border-color .2s ease; }
.guardian-access-choice > span i { opacity: .45; }
.guardian-access-choice input:checked + span { color: var(--ng-text); background: var(--ng-violet-soft); border-color: var(--ng-violet); }
.guardian-access-choice input:checked + span i { opacity: 1; }
.guardian-access-choice input:focus-visible + span { outline: 2px solid #c6aaff; outline-offset: 2px; }
.guardian-access-choice:hover > span { color: var(--ng-text); border-color: var(--ng-violet); }
.guardian-access-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 22px 19px; background: var(--ng-panel-raised); border-top: 1px solid var(--ng-border-soft); }
.guardian-access-actions p { display: flex; align-items: flex-start; gap: 7px; max-width: 66ch; margin: 0; color: var(--ng-subtle); font-size: .75rem; line-height: 1.5; }
.guardian-access-actions p i { margin-top: 1px; color: var(--ng-violet-bright); }
.guardian-access-actions .primary-button { flex: none; }
.guardian-access-empty { display: flex; min-height: 150px; align-items: center; justify-content: center; gap: 12px; padding: 28px; color: var(--ng-muted); }
.guardian-access-empty > i { display: grid; width: 38px; height: 38px; place-items: center; color: var(--ng-violet-bright); background: var(--ng-violet-soft); border-radius: 10px; }
.guardian-access-empty strong, .guardian-access-empty span { display: block; }
.guardian-access-empty strong { color: var(--ng-text); font-size: .78rem; }
.guardian-access-empty span { max-width: 48ch; margin-top: 4px; font-size: .75rem; }
.guardian-access-history { padding: 18px 22px 21px; border-top: 1px solid var(--ng-border-soft); }
.guardian-access-history h3 { margin: 0 0 10px; color: var(--ng-text); font-size: .94rem; letter-spacing: -.02em; }
.guardian-access-history > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 22px; }
.guardian-access-history p { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 10px 0; color: var(--ng-muted); border-bottom: 1px solid var(--ng-border-soft); font-size: .75rem; line-height: 1.45; }
.guardian-access-history p > span:last-child { min-width: 0; }
.guardian-access-history p strong, .guardian-access-history p small { display: block; }
.guardian-access-history p strong { color: var(--ng-text); }
.guardian-access-history p small { margin-top: 3px; color: var(--ng-subtle); font-size: .75rem; }
.guardian-history-mark { display: grid; width: 30px; height: 30px; flex: 0 0 30px; place-items: center; color: var(--ng-muted); background: var(--ng-panel-raised); border-radius: 8px; }
.guardian-history-mark.is-granted { color: var(--ng-green); }
.guardian-history-mark.is-revoked { color: var(--ng-red); }
body.light-theme .guardian-access-actions { background: var(--ng-panel-raised); }

@media (max-width: 760px) {
    .guardian-access-row { grid-template-columns: 38px minmax(0, 1fr); }
    .guardian-access-permission { grid-column: 2; padding-top: 10px; border-top: 1px solid var(--ng-border-soft); }
    .guardian-access-history > div { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
    .guardian-access > .surface-head { align-items: flex-start; }
    .guardian-access > .surface-head .status-badge { display: none; }
    .guardian-access-list { padding: 0 18px; }
    .guardian-access-row { grid-template-columns: 34px minmax(0, 1fr); gap: 10px; }
    .guardian-access-avatar { width: 34px; height: 34px; }
    .guardian-access-permission { grid-column: 1 / -1; align-items: flex-start; flex-direction: column; gap: 10px; }
    .guardian-access-choice, .guardian-access-choice > span { width: 100%; }
    .guardian-access-actions { align-items: stretch; flex-direction: column; padding-inline: 18px; }
    .guardian-access-actions .primary-button { width: 100%; justify-content: center; }
    .guardian-access-history { padding-inline: 18px; }
}

/* Migration imports */
.import-journey { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0; margin:0 0 16px; padding:0; overflow:hidden; list-style:none; background:var(--ng-panel-raised); border:1px solid var(--ng-border); border-radius:12px; }
.import-journey li { display:flex; align-items:center; gap:10px; min-width:0; padding:13px 16px; border-left:1px solid var(--ng-border-soft); }
.import-journey li:first-child { border-left:0; }
.import-journey li > span { display:grid; width:24px; height:24px; flex:0 0 24px; place-items:center; color:var(--ng-subtle); background:var(--ng-panel-soft); border:1px solid var(--ng-border); border-radius:50%; font-size:.68rem; font-weight:750; font-variant-numeric:tabular-nums; }
.import-journey div { display:grid; min-width:0; gap:2px; }
.import-journey strong { color:var(--ng-muted); font-size:.74rem; }
.import-journey small { overflow:hidden; color:var(--ng-subtle); font-size:.67rem; text-overflow:ellipsis; white-space:nowrap; }
.import-journey .is-current { background:rgba(139,92,246,.09); }
.import-journey .is-current > span { color:#fff; background:var(--ng-violet); border-color:var(--ng-violet-bright); box-shadow:0 6px 16px rgba(110,67,218,.22); }
.import-journey .is-current strong { color:var(--ng-text); }
.import-journey .is-complete > span { color:#1e3e0d; background:var(--ng-green); border-color:#b4ee84; }
.import-journey .is-complete strong { color:var(--ng-text); }
.import-intro .import-template-list { display: grid; gap: 10px; margin-top: 14px; }
.import-template { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; background: var(--ng-panel-raised); border: 1px solid var(--ng-border-soft); border-radius: 10px; }
.import-template strong { display: block; color: var(--ng-text); font-size: .86rem; }
.import-template small { display: block; max-width: 62ch; margin-top: 4px; color: var(--ng-muted); font-size: .73rem; line-height: 1.5; }
.import-limits { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 16px 0 0; padding: 0; list-style: none; }
.import-limits li { display: inline-flex; align-items: center; gap: 7px; color: var(--ng-subtle); font-size: .73rem; }
.import-limits i { color: var(--ng-violet-bright); }
.import-upload .file-upload-status { display: block; margin-top: 6px; color: var(--ng-subtle); font-size: .73rem; }
.import-upload .file-upload-error { margin: 12px 0 0; color: var(--ng-red); font-size: .75rem; }
.import-status { display: grid; grid-template-columns: minmax(250px, .8fr) minmax(0, 2fr); margin-bottom: 16px; overflow: hidden; background: var(--ng-panel); border: 1px solid var(--ng-border); border-radius: 12px; }
.import-status-primary { padding: 20px; border-right: 1px solid var(--ng-border-soft); }
.import-status-primary > span { display: block; color: var(--ng-subtle); font-size: .75rem; }
.import-status-primary > strong { display: block; margin: 9px 0 7px; }
.import-status-primary > p { max-width: 44ch; margin: 0; color: var(--ng-muted); font-size: .73rem; line-height: 1.55; }
.import-status dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.import-status dl > div { display: flex; min-width: 0; flex-direction: column; justify-content: center; padding: 16px 14px; border-left: 1px solid var(--ng-border-soft); border-top: 1px solid var(--ng-border-soft); }
.import-status dl > div:nth-child(-n+3) { border-top: 0; }
.import-status dt { color: var(--ng-subtle); font-size: .75rem; font-weight: 500; }
.import-status dd { margin: 6px 0 0; color: var(--ng-text); font-size: .94rem; font-variant-numeric: tabular-nums; font-weight: 650; }
.import-mapping-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-top: 14px; }
.import-mapping-field { display:flex; min-height:126px; flex-direction:column; padding:12px; background:var(--ng-panel-raised); border:1px solid var(--ng-border-soft); border-radius:10px; }
.import-mapping-field select { margin-top:7px; }
.import-mapping-field small { margin-top:auto; padding-top:8px; }
.import-required { margin-left: 6px; color: var(--ng-violet-bright); font-size: .7rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.import-run form { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 12px; }
.import-run--dry { border-color:rgba(139,92,246,.34); }
.import-run--commit { border-color:rgba(167,121,255,.55); background:linear-gradient(145deg,var(--ng-panel),rgba(67,42,119,.2)); }
.import-run--committed { border-color:rgba(155,225,93,.32); }
.import-run--commit form { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; }
.import-run--commit .guardian-access-choice { grid-column:1/-1; min-height:50px; padding:10px 12px; background:rgba(139,92,246,.09); border:1px solid rgba(167,121,255,.3); border-radius:9px; }
.import-run--commit .form-actions { margin:0; }
.import-run--commit .import-run-note { justify-self:end; text-align:right; }
.import-run-note { display: inline-flex; align-items: center; gap: 7px; margin: 0; color: var(--ng-subtle); font-size: .73rem; }
.import-run-note i { color: var(--ng-violet-bright); }
.status-completed::before { background: var(--ng-green); box-shadow: 0 0 7px rgba(155, 225, 93, .5); }
.status-ready::before, .status-running::before { background: var(--ng-violet-bright); }
.status-mapping::before { background: var(--ng-yellow); }
.status-failed::before { background: var(--ng-red); }
body.light-theme .import-status, body.light-theme .import-template, body.light-theme .import-journey { background: var(--ng-panel); border-color: var(--ng-border); }
body.light-theme .import-mapping-field { background:var(--ng-panel-raised); border-color:var(--ng-border); }
body.light-theme .import-journey .is-current { background:#f2edff; }
body.light-theme .import-run--commit { background:linear-gradient(145deg,var(--ng-panel),#f5f1ff); }

@media (max-width: 860px) {
    .import-status { grid-template-columns: 1fr; }
    .import-status-primary { border-right: 0; border-bottom: 1px solid var(--ng-border-soft); }
    .import-status dl > div:nth-child(-n+3) { border-top: 1px solid var(--ng-border-soft); }
    .import-status dl > div:first-child { border-top: 0; }
}
@media (max-width: 560px) {
    .import-journey { grid-template-columns:1fr; }
    .import-journey li { border-top:1px solid var(--ng-border-soft); border-left:0; }
    .import-journey li:first-child { border-top:0; }
    .import-template { align-items: flex-start; flex-direction: column; }
    .import-status dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .import-status dl > div:nth-child(-n+3) { border-top: 1px solid var(--ng-border-soft); }
    .import-status dl > div:first-child { border-top: 0; }
    .import-run--commit form { grid-template-columns:1fr; }
    .import-run--commit .import-run-note { justify-self:start; text-align:left; }
}

/* Academic lifecycle review */
.lifecycle-review { align-items:start; }
.lifecycle-review .surface-head { align-items:flex-start; gap:16px; }
.lifecycle-state { display:inline-flex; align-items:center; gap:6px; flex:none; padding:7px 9px; border:1px solid; border-radius:999px; font-size:.69rem; font-weight:700; white-space:nowrap; }
.lifecycle-state.is-clear { color:#c9f4ad; background:rgba(155,225,93,.08); border-color:rgba(155,225,93,.28); }
.lifecycle-state.is-blocked { color:#ffc1c8; background:rgba(255,107,125,.08); border-color:rgba(255,107,125,.3); }
.lifecycle-facts { margin-top:17px; }
.lifecycle-facts > div { min-height:76px; padding:13px 14px; background:var(--ng-panel-raised); border-color:var(--ng-border-soft); }
.lifecycle-facts dd { font-size:1.1rem; font-variant-numeric:tabular-nums; }
.lifecycle-message { margin-top:14px; margin-bottom:0; }
.lifecycle-decision { margin-top:18px; padding-top:2px; border-top:1px solid var(--ng-border-soft); }
.lifecycle-decision .field-group small { display:block; margin-top:7px; color:var(--ng-subtle); font-size:.72rem; line-height:1.45; }
body.light-theme .lifecycle-facts > div { background:var(--ng-panel-raised); border-color:var(--ng-border); }
body.light-theme .lifecycle-state.is-clear { color:#286214; background:#edf8e9; border-color:#b9dfaf; }
body.light-theme .lifecycle-state.is-blocked { color:#9d243c; background:#fff0f3; border-color:#f3b8c4; }
@media (max-width:560px) { .lifecycle-review .surface-head { flex-direction:column; }.lifecycle-state { align-self:flex-start; }.lifecycle-facts > div { min-height:0; } }
.text-pre-line { white-space: pre-line; }
