/* Cambridge design tokens
   Brand colors come from the old site (cambridge-wp.css): navy #0a308d, green #249808, red #b10606. */
:root {
  --cam-navy: #0a308d;
  --cam-navy-dark: #071f5c;
  --cam-navy-soft: #e8eef9;
  --cam-green: #249808;
  --cam-red: #b10606;
  --cam-ink: #1c2333;
  --cam-muted: #5b6475;
  --cam-line: #e3e7ef;
  --cam-bg: #f5f7fb;
  --cam-surface: #ffffff;
  --cam-radius: 12px;
  --cam-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06);

  --bs-primary: var(--cam-navy);
  --bs-primary-rgb: 10, 48, 141;
  --bs-success: var(--cam-green);
  --bs-danger: var(--cam-red);
  --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-color: var(--cam-ink);
  --bs-body-bg: var(--cam-bg);
  --bs-border-color: var(--cam-line);
  --bs-link-color: var(--cam-navy);
  --bs-link-color-rgb: 10, 48, 141;
}

body { font-size: 15px; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-weight: 650; letter-spacing: -.01em; }

.btn-primary {
  --bs-btn-bg: var(--cam-navy);
  --bs-btn-border-color: var(--cam-navy);
  --bs-btn-hover-bg: var(--cam-navy-dark);
  --bs-btn-hover-border-color: var(--cam-navy-dark);
  --bs-btn-active-bg: var(--cam-navy-dark);
  --bs-btn-active-border-color: var(--cam-navy-dark);
  --bs-btn-disabled-bg: var(--cam-navy);
  --bs-btn-disabled-border-color: var(--cam-navy);
  font-weight: 600;
}
.form-control:focus, .btn:focus-visible {
  border-color: var(--cam-navy);
  box-shadow: 0 0 0 .2rem rgba(10, 48, 141, .2);
}

/* ---------- Sign-in page ---------- */
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 992px) {
  .auth { grid-template-columns: 5fr 6fr; }
}
.auth-brand {
  display: none;
  background: linear-gradient(155deg, var(--cam-navy) 0%, var(--cam-navy-dark) 100%);
  color: #fff;
  padding: 3rem;
  flex-direction: column;
  justify-content: space-between;
}
@media (min-width: 992px) { .auth-brand { display: flex; } }
.auth-brand h1 { font-size: 2.25rem; line-height: 1.2; max-width: 22ch; }
.auth-brand p { color: rgba(255, 255, 255, .78); max-width: 42ch; }
.auth-brand ul { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: .75rem; }
.auth-brand li { display: flex; gap: .6rem; align-items: center; color: rgba(255, 255, 255, .9); }
.auth-brand li::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: #7fd36b; flex: none;
}
/* Logo: cambridge-logo.png (blue) on light backgrounds, cambridge-logo-white.png on navy */
.logo { display: block; height: auto; width: 100%; }
.logo-lg { max-width: 260px; }

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}
.auth-card { width: 100%; max-width: 400px; }
.auth-card-logo { max-width: 220px; margin-bottom: 2rem; }
@media (min-width: 992px) { .auth-card-logo { display: none; } }
.auth-card h2 { font-size: 1.6rem; margin-bottom: .25rem; }
.auth-card .lead { color: var(--cam-muted); font-size: .95rem; margin-bottom: 1.75rem; }
.auth-card .form-control { padding: .7rem .85rem; border-radius: 8px; }
.auth-card .btn { padding: .7rem; border-radius: 8px; }
.auth-links { display: flex; justify-content: space-between; margin-top: 1.25rem; font-size: .9rem; }
.notice {
  border-radius: 8px; padding: .8rem 1rem; margin-bottom: 1.25rem; font-size: .9rem;
  background: #fdecec; color: var(--cam-red); border: 1px solid #f5c2c2;
}
.notice strong { display: block; }
.notice-info { background: var(--cam-navy-soft); color: var(--cam-navy); border-color: #c9d6f1; }

/* ---------- App shell (signed in) ---------- */
.shell { min-height: 100vh; display: grid; grid-template-columns: 1fr; }
@media (min-width: 992px) { .shell { grid-template-columns: 248px 1fr; } }
/* A wide table (a report) scrolls inside its own box instead of widening the whole page */
.shell > * { min-width: 0; }

.sidebar {
  background: var(--cam-navy-dark);
  color: #fff;
  padding: 1.25rem .9rem;
  display: none;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky; top: 0; height: 100vh;
}
@media (min-width: 992px) { .sidebar { display: flex; } }
/* Phone/tablet slide-out menu reuses the sidebar look */
.sidebar-mobile.offcanvas { display: flex; position: fixed; height: 100vh; width: 270px; border-right: 0; }
.menu-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 4px;
  width: 38px; height: 38px; padding: 0 9px; border: 1px solid var(--cam-line); border-radius: 8px;
}
.menu-toggle span { display: block; height: 2px; background: var(--cam-ink); border-radius: 2px; }

.sidebar .logo-link { display: block; padding: .35rem .6rem .25rem; }
.sidebar .logo { max-width: 190px; }
.sidebar nav { display: grid; gap: 2px; }
.sidebar .nav-heading {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .08em;
  color: rgba(255, 255, 255, .5); padding: .9rem .6rem .35rem;
}
.sidebar a, .sidebar span.nav-item-soon {
  display: flex; align-items: center; justify-content: space-between;
  color: rgba(255, 255, 255, .85); text-decoration: none;
  padding: .5rem .6rem; border-radius: 8px; font-size: .92rem;
}
.sidebar a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.sidebar a.active { background: rgba(255, 255, 255, .14); color: #fff; font-weight: 600; }
.sidebar span.nav-item-soon { color: rgba(255, 255, 255, .45); cursor: default; }
.badge-soon {
  font-size: .62rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .6);
  padding: .15rem .4rem; border-radius: 4px;
}

.topbar {
  background: var(--cam-surface);
  border-bottom: 1px solid var(--cam-line);
  padding: .75rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  position: sticky; top: 0; z-index: 10;
}
.topbar .context { color: var(--cam-muted); font-size: .88rem; }
.topbar .context strong { color: var(--cam-ink); font-weight: 600; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--cam-navy-soft); color: var(--cam-navy);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .8rem;
}
.student-logo { width: auto; height: 38px; }
.student-content { margin: 0 auto; max-width: 960px; }
.pin-input { letter-spacing: .25em; font-weight: 600; text-align: center; }

.content { padding: 1.75rem 1.5rem 3rem; max-width: 1200px; }
@media (min-width: 992px) { .content { padding: 2rem 2.5rem 3rem; } }

.page-header { margin-bottom: 1.5rem; }
.page-header h1 { font-size: 1.6rem; margin: 0 0 .25rem; }
.page-header p { color: var(--cam-muted); margin: 0; }

