:root {
    --ese-red: #af1f25;
    --ese-red-dark: #8f171d;
    --ese-red-soft: #f9e9ea;
    --ese-gold: #cdba80;
    --ese-gold-soft: #f6f1e3;
    --ink: #1b1b1b;
    --text: #363636;
    --muted: #68707d;
    --muted-2: #8b929d;
    --border: #e0e5ec;
    --border-strong: #ccd3dd;
    --surface: #ffffff;
    --canvas: #f7f8fa;
    --canvas-cool: #eff3f8;
    --success: #267052;
    --success-soft: #e9f5ef;
    --warning: #9b641d;
    --warning-soft: #fbf2df;
    --danger: #a4262c;
    --danger-soft: #fbe9ea;
    --sidebar-width: 248px;
    --topbar-height: 68px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-float: 0 18px 50px rgba(27, 31, 39, .12);
    --transition: 180ms ease;
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--canvas);
    color: var(--text);
    font-family: "Source Sans 3", "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }

svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

:focus-visible {
    outline: 3px solid rgba(175, 31, 37, .32);
    outline-offset: 3px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    z-index: 1000;
    left: 16px;
    top: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: var(--ink);
    color: white;
    transform: translateY(-160%);
    transition: transform var(--transition);
}
.skip-link:focus { transform: translateY(0); }

