:root {
  --frontier-navy: #001842;
  --frontier-gold: #ffb504;
  --frontier-background: #fffcff;
  --frontier-neutral: #ece7e5;
  --frontier-border: #dfdedf;
  --frontier-muted: #626975;
  --bs-primary: #001842;
  --bs-primary-rgb: 0, 24, 66;
  --bs-body-color: #263449;
  --bs-body-bg: #fffcff;
  --bs-body-font-family: "Bricolage Grotesque", Arial, system-ui, sans-serif;
  --bs-link-color: #001842;
  --bs-link-color-rgb: 0, 24, 66;
  --bs-link-hover-color: #334d70;
  --bs-link-hover-color-rgb: 51, 77, 112;
  --bs-border-color: #dfdedf;
  --bs-border-radius: .625rem;
}
html { font-size: 15px; min-height: 100%; }
body { margin: 0; font-family: var(--bs-body-font-family); color: var(--bs-body-color); background: var(--frontier-background); }
a { color: var(--frontier-navy); text-underline-offset: 3px; }
h1, h2, h3, h4, h5, h6 { color: var(--frontier-navy); font-weight: 700; letter-spacing: -.025em; }
h1 { font-size: clamp(1.7rem, 2.3vw, 2.2rem); margin-bottom: .65rem; }
h2 { font-size: 1.45rem; }
.text-muted { color: var(--frontier-muted) !important; }
:focus-visible { outline: 3px solid var(--frontier-gold); outline-offset: 3px; }
.skip-link { position: fixed; left: 12px; top: -100px; z-index: 1100; background: white; padding: 12px 20px; border: 2px solid var(--frontier-navy); border-radius: 10px; }
.skip-link:focus { top: 12px; }
.app-sidebar { position: fixed; inset: 0 auto 0 0; width: 242px; z-index: 1030; background: var(--frontier-navy); color: white; padding: 16px 18px 20px; display: flex; flex-direction: column; }
.brand-block { color: white; text-decoration: none; padding: 4px 14px 26px; display: flex; flex-direction: column; gap: 9px; border-bottom: 1px solid #ffffff24; }
.brand-block:hover { color: white; }
.brand-school { font-weight: 700; font-size: 1.35rem; letter-spacing: -.03em; }
.brand-product { color: #d4dce8; font-size: .82rem; }
.sidebar-section-label { color: #aebcd2; text-transform: uppercase; font-size: .66rem; letter-spacing: .13em; font-weight: 700; padding: 20px 14px 12px; }
.app-sidebar .navbar-collapse { min-width: 0; }
.app-sidebar .app-navigation { flex-direction: column; width: 100%; gap: 5px; }
.app-navigation .nav-link { border: 0; background: transparent; display: flex; align-items: center; gap: 13px; color: #d7e0ed; font-weight: 500; font-size: .9rem; padding: 12px 14px; border-radius: 10px; width: 100%; text-align: left; position: relative; }
.app-navigation .nav-link i { width: 18px; text-align: center; color: #aebcd2; }
.app-navigation .nav-link:hover, .app-navigation .nav-link:focus { color: white; background: #ffffff12; }
.app-navigation .nav-link.active { background: #ffffff15; color: white; font-weight: 700; }
.app-navigation .nav-link.active::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--frontier-gold); }
.app-navigation .nav-link.active i { color: var(--frontier-gold); }
.app-navigation .dropdown-toggle::after { margin-left: auto; }
.app-navigation .dropdown-menu { max-width: min(310px, 90vw); font-size: .84rem; box-shadow: 0 10px 28px #00184218; padding: 8px; }
.dropdown-item { border-radius: 6px; white-space: normal; padding: 9px 12px; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--frontier-neutral); color: var(--frontier-navy); }
.dropdown-item.active, .dropdown-item:active { background: var(--frontier-navy); color: white; }
.brand-accent { display: block; width: 28px; height: 3px; background: var(--frontier-gold); margin-bottom: 12px; border-radius: 2px; }
.app-workspace { margin-left: 242px; min-height: 100vh; display: flex; flex-direction: column; min-width: 0; }
.app-header { min-height: 84px; background: white; border-bottom: 1px solid var(--frontier-border); padding: 18px 32px; display: flex; gap: 20px; justify-content: space-between; align-items: center; }
.header-context { display: flex; flex-direction: column; gap: 4px; color: var(--frontier-navy); font-weight: 600; }
.header-kicker { color: var(--frontier-muted); font-size: .7rem; letter-spacing: .09em; text-transform: uppercase; font-weight: 600; }
.header-tools { display: flex; align-items: center; justify-content: flex-end; gap: 18px; flex-wrap: wrap; }
.profile-summary { display: flex; align-items: center; gap: 9px; }
.profile-avatar { display: grid; place-items: center; border-radius: 50%; width: 34px; height: 34px; background: var(--frontier-neutral); color: var(--frontier-navy); font-weight: 700; }
.profile-email { font-size: .78rem; overflow-wrap: anywhere; max-width: 200px; }
.navigation-search { position: relative; width: 210px; }
.navigation-search > i { position: absolute; left: 12px; top: 13px; color: var(--frontier-muted); font-size: .85rem; }
.navigation-search input { padding-left: 34px; font-size: .8rem; background: var(--frontier-background); }
.navigation-results { position: absolute; top: calc(100% + 8px); left: 0; width: 100%; background: white; border: 1px solid var(--frontier-border); border-radius: 12px; padding: 6px; box-shadow: 0 6px 18px #00184212; z-index: 1040; max-height: 50vh; overflow-y: auto; }
.navigation-results a { display: block; text-decoration: none; border-radius: 6px; padding: 9px; font-size: .83rem; }
.navigation-results a:hover, .navigation-results a:focus { background: var(--frontier-neutral); }
.navigation-results p { font-size: .8rem; padding: 8px; margin: 0; }
.app-content { width: 100%; max-width: 1440px; margin: 0 auto; padding: 32px; flex: 1; }
.app-content-wide { max-width: none; }
.app-footer { display: flex; justify-content: space-between; gap: 20px; padding: 20px 32px; font-size: .73rem; color: var(--frontier-muted); border-top: 1px solid var(--frontier-border); }
.app-footer a { color: var(--frontier-muted); }
.app-public .app-workspace { margin-left: 0; }
.app-public .app-content { display: flex; align-items: center; justify-content: center; padding-top: 55px; padding-bottom: 55px; }
.app-public main { width: 100%; }
.public-brand { text-decoration: none; font-size: 1.2rem; font-weight: 700; display: flex; flex-direction: column; gap: 3px; }
.public-brand span { color: var(--frontier-muted); font-size: .72rem; font-weight: 400; }
.btn { font-weight: 600; border-radius: 10px; padding: .6rem 1rem; }
.btn-sm { font-size: .78rem; padding: .4rem .7rem; border-radius: 8px; }
.btn-primary, .btn-dark { --bs-btn-color: white; --bs-btn-bg: #001842; --bs-btn-border-color: #001842; --bs-btn-hover-color: white; --bs-btn-hover-bg: #19355e; --bs-btn-hover-border-color: #19355e; --bs-btn-active-bg: #19355e; --bs-btn-active-border-color: #19355e; --bs-btn-disabled-bg: #001842; --bs-btn-disabled-border-color: #001842; --bs-btn-focus-shadow-rgb: 0, 24, 66; }
.btn-outline-primary, .btn-outline-dark, .btn-outline-secondary { --bs-btn-color: #001842; --bs-btn-border-color: #a5adba; --bs-btn-hover-color: white; --bs-btn-hover-bg: #001842; --bs-btn-hover-border-color: #001842; --bs-btn-active-color: white; --bs-btn-active-bg: #001842; --bs-btn-active-border-color: #001842; --bs-btn-disabled-color: #626975; --bs-btn-disabled-border-color: #a5adba; }
.form-control, .form-select { border-radius: 10px; padding: .6rem .8rem; background-color: white; color: var(--bs-body-color); font-size: .9rem; }
.form-label { color: var(--frontier-navy); font-size: .83rem; font-weight: 600; }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: var(--frontier-navy); box-shadow: 0 0 0 3px #00184218; }
.form-check-input:checked { background-color: var(--frontier-navy); border-color: var(--frontier-navy); }
.form-floating > .form-control::placeholder { color: var(--frontier-muted); }
.card { border: 1px solid var(--frontier-border); border-radius: 18px; background: white; box-shadow: none; }
.card-header { background: #f6f3f2; border-bottom-color: var(--frontier-border); padding: 16px 20px; }
.card-body { padding: 24px; }
.alert { border-radius: 12px; font-size: .9rem; padding: 16px 20px; }
.alert-info { color: #263f62; background: #eef1f5; border-color: #d8e0eb; }
.alert-warning { color: #624b12; background: #fff7df; border-color: #ead9ab; }
.alert-success { color: #255f47; background: #eef5f1; border-color: #d6e6dd; }
.alert-danger { color: #8a303a; background: #fbf0f1; border-color: #edd3d6; }
.badge { border-radius: 50rem; padding: .45em .75em; font-weight: 600; }
.text-bg-primary { background-color: var(--frontier-navy) !important; }
.bg-light { background-color: #f6f3f2 !important; }
.table-responsive { border: 1px solid var(--frontier-border); border-radius: 16px; background: white; overflow-y: hidden; } /* horizontal scrolling only; hidden captions otherwise add a stray vertical bar */
.table { --bs-table-color: #263449; --bs-table-bg: white; --bs-table-border-color: #e9e6e8; --bs-table-striped-bg: #faf8fa; --bs-table-striped-color: #263449; --bs-table-hover-bg: #eef1f6; --bs-table-hover-color: #001842; --bs-table-active-bg: #e7edf6; font-size: .87rem; margin-bottom: 0; font-variant-numeric: tabular-nums; }
.table > thead > tr > th { color: var(--frontier-navy); background: #f3efee; font-weight: 600; font-size: .78rem; padding: 15px 16px; border-bottom: 1px solid var(--frontier-border); }
.table > tbody > tr > td { padding: 13px 16px; vertical-align: middle; }
.table caption { padding: 12px 16px; font-size: .77rem; color: var(--frontier-muted); }
.table th[aria-sort] { white-space: normal; }
.table-sort { color: inherit; background: transparent; border: 0; padding: 0; font: inherit; text-align: inherit; display: inline-flex; gap: 8px; align-items: center; }
.table-sort::after { content: "↕"; opacity: .5; }
th[aria-sort="ascending"] .table-sort::after { content: "↑"; opacity: 1; }
th[aria-sort="descending"] .table-sort::after { content: "↓"; opacity: 1; }
.nav-pills .nav-link.active { background: var(--frontier-navy); }
.page-link { color: var(--frontier-navy); }
.active > .page-link { background: var(--frontier-navy); border-color: var(--frontier-navy); }
.progress-bar { background: var(--frontier-navy); }
.modal-content { border-radius: 18px; }
pre { border-radius: 10px; font-size: .82rem; }
.portal-eyebrow { display: inline-flex; align-items: center; gap: 9px; font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--frontier-muted); }
.portal-eyebrow::before { content: ""; height: 6px; width: 6px; border-radius: 50%; background: var(--frontier-gold); }
.welcome-panel { padding: 36px; background: white; border: 1px solid var(--frontier-border); border-radius: 20px; margin-bottom: 24px; }
.welcome-panel h1 { margin-top: 14px; }
.welcome-panel p { color: var(--frontier-muted); margin: 0; }
.workspace-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.workspace-card { border: 1px solid var(--frontier-border); border-radius: 18px; background: white; padding: 26px; text-decoration: none; display: flex; gap: 20px; align-items: flex-start; }
.workspace-card:hover { border-color: #8d9bad; background: #faf9fb; }
.workspace-icon { display: grid; place-items: center; width: 44px; height: 44px; background: #eef1f6; color: var(--frontier-navy); border-radius: 12px; flex-shrink: 0; }
.workspace-card h2 { font-size: 1.1rem; margin-bottom: 8px; }
.workspace-card p { color: var(--frontier-muted); font-size: .87rem; margin: 0; }
.app-bare { background: white; }
.app-bare .app-content { min-height: 100vh; padding: 40px 16px; }
.login-panel { width: 100%; max-width: 400px; margin: auto; display: flex; flex-direction: column; align-items: center; gap: 28px; }
.sign-in-logo { display: block; width: 200px; max-width: 70%; height: auto; }
.google-sign-in { width: 100%; min-height: 46px; display: flex; justify-content: center; align-items: center; gap: 12px; padding: 10px 20px; background: white; color: #3c4043; font-family: Roboto, Arial, sans-serif; font-size: 1rem; font-weight: 500; border: 1px solid #dadce0; border-radius: 999px; transition: background-color .15s, box-shadow .15s; }
.google-sign-in:hover { background: #f8f9fa; box-shadow: 0 1px 3px #3c404326; }
.google-sign-in:active { background: #eef0f2; }
.google-mark { width: 20px; height: 20px; flex-shrink: 0; }
.login-domain-note { margin: -8px 0 0; font-size: .82rem; color: #3c4043; text-align: center; }
.login-panel .alert { margin: 0; text-align: center; }
/* Align the existing staff directory and data widgets with the shared palette. */
.staff-page { color: var(--bs-body-color); padding-top: 0; }
.staff-eyebrow { color: var(--frontier-muted); }
.staff-metric { border-color: var(--frontier-border); border-radius: 16px; background: white; }
.staff-metric strong { color: var(--frontier-navy); font-variant-numeric: tabular-nums; }
.staff-metric:first-child { border-top: 3px solid var(--frontier-gold); }
.staff-card { border-color: var(--frontier-border); border-radius: 18px; box-shadow: none; }
.staff-card-footer, .staff-table-scroll::-webkit-scrollbar-track { background: #f6f3f2; }
#staffTable { --bs-table-striped-bg: #faf8fa; --bs-table-hover-bg: #eef1f6; }
#staffTable th { color: var(--frontier-navy); background: #f3efee; border-bottom-color: var(--frontier-border); }
.staff-campus { color: var(--frontier-navy); }
.staff-status-neutral { background: var(--frontier-neutral); color: #4f5561; }
.staff-table-scroll:focus-visible { outline-color: var(--frontier-navy); }
.select2-container--default.select2-container--focus .select2-selection--single, .select2-container--default.select2-container--open .select2-selection--single { border-color: var(--frontier-navy); box-shadow: 0 0 0 3px #00184218; }
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable { background: var(--frontier-navy); color: white; }
@media (min-width: 992px) { .app-sidebar .navbar-collapse { display: flex !important; } }
@media (max-width: 1199px) { .profile-email { display: none; } .app-header { padding: 18px 24px; } .app-content { padding: 26px 24px; } }
@media (max-width: 991px) {
  .app-sidebar { position: relative; width: 100%; padding: 16px 20px; }
  .brand-block { padding: 0; border: 0; gap: 3px; padding-right: 65px; }
  .brand-school { font-size: 1.1rem; }
  .sidebar-section-label { display: none; }
  .sidebar-toggle { position: absolute; right: 0; top: -48px; }
  .app-sidebar .navbar-collapse.show, .app-sidebar .collapsing { padding-top: 18px; }
  .app-workspace { margin-left: 0; }
  .app-navigation .dropdown-menu { max-width: 100%; }
}
@media (max-width: 575px) {
  html { font-size: 14px; }
  .app-header { padding: 16px; flex-wrap: wrap; }
  .header-context { width: 100%; }
  .header-tools { width: 100%; gap: 12px; flex-wrap: nowrap; }
  .navigation-search { flex: 1; width: auto; }
  .app-content { padding: 24px 16px; }
  .app-footer { padding: 18px 16px; font-size: .68rem; }
  .workspace-grid { grid-template-columns: 1fr; }
  .welcome-panel { padding: 24px; }
  .workspace-card { padding: 22px; }
  .app-public .app-content { padding: 24px 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }

.table-sort { max-width: 100%; overflow-wrap: anywhere; }

/* Official supplied brand assets: scale proportionally, with clear space. */
.brand-block { flex-direction: row; align-items: center; gap: 10px; height: 64px; max-height: 80px; flex-shrink: 0; padding: 10px 6px; }
.sidebar-logo { display: block; width: 40px; height: auto; max-height: 48px; object-fit: contain; flex-shrink: 0; }
.brand-details { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.brand-details .brand-school { font-size: .9rem; line-height: 1.25; }
.brand-details .brand-product { font-size: .68rem; line-height: 1.3; }
@media (max-width: 991px) { .brand-block { height: 48px; padding: 0 65px 0 6px; } .sidebar-logo { width: 36px; } }

/* Student directory: concise controls with contextual help. */
.students-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; }
.students-heading h1 { margin: 8px 0 0; }
.student-info { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; color: #52647e; background: transparent; flex-shrink: 0; }
.student-info:hover, .student-info:focus { color: var(--frontier-navy); background: #eceff4; }
.student-help-tooltip { --bs-tooltip-bg: #001842; --bs-tooltip-color: #fff; --bs-tooltip-max-width: 340px; --bs-tooltip-opacity: 1; }
.student-help-tooltip .tooltip-inner { text-align: left; padding: 12px 16px; line-height: 1.6; font-size: .8rem; border-radius: 10px; }
.students-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; padding: 18px 22px; margin-bottom: 22px; border: 1px solid var(--frontier-border); border-radius: 16px; background: #f6f3f2; }
.students-filters > div:first-child { width: 220px; max-width: 100%; }
.students-filters .form-check { margin-top: 24px; margin-bottom: 0; font-size: .85rem; }
.students-directory { background: white; border: 1px solid var(--frontier-border); border-radius: 18px; overflow: hidden; }
.students-toolbar { padding: 20px 22px; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.students-search { width: min(100%, 440px); }
.students-search-input { position: relative; }
.students-search-input > i { position: absolute; left: 14px; top: 14px; font-size: .85rem; color: var(--frontier-muted); }
.students-search-input input { padding-left: 38px; }
.students-table-context { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.students-count { color: var(--frontier-navy); font-size: .78rem; font-weight: 600; }
.students-school-year { color: var(--frontier-muted); font-size: .75rem; }
.students-help { display: flex; align-items: center; gap: 16px; color: var(--frontier-muted); font-size: .76rem; }
.students-help > span { display: inline-flex; align-items: center; gap: 2px; }
.students-help .student-info { width: 26px; height: 26px; }
.students-directory .students-table-scroll { border: 0; border-top: 1px solid var(--frontier-border); border-radius: 0; }
/* No inner scrollbars on desktop: the 25-row page grows with the page instead. Phones keep horizontal scrolling. */
@media (min-width: 992px) { .students-directory .students-table-scroll { overflow: visible; } }
#studentsTable td:nth-child(2) { font-weight: 600; color: var(--frontier-navy); }
#studentsTable td:first-child { color: var(--frontier-muted); font-size: .8rem; }
/* The directory fits the page width: compact cells, wrapping names, and no forced minimum width. */
#studentsTable { width: 100%; margin: 0; font-size: .82rem; }
#studentsTable th, #studentsTable td { padding: 9px 8px; vertical-align: middle; }
#studentsTable thead th { white-space: nowrap; font-size: .74rem; }
#studentsTable td.text-end { font-variant-numeric: tabular-nums; }
/* Text columns hug their content; the spare width is shared by the count columns instead of widening Name. */
#studentsTable .students-col-fit { width: 1%; white-space: nowrap; padding-right: 28px; }
.students-sort { display: inline-flex; align-items: center; gap: 5px; color: var(--frontier-navy); text-decoration: none; }
.students-sort i { font-size: .62rem; color: #a3adbb; }
.students-sort.active i, .students-sort:hover i { color: var(--frontier-navy); }
.students-sort abbr { text-decoration: none; cursor: inherit; }
.students-pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 22px; border-top: 1px solid var(--frontier-border); }
.students-pager-range { font-size: .78rem; color: var(--frontier-muted); }
.students-pager .page-link { color: var(--frontier-navy); }
.students-pager .page-item.active .page-link { background: var(--frontier-navy); border-color: var(--frontier-navy); color: white; }
.students-empty { margin: 20px 22px; }
.students-directory #noMatches, .students-directory > .alert { margin: 20px 22px; }
@media (max-width: 575px) {
    .students-filters { padding: 16px; gap: 16px; }
    .students-filters > div:first-child { width: 100%; }
    .students-filters .form-check { margin-top: 0; }
    .students-toolbar { padding: 16px; gap: 12px; }
    .students-search { width: 100%; }
    .students-table-context { width: 100%; flex-direction: row; justify-content: space-between; align-items: center; flex-wrap: wrap; }
    .students-help { gap: 8px; }
}

/* Student overview shares the directory's saved scope and brand components. */
.dashboard-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.dashboard-heading h1 { margin: 10px 0 8px; }
.dashboard-heading p { font-size: .87rem; }
.dashboard-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; border: 1px solid var(--frontier-border); border-radius: 16px; padding: 16px 20px; background: white; margin-bottom: 24px; }
.dashboard-filters > div:first-child { min-width: 180px; }
.dashboard-filters .form-check, .dashboard-filters > button { margin-top: 22px; font-size: .8rem; }
.dashboard-snapshot { margin-left: auto; font-size: .73rem; color: var(--frontier-muted); display: flex; align-items: center; gap: 8px; }
/* Dashboard summary tiles: each tile groups related counts. */
.dashboard-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.dashboard-tile { padding: 16px 20px; background: white; border: 1px solid var(--frontier-border); border-radius: 14px; min-width: 0; container-type: inline-size; }
.dashboard-tile-title { font-size: .72rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--frontier-muted); margin: 0 0 10px; }
.dashboard-tile-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); gap: 10px 14px; margin: 0; }
.dashboard-tile-stats > div { min-width: 0; }
.dashboard-tile-stats dt { font-size: .7rem; font-weight: 600; color: var(--frontier-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dashboard-tile-stats dt abbr { text-decoration: none; cursor: help; }
.dashboard-tile-stats dd { margin: 2px 0 0; color: var(--frontier-navy); font-size: clamp(1.1rem, 1.4vw, 1.4rem); font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
/* District view: per-campus rows inside each tile, with a District total row. */
.dashboard-tile-table { width: 100%; border-collapse: collapse; font-size: clamp(.68rem, 3.4cqi, .8rem); font-variant-numeric: tabular-nums; }
.dashboard-tile-table th, .dashboard-tile-table td { padding: 5px 4px; text-align: right; white-space: nowrap; }
.dashboard-tile-table th:last-child, .dashboard-tile-table td:last-child { padding-right: 0; }
.dashboard-tile-table th:first-child { text-align: left; padding-left: 0; }
.dashboard-tile-table thead th { font-size: .68rem; font-weight: 600; color: var(--frontier-muted); border-bottom: 1px solid var(--frontier-border); white-space: normal; vertical-align: bottom; line-height: 1.2; }
.dashboard-tile-table thead abbr { text-decoration: none; cursor: help; }
.dashboard-tile-table tbody th { font-weight: 600; color: var(--frontier-muted); }
.dashboard-tile-table td { color: var(--frontier-navy); font-weight: 600; }
.dashboard-tile-table tfoot th, .dashboard-tile-table tfoot td { border-top: 2px solid var(--frontier-border); color: var(--frontier-navy); font-weight: 800; font-size: 1.1em; padding-top: 7px; }
@media (max-width: 991px) { .dashboard-tiles { grid-template-columns: 1fr; } }
@media (max-width: 575px) { .dashboard-tiles { gap: 12px; } }
/* Paired panels: equal widths, and grid stretch keeps each pair the same height. */
.dashboard-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 24px; margin-bottom: 24px; }
.dashboard-panel { min-width: 0; background: white; border: 1px solid var(--frontier-border); border-radius: 18px; padding: 24px; }
.dashboard-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 24px; }
.dashboard-panel h2 { font-size: 1.08rem; margin-bottom: 6px; }
.dashboard-subtitle { font-size: .75rem; color: var(--frontier-muted); }
.dashboard-panel-icon { color: #8d9bad; }
.dashboard-list-table { margin: 0; font-size: .82rem; }
.dashboard-list-table th, .dashboard-list-table td { padding: 8px 6px; vertical-align: middle; }
.dashboard-list-table thead th { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--frontier-muted); border-bottom-color: var(--frontier-border); }
.dashboard-list-table tbody th { font-weight: 600; color: var(--frontier-navy); }
.dashboard-list-value { font-weight: 700; color: var(--frontier-navy); font-variant-numeric: tabular-nums; }
.dashboard-negative { color: #b42318; }
.dashboard-rank { width: 2.2rem; color: var(--frontier-muted); font-weight: 700; font-variant-numeric: tabular-nums; }
/* Paged student and teacher lists: the pager sits at the bottom so paired panels stay aligned. */
.dashboard-charts > .dashboard-panel { display: flex; flex-direction: column; }
/* Demographics donut: measure toggles and group-by above, donut beside its legend table. */
.dashboard-demographics { margin-bottom: 24px; }
.demographics-controls { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.demographics-group-by { display: flex; align-items: center; gap: 8px; font-size: .75rem; font-weight: 600; color: var(--frontier-muted); margin: 0; }
.demographics-group-by .form-select { width: auto; min-width: 140px; }
/* Demographics: one large donut with direct labels (name, value, share) on each side. */
.demographics-pie { display: block; width: 100%; max-width: 900px; height: auto; margin: 0 auto; overflow: visible; }
.demographics-total { font-size: 34px; font-weight: 800; fill: var(--frontier-navy); }
.demographics-total-label { font-size: 15px; font-weight: 600; fill: var(--frontier-muted); }
.demographics-leader { fill: none; stroke: #a3adbb; stroke-width: 1; }
.demographics-label { font-size: 14px; fill: var(--frontier-navy); cursor: default; }
.demographics-label-name { font-weight: 700; }
.demographics-label-value { fill: #4b5563; font-size: 13px; }
.demographics-label.is-active .demographics-label-name { text-decoration: underline; }
/* Thin outer ring: each group's share of enrolled students, lighter than the slices it compares with. */
.demographics-ring { opacity: .5; stroke: white; stroke-width: 1; transition: opacity .15s; }
.demographics-ring.is-active { opacity: .9; }
.demographics-label-enrollment { fill: var(--frontier-muted); font-size: 12px; }
.demographics-slice { stroke: white; stroke-width: 2; cursor: default; transition: opacity .15s; }
.demographics-pie:has(.is-active) .demographics-slice:not(.is-active) { opacity: .45; }
.demographics-pie:has(.is-active) .demographics-ring:not(.is-active) { opacity: .2; }
.demographics-note { font-size: .74rem; margin: 12px 0 0; }
.demographics-subtitle { font-size: .76rem; margin: -6px 0 16px; }
/* Referral infractions list: level tag (L1/L2/L3) before the full infraction description. */
.infraction-cell { line-height: 1.45; }
.infraction-level { display: inline-block; margin-right: 6px; padding: 1px 6px; border-radius: 6px; background: #eef1f6; color: var(--frontier-navy); font-size: .68rem; font-weight: 800; }
/* Infraction names are long policy descriptions: truncate in the legend, full text on hover. */
.dashboard-infractions { margin-bottom: 24px; }
/* Year over year: four small bar charts, each on its own scale. */
.dashboard-history { margin-bottom: 24px; }
/* "Include automated referrals" switches (all share one setting). */
.dashboard-tile-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.dashboard-automated-switch { font-size: .74rem; color: var(--frontier-muted); white-space: nowrap; }
.dashboard-tile-heading .dashboard-automated-switch { font-size: .68rem; }
.history-controls { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; font-size: .8rem; }
.history-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.history-chart { margin: 0; min-width: 0; }
.history-chart figcaption { font-size: .76rem; font-weight: 700; color: var(--frontier-navy); margin-bottom: 6px; }
.history-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.history-baseline { stroke: #c9ccd1; stroke-width: 1; }
.history-gap { stroke: white; stroke-width: 2; }
.history-value { font-size: 12px; font-weight: 700; fill: var(--frontier-navy); font-variant-numeric: tabular-nums; }
.history-year { font-size: 11px; fill: #4b5563; }
.history-year-note { font-size: 9px; fill: var(--frontier-muted); }
.history-empty { font-size: 11px; fill: var(--frontier-muted); }
.history-bar.is-current { opacity: .55; }
.history-bar { cursor: default; }
.history-bar.is-hover { stroke: #1f2937; stroke-width: 1.5; }
.history-tooltip { position: absolute; z-index: 1080; pointer-events: none; background: #fff; border: 1px solid #d6d9de; border-radius: 6px; box-shadow: 0 4px 14px rgba(15, 23, 42, .14); padding: 7px 10px; font-size: .76rem; line-height: 1.45; color: #1f2937; white-space: nowrap; }
.history-tooltip[hidden] { display: none; }
.history-tooltip-title { font-weight: 700; margin-bottom: 2px; }
.history-tooltip-total { font-weight: 700; border-top: 1px solid #e5e7eb; margin-top: 3px; padding-top: 3px; }
.history-campus-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: .74rem; color: #4b5563; margin: -4px 0 14px; }
.history-campus-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.history-legend { display: flex; gap: 14px; font-size: .7rem; color: #4b5563; margin-top: 4px; }
.history-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
@media (max-width: 991px) { .history-grid { grid-template-columns: 1fr; } }
@media (max-width: 575px) { .history-grid { grid-template-columns: 1fr; } }
.dashboard-list-pager { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: auto; padding-top: 12px; }
.dashboard-list-page { font-size: .76rem; color: var(--frontier-muted); font-variant-numeric: tabular-nums; min-width: 84px; text-align: center; }
.dashboard-list-pager .btn { width: 32px; height: 30px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.dashboard-student-id { display: block; margin-top: 4px; color: var(--frontier-muted); font-size: .7rem; }
.dashboard-footnote { display: flex; align-items: baseline; gap: 8px; color: var(--frontier-muted); font-size: .73rem; padding: 18px 0 0; margin: 0; }
@media (max-width: 767px) { .dashboard-charts { grid-template-columns: 1fr; } .dashboard-snapshot { width: 100%; margin-left: 0; } .dashboard-filters { gap: 14px; } .dashboard-panel { padding: 20px; } }
@media (max-width: 575px) { .dashboard-filters > div:first-child { width: 100%; } .dashboard-filters .form-check, .dashboard-filters > button { margin-top: 0; } .dashboard-heading .btn { width: 100%; } }
.global-campus-filter { display: flex; align-items: center; gap: 8px; margin: 0; }
.global-campus-filter label { font-size: .75rem; font-weight: 600; color: var(--frontier-muted); }
.global-campus-filter select { min-width: 110px; max-width: 180px; }
.dashboard-freshness { display: flex; margin-bottom: 24px; }
.students-filters .form-check { margin-top: 0; }
@media (max-width: 767px) {
  .header-tools { flex-wrap: wrap; }
  .global-campus-filter { flex: 1 1 100%; }
  .global-campus-filter select { flex: 1; max-width: none; }
}
.page-loading[hidden] { display: none !important; }
.page-loading { pointer-events: none; }
.page-loading-progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 2000; overflow: hidden; background: #00184216; }
.page-loading-progress::after { content: ""; position: absolute; width: 35%; height: 100%; background: var(--frontier-gold); animation: page-loading-travel 1.3s ease-in-out infinite; }
.page-loading-status { position: fixed; right: 24px; bottom: 24px; z-index: 2000; display: flex; align-items: center; gap: 12px; max-width: min(420px, calc(100vw - 32px)); padding: 16px 20px; border: 1px solid var(--frontier-border); border-radius: 12px; background: white; color: var(--frontier-navy); box-shadow: 0 8px 32px #00184220; font-size: .85rem; font-weight: 500; }
.page-loading-spinner { width: 20px; height: 20px; flex: 0 0 20px; border: 2px solid #00184218; border-top-color: var(--frontier-navy); border-radius: 50%; animation: page-loading-spin .8s linear infinite; }
@keyframes page-loading-travel { from { transform: translateX(-100%); } to { transform: translateX(390%); } }
@keyframes page-loading-spin { to { transform: rotate(360deg); } }
@media (max-width: 575px) { .page-loading-status { right: 16px; bottom: 16px; } }
@media (prefers-reduced-motion: reduce) {
    .page-loading-progress::after { width: 100%; animation: none; }
    .page-loading-spinner { animation: none; }
}