.card-cam {
  background: var(--cam-surface);
  border: 1px solid var(--cam-line);
  border-radius: var(--cam-radius);
  box-shadow: var(--cam-shadow);
  padding: 1.25rem 1.35rem;
}
.card-cam h2 { font-size: 1rem; margin-bottom: .9rem; }
.stat-label { color: var(--cam-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.stat-value { font-size: 1.05rem; font-weight: 600; }

/* Account menu in the top bar */
.account-button { display: inline-flex; align-items: center; gap: .6rem; border: 0; padding: .25rem .4rem; border-radius: 10px; }
.account-button:hover, .account-button[aria-expanded="true"] { background: var(--cam-bg); }

/* Icons (Navigation/Icons.cs) */
.icon { width: 20px; height: 20px; flex: none; }

/* Dashboard: compact icon cards, grouped by menu section */
.dash-section { margin-bottom: 1.75rem; }
.dash-section h2 {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--cam-muted); font-weight: 600; margin-bottom: .75rem;
}
.tile-grid { display: grid; gap: .85rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.tile {
  display: flex; align-items: flex-start; gap: .9rem; padding: 1rem 1.1rem;
  background: var(--cam-surface); border: 1px solid var(--cam-line); border-radius: var(--cam-radius);
  box-shadow: var(--cam-shadow); color: inherit; text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.tile-icon {
  width: 44px; height: 44px; border-radius: 10px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--cam-navy-soft); color: var(--cam-navy);
}
.tile-icon .icon { width: 22px; height: 22px; }
.tile-text { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.tile-title { font-weight: 600; font-size: 1rem; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.tile-desc { color: var(--cam-muted); font-size: .88rem; line-height: 1.4; }
a.tile:hover { transform: translateY(-2px); border-color: #c9d6f1; box-shadow: 0 6px 20px rgba(16, 24, 40, .1); color: inherit; }
a.tile:hover .tile-icon { background: var(--cam-navy); color: #fff; }
a.tile:focus-visible { outline: 3px solid rgba(10, 48, 141, .35); outline-offset: 2px; }
.tile-soon { cursor: default; box-shadow: none; }
.tile-soon .tile-icon { background: #eef0f4; color: #8a93a6; }
.tile-flag {
  font-size: .66rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  background: #eef0f4; color: var(--cam-muted); padding: .12rem .45rem; border-radius: 999px;
}

/* Sidebar icons */
.sidebar .nav-label { display: inline-flex; align-items: center; gap: .6rem; white-space: nowrap; }
.sidebar .nav-icon { width: 18px; height: 18px; opacity: .85; }

/* Data tables (lists like Users) */
.data-table { font-size: .92rem; }
.data-table thead th {
  font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--cam-muted);
  font-weight: 600; background: #f8f9fc; border-bottom-color: var(--cam-line); white-space: nowrap;
}
.data-table thead th a { color: inherit; text-decoration: none; }
.data-table thead th a:hover { color: var(--cam-navy); text-decoration: underline; }
.data-table td { border-color: var(--cam-line); }
.data-table td a { text-decoration: none; }
.data-table td a:hover { text-decoration: underline; }
.row-deleted td { color: var(--cam-muted); }
.row-deleted td a { color: var(--cam-red); }

/* Status labels (UserStatus codes) */
.status { display: inline-block; font-size: .75rem; font-weight: 600; padding: .12rem .5rem; border-radius: 999px; background: #eef0f4; color: var(--cam-muted); }
.status-A { background: #e7f5e3; color: #1d6b09; }
.status-P, .status-C { background: #fff4dc; color: #8a5a00; }
.status-I { background: #eef0f4; color: var(--cam-muted); }
.status-D { background: #fdecec; color: var(--cam-red); }

/* Forms */
.field-error { display: block; color: var(--cam-red); font-size: .85rem; margin-top: .25rem; }
.field-error:empty { display: none; }
.input-validation-error { border-color: var(--cam-red); }
.notice-success { background: #e7f5e3; color: #1d6b09; border-color: #c4e6bb; }
.validation-summary-valid { display: none; }
.validation-summary-errors ul { margin: 0; padding-left: 1.1rem; }
.breadcrumb-cam { font-size: .85rem; color: var(--cam-muted); }
.breadcrumb-cam a { color: var(--cam-navy); text-decoration: none; }

/* Buttons with icons */
.btn-icon { display: inline-flex; align-items: center; gap: .45rem; }
.btn-icon .icon { width: 18px; height: 18px; }
.btn-icon-only { border: 0; color: var(--cam-muted); padding: .25rem .4rem; border-radius: 8px; }
.btn-icon-only:hover, .btn-icon-only[aria-expanded="true"] { background: var(--cam-bg); color: var(--cam-ink); }
.dropdown-item { display: flex; align-items: center; }
.dropdown-item .icon { width: 16px; height: 16px; color: var(--cam-muted); }

/* Status tabs with counts (list filters) */
.status-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.status-tab {
  display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .8rem; border-radius: 999px;
  border: 1px solid var(--cam-line); background: var(--cam-surface); color: var(--cam-ink);
  text-decoration: none; font-size: .88rem; font-weight: 500;
}
.status-tab .count { font-size: .78rem; color: var(--cam-muted); font-weight: 600; }
.status-tab:hover { border-color: #c9d6f1; color: var(--cam-navy); }
.status-tab.active { background: var(--cam-navy); border-color: var(--cam-navy); color: #fff; }
.status-tab.active .count { color: rgba(255, 255, 255, .8); }

/* Filter bar */
.filter-bar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: .85rem; }
.filter-search { position: relative; flex: 1 1 260px; }
.filter-search .form-control { padding-left: 2.2rem; }
.filter-search-icon { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: var(--cam-muted); width: 18px; height: 18px; }
.filter-customer { flex: 0 1 260px; }

/* Bulk action bar */
.bulk-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: .85rem; padding: .55rem .85rem;
  background: var(--cam-navy-soft); border: 1px solid #c9d6f1; border-radius: 10px; font-size: .9rem;
}
.bulk-bar[hidden] { display: none; }

.list-meta { display: flex; justify-content: space-between; padding: .55rem 1rem; border-bottom: 1px solid var(--cam-line); font-size: .82rem; color: var(--cam-muted); }
.data-table thead th a.sorted { color: var(--cam-navy); }
.data-table thead th a.sorted::after { content: " ▾"; }
.col-check { width: 2.5rem; }
.col-actions { width: 3rem; text-align: right; }
.empty-state { text-align: center; color: var(--cam-muted); padding: 3rem 1rem !important; }

/* People in lists */
.person { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.person-name { font-weight: 600; color: var(--cam-ink); }
.person-name:hover { color: var(--cam-navy); }
.person-sub { font-size: .82rem; color: var(--cam-muted); max-width: 280px; }
.avatar-sm { width: 32px; height: 32px; font-size: .72rem; flex: none; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.1rem; }
.min-w-0 { min-width: 0; }

/* Role labels, one color per access level */
.role-badge { display: inline-block; font-size: .78rem; font-weight: 600; padding: .15rem .55rem; border-radius: 6px; background: #eef0f4; color: var(--cam-ink); white-space: nowrap; }
.role-APPADM { background: #f3e8ff; color: #6b21a8; }
.role-CESADM { background: #e0e7ff; color: #3730a3; }
.role-CESSALES { background: #dbeafe; color: #1e40af; }
.role-CUSTDIST { background: #dcfce7; color: #166534; }
.role-CUSTSITE { background: #e0f2fe; color: #075985; }
.role-CUSTTEACH { background: #f1f5f9; color: #334155; }
.role-TRCONLY { background: #fef3c7; color: #92400e; }

.notice-info { background: var(--cam-navy-soft); color: var(--cam-navy); border: 1px solid #c9d6f1; }
.temp-password code { font-size: 1.05rem; padding: .3rem .6rem; background: #fff; border: 1px solid #c4e6bb; border-radius: 6px; color: var(--cam-ink); letter-spacing: .04em; }

/* Search-as-you-type picker (site.js) */
.combobox { position: relative; }
.combobox-list {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); max-height: 260px; overflow: auto;
  margin: 0; padding: .3rem; list-style: none; background: #fff; border: 1px solid var(--cam-line); border-radius: 10px;
  box-shadow: 0 10px 30px rgba(16, 24, 40, .12);
}
.combobox-list li { padding: .45rem .6rem; border-radius: 6px; cursor: pointer; font-size: .92rem; }
.combobox-list li:hover, .combobox-list li[aria-selected="true"] { background: var(--cam-navy-soft); color: var(--cam-navy); }
.combobox-list .combobox-empty { color: var(--cam-muted); cursor: default; }
.combobox-list .combobox-empty:hover { background: none; color: var(--cam-muted); }

/* Phones: list tables (class "card-table") turn into one card per row.
   Cells with data-inline sit side by side; data-inline="label" also shows the column name (from data-label). */
@media (max-width: 767.98px) {
  .card-table thead { display: none; }
  .card-table, .card-table tbody, .card-table tr, .card-table td { display: block; width: 100%; }
  .card-table tr { position: relative; padding: .85rem 2.6rem .85rem 1rem; border-bottom: 1px solid var(--cam-line); }
  .card-table:has(.col-check) tr { padding-left: 2.6rem; }
  .card-table td { border: 0; padding: .15rem 0; text-align: left !important; background: transparent !important; box-shadow: none !important; }
  .card-table td.col-check { position: absolute; left: 1rem; top: 1.1rem; width: auto; padding: 0; }
  .card-table td.col-actions { position: absolute; right: .6rem; top: .7rem; width: auto; padding: 0; }
  .card-table td[data-inline] { display: inline-block; width: auto; margin-right: .75rem; }
  .card-table td[data-inline="label"]::before { content: attr(data-label) ": "; color: var(--cam-muted); font-size: .82rem; }
  .card-table td[data-secondary] { font-size: .88rem; color: var(--cam-muted); }
  .filter-customer { flex: 1 1 100%; }
}

/* Role picker cards (user edit) */
.role-cards { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.role-card { position: relative; display: block; cursor: pointer; }
.role-card input { position: absolute; opacity: 0; inset: 0; }
.role-card-body {
  display: flex; flex-direction: column; gap: .2rem; height: 100%; padding: .75rem .9rem;
  border: 1px solid var(--cam-line); border-radius: 10px; background: #fff; transition: border-color .12s, box-shadow .12s;
}
.role-card-name { font-weight: 600; }
.role-card-opens { font-size: .82rem; color: var(--cam-muted); line-height: 1.35; }
.role-card:hover .role-card-body { border-color: #c9d6f1; }
.role-card input:checked + .role-card-body { border-color: var(--cam-navy); box-shadow: 0 0 0 2px rgba(10, 48, 141, .18); background: var(--cam-navy-soft); }
.role-card input:focus-visible + .role-card-body { outline: 3px solid rgba(10, 48, 141, .35); outline-offset: 2px; }

.password-group .btn { white-space: nowrap; }

/* ---------- Forms ----------
   Inputs are white with a clear border; gray is only for read-only fields. */
.form-control, .form-select { background-color: #fff; border-color: #d3d9e4; }
.form-control::placeholder { color: #9aa3b5; }
.form-control[readonly], .form-control:disabled, .form-select:disabled { background-color: #f1f3f7; color: var(--cam-muted); }
.form-label { color: var(--cam-ink); font-size: .9rem; }

/* Settings-style form: one card, each section's title + explanation on the left, fields on the right */
.form-card { background: var(--cam-surface); border: 1px solid var(--cam-line); border-radius: var(--cam-radius); box-shadow: var(--cam-shadow); margin-bottom: 1.25rem; }
.form-section { display: grid; grid-template-columns: 1fr; gap: 1rem 2rem; padding: 1.4rem 1.5rem; border-bottom: 1px solid var(--cam-line); }
@media (min-width: 1200px) { .form-section { grid-template-columns: 210px 1fr; } }
.form-section-head h2 { font-size: .98rem; margin: 0 0 .3rem; }
.form-section-head p { color: var(--cam-muted); font-size: .84rem; line-height: 1.45; margin: 0; }
.form-section > :last-child { min-width: 0; }

/* Footer with Save / Cancel, part of the card. Floats at the bottom of the screen only once something has changed. */
.form-footer {
  display: flex; align-items: center; justify-content: flex-end; gap: .6rem; padding: .9rem 1.5rem;
  background: #fafbfd; border-radius: 0 0 var(--cam-radius) var(--cam-radius);
}
.form-card.is-dirty .form-footer {
  position: sticky; bottom: 0; z-index: 6; background: #fff;
  box-shadow: 0 -8px 24px rgba(16, 24, 40, .1); border-top: 1px solid var(--cam-line);
}
.save-bar-note { margin-right: auto; font-size: .88rem; color: #8a5a00; font-weight: 500; display: inline-flex; align-items: center; gap: .4rem; }
.save-bar-note::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #e0a100; }

/* File drop area (Import) */
.drop-zone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; padding: 1.75rem 1rem;
  border: 2px dashed #c9d2e3; border-radius: 12px; background: #fafbfd; cursor: pointer; text-align: center; transition: border-color .12s, background .12s;
}
.drop-zone:hover, .drop-zone.dragging { border-color: var(--cam-navy); background: var(--cam-navy-soft); }
.drop-zone.has-file { border-style: solid; border-color: #c4e6bb; background: #f3fbf1; }
.drop-zone:focus-within { outline: 3px solid rgba(10, 48, 141, .35); outline-offset: 2px; }
.drop-zone-icon { width: 28px; height: 28px; color: var(--cam-navy); }
.drop-zone-title { font-weight: 600; }
.drop-zone-sub { font-size: .82rem; color: var(--cam-muted); }

/* Template column guide (Import) */
.template-columns { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.template-columns > div { padding: .8rem 1.5rem; border-bottom: 1px solid var(--cam-line); }
.template-columns dt { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .85rem; color: var(--cam-navy); }
.template-columns dd { margin: 0; font-size: .86rem; color: var(--cam-muted); }

/* Change password */
.password-page { max-width: 560px; }
.password-rules { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .25rem .75rem; font-size: .84rem; color: var(--cam-muted); }
.password-rules li { display: flex; align-items: center; gap: .45rem; }
.password-rules li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid #c4cad6; flex: none; }
.password-rules li.met { color: #1d6b09; }
.password-rules li.met::before { border-color: #1d6b09; background: #1d6b09 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 9px no-repeat; }
.field-hint { font-size: .84rem; margin-top: .3rem; }
.field-hint.ok { color: #1d6b09; }
.field-hint.warn { color: #8a5a00; }

/* Read-only view of a record, with an Edit button */
.view-card { background: var(--cam-surface); border: 1px solid var(--cam-line); border-radius: var(--cam-radius); box-shadow: var(--cam-shadow); margin-bottom: 1.25rem; }
.view-card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.5rem; border-bottom: 1px solid var(--cam-line); }
.view-card-head h2 { font-size: 1rem; margin: 0; }
.view-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0; margin: 0; }
.view-group { padding: 1.2rem 1.5rem; border-right: 1px solid var(--cam-line); }
.view-group:last-child { border-right: 0; }
@media (max-width: 767.98px) { .view-group { border-right: 0; border-bottom: 1px solid var(--cam-line); } }
.view-group h3 { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--cam-muted); font-weight: 600; margin-bottom: .8rem; }
.view-field { margin-bottom: .85rem; }
.view-field:last-child { margin-bottom: 0; }
.view-field dt { font-size: .8rem; color: var(--cam-muted); font-weight: 500; margin-bottom: .1rem; }
.view-field dd { margin: 0; font-size: .95rem; }
.view-field dd.empty { color: #9aa3b5; font-style: italic; }
.view-address { font-style: normal; line-height: 1.5; }

/* Choice rows (Settings): label + explanation on the left, buttons on the right */
.choice-row { display: grid; grid-template-columns: 1fr; gap: .6rem 2rem; padding: 1.1rem 1.5rem; border-bottom: 1px solid var(--cam-line); align-items: center; }
@media (min-width: 992px) { .choice-row { grid-template-columns: minmax(0, 1fr) auto; } }
.choice-row h3 { font-size: .95rem; margin: 0 0 .2rem; }
.choice-row p { font-size: .84rem; color: var(--cam-muted); margin: 0; }

/* People lists (contacts) */
.people-list { list-style: none; margin: 0; padding: 0; }
.people-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: .9rem; align-items: center; padding: .8rem 1.5rem; border-bottom: 1px solid var(--cam-line); }
.people-row:last-child { border-bottom: 0; }
.people-row .avatar { width: 38px; height: 38px; font-size: .78rem; }
.people-name { font-weight: 600; }
.people-meta { font-size: .85rem; color: var(--cam-muted); overflow-wrap: anywhere; }
@media (max-width: 575.98px) { .people-row { grid-template-columns: auto minmax(0, 1fr) auto; } .people-row .role-badge { grid-column: 2; justify-self: start; } }
.panel-add { border-top: 1px solid var(--cam-line); padding: 1.25rem 1.5rem; background: #fafbfd; border-radius: 0 0 var(--cam-radius) var(--cam-radius); }
.panel-add .nav-pills .nav-link { border-radius: 8px; font-size: .88rem; font-weight: 500; color: var(--cam-ink); padding: .4rem .8rem; }
.panel-add .nav-pills .nav-link.active { background: var(--cam-navy); color: #fff; }
.panel-add .tab-pane { max-width: 560px; }

/* Summary side panel (user edit) */
.summary-card { position: sticky; top: 5rem; }
.summary-list { display: grid; grid-template-columns: max-content 1fr; gap: .55rem 1rem; margin: 0; font-size: .92rem; }
.summary-list dt { color: var(--cam-muted); font-weight: 500; }
.summary-list dd { margin: 0; }
.action-list { display: grid; gap: .15rem; }
.action-list form { margin: 0; }
.action-item {
  display: flex; align-items: center; gap: .6rem; width: 100%; padding: .5rem .6rem; border: 0; border-radius: 8px;
  background: none; color: var(--cam-ink); text-decoration: none; font-size: .92rem; text-align: left;
}
.action-item .icon { width: 18px; height: 18px; color: var(--cam-muted); }
.action-item:hover { background: var(--cam-bg); color: var(--cam-navy); }
.action-danger, .action-danger .icon { color: var(--cam-red); }
.action-danger:hover { background: #fdecec; color: var(--cam-red); }

/* Activity timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline-day { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--cam-muted); font-weight: 600; margin: 1.25rem 0 .2rem; }
.timeline-key .timeline-icon { background: #fff4dc; color: #8a5a00; }
.timeline-item { display: grid; grid-template-columns: 2.25rem 1fr auto; gap: .8rem; padding: .75rem 0; border-bottom: 1px solid var(--cam-line); }
.timeline-item:last-child { border-bottom: 0; }
.timeline-icon { width: 2.25rem; height: 2.25rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #eef0f4; color: var(--cam-muted); }
.timeline-icon .icon { width: 16px; height: 16px; }
.timeline-log-in .timeline-icon { background: #e7f5e3; color: #1d6b09; }
.timeline-pencil .timeline-icon { background: var(--cam-navy-soft); color: var(--cam-navy); }
.timeline-title { font-weight: 600; font-size: .95rem; }
.timeline-detail { color: var(--cam-muted); font-size: .88rem; }
.timeline-time { text-align: right; font-size: .88rem; white-space: nowrap; }
@media (max-width: 575.98px) {
  .timeline-item { grid-template-columns: 2.25rem 1fr; }
  .timeline-time { grid-column: 2; text-align: left; }
}

/* Page header icon for things that aren't people (customers, sites) */
.entity-icon { width: 56px; height: 56px; border-radius: 14px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--cam-navy-soft); color: var(--cam-navy); }
.entity-icon .icon { width: 26px; height: 26px; }

.entity-icon-sm { width: 38px; height: 38px; border-radius: 10px; }
.entity-icon-sm .icon { width: 18px; height: 18px; }

/* "At a glance" numbers in summary panels */
.glance { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.glance-item { display: flex; flex-direction: column; align-items: flex-start; padding: .7rem .8rem; border-radius: 10px; background: var(--cam-bg); color: var(--cam-muted); text-decoration: none; font-size: .8rem; }
.glance-item:hover { background: var(--cam-navy-soft); color: var(--cam-navy); }
.glance-num { font-size: 1.35rem; font-weight: 700; color: var(--cam-ink); line-height: 1.2; }

.tab-count { display: inline-block; min-width: 1.4rem; padding: 0 .35rem; margin-left: .25rem; border-radius: 999px; background: #eef0f4; color: var(--cam-muted); font-size: .75rem; font-weight: 600; text-align: center; }
.nav-link.active .tab-count { background: var(--cam-navy-soft); color: var(--cam-navy); }

/* Side-by-side "add" choices (e.g. add a contact: existing user / new person / account rep) */
.add-options { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.add-option { border: 1px solid var(--cam-line); border-radius: 10px; padding: .9rem 1rem; margin: 0; }
.add-option h3 { font-size: .95rem; margin-bottom: .2rem; }

/* Segmented choice buttons (radio groups) */
.segmented { display: inline-flex; flex-wrap: wrap; gap: .4rem; }
.segmented .btn { border-radius: 8px; font-weight: 500; }
.segmented .btn-check:checked + .btn { background: var(--cam-navy); border-color: var(--cam-navy); color: #fff; }
.segmented .btn-check:disabled + .btn { opacity: .45; }

/* Step indicator (multi-step pages like Import) */
.steps { display: flex; gap: .5rem; list-style: none; padding: 0; margin: 0 0 1.25rem; counter-reset: step; }
.steps li { display: flex; align-items: center; gap: .45rem; font-size: .88rem; color: var(--cam-muted); counter-increment: step; }
.steps li::before {
  content: counter(step); width: 1.6rem; height: 1.6rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--cam-line); background: #fff; font-weight: 600; font-size: .8rem;
}
.steps li + li::after { order: -1; content: ""; width: 1.5rem; height: 1px; background: var(--cam-line); }
.steps li.current { color: var(--cam-ink); font-weight: 600; }
.steps li.current::before { background: var(--cam-navy); border-color: var(--cam-navy); color: #fff; }
.steps li.done::before { content: "✓"; background: #e7f5e3; border-color: #c4e6bb; color: #1d6b09; }

.import-log { list-style: none; padding: 0; margin: 0 0 1rem; max-height: 320px; overflow: auto; border: 1px solid var(--cam-line); border-radius: 8px; }
.import-log li { display: flex; gap: .5rem; align-items: flex-start; padding: .45rem .7rem; border-bottom: 1px solid var(--cam-line); font-size: .9rem; }
.import-log li:last-child { border-bottom: 0; }
.import-log .icon { width: 16px; height: 16px; flex: none; margin-top: .15rem; }
.import-log .ok .icon { color: #1d6b09; }
.import-log .fail { color: var(--cam-red); }

dl.details { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.25rem; margin: 0; }
dl.details dt { color: var(--cam-muted); font-weight: 500; }
dl.details dd { margin: 0; }

/* Multi-pick buttons (order grades): even widths, wrapping in tidy rows, a divider before the non-numbered choices */
.pick-grid { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.pick-grid .btn { min-width: 2.6rem; padding: .375rem .6rem; border-radius: 8px; font-weight: 500; }
.pick-grid .btn-check:checked + .btn { background: var(--cam-navy); border-color: var(--cam-navy); color: #fff; }
.pick-sep { align-self: stretch; width: 1px; background: var(--cam-line); margin: 0 .35rem; }

/* Forms with many fields per section (orders): section title above the fields, so the fields get the full card width */
@media (min-width: 1200px) { .form-card-stacked .form-section { grid-template-columns: 1fr; gap: 1rem; } }
.form-card-stacked .form-section-head p { max-width: 60ch; }

/* ===== Accounts ===== */
/* Wider sign-in card for the longer "Request a teacher account" form */
.auth-card-wide { max-width: 640px; }
.auth-panel:has(.auth-card-wide) { align-items: flex-start; }
.request-form fieldset { border-top: 1px solid var(--cam-line); padding-top: 1.1rem; margin-bottom: 1.4rem; }
.request-form fieldset:first-of-type { border-top: 0; padding-top: 0; }
.request-form legend { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--cam-muted); font-weight: 600; margin-bottom: .8rem; float: none; }
.request-form .form-label { font-weight: 500; font-size: .9rem; }

/* Shown on every page while impersonating someone */
.impersonation-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; padding: .7rem 1.5rem; background: #8a1414; color: #fff; font-size: .9rem; }
.impersonation-bar strong { font-weight: 700; }

.avatar-lg { width: 56px; height: 56px; font-size: 1.1rem; }

/* Calculators page */
.calc-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .8rem; max-width: 760px; }
.calc-pick { display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; padding: 1.1rem 1.2rem; border: 1px solid var(--cam-line); border-radius: var(--cam-radius); background: var(--cam-surface); box-shadow: var(--cam-shadow); text-align: left; }
.calc-pick:hover { border-color: #c9d6f1; }
.calc-pick[aria-pressed="true"], .calc-pick.active { border-color: var(--cam-navy); background: var(--cam-navy-soft); }
.calc-pick-name { font-weight: 600; color: var(--cam-ink); }
.calc-pick-sub { font-size: .84rem; color: var(--cam-muted); }

/* "Not built yet" pages (Data Analysis, HTML Editor) and the error page */
.placeholder-card { display: flex; gap: 1.2rem; align-items: flex-start; padding: 1.5rem; max-width: 760px; }
.placeholder-card h2 { font-size: 1.05rem; margin-bottom: .4rem; }
.placeholder-card p { color: var(--cam-muted); font-size: .92rem; }
.error-page { max-width: 560px; }
/* ===== Reports ===== */
.test-chip { display: inline-block; background: var(--test-colour, #404040); color: #fff; font-weight: 600; font-size: .78rem; padding: .15rem .55rem; border-radius: 6px; letter-spacing: .02em; }
.test-chip-lg { font-size: 1rem; padding: .55rem .8rem; border-radius: 10px; }
.report-year { padding: 1rem 1.5rem; border-bottom: 1px solid var(--cam-line); }
.report-year:last-child { border-bottom: 0; }
.report-year h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--cam-muted); font-weight: 600; margin: 0 0 .6rem; }
.report-test { border: 1px solid var(--cam-line); border-radius: 10px; margin-bottom: .6rem; background: #fff; }
.report-test > summary { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .6rem .8rem; cursor: pointer; list-style: none; }
.report-test > summary::-webkit-details-marker { display: none; }
.report-test > summary::before { content: "\203A"; color: var(--cam-muted); font-weight: 700; transition: transform .15s; }
.report-test[open] > summary::before { transform: rotate(90deg); }
.report-test-forms { font-size: .85rem; color: var(--cam-muted); }
.report-batches { list-style: none; margin: 0; padding: 0 .4rem .4rem; }
.report-batches a { display: grid; grid-template-columns: minmax(6rem, auto) minmax(5rem, auto) 6rem 6.5rem minmax(0, 1fr) auto; gap: .8rem; align-items: center; padding: .5rem; border-radius: 8px; text-decoration: none; color: var(--cam-ink); font-size: .9rem; border-top: 1px solid var(--cam-line); }
.report-batches li:first-child a { border-top: 0; }
.report-batches a:hover { background: var(--cam-navy-soft); }
.report-desc { color: var(--cam-muted); font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-open { color: var(--cam-navy); font-weight: 500; font-size: .85rem; white-space: nowrap; }
@media (max-width: 767.98px) { .report-batches a { grid-template-columns: 1fr 1fr; gap: .2rem .8rem; } .report-open { grid-column: 1 / -1; } }
.report-select-all { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .8rem 1.5rem; border-bottom: 1px solid var(--cam-line); background: #fafbfd; }
.report-group-head { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--cam-muted); font-weight: 600; margin: 0; padding: 1rem 1.5rem .3rem; }
.report-file-list { list-style: none; margin: 0; padding: 0 1.5rem .6rem; }
.report-file-list li { display: grid; grid-template-columns: auto 2.2rem 3.4rem minmax(0, 1fr) auto; gap: .8rem; align-items: center; padding: .55rem 0; border-bottom: 1px solid var(--cam-line); }
.report-file-list li:last-child { border-bottom: 0; }
/* A viewable report opens in the viewer wherever it's clicked */
.report-file-list li[data-view] { cursor: pointer; }
.report-file-list li[data-view]:hover .report-file-name { color: var(--cam-navy); text-decoration: underline; }
.report-file-name { font-weight: 500; cursor: pointer; overflow-wrap: anywhere; margin: 0; }
.report-file-actions { display: inline-flex; gap: .35rem; }
.report-kind { font-size: .68rem; font-weight: 700; text-align: center; padding: .2rem 0; border-radius: 5px; background: #eef0f4; color: var(--cam-muted); }
.report-kind-pdf { background: #fdecec; color: #b42318; }
.report-kind-excel, .report-kind-csv { background: #e7f5e3; color: #1d6b09; }
.report-kind-xml, .report-kind-zip { background: var(--cam-navy-soft); color: var(--cam-navy); }

/* Report-type drawing (Reports/ReportIcons.cs); in tiles view a picture of the first page replaces it */
.report-thumb { position: relative; display: block; line-height: 0; }
.report-thumb-icon .report-icon, .issued-icon .report-icon { width: 100%; height: auto; display: block; }
.report-thumb img { display: block; width: 100%; height: auto; }
.report-thumb img[hidden] { display: none; }
.report-thumb.has-picture .report-thumb-icon { display: none; }
.report-badge { display: none; }
.report-file-actions .btn { display: inline-flex; align-items: center; gap: .3rem; }
.report-file-actions .icon { width: 15px; height: 15px; }

/* List or tiles switch */
.layout-switch { display: inline-flex; border: 1px solid var(--cam-line); border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.layout-switch button { border: 0; background: #fff; color: var(--cam-muted); padding: .35rem .65rem; display: inline-flex; align-items: center; gap: .35rem; font-size: .82rem; }
.layout-switch button + button { border-left: 1px solid var(--cam-line); }
.layout-switch button[aria-pressed="true"] { background: var(--cam-navy-soft); color: var(--cam-navy); font-weight: 600; }
.layout-switch svg { width: 16px; height: 16px; }
.view-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }

/* Tiles: a card per report with a picture of it */
.report-layout-tiles .report-file-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; padding-top: .4rem; padding-bottom: 1.2rem; }
.report-layout-tiles .report-file-list li { position: relative; display: flex; flex-direction: column; gap: .4rem; padding: .6rem; border: 1px solid var(--cam-line); border-radius: 10px; background: #fff; transition: box-shadow .15s, border-color .15s; }
.report-layout-tiles .report-file-list li:hover { border-color: #b9c6e4; box-shadow: var(--cam-shadow); }
.report-layout-tiles .report-file-list li:has(input:checked) { border-color: var(--cam-navy); box-shadow: 0 0 0 2px var(--cam-navy-soft); }
.report-layout-tiles .report-thumb { aspect-ratio: 8.5 / 11; border-radius: 6px; overflow: hidden; background: #f3f5fa; display: flex; align-items: center; justify-content: center; }
.report-layout-tiles .report-thumb.has-picture { background: #fff; border: 1px solid var(--cam-line); align-items: flex-start; }
.report-layout-tiles .report-thumb-icon { width: 58%; }
.report-layout-tiles .report-thumb img { object-fit: cover; object-position: top; height: 100%; }
.report-layout-tiles .report-badge { display: block; position: absolute; left: .4rem; bottom: .4rem; font-size: .66rem; font-weight: 700; line-height: 1; padding: .25rem .4rem; border-radius: 4px; background: var(--cam-navy); color: #fff; }
.report-layout-tiles .report-file-list input[type=checkbox] { position: absolute; top: .9rem; left: .9rem; z-index: 1; width: 1.1rem; height: 1.1rem; margin: 0; }
.report-layout-tiles .report-kind { position: absolute; top: .9rem; right: .9rem; z-index: 1; padding: .15rem .4rem; }
.report-layout-tiles .report-file-name { font-size: .9rem; line-height: 1.25; }
.report-layout-tiles .report-file-name .small { font-size: .7rem; margin-top: .2rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.report-layout-tiles .report-file-actions { margin-top: auto; }
.report-layout-tiles .report-file-actions .btn:first-child { flex: 1; justify-content: center; }

/* Issued reports have no .zip tick box; keep the columns lined up */
.report-select-spacer { width: 1em; }
.report-layout-tiles .report-select-spacer { display: none; }
.report-version { font-size: .7rem; font-weight: 700; color: var(--cam-navy); background: var(--cam-navy-soft); border-radius: 4px; padding: .05rem .3rem; vertical-align: middle; }

/* Report viewer: a PDF over the page */
.report-viewer { width: min(1200px, 96vw); height: 94vh; max-width: none; max-height: none; padding: 0; border: 0; border-radius: 14px; box-shadow: 0 24px 64px rgba(16, 24, 40, .3); overflow: hidden; }
.report-viewer[open] { display: flex; flex-direction: column; }
.report-viewer::backdrop { background: rgba(10, 20, 45, .55); }
.report-viewer-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem 1rem; padding: .7rem 1rem; border-bottom: 1px solid var(--cam-line); background: #fafbfd; }
.report-viewer-title { min-width: 0; }
.report-viewer-title h2 { font-size: 1.05rem; margin: 0; }
.report-viewer-title .small { overflow-wrap: anywhere; }
.report-viewer-actions { display: flex; align-items: center; gap: .4rem; }
.report-viewer-actions .btn { display: inline-flex; align-items: center; gap: .3rem; }
.report-viewer-actions .icon { width: 15px; height: 15px; }
.report-viewer iframe { flex: 1; width: 100%; border: 0; background: #525659; }
@media (max-width: 767.98px) {
    .report-viewer { width: 100vw; height: 100dvh; border-radius: 0; }
    .report-viewer-actions span:not(#rv-pos) { display: none; }
    .report-file-list li { grid-template-columns: auto 2rem minmax(0, 1fr) auto; }
    .report-file-list li .report-kind { display: none; }
}
.batch-steps { list-style: none; margin: 0; padding: 0; font-size: .88rem; }
.batch-step { display: grid; grid-template-columns: 1.4rem minmax(0, 1fr) auto; gap: .6rem; align-items: start; padding: .4rem 0; border-bottom: 1px solid var(--cam-line); }
.batch-step:last-child { border-bottom: 0; }
.batch-step-mark { width: 1.2rem; height: 1.2rem; border-radius: 50%; border: 2px solid #c9d0dc; display: inline-flex; align-items: center; justify-content: center; margin-top: .1rem; }
.batch-step-mark .icon { width: 12px; height: 12px; }
.batch-step-done .batch-step-mark { background: #1d6b09; border-color: #1d6b09; color: #fff; }
.batch-step-skipped { color: var(--cam-muted); }
.batch-step-skipped .batch-step-mark { border-style: dashed; }
.batch-step-date { color: var(--cam-muted); font-size: .8rem; white-space: nowrap; }
.report-tree { padding: .6rem 1rem 1rem; }
.report-tree details { margin-left: 1rem; }
.report-tree > details { margin-left: 0; }
.report-tree summary { cursor: pointer; padding: .3rem .2rem; border-radius: 6px; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.report-tree summary:hover { background: var(--cam-bg); }
.report-tree summary { list-style: none; }
.report-tree summary::-webkit-details-marker { display: none; }
.report-tree summary::before { content: "\203A"; display: inline-block; width: .8rem; color: var(--cam-muted); font-weight: 700; transition: transform .15s; }
.report-tree details[open] > summary::before { transform: rotate(90deg); }
.report-files { list-style: none; margin: 0 0 .3rem 1.6rem; padding: 0; }
.report-files li { display: flex; gap: .8rem; align-items: center; padding: .2rem 0; font-size: .9rem; }
.report-files a { text-decoration: none; display: inline-flex; align-items: center; gap: .35rem; }
/* ===== Online Assessment ===== */
.ola-glance { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 575.98px) { .ola-glance { grid-template-columns: repeat(3, 1fr); } }
.ola-st-open { background: #e7f5e3; color: #1d6b09; }
.ola-st-pause { background: #fff4dc; color: #8a5a00; }
.ola-st-finished { background: #fdecec; color: var(--cam-red); }
.ola-st-pend { background: #eef0f4; color: var(--cam-muted); }
.ola-group-open { background: #e7f5e3; color: #1d6b09; }
.ola-group-pending { background: #eef0f4; color: var(--cam-muted); }
.ola-group-complete { background: #e8eefb; color: var(--cam-navy); }
.ola-group-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0 0 .9rem; }
.ola-pin { font-size: .9rem; color: var(--cam-ink); background: var(--cam-bg); padding: .1rem .4rem; border-radius: 6px; letter-spacing: .04em; }
.ola-students .role-badge { display: inline-flex; align-items: center; gap: .2rem; }
.ola-students .role-badge .icon { width: 13px; height: 13px; }
.ola-progress { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; margin-top: .35rem; padding: .25rem .4rem; border-radius: 6px; }
.ola-progress.started { background: #fffbe6; }
.ola-progress.done { background: #eefaea; }
.ola-progress-label { font-size: .7rem; font-weight: 600; color: var(--cam-muted); margin: 0 .2rem 0 .35rem; }
.ola-progress-label:first-child { margin-left: 0; }
.ola-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid #b5bdcc; background: #fff; padding: 0; }
.ola-dot.recorded { background: var(--cam-navy); border-color: var(--cam-navy); cursor: pointer; }
.ola-dot.recorded:hover, .ola-dot.recorded:focus-visible { outline: 2px solid rgba(10, 48, 141, .35); outline-offset: 1px; }
.ola-grid-frame { width: 100%; height: 520px; border: 0; display: block; }
.ola-setting { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: .7rem 0; border-top: 1px solid var(--cam-line); }
.ola-setting .btn { min-width: 3.4rem; }
.ola-factor { width: 6rem; }
.ola-timer { width: 5.5rem; }
.ola-answers { font-size: .82rem; white-space: pre; }
.ola-browser { max-width: 220px; }
.ola-results .ola-total td { border-top: 2px solid var(--cam-ink); }
.ola-items th, .ola-items td { text-align: center; font-size: .78rem; padding: .2rem .35rem; white-space: nowrap; }
.ola-items th[scope="row"] { text-align: right; color: var(--cam-muted); font-weight: 500; }
/* ===== Processing Manager ===== */
.letter-bar { display: flex; flex-wrap: wrap; gap: .25rem; margin-bottom: .75rem; }
.letter-bar .letter { min-width: 2rem; padding: .3rem .45rem; border: 1px solid var(--cam-line); border-radius: 8px; background: var(--cam-surface); color: var(--cam-ink); font-size: .85rem; font-weight: 500; text-align: center; text-decoration: none; }
.letter-bar .letter:hover { border-color: #c9d6f1; color: var(--cam-navy); }
.letter-bar .letter.active { background: var(--cam-navy); border-color: var(--cam-navy); color: #fff; }
.manager-tabs { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; }
.manager-tabs .nav-link { white-space: nowrap; }
.mgr-orders { list-style: none; margin: 0; padding: 0; }
.mgr-order { padding: 1rem 1.5rem; border-bottom: 1px solid var(--cam-line); }
.mgr-order:last-child { border-bottom: 0; }
.mgr-order-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .5rem; }
.mgr-assessments { list-style: none; margin: 0; padding: 0; }
.mgr-assessment { position: relative; padding: .8rem 1.25rem; border-bottom: 1px solid var(--cam-line); }
.mgr-assessment:last-child { border-bottom: 0; }
.mgr-assessment:hover { background: var(--cam-bg); }
.mgr-assessment.active, .mgr-assessment.active:hover { background: var(--cam-navy-soft); box-shadow: inset 3px 0 0 var(--cam-navy); }
.mgr-order-label { padding: .5rem 1.25rem; background: var(--cam-bg); font-size: .8rem; font-weight: 600; border-bottom: 1px solid var(--cam-line); }
.stretched-link-row { display: block; color: inherit; text-decoration: none; }
.stretched-link-row::after { content: ""; position: absolute; inset: 0; }
.mgr-stages { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .4rem; }
.mgr-stage { font-size: .72rem; font-weight: 600; padding: .1rem .5rem; border-radius: 999px; background: #eef0f4; color: #9aa3b5; }
.mgr-stage.done { background: #e7f5e3; color: #1d6b09; }
.mgr-site-picks { display: grid; gap: .4rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); max-height: 320px; overflow-y: auto; }
.mgr-site-pick { display: flex; gap: .55rem; align-items: flex-start; padding: .5rem .7rem; border: 1px solid var(--cam-line); border-radius: 8px; cursor: pointer; }
.mgr-site-pick:has(input:checked) { border-color: var(--cam-navy); background: var(--cam-navy-soft); }
.mgr-site-pick input { margin-top: .2rem; }
.mgr-reveal { padding: 0 1.5rem 1.1rem; border-bottom: 1px solid var(--cam-line); }
.mgr-reveal[hidden] { display: none; }
.mgr-edit-group { margin: 1rem; padding: 1.1rem 1.25rem; border: 1px solid #c9d6f1; border-radius: var(--cam-radius); background: var(--cam-navy-soft); }
.mgr-step { list-style: none; display: flex; gap: .7rem; align-items: flex-start; padding: .35rem 0; }
.mgr-step .icon { width: 18px; height: 18px; flex: none; margin-top: .15rem; }
.mgr-step.done .icon { color: #1d6b09; }
.mgr-step.pending { color: var(--cam-muted); }

/* ===== Proofreading converted tests (Online Assessment) ===== */
.review-row { margin-bottom: 1rem; }
.review-flag { border-color: #f0c36d; }
.review-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; padding: 1.25rem 1.5rem; }
@media (min-width: 1200px) { .review-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.review-orig img, .review-text img { display: block; max-width: 100%; height: auto; margin: 0 auto .75rem; }
.review-orig { border-right: 1px dashed var(--cam-line); padding-right: 1rem; }
.review-text p { font-size: 1.02rem; line-height: 1.6; }
.review-choices { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .35rem; }
.review-choices li { padding: .35rem .6rem; border: 1px solid var(--cam-line); border-radius: 8px; }
.review-text .katex-error { background: #fdecec; }
.review-text .qv-shared { border: 1px solid var(--cam-line); border-radius: 10px; padding: .75rem 1rem; margin-bottom: 1rem; background: #fafbfd; }

/* Batch page: details, processing progress and library status in one strip under the title */
.batch-strip { display: grid; grid-template-columns: 1fr; gap: 1rem 2rem; padding: 1rem 1.5rem; }
@media (min-width: 992px) { .batch-strip { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, .8fr); } }
.batch-strip h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--cam-muted); font-weight: 600; margin: 0; }
.batch-strip-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin-bottom: .45rem; }
.batch-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem 1.25rem; margin: 0; font-size: .9rem; align-content: start; }
.batch-facts dt { color: var(--cam-muted); font-weight: 500; font-size: .76rem; }
.batch-facts dd { margin: 0; overflow-wrap: anywhere; }
.batch-progress-bar { height: 8px; border-radius: 99px; background: #e6e9ef; overflow: hidden; }
.batch-progress-bar > span { display: block; height: 100%; background: #1d6b09; border-radius: 99px; }
.batch-steps-toggle { margin-top: .4rem; font-size: .86rem; }
.batch-steps-toggle > summary { cursor: pointer; color: var(--cam-navy); width: max-content; }
.batch-steps-grid { margin-top: .5rem; max-height: 22rem; overflow-y: auto; padding-right: .4rem; }
.live-report-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; font-size: .92rem; }
.live-report-links li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem .5rem; }
/* Classic and modern layouts of one report, next to each other */
.live-report-looks { display: inline-flex; border: 1px solid var(--cam-line); border-radius: 999px; overflow: hidden; font-size: .76rem; }
.live-report-looks a { padding: .12rem .6rem; text-decoration: none; color: var(--cam-muted); }
.live-report-looks a + a { border-left: 1px solid var(--cam-line); color: var(--cam-navy); font-weight: 600; }
.live-report-looks a:hover { background: var(--cam-navy-soft); color: var(--cam-navy); }
.look-switch { display: inline-flex; padding: 3px; border-radius: 999px; background: #eef0f4; }
.look-switch a { padding: .35rem .95rem; border-radius: 999px; text-decoration: none; color: var(--cam-muted); font-weight: 600; font-size: .88rem; }
.look-switch a.active { background: #fff; color: var(--cam-navy); box-shadow: 0 1px 3px rgba(16, 24, 40, .14); }
.live-report-tabs { display: flex; flex-wrap: wrap; gap: .35rem; }
.live-report-tabs a { padding: .3rem .8rem; border-radius: 999px; border: 1px solid var(--cam-line); text-decoration: none; color: var(--cam-ink, #1c2333); font-size: .86rem; background: #fff; }
.live-report-tabs a:hover { border-color: var(--cam-navy); color: var(--cam-navy); }
.live-report-tabs a.active { background: var(--cam-navy); border-color: var(--cam-navy); color: #fff; }

/* Processing home */
.worker-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .75rem; }
.worker-counts > div { display: flex; flex-direction: column; gap: .15rem; padding: .6rem .8rem; border: 1px solid var(--cam-line); border-radius: 10px; background: #fafbfd; }
.worker-counts .stat-value { font-size: 1.35rem; }
.worker-counts .worker-failed { border-color: #f3c1bd; background: #fdf3f2; }
.worker-counts .worker-failed .stat-value { color: var(--cam-red); }
.job-status, .stage { display: inline-block; font-size: .75rem; font-weight: 600; padding: .12rem .55rem; border-radius: 999px; background: #eef0f4; color: var(--cam-muted); white-space: nowrap; }
.job-status-R, .stage-busy { background: #e6eefc; color: var(--cam-navy); }
.job-status-F, .stage-failed { background: #fdecec; color: var(--cam-red); }
.stage-ready { background: #fff4dc; color: #8a5a00; }
.stage-scored { background: #e7f5e3; color: #1d6b09; }
.stage-desktop { background: #f1eefb; color: #5b3fa8; }
/* Named extended-time choices */
.ola-choice { flex: 1 1 150px; min-width: 150px; }
.ola-choice .ola-factor { width: 5rem; }

/* Online assessment: test progress list */
.ola-states { display: flex; flex-wrap: wrap; gap: .4rem; }
.ola-state { display: inline-flex; align-items: baseline; gap: .35rem; padding: .4rem .85rem; border: 0; border-radius: 999px; background: #eef1f6; color: var(--cam-muted); font-size: .84rem; transition: background .15s, color .15s; }
.ola-state:hover:not(:disabled) { background: var(--cam-navy-soft); color: var(--cam-navy); }
.ola-state[aria-pressed="true"] { background: var(--cam-navy); color: #fff; }
.ola-state[aria-pressed="true"] .ola-state-num { color: #fff; }
.ola-state:disabled { opacity: .5; }
.ola-state-num { font-weight: 700; color: var(--cam-ink); }
.ola-state-away:not([aria-pressed="true"]) { background: #fdf1e4; color: #8a4600; }

/* The rows lay out by the list's own width (it sits beside the test card on most screens), not the window's */
.ola-roster { list-style: none; margin: 0; padding: .25rem 0; container-type: inline-size; }
.ola-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr) auto auto; gap: .5rem 1.25rem; align-items: center; padding: .95rem 1.35rem; }
.ola-row + .ola-row { border-top: 1px solid #eef1f6; }
.ola-row:hover { background: #fafbfd; }
.ola-row-away { background: linear-gradient(90deg, #fff6ea, transparent 60%); }
@container (max-width: 760px) {
  .ola-row { grid-template-columns: minmax(0, 1fr) auto; }
  .ola-progress-col { grid-column: 1 / -1; grid-row: 2; }
  .ola-clock-col { grid-row: 1; grid-column: 2; }
  .ola-actions { grid-column: 1 / -1; justify-content: flex-start !important; }
}

.ola-who { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.ola-who .avatar { flex-shrink: 0; }
.min-w-0 { min-width: 0; }
.ola-name { font-weight: 600; color: var(--cam-ink); text-decoration: none; }
.ola-name:hover { color: var(--cam-navy); text-decoration: underline; }
.ola-meta { font-size: .8rem; color: var(--cam-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ola-tags { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .3rem; }
.ola-tag { font-size: .72rem; font-weight: 600; padding: .08rem .5rem; border-radius: 999px; background: #eef1f6; color: #3b4456; }

.ola-progress-col { min-width: 0; }
.ola-progress-caption { display: flex; justify-content: space-between; gap: .75rem; font-size: .84rem; margin-bottom: .4rem; }
.ola-progress-caption strong { font-weight: 600; }
.ola-cap-name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ola-bar { display: flex; gap: 4px; }
.ola-sec { display: flex; flex-direction: column; gap: .3rem; min-width: 26px; padding: .25rem 0; border: 0; background: none; text-align: left; border-radius: 6px; cursor: pointer; }
.ola-sec:disabled { cursor: default; }
.ola-sec:not(:disabled):hover .ola-seg, .ola-sec:focus-visible .ola-seg { box-shadow: 0 0 0 3px var(--cam-navy-soft); }
.ola-sec:not(:disabled):hover .ola-sec-name { color: var(--cam-navy); text-decoration: underline; }
.ola-sec:focus-visible { outline: 2px solid var(--cam-navy); outline-offset: 2px; }
.ola-seg { position: relative; display: block; height: 8px; border-radius: 99px; background: #e8ecf3; overflow: hidden; transition: box-shadow .15s; }
.ola-seg-fill { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: var(--cam-navy); transition: width .4s ease; }
.ola-sec-done .ola-seg-fill { background: #2f8a4b; }
.ola-sec-now .ola-seg { box-shadow: 0 0 0 2px var(--cam-navy-soft); }
.ola-sec-name { font-size: .7rem; color: #8a93a5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ola-sec-now .ola-sec-name { color: var(--cam-navy); font-weight: 600; }
.ola-away { margin-top: .4rem; font-size: .78rem; color: #8a4600; }

.ola-clock-col { display: flex; flex-direction: column; align-items: flex-end; gap: .1rem; text-align: right; }
.ola-clock { font-size: 1.35rem; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.01em; line-height: 1.1; color: var(--cam-ink); }
.ola-clock.low { color: #b35c00; }
.ola-clock.critical { color: var(--cam-red); }
.ola-clock-label { font-size: .72rem; color: var(--cam-muted); margin-top: -.15rem; }
.ola-st2 { display: inline-flex; align-items: center; gap: .35rem; font-size: .76rem; font-weight: 600; color: var(--cam-muted); margin-top: .2rem; }
.ola-st2::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #b5bdcc; }
.ola-st2-open { color: #1d6b09; } .ola-st2-open::before { background: #2f8a4b; box-shadow: 0 0 0 3px #e2f3e6; }
.ola-st2-away { color: #8a4600; } .ola-st2-away::before { background: #e08a1e; }
.ola-st2-pause { color: #7a5b00; } .ola-st2-pause::before { background: #d9a400; }
.ola-st2-finished { color: var(--cam-navy); } .ola-st2-finished::before { background: var(--cam-navy); }

.ola-actions { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: flex-end; align-items: center; }
.ola-main { min-width: 5.5rem; }
.ola-more { padding-inline: .45rem; }
.ola-more .icon { width: 18px; height: 18px; }

/* Section answers pop-up: a tab per answer sheet, then what was answered and skipped */
.ola-grid-head { padding: .6rem 1rem .75rem; border-bottom: 1px solid var(--cam-line); display: flex; flex-direction: column; gap: .6rem; }
.ola-grid-tabs { display: flex; flex-wrap: wrap; gap: .35rem; }
.ola-grid-tab { display: flex; flex-direction: column; align-items: flex-start; gap: .05rem; padding: .35rem .7rem; border: 0; border-radius: 10px; background: #eef1f6; color: var(--cam-ink); font-size: .82rem; font-weight: 600; }
.ola-grid-tab:hover { background: var(--cam-navy-soft); }
.ola-grid-tab[aria-selected="true"] { background: var(--cam-navy); color: #fff; }
.ola-grid-tab-sub { font-size: .72rem; font-weight: 500; opacity: .8; }
.ola-grid-summary { font-size: .86rem; display: flex; flex-direction: column; gap: .15rem; }
.ola-skipped { color: #8a4600; }

/* Online assessment: soft buttons and filters, to match the student list */
.btn-soft { --bs-btn-bg: #eef1f6; --bs-btn-border-color: transparent; --bs-btn-color: var(--cam-ink); --bs-btn-hover-bg: #e2e7f0; --bs-btn-hover-border-color: transparent; --bs-btn-hover-color: var(--cam-ink); --bs-btn-active-bg: #d8deea; --bs-btn-active-border-color: transparent; --bs-btn-disabled-bg: #f3f5f9; --bs-btn-disabled-border-color: transparent; --bs-btn-disabled-color: #9aa3b5; border-radius: 999px; font-weight: 500; }
.btn-soft .icon { width: 16px; height: 16px; }
.btn-soft-go { --bs-btn-color: #1d6b09; --bs-btn-hover-color: #1d6b09; --bs-btn-bg: #e9f5ec; --bs-btn-hover-bg: #d8eedd; }
.btn-soft-pause { --bs-btn-color: #7a5b00; --bs-btn-hover-color: #7a5b00; --bs-btn-bg: #fdf5dc; --bs-btn-hover-bg: #f8eac0; }
.btn-soft-stop { --bs-btn-color: var(--cam-red); --bs-btn-hover-color: var(--cam-red); --bs-btn-bg: #fdeeee; --bs-btn-hover-bg: #f9dede; }
.ola-group-label { font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--cam-muted); margin-right: .35rem; }
.ola-filters .form-control, .ola-filters .form-select { border-color: transparent; background-color: #eef1f6; border-radius: 999px; }
.ola-filters .form-control:focus, .ola-filters .form-select:focus { background-color: #fff; border-color: var(--cam-navy); }
.ola-filters .filter-search .form-control { padding-left: 2.2rem; }
.ola-view { background: #eef1f6; border-radius: 999px; padding: 3px; gap: 2px; }
.ola-view .btn { border: 0; border-radius: 999px !important; color: var(--cam-muted); background: transparent; }
.ola-view .btn-check:checked + .btn { background: #fff; color: var(--cam-navy); box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }
.ola-answers { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: .4rem; }
.ola-answer { display: flex; align-items: baseline; justify-content: space-between; gap: .3rem; padding: .45rem .6rem; border-radius: 10px; background: #eef1f6; }
.ola-answer-n { font-size: .72rem; color: var(--cam-muted); font-variant-numeric: tabular-nums; }
.ola-answer-a { font-weight: 650; color: var(--cam-navy); }
.ola-answer.skipped { background: #fdf1e4; }
.ola-answer.skipped .ola-answer-a { color: #b35c00; }

/* Report filters and drill-down (Pages/Reports/Live) */
.report-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem .75rem; padding: .65rem .85rem; border: 1px solid var(--cam-line); border-radius: 12px; background: #fafbfd; }
.report-filters-label { font-size: .8rem; font-weight: 600; color: var(--cam-muted); align-self: center; }
.report-filter { display: flex; flex-direction: column; gap: .15rem; font-size: .76rem; color: var(--cam-muted); }
.report-filter .form-select { min-width: 9rem; }
.drill-hint { font-size: .86rem; color: var(--cam-muted); margin: 0 0 .6rem; }
.drill-dialog { width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 64px); padding: 0; border: 0; border-radius: 14px; box-shadow: 0 20px 50px rgba(16, 24, 40, .25); }
.drill-dialog::backdrop { background: rgba(16, 24, 40, .45); }
.drill-body { display: flex; flex-direction: column; max-height: calc(100vh - 64px); }
.drill-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 1rem 1.25rem .6rem; border-bottom: 1px solid var(--cam-line); }
.drill-head h2 { font-size: 1.05rem; margin: 0 0 .2rem; color: var(--cam-navy); }
.drill-head p { margin: 0; font-size: .85rem; color: var(--cam-muted); }
.drill-scroll { overflow-y: auto; padding: 0 1.25rem; }
.drill-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.drill-table th { position: sticky; top: 0; background: #fff; text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--cam-muted); padding: .55rem .4rem .35rem; border-bottom: 2px solid var(--cam-line); }
.drill-table td { padding: .4rem; border-bottom: 1px solid var(--cam-line); }
.drill-table tr.flag td { background: #fdf1e4; }
.drill-empty { padding: 1rem 1.25rem; color: var(--cam-muted); margin: 0; }
.drill-foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .5rem; padding: .75rem 1.25rem; border-top: 1px solid var(--cam-line); }

/* Group by on a live report: the group list, then one report per group */
.report-group-by { padding-right: .75rem; margin-right: .25rem; border-right: 1px solid var(--cam-line); }
.report-group-index { display: flex; flex-wrap: wrap; gap: .35rem .9rem; align-items: baseline; font-size: .85rem; }
.report-group + .report-group { margin-top: 1.5rem; }