.auth-page { min-height: 100vh; }
.auth-shell {
    min-height: 100vh;
    padding: 32px 20px;
    display: grid;
    place-items: center;
    background:
        linear-gradient(135deg, rgba(175, 31, 37, .055), transparent 42%),
        var(--canvas);
}
.auth-panel {
    width: min(100%, 430px);
    padding: 38px;
    border: 1px solid var(--border);
    border-top: 4px solid var(--ese-red);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: 0 18px 45px rgba(27, 31, 39, .09);
}
.auth-brand { display: grid; gap: 3px; justify-items: start; margin-bottom: 42px; }
.auth-brand__logo { display: block; width: 126px; height: 30px; object-fit: contain; object-position: left center; }
.auth-brand span { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.auth-heading { margin-bottom: 26px; }
.auth-eyebrow { margin: 0 0 7px; color: var(--ese-red); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.auth-heading h1 { margin: 0; color: var(--ink); font-size: clamp(28px, 6vw, 36px); line-height: 1.08; letter-spacing: -.025em; }
.auth-heading > p:last-child { margin: 12px 0 0; color: var(--muted); }
.auth-error { margin-bottom: 18px; padding: 11px 13px; border: 1px solid #efc9cb; border-radius: var(--radius-sm); background: var(--danger-soft); color: var(--danger); font-weight: 600; }
.auth-form { display: grid; gap: 18px; }
.auth-field { display: grid; gap: 7px; }
.auth-field label { color: var(--ink); font-size: 13px; font-weight: 700; }
.auth-field input { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: #fff; color: var(--ink); transition: border-color var(--transition), box-shadow var(--transition); }
.auth-field input:hover { border-color: #aab2bf; }
.auth-field input:focus { border-color: var(--ese-red); box-shadow: 0 0 0 3px rgba(175, 31, 37, .12); outline: none; }
.auth-submit { min-height: 46px; margin-top: 3px; }
.auth-note { margin: 24px 0 0; padding-top: 18px; border-top: 1px solid var(--border); color: var(--muted-2); font-size: 12px; text-align: center; }

@media (max-width: 520px) {
    .auth-shell { padding: 16px; align-items: start; }
    .auth-panel { margin-top: 6vh; padding: 28px 22px; }
    .auth-brand { margin-bottom: 34px; }
}

.app-shell { min-height: 100vh; }

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    background: #f2f3f5;
    border-right: 1px solid var(--border);
}

.sidebar__brand {
    min-height: var(--topbar-height);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.brand-link { display: grid; gap: 2px; }
.brand-logo { display: block; width: 104px; height: 24px; object-fit: contain; object-position: left center; }
.brand-product { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.icon-button.sidebar__close { display: none; margin-left: auto; }

.primary-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-label {
    margin: 18px 10px 7px;
    color: var(--muted-2);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.nav-label:first-child { margin-top: 0; }

.nav-item {
    min-height: 42px;
    padding: 9px 10px;
    display: grid;
    grid-template-columns: 20px 1fr auto;
    gap: 10px;
    align-items: center;
    border-radius: 9px;
    color: #4f5661;
    font-weight: 550;
    transition: background var(--transition), color var(--transition);
}
.nav-item svg { width: 19px; height: 19px; }
.nav-item:hover { background: #e8eaee; color: var(--ink); }
.nav-item.is-active { background: #fff; color: var(--ink); box-shadow: inset 3px 0 0 var(--ese-red), 0 1px 2px rgba(25, 32, 42, .05); }

.nav-count {
    min-width: 21px;
    height: 21px;
    padding: 0 6px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #e1e4e9;
    color: #5e6672;
    font-size: 11px;
    font-weight: 700;
}
.nav-count--warning { background: var(--warning-soft); color: var(--warning); }

.sidebar__footer { padding: 12px; border-top: 1px solid var(--border); }
.campus-switcher {
    padding: 9px;
    display: grid;
    grid-template-columns: 34px 1fr;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255,255,255,.7);
}
.campus-switcher > span:nth-child(2) { display: grid; }
.campus-switcher strong { color: var(--ink); font-size: 13px; }
.campus-switcher small { color: var(--muted); }
.campus-switcher svg { width: 16px; height: 16px; color: var(--muted); }
.campus-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; background: var(--ink); color: white; font-size: 11px; font-weight: 700; }
.sidebar-meta { padding: 12px 4px 2px; display: flex; align-items: center; gap: 7px; color: var(--muted-2); font-size: 11px; }
.sidebar-meta span:last-child { margin-left: auto; }

.status-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: #3e946e; box-shadow: 0 0 0 3px rgba(62,148,110,.12); }
.status-dot--muted { background: #9198a2; box-shadow: none; }
.status-dot--warning { background: #d09236; box-shadow: none; }

.app-column { min-height: 100vh; margin-left: var(--sidebar-width); }

.topbar {
    height: var(--topbar-height);
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 18px;
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,.96);
}

.global-search {
    width: min(440px, 46vw);
    min-height: 40px;
    padding: 0 11px;
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: var(--canvas-cool);
    transition: border var(--transition), background var(--transition);
}
.global-search:focus-within { border-color: var(--border-strong); background: white; }
.global-search:has(input:focus-visible), .field-search:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(175,31,37,.18); }
.global-search svg { width: 18px; height: 18px; color: var(--muted); }
.global-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); }
.global-search input::placeholder { color: #858d98; }
.global-search kbd { padding: 2px 6px; border: 1px solid var(--border-strong); border-radius: 5px; background: white; color: var(--muted); font-family: inherit; font-size: 11px; }
.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.icon-button {
    width: 40px;
    height: 40px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: white;
    cursor: pointer;
    transition: border var(--transition), background var(--transition);
}
.icon-button:hover { border-color: var(--border-strong); background: var(--canvas); }
.notification-button { position: relative; border-color: transparent; }
.notification-dot { position: absolute; right: 8px; top: 7px; width: 6px; height: 6px; border: 2px solid white; border-radius: 50%; background: var(--ese-red); box-sizing: content-box; }
.profile-menu { min-height: 46px; padding: 4px 7px 4px 5px; display: flex; align-items: center; gap: 9px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; }
.profile-menu:hover { background: var(--canvas-cool); }
.profile-menu__copy { display: grid; min-width: 92px; text-align: left; line-height: 1.15; }
.profile-menu__copy strong { color: var(--ink); font-size: 13px; }
.profile-menu__copy small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.profile-menu > svg { width: 15px; height: 15px; color: var(--muted); }
.mobile-menu { display: none; }

.avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #ece1df;
    color: #723f3d;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .03em;
}
.avatar--user { width: 36px; height: 36px; background: var(--ink); color: white; }
.avatar--small { width: 30px; height: 30px; font-size: 10px; }
.avatar--large { width: 60px; height: 60px; font-size: 18px; }
.avatar--gold { background: var(--ese-gold-soft); color: #695d38; }
.avatar--dark { background: #e5e8ec; color: #3f4650; }

.demo-banner {
    min-height: 34px;
    padding: 7px 32px;
    display: flex;
    align-items: center;
    gap: 9px;
    border-bottom: 1px solid #e8dfc2;
    background: #fbf8ee;
    color: #675f49;
    font-size: 12px;
}
.demo-banner__label { padding: 2px 6px; border-radius: 4px; background: #e8dbad; color: #524722; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.demo-banner a { margin-left: auto; color: #554b2d; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.page-shell { width: min(1500px, 100%); margin: 0 auto; padding: 34px 36px 64px; }
.page-heading { margin-bottom: 28px; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.page-heading--dashboard { margin-bottom: 30px; }
.eyebrow, .section-kicker { margin: 0 0 7px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.section-kicker--red { color: var(--ese-red); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 7px; color: var(--ink); font-size: 40px; line-height: 1.05; letter-spacing: -.035em; text-wrap: balance; }
h2 { margin-bottom: 5px; color: var(--ink); font-size: 22px; line-height: 1.2; letter-spacing: -.018em; }
h3 { margin-bottom: 4px; color: var(--ink); font-size: 16px; line-height: 1.3; }
.page-lead { margin: 0; color: var(--muted); font-size: 16px; }
.page-actions { display: flex; gap: 9px; flex-wrap: wrap; }

.button {
    min-height: 40px;
    padding: 9px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 9px;
    font-weight: 650;
    line-height: 1;
    cursor: pointer;
    transition: background var(--transition), border var(--transition), transform var(--transition);
}
.button svg { width: 17px; height: 17px; }
.button:active:not(:disabled) { transform: translateY(1px); }
.button--primary { background: var(--ese-red); color: white; }
.button--primary:hover { background: var(--ese-red-dark); }
.button--secondary { border-color: var(--border-strong); background: white; color: var(--ink); }
.button--secondary:hover { border-color: #aeb6c2; background: var(--canvas); }
.button--quiet { border-color: var(--border); background: transparent; color: #525a65; }
.button--quiet:hover { background: var(--canvas-cool); }
.button--small { min-height: 34px; padding: 7px 11px; font-size: 13px; }
.button--block { width: 100%; }
.button:disabled { opacity: .48; cursor: not-allowed; }
.text-button { padding: 2px 0; border: 0; background: transparent; color: var(--ese-red); font-size: 13px; font-weight: 650; cursor: pointer; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr); gap: 18px; }
.work-panel, .today-panel, .overview-panel, .process-strip, .list-surface, .upload-panel, .preview-panel, .review-queue, .record-section, .aside-panel {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
}
.work-panel, .today-panel { overflow: hidden; }
.section-heading { padding: 20px 22px 15px; display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.section-heading h2 { margin: 0; }
.section-heading p { margin: 5px 0 0; color: var(--muted); }
.section-heading--page { padding: 0; margin-bottom: 16px; }
.count-label { margin-top: 18px; color: var(--muted); font-size: 12px; }

.task-list { border-top: 1px solid var(--border); }
.task-row { min-height: 67px; padding: 11px 18px 11px 22px; display: grid; grid-template-columns: 22px minmax(0,1fr) auto 30px; align-items: center; gap: 12px; border-bottom: 1px solid var(--border); }
.task-row:hover { background: #fafbfc; }
.task-check { width: 19px; height: 19px; padding: 0; border: 1.5px solid #b6bec9; border-radius: 50%; background: white; cursor: pointer; }
.task-check:hover { border-color: var(--ese-red); }
.task-copy { min-width: 0; display: grid; gap: 3px; }
.task-copy strong { overflow: hidden; color: var(--ink); font-size: 14px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.task-copy > span { color: var(--muted); font-size: 12px; }
.task-copy a:hover { color: var(--ese-red); text-decoration: underline; }
.separator-dot::before { content: ""; width: 3px; height: 3px; margin: 0 7px 2px; display: inline-block; border-radius: 50%; background: #a7adb7; }
.due-label { padding: 4px 8px; border-radius: 6px; background: var(--canvas-cool); color: var(--muted); font-size: 11px; font-weight: 700; }
.due-label.is-urgent { background: var(--danger-soft); color: var(--danger); }
.panel-link { min-height: 44px; padding: 11px 22px; display: flex; align-items: center; justify-content: space-between; color: var(--ese-red); font-size: 13px; font-weight: 650; }
.panel-link:hover { background: var(--ese-red-soft); }

.compact-students { border-top: 1px solid var(--border); }
.compact-student { min-height: 67px; padding: 10px 18px; display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); }
.compact-student:hover { background: #fafbfc; }
.compact-student > span:nth-child(2) { min-width: 0; display: grid; }
.compact-student strong { color: var(--ink); font-size: 13px; }
.compact-student small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.campus-code, .campus-badge { padding: 3px 6px; border-radius: 5px; background: var(--canvas-cool); color: #59616d; font-size: 10px; font-weight: 700; letter-spacing: .04em; }

.operational-overview { margin-top: 34px; }
.overview-columns { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.overview-panel { overflow: hidden; }
.overview-panel__head { min-height: 84px; padding: 17px 20px; display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: 12px; align-items: center; border-bottom: 1px solid var(--border); }
.overview-panel__head p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.icon-tile { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 9px; }
.icon-tile--gold { background: var(--ese-gold-soft); color: #776638; }
.icon-tile--red { background: var(--ese-red-soft); color: var(--ese-red); }
.large-count { color: var(--ink); font-size: 24px; font-weight: 700; }
.overview-row { min-height: 61px; padding: 10px 20px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--border); }
.overview-row:last-child { border-bottom: 0; }
.overview-row:hover { background: #fafbfc; }
.overview-row > span:first-child { min-width: 0; flex: 1; display: grid; gap: 2px; }
.overview-row strong { color: var(--ink); font-size: 13px; }
.overview-row small { color: var(--muted); font-size: 11px; }
.money { color: var(--ink); font-size: 13px; font-weight: 700; }

.status-pill { width: fit-content; padding: 3px 8px; display: inline-flex; align-items: center; border-radius: 999px; background: #eef0f3; color: #5e6672; font-size: 10px; font-weight: 700; white-space: nowrap; }
.status-pill--review, .status-pill--pending { background: var(--warning-soft); color: var(--warning); }
.status-pill--active { background: var(--success-soft); color: var(--success); }
.status-pill--onboarding { background: #edf0f8; color: #525f87; }
.status-pill--lead { background: var(--canvas-cool); color: var(--muted); }
.status-pill--alumni, .status-pill--archived { background: #eceef1; color: #626975; }
.status-pill--error { background: var(--danger-soft); color: var(--danger); }

.process-strip { margin-top: 18px; padding: 22px; display: grid; grid-template-columns: minmax(230px,.8fr) minmax(0,1.8fr); align-items: center; gap: 34px; }
.process-strip__intro p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.process-steps { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4,1fr); list-style: none; }
.process-steps li { position: relative; display: grid; justify-items: center; gap: 4px; text-align: center; }
.process-steps li::after { content: ""; position: absolute; z-index: 0; top: 15px; left: calc(50% + 18px); width: calc(100% - 36px); height: 1px; background: var(--border-strong); }
.process-steps li:last-child::after { display: none; }
.process-steps li > span { position: relative; z-index: 1; width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid var(--border-strong); border-radius: 50%; background: white; color: var(--muted); font-size: 11px; font-weight: 700; }
.process-steps li.is-complete > span { border-color: var(--success); background: var(--success); color: white; }
.process-steps li.is-complete::after { background: #8ab7a3; }
.process-steps li.is-current > span { border: 2px solid var(--ese-red); color: var(--ese-red); }
.process-steps strong { color: var(--ink); font-size: 12px; }
.process-steps small { color: var(--muted); font-size: 10px; }

.list-surface { overflow: hidden; }
.filter-bar { min-height: 66px; padding: 12px 16px; display: flex; align-items: center; gap: 9px; border-bottom: 1px solid var(--border); }
.field-search { min-width: 240px; max-width: 380px; flex: 1; height: 40px; padding: 0 11px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 8px; background: white; }
.field-search:focus-within { border-color: #aeb6c2; box-shadow: 0 0 0 3px rgba(175,31,37,.07); }
.field-search svg { width: 17px; color: var(--muted); }
.field-search input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--ink); }
.select-field select { height: 40px; padding: 0 32px 0 11px; border: 1px solid var(--border); border-radius: 8px; background: white; color: var(--text); }
.clear-filter { color: var(--ese-red); font-size: 13px; font-weight: 600; }
.result-count { margin-left: auto; color: var(--muted); font-size: 12px; }
.data-table__head, .student-row { display: grid; grid-template-columns: minmax(270px,1.35fr) minmax(180px,1fr) 120px 110px 130px 30px; align-items: center; gap: 14px; }
.data-table__head { min-height: 42px; padding: 0 18px; border-bottom: 1px solid var(--border); background: #fafbfc; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.student-row { min-height: 69px; padding: 9px 18px; border-bottom: 1px solid var(--border); transition: background var(--transition); }
.student-row:last-child { border-bottom: 0; }
.student-row:hover { background: #fafbfc; }
.student-cell { min-width: 0; display: flex; align-items: center; gap: 8px; color: #4e5661; font-size: 13px; }
.student-cell > span:not(.avatar):not(.campus-badge):not(.mobile-label) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.student-cell--identity > span:last-child { min-width: 0; display: grid; }
.student-cell--identity a { width: fit-content; }
.student-cell--identity a:hover { color: var(--ese-red); }
.student-cell--identity strong { color: var(--ink); font-size: 14px; }
.student-cell--identity small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.row-arrow { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 7px; color: var(--muted); }
.row-arrow:hover { background: var(--canvas-cool); color: var(--ink); }
.row-arrow svg { width: 17px; height: 17px; }
.mobile-label { display: none; }

.import-layout { display: grid; grid-template-columns: minmax(300px,.75fr) minmax(0,1.25fr); gap: 18px; }
.upload-panel, .preview-panel { padding: 21px; }
.step-marker { margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.step-marker > span { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: white; font-size: 12px; font-weight: 700; }
.step-marker > div { display: grid; }
.step-marker strong { color: var(--ink); }
.step-marker small { color: var(--muted); }
#student-import { display: grid; gap: 12px; }
.dropzone { min-height: 236px; padding: 28px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 9px; border: 1.5px dashed #bcc4cf; border-radius: 11px; background: #fafbfc; text-align: center; cursor: pointer; transition: border var(--transition), background var(--transition); }
.dropzone:hover { border-color: var(--ese-red); background: #fffafa; }
.dropzone input { position: absolute; opacity: 0; pointer-events: none; }
.dropzone strong { color: var(--ink); }
.dropzone > span:not(.dropzone__icon):not(.button) { color: var(--muted); font-size: 12px; }
.dropzone__icon { width: 45px; height: 45px; display: grid; place-items: center; border-radius: 10px; background: var(--ese-red-soft); color: var(--ese-red); }
.form-error { margin: 12px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--danger-soft); color: var(--danger); font-size: 13px; }
.privacy-note { margin-top: 14px; padding: 12px; display: flex; gap: 10px; border-radius: 9px; background: var(--canvas-cool); color: var(--muted); font-size: 12px; }
.privacy-note svg { flex: 0 0 auto; width: 18px; color: #596b7f; }
.privacy-note span { display: grid; gap: 2px; }
.privacy-note strong { color: #4c5663; }
.import-summary { margin-bottom: 15px; display: grid; grid-template-columns: repeat(3,1fr); border: 1px solid var(--border); border-radius: 9px; }
.import-summary > span { min-height: 62px; display: grid; place-items: center; align-content: center; border-right: 1px solid var(--border); }
.import-summary > span:last-child { border-right: 0; }
.import-summary strong { color: var(--ink); font-size: 20px; }
.import-summary small { color: var(--muted); font-size: 11px; }
.import-summary .is-valid strong { color: var(--success); }
.import-summary .is-invalid strong { color: var(--danger); }
.file-preview { overflow: hidden; border: 1px solid var(--border); border-radius: 9px; }
.file-preview__head { min-height: 43px; padding: 0 12px; display: flex; justify-content: space-between; align-items: center; background: #f6f7f9; color: var(--ink); font-size: 12px; font-weight: 650; }
.file-preview__head small { color: var(--muted); font-weight: 400; }
.preview-row { min-height: 48px; padding: 7px 11px; display: grid; grid-template-columns: 24px minmax(100px,.8fr) minmax(150px,1.2fr) auto; align-items: center; gap: 10px; border-top: 1px solid var(--border); font-size: 12px; }
.preview-row > span:first-child { color: var(--muted); }
.preview-row.is-invalid { background: #fffafa; }
.review-queue { margin-top: 18px; padding: 21px; }
.issue-list { overflow: hidden; border: 1px solid var(--border); border-radius: 9px; }
.issue-row { min-height: 61px; padding: 9px 13px; display: grid; grid-template-columns: 28px 32px minmax(0,1fr) auto; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); }
.issue-row:last-child { border-bottom: 0; }
.issue-row__number { color: var(--muted); font-size: 11px; }
.issue-row__icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 7px; background: var(--danger-soft); color: var(--danger); }
.issue-row__icon svg { width: 16px; }
.issue-row > span:nth-child(3) { display: grid; }
.issue-row strong { color: var(--ink); font-size: 13px; }
.issue-row small { color: var(--muted); }
.fingerprint { margin-top: 12px; color: var(--muted); font-size: 11px; text-align: right; }
.fingerprint code { margin-left: 5px; color: #4b5562; }

.breadcrumbs { margin-bottom: 18px; display: flex; gap: 8px; color: var(--muted); font-size: 12px; }
.breadcrumbs a:hover { color: var(--ese-red); }
.record-header { margin-bottom: 22px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.record-identity { display: flex; align-items: center; gap: 15px; }
.record-title-line { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.record-title-line h1 { margin: 0; font-size: 32px; }
.record-identity p { margin: 5px 0; color: var(--muted); }
.record-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 15px; color: #535c68; font-size: 12px; }
.record-meta > span { display: flex; align-items: center; gap: 5px; }
.record-meta svg { width: 15px; height: 15px; color: var(--muted); }
.record-actions { display: flex; gap: 8px; }
.more-button { width: 40px; }
.record-nav { margin-bottom: 20px; display: flex; gap: 4px; border-bottom: 1px solid var(--border); background: var(--canvas); }
.record-nav a { padding: 11px 13px 10px; border-bottom: 2px solid transparent; color: var(--muted); font-size: 13px; font-weight: 600; }
.record-nav a:hover, .record-nav a.is-active { border-color: var(--ese-red); color: var(--ink); }
.record-nav a span { margin-left: 4px; padding: 1px 5px; border-radius: 999px; background: #e7e9ed; font-size: 10px; }
.record-layout { display: grid; grid-template-columns: minmax(0,1fr) 286px; gap: 18px; align-items: start; }
.record-main { min-width: 0; display: grid; gap: 18px; }
.record-section { padding: 22px; scroll-margin-top: 130px; }
.record-section__heading { margin-bottom: 17px; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.record-section__heading h2 { margin: 0; }
.updated-label { margin-top: 20px; color: var(--muted); font-size: 11px; }
.journey-card { padding: 18px; border: 1px solid var(--border); border-radius: 10px; background: #fafbfc; }
.journey-steps { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4,1fr); list-style: none; }
.journey-steps li { position: relative; display: grid; grid-template-rows: 32px auto auto; justify-items: center; text-align: center; }
.journey-steps li::after { content: ""; position: absolute; top: 15px; left: calc(50% + 17px); width: calc(100% - 34px); height: 2px; background: var(--border); }
.journey-steps li:last-child::after { display: none; }
.journey-dot { position: relative; z-index: 1; width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid var(--border-strong); border-radius: 50%; background: white; color: var(--muted); font-size: 11px; font-weight: 700; }
.journey-dot svg { width: 17px; }
.journey-steps .is-complete .journey-dot { border-color: var(--success); background: var(--success); color: white; }
.journey-steps .is-current .journey-dot { border: 2px solid var(--ese-red); color: var(--ese-red); }
.journey-steps li > div { margin-top: 9px; display: grid; }
.journey-steps strong { color: var(--ink); font-size: 12px; }
.journey-steps small { color: var(--muted); font-size: 10px; }
.journey-steps time { margin-top: 5px; color: var(--muted); font-size: 10px; }
.journey-steps .status-pill { margin-top: 5px; }
.record-split { margin-top: 16px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.subpanel { padding: 18px; border: 1px solid var(--border); border-radius: 10px; }
.subpanel__head { margin-bottom: 12px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.subpanel__head h3 { margin: 0; }
.subpanel__head p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.progress-number { color: var(--ink); font-size: 18px; }
.progress-track { height: 5px; margin-bottom: 13px; overflow: hidden; border-radius: 999px; background: #e8ebef; }
.progress-track span { height: 100%; display: block; border-radius: inherit; background: var(--success); }
.checklist-row { min-height: 49px; display: grid; grid-template-columns: 20px minmax(0,1fr) auto; align-items: center; gap: 9px; border-top: 1px solid var(--border); }
.checklist-row > span:nth-child(2) { display: grid; }
.checklist-row strong { color: var(--ink); font-size: 12px; }
.checklist-row small { color: var(--muted); font-size: 10px; }
.checkmark { width: 18px; height: 18px; display: grid; place-items: center; border: 1px solid var(--border-strong); border-radius: 50%; color: white; }
.checkmark svg { width: 13px; }
.checklist-row.is-complete .checkmark { border-color: var(--success); background: var(--success); }
.detail-list { margin: 0; }
.detail-list > div { min-height: 42px; display: grid; grid-template-columns: 120px 1fr; align-items: center; gap: 8px; border-top: 1px solid var(--border); }
.detail-list dt { color: var(--muted); font-size: 11px; }
.detail-list dd { margin: 0; color: var(--ink); font-size: 12px; font-weight: 600; }
.detail-list a { color: var(--ese-red); }
.muted { color: var(--muted); font-weight: 400; }
.protected-label { display: inline-flex; align-items: center; gap: 5px; color: #5e566d; }
.protected-label svg { width: 14px; }
.document-list, .communication-list { border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.document-row { min-height: 67px; padding: 10px 12px; display: grid; grid-template-columns: 38px minmax(0,1fr) auto auto; align-items: center; gap: 11px; border-bottom: 1px solid var(--border); }
.document-row:last-child { border-bottom: 0; }
.file-icon { width: 37px; height: 39px; display: grid; place-items: center; border: 1px solid #e2c7c9; border-radius: 6px; background: var(--ese-red-soft); color: var(--ese-red); font-size: 9px; font-weight: 800; }
.document-copy { min-width: 0; display: grid; }
.document-copy strong { color: var(--ink); font-size: 13px; }
.document-copy span { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.document-actions { display: flex; align-items: center; gap: 6px; }
.document-actions .icon-button { width: 34px; height: 34px; }
.payment-summary { margin-bottom: 12px; display: grid; grid-template-columns: repeat(3,1fr); border: 1px solid var(--border); border-radius: 9px; }
.payment-summary > span { min-height: 71px; padding: 12px 15px; display: grid; align-content: center; border-right: 1px solid var(--border); }
.payment-summary > span:last-child { border-right: 0; }
.payment-summary small { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.payment-summary strong { color: var(--ink); font-size: 18px; }
.payment-summary .is-outstanding strong { color: var(--ese-red); }
.payment-table { overflow: hidden; border: 1px solid var(--border); border-radius: 9px; }
.payment-row { min-height: 54px; padding: 8px 12px; display: grid; grid-template-columns: 100px minmax(130px,1fr) 120px 100px minmax(100px,.7fr); align-items: center; gap: 10px; border-bottom: 1px solid var(--border); font-size: 12px; }
.payment-row:last-child { border-bottom: 0; }
.payment-row--head { min-height: 37px; background: #fafbfc; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.payment-row > small { color: var(--muted); }
.communication-row { min-height: 84px; padding: 13px; display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: start; gap: 11px; border-bottom: 1px solid var(--border); }
.communication-row:last-child { border-bottom: 0; }
.communication-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; background: var(--canvas-cool); color: #5c6876; }
.communication-icon svg { width: 17px; }
.communication-row > div { min-width: 0; }
.communication-row strong { color: var(--ink); font-size: 13px; }
.communication-row p { margin: 3px 0; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.communication-row small { color: var(--muted-2); font-size: 10px; }
.timeline { margin: 0; padding: 0; list-style: none; }
.timeline li { position: relative; min-height: 70px; padding: 0 0 18px 28px; }
.timeline li::before { content: ""; position: absolute; left: 5px; top: 14px; bottom: -1px; width: 1px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.timeline-dot { position: absolute; left: 0; top: 5px; width: 11px; height: 11px; border: 2px solid white; border-radius: 50%; background: var(--ese-gold); box-shadow: 0 0 0 1px var(--ese-gold); }
.timeline strong { color: var(--ink); font-size: 13px; }
.timeline p { margin: 3px 0; color: var(--muted); font-size: 12px; }
.timeline time { color: var(--muted-2); font-size: 10px; }
.record-aside { position: sticky; top: 127px; display: grid; gap: 14px; }
.aside-panel { padding: 17px; }
.aside-panel > p { color: var(--muted); font-size: 12px; }
.aside-panel__head { margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.owner-row { min-height: 52px; display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 9px; border-top: 1px solid var(--border); }
.owner-row > span:last-child { display: grid; }
.owner-row strong { color: var(--ink); font-size: 12px; }
.owner-row small { color: var(--muted); font-size: 10px; }
.aside-panel--compact h3 { margin-bottom: 10px; }
.external-refs { margin: 0; }
.external-refs > div { min-height: 38px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border); }
.external-refs dt { color: var(--muted); font-size: 11px; }
.external-refs dd { margin: 0; display: flex; align-items: center; gap: 6px; color: var(--ink); font-size: 11px; font-weight: 600; }

.page-heading--form { max-width: 860px; }
.form-surface { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.operational-form { display: grid; }
.form-section { padding: 24px; display: grid; grid-template-columns: minmax(190px, .48fr) minmax(0, 1.52fr); gap: 34px; border-bottom: 1px solid var(--border); }
.form-section__heading p { max-width: 38ch; margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.form-section__heading h2 { font-size: 18px; }
.form-grid { min-width: 0; display: grid; gap: 17px; }
.form-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-span-2 { grid-column: 1 / -1; }
.operational-form > ul, .operational-form .form-grid ul { margin: 0; padding: 9px 11px; border-radius: 7px; background: var(--danger-soft); color: var(--danger); list-style: none; font-size: 13px; }
.operational-form label { margin-bottom: 6px; display: block; color: #4d5560; font-size: 12px; font-weight: 650; }
.operational-form input:not([type="checkbox"]), .operational-form select, .operational-form textarea {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    outline: 0;
    background: white;
    color: var(--ink);
    transition: border var(--transition), box-shadow var(--transition);
}
.operational-form textarea { min-height: 160px; resize: vertical; line-height: 1.5; }
.operational-form input:focus, .operational-form select:focus, .operational-form textarea:focus { border-color: #a55b5f; box-shadow: 0 0 0 3px rgba(175,31,37,.12); }
.operational-form input:disabled { background: #f1f3f6; color: var(--muted); cursor: not-allowed; }
.operational-form input[aria-invalid="true"], .operational-form select[aria-invalid="true"], .operational-form textarea[aria-invalid="true"] { border-color: var(--danger); }
.operational-form div > ul { margin: 6px 0 0; padding: 0; color: var(--danger); list-style: none; font-size: 12px; }
.form-actions { padding: 18px 24px; display: flex; justify-content: flex-end; gap: 9px; background: #fafbfc; border-radius: 0 0 var(--radius-md) var(--radius-md); }
.choice-panel #portal_user_roles { display: grid; grid-template-columns: 18px minmax(0, 1fr) 18px minmax(0, 1fr); align-items: center; gap: 10px 8px; }
.choice-panel #portal_user_roles label { margin: 0; }
.choice-panel input[type="checkbox"], .operational-form input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--ese-red); }
.choice-panel label, .operational-form input[type="checkbox"] + label { margin: 0; }
.recipient-line { min-height: 57px; padding: 12px 24px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); }
.recipient-line > span { color: var(--muted); font-size: 12px; font-weight: 700; }
.recipient-line strong { color: var(--ink); }
.recipient-line small { color: var(--muted); }

.data-list { display: grid; }
.list-surface > .section-heading--page { margin: 0; padding: 19px 18px 15px; border-bottom: 1px solid var(--border); }
.data-row { min-height: 68px; padding: 11px 18px; display: grid; grid-template-columns: 40px minmax(220px, 1fr) auto 32px; align-items: center; gap: 13px; border-bottom: 1px solid var(--border); }
.data-row:last-child { border-bottom: 0; }
a.data-row:hover { background: #fafbfc; }
.data-row__primary { min-width: 0; display: grid; gap: 2px; }
.data-row__primary strong { overflow: hidden; color: var(--ink); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.data-row__primary small { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.data-list--communications .data-row { grid-template-columns: minmax(220px, 1fr) auto 32px; }
.data-row--payment { grid-template-columns: 105px minmax(220px, 1fr) 120px 100px 32px; }
.list-surface > .task-list { border-top: 0; }
.list-surface > .task-list .task-row:last-child { border-bottom: 0; }

.admin-nav { margin-bottom: 20px; display: flex; gap: 4px; border-bottom: 1px solid var(--border); }
.admin-nav a { padding: 10px 13px; border-bottom: 2px solid transparent; color: var(--muted); font-size: 13px; font-weight: 650; }
.admin-nav a:hover, .admin-nav a.is-active { border-color: var(--ese-red); color: var(--ink); }
.admin-nav a span { margin-left: 4px; padding: 1px 5px; border-radius: 999px; background: #e7e9ed; font-size: 10px; }
.admin-summary { margin-bottom: 20px; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border); border-radius: var(--radius-md); background: white; }
.admin-summary > div { min-height: 76px; padding: 14px 18px; display: grid; align-content: center; gap: 3px; border-right: 1px solid var(--border); }
.admin-summary > div:last-child { border-right: 0; }
.admin-summary span { color: var(--muted); font-size: 12px; }
.admin-summary strong { color: var(--ink); font-size: 20px; }
.admin-summary .integration-state { font-size: 14px; color: var(--warning); }
.admin-summary .integration-state.is-live { color: var(--success); }
.data-row--user { grid-template-columns: 32px minmax(180px, 1fr) minmax(160px, auto) auto minmax(130px, auto) 32px; }
.role-list { display: flex; flex-wrap: wrap; gap: 4px; }
.role-list span { padding: 3px 7px; border-radius: 5px; background: var(--canvas-cool); color: #59616d; font-size: 10px; font-weight: 700; }
.google-state { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.settings-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 18px; align-items: start; }
.settings-main, .settings-section { display: grid; gap: 16px; }
.settings-section { padding: 22px; border: 1px solid var(--border); border-radius: var(--radius-md); background: white; }
.settings-aside { padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-md); background: white; }
.settings-aside p { color: var(--muted); font-size: 13px; }
.settings-note { margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--border); }
.settings-action { margin-top: 9px; }
.settings-mode-note { padding: 10px 11px; border-radius: 8px; background: var(--warning-soft); color: #72501e !important; }
.settings-mode-note code { font-size: 11px; }
.notice { padding: 14px; border-radius: 9px; background: var(--canvas-cool); }
.notice p { margin: 4px 0 0; color: var(--muted); }
.split-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.form-surface--compact { padding: 20px; }
.form-surface--compact > p { color: var(--muted); font-size: 13px; }
.form-surface--compact .operational-form { gap: 14px; }
.form-surface--compact code, .data-row code { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

.empty-state { padding: 28px; display: grid; justify-items: center; gap: 4px; color: var(--muted); text-align: center; }
.empty-state strong { color: var(--ink); }
.empty-state--table { min-height: 180px; align-content: center; }
.flash { margin-bottom: 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 9px; background: white; }
.flash--success { border-color: #bdd9ca; background: var(--success-soft); color: var(--success); }
.flash--error { border-color: #e3bfc2; background: var(--danger-soft); color: var(--danger); }
.mobile-nav, .sidebar-backdrop { display: none; }

@media (max-width: 1180px) {
    .page-shell { padding-inline: 26px; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .today-panel .compact-students { display: grid; grid-template-columns: repeat(2,1fr); }
    .compact-student:nth-child(odd) { border-right: 1px solid var(--border); }
    .record-layout { grid-template-columns: 1fr; }
    .record-aside { position: static; grid-template-columns: repeat(3,1fr); }
    .data-table__head, .student-row { grid-template-columns: minmax(240px,1.3fr) minmax(170px,1fr) 105px 105px 30px; }
    .data-table__head span:nth-child(5), .student-row .student-cell:nth-child(5) { display: none; }
    .data-row--user { grid-template-columns: 32px minmax(180px, 1fr) minmax(150px, auto) auto 32px; }
    .data-row--user .google-state { display: none; }
}

@media (max-width: 900px) {
    :root { --topbar-height: 60px; }
    .sidebar { transform: translateX(-105%); transition: transform var(--transition); box-shadow: var(--shadow-float); }
    body.nav-open .sidebar { transform: translateX(0); }
    .icon-button.sidebar__close { display: grid; }
    .sidebar-backdrop { position: fixed; inset: 0; z-index: 35; background: rgba(22,25,30,.34); }
    body.nav-open .sidebar-backdrop { display: block; }
    .app-column { margin-left: 0; }
    .mobile-menu { display: grid; }
    .topbar { padding-inline: 18px; }
    .global-search { width: min(440px, 56vw); }
    .page-shell { padding: 28px 22px 82px; }
    .overview-columns, .import-layout { grid-template-columns: 1fr; }
    .process-strip { grid-template-columns: 1fr; }
    .record-split { grid-template-columns: 1fr; }
    .record-aside { grid-template-columns: 1fr 1fr; }
    .record-aside .aside-panel:last-child { grid-column: 1 / -1; }
    .settings-layout, .split-workspace { grid-template-columns: 1fr; }
    .settings-aside { order: -1; }
    .data-table__head, .student-row { grid-template-columns: minmax(220px,1.3fr) minmax(150px,1fr) 90px 30px; }
    .data-table__head span:nth-child(4), .student-row .student-cell:nth-child(4) { display: none; }
}

@media (max-width: 700px) {
    body { font-size: 16px; }
    .topbar { padding-inline: 12px; gap: 8px; }
    .global-search { flex: 1; width: auto; }
    .global-search kbd, .profile-menu__copy, .profile-menu > svg, .notification-button { display: none; }
    .profile-menu { padding: 0; }
    .demo-banner { padding: 7px 12px; flex-wrap: wrap; }
    .demo-banner > span:nth-child(2) { display: none; }
    .page-shell { padding: 24px 14px 96px; }
    .page-heading, .record-header { align-items: flex-start; flex-direction: column; }
    .page-actions, .record-actions { width: 100%; }
    .page-actions .button, .record-actions .button { flex: 1; }
    h1 { font-size: 31px; }
    .dashboard-grid { gap: 12px; }
    .work-panel, .today-panel, .overview-panel, .process-strip, .list-surface, .upload-panel, .preview-panel, .review-queue, .record-section, .aside-panel { border-radius: 10px; }
    .task-row { grid-template-columns: 32px minmax(0,1fr) auto; padding-inline: 14px; }
    .task-check { position: relative; width: 32px; height: 32px; border: 0; background: transparent; }
    .task-check::before { content: ""; width: 19px; height: 19px; position: absolute; inset: 50% auto auto 50%; border: 1.5px solid #b6bec9; border-radius: 50%; transform: translate(-50%,-50%); }
    .task-check:hover::before { border-color: var(--ese-red); }
    .task-row .avatar { display: none; }
    .today-panel .compact-students { grid-template-columns: 1fr; }
    .compact-student:nth-child(odd) { border-right: 0; }
    .overview-columns { gap: 12px; }
    .overview-panel__head { grid-template-columns: 40px 1fr auto; padding-inline: 14px; }
    .overview-row { padding-inline: 14px; }
    .process-strip { padding: 17px; gap: 20px; }
    .process-steps { grid-template-columns: 1fr; gap: 0; }
    .process-steps li { min-height: 58px; grid-template-columns: 32px 1fr; grid-template-rows: auto auto; justify-items: start; align-content: center; column-gap: 10px; text-align: left; }
    .process-steps li > span { grid-row: 1 / 3; }
    .process-steps li::after { top: 43px; bottom: -1px; left: 15px; width: 1px; height: auto; }
    .filter-bar { align-items: stretch; flex-wrap: wrap; }
    .field-search { max-width: none; width: 100%; flex-basis: 100%; }
    .select-field { flex: 1; }
    .select-field select { width: 100%; }
    .result-count { width: 100%; margin-left: 0; }
    .data-table__head { display: none; }
    .student-row { padding: 14px; display: grid; grid-template-columns: 1fr auto; gap: 12px; }
    .student-cell { grid-column: 1 / -1; display: grid; grid-template-columns: 88px 1fr; }
    .student-cell--identity { grid-column: 1; grid-row: 1; grid-template-columns: 42px 1fr; }
    .student-row .student-cell:nth-child(2), .student-row .student-cell:nth-child(3), .student-row .student-cell:nth-child(4), .student-row .student-cell:nth-child(5) { display: grid; }
    .mobile-label { display: inline; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
    .row-arrow { width: 40px; height: 40px; grid-column: 2; grid-row: 1; align-self: center; }
    .import-layout { gap: 12px; }
    .upload-panel, .preview-panel, .review-queue { padding: 16px; }
    .dropzone { min-height: 210px; padding: 20px; }
    .preview-row { grid-template-columns: 22px 1fr auto; }
    .preview-row > span:nth-child(3) { grid-column: 2 / -1; }
    .issue-row { grid-template-columns: 26px 28px 1fr; }
    .issue-row .button { grid-column: 3; justify-self: start; }
    .record-identity { align-items: flex-start; }
    .record-title-line h1 { font-size: 28px; }
    .record-actions .more-button { flex: 0 0 40px; }
    .record-nav { margin-inline: -14px; padding-inline: 8px; overflow-x: auto; background: var(--canvas); }
    .record-nav a { white-space: nowrap; }
    .record-section { padding: 16px; }
    .journey-card { padding: 15px; }
    .journey-steps { grid-template-columns: 1fr; }
    .journey-steps li { min-height: 64px; grid-template-columns: 32px 1fr auto; grid-template-rows: auto; justify-items: start; align-items: center; gap: 10px; text-align: left; }
    .journey-steps li::after { top: 45px; left: 15px; width: 2px; height: 20px; }
    .journey-steps li > div { margin: 0; }
    .record-split { gap: 12px; }
    .detail-list > div { grid-template-columns: 105px 1fr; }
    .document-row { grid-template-columns: 38px 1fr auto; }
    .document-row > .status-pill { grid-column: 2; }
    .document-actions { grid-column: 3; grid-row: 1 / 3; }
    .payment-summary { grid-template-columns: 1fr; }
    .payment-summary > span { min-height: 58px; border-right: 0; border-bottom: 1px solid var(--border); }
    .payment-summary > span:last-child { border-bottom: 0; }
    .payment-row { padding: 12px; grid-template-columns: 1fr auto; gap: 6px; }
    .payment-row--head { display: none; }
    .payment-row > * { grid-column: 1; }
    .payment-row > span:nth-child(3), .payment-row > span:nth-child(4), .payment-row > span:nth-child(5) { grid-column: 2; text-align: right; }
    .communication-row { grid-template-columns: 36px 1fr; }
    .communication-row > .status-pill { grid-column: 2; }
    .record-aside { grid-template-columns: 1fr; }
    .record-aside .aside-panel:last-child { grid-column: auto; }
    .form-section { padding: 19px 16px; grid-template-columns: 1fr; gap: 17px; }
    .form-grid--two { grid-template-columns: 1fr; }
    .form-span-2 { grid-column: auto; }
    .form-actions { padding: 15px 16px; }
    .form-actions .button { flex: 1; }
    .recipient-line { padding-inline: 16px; flex-wrap: wrap; }
    .choice-panel #portal_user_roles { grid-template-columns: 18px minmax(0, 1fr); }
    .data-row, .data-list--communications .data-row, .data-row--payment, .data-row--user { padding: 13px 14px; grid-template-columns: 40px minmax(0, 1fr) auto; }
    .data-row > .row-arrow { display: none; }
    .data-row--payment time { grid-column: 1; grid-row: 1 / 3; }
    .data-row--payment .data-row__primary { grid-column: 2; }
    .data-row--payment .money, .data-row--payment .status-pill { grid-column: 3; }
    .data-row--user .role-list, .data-row--user .google-state { display: none; }
    .admin-summary { grid-template-columns: 1fr; }
    .admin-summary > div { min-height: 61px; border-right: 0; border-bottom: 1px solid var(--border); }
    .admin-summary > div:last-child { border-bottom: 0; }
    .admin-nav { margin-inline: -14px; padding-inline: 8px; overflow-x: auto; }
    .admin-nav a { white-space: nowrap; }
    .mobile-nav { position: fixed; z-index: 32; inset: auto 0 0; height: 70px; padding: 6px max(8px, env(safe-area-inset-right)) max(7px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(4,1fr); border-top: 1px solid var(--border); background: rgba(255,255,255,.98); }
    .mobile-nav a { display: grid; place-items: center; align-content: center; gap: 2px; color: var(--muted); font-size: 10px; }
    .mobile-nav a.is-active { color: var(--ese-red); }
    .mobile-nav svg { width: 20px; height: 20px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
