@font-face {
  font-family: "Literata";
  src: url("../fonts/literata/latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("../fonts/literata/latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("../fonts/literata/latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary: #17525d;
  --primary-dark: #17525d;
  --accent: #082c86;
  --header: #17525d;
  --sidebar: #f4f7f7;
  --bg: #d5d9de;
  --card: #ffffff;
  --text: #1a2332;
  --muted: #5c6b7a;
  --green: #17525d;
  --green-soft: #d6e6e8;
  --orange: #c56a27;
  --gold: #082c86;
  --line: #cfd6db;
  --shadow: 0 1px 2px rgba(26, 35, 50, 0.06), 0 12px 32px rgba(23, 82, 93, 0.08);
  --radius: 0;
  --book: "Literata", "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --serif: "Literata", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --sans: "Literata", "Iowan Old Style", "Palatino Linotype", Palatino, "Segoe UI", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
body {
  font-family: var(--book);
  font-size: 15px;
  line-height: 1.55;
  background:
    radial-gradient(900px 420px at 0% 0%, rgba(23, 82, 93, 0.08), transparent 55%),
    radial-gradient(700px 360px at 100% 0%, rgba(8, 44, 134, 0.12), transparent 50%),
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .page-title, .side-brand, .login-box h2, .brand h1, .logo-row strong {
  font-family: var(--serif);
  letter-spacing: -0.02em;
}

a { color: var(--primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Login — teal, ripe blue, gray */
.login-page { background: #d5d9de; min-height: 100vh; }
.login-topbar {
  height: 48px;
  background: var(--header);
}
.login-wrap { min-height: calc(100vh - 48px); display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.login-card {
  width: min(620px, 100%);
  background: #f3f5f6;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(20, 40, 50, .12);
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 8px;
  padding: 10px;
}
.login-left {
  background:
    linear-gradient(165deg, rgba(8, 44, 134, .22), transparent 42%),
    linear-gradient(160deg, #17525d 0%, #154a54 48%, #123f47 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
  position: relative;
  overflow: hidden;
  border-radius: 14px;
}
.login-left::after {
  content: "";
  position: absolute;
  width: 140px; height: 140px;
  right: -48px; bottom: -56px;
  background: rgba(8, 44, 134, .28);
  border-radius: 50%;
}
.brand-logo {
  width: 108px; height: auto; object-fit: contain;
  background: transparent;
  position: relative;
  z-index: 1;
  display: block;
  margin: 0 auto;
}
.login-box-logo {
  width: 72px; height: auto; object-fit: contain;
  display: block; margin: 0 auto 8px;
  background: transparent;
}
.logo-mark {
  width: 56px; height: 56px; border-radius: 14px;
  background: rgba(255,255,255,.18);
  display: grid; place-items: center;
  font-weight: 700; font-size: 22px;
  border: 1px solid rgba(255,255,255,.3);
}
.brand h1 { margin: 0 0 12px; font-size: 32px; line-height: 1.15; font-weight: 600; }
.brand p { opacity: .92; line-height: 1.65; }
.feat { display: flex; gap: 10px; align-items: center; margin: 10px 0; }
.feat span {
  width: 26px; height: 26px; border-radius: 50%;
  background: #fff; color: #082c86; display: grid; place-items: center; font-size: 12px; font-weight: 800;
}
.login-right {
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  padding: 16px 18px;
  border-radius: 14px;
}
.login-gold {
  display: inline-block;
  background: #082c86;
  color: #fff;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 10px 28px;
  border-radius: 4px;
  font-size: 22px;
  margin: 0 auto 10px;
}
.login-box { width: 100%; max-width: 360px; text-align: center; }
.login-box h2 { margin: 0 0 4px; font-size: 22px; text-align: center; color: var(--header); font-weight: 600; }
.login-box form { text-align: left; }
.login-box .sub { margin-bottom: 8px; font-size: 13px; }
.login-box label { margin: 8px 0 4px; }
.login-box .btn-primary { margin-top: 12px; padding: 9px 14px; }
@media (max-width: 860px) {
  .login-card { grid-template-columns: 1fr; }
  .login-left { display: none; }
  .login-wrap { padding: 16px 12px; align-items: flex-start; }
  .login-right { padding: 22px 16px; }
}
.sub { color: var(--muted); margin-bottom: 28px; }
label { display: block; font-weight: 600; margin: 14px 0 6px; font-size: 14px; color: #314155; }
input, select, textarea {
  width: 100%; padding: 11px 13px; border: 1px solid #c5cdd0;
  border-radius: 10px; font-size: 15px; background: #fff;
  color: var(--text);
  font-family: var(--sans);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(23, 82, 93, .28);
  border-color: var(--primary);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 10px; padding: 11px 16px; cursor: pointer;
  font-weight: 650; font-size: 15px;
  font-family: var(--sans);
}
.btn-primary {
  background: var(--header);
  color: #fff; width: 100%; margin-top: 18px;
  box-shadow: 0 8px 18px rgba(23, 82, 93, 0.28);
}
.btn-primary:hover { background: #123f47; }
.btn-inline { width: auto; margin-top: 0; }
.wide-card { max-width: 100%; width: 100%; margin-bottom: 16px; }
.form-card.wide-card { max-width: 100%; }
.form-card .row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.alert {
  background: #fdecea; color: #9b2c2c; padding: 10px 12px;
  border-radius: 8px; margin-bottom: 12px; font-size: 14px;
}

/* App shell */
.app { display: flex; min-height: 100vh; width: 100%; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sidebar {
  flex: 0 0 268px;
  width: 268px;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  position: sticky; top: 0; height: 100vh; overflow: auto;
  color: var(--text);
  transition: margin-left .2s ease;
}
body.nav-closed .sidebar { margin-left: -268px; }
.side-logo {
  display: flex; align-items: center; justify-content: flex-start;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}
.side-logo img {
  width: auto; height: 56px; max-width: 120px; object-fit: contain;
  border-radius: 0; background: transparent;
  border: 0;
  box-shadow: none;
}
.side-brand {
  display: block;
  font-weight: 700;
  font-size: 22px;
  color: var(--primary-dark);
  line-height: 1.1;
}
.side-logo small {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}
.side-logo .dot {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary);
  color: #fff; display: grid; place-items: center; font-size: 12px;
}
.report-logo { width: 64px; height: 64px; object-fit: contain; display: block; margin-bottom: 8px; }
.menu { list-style: none; margin: 0; padding: 10px 12px 28px; }
.menu-label {
  margin: 16px 10px 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #6b7c86;
}
.menu-label:first-child { margin-top: 4px; }
.menu-link {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  padding: 8px 10px;
  border-radius: 10px;
  color: #314155;
  font-size: 14.5px;
  font-weight: 600;
  margin-bottom: 2px;
}
.menu-link:hover { background: #e4eeec; text-decoration: none; color: var(--text); }
.menu-link.active {
  color: #fff;
  background: var(--header);
  font-weight: 650;
  box-shadow: 0 6px 16px rgba(23, 82, 93, 0.22);
}
.menu-link.active .nav-ico { background: rgba(255,255,255,.18); color: #fff; }
.nav-ico {
  width: 30px; height: 30px; border-radius: 8px;
  background: #dceeea;
  color: var(--primary-dark);
  display: grid; place-items: center;
  flex: 0 0 30px;
}
.nav-ico svg { width: 16px; height: 16px; display: block; }

.main { flex: 1; min-width: 0; width: 100%; }
.topbar {
  background: var(--header);
  color: #fff;
  height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 18px;
  border-bottom: 4px solid #103941;
}
.menu-toggle {
  background: transparent; border: 0; color: #fff; font-size: 22px;
  cursor: pointer; padding: 4px 8px; line-height: 1;
}
.quick-nav { display: none; gap: 10px; flex-wrap: wrap; }
.quick-nav a { color: #fff; font-size: 13px; font-weight: 700; }
.backdrop {
  display: none; position: fixed; inset: 0; background: rgba(26, 35, 50, .4); z-index: 30;
}
.card-link { display: block; color: inherit; }
.card-link:hover { text-decoration: none; transform: translateY(-1px); }
.cta {
  display: inline-flex; margin: 8px 0 18px; width: auto;
}
.content {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 14px clamp(12px, 2vw, 22px) 28px;
}
.page-title { margin: 0 0 4px; font-size: 30px; color: var(--header); font-weight: 600; }
.crumb { color: var(--muted); font-size: 13px; margin-bottom: 18px; font-weight: 600; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.card {
  background: var(--card); border-radius: 14px; padding: 16px 18px;
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.card h3 { margin: 0; font-size: 13px; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.stat { font-size: 32px; font-weight: 700; color: var(--accent); margin: 8px 0 0; }
.meta { color: var(--primary-dark); font-size: 13px; margin-top: 4px; font-weight: 600; }
.section-h { color: var(--primary-dark); margin: 28px 0 12px; font-size: 20px; font-family: var(--serif); }

.table-wrap { background: var(--card); border-radius: 14px; padding: 12px; box-shadow: var(--shadow); overflow: auto; border: 1px solid var(--line); }
table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--book);
  font-size: 14px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1, "kern" 1;
  border: 1px solid #0a0a0a;
}
th, td {
  padding: 6px 8px;
  text-align: center;
  border: 1px solid #111;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.38);
}
th {
  background: #17525d;
  color: #fff;
  font-family: var(--book);
  font-size: 13px;
  letter-spacing: .02em;
  font-weight: 700;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
}
/* Text / label columns stay left; counts and stats stay center (default above). */
th.left, td.left,
th.c-text, td.c-text,
th.c-marks, td.c-marks,
td.marks-cell {
  text-align: left;
}
th.c-num, td.c-num,
th.c-n, td.c-n,
th.c-nar, td.c-nar,
th.c-idx, td.c-idx {
  text-align: center;
}
.toolbar { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; align-items: center; }
.search { max-width: 240px; }

.report-head { text-align: center; margin-bottom: 16px; }
.report-head h2 { margin: 4px 0; font-size: 20px; }
.tabs { display: flex; gap: 18px; border-bottom: 2px solid var(--line); margin: 10px 0 16px; }
.tabs a { padding: 8px 0; color: #4a5564; font-weight: 700; }
.tabs a.active { color: var(--primary-dark); border-bottom: 3px solid var(--accent); }
.report-links { line-height: 1.9; font-size: 14px; }
.report-links a { margin-right: 14px; }

.rep { max-width: 100%; }
.rep-hub { display: flex; flex-direction: column; gap: 14px; }
.rep-head { padding: 2px 2px 0; }
.rep-head .dash-kicker { margin: 0; }
.rep-head .page-title {
  font-family: var(--serif);
  font-size: 28px;
  margin: 4px 0 2px;
  letter-spacing: -.02em;
  font-weight: 700;
}
.rep-meta {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.rep-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: end;
  gap: 10px;
  background: #fff;
  border: 1px solid #dce8e6;
  border-radius: 14px;
  padding: 12px 14px;
  overflow-x: auto;
}
.rep-toolbar label {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.rep-toolbar select {
  display: block;
  height: 36px;
  margin: 0;
  padding: 0 10px;
  font-size: 13px;
  min-width: 0;
}
.rep-toolbar .rep-exam-field { flex: 1 1 220px; max-width: 420px; }
.rep-toolbar .rep-dist-field { flex: 0 1 160px; }
.rep-toolbar .btn,
.rep-toolbar a.btn {
  height: 36px;
  margin: 0;
  width: auto;
  padding: 0 14px;
  font-size: 13px;
  border-radius: 9px;
  box-shadow: none;
  white-space: nowrap;
  flex: 0 0 auto;
}
.rep-sep {
  width: 1px;
  height: 36px;
  background: #d5d9de;
  flex: 0 0 auto;
  margin: 0 4px;
}
.rep-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  justify-content: space-between;
  gap: 10px 16px;
  background: #fff;
  border: 1px solid #dce8e6;
  border-radius: 14px;
  padding: 10px 14px 12px;
  margin-bottom: 10px;
}
.rep-bar-copy .page-title {
  font-family: var(--sans);
  font-size: 26px;
  margin: 4px 0 0;
  letter-spacing: -.02em;
  font-weight: 700;
}
.rep-bar-copy .dash-kicker { margin: 0; }
.rep-official-head {
  flex: 1 1 280px;
  min-width: 0;
  text-align: center;
  color: #17525d;
}
.rep-official-head .rep-line {
  margin: 0;
  padding: 0;
  color: #17525d;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  max-width: 100%;
}
.rep-official-head .rep-pmo {
  font-size: clamp(8px, 1.35vw, 13px);
  letter-spacing: .02em;
  text-transform: uppercase;
}
.rep-official-head .rep-region {
  font-size: clamp(9px, 1.5vw, 14px);
  margin-top: 2px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.rep-official-head .rep-exam {
  font-size: clamp(8px, 1.4vw, 13px);
  margin-top: 3px;
  letter-spacing: .01em;
  text-transform: uppercase;
}
.rep-official-head .rep-kind {
  font-family: var(--sans);
  font-size: clamp(11px, 1.85vw, 18px);
  margin-top: 4px !important;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.rep-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
  flex: 1;
  min-width: 280px;
}

/* Print preview bar (Portrait / Landscape → Print / Save as PDF) */
.print-preview-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  margin: 0 0 12px;
  padding: 10px 14px 8px;
  background: #fff;
  border: 1px solid #c5d4d1;
  border-left: 4px solid #17525d;
  box-shadow: 0 4px 14px rgba(23, 82, 93, 0.08);
}
.print-preview-bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
}
.print-preview-orient {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.print-preview-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #17525d;
}
.print-preview-choice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #122;
  cursor: pointer;
}
.print-preview-choice input {
  accent-color: #17525d;
  margin: 0;
}
.print-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.print-preview-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: #5c6b7a;
}
body.print-preview-open .sidebar,
body.print-preview-open .topbar,
body.print-preview-open .backdrop {
  display: none !important;
}
body.print-preview-open .app {
  display: block;
}
body.print-preview-open .content {
  max-width: none;
  margin: 0 auto;
  padding: 16px 20px 40px;
}
body.print-preview-open .print-preview-sheet {
  margin-left: auto;
  margin-right: auto;
  background: #fff;
  border: 1px solid #c5d4d1;
  box-shadow: 0 8px 28px rgba(23, 82, 93, 0.1);
  box-sizing: border-box;
  padding: 1cm 1cm 1cm 1.5cm;
  transition: max-width 0.2s ease, width 0.2s ease;
}
body.print-preview-open.page-landscape .print-preview-sheet,
body.print-preview-open .print-preview-sheet.page-landscape {
  width: min(100%, 297mm);
  max-width: 297mm;
}
body.print-preview-open.page-portrait .print-preview-sheet,
body.print-preview-open .print-preview-sheet.page-portrait {
  width: min(100%, 210mm);
  max-width: 210mm;
}
body.print-preview-open .rep-a4.print-preview-sheet .rep-bar {
  border-color: #c5d4d1;
}
.rep-tools label {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
}
.rep-tools select { padding: 7px 10px; font-size: 13px; margin: 2px 0 0; }
.rep-tools .btn { height: 36px; margin: 0; padding: 0 12px; border-radius: 9px; font-size: 13px; }
.rep-exam-field { min-width: 0; }
.rep-dist-field { min-width: 0; }
.rep-hub .rep-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
  padding: 0 4px;
  border-bottom: 1px solid #d5d9de;
}
.rep-hub .rep-tabs a {
  padding: 9px 14px 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: none;
  color: #5c6b7a;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: -1px;
}
.rep-hub .rep-tabs a:hover {
  color: var(--primary-dark);
  background: none;
  text-decoration: none;
}
.rep-hub .rep-tabs a.active {
  color: var(--primary-dark);
  background: none;
  border-bottom-color: var(--primary-dark);
}
.rep-catalogue h2,
.rep-table-block .toolbar h2 {
  margin: 0;
  font-size: 15px;
  color: var(--primary-dark);
}
.rep-catalogue { display: flex; flex-direction: column; gap: 10px; }
.rep-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  align-items: stretch;
}
.rep-card {
  background: #fff;
  border: 1px solid #dce8e6;
  border-radius: 14px;
  padding: 12px 14px 10px;
  border-top: 3px solid var(--primary);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  box-shadow: none;
}
.rep-card.tone-books { border-top-color: #1e6a76; }
.rep-card.tone-schools { border-top-color: #17525d; }
.rep-card.tone-students { border-top-color: #082c86; }
.rep-card.tone-subjects { border-top-color: #c56a27; }
.rep-card.tone-divisions { border-top-color: #17525d; }
.rep-card.tone-admin { border-top-color: #5c6b7a; }
.rep-card header { margin-bottom: 6px; }
.rep-card h3 {
  margin: 0;
  font-size: 15px;
  font-family: var(--sans);
  font-weight: 700;
  color: var(--primary-dark);
}
.rep-card header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.rep-card-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 12px;
}
.rep-card-links a {
  display: block;
  padding: 6px 0;
  border: 0;
  border-bottom: 1px solid #eef1f3;
  border-radius: 0;
  background: none;
  color: #17525d;
  font-size: 13px;
  font-weight: 650;
}
.rep-card-links a:hover { background: none; text-decoration: underline; text-underline-offset: 3px; }
.rep-table-block .table-wrap { margin: 0; }
.rep-table-block .toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 10px;
}
.rep-table-block .toolbar strong { margin-left: auto; color: var(--muted); font-size: 13px; }
.rep-actions,
.row-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}
.rep-actions { flex-wrap: wrap; gap: 4px; }
.rep-actions-inline {
  flex-wrap: nowrap;
  gap: 3px;
  white-space: nowrap;
  justify-content: center;
}
.rep-actions form,
.row-actions form,
td.actions form {
  margin: 0;
  display: inline-flex;
}
.row-actions .chip,
.rep-actions .chip,
.rep-actions-inline .chip,
td.actions .chip,
td.col-review .chip,
.pw-set .chip {
  padding: 2px 6px;
  font-size: 11px;
  line-height: 1.2;
  border-radius: 2px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 650;
}
.rep-actions-inline .chip {
  padding: 1px 5px;
  font-size: 10px;
}
.chip-danger {
  background: #b42318;
  color: #fff;
  border-color: #912018;
}
.chip-danger:hover { background: #912018; color: #fff; }
td.actions,
td.col-review {
  width: 1%;
  white-space: nowrap;
  padding: 3px 5px !important;
  vertical-align: middle;
}
.council-photo {
  background: #fff;
  border: 1px solid #dce8e6;
  border-radius: 14px;
  padding: 10px;
}
.council-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}
.chip {
  display: inline-flex; align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef4f3;
  border: 1px solid #cfe3df;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
}
button.chip {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  text-decoration: none;
}
.chip:hover { text-decoration: none; background: #dceeea; }
.chip-primary { background: var(--primary-dark); color: #fff; border-color: var(--primary-dark); }
.public-url {
  width: min(280px, 46vw);
  height: 28px;
  margin: 0;
  padding: 0 8px;
  font-size: 12px;
}
.chip-primary:hover { background: #123f47; color: #fff; }
.users-page {
  background: #fff;
  border: 1px solid var(--line);
}
.users-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 12px;
}
.users-head .crumb { margin: 0 0 4px; }
.users-head h1 {
  margin: 0;
  font-size: 24px;
  color: var(--header);
  font-weight: 600;
}
.users-head strong {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}
.users-tabs {
  display: flex;
  flex-wrap: wrap;
  background: #17525d;
  padding: 0 8px;
}
.users-tabs a {
  display: inline-flex;
  align-items: center;
  padding: 11px 18px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.users-tabs a:hover {
  background: rgba(16, 57, 65, 0.45);
  text-decoration: none;
  color: #fff;
}
.users-tabs a.active {
  background: #103941;
  color: #fff;
}
.users-panel { padding: 16px 20px 20px; }
.users-form { max-width: 920px; }
.users-form .row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 12px;
}
.users-form-actions {
  display: flex;
  align-items: flex-end;
}
.users-form-actions .btn {
  width: auto;
  margin: 0;
  height: 38px;
}
.users-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
}
.users-toolbar span {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.users-toolbar .search {
  width: min(280px, 100%);
  height: 34px;
  margin: 0;
}
.users-table {
  padding: 0;
  border-radius: 0;
  box-shadow: none;
}
.pw-set {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
}
.pw-set input {
  width: 120px;
  height: 26px;
  margin: 0;
  padding: 0 6px;
  font-size: 12px;
}
.pw-set .btn {
  width: auto;
  height: 26px;
  margin: 0;
  padding: 0 8px;
}
.access-box {
  margin: 4px 0 16px;
  padding: 14px 16px 10px;
  background: #f4f8f8;
  border: 1px solid var(--line);
}
.access-box h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--header);
}
.access-box > .muted { margin: 0 0 10px; }
.access-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.access-tools .btn {
  width: auto;
  height: 32px;
  margin: 0;
  padding: 0 12px;
}
.access-group {
  margin: 10px 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.access-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
}
.access-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 7px 0;
  font-weight: 500;
  color: var(--text);
}
.access-grid input {
  width: auto;
  margin: 0;
  flex: 0 0 auto;
}
@media (max-width: 720px) {
  .access-grid { grid-template-columns: 1fr; }
}

body.results-inst .content {
  padding: 0;
  background: #fff;
}
body.results-inst .content > .flash {
  margin: 12px 24px 0;
}
body.results-inst .topbar {
  border-bottom: 0;
  background: #17525d;
}
body.results-inst .main {
  background: #fff;
}
.inst-page {
  background: #fff;
}
.inst-hero {
  background: #17525d;
  color: #fff;
  padding: 18px clamp(22px, 4vw, 48px) 16px;
}
.inst-hero-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
}
.inst-hero-row h1 {
  margin: 0;
  flex: 1 1 auto;
  min-width: 12rem;
}
.inst-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.inst-edit-btn {
  background: #e8b923 !important;
  color: #103941 !important;
  border: 2px solid #e8b923;
  font-weight: 700;
  white-space: nowrap;
}
.inst-edit-btn:hover {
  background: #f3d36a !important;
  color: #103941 !important;
}
.inst-tabs a.inst-tab-edit {
  background: #e8b923;
  color: #103941;
  font-weight: 700;
}
.inst-tabs a.inst-tab-edit:hover {
  background: #f3d36a;
  color: #103941;
}
.inst-stats-btn {
  background: #fff !important;
  color: #17525d !important;
  border: 2px solid #fff;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: none !important;
  white-space: nowrap;
}
.inst-stats-btn:hover {
  background: #e8f2f3 !important;
  color: #103941 !important;
}
.inst-stats-drop {
  position: relative;
  flex: 0 0 auto;
}
.inst-stats-drop > button.inst-stats-btn {
  cursor: pointer;
}
.inst-stats-drop ul {
  right: 0;
  left: auto;
  min-width: 220px;
  max-height: min(70vh, 420px);
  overflow-y: auto;
  background: #103941;
}
.inst-stats-drop ul a {
  color: #fff;
}
.inst-stats-drop ul a:hover {
  background: #17525d;
  text-decoration: none;
}
.inst-stats-menu {
  max-height: min(70vh, 420px);
  overflow-y: auto;
}
.inst-stats-panel {
  margin: 0 0 14px;
  padding: 12px 14px;
  background: #f3f8f8;
  border: 1px solid #c5d9db;
  border-left: 4px solid #17525d;
}
.inst-stats-panel h3 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: #103941;
}
.inst-stats-panel p {
  margin: 0 0 10px;
  font-size: 13px;
  color: #3a5559;
}
.inst-stats-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.inst-stats-links a {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: #17525d;
  text-decoration: none;
  border: 0;
}
.inst-stats-links a:hover {
  background: #103941;
  text-decoration: none;
  color: #fff;
}
.inst-stats-links a.is-region {
  background: #103941;
}
.inst-stats-links a.is-zip {
  background: #0c2f36;
  letter-spacing: 0.02em;
}
.inst-stats-links a.is-edit {
  background: #fff;
  color: #17525d;
  border: 1px solid #17525d;
}
.inst-stats-links a.is-edit:hover {
  background: #e7f1f3;
  color: #103941;
}
.stat-edit-books {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}
.stat-edit-books a {
  padding: 6px 10px;
  border: 1px solid #c5d4d8;
  color: #17525d;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
}
.stat-edit-books a.is-on {
  background: #17525d;
  color: #fff;
  border-color: #17525d;
}
.stat-edit-grid label {
  display: block;
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: #103941;
}
.stat-edit-grid input {
  display: block;
  width: 100%;
  margin-top: 4px;
  font-weight: 500;
}
.inst-tabs a.inst-tab-pdf {
  background: #103941;
  font-weight: 700;
}
.inst-tabs a.inst-tab-pdf:hover {
  background: #0c2f36;
}
.inst-crumb {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.86);
}
.inst-crumb a { color: #fff; }
.inst-crumb a:hover { text-decoration: underline; text-underline-offset: 3px; }
.inst-hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(18px, 1.8vw, 22px);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: #fff;
}
.inst-tabs {
  display: flex;
  flex-wrap: nowrap;
  overflow: visible;
  gap: 0;
  background: #2a6873;
  padding: 0 clamp(22px, 4vw, 48px);
}
.inst-tabs a,
.inst-tabs button {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 12px 16px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  background: transparent;
  border: 0;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.inst-tabs a:hover,
.inst-tabs button:hover,
.inst-drop:hover > button,
.inst-drop:focus-within > button {
  background: #103941;
  text-decoration: none;
  color: #fff;
}
.inst-tabs a.active {
  background: #103941;
  color: #fff;
}
.inst-drop {
  position: relative;
}
.inst-drop ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 40;
  min-width: 240px;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  background: #103941;
  box-shadow: 0 8px 20px rgba(16, 57, 65, 0.28);
}
.inst-drop:hover ul,
.inst-drop:focus-within ul {
  display: block;
}
.inst-drop ul a {
  display: block;
  width: 100%;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
}
.inst-band {
  background: #3a7d75;
  color: #fff;
  min-height: 10px;
  padding: 0;
}
.inst-body {
  display: block;
  padding: 12px clamp(18px, 3vw, 40px) 24px;
  background: #fff;
}
.inst-pack {
  margin-left: auto;
}
.inst-pack span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.inst-pack select {
  height: 34px;
  margin: 0;
  min-width: 160px;
  max-width: 220px;
}
.inst-pack a {
  color: #17525d;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.inst-lead {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.35;
  color: #5c6b7a;
}
.inst-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px 12px;
  margin: 0 0 10px;
}
.inst-filter label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: #5c6b7a;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.inst-filter select {
  height: 34px;
  margin: 0;
  min-width: 140px;
  padding: 0 10px;
}
.inst-exam-field { flex: 1 1 240px; max-width: 420px; }
.inst-exam-field select { width: 100%; }
.inst-filter .btn {
  height: 34px;
  margin: 0;
  width: auto;
  padding: 0 14px;
  border-radius: 0;
  background: #17525d;
}
body.results-inst .btn-primary:hover { background: #103941; }
.inst-section {
  margin: 0;
}
.inst-section h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  color: #17525d;
}
.inst-section > p {
  margin: 0 0 8px;
  color: #5c6b7a;
  font-size: 13px;
}
.inst-linklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
}
.inst-linklist a {
  display: block;
  padding: 4px 0;
  border-bottom: 1px solid #e6eaee;
  color: #1a7a88;
  font-size: 13px;
  font-weight: 650;
}
.inst-linklist a:hover {
  color: #17525d;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.inst-table-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 8px;
}
.inst-table-tools h3 {
  margin: 0;
  margin-right: auto;
}
.inst-table-tools strong {
  color: #5c6b7a;
  font-size: 12px;
  font-weight: 650;
}
.inst-table-tools .search {
  width: min(240px, 100%);
  height: 32px;
  margin: 0;
}
.inst-table {
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  border: 1px solid #d5d9de;
}
body.results-inst .inst-table table.navy-table {
  font-size: 12px;
}
body.results-inst .inst-table table.navy-table th {
  padding: 6px 5px;
  font-size: 11px;
}
body.results-inst .inst-table table.navy-table td {
  padding: 3px 5px;
}
body.results-inst .inst-table table.navy-table td.col-review {
  padding: 2px 3px;
}
body.results-inst .inst-table table.navy-table thead tr + tr th {
  padding: 4px 4px;
  font-size: 11px;
}
.inst-catalogue {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 40px;
  row-gap: 16px;
  margin: 0 0 16px;
  padding: 4px 0 14px;
  border-bottom: 1px solid #e6eaee;
}
.inst-catalogue article { min-width: 0; }
.inst-catalogue h3 {
  margin: 0 0 4px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  color: #1a2332;
}
.inst-catalogue .inst-linklist a {
  padding: 5px 0;
  font-size: 14px;
  font-weight: 650;
  color: #17525d;
}
.inst-aside {
  background: #f3f4f5;
  padding: 12px 14px 16px;
}
.inst-aside h3 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
  color: #1a2332;
}
.inst-aside ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.inst-aside li {
  border-top: 1px solid #e2e5e8;
  padding: 9px 0;
}
.inst-aside li:first-child { border-top: 0; padding-top: 0; }
.inst-aside a {
  color: #1a7a88;
  font-weight: 650;
  font-size: 14px;
}
.inst-aside a:hover {
  color: #17525d;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.inst-aside-pack span {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #5c6b7a;
  margin-bottom: 6px;
}
.inst-aside-pack select {
  width: 100%;
  margin: 0 0 8px;
  height: 36px;
}
.inst-aside-pack a { display: block; padding: 4px 0; }

@media (max-width: 960px) {
  .inst-pack { margin-left: 0; }
  .inst-catalogue { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .inst-catalogue { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .rep-groups { grid-template-columns: 1fr 1fr; }
  .rep-toolbar { flex-wrap: wrap; }
}
@media (max-width: 700px) {
  .rep-tools { width: 100%; }
  .rep-groups { grid-template-columns: 1fr; }
  .rep-card-links { grid-template-columns: 1fr; }
  .rep-toolbar .rep-exam-field,
  .rep-toolbar .rep-dist-field { flex: 1 1 100%; max-width: none; }
}
.muted { color: var(--muted); }
.actions a { margin-right: 8px; white-space: nowrap; }
.actions form { display: inline; margin-right: 6px; }
.userbox { margin-left: auto; font-size: 13px; font-weight: 600; color: rgba(255,255,255,.88); }
.userbox a { color: #fff; font-weight: 700; }
.btn-ghost {
  background: #fff;
  border: 1px solid #c5cdd0;
  color: var(--text);
  width: auto;
  font-weight: 650;
}
.btn-ghost:hover { background: #eef1f3; text-decoration: none; }

.print-page { background: #fff; padding: 24px; max-width: 1100px; margin: 0 auto; }
.print-actions { margin-bottom: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.btn-danger {
  background: #b42318; color: #fff; width: auto; margin-top: 0;
  padding: 6px 10px; font-size: 12px;
}
.btn-danger:hover { background: #912018; }
form { margin: 0; }

.sheet-card {
  background: var(--card); border-radius: 14px; padding: 18px 22px;
  box-shadow: var(--shadow); margin-bottom: 14px;
  border: 1px solid var(--line);
}
.pdf-preview { padding-bottom: 12px; }
.pdf-preview .toolbar { margin-bottom: 10px; }
.pdf-frame {
  display: block;
  width: 100%;
  height: min(80vh, 980px);
  min-height: 640px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #eef1f3;
}
.sheet-school { display: flex; gap: 14px; align-items: center; }
.sheet-logo { width: 56px; height: 56px; object-fit: contain; border-radius: 12px; background: #fff; }
.sheet-school h1 { margin: 0; font-size: 26px; letter-spacing: .01em; text-transform: uppercase; color: var(--primary-dark); }
.sheet-meta { color: var(--primary); font-size: 13px; display: flex; gap: 16px; flex-wrap: wrap; margin-top: 6px; font-weight: 600; }
.sheet-examline { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.sheet-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badge { border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 700; }
.badge-blue { background: #dceeea; color: #17525d; }
.badge-green { background: #d8f3ee; color: #17525d; }
.badge-gray { background: #f1eee6; color: #4a5564; }
.sheet-h { margin: 0; font-size: 22px; color: var(--primary-dark); }
.rep-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 8px;
}
.sheet-title { text-align: center; font-weight: 700; margin: 8px 0 16px; letter-spacing: .02em; }
table.navy-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--book);
  font-size: 14px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1, "kern" 1;
  border: 1px solid #0a0a0a;
}
table.navy-table th {
  background: #17525d;
  color: #fff;
  font-family: var(--book);
  font-size: 13px;
  letter-spacing: .02em;
  font-weight: 700;
  text-transform: uppercase;
  padding: 10px 8px;
  border: 1px solid #111;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.42);
  text-align: center;
  white-space: nowrap;
}
table.navy-table td {
  padding: 8px 10px;
  text-align: center;
  border: 1px solid #111;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.38);
}
table.navy-table tbody tr:nth-child(even) { background: #eef4f3; }
table.navy-table tbody tr.rep-total td {
  font-weight: 700;
  background: #d9e6e4;
  border-top: 2px solid #0a0a0a;
}
table.navy-table thead th { vertical-align: middle; }
table.navy-table thead tr + tr th { font-size: 13px; padding: 7px 6px; letter-spacing: .02em; }
table.navy-table th.left,
table.navy-table td.left,
table.navy-table tbody td.left,
th.left, td.left {
  text-align: left !important;
  padding-left: 10px;
}
.grade-A { color: #17525d; font-weight: 700; }
.grade-B { color: #1e6a76; font-weight: 700; }
.grade-C { color: #082c86; font-weight: 700; }
.grade-D { color: #c56a27; font-weight: 700; }
.grade-F { color: #b42318; font-weight: 700; }
.sheet-break { page-break-after: always; }
.flash { padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; font-size: 14px; }
.flash-ok { background: #e6f6f3; color: #14665c; }
.flash-err { background: #fdecea; color: #9b2c2c; white-space: pre-wrap; word-break: break-word; }
.form-card { background: var(--card); padding: 18px; border-radius: 14px; max-width: 640px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.form-card .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.toolbar .btn { width: auto; margin: 0; }
pre.schema { background: #1a2332; color: #e8e4da; padding: 14px; border-radius: 10px; overflow: auto; font-size: 12px; max-height: 420px; }
.count-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 16px; }

.dash { max-width: 100%; }
.dash-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(200px, .55fr);
  gap: 0;
  align-items: stretch;
  margin-bottom: 10px;
  background: #fff;
  border: 1px solid #dce8e6;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(23, 82, 93, 0.06);
}
.dash-hero-copy { padding: 12px 16px 12px; }
.dash .page-title {
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 2px;
}
.dash-kicker {
  display: inline-flex;
  align-items: center;
  margin: 0 0 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e8f6f3;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
  color: #17525d;
}
.dash-lead { color: var(--muted); max-width: 62ch; line-height: 1.35; margin: 0 0 8px; font-size: 13px; }
.dash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.dash-actions .btn {
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 12.5px;
  margin: 0;
  box-shadow: none;
}
.dash-actions .btn-ghost {
  background: #f4f7fb;
  border-color: transparent;
  color: #17525d;
}
.dash-actions .btn-ghost:hover { background: #e7eef6; }
.dash-hero-exam {
  background:
    radial-gradient(280px 120px at 110% -20%, rgba(42, 157, 143, .35), transparent 58%),
    linear-gradient(165deg, #0b3f70 0%, #155fa0 58%, #1a7aa8 100%);
  color: #fff;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.dash-hero-exam-top { display: flex; flex-direction: column; gap: 4px; }
.dash-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  width: fit-content;
}
.dash-hero-exam strong { font-size: 13px; line-height: 1.25; font-weight: 650; max-width: 24ch; }
.dash-gpa { margin-top: 6px; }
.dash-gpa span {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.04em;
  display: block;
  line-height: 1;
  font-family: var(--sans);
}
.dash-gpa small { opacity: .78; font-size: 11px; display: block; margin-top: 3px; }
.dash-exam-pick { margin-top: 8px; }
.dash-exam-pick label { color: #c5ddf0; margin: 0 0 2px; font-size: 10px; }
.dash-exam-pick select { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.22); padding: 5px 8px; }
.dash-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.dash-kpi {
  background: #fff;
  border: 1px solid #dce8e6;
  border-radius: 0;
  padding: 12px 14px;
  box-shadow: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
  overflow: hidden;
}
.dash-kpi::before {
  content: "";
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 3px;
  border-radius: 99px;
  background: var(--primary);
}
.dash-kpi:hover { text-decoration: none; transform: none; box-shadow: 0 4px 12px rgba(23, 82, 93, 0.08); }
.dash-kpi span {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: #6b7c8d;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding-left: 8px;
}
.dash-kpi strong {
  display: block;
  font-size: 20px;
  margin: 3px 0 2px;
  letter-spacing: -.03em;
  color: #123f47;
  font-family: var(--sans);
  font-weight: 700;
  padding-left: 8px;
  line-height: 1;
}
.dash-kpi em { font-style: normal; color: #4a6b86; font-size: 11px; font-weight: 600; padding-left: 8px; }
.dash-kpi.kpi-blue::before { background: #1e6a76; }
.dash-kpi.kpi-violet::before { background: #17525d; }
.dash-kpi.kpi-violet em { color: #17525d; }
.dash-kpi.kpi-teal::before { background: #17525d; }
.dash-kpi.kpi-teal em { color: #17525d; }
.dash-kpi.kpi-green::before { background: #3d8b40; }
.dash-kpi.kpi-green strong { color: #2d6a30; }
.dash-kpi.kpi-green em { color: #2d6a30; }
.dash-kpi.kpi-gold::before { background: #082c86; }
.dash-kpi.kpi-gold em { color: #082c86; }
.dash-kpi.accent { border-color: #b7e4dc; }
.dash-kpi.accent::before { background: #17525d; }
.dash-kpi.accent strong { color: #14665c; }
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 10px;
  margin-bottom: 10px;
}
.dash-span-2 { grid-column: 1 / -1; }
.dash-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px 8px;
  box-shadow: none;
}
.dash-panel h2 { margin: 0; font-size: 15px; color: var(--primary-dark); }
.dash-panel-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
}
.dash-dl {
  flex: 0 0 auto;
  background: var(--primary-dark);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: .02em;
}
.dash-dl:hover { background: #123f47; }
.dash-caption { margin: 2px 0 6px; color: var(--muted); font-size: 12px; }
.dash-chart { position: relative; height: 168px; }
.dash-chart-sm { height: 150px; }
.dash-chart-wide { height: 190px; }
.dash-split { display: grid; grid-template-columns: .9fr 1.3fr; gap: 10px; }
.dash-forms { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dash-form {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  color: inherit;
  background: linear-gradient(180deg, #eef4f3, #ffffff);
}
.dash-form:hover { text-decoration: none; border-color: #b7d8d3; background: #dceeea; }
.dash-form span { font-size: 12px; font-weight: 700; color: var(--muted); }
.dash-form strong { display: block; font-size: 22px; font-family: var(--serif); }
.dash-form em, .dash-form small { display: block; font-style: normal; font-size: 12px; color: var(--primary); }
.dash-form.muted-card { opacity: .78; }
.dash-dist-list { display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow: auto; }
.dash-dist {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 4px;
  color: inherit;
  border-bottom: 1px solid #efe8dc;
}
.dash-dist:hover { text-decoration: none; }
.dash-dist strong { display: block; font-size: 13px; }
.dash-dist span { color: var(--muted); font-size: 12px; }
.dash-dist b { font-size: 14px; color: var(--text); }
.dash-bar-wrap { height: 8px; background: #efe8dc; border-radius: 99px; overflow: hidden; }
.dash-bar { height: 100%; background: linear-gradient(90deg, #1e6a76, #17525d); border-radius: 99px; min-width: 0; }

@media (max-width: 1100px) {
  .dash-hero, .dash-grid, .dash-split, .dash-kpis { grid-template-columns: 1fr 1fr; }
  .dash-kpis { grid-template-columns: 1fr 1fr; }
  .dash-span-2 { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .dash-hero, .dash-grid, .dash-split, .dash-kpis, .dash-forms { grid-template-columns: 1fr; }
}

.official-sheet {
  background: #fff;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto 24px;
  padding: 18px 22px 28px;
  border: 1px solid #d5d9de;
  box-shadow: 0 10px 30px rgba(26, 35, 50, 0.08);
  color: #0b2545;
  overflow: visible;
}
.off-head { text-align: center; margin: 0 0 10px; }
.off-rule {
  height: 3px;
  margin: 6px auto 10px;
  max-width: 92%;
  background: linear-gradient(90deg, #c9a227, #0b2545 28%, #0b2545 72%, #c9a227);
}
.off-org {
  margin: 0;
  font-size: 18px;
  letter-spacing: .04em;
  font-weight: 800;
  color: #0b2545;
}
.off-suborg {
  margin: 2px 0 8px;
  font-size: 12px;
  letter-spacing: .06em;
  font-weight: 700;
  color: #0b2545;
}
.off-badge {
  display: inline-block;
  margin: 0 0 8px;
  padding: 4px 14px;
  border-radius: 4px;
  background: #0b2545;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}
.off-head h1 {
  margin: 6px 0 4px;
  font-size: 18px;
  line-height: 1.25;
  color: #0b2545;
  font-weight: 800;
  text-transform: uppercase;
}
.off-examline { margin: 0 0 8px; font-size: 12px; color: #5c6b7a; font-weight: 600; }
.off-school {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #17525d;
}
.off-meta, .off-pos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  margin: 10px 0 0;
  padding: 8px 12px;
  border: 1px solid #d5d9de;
  background: #f6f7f9;
  font-size: 12px;
  font-weight: 700;
}
.off-pos { background: #fff; border-left: 0; border-right: 0; border-radius: 0; }
.off-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 8px 0 12px;
  padding: 6px 10px;
  background: #eef1f4;
  font-size: 11px;
  color: #5c6b7a;
  font-weight: 650;
}
.off-key-good { color: #17525d; }
.off-key-bad { color: #b42318; }
.off-h {
  margin: 16px 0 8px;
  font-size: 13px;
  letter-spacing: .08em;
  color: #0b2545;
  font-weight: 800;
}
.off-subj-block {
  margin-top: 18px;
}
@media print {
  .off-subj-block {
    break-before: page;
    page-break-before: always;
  }
}
.off-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.off-table th, .off-table td {
  border: 1px solid #1a2332;
  padding: 6px 4px;
  text-align: center;
  overflow: visible;
  word-break: normal;
}
.off-table th { background: #0b2545; color: #fff; font-weight: 700; }
.off-table tbody th {
  background: #fff;
  color: #0b2545;
  text-align: left;
  padding-left: 10px;
}
.off-table th.left, .off-table td.left { text-align: left; padding-left: 8px; }
.off-div-head { background: #1e4ea0 !important; }
.off-divs { max-width: 920px; margin: 0 auto; table-layout: fixed; }
.off-wrap { width: 100%; overflow-x: auto; }
.cell-I { background: #dceeea; }
.cell-II { background: #e6f4f1; }
.cell-III { background: #fff4d6; }
.cell-IV { background: #fde8e6; }
.cell-0 { background: #f8d4d0; }
.off-alt td, .off-alt th { background: #f4f5f7; }
.off-alt .cell-I, .off-total .cell-I { background: #dceeea; }
.off-alt .cell-II, .off-total .cell-II { background: #e6f4f1; }
.off-alt .cell-III, .off-total .cell-III { background: #fff4d6; }
.off-alt .cell-IV, .off-total .cell-IV { background: #fde8e6; }
.off-alt .cell-0, .off-total .cell-0 { background: #f8d4d0; }
.off-total th { background: #dceeea; color: #0b2545; }
.off-pct th, .off-pct td { background: #e8eef6; color: #0b2545; font-weight: 650; }
.off-groups {
  text-align: center;
  margin: 8px 0 4px;
  padding: 8px;
  background: #e8eef6;
  font-size: 13px;
  font-weight: 700;
  color: #0b2545;
}
.off-note { text-align: center; margin: 4px 0 0; font-size: 11px; color: #5c6b7a; }
.off-scroll { display: flex; justify-content: flex-end; margin: 0 0 6px; }
.off-marks { font-size: 11px; line-height: 1.45; font-weight: 650; min-width: 280px; }
.off-marks span { display: inline-block; margin: 0 6px 2px 0; white-space: nowrap; }
.off-cands { min-width: 720px; }
.off-cands th:nth-child(4), .off-cands td:nth-child(4) { min-width: 130px; }
.off-cands th:nth-child(5), .off-cands td:nth-child(5) { min-width: 220px; }
.off-cands thead th { background: #17525d; }
.off-cands th.off-vert {
  width: 22px;
  max-width: 28px;
  height: 62px;
  padding: 6px 2px 8px;
  vertical-align: bottom;
  line-height: 1.05;
  white-space: nowrap;
}
.off-cands th.off-vert span {
  display: inline-block;
  writing-mode: vertical-rl;
  text-orientation: upright;
  white-space: nowrap;
  font-size: 10px;
  letter-spacing: 0.12em;
}
.off-subj { font-size: 11px; min-width: 980px; }
.off-subj th, .off-subj td { padding: 5px 3px; }
.sheet-div-center { max-width: 980px; margin: 16px auto; }
.sheet-div-center .sheet-h { text-align: center; }
.sheet-subjects { overflow-x: auto; }
.sheet-subjects table.navy-table th,
.sheet-subjects table.navy-table td { padding: 8px 6px; font-size: 14px; }
.sheet-subjects table.navy-table td:nth-child(2) { text-align: left; min-width: 140px; }
.row-good { background: #e6f6f3 !important; }
.row-weak td:nth-child(10) { color: #b42318; }
.row-incomplete { background: #f8eee4 !important; }
.row-absent { background: #f1eee6 !important; color: #6b7280; }
.div-good { background: #17525d !important; }
.div-weak { background: #9b2c2c !important; }

.examf { width: 100%; max-width: 100%; }
.examf-main, .examf-meta {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}
.examf-main { grid-template-columns: 1.6fr 1fr; }
.examf-meta { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.examf textarea { min-height: 88px; resize: vertical; margin-bottom: 12px; }

.subj { width: 100%; max-width: 100%; }
.subj-form {
  display: grid;
  grid-template-columns: 120px 140px minmax(180px, 1.4fr) 170px auto;
  gap: 12px;
  align-items: end;
}
.subj-go { padding-bottom: 1px; }
.subj-go .btn { margin: 0; height: 42px; }

.usa { width: 100%; max-width: 100%; }
.usa-hero { margin-bottom: 12px; }
.usa-lead { margin: 6px 0 0; color: var(--muted); max-width: 72ch; line-height: 1.45; }
.usa-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  counter-reset: usa;
}
.usa-steps li {
  counter-increment: usa;
  background: #fff;
  border: 1px solid #dce8e6;
  border-radius: 12px;
  padding: 10px 12px 10px 40px;
  position: relative;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.usa-steps li::before {
  content: counter(usa);
  position: absolute;
  left: 12px; top: 10px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #e8f6f3;
  color: #17525d;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.usa-steps strong { color: var(--text); }
.usa-card {
  background: #fff;
  border: 1px solid #dce8e6;
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 8px 24px rgba(23, 82, 93, 0.05);
}
.usa-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.usa-card input[type=file] { padding: 10px; }

.up { max-width: 100%; }
.up-hero { margin-bottom: 12px; }
.up-report {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
}
.up-report h2 {
  margin: 0 0 6px;
  font-size: 18px;
}
.up-report-summary { margin: 0 0 8px; font-size: 15px; }
.up-report-label { margin: 10px 0 6px; font-weight: 600; font-size: 14px; }
.up-report-errors {
  margin: 0;
  padding: 0 0 0 1.2em;
  list-style: disc;
}
.up-report-errors li {
  margin: 0 0 8px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.up-report-ok {
  background: #e6f6f3;
  border-color: #9fd5cb;
  color: #14665c;
}
.up-report-err {
  background: #fdecea;
  border-color: #f0b4b0;
  color: #9b2c2c;
}
.up-lead { margin: 6px 0 0; color: var(--muted); max-width: 62ch; }
.up-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 14px;
  align-items: stretch;
}
.up-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--primary);
}
.up-card-main { border-top-color: var(--accent); }
.up-card h2 { margin: 0 0 4px; font-size: 20px; color: var(--primary-dark); }
.up-card p { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.up-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  margin-bottom: 12px;
}
.up-span { grid-column: 1 / -1; }
.up-card label { margin: 0 0 4px; font-size: 12px; }
.up-card select, .up-card input[type=file] { padding: 8px 10px; font-size: 14px; }
.up-cols { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.up-bar {
  margin-top: 12px;
  background: var(--primary-dark);
  color: #eef4f3;
  border-radius: 14px;
  padding: 10px 14px;
}
.up-bar-form {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
}
.up-bar strong { margin-right: 4px; }
.up-bar select {
  width: auto; min-width: 180px; margin: 0;
  background: #154a54; color: #fff; border-color: #1e6a76;
  padding: 8px 10px;
}

@media (max-width: 900px) {
  .login-wrap { flex-direction: column; }
  .sidebar {
    display: block;
    position: fixed;
    left: 0; top: 0;
    z-index: 40;
    flex: none;
    margin-left: 0;
    transform: translateX(-110%);
    transition: transform .2s ease;
    box-shadow: 8px 0 24px rgba(0,0,0,.12);
  }
  body.nav-closed .sidebar {
    margin-left: 0;
    transform: translateX(-110%);
  }
  body.nav-open .sidebar {
    margin-left: 0;
    transform: translateX(0);
  }
  body.nav-open .backdrop { display: block; }
  .quick-nav { display: flex; }
  .cards { grid-template-columns: 1fr 1fr; }
  .form-card .row-3, .form-card .row-2 { grid-template-columns: 1fr; }
  .up-grid, .up-fields, .usa-fields, .usa-steps, .subj-form, .examf-main, .examf-meta { grid-template-columns: 1fr; }
  .dash-kpis { grid-template-columns: 1fr 1fr; }
  table { font-size: 13px; }
}
.badge-gold { background: #d6e0f5; color: #082c86; }

.hint { color: var(--muted); font-size: 14px; line-height: 1.55; max-width: 820px; }
.mini { font-size: 11px; color: var(--muted); font-weight: 600; }
.mats-bar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: end;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; margin: 8px 0 16px; box-shadow: var(--shadow);
}
.mats-bar label { margin: 0; min-width: 180px; }
.mats-bar select, .mats-bar input { margin-top: 4px; }
.rrp-flow {
  display: flex; flex-wrap: wrap; gap: 8px; list-style: none;
  padding: 0; margin: 0 0 18px;
}
.rrp-flow li {
  background: #ffffff; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px; font-size: 13px; color: var(--muted);
}
.rrp-flow strong { color: var(--primary-dark); }
.att-radio { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.att-radio input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.att-radio span {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px;
  font-weight: 800; font-size: 12px; border: 1px solid var(--line); background: #fff;
}
.att-radio input:checked + span { color: #fff; border-color: transparent; }
.att-P input:checked + span, .att-P { background: #17525d; color: #fff; }
.att-A input:checked + span, .att-A { background: #c45c4a; color: #fff; }
.att-L input:checked + span, .att-L { background: #c56a27; color: #fff; }
.att-E input:checked + span, .att-E { background: #1e6a76; color: #fff; }
span.att-P, span.att-A, span.att-L, span.att-E {
  display: inline-block; padding: 2px 8px; border-radius: 6px; font-weight: 800; font-size: 12px;
}
.mark-T { color: #17525d; font-weight: 800; }
.mark-0 { color: #9b2c2c; font-weight: 800; }
.row-risk { background: #fff4ea !important; }
.risk-table input { min-width: 140px; padding: 6px 8px; }
.learner-grid { display: grid; grid-template-columns: 1.3fr .9fr; gap: 16px; margin: 16px 0; }
.skill-cards, .policy-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px; margin: 12px 0 18px;
}
.skill-cards article, .policy-cards article {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px; box-shadow: var(--shadow);
}
.skill-cards span {
  display: inline-grid; place-items: center; width: 28px; height: 28px;
  border-radius: 50%; background: #dceeea; color: var(--primary-dark); font-weight: 800;
  margin-bottom: 8px;
}
.skill-cards p, .policy-cards p { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.form-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); margin-bottom: 16px; }
.form-card h2 { margin: 0 0 10px; font-size: 20px; }
.navy-table td.left, .navy-table th.left { text-align: left !important; }
.err-rep .err-kpis article { border-left: 3px solid #c5d5d8; }
.err-rep .err-kpis article.accent { border-left-color: #17525d; }
.err-section {
  margin: 0 0 22px;
  padding: 14px 0 4px;
  border-top: 1px solid var(--line);
}
.err-section h2 {
  margin: 0 0 4px;
  font-size: 17px;
  color: #17525d;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.err-section > p {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
}
.err-sub {
  margin: 14px 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-dark);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.err-count {
  display: inline-block;
  min-width: 1.6em;
  padding: 1px 8px;
  border-radius: 999px;
  background: #e7f0ef;
  color: #17525d;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
}
.err-empty {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
}
.err-district {
  margin: 14px 0 18px;
  padding: 12px 14px 8px;
  border: 1px solid #d5e4e2;
  border-left: 3px solid #17525d;
  background: #fafcfc;
}
.err-district-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 4px;
}
.err-district-title {
  margin: 0;
  font-size: 15px;
  color: #17525d;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.err-subjects {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  letter-spacing: -.01em;
}
.err-table { font-size: 12.5px; }
.err-table td a { color: #17525d; font-weight: 600; text-decoration: none; }
.err-table td a:hover { text-decoration: underline; }
.viz-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.viz-hero-copy { flex: 1 1 280px; min-width: 0; }
.viz-hero-copy .dash-kicker { margin: 0; }
.viz-hero-copy .page-title {
  margin: 2px 0 0;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 700;
}
.viz-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-end;
  flex: 1 1 420px;
  justify-content: flex-end;
}
.viz-tools label { font-size: 11px; font-weight: 700; color: var(--muted); margin: 0; }
.viz-tools select { display: block; margin: 2px 0 0; min-width: 220px; height: 32px; }
.viz-tools .btn { height: 32px; margin: 0; padding: 0 10px; font-size: 13px; }
.viz-kpis {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px; margin: 0 0 10px;
}
.viz-kpis article {
  background: #fff; border: 1px solid var(--line); border-radius: 0;
  padding: 8px 10px; box-shadow: none;
}
.viz-kpis article.accent { border-left-color: #17525d; }
.viz-kpis span { display: block; font-size: 10px; letter-spacing: .06em; font-weight: 800; color: var(--muted); text-transform: uppercase; }
.viz-kpis strong { display: block; font-size: 18px; color: var(--primary-dark); line-height: 1.1; margin: 2px 0 1px; }
.viz-kpis em { font-style: normal; font-size: 11px; color: #4a6b86; font-weight: 600; }
.viz-findings {
  margin: 0 0 12px; padding: 6px 12px 6px 24px; background: #eef4f3;
  border: 1px solid #d5e4f0; border-radius: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px;
}
.viz-findings li { margin: 2px 0; font-size: 12.5px; color: #234; }
.viz-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 16px;
}
.viz-card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px 10px; box-shadow: var(--shadow);
}
.viz-card.viz-span { grid-column: 1 / -1; }
.viz-card h2 { margin: 0; font-size: 15px; color: var(--primary-dark); }
.viz-card p { margin: 2px 0 8px; font-size: 12px; color: var(--muted); }
.viz-chart { position: relative; height: 220px; }
.viz-chart-sm { height: 200px; }
.viz-chart-wide { height: 260px; }
.viz-chart-tall { height: 320px; }
.viz-sheet {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px 8px; margin: 0 0 14px; box-shadow: var(--shadow);
}
.viz-sheet h2 { margin: 0 0 4px; font-size: 16px; color: var(--primary-dark); }
.viz-sheet > p { margin: 0 0 8px; font-size: 12px; color: var(--muted); }
.viz-split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.viz-heat td.heat-good,
.viz-heat td.heat-mid,
.viz-heat td.heat-bad { font-weight: 700; }
.viz-foot { margin: 8px 0 20px; font-size: 11px; color: var(--muted); letter-spacing: .04em; }

.sci { max-width: 100%; }
.sci-road {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}
.sci-road li {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px 10px 12px;
  border-left: 4px solid #17525d;
}
.sci-road .sci-n {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #dceeea;
  color: #17525d;
  font-size: 11px;
  font-weight: 800;
  margin-right: 6px;
}
.sci-road strong { display: block; margin: 4px 0 2px; color: var(--primary-dark); font-size: 14px; }
.sci-road em { font-style: normal; color: var(--muted); font-size: 12px; line-height: 1.35; }
.sci-block {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px 16px;
  margin: 0 0 12px;
  box-shadow: var(--shadow);
}
.sci-block h2 {
  margin: 0 0 6px;
  font-size: 18px;
  color: var(--primary-dark);
}
.sci-block h3 {
  margin: 14px 0 8px;
  font-size: 14px;
  color: #082c86;
}
.sci-block h3 small { color: var(--muted); font-weight: 600; }
.sci-block > p { margin: 0 0 10px; color: #234; font-size: 14px; }
.sci-sql { margin: 0 0 12px; padding-left: 18px; color: #234; font-size: 13px; }
.sci-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 10px 0;
}
.sci-charts figure, .sci-fig { margin: 8px 0 0; }
.sci-charts img, .sci-fig img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.sci-charts figcaption, .sci-fig figcaption {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}
.sci-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.sci .viz-tools input[type="text"] {
  display: block;
  margin-top: 3px;
  min-width: 180px;
  padding: 7px 10px;
  font-size: 13px;
}
@media (max-width: 900px) {
  .sci-charts, .sci-split { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .learner-grid { grid-template-columns: 1fr; }
  .viz-hero { flex-direction: column; align-items: stretch; }
  .viz-tools { justify-content: flex-start; }
  .viz-kpis, .viz-findings { grid-template-columns: 1fr 1fr; }
  .viz-grid, .viz-split { grid-template-columns: 1fr; }
}

.card, .form-card, .table-wrap, .wide-card,
.btn, .btn-primary, .btn-ghost, .btn-inline,
input, select, textarea, .flash, .alert,
.rep-card, .rep-toolbar, .rep-bar, .chip, .badge, .dash-kicker,
.dash-kpi, .dash-panel, .dash-hero, .dash-actions .btn, .dash-actions .btn-ghost,
.viz-kpis article, .viz-card, .viz-sheet, .viz-findings, .viz-hero,
.sci-block, .up-card, .usa-card, .usa-steps li,
.council-photo, .login-card, .login-left, .login-box,
.off-badge, .menu-link,
.att-P span, .learner-card, .form-card.wide-card {
  border-radius: 0;
}
.dash-kpi::before,
.dash-bar, .dash-bar-wrap {
  border-radius: 0;
}
.btn, .btn-primary, .btn-ghost {
  box-shadow: none;
}
.chip, .badge, .dash-kicker {
  border-radius: 0;
}
.viz-kpis article,
.dash-kpi,
.card,
.form-card,
.table-wrap,
.viz-card,
.up-card,
.usa-card,
.dash-panel,
.dash-hero {
  box-shadow: none;
}
.dash-kpi::before {
  display: none;
}
.dash-kpi span,
.dash-kpi strong,
.dash-kpi em { padding-left: 0; }

@media print {
  .sheet-break { break-after: page; page-break-after: always; }
  /* Default for most screens; error-report / sheet pages override orientation via page <style> */
  @page {
    size: A4 landscape;
    margin-top: 1cm;
    margin-right: 1cm;
    margin-bottom: 1cm;
    margin-left: 1.5cm;
  }
  html, body { overflow: visible !important; background: #fff !important; }
  .sidebar, .topbar, .print-actions, .no-print, .col-review, .backdrop { display: none !important; }
  .app { display: block; width: 100%; min-height: 0; }
  .content, .print-page { padding: 0 !important; max-width: none; margin: 0; }
  body.print-preview-open .print-preview-sheet,
  body.print-preview-open .print-preview-sheet.page-landscape,
  body.print-preview-open .print-preview-sheet.page-portrait {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  /* Error + ranking reports: mirror @page margins (Chrome often ignores @page) */
  body.err-report-print .content,
  body.rep-print .content {
    padding: 1cm 1cm 1cm 1.5cm !important; /* top right bottom left */
    box-sizing: border-box;
  }
  body { background: #fff; }
  .viz-hero { border-bottom: 2px solid #17525d; margin-bottom: 8px; }
  .viz-kpis { break-inside: avoid; }
  .viz-card, .viz-sheet { break-inside: avoid; box-shadow: none; }
  .viz-chart, .viz-chart-sm, .viz-chart-wide, .viz-chart-tall { height: 190px; }
  .viz-chart-tall { height: 230px; }
  body, .viz, .print-page { font-family: var(--book); font-size: 11pt; line-height: 1.3; }
  table, table.navy-table {
    font-family: var(--book);
    font-size: 9pt;
    line-height: 1.2;
    border: 1px solid #000 !important;
  }
  th, td, table.navy-table th, table.navy-table td {
    border: 1px solid #000 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  th, table.navy-table th {
    background: #17525d !important;
    color: #fff !important;
    font-family: var(--book);
    font-size: 8pt;
    letter-spacing: 0;
    text-align: center;
  }
  table.navy-table td,
  table.navy-table th {
    text-align: center;
  }
  table.navy-table th.left,
  table.navy-table td.left,
  th.left, td.left,
  th.c-text, td.c-text,
  th.c-marks, td.c-marks {
    text-align: left !important;
  }
  .viz-heat td, .viz-kpis article, .viz-findings, .viz-card, .viz-sheet {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .sci-road { grid-template-columns: 1fr 1fr; }
  .sci-charts, .sci-split { grid-template-columns: 1fr 1fr; }
  .sci-block { break-inside: avoid; box-shadow: none; }

  .rep-a4 {
    max-width: none;
    width: 100%;
    font-family: var(--book);
    font-size: 7.5pt;
    line-height: 1.1;
  }
  .rep-a4 .rep-bar {
    display: block;
    padding: 0 0 1.2mm;
    margin: 0 0 1.5mm;
    border: none;
    border-bottom: 1pt solid #17525d;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }
  .rep-a4 .rep-official-head {
    width: 100%;
    text-align: center;
    color: #17525d !important;
  }
  .rep-a4 .rep-official-head .rep-line {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    color: #17525d !important;
    font-weight: 800;
    line-height: 1.08 !important;
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: clip;
    word-break: keep-all;
    overflow-wrap: normal;
  }
  .rep-a4 .rep-official-head .rep-pmo {
    font-size: 7.2pt !important;
    letter-spacing: .015em;
    text-transform: uppercase;
  }
  .rep-a4 .rep-official-head .rep-region {
    font-size: 8pt !important;
    margin-top: 0.4mm !important;
    letter-spacing: .05em;
    text-transform: uppercase;
  }
  .rep-a4 .rep-official-head .rep-exam {
    font-size: 7.4pt !important;
    margin-top: 0.5mm !important;
    letter-spacing: .01em;
    text-transform: uppercase;
  }
  .rep-a4 .rep-official-head .rep-kind {
    font-family: var(--book);
    font-size: 10pt !important;
    margin-top: 0.7mm !important;
    letter-spacing: .02em;
    text-transform: uppercase;
  }
  .rep-a4 .rep-bar-copy .dash-kicker {
    font-size: 7.5pt;
    letter-spacing: .04em;
    margin: 0;
  }
  .rep-a4 .rep-bar-copy .page-title {
    font-size: 11.5pt !important;
    margin: 0 !important;
    letter-spacing: 0;
    line-height: 1.05;
  }
  .rep-a4 .sheet-h {
    font-size: 9pt !important;
    margin: 0 0 1mm;
    color: #17525d !important;
  }
  .rep-a4 .toolbar {
    margin: 0 0 1mm;
    gap: 4px;
  }
  .rep-a4 .toolbar .sheet-h {
    font-size: 9pt !important;
  }
  .rep-a4 .toolbar strong,
  .rep-a4 .muted {
    display: none !important;
  }
  .rep-a4 .table-wrap {
    overflow: visible !important;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: none;
  }
  .rep-a4 table.navy-table {
    table-layout: fixed;
    width: 100% !important;
    max-width: 100%;
    font-size: 7pt;
    line-height: 1.08;
    border-collapse: collapse;
  }
  .rep-a4 table.navy-table thead { display: table-header-group; }
  .rep-a4 table.navy-table tfoot { display: table-footer-group; }
  .rep-a4 table.navy-table tr { break-inside: avoid; page-break-inside: avoid; }
  .rep-a4 table.navy-table th,
  .rep-a4 table.navy-table td {
    padding: 0.5px 1.5px !important;
    vertical-align: middle;
    box-shadow: none !important;
    overflow: hidden;
    line-height: 1.05 !important;
  }
  .rep-a4 table.navy-table th {
    font-size: 6pt !important;
    letter-spacing: 0 !important;
    white-space: nowrap;
    font-weight: 700;
    line-height: 1 !important;
    padding: 1px 1.5px !important;
    height: auto !important;
  }
  .rep-a4 table.navy-table thead tr + tr th {
    font-size: 5.8pt !important;
    padding: 0.5px 1px !important;
    line-height: 1 !important;
  }
  .rep-a4 table.navy-table td {
    text-align: center !important;
    white-space: nowrap;
    font-variant-numeric: tabular-nums lining-nums;
  }
  .rep-a4 table.navy-table td.left,
  .rep-a4 table.navy-table th.left,
  .rep-a4 table.navy-table td.c-text,
  .rep-a4 table.navy-table th.c-text {
    text-align: left !important;
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.08 !important;
    padding-left: 2px !important;
    padding-right: 2px !important;
  }
  .rep-a4 table.navy-table td.c-marks,
  .rep-a4 table.navy-table th.c-marks {
    text-align: left !important;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.08 !important;
    padding-left: 2px !important;
    padding-right: 2px !important;
    font-size: 6pt !important;
  }
  /* Compact numeric trail: AVG → POS (and similar) */
  .rep-a4 table.navy-table th.c-num,
  .rep-a4 table.navy-table td.c-num,
  .rep-a4 table.navy-table th.c-nar,
  .rep-a4 table.navy-table td.c-nar,
  .rep-a4 table.navy-table th.c-n,
  .rep-a4 table.navy-table td.c-n,
  .rep-a4 table.navy-table th.c-idx,
  .rep-a4 table.navy-table td.c-idx {
    text-align: center !important;
    white-space: nowrap !important;
    padding-left: 1px !important;
    padding-right: 1px !important;
  }
  .rep-a4 table.navy-table td.marks-cell {
    font-size: 6.2pt !important;
    line-height: 1.12 !important;
    white-space: normal !important;
  }
  .rep-a4 table.navy-table td.marks-cell span {
    display: inline;
    white-space: nowrap;
    margin-right: 3px;
  }
  /* School ranking / full sheets */
  .rep-a4-schools col.c-sn { width: 2.6%; }
  .rep-a4-schools col.c-centre { width: 5.5%; }
  .rep-a4-schools col.c-school { width: 20%; }
  .rep-a4-schools col.c-dist { width: 9%; }
  .rep-a4-schools col.c-n { width: 3.2%; }
  .rep-a4-schools col.c-div { width: 2.8%; }
  .rep-a4-schools col.c-gpa { width: 4.2%; }
  .rep-a4-schools col.c-pos { width: 2.8%; }
  .rep-a4-schools col.col-review { width: 0; }
  /* Candidate ranking (top/last ten + subjects marks) */
  .rep-a4-students col.c-sn { width: 2.4%; }
  .rep-a4-students col.c-idx { width: 7.5%; }
  .rep-a4-students col.c-name { width: 13%; }
  .rep-a4-students col.c-sex { width: 2.4%; }
  .rep-a4-students col.c-school { width: 13%; }
  .rep-a4-students col.c-marks { width: 42%; }
  .rep-a4-students col.c-avg { width: 4.2%; }
  .rep-a4-students col.c-pts { width: 3.6%; }
  .rep-a4-students col.c-gpa { width: 4.6%; }
  .rep-a4-students col.c-div { width: 2.8%; }
  .rep-a4-students col.c-pos { width: 2.8%; }
  /* Division lists without subject marks */
  .rep-a4-cand col.c-sn { width: 3%; }
  .rep-a4-cand col.c-idx { width: 10%; }
  .rep-a4-cand col.c-name { width: 28%; }
  .rep-a4-cand col.c-sex { width: 3.5%; }
  .rep-a4-cand col.c-school { width: 30%; }
  .rep-a4-cand col.c-pts { width: 6%; }
  .rep-a4-cand col.c-gpa { width: 7%; }
  .rep-a4-cand col.c-div { width: 4.5%; }
  .rep-a4-cand col.c-pos { width: 4.5%; }
  /* Generic width hints when no colgroup (subject ranks, district, etc.) */
  .rep-a4 table.navy-table col.c-sn,
  .rep-a4 table.navy-table th.c-nar,
  .rep-a4 table.navy-table td.c-nar { width: 3%; }
  .rep-a4 table.navy-table th.c-num,
  .rep-a4 table.navy-table td.c-num { width: 4.2%; }
  .rep-a4 table.navy-table th.c-idx,
  .rep-a4 table.navy-table td.c-idx { width: 7.5%; }

  body.sheet-print,
  body.sheet-print .official-sheet,
  body.sheet-print .official-sheet * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }
  body.sheet-print .main,
  body.sheet-print .content {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 1cm 1cm 1cm 1.5cm !important; /* top right bottom left — mirror @page */
    box-sizing: border-box;
  }
  body.sheet-print .official-sheet {
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    font-size: 8pt;
  }
  body.sheet-print .off-org { font-size: 13pt !important; color: #0b2545 !important; }
  body.sheet-print .off-suborg { font-size: 8pt !important; color: #0b2545 !important; }
  body.sheet-print .off-rule {
    background: none !important;
    height: 0 !important;
    border-top: 1.6pt solid #c9a227;
    border-bottom: 1.1pt solid #0b2545;
  }
  body.sheet-print .off-badge { background: #0b2545 !important; color: #fff !important; }
  body.sheet-print .off-head h1 { font-size: 11pt !important; color: #0b2545 !important; }
  body.sheet-print .off-school { font-size: 12pt !important; color: #17525d !important; }
  body.sheet-print .off-meta { background: #f6f7f9 !important; }
  body.sheet-print .off-legend { background: #eef1f4 !important; }
  body.sheet-print .off-groups { background: #e8eef6 !important; }
  body.sheet-print .off-wrap { overflow: visible !important; }
  body.sheet-print .off-cands,
  body.sheet-print .off-subj {
    min-width: 0 !important;
    width: 100% !important;
    table-layout: fixed !important;
  }
  body.sheet-print .official-sheet th,
  body.sheet-print .official-sheet td {
    padding: 2.5px 2px !important;
    font-size: 7.2pt !important;
    white-space: normal !important;
    overflow: visible !important;
    box-shadow: none !important;
  }
  body.sheet-print .official-sheet th {
    background: #0b2545 !important;
    color: #fff !important;
  }
  body.sheet-print .off-cands thead th {
    background: #17525d !important;
  }
  body.sheet-print .official-sheet .off-div-head {
    background: #1e4ea0 !important;
    color: #fff !important;
  }
  body.sheet-print .official-sheet tbody th {
    background: #fff !important;
    color: #0b2545 !important;
    text-align: left !important;
  }
  body.sheet-print .off-total th,
  body.sheet-print .off-total td { background: #dceeea !important; color: #0b2545 !important; }
  body.sheet-print .off-pct th,
  body.sheet-print .off-pct td { background: #e8eef6 !important; color: #0b2545 !important; }
  body.sheet-print .off-alt td,
  body.sheet-print .off-alt th { background: #f4f5f7 !important; }
  body.sheet-print .cell-I { background: #dceeea !important; }
  body.sheet-print .cell-II { background: #e6f4f1 !important; }
  body.sheet-print .cell-III { background: #fff4d6 !important; }
  body.sheet-print .cell-IV { background: #fde8e6 !important; }
  body.sheet-print .cell-0 { background: #f8d4d0 !important; }
  body.sheet-print .off-marks { min-width: 0 !important; font-size: 6.6pt !important; }
  body.sheet-print .off-cands th.off-vert {
    height: 52px;
    padding: 3px 1px 4px !important;
    vertical-align: bottom !important;
    white-space: nowrap !important;
  }
  body.sheet-print .off-cands th.off-vert span {
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-size: 6.2pt !important;
    letter-spacing: 0.08em;
  }
  body.sheet-print .off-cands thead { display: table-header-group; }
  body.sheet-print .off-subj thead { display: table-header-group; }
  body.sheet-print .off-subj-block {
    break-before: page;
    page-break-before: always;
  }
}
