:root {
  --navy: #061d3a;
  --navy-2: #0a2c55;
  --blue: #075fda;
  --blue-2: #0d7be8;
  --teal: #079a9a;
  --green: #159655;
  --amber: #f59f18;
  --orange: #ef6c00;
  --purple: #6a42c2;
  --red: #df2f36;
  --ink: #091735;
  --muted: #53647d;
  --line: #d8e1ee;
  --panel: #ffffff;
  --bg: #f7f9fd;
  --shadow: 0 6px 18px rgba(8, 31, 62, .07);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  min-width: 1360px;
  display: grid;
  grid-template-columns: 244px 1fr;
  background: #ffffff;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

.sidebar {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px 12px;
  color: #fff;
  background: radial-gradient(circle at 80% 10%, rgba(10,79,154,.36), transparent 35%), linear-gradient(180deg, #061f42, #05264c 55%, #03182f);
}

.brand {
  padding: 4px 10px 22px;
}

.brand-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.brand-subtitle {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.28;
}

.nav {
  display: grid;
  gap: 14px;
  margin-top: 36px;
}

.nav-button {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 8px;
  padding: 12px 14px;
  background: transparent;
  color: #eef5ff;
  text-align: left;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
}

.nav-button:hover,
.nav-button.active {
  background: linear-gradient(180deg, #1262c8, #0a4aa5);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}

.nav-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  font-size: 20px;
  line-height: 1;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 10px;
}

.access-panel {
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255,255,255,.04);
}

.access-panel span {
  display: block;
  margin-top: 3px;
  color: #c7d6e8;
  font-size: 12px;
  line-height: 1.35;
}

.access-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #61d282;
}

.sign-out {
  display: none;
  width: 100%;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 8px;
  padding: 10px;
  background: transparent;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.sign-out.visible {
  display: block;
}

.app {
  padding: 24px 26px 24px;
  overflow-x: hidden;
}

.topbar {
  min-height: 72px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
}

h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.08;
  font-weight: 800;
}

#page-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: var(--muted);
  white-space: nowrap;
}

.icon-button {
  min-width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.plain-icon {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
  font-size: 18px;
  cursor: pointer;
}

.export-button {
  min-height: 44px;
  border: 1px solid #cbd7e8;
  border-radius: 7px;
  padding: 10px 18px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.approval-banner {
  border: 1px solid #ffb74d;
  border-radius: 8px;
  padding: 10px 20px;
  background: #fff6e8;
  color: #1c2438;
  font-weight: 800;
}

.approval-banner span {
  color: var(--muted);
  font-weight: 400;
}

.bubble,
.alert-dot::after {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 11px;
}

.user-pill {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #092a57;
  color: #fff;
  font-weight: 800;
}

.filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr)) auto auto;
  gap: 12px;
  align-items: end;
  margin: 10px 0 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.filter-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr)) auto;
  gap: 18px;
  align-items: end;
}

.field label {
  display: block;
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 12px;
}

.field select,
.field input,
.field .fake-select,
.field-input {
  width: 100%;
  min-height: 38px;
  border: 1px solid #cbd7e8;
  border-radius: 5px;
  padding: 9px 11px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.primary-button,
.secondary-button {
  min-height: 38px;
  border-radius: 6px;
  padding: 9px 14px;
  font-weight: 800;
  cursor: pointer;
}

.primary-button {
  border: 1px solid #064aa5;
  background: #064aa5;
  color: #fff;
}

.outline-blue,
.text-reset {
  min-height: 40px;
  border: 1px solid #3b76e5;
  border-radius: 5px;
  background: #fff;
  color: #064aa5;
  font-weight: 800;
  cursor: pointer;
}

.text-reset {
  border-color: transparent;
}

.access-strip {
  grid-column: 1 / -1;
  border: 1px solid #9fc4f8;
  border-radius: 7px;
  background: #eef6ff;
  color: #064aa5;
  padding: 12px 16px;
  font-weight: 800;
}

.secondary-button {
  border: 1px solid #cbd7e8;
  background: #fff;
  color: var(--ink);
}

.link-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--blue);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-align: left;
}

.link-button:hover {
  text-decoration: underline;
}

.notice {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #c8defc;
  border-left: 5px solid var(--blue);
  border-radius: 8px;
  padding: 12px 14px;
  background: #eef6ff;
  box-shadow: var(--shadow);
}

.notice.success {
  border-color: #bee8cf;
  border-left-color: var(--green);
  background: #edf9f2;
}

.notice.warning {
  border-color: #ffe1a8;
  border-left-color: var(--amber);
  background: #fff8e8;
}

.notice.error {
  border-color: #ffd0d2;
  border-left-color: var(--red);
  background: #fff0f1;
}

.content {
  display: grid;
  gap: 12px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
}

.kpi-card,
.panel {
  border: 1px solid #dce4ef;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.kpi-card {
  min-height: 108px;
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 14px;
  align-items: center;
  padding: 16px;
}

.kpi-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
}

.kpi-blue .kpi-icon { background: linear-gradient(160deg, #2b8cff, #095dd2); }
.kpi-green .kpi-icon { background: linear-gradient(160deg, #27b86d, #0b8c49); }
.kpi-red .kpi-icon { background: linear-gradient(160deg, #ff6a70, #d82430); }
.kpi-amber .kpi-icon { background: linear-gradient(160deg, #ffc15a, #ed8b00); }
.kpi-purple .kpi-icon { background: linear-gradient(160deg, #9b75ec, #6034bd); }
.kpi-teal .kpi-icon { background: linear-gradient(160deg, #27b7c6, #078999); }

.kpi-label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.kpi-value {
  margin-top: 5px;
  color: #071632;
  font-size: 32px;
  line-height: 1;
  font-weight: 800;
}

.kpi-trend {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.up { color: var(--green); }
.down { color: var(--red); }
.warn-text { color: var(--amber); }

.panel {
  padding: 14px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.panel-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}

.panel-subtitle {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.two-col {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 12px;
}

.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.main-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(340px, .95fr);
  gap: 12px;
}

.wide-detail {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(360px, .85fr);
  gap: 12px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
  align-items: stretch;
}

.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-9 { grid-column: span 9; }
.span-12 { grid-column: 1 / -1; }

.chart {
  min-height: 212px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart svg {
  width: 100%;
  height: 100%;
  min-height: 210px;
}

.axis-label {
  fill: #25324b;
  font-size: 12px;
}

.bar-label {
  fill: #071632;
  font-size: 12px;
  font-weight: 700;
}

.capture-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  height: 100%;
}

.capture-card {
  min-height: 86px;
  border: 1px solid #dce4ef;
  border-radius: 7px;
  padding: 10px;
  background: #f8fbff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.capture-card span,
.capture-card em {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.25;
}

.capture-card strong {
  display: block;
  margin: 6px 0 4px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.capture-card.green { border-color: #b9dfc5; background: #f2fbf5; }
.capture-card.amber { border-color: #ffe1a6; background: #fff8eb; }
.capture-card.red { border-color: #ffc5c8; background: #fff4f5; }
.capture-card.blue { border-color: #b9d5ff; background: #f3f8ff; }

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

th,
td {
  padding: 9px 10px;
  border-bottom: 1px solid #e3eaf4;
  text-align: left;
  vertical-align: middle;
}

th {
  background: #f8fafd;
  color: var(--ink);
  font-weight: 800;
}

tbody tr:hover {
  background: #f9fbff;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.badge.red { background: #ffe4e5; color: #b71d27; }
.badge.amber { background: #fff1d7; color: #a35b00; }
.badge.green { background: #ddf5e8; color: #087a3f; }
.badge.blue { background: #e3efff; color: #064aa5; }
.badge.purple { background: #eee8ff; color: #5a31ad; }
.badge.gray { background: #eef2f7; color: #475467; }

.hbars {
  display: grid;
  gap: 12px;
  padding: 10px 4px;
}

.hbar {
  display: grid;
  grid-template-columns: 148px 1fr 56px;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}

.hbar-track {
  height: 22px;
  overflow: hidden;
  border-radius: 3px;
  background: #edf2f8;
}

.hbar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--blue), var(--teal));
}

.stacked-capture {
  gap: 16px;
  padding: 0;
}

.stacked-capture .hbar {
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 10px;
}

.stacked-capture .hbar > span {
  font-weight: 700;
}

.capture-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.capture-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.capture-legend-item span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.stacked-track {
  position: relative;
  display: flex;
  height: 28px;
  overflow: hidden;
}

.stacked-segment {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.stacked-segment.noCapture {
  background-color: #c83d3d;
  background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, .22) 0 4px, transparent 4px 8px);
}

.stacked-segment.lowCapture {
  background-color: #d99500;
}

.stacked-segment.mediumCapture {
  background-color: #4f75c8;
  background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, .18) 0 3px, transparent 3px 7px);
}

.stacked-segment.highCapture {
  background-color: #4f9f5f;
}

.capture-bar-value {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  max-width: calc(100% - 12px);
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(255, 255, 255, .92);
  color: #071632;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(7, 22, 50, .12);
  white-space: nowrap;
}

.period-cards {
  display: grid;
  gap: 10px;
}

.period-card {
  display: grid;
  gap: 7px;
  border: 1px solid #e3eaf4;
  border-radius: 7px;
  padding: 10px;
  background: #f9fbff;
}

.period-card > div:first-child,
.period-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.period-card strong {
  color: var(--ink);
  font-size: 13px;
}

.period-card span,
.period-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.period-caveat {
  margin: 2px 0 0;
  border: 1px solid #ffe1a6;
  border-radius: 7px;
  padding: 9px 10px;
  background: #fff8eb;
  color: #6c4a12;
  font-size: 12px;
  line-height: 1.35;
}

.period-caveat strong {
  color: #6c4a12;
}

.period-metrics span:first-child {
  color: var(--ink);
  font-weight: 800;
}

.period-track {
  position: relative;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #eaf0f7;
}

.period-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--teal));
}

.period-expected {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 2px;
  background: #f0a000;
  z-index: 2;
}

.capture-panel {
  display: flex;
  flex-direction: column;
}

.capture-panel .panel-header {
  margin-bottom: 10px;
}

.capture-panel-body {
  flex: 1;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: flex-start;
}

.capture-toolbar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid #e3eaf4;
  border-radius: 7px;
  padding: 10px 12px;
  background: #f9fbff;
}

.capture-panel.span-12 .capture-toolbar {
  grid-template-columns: 1fr;
}

.capture-panel.span-12 .stacked-capture .hbar {
  grid-template-columns: 210px minmax(0, 1fr);
}

.capture-panel.span-12 .capture-footnotes {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.faculty-capture-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.faculty-capture-card {
  min-height: 188px;
  display: grid;
  gap: 12px;
  border: 1px solid #dce4ef;
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  box-shadow: 0 2px 8px rgba(6, 29, 58, .04);
}

.faculty-capture-card.healthy { border-top: 3px solid #4f9f5f; }
.faculty-capture-card.watch { border-top: 3px solid #d99500; }
.faculty-capture-card.attention { border-top: 3px solid #c83d3d; }
.faculty-capture-card.developing { border-top: 3px solid #4f75c8; }

.faculty-capture-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.faculty-capture-head strong,
.faculty-capture-head span {
  display: block;
}

.faculty-capture-head strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
}

.faculty-capture-head span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.faculty-capture-head em {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 8px;
  background: #eef2f7;
  color: #475467;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.faculty-capture-card.healthy .faculty-capture-head em { background: #ddf5e8; color: #087a3f; }
.faculty-capture-card.watch .faculty-capture-head em { background: #fff1d7; color: #9a5c00; }
.faculty-capture-card.attention .faculty-capture-head em { background: #ffe4e5; color: #b71d27; }
.faculty-capture-card.developing .faculty-capture-head em { background: #e3efff; color: #064aa5; }

.faculty-capture-score {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.faculty-capture-score strong {
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
}

.faculty-capture-score span {
  color: var(--muted);
  font-size: 12px;
}

.mini-stack {
  display: flex;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #eaf0f7;
}

.mini-stack .stacked-segment {
  height: 100%;
}

.faculty-capture-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.faculty-capture-metrics span {
  border-radius: 6px;
  padding: 8px;
  background: #f3f6fb;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.faculty-capture-metrics strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1;
}

.capture-toolbar strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 13px;
}

.segmented-control {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 4px;
  border: 1px solid #d6e0ee;
  border-radius: 7px;
  padding: 4px;
  background: #fff;
}

.segmented-control button {
  min-width: 58px;
  border: 0;
  border-radius: 5px;
  padding: 7px 9px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.segmented-control button.active {
  background: #0d5fc3;
  color: #fff;
  box-shadow: 0 1px 4px rgba(13, 95, 195, .22);
}

.segmented-control button:focus-visible {
  outline: 2px solid #75bfe5;
  outline-offset: 2px;
}

.capture-footnotes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.capture-footnotes div {
  border: 1px solid #e3eaf4;
  border-radius: 7px;
  padding: 10px;
  background: #f9fbff;
}

.capture-footnotes strong,
.capture-footnotes span {
  display: block;
}

.capture-footnotes strong {
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
}

.capture-footnotes span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.capture-footnotes p {
  grid-column: 1 / -1;
  margin: 0;
  border-left: 3px solid #0d5fc3;
  border-radius: 6px;
  padding: 9px 10px;
  background: #f3f8ff;
  color: #314260;
  font-size: 12px;
  line-height: 1.35;
}

.not-due-banner {
  display: grid;
  gap: 4px;
  border: 1px solid #d6e0ee;
  border-radius: 7px;
  padding: 12px;
  background: #f7f9fc;
}

.not-due-banner strong {
  color: var(--ink);
}

.not-due-banner span {
  color: var(--muted);
  font-size: 12px;
}

.not-due-list {
  display: grid;
  gap: 11px;
}

.not-due-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 82px auto;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}

.not-due-row > span {
  font-weight: 800;
}

.not-due-row em {
  color: var(--muted);
  font-style: normal;
  text-align: right;
}

.not-due-track {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: repeating-linear-gradient(45deg, #eef2f7 0 7px, #e2e8f0 7px 14px);
  color: #475467;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.s2-exception-list {
  display: grid;
  gap: 8px;
  border: 1px solid #e3eaf4;
  border-radius: 7px;
  padding: 10px;
  background: #f9fbff;
  color: var(--muted);
  font-size: 12px;
}

.s2-exception-list span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.s2-exception-list strong {
  color: var(--ink);
}

.heatmap {
  display: grid;
  grid-template-columns: 170px repeat(5, 1fr);
  border: 1px solid #e3eaf4;
  border-bottom: 0;
  border-right: 0;
  font-size: 12px;
}

.heatmap div {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid #e3eaf4;
  border-bottom: 1px solid #e3eaf4;
  padding: 5px;
  text-align: center;
}

.heatmap .row-label,
.heatmap .head {
  justify-content: flex-start;
  background: #fafcff;
  font-weight: 800;
}

.donut {
  width: 190px;
  height: 190px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--red) 0 24%, var(--amber) 24% 58%, #4b6fc4 58% 85%, #58b669 85% 100%);
}

.donut-inner {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  text-align: center;
  font-weight: 800;
}

.donut-layout {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 18px;
  align-items: center;
}

.legend {
  display: grid;
  gap: 8px;
  font-size: 12px;
}

.legend-row {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 8px;
  align-items: center;
}

.dot-red { background: var(--red); }
.dot-amber { background: var(--amber); }
.dot-blue { background: #4b6fc4; }
.dot-green { background: #58b669; }
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

body[data-page="executive"] .span-3 .donut-layout {
  grid-template-columns: 1fr;
  gap: 12px;
  justify-items: center;
}

body[data-page="executive"] .span-3 .donut {
  width: 156px;
  height: 156px;
}

body[data-page="executive"] .span-3 .donut-inner {
  width: 76px;
  height: 76px;
}

body[data-page="executive"] .span-3 .legend {
  width: 100%;
}

body[data-page="executive"] .span-3 .legend-row {
  grid-template-columns: 10px minmax(0, 1fr) auto;
}

.risk-profile {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 14px;
}

.student-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e3eaf4;
}

.avatar {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dfe7f4;
  color: #253b5c;
  font-weight: 800;
}

.driver-list {
  display: grid;
  gap: 10px;
}

.driver-card {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #e3eaf4;
  border-radius: 7px;
}

.driver-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  font-weight: 800;
}

.action-list {
  display: grid;
  gap: 10px;
}

.action-card {
  display: grid;
  grid-template-columns: 58px 1fr 88px 88px 82px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mini-actions {
  display: grid;
  gap: 6px;
}

.approve,
.reject,
.edit {
  border-radius: 5px;
  padding: 7px 10px;
  font-weight: 800;
}

.approve { border: 1px solid var(--green); background: var(--green); color: #fff; }
.reject { border: 1px solid #f2b8b8; background: #fff; color: var(--red); }
.edit { border: 1px solid var(--line); background: #fff; color: var(--ink); }

.kanban {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.lane {
  min-height: 430px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 10px;
}

.lane-title {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-weight: 800;
}

.case-card {
  display: grid;
  gap: 7px;
  border: 1px solid #d9e2ee;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.case-card:hover,
.case-card.selected,
.alert-card.selected {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(7, 95, 218, .12);
}

.case-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.case-actions.top {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 8px 0;
  background: #fff;
  border-bottom: 1px solid #e3eaf4;
}

.close-action {
  background: var(--green);
  border-color: var(--green);
}

.timeline {
  display: grid;
  gap: 14px;
  position: relative;
  padding-left: 18px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 5px;
  bottom: 5px;
  border-left: 2px dashed #9ab5d7;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 10px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -17px;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue);
}

.alert-list {
  display: grid;
  gap: 10px;
}

.alert-card {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #ffd7a8;
  border-radius: 8px;
  padding: 11px;
  background: #fffdf9;
}

.rule-builder {
  display: grid;
  gap: 12px;
}

.info-box {
  border: 1px solid #c8defc;
  border-radius: 8px;
  background: #eef6ff;
  padding: 12px;
}

.briefing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(350px, .85fr);
  gap: 12px;
}

.briefing-document {
  display: grid;
  gap: 12px;
}

.narrative-card {
  border: 1px solid #e2e9f5;
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.workflow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: center;
}

.workflow-step {
  min-height: 92px;
  border: 1px solid #cbd7e8;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.qa-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr) 330px;
  gap: 12px;
}

.question-list {
  display: grid;
  gap: 10px;
}

.question {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #fff;
  font-weight: 700;
}

.question.active {
  border-color: var(--blue);
  background: linear-gradient(180deg, #075fdc, #064aa5);
  color: #fff;
}

.question-input {
  display: grid;
  grid-template-columns: 1fr 42px;
  gap: 8px;
  margin-top: auto;
}

.lineage {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  align-items: center;
}

.lineage-node {
  border: 1px solid #b8cae5;
  border-radius: 8px;
  padding: 12px;
  background: #fbfdff;
  text-align: center;
  font-weight: 800;
  color: var(--ink);
}

.lineage-arrow {
  text-align: center;
  color: var(--blue);
  font-weight: 800;
}

.empty-state,
.error-state {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  background: #fff;
}

.locked {
  max-width: 620px;
  margin-top: 32px;
}

.small-note {
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 720px) {
  body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
  }

  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-footer {
    display: none;
  }

  .filters,
  .kpi-grid,
  .two-col,
  .three-col,
  .main-detail,
  .wide-detail,
  .briefing-layout,
  .qa-layout,
  .kanban {
    grid-template-columns: 1fr;
  }

  .span-3,
  .span-4,
  .span-5,
  .span-6,
  .span-7,
  .span-8,
  .span-9 {
    grid-column: 1 / -1;
  }
}

/* Mock fidelity layer: page-specific sizing and chrome aligned to generated dashboard PNGs. */
body {
  min-width: 1536px;
  font-family: "Inter", "Segoe UI", Arial, Helvetica, sans-serif;
}

body[data-page="executive"] { grid-template-columns: 253px 1fr; min-width: 1568px; }
body[data-page="early-warning"] { grid-template-columns: 183px 1fr; }
body[data-page="module-health"],
body[data-page="cohort-equity"],
body[data-page="intervention-impact"],
body[data-page="advisor-copilot"],
body[data-page="case-queue"],
body[data-page="automated-alerts"],
body[data-page="leadership-briefing"],
body[data-page="ai-qa"] { grid-template-columns: 198px 1fr; }
body[data-page="data-quality"] { grid-template-columns: 160px 1fr; }

.sidebar {
  padding: 20px 10px;
  background: radial-gradient(circle at 80% 8%, rgba(14, 83, 158, .38), transparent 34%),
    linear-gradient(180deg, #062144 0%, #052a55 46%, #031a34 100%);
}

.brand {
  padding: 2px 10px 14px;
}

.brand-title {
  font-size: 26px;
  letter-spacing: 0;
}

body[data-page="executive"] .brand-title,
body[data-page="early-warning"] .brand-title,
body[data-page="advisor-copilot"] .brand-title {
  display: none;
}

body[data-page="data-quality"] .brand-title {
  display: block;
  color: #061d3a;
  font-size: 30px;
}

body[data-page="data-quality"] .sidebar {
  color: #fff;
  background: linear-gradient(180deg, #f7fbff 0 88px, #062144 88px, #052a55 100%);
  border-right: 1px solid #dbe5f2;
}

body[data-page="data-quality"] .brand-subtitle {
  color: #061d3a;
}

.brand-subtitle {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.28;
}

body[data-page="executive"] .brand-subtitle {
  font-size: 21px;
  padding-top: 8px;
}

.nav {
  gap: 10px;
  margin-top: 22px;
}

body[data-page="executive"] .nav {
  gap: 18px;
  margin-top: 24px;
}

.nav-button {
  min-height: 45px;
  border-radius: 7px;
  padding: 10px 12px;
  gap: 12px;
  font-size: 14px;
  font-weight: 700;
}

body[data-page="executive"] .nav-button {
  min-height: 59px;
  padding: 13px 18px;
  font-size: 16px;
}

.nav-button.active {
  background: linear-gradient(180deg, #1267d4 0%, #0750af 100%);
}

.nav-icon,
.nav-icon svg,
.top-actions svg,
.export-button svg,
.sidebar-footer svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.1;
}

.app {
  padding: 18px 20px 20px;
  background: #fff;
}

body[data-page="executive"] .app {
  padding: 26px 24px 18px;
}

.topbar {
  min-height: 62px;
  margin-bottom: 4px;
  align-items: flex-start;
}

h1 {
  font-size: 28px;
  line-height: 1.04;
  letter-spacing: 0;
}

body[data-page="executive"] h1 {
  font-size: 40px;
}

body[data-page="early-warning"] h1,
body[data-page="case-queue"] h1,
body[data-page="module-health"] h1,
body[data-page="cohort-equity"] h1,
body[data-page="intervention-impact"] h1,
body[data-page="advisor-copilot"] h1,
body[data-page="automated-alerts"] h1,
body[data-page="leadership-briefing"] h1,
body[data-page="ai-qa"] h1,
body[data-page="data-quality"] h1 {
  font-size: 26px;
}

#page-subtitle {
  margin-top: 5px;
  font-size: 14px;
  color: #27364f;
}

body[data-page="executive"] #page-subtitle {
  font-size: 18px;
}

.top-actions {
  min-height: 38px;
  gap: 14px;
  font-size: 13px;
  color: #1f2d49;
}

.top-actions > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.plain-icon,
.icon-button {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
}

.icon-button {
  min-width: 38px;
  height: 38px;
  border-radius: 6px;
}

.export-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 43px;
  padding: 10px 20px;
  font-size: 14px;
  border-radius: 6px;
}

.approval-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 258px;
  padding: 9px 14px;
  border-color: #ffb547;
}

.filters {
  gap: 12px;
  margin: 7px 0 10px;
  padding: 14px 16px;
  border-radius: 7px;
  box-shadow: 0 2px 8px rgba(6, 29, 58, .045);
}

body[data-page="executive"] .filters {
  margin-top: 14px;
  padding: 16px 18px;
}

.filter-card {
  grid-template-columns: repeat(4, minmax(190px, 1fr)) 145px;
}

.field label {
  font-size: 11px;
  color: #16243b;
}

.field select,
.field input,
.field-input {
  min-height: 38px;
  border-radius: 5px;
  color: #071632;
}

.kpi-grid {
  gap: 12px;
  margin-bottom: 10px;
}

.kpi-card {
  min-height: 94px;
  grid-template-columns: 58px 1fr;
  gap: 13px;
  padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(6, 29, 58, .04);
}

body[data-page="executive"] .kpi-card {
  min-height: 130px;
  grid-template-columns: 72px 1fr;
  border-width: 1.5px;
}

.kpi-icon {
  width: 52px;
  height: 52px;
  border-radius: 13px;
}

body[data-page="executive"] .kpi-icon {
  width: 66px;
  height: 66px;
  border-radius: 50%;
}

.kpi-icon svg {
  width: 28px;
  height: 28px;
}

.kpi-blue { border-color: #75bfe5; }
.kpi-green { border-color: #91cfa2; }
.kpi-red { border-color: #f5a1a1; }
.kpi-purple { border-color: #bda7ee; }
.kpi-amber { border-color: #f6bd55; }

body[data-page="executive"] .kpi-blue .kpi-icon { background: #dff2ff; color: #0b7fb2; }
body[data-page="executive"] .kpi-green .kpi-icon { background: #e2f4e3; color: #168847; }
body[data-page="executive"] .kpi-red .kpi-icon { background: #fde4e4; color: #d82d35; }
body[data-page="executive"] .kpi-purple .kpi-icon { background: #eee7ff; color: #6a42c2; }
body[data-page="executive"] .kpi-amber .kpi-icon { background: #fff0c9; color: #e39400; }

.kpi-label {
  font-size: 12px;
  font-weight: 800;
}

.kpi-value {
  font-size: 27px;
  letter-spacing: 0;
}

body[data-page="executive"] .kpi-value {
  font-size: 32px;
}

.kpi-trend {
  font-size: 12px;
}

.panel {
  border-radius: 7px;
  padding: 12px;
  box-shadow: 0 2px 8px rgba(6, 29, 58, .045);
}

.panel-title {
  font-size: 14px;
}

body[data-page="executive"] .panel-title {
  font-size: 16px;
}

.dashboard-grid,
.wide-detail,
.main-detail,
.three-col,
.two-col,
.briefing-layout,
.qa-layout {
  gap: 10px;
}

.chart {
  min-height: 188px;
}

.chart svg {
  min-height: 188px;
}

body[data-page="executive"] .chart {
  min-height: 230px;
}

body[data-page="executive"] .chart svg {
  min-height: 230px;
}

table {
  font-size: 11px;
}

th,
td {
  padding: 7px 9px;
}

body[data-page="executive"] table {
  font-size: 13px;
}

body[data-page="executive"] th,
body[data-page="executive"] td {
  padding: 10px 13px;
}

.sidebar-footer {
  gap: 14px;
}

.sidebar-user {
  display: grid;
  grid-template-columns: 28px 1fr 20px;
  gap: 12px;
  align-items: center;
  padding: 14px 10px;
  border-top: 1px solid rgba(255,255,255,.22);
  color: #fff;
}

.sidebar-user.compact {
  grid-template-columns: 28px 1fr 18px;
  border-top: 0;
}

.sidebar-user span {
  display: block;
  margin-top: 8px;
  color: #fff;
  font-weight: 500;
}

.governance-card,
.read-only-card {
  align-items: flex-start;
}

.governance-card a {
  display: block;
  margin-top: 12px;
  color: #63a7ff;
}

.status-dot {
  width: 12px;
  height: 12px;
  margin-top: 3px;
  border-radius: 50%;
  background: #61d282;
}

.footer-settings {
  margin-top: auto;
}

.alert-dot {
  position: relative;
}

.alert-dot::after {
  content: "3";
  position: absolute;
  top: -4px;
  right: -4px;
}

body[data-page="early-warning"] .alert-dot::after {
  content: "8";
}

body[data-page="case-queue"] .alert-dot::after {
  content: "3";
}

body[data-page="executive"] .brand-title,
body[data-page="early-warning"] .brand-title,
body[data-page="advisor-copilot"] .brand-title {
  display: block;
  font-size: 20px;
  line-height: 1.1;
}

body[data-page="executive"] .brand-subtitle,
body[data-page="early-warning"] .brand-subtitle,
body[data-page="advisor-copilot"] .brand-subtitle {
  font-size: 18px;
}

.axis-label {
  font-size: 15px;
}

.bar-label {
  font-size: 15px;
}

body[data-page="executive"] .axis-label,
body[data-page="executive"] .bar-label {
  font-size: 16px;
}

/* SPU brand refinement layer.
   Official refocus palette: red, orange, beige and navy blue.
   --spu-red is aliased to the boardroom --brand token (defined in the final
   layer) so the app carries exactly one institutional red. */
:root {
  --spu-red: var(--brand);
  --spu-orange: #ee5921;
  --spu-beige: #f1d5ab;
  --spu-beige-2: #e1d3b3;
  --spu-navy: #07074e;
  --spu-indigo: #283097;
  --spu-cream: #fbf6ee;
  --spu-paper: #fffdf9;
  --spu-line: #eadfce;
  --spu-ink: #111433;
  --spu-muted: #5e5a6f;
  --spu-red-soft: #fff0f2;
  --spu-orange-soft: #fff2e8;
  --spu-blue-soft: #eceefa;
  --spu-beige-soft: #fff7ec;
  --navy: var(--spu-navy);
  --navy-2: var(--spu-indigo);
  --ink: var(--spu-ink);
  --muted: var(--spu-muted);
  --line: var(--spu-line);
  --panel: var(--spu-paper);
  --bg: var(--spu-cream);
  --blue: var(--spu-indigo);
  --red: var(--spu-red);
  --orange: var(--spu-orange);
  --amber: #daa520;
  --green: #6b8e23;
  --purple: var(--spu-indigo);
  --teal: #6b8e23;
}

body {
  color: var(--spu-ink);
  background:
    linear-gradient(180deg, rgba(241, 213, 171, .28) 0%, rgba(255, 253, 249, 0) 320px),
    var(--spu-cream);
}

.app,
body[data-page="executive"] .app {
  background:
    linear-gradient(180deg, rgba(255, 250, 243, .9) 0%, rgba(251, 246, 238, .96) 100%);
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(238, 89, 33, .3) 0%, rgba(226, 25, 55, .18) 46%, rgba(7, 7, 78, .22) 100%),
    linear-gradient(180deg, #b8192b 0%, var(--spu-red) 42%, #9f1428 100%);
}

.sidebar::after {
  content: "";
  position: absolute;
  inset: auto 18px 18px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--spu-orange), var(--spu-beige), var(--spu-orange));
  opacity: .9;
}

.brand-title,
.brand-subtitle {
  color: #fffaf3;
}

.nav-button {
  color: rgba(255, 250, 243, .88);
}

.nav-button:hover {
  background: rgba(255, 250, 243, .14);
}

.nav-button.active {
  background: linear-gradient(135deg, var(--spu-orange) 0%, #f6a000 100%);
  color: #2b1600;
  box-shadow: 0 12px 28px rgba(238, 89, 33, .26);
}

.topbar h1,
.panel-title,
.kpi-label,
th {
  color: var(--spu-ink);
}

.top-actions .icon-button,
.export-button,
.filters,
.filter-card,
.capture-toolbar,
.kpi-card,
.panel,
.faculty-capture-card {
  background: var(--spu-paper);
  border-color: var(--spu-line);
}

.filters,
.filter-card,
.capture-toolbar,
.panel,
.faculty-capture-card {
  box-shadow: 0 10px 28px rgba(7, 7, 78, .055);
}

body[data-page="executive"] .kpi-card {
  min-height: 124px;
  border: 1px solid var(--spu-line);
  border-top: 4px solid var(--spu-red);
  box-shadow: 0 10px 24px rgba(7, 7, 78, .052);
}

body[data-page="executive"] .kpi-card:nth-child(1) { border-top-color: var(--spu-red); }
body[data-page="executive"] .kpi-card:nth-child(2) { border-top-color: var(--spu-orange); }
body[data-page="executive"] .kpi-card:nth-child(3) { border-top-color: var(--spu-red); }
body[data-page="executive"] .kpi-card:nth-child(4) { border-top-color: var(--spu-orange); }
body[data-page="executive"] .kpi-card:nth-child(5) { border-top-color: #daa520; }

.kpi-blue,
.kpi-green,
.kpi-red,
.kpi-purple,
.kpi-amber,
.kpi-teal {
  border-color: var(--spu-line);
}

.kpi-icon,
body[data-page="executive"] .kpi-icon {
  border-radius: 16px;
  background: var(--spu-orange-soft);
  color: var(--spu-red);
}

body[data-page="executive"] .kpi-blue .kpi-icon,
body[data-page="executive"] .kpi-green .kpi-icon,
body[data-page="executive"] .kpi-red .kpi-icon,
body[data-page="executive"] .kpi-purple .kpi-icon,
body[data-page="executive"] .kpi-amber .kpi-icon,
.kpi-blue .kpi-icon,
.kpi-green .kpi-icon,
.kpi-red .kpi-icon,
.kpi-purple .kpi-icon,
.kpi-amber .kpi-icon,
.kpi-teal .kpi-icon {
  background: var(--spu-orange-soft);
  color: var(--spu-red);
}

body[data-page="executive"] .kpi-card:nth-child(1) .kpi-icon { background: var(--spu-red-soft); color: var(--spu-red); }
body[data-page="executive"] .kpi-card:nth-child(2) .kpi-icon { background: var(--spu-orange-soft); color: var(--spu-orange); }
body[data-page="executive"] .kpi-card:nth-child(3) .kpi-icon { background: var(--spu-red-soft); color: var(--spu-red); }
body[data-page="executive"] .kpi-card:nth-child(4) .kpi-icon { background: var(--spu-orange-soft); color: var(--spu-orange); }
body[data-page="executive"] .kpi-card:nth-child(5) .kpi-icon { background: #fff2d2; color: #a67400; }

.kpi-value,
body[data-page="executive"] .kpi-value {
  color: var(--spu-ink);
}

.kpi-trend {
  color: #24723b;
}

.kpi-trend.down {
  color: var(--spu-red);
}

.segmented-control {
  background: #fffaf3;
  border-color: var(--spu-line);
}

.segmented-control button {
  color: var(--spu-muted);
}

.segmented-control button.active {
  background: linear-gradient(135deg, var(--spu-red) 0%, #c71931 100%);
  color: #fffaf3;
  box-shadow: 0 8px 18px rgba(226, 25, 55, .22);
}

.segmented-control button:focus-visible,
select:focus-visible,
button:focus-visible {
  outline-color: var(--spu-orange);
}

.faculty-capture-grid {
  gap: 12px;
}

.faculty-capture-card {
  position: relative;
  overflow: hidden;
  min-height: 182px;
  padding: 15px;
  border-top: 0;
}

.faculty-capture-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--faculty-accent, var(--spu-orange)), rgba(241, 213, 171, .62));
}

.faculty-capture-card::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 0;
  width: 46%;
  height: 76px;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(241, 213, 171, .28), rgba(255, 255, 255, 0));
}

.faculty-capture-card.healthy,
.faculty-capture-card.watch,
.faculty-capture-card.attention,
.faculty-capture-card.developing {
  border-top: 0;
}

.faculty-capture-card.faculty-natural { --faculty-accent: #6b8e23; }
.faculty-capture-card.faculty-management { --faculty-accent: var(--spu-red); }
.faculty-capture-card.faculty-humanities { --faculty-accent: #fb4f14; }
.faculty-capture-card.faculty-education { --faculty-accent: #daa520; }
.faculty-capture-card.faculty-default { --faculty-accent: var(--spu-orange); }

.faculty-capture-head strong {
  font-size: 12px;
  letter-spacing: .02em;
}

.faculty-capture-head em {
  background: #fff6e9;
  color: #7b3a12;
  border: 1px solid #f3dfbf;
}

.faculty-capture-card.healthy .faculty-capture-head em,
.faculty-capture-card.watch .faculty-capture-head em,
.faculty-capture-card.attention .faculty-capture-head em,
.faculty-capture-card.developing .faculty-capture-head em {
  background: #fff6e9;
  color: #7b3a12;
}

.faculty-capture-score strong {
  color: var(--spu-ink);
}

.mini-stack {
  height: 10px;
  background: #f3eadf;
  box-shadow: inset 0 0 0 1px rgba(7, 7, 78, .04);
}

.stacked-segment.noCapture {
  background-color: var(--spu-red);
}

.stacked-segment.lowCapture {
  background-color: #daa520;
}

.stacked-segment.mediumCapture {
  background-color: var(--spu-indigo);
}

.stacked-segment.highCapture {
  background-color: #6b8e23;
}

.faculty-capture-metrics span,
.capture-footnotes div {
  background: #fff8ef;
  border: 1px solid #f0e3ce;
}

.capture-footnotes p,
.insight-note {
  background: #fff3e5;
  border-left-color: var(--spu-red);
  color: #533114;
}

.legend-dot.red { background: var(--spu-red); }
.legend-dot.amber { background: #daa520; }
.legend-dot.blue { background: var(--spu-indigo); }
.legend-dot.green { background: #6b8e23; }

.hbar-fill {
  background: linear-gradient(90deg, var(--spu-red) 0%, #cf2438 46%, var(--spu-orange) 100%);
}

.donut {
  background: conic-gradient(var(--spu-red) 0 24%, var(--spu-orange) 24% 58%, #daa520 58% 85%, #6b8e23 85% 100%);
}

.badge.red {
  background: #ffe5e9;
  color: #9d1027;
}

.badge.amber {
  background: #fff0cf;
  color: #7b5300;
}

.badge.green {
  background: #e9f0dd;
  color: #486414;
}

.badge.blue,
.badge.purple {
  background: var(--spu-blue-soft);
  color: var(--spu-navy);
}

tbody tr:hover {
  background: #fff7ec;
}


/* Data source registry panel */
.source-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.source-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(122, 27, 26, 0.12);
  border-radius: 10px;
  background: rgba(255, 252, 247, 0.6);
}

.source-row-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.source-row-main strong {
  font-size: 12.5px;
  line-height: 1.25;
}

.source-row-main .small-note {
  font-size: 11px;
}

.source-row .badge {
  flex-shrink: 0;
  white-space: nowrap;
}

/* ============================================================
   BOARDROOM REDESIGN LAYER
   Final layer: wins by order. Brand colour is reserved for identity
   (sidebar, logo, active nav, primary actions). Data and status colours
   come ONLY from the semantic tokens below, mirrored in app.js SEMANTIC.
   ============================================================ */
:root {
  /* Brand — identity surfaces only, never data.
     SPU crimson ramp. #ca2637 is the production colour on spu.ac.za
     (main nav, footer, headings); the in-repo "refocus" palette records
     #e21937 red + #ee5921 orange + #07074e navy. Confirm final values
     against the official CI guide, then update this block only. */
  --brand: #ca2637;        /* primary actions, links, export */
  --brand-deep: #9e1e2c;   /* hover / pressed */
  --brand-anchor: #ca2637; /* sidebar — SPU is RED, not maroon; matches spu.ac.za footer/nav */
  --brand-wash: #fdf3f4;   /* tinted hover/selected backgrounds */
  --brand-accent: #ffab1f; /* SPU amber — active-nav rail, sparingly */
  /* Semantic — status and data meaning only, colour-blind safe, AA on white */
  --ok: #1c7c3c;        --ok-soft: #e7f3ea;
  --warn: #b45309;      --warn-soft: #fdf2e3;
  --crit: #9f1d22;      --crit-soft: #f9e9ea;
  --info-c: #44619d;    --info-soft: #ecf0f7;
  --neutral-c: #5b6b7f; --neutral-soft: #eef1f4;
  /* Canvas */
  --canvas: #fafaf8;
  --card: #ffffff;
  --border-c: #e5e3dd;
  --shadow-soft: 0 1px 2px rgba(28, 27, 23, .05), 0 4px 14px rgba(28, 27, 23, .05);
  --ink-strong: #1d2433;
  --ink-muted: #5b6470;
  /* Type scale */
  --fs-1: 12px; --fs-2: 13px; --fs-3: 15px; --fs-4: 18px; --fs-5: 24px; --fs-6: 36px;
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
}

/* ---- Canvas & cards ---- */
body { background: var(--canvas); color: var(--ink-strong); font-family: var(--font-body); }
.app { background: var(--canvas); }
.panel, .kpi-card, .capture-toolbar, .faculty-capture-card, .filters {
  background: var(--card);
  border: 1px solid var(--border-c);
  box-shadow: var(--shadow-soft);
}
.panel { border-radius: 12px; padding: 16px; }
.dashboard-grid { gap: 16px; }
.kpi-grid { gap: 16px; }

/* ---- Typography ---- */
.topbar h1 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; }
.panel-title { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-3); letter-spacing: 0; text-transform: none; color: var(--ink-strong); }
.panel-subtitle { font-size: var(--fs-1); color: var(--ink-muted); }
.small-note, .panel-subtitle, .axis-text, .kpi-trend { color: var(--ink-muted); }
.small-note { font-size: var(--fs-1); }
.kpi-value, td, th, .hbar strong, .bar-value, .axis-text, .dev-value, .legend strong,
.bullet-label, .status-fresh, .kpi-delta, .faculty-capture-score strong, .capture-footnotes strong {
  font-variant-numeric: tabular-nums;
}

/* ---- Identity surfaces (brand allowed) ---- */
.sidebar { background: var(--brand-anchor); position: sticky; top: 0; height: 100vh; overflow-y: auto; }
/* Bright red base: small footer text must be full white for AA, not a tint. */
.sidebar .access-panel span, .sidebar .sidebar-user span { color: #fff; opacity: .92; }
.nav-button { color: #fff; }
.sidebar::after { content: none; }
/* Active nav: quiet overlay + amber rail, not a filled block. The rail is the
   only place the amber accent appears in the chrome. */
.nav button.active, .nav .active {
  background: rgba(255, 255, 255, .12);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--brand-accent);
}
.nav-button:hover { background: rgba(255, 255, 255, .08); }
.export-button { background: var(--brand); border-color: var(--brand); color: #fff; }
.export-button:hover { background: var(--brand-deep); }
.user-pill { background: var(--brand); }
/* Primary/secondary actions: brand crimson replaces the legacy navy blues. */
.primary-button { background: var(--brand); border-color: var(--brand); color: #fff; }
.primary-button:hover { background: var(--brand-deep); border-color: var(--brand-deep); }
.secondary-button { background: var(--card); border: 1px solid var(--border-c); color: var(--ink-strong); }
.outline-blue, .text-reset { border-color: var(--border-c); color: var(--brand); background: var(--card); }
.text-reset { border-color: transparent; }
.app a, .link-button { color: var(--brand); }
.sidebar a { color: rgba(255, 255, 255, .85); }
/* Focus stays semantic info-blue everywhere (overrides the orange outline
   from the refinement layer, which has higher specificity on buttons). */
.segmented-control button:focus-visible, select:focus-visible, button:focus-visible { outline-color: var(--info-c); }

/* ---- Sticky filter bar with status cluster ---- */
.filters { position: sticky; top: 0; z-index: 40; border-radius: 0 0 12px 12px; align-items: center; }
.filter-status { display: flex; align-items: center; gap: 12px; margin-left: auto; flex-wrap: wrap; }
.filter-chip { display: inline-block; background: var(--neutral-soft); color: var(--ink-strong); border: 1px solid var(--border-c); border-radius: 999px; padding: 4px 10px; font-size: var(--fs-1); font-weight: 600; margin-right: 4px; }
.confidence-strip { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-1); font-weight: 600; color: var(--ink-muted); background: var(--card); border: 1px solid var(--border-c); border-radius: 999px; padding: 4px 10px; }
.data-asof { font-size: var(--fs-1); color: var(--ink-muted); white-space: nowrap; }

/* ---- KPI hero ---- */
body[data-page="executive"] .kpi-hero { grid-template-columns: repeat(4, minmax(0, 1fr)); }
body[data-page="executive"] .kpi-card { border-top: 1px solid var(--border-c) !important; border-left: 3px solid var(--neutral-c); border-radius: 10px; min-height: 132px; cursor: pointer; transition: box-shadow .15s ease; }
body[data-page="executive"] .kpi-card:hover, body[data-page="executive"] .kpi-card:focus-visible { box-shadow: 0 2px 6px rgba(28,27,23,.08), 0 8px 22px rgba(28,27,23,.09); }
.kpi-card.kpi-state-critical { border-left-color: var(--crit); }
.kpi-card.kpi-state-warning { border-left-color: var(--warn); }
.kpi-card.kpi-state-success { border-left-color: var(--ok); }
.kpi-card.kpi-state-info { border-left-color: var(--info-c); }
/* The legacy .kpi-card is a 72px+1fr icon grid; hero cards have no icon, so
   they revert to a single full-width column. min-width:0 lets labels use the
   whole card instead of wrapping one word per line. */
.kpi-hero .kpi-card { display: flex; grid-template-columns: none; }
.kpi-hero .kpi-main { display: flex; flex-direction: column; gap: 3px; width: 100%; min-width: 0; flex: 1; }
.kpi-hero .kpi-value { font-size: var(--fs-6); line-height: 1.05; font-weight: 700; color: var(--ink-strong); }
.kpi-hero .kpi-label { font-size: var(--fs-2); font-weight: 600; color: var(--ink-strong); text-transform: none; letter-spacing: 0; }
.kpi-hero .kpi-trend { font-size: var(--fs-1); }
.kpi-meta { display: flex; align-items: center; gap: 10px; }
.kpi-delta { font-size: var(--fs-1); font-weight: 700; }
.kpi-delta-good { color: var(--ok); }
.kpi-delta-bad { color: var(--crit); }
.kpi-delta-flat, .kpi-delta-none { color: var(--ink-muted); font-weight: 500; }
.sparkline { color: var(--neutral-c); width: 96px; height: 26px; }
/* Single-snapshot context bar: shown until /exec-trend has >=2 load_dates,
   then kpiHero swaps in the delta + sparkline above. */
.kpi-context { flex-direction: column; align-items: stretch; gap: 6px; margin-top: 1px; }
.kpi-context-track { height: 6px; border-radius: 999px; background: var(--neutral-soft); overflow: hidden; }
.kpi-context-fill { height: 100%; border-radius: 999px; background: var(--neutral-c); }
.kpi-context-caption { font-size: var(--fs-1); color: var(--ink-muted); line-height: 1.25; }
.kpi-state-success .kpi-context-fill { background: var(--ok); }
.kpi-state-warning .kpi-context-fill { background: var(--warn); }
.kpi-state-critical .kpi-context-fill { background: var(--crit); }
.kpi-state-info .kpi-context-fill { background: var(--info-c); }
@media (prefers-reduced-motion: no-preference) { .kpi-context-fill { transition: width .35s ease; } }

/* ---- Bars: solid semantic/neutral, no gradients ---- */
.hbar-fill { background: var(--info-c) !important; border-radius: 3px; }
.hbar-fill-muted { background: var(--neutral-c) !important; opacity: .55; }
.hbar-muted span, .hbar-muted strong { color: var(--ink-muted); }
.hbar { align-items: center; }
.hbar strong { text-align: right; }
[data-panel="At-Risk Students Without Advising Contact"] .hbar-fill { background: var(--warn) !important; }
[data-panel="At-Risk Students Without Advising Contact"] .hbar { grid-template-columns: 148px 1fr 96px; }
[data-panel="Top Advising Topics"] .hbar { grid-template-columns: 190px 1fr 56px; }
.bar-value { font-size: 11px; fill: var(--ink-strong); }
.axis-text { font-size: 10.5px; fill: var(--ink-muted); }
.dev-value { font-size: 11.5px; font-weight: 600; fill: var(--ink-strong); }
.dev-label { font-weight: 600; }

/* ---- Capture cards: flat, token-bound ---- */
.faculty-capture-card::before { background: var(--border-c); height: 1px; }
.faculty-capture-card::after { content: none; }
.faculty-capture-card { border-radius: 10px; }
.faculty-capture-card .status-pill { border-radius: 999px; padding: 3px 10px; font-style: normal; font-weight: 700; font-size: 11px; }
.faculty-capture-metrics span { text-align: right; }
.faculty-capture-metrics strong { display: block; text-align: right; }
.seg-pattern { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.45) 0 3px, transparent 3px 7px); }
.capture-legend-item span { border-radius: 3px; }

/* ---- Assessment Evidence Readiness by Faculty ---- */
.readiness-alert {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid #efc8c8;
  border-radius: 10px;
  padding: 12px 14px;
  background: linear-gradient(90deg, #fff3f3 0%, #fff8f0 100%);
}
.readiness-alert-main,
.readiness-alert-risk {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.readiness-alert-risk {
  border-left: 1px solid #efd6d6;
  padding-left: 14px;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.readiness-alert strong {
  color: var(--crit);
  font-size: var(--fs-3);
  line-height: 1.2;
}
.readiness-alert span {
  color: var(--ink-muted);
  font-size: var(--fs-1);
  line-height: 1.35;
}
.readiness-alert-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--crit-soft);
  color: var(--crit);
  flex: 0 0 auto;
}
.readiness-alert svg { width: 17px; height: 17px; }
.readiness-action-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid var(--brand);
  border-radius: 8px;
  padding: 0 14px;
  background: #fff;
  color: var(--brand);
  font: inherit;
  font-size: var(--fs-1);
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.readiness-action-button:hover { background: var(--brand-wash); }
.readiness-legend-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr);
  gap: 12px;
  border: 1px solid var(--border-c);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
}
.readiness-legend-strip > div {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--ink-muted);
  font-size: var(--fs-1);
}
.readiness-legend-strip > div + div {
  border-left: 1px solid var(--border-c);
  padding-left: 12px;
}
.readiness-legend-strip strong {
  color: var(--ink-strong);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.readiness-legend-strip span {
  color: var(--ink-muted);
  font-size: var(--fs-1);
}
.legend-swatch {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  margin-left: 3px;
}
.readiness-rank {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-right: 7px;
  border-radius: 999px;
  background: var(--neutral-soft);
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 900;
}
.readiness-card.attention .readiness-rank { background: var(--crit); color: #fff; }
.readiness-card.watch .readiness-rank { background: var(--warn); color: #fff; }
.readiness-card.healthy .readiness-rank { background: var(--ok); color: #fff; }
.bar-caption {
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}
/* Readiness is the primary visual: a two-tone bar (on track / behind expected). */
.readiness-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--neutral-soft); }
.readiness-on { height: 100%; background: var(--ok); }
.readiness-behind { height: 100%; background: var(--warn); }
.readiness-bar.readiness-empty { background: repeating-linear-gradient(135deg, var(--neutral-soft) 0 6px, #f4f5f7 6px 12px); }
/* Capture maturity is supporting context: a thinner, quieter strip with a caption. */
.capture-legend-label { font-size: 11px; font-weight: 700; color: var(--ink-muted); margin-right: 2px; }
.readiness-card .capture-maturity { display: grid; gap: 6px; }
.readiness-card .mini-stack { height: 8px; opacity: .92; }
.readiness-card .faculty-capture-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.readiness-card .faculty-capture-metrics span {
  text-align: center;
}
.readiness-card .faculty-capture-metrics strong {
  text-align: center;
}
.readiness-action-strip {
  display: grid;
  grid-template-columns: auto minmax(0, max-content) minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  border-radius: 8px;
  padding: 9px;
  font-size: 11px;
  line-height: 1.2;
}
.readiness-action-strip svg {
  width: 14px;
  height: 14px;
}
.readiness-action-strip strong {
  color: var(--ink-strong);
  white-space: nowrap;
}
.readiness-action-strip span {
  color: var(--ink-muted);
  min-width: 0;
}
.readiness-action-strip.critical,
.readiness-action-strip.attention {
  background: var(--crit-soft);
  color: var(--crit);
}
.readiness-action-strip.watch {
  background: var(--warn-soft);
  color: var(--warn);
}
.readiness-action-strip.healthy {
  background: var(--ok-soft);
  color: var(--ok);
}
.readiness-summary-row {
  display: grid;
  grid-template-columns: 1.1fr repeat(5, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--border-c);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-soft);
}
.readiness-summary-row > div {
  display: grid;
  gap: 3px;
  min-height: 64px;
  padding: 13px 14px;
  border-left: 1px solid var(--border-c);
}
.readiness-summary-row > div:first-child { border-left: 0; }
.readiness-summary-row strong {
  color: var(--ink-strong);
  font-size: var(--fs-4);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.readiness-summary-row span {
  color: var(--ink-muted);
  font-size: var(--fs-1);
  line-height: 1.25;
}
.readiness-summary-title {
  text-transform: uppercase;
}
.readiness-summary-title strong {
  font-size: var(--fs-1);
  line-height: 1.2;
}
/* The data-driven executive sentence: quiet left-accented note, neutral (not
   brand red) accent, no heavy background. Specific enough to beat the generic
   .capture-footnotes p tint above. */
.capture-footnotes p.insight-note { background: none; border-left: 3px solid var(--neutral-c); color: var(--ink-strong); font-weight: 600; }
@media (max-width: 1390px) {
  .readiness-summary-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .readiness-summary-row > div { border-left: 0; border-top: 1px solid var(--border-c); }
  .readiness-summary-row > div:nth-child(-n+3) { border-top: 0; }
}
@media (max-width: 900px) {
  .readiness-alert,
  .readiness-legend-strip,
  .readiness-summary-row { grid-template-columns: 1fr; }
  .readiness-alert-risk,
  .readiness-legend-strip > div + div {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--border-c);
    padding-top: 10px;
  }
  .readiness-summary-row > div { border-top: 1px solid var(--border-c); }
  .readiness-summary-row > div:first-child { border-top: 0; }
}

/* ---- Adjust-assumptions disclosure (scenario controls, collapsed by default) ---- */
.assumptions-disclosure {
  border: 1px solid var(--border-c);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  margin: 4px 0 16px;
  padding: 0 14px;
}
.assumptions-disclosure > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  cursor: pointer;
  list-style: none;
  color: var(--ink-strong);
  font-weight: 700;
  font-size: var(--fs-2);
}
.assumptions-disclosure > summary::-webkit-details-marker { display: none; }
.assumptions-disclosure > summary::before {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--ink-muted);
  border-bottom: 2px solid var(--ink-muted);
  transform: rotate(-45deg);
  transition: transform .15s ease;
  flex: 0 0 auto;
}
.assumptions-disclosure[open] > summary::before { transform: rotate(45deg); }
.assumptions-disclosure > summary .muted { color: var(--ink-muted); font-weight: 500; font-size: var(--fs-1); }
.assumptions-disclosure[open] { padding-bottom: 14px; }
.assumptions-disclosure .scenario-lab { margin-top: 4px; }
@media (prefers-reduced-motion: reduce) {
  .assumptions-disclosure > summary::before { transition: none; }
}

/* ---- Active-scenario chip on a hero KPI card ---- */
.kpi-scenario-chip {
  display: inline-block;
  margin-left: 8px;
  vertical-align: middle;
  border-radius: 999px;
  padding: 2px 8px;
  background: var(--warn-soft);
  color: var(--warn);
  border: 1px solid #ecd9b8;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .02em;
}
.kpi-card.kpi-scenario { border-left-color: var(--warn); }

.capture-context-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid var(--border-c);
  border-radius: 10px;
  padding: 10px;
  background: #fbfaf7;
}
.capture-context-strip span {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--ink-muted);
  font-size: var(--fs-1);
  line-height: 1.3;
}
.capture-context-strip strong {
  color: var(--ink-strong);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ---- Executive scenario controls ---- */
.scenario-inline-control {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  min-width: min(100%, 520px);
}
.capture-toolbar .segmented-control {
  justify-self: end;
  width: auto;
  grid-auto-flow: column;
  grid-template-columns: none;
}
.capture-toolbar .segmented-control button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  width: auto;
  text-align: center;
}
.scenario-inline-control label,
.scenario-select-label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: var(--fs-1);
  font-weight: 600;
  color: var(--ink-muted);
}
.scenario-inline-control select,
.scenario-inline-control input[type="date"],
.scenario-select-label input[type="date"],
.scenario-select-label select {
  min-height: 38px;
  border: 1px solid var(--border-c);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink-strong);
  padding: 0 10px;
  font: inherit;
}
.scenario-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid var(--border-c);
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--ink-muted);
  background: var(--neutral-soft);
  font-size: var(--fs-1);
  font-weight: 700;
}
.scenario-chip.active { background: var(--warn-soft); color: var(--warn); border-color: #ecd9b8; }
.scenario-lab {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.scenario-card {
  border: 1px solid var(--border-c);
  border-radius: 10px;
  background: #fff;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.scenario-card.scenario-active { border-color: #e3c27f; background: #fffaf0; }
.scenario-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.scenario-card-head strong { display: block; color: var(--ink-strong); font-size: var(--fs-2); }
.scenario-card-head span { display: block; color: var(--ink-muted); font-size: var(--fs-1); margin-top: 3px; }
.scenario-range {
  display: grid;
  gap: 7px;
  color: var(--ink-muted);
  font-size: var(--fs-1);
  font-weight: 600;
}
.scenario-range span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.scenario-range strong { color: var(--ink-strong); font-size: var(--fs-2); }
.scenario-range input[type="range"] { width: 100%; accent-color: var(--ink-strong); }
.scenario-range.disabled { opacity: .58; }
.scenario-threshold-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.scenario-result {
  border-top: 1px solid var(--border-c);
  padding-top: 10px;
  display: grid;
  gap: 3px;
}
.scenario-result strong { color: var(--ink-strong); font-size: var(--fs-4); line-height: 1; }
.scenario-result span { color: var(--ink-muted); font-size: var(--fs-1); }
@media (max-width: 1199px) {
  .scenario-lab { grid-template-columns: 1fr; }
  .scenario-threshold-grid { grid-template-columns: 1fr; }
  .capture-toolbar,
  .capture-panel.span-12 .capture-toolbar { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .capture-context-strip { grid-template-columns: 1fr; }
}

/* ---- Bullet bars (captured vs expected) ---- */
.bullet { display: grid; grid-template-columns: minmax(70px, 1fr) auto; align-items: center; gap: 8px; min-width: 130px; }
.bullet-track { position: relative; height: 10px; border-radius: 5px; background: var(--neutral-soft); overflow: hidden; }
.bullet-expected { position: absolute; inset: 0 auto 0 0; background: #d9dee6; }
.bullet-captured { position: absolute; inset: 2px auto 2px 0; background: var(--info-c); border-radius: 3px; min-width: 2px; }
.bullet-label { font-size: var(--fs-1); color: var(--ink-muted); white-space: nowrap; }

/* ---- Tables ---- */
.table-wrap { max-height: 420px; overflow: auto; }
.table-wrap thead th { position: sticky; top: 0; background: var(--card); z-index: 2; box-shadow: inset 0 -1px 0 var(--border-c); }
tbody tr:nth-child(even) { background: #fbfbf9; }
td, th { border-color: var(--border-c); }
.table-note { margin: 8px 2px 0; }
.missing-value { color: var(--ink-muted); }

/* ---- Data-note chips & status dots ---- */
.data-note { display: inline-flex; align-items: center; gap: 5px; background: var(--warn-soft); color: var(--warn); border: 1px solid #ecd9b8; border-radius: 999px; padding: 3px 10px; font-size: 11px; font-weight: 700; cursor: help; white-space: nowrap; }
.data-note svg { width: 12px; height: 12px; }
.panel-tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.panel-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.panel-export { background: none; border: 1px solid var(--border-c); border-radius: 8px; width: 28px; height: 28px; display: grid; place-items: center; color: var(--ink-muted); cursor: pointer; }
.panel-export:hover { color: var(--ink-strong); border-color: var(--neutral-c); }
.panel-export svg { width: 14px; height: 14px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.source-status { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.source-status .status-text { font-size: 11px; font-weight: 700; color: var(--ink-strong); }
.status-fresh { font-size: 10.5px; color: var(--ink-muted); }
/* Dim only the swatch for zero-value rows; keep label text at AA contrast. */
.legend-zero .legend-dot { opacity: .4; }
.legend-zero > span, .legend-zero strong { color: var(--ink-muted); }
.legend-share { color: var(--ink-muted); font-weight: 500; }

/* ---- Empty / error / skeleton states ---- */
.panel-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 12px; text-align: center; color: var(--ink-muted); }
.panel-empty svg { width: 26px; height: 26px; opacity: .6; }
.panel-empty p { font-weight: 600; color: var(--ink-strong); margin: 0; }
.retry-button { margin-top: 6px; border: 1px solid var(--border-c); background: var(--card); border-radius: 8px; padding: 8px 18px; font-weight: 600; cursor: pointer; min-height: 36px; }
.skeleton { background: linear-gradient(90deg, #efeeea 25%, #f7f6f2 50%, #efeeea 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 6px; }
.skeleton-card { pointer-events: none; }
.skeleton-value { height: 34px; width: 60%; margin-bottom: 10px; }
.skeleton-line { height: 12px; width: 85%; margin-bottom: 6px; }
.skeleton-line.short { width: 55%; }
.skeleton-title { height: 16px; width: 40%; margin-bottom: 14px; }
.skeleton-block { height: 120px; width: 100%; }
.skeleton-block.tall { height: 200px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- Overflow containment: no horizontal scrollbar may ever paint over
   content. The body grid's fractional width (sidebar px + 1fr) can overflow
   by a few px under OS display scaling, which floats an overlay scrollbar
   pill over the card rows on real displays. ---- */
html, body { overflow-x: clip; }
.faculty-capture-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1199px) {
  .faculty-capture-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---- Controls: neutral states, never alarm colours ---- */
.segmented-control button { background: var(--card); color: var(--ink-strong); border-color: var(--border-c); }
.segmented-control button.active { background: var(--ink-strong); color: #fff; border-color: var(--ink-strong); box-shadow: none; }
.icon-button, .plain-icon { color: var(--ink-muted); }

/* ---- Accessibility ---- */
:focus-visible { outline: 2px solid var(--info-c); outline-offset: 2px; border-radius: 4px; }
.nav button:focus-visible { outline-color: #fff; }
.segmented-control button { min-height: 44px; min-width: 44px; }
.filters select, .filters input { min-height: 44px; }
@media (prefers-reduced-motion: reduce) {
  .skeleton { animation: none; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ============================================================
   ROLE-AWARE LAYER
   Chrome (sidebar, scope chip, primary/export) keeps SPU brand red.
   ALL data/status colour comes from the semantic tokens only.
   Appended last so it wins the cascade. See app.js role renderer.
   ============================================================ */

/* Role pages reuse the shared shell but are FULLY RESPONSIVE — they override
   the fixed legacy min-widths (1360/1536/1568px) that clip narrow viewports.
   minmax(0, 1fr) on the content column is the key fix: a plain 1fr refuses to
   shrink below its content and forces horizontal overflow. */
body[data-page^="role-"] { grid-template-columns: 232px minmax(0, 1fr); min-width: 0; }
body[data-page^="role-"] .app { min-width: 0; overflow-x: hidden; }
body[data-page^="role-"] .topbar { flex-wrap: wrap; row-gap: 10px; }
body[data-page^="role-"] .top-actions { flex-wrap: wrap; justify-content: flex-end; }
body[data-page^="role-"] .filters { flex-wrap: wrap; }
body[data-page^="role-"] .table-wrap { max-width: 100%; }
.error-actions { display: flex; gap: 10px; margin-top: 14px; }

@media (max-width: 1280px) {
  body[data-page^="role-"] { grid-template-columns: 212px minmax(0, 1fr); }
  .kpi-metric-grid { grid-template-columns: repeat(auto-fit, minmax(212px, 1fr)); }
}
@media (max-width: 1024px) {
  body[data-page^="role-"] { grid-template-columns: 184px minmax(0, 1fr); }
  /* Stack every panel full-width so nothing is squeezed off-screen. */
  body[data-page^="role-"] .dashboard-grid > .panel { grid-column: 1 / -1; }
  .kpi-metric-grid { grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); }
}
@media (max-width: 760px) {
  body[data-page^="role-"] { grid-template-columns: 1fr; }
  body[data-page^="role-"] .sidebar { position: static; height: auto; min-height: 0; }
  body[data-page^="role-"] .nav { display: flex; flex-wrap: wrap; gap: 6px; }
  body[data-page^="role-"] .nav-button { flex: 1 1 auto; }
  .kpi-metric-grid { grid-template-columns: 1fr; }
}

/* ---- "Not live" data-mode banner: impossible to miss, governance not data ---- */
.data-mode-banner {
  display: flex; align-items: center; gap: 12px;
  background: var(--warn-soft); border: 1px solid #f0d8b0; border-left: 4px solid var(--warn);
  border-radius: 10px; padding: 12px 16px; margin-bottom: 16px;
}
.data-mode-banner svg { width: 20px; height: 20px; color: var(--warn); flex: none; }
.data-mode-banner strong { display: block; font-size: var(--fs-2); color: var(--warn); letter-spacing: .03em; }
.data-mode-banner span { font-size: var(--fs-1); color: var(--ink-strong); }

/* ---- Role scope indicator chip (identity/account context — brand tint allowed) ---- */
.scope-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--brand-wash); color: var(--brand-deep);
  border: 1px solid #f3d6d9; border-radius: 999px; padding: 4px 12px;
  font-size: var(--fs-1); font-weight: 600;
}
.scope-chip svg { width: 14px; height: 14px; }
.scope-chip strong { font-weight: 700; }

/* ---- Decision-oriented KPI tiles (owner + action on every metric) ---- */
.kpi-metric-grid { grid-template-columns: repeat(auto-fit, minmax(236px, 1fr)); }
.metric-card {
  display: flex; gap: 12px; align-items: flex-start;
  border-left: 3px solid var(--neutral-c); border-radius: 10px;
  padding: 14px 16px; min-height: 132px;
}
.metric-card .kpi-icon { flex: none; }
.metric-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.metric-card .kpi-label {
  font-size: var(--fs-2); font-weight: 600; color: var(--ink-strong);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; text-transform: none; letter-spacing: 0;
}
.metric-card .kpi-value { font-size: var(--fs-5); line-height: 1.05; font-weight: 700; color: var(--ink-strong); }
.metric-card .kpi-trend { font-size: var(--fs-1); }
.metric-card .kpi-trend.down { color: var(--crit); }
.metric-card .kpi-trend.up { color: var(--ok); }
.metric-card .kpi-trend.warn-text { color: var(--warn); }
.metric-note { font-size: var(--fs-1); color: var(--ink-muted); line-height: 1.3; margin: 2px 0 0; }
.metric-owner-action {
  display: flex; flex-direction: column; gap: 4px;
  margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border-c);
}
.owner-chip {
  display: inline-flex; align-items: center; gap: 4px; align-self: flex-start;
  font-size: var(--fs-1); font-weight: 600; color: var(--ink-strong);
  background: var(--neutral-soft); border-radius: 999px; padding: 2px 8px;
}
.owner-chip svg, .action-text svg { width: 13px; height: 13px; flex: none; }
.action-text { font-size: var(--fs-1); color: var(--ink-muted); display: flex; align-items: flex-start; gap: 4px; line-height: 1.3; }
.action-text em { font-style: normal; font-weight: 600; color: var(--ink-strong); }

/* ---- Source-status chips (provenance, not data meaning) ---- */
.source-chip {
  display: inline-flex; align-items: center; font-size: 10px; font-weight: 700;
  letter-spacing: .04em; border-radius: 4px; padding: 1px 6px; text-transform: uppercase; white-space: nowrap;
}
.source-sample, .source-static { background: var(--neutral-soft); color: var(--ink-strong); }
.source-pending, .source-stale, .source-not_modelled { background: var(--warn-soft); color: var(--warn); }
.source-mixed { background: var(--info-soft); color: var(--info-c); }
.source-live, .source-certified { background: var(--ok-soft); color: var(--ok); }

/* ---- Narrative + caveats ---- */
.narrative-block { padding: 2px 0; }
.narrative-heading { font-weight: 600; color: var(--ink-strong); font-size: var(--fs-2); margin: 0 0 8px; }
.narrative-list, .caveat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.narrative-item, .caveat-item { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-2); color: var(--ink-strong); line-height: 1.4; }
.sev-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: none; }
.caveat-strip {
  margin-top: 16px; background: var(--card); border: 1px solid var(--border-c);
  border-left: 3px solid var(--info-c); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow-soft);
}
.caveat-head { display: flex; align-items: center; gap: 6px; font-size: var(--fs-2); color: var(--ink-strong); margin-bottom: 10px; }
.caveat-head svg { width: 15px; height: 15px; color: var(--info-c); }
.caveat-item strong { font-weight: 700; }

/* ---- Grouped-bar legend + table niceties ---- */
.grouped-legend { display: flex; gap: 16px; justify-content: center; margin-top: 4px; }
.grouped-legend .gl { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-1); color: var(--ink-muted); }
.grouped-legend .gl i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.muted-cell { color: var(--ink-muted); }
.worklist-panel table { font-size: var(--fs-2); }
.worklist-panel td .badge { white-space: nowrap; }

/* ============================================================
   SPU ROLE DASHBOARD REFERENCE LAYER
   Scoped to authenticated role views only. Mirrors the red/white Dean
   reference while keeping data colours semantic and non-brand.
   ============================================================ */
body[data-page^="role-"] {
  grid-template-columns: 224px minmax(0, 1fr);
  background: #f5f6fa;
  color: #1d2638;
  font-size: 13px;
}

body[data-page^="role-"] .sidebar {
  min-height: calc(100vh - 14px);
  margin: 7px 0 7px 7px;
  padding: 28px 18px 22px;
  overflow: hidden;
  color: #ffffff;
  border: 0;
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, .12) 0, rgba(255, 255, 255, 0) 34%),
    linear-gradient(180deg, #c9182e 0%, #b41224 42%, #9f0d1b 100%);
  box-shadow: 0 10px 22px rgba(90, 10, 18, .12);
}

body[data-page^="role-"] .brand {
  min-height: 116px;
  padding: 0 0 19px;
  margin: 0 0 14px;
  color: #ffffff;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, .18);
}

body[data-page^="role-"] .brand-title {
  font-family: var(--font-body);
  font-size: 31px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: 0;
}

body[data-page^="role-"] .brand-subtitle {
  max-width: 164px;
  margin-top: 13px;
  color: rgba(255, 255, 255, .96);
  font-size: 12.5px;
  line-height: 1.28;
  font-weight: 800;
}

body[data-page^="role-"] .nav {
  gap: 3px;
  margin: 0;
  padding: 0;
}

body[data-page^="role-"] .nav-button {
  position: relative;
  min-height: 43px;
  gap: 10px;
  border-radius: 0;
  padding: 9px 12px;
  color: rgba(255, 255, 255, .93);
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.22;
}

body[data-page^="role-"] .nav-button:hover {
  background: rgba(255, 255, 255, .08);
  color: #ffffff;
}

body[data-page^="role-"] .nav-button.active,
body[data-page^="role-"] .nav .active {
  background: #ffffff;
  color: #a80f1e;
  border-radius: 10px;
  box-shadow: 0 6px 14px rgba(74, 5, 13, .12);
}

body[data-page^="role-"] .nav-icon {
  width: 19px;
  height: 19px;
  border-radius: 0;
  color: inherit;
  font-size: 15px;
}

body[data-page^="role-"] .nav-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

body[data-page^="role-"] .sidebar-footer {
  gap: 0;
  margin-top: auto;
  padding: 14px 0 0;
  border-top: 1px solid rgba(255, 255, 255, .18);
}

body[data-page^="role-"] .access-panel,
body[data-page^="role-"] .sidebar-user.compact,
body[data-page^="role-"] .sign-out.visible {
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #1d2638;
  box-shadow: none;
}

body[data-page^="role-"] .access-panel {
  display: none;
}

body[data-page^="role-"] .access-panel svg {
  color: #ffffff;
}

body[data-page^="role-"] .access-panel span,
body[data-page^="role-"] .sidebar-user span {
  color: rgba(255, 255, 255, .82);
  opacity: 1;
}

body[data-page^="role-"] .sidebar-user.compact {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 0 6px;
  background: transparent;
}

body[data-page^="role-"] .sidebar-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: #ffffff;
  color: #a80f1e;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .02em;
}

body[data-page^="role-"] .sidebar-user.compact strong {
  display: block;
  color: #ffffff;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.15;
}

body[data-page^="role-"] .sidebar-user.compact span:not(.sidebar-avatar) {
  font-size: 11px;
  line-height: 1.2;
}

body[data-page^="role-"] .sign-out.visible {
  display: none;
}

body[data-page^="role-"] .sign-out.visible:hover {
  background: rgba(255, 255, 255, .08);
  color: #ffffff;
}

body[data-page^="role-"] .app {
  padding: 24px 28px 24px;
  background: #f5f6fa;
}

body[data-page^="role-"] .topbar {
  min-height: 50px;
  align-items: center;
  margin-bottom: 12px;
}

body[data-page^="role-"] .topbar h1 {
  font-family: var(--font-body);
  font-size: 25px;
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: 0;
}

body[data-page^="role-"] #page-subtitle {
  margin-top: 3px;
  color: #667085;
  font-size: 13px;
}

body[data-page^="role-"] .top-actions {
  gap: 9px;
  min-height: 36px;
  color: #667085;
  font-size: 12px;
}

body[data-page^="role-"] #freshness {
  font-size: 12px;
  color: #667085;
}

body[data-page^="role-"] .icon-button {
  min-width: 34px;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  border-color: #d9dee8;
  background: #ffffff;
  color: #53617a;
}

body[data-page^="role-"] .top-actions svg,
body[data-page^="role-"] .export-button svg {
  width: 17px;
  height: 17px;
}

body[data-page^="role-"] .export-button {
  min-height: 34px;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 7px;
  background: #c8102e;
  border-color: #c8102e;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

body[data-page^="role-"] .export-button:hover {
  background: #a90f24;
  border-color: #a90f24;
}

body[data-page^="role-"] .user-pill {
  width: 34px;
  height: 34px;
  background: #c8102e;
  font-size: 12px;
}

body[data-page^="role-"] .filters {
  position: static;
  z-index: auto;
  display: grid;
  grid-template-columns: 260px minmax(280px, 1fr);
  gap: 12px;
  align-items: stretch;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-page^="role-"] .role-filter-card,
body[data-page^="role-"] .role-scope-card {
  min-width: 0;
  min-height: 58px;
  border: 1px solid #e3e7ef;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 18px rgba(16, 24, 40, .035);
}

body[data-page^="role-"] .role-filter-card {
  grid-column: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 10px 12px;
}

body[data-page^="role-"] .role-filter-card .field label {
  margin-bottom: 5px;
  color: #344054;
  font-size: 11px;
  font-weight: 800;
}

body[data-page^="role-"] .role-filter-card .field select,
body[data-page^="role-"] .role-filter-card .field input {
  min-height: 30px;
  padding: 5px 2px;
  border: 0;
  background: transparent;
  color: #1d2638;
  font-size: 13px;
  font-weight: 700;
}

body[data-page^="role-"] .role-scope-card,
body[data-page="hod-department"] .role-scope-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 20px auto;
  gap: 10px;
  align-items: center;
  margin-left: 0;
  padding: 10px 14px;
}

body[data-page^="role-"] .role-scope-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #edf3fb;
  color: #44619d;
}

body[data-page^="role-"] .role-scope-icon svg,
body[data-page^="role-"] .role-scope-chevron svg {
  width: 17px;
  height: 17px;
}

body[data-page^="role-"] .role-scope-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

body[data-page^="role-"] .role-scope-copy > span {
  color: #667085;
  font-size: 11px;
  font-weight: 800;
}

body[data-page^="role-"] .role-scope-copy strong {
  overflow: hidden;
  color: #1d2638;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page^="role-"] .role-scope-chevron {
  display: grid;
  place-items: center;
  color: #667085;
}

body[data-page^="role-"] .kpi-metric-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

body[data-page^="role-"] .triage-section {
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid #e3e7ef;
  border-left: 3px solid #c8102e;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 18px rgba(16, 24, 40, .03);
}

body[data-page^="role-"] .triage-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px 9px;
  border-bottom: 1px solid #edf0f5;
}

body[data-page^="role-"] .triage-header h2 {
  margin: 0;
  color: #111827;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.2;
}

body[data-page^="role-"] .triage-header p {
  margin: 3px 0 0;
  color: #667085;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
}

body[data-page^="role-"] .triage-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body[data-page^="role-"] .triage-item {
  display: grid;
  align-content: start;
  gap: 7px;
  min-height: 124px;
  padding: 10px 12px 11px;
  border-right: 1px solid #edf0f5;
  background: #ffffff;
}

body[data-page^="role-"] .triage-item:last-child {
  border-right: 0;
}

body[data-page^="role-"] .triage-rank {
  color: #98a2b3;
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
}

body[data-page^="role-"] .triage-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

body[data-page^="role-"] .triage-state {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  align-items: center;
  border-radius: 50%;
}

body[data-page^="role-"] .triage-state svg {
  width: 14px;
  height: 14px;
}

body[data-page^="role-"] .triage-critical .triage-state {
  background: #f9e9ea;
  color: #9f1d22;
}

body[data-page^="role-"] .triage-warning .triage-state {
  background: #fdf2e3;
  color: #b45309;
}

body[data-page^="role-"] .triage-success .triage-state {
  background: #e7f3ea;
  color: #1c7c3c;
}

body[data-page^="role-"] .triage-info .triage-state,
body[data-page^="role-"] .triage-neutral .triage-state {
  background: #ecf0f7;
  color: #44619d;
}

body[data-page^="role-"] .triage-count {
  color: #111827;
  font-size: 25px;
  font-weight: 850;
  line-height: .95;
}

body[data-page^="role-"] .triage-copy {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: end;
}

body[data-page^="role-"] .triage-copy h2 {
  margin: 0;
  color: #1d2638;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
}

body[data-page^="role-"] .triage-copy p {
  margin: 4px 0 0;
  color: #667085;
  font-size: 11px;
  line-height: 1.3;
}

body[data-page^="role-"] .triage-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 8px;
  color: #344054;
  font-size: 10px;
  line-height: 1.25;
}

body[data-page^="role-"] .triage-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

body[data-page^="role-"] .triage-meta svg {
  width: 12px;
  height: 12px;
  color: #667085;
}

body[data-page^="role-"] .triage-action {
  align-self: end;
  min-height: 28px;
  border: 1px solid #d7dce5;
  border-radius: 7px;
  padding: 0 10px;
  background: #ffffff;
  color: #1d2638;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

body[data-page^="role-"] .triage-critical .triage-action {
  border-color: #c8102e;
  background: #c8102e;
  color: #ffffff;
}

body[data-page^="role-"] .triage-warning .triage-action {
  border-color: #b45309;
  color: #8a3f06;
}

body[data-page^="role-"] .triage-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(16, 24, 40, .10);
}

body[data-role-tab="faculty-overview"] .kpi-metric-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

body[data-page^="role-"] .metric-card {
  min-height: 122px;
  gap: 11px;
  padding: 12px;
  border: 1px solid #e3e7ef;
  border-left: 1px solid #e3e7ef;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 18px rgba(16, 24, 40, .03);
}

body[data-page^="role-"] .metric-card .kpi-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

body[data-page^="role-"] .metric-card .kpi-icon svg {
  width: 18px;
  height: 18px;
}

body[data-page^="role-"] .metric-card.kpi-state-critical .kpi-icon {
  background: #fee8e8;
  color: #c8102e;
}

body[data-page^="role-"] .metric-card.kpi-state-warning .kpi-icon {
  background: #fff2d8;
  color: #b45309;
}

body[data-page^="role-"] .metric-card.kpi-state-success .kpi-icon {
  background: #e5f4ea;
  color: #1c7c3c;
}

body[data-page^="role-"] .metric-card.kpi-state-info .kpi-icon,
body[data-page^="role-"] .metric-card.kpi-state-neutral .kpi-icon {
  background: #edf0fb;
  color: #4a5f98;
}

body[data-page^="role-"] .metric-card.metric-zero {
  background: #fafbfc;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
}

body[data-page^="role-"] .metric-card.metric-zero .kpi-icon {
  background: #eef1f4;
  color: #667085;
}

body[data-page^="role-"] .metric-card.metric-zero .kpi-value {
  color: #475467;
}

body[data-page^="role-"] .metric-card.metric-zero .metric-note,
body[data-page^="role-"] .metric-card.metric-zero .source-chip {
  color: #667085;
}

body[data-page^="role-"] .metric-body {
  min-height: 0;
  gap: 4px;
}

body[data-page^="role-"] .metric-card .kpi-label {
  min-height: 0;
  color: #344054;
  font-size: 12px;
  line-height: 1.24;
  font-weight: 800;
}

body[data-page^="role-"] .metric-card .kpi-value {
  margin-top: 1px;
  color: #111827;
  font-size: 27px;
  line-height: 1;
  font-weight: 800;
}

body[data-page^="role-"] .metric-card .kpi-trend {
  font-size: 11px;
  font-weight: 800;
}

body[data-page^="role-"] .metric-note {
  color: #667085;
  font-size: 11px;
  line-height: 1.25;
}

body[data-page^="role-"] .metric-info {
  display: inline-grid;
  width: 17px;
  height: 17px;
  margin-left: 4px;
  place-items: center;
  vertical-align: -3px;
  color: #667085;
}

body[data-page^="role-"] .metric-info svg {
  width: 13px;
  height: 13px;
}

body[data-page^="role-"] .metric-context {
  display: grid;
  gap: 4px;
  margin-top: 5px;
  padding-top: 7px;
  border-top: 1px solid #edf0f5;
  color: #4b5565;
  font-size: 10px;
  line-height: 1.25;
}

body[data-page^="role-"] .metric-context span {
  display: block;
}

body[data-page^="role-"] .metric-context b {
  display: block;
  margin-bottom: 1px;
  color: #667085;
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}

body[data-role-tab="faculty-overview"] .metric-owner-action {
  display: none;
}

.metric-mini {
  display: grid;
  grid-template-columns: minmax(68px, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-top: auto;
  color: #667085;
}

.metric-mini small {
  color: currentColor;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.15;
  text-align: right;
}

.metric-spark svg {
  width: 100%;
  height: 30px;
}

.metric-spark-area {
  fill: currentColor;
  opacity: .13;
}

.metric-spark-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.metric-spark-critical { color: #c8102e; }
.metric-spark-warning { color: #ef8f00; }
.metric-spark-success { color: #1c7c3c; }
.metric-spark-info,
.metric-spark-neutral { color: #4a5f98; }

.metric-progress span,
.metric-baseline span {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0f5;
}

.metric-progress span i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #39a867;
}

.metric-baseline span::before {
  content: "";
  display: block;
  width: 34%;
  height: 2px;
  margin-top: 3px;
  background: #98a2b3;
}

body[data-page^="role-"] .dashboard-grid {
  gap: 12px;
}

body[data-page^="role-"] .panel {
  border: 1px solid #e3e7ef;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 18px rgba(16, 24, 40, .03);
}

body[data-page^="role-"] .panel-header {
  margin-bottom: 8px;
}

body[data-page^="role-"] .panel-title {
  font-family: var(--font-body);
  color: #1d2638;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 800;
}

body[data-page^="role-"] .panel-subtitle {
  margin-top: 2px;
  color: #667085;
  font-size: 11px;
  line-height: 1.25;
}

body[data-page^="role-"] .panel-export {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: #ffffff;
}

body[data-role-tab="faculty-overview"] .dashboard-grid > .panel.span-4 {
  min-height: 142px;
  padding-bottom: 12px;
}

body[data-role-tab="faculty-overview"] .donut-layout {
  grid-template-columns: 138px minmax(0, 1fr);
  gap: 12px;
}

body[data-role-tab="faculty-overview"] .donut {
  width: 128px;
  height: 128px;
}

body[data-role-tab="faculty-overview"] .donut-inner {
  width: 66px;
  height: 66px;
  font-size: 17px;
}

body[data-role-tab="faculty-overview"] .legend {
  gap: 7px;
}

body[data-role-tab="faculty-overview"] .legend-row {
  grid-template-columns: 8px minmax(0, 1fr) auto;
  gap: 7px;
  color: #344054;
  font-size: 11px;
}

body[data-role-tab="faculty-overview"] .legend-dot {
  width: 8px;
  height: 8px;
}

body[data-role-tab="faculty-overview"] .legend-share {
  margin-left: 6px;
}

body[data-page^="role-"] .hbars {
  gap: 9px;
  padding: 6px 0 2px;
}

body[data-page^="role-"] .hbar {
  grid-template-columns: minmax(104px, 1.2fr) minmax(70px, 2fr) 34px;
  gap: 8px;
  color: #344054;
  font-size: 11px;
}

body[data-page^="role-"] .hbar-track {
  height: 8px;
  border-radius: 999px;
  background: #edf0f5;
}

body[data-page^="role-"] .hbar-fill {
  border-radius: inherit;
  background: #c8102e !important;
}

body[data-page^="role-"] .hbar strong {
  color: #344054;
  font-size: 11px;
}

body[data-page^="role-"] .status-bars {
  display: grid;
  gap: 8px;
  padding: 1px 0 0;
}

body[data-page^="role-"] .status-row {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(84px, 1fr) minmax(42px, auto);
  gap: 10px;
  align-items: center;
  color: #344054;
}

body[data-page^="role-"] .status-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

body[data-page^="role-"] .status-copy strong {
  color: #1d2638;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
}

body[data-page^="role-"] .status-copy span {
  color: #667085;
  font-size: 10px;
  font-weight: 650;
}

body[data-page^="role-"] .status-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0f5;
}

body[data-page^="role-"] .status-fill {
  height: 100%;
  border-radius: inherit;
}

body[data-page^="role-"] .status-fill-critical { background: #9f1d22; }
body[data-page^="role-"] .status-fill-warning { background: #b45309; }
body[data-page^="role-"] .status-fill-success { background: #1c7c3c; }
body[data-page^="role-"] .status-fill-info { background: #44619d; }
body[data-page^="role-"] .status-fill-neutral { background: #5b6b7f; }

body[data-page^="role-"] .status-row > b {
  color: #1d2638;
  font-size: 11px;
  font-weight: 850;
  text-align: right;
}

body[data-role-tab="faculty-overview"] .table-wrap {
  max-height: 318px;
  border-top: 1px solid #eef1f5;
}

body[data-role-tab="faculty-overview"] .intervention-table .table-wrap {
  max-height: 362px;
}

body[data-page^="role-"] table {
  font-size: 11px;
}

body[data-page^="role-"] th,
body[data-page^="role-"] td {
  padding: 8px 10px;
  border-color: #edf0f5;
}

body[data-page^="role-"] th {
  color: #344054;
  background: #fafbfc;
  font-weight: 800;
}

body[data-page^="role-"] tbody tr:nth-child(even) {
  background: #ffffff;
}

body[data-page^="role-"] tbody tr:hover {
  background: #fff7f8;
}

body[data-page^="role-"] .badge {
  min-height: 20px;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
}

body[data-page^="role-"] .source-chip {
  border-radius: 999px;
  letter-spacing: 0;
  text-transform: uppercase;
}

body[data-page^="role-"] .caveat-strip {
  border-radius: 8px;
  box-shadow: none;
}

@media (max-width: 1280px) {
  body[data-page^="role-"] {
    grid-template-columns: 224px minmax(0, 1fr);
  }

  body[data-page^="role-"] .kpi-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body[data-page^="role-"] .triage-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-page^="role-"] .triage-item {
    border-bottom: 1px solid #edf0f5;
  }

  body[data-page^="role-"] .triage-item:nth-child(2n) {
    border-right: 0;
  }
}

@media (max-width: 1024px) {
  body[data-page^="role-"] {
    grid-template-columns: 1fr;
  }

  body[data-page^="role-"] .sidebar {
    position: static;
    height: auto;
  }

  body[data-page^="role-"] .brand {
    min-height: 96px;
  }

  body[data-page^="role-"] .filters {
    grid-template-columns: 1fr;
  }

  body[data-page^="role-"] .kpi-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-role-tab="faculty-overview"] .kpi-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  body[data-page^="role-"] .app {
    padding: 18px 14px;
  }

  body[data-page^="role-"] .kpi-metric-grid {
    grid-template-columns: 1fr;
  }

  body[data-page^="role-"] .triage-list,
  body[data-role-tab="faculty-overview"] .kpi-metric-grid {
    grid-template-columns: 1fr;
  }

  body[data-page^="role-"] .triage-item {
    min-height: 0;
    border-right: 0;
  }

  body[data-page^="role-"] .status-row {
    grid-template-columns: 1fr auto;
  }

  body[data-page^="role-"] .status-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  body[data-role-tab="faculty-overview"] .donut-layout {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   SIDEBAR LOGO + COLLAPSE
   Final sidebar layer: adds the official SPU logo and an icon rail state
   without changing dashboard content panels.
   ============================================================ */
.brand {
  display: grid;
  position: relative;
  justify-items: center;
  gap: 12px;
}

.brand-top {
  width: 100%;
  min-height: 116px;
  display: grid;
  place-items: center;
}

.brand-logo {
  display: block;
  width: 104px;
  height: 104px;
  object-fit: contain;
  border-radius: 18px;
  padding: 0;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(64, 0, 12, .16);
}

.brand-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.sidebar-toggle {
  position: absolute;
  top: 0;
  right: 0;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 8px;
  background: rgba(255, 255, 255, .10);
  color: #ffffff;
  cursor: pointer;
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, .18);
}

.sidebar-toggle svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.2;
}

body[data-page^="role-"] .brand {
  min-height: auto;
}

body[data-page^="role-"] .brand-title {
  font-size: 24px;
}

body[data-page^="role-"] .brand-subtitle {
  max-width: 168px;
  margin-top: 0;
  font-size: 12px;
}

@media (min-width: 1025px) {
  body.sidebar-collapsed {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  body.sidebar-collapsed[data-page^="role-"] {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  body.sidebar-collapsed .sidebar,
  body.sidebar-collapsed[data-page^="role-"] .sidebar {
    padding: 18px 9px;
    overflow-x: hidden;
  }

  body.sidebar-collapsed .brand,
  body.sidebar-collapsed[data-page^="role-"] .brand {
    justify-items: center;
    gap: 8px;
    min-height: auto;
    margin: 0 0 14px;
    padding: 0 0 14px;
  }

  body.sidebar-collapsed .brand-top {
    width: 100%;
    min-height: 84px;
    align-items: start;
  }

  body.sidebar-collapsed .brand-logo {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    padding: 0;
  }

  body.sidebar-collapsed .brand-copy {
    display: none;
  }

  body.sidebar-collapsed .sidebar-toggle {
    top: 64px;
    right: 50%;
    transform: translateX(50%);
    width: 34px;
    height: 30px;
    border-color: rgba(255, 255, 255, .22);
    background: rgba(255, 255, 255, .08);
  }

  body.sidebar-collapsed .nav,
  body.sidebar-collapsed[data-page^="role-"] .nav {
    gap: 6px;
    margin-top: 8px;
  }

  body.sidebar-collapsed .nav-button,
  body.sidebar-collapsed[data-page^="role-"] .nav-button {
    min-height: 42px;
    justify-content: center;
    gap: 0;
    padding: 9px;
    border-radius: 10px;
  }

  body.sidebar-collapsed .nav-label,
  body.sidebar-collapsed .nav-button > span:not(.nav-icon) {
    display: none;
  }

  body.sidebar-collapsed .nav-icon,
  body.sidebar-collapsed[data-page^="role-"] .nav-icon {
    width: 22px;
    height: 22px;
  }

  body.sidebar-collapsed .nav-icon svg,
  body.sidebar-collapsed[data-page^="role-"] .nav-icon svg {
    width: 20px;
    height: 20px;
  }

  body.sidebar-collapsed .sidebar-footer,
  body.sidebar-collapsed[data-page^="role-"] .sidebar-footer {
    align-items: center;
    padding-top: 12px;
  }

  body.sidebar-collapsed .access-panel {
    display: none;
  }

  body.sidebar-collapsed .sidebar-user,
  body.sidebar-collapsed .sidebar-user.compact,
  body.sidebar-collapsed[data-page^="role-"] .sidebar-user.compact {
    display: flex;
    justify-content: center;
    padding: 0;
    background: transparent;
  }

  body.sidebar-collapsed .sidebar-user > div,
  body.sidebar-collapsed .sidebar-user > svg:last-child,
  body.sidebar-collapsed[data-page^="role-"] .sidebar-user.compact > div {
    display: none;
  }

  body.sidebar-collapsed .sign-out.visible,
  body.sidebar-collapsed .sign-out {
    display: none;
  }
}

@media (max-width: 1024px) {
  .sidebar-toggle {
    display: none;
  }

  .brand-top {
    align-items: center;
  }
}

/* ============================================================
   SPU EXECUTIVE POLISH PASS
   Final role-view visual layer: rebalances sidebar proportion and gives
   executive widgets a stronger SPU identity without using brand red as data.
   ============================================================ */
body[data-page^="role-"] {
  grid-template-columns: 212px minmax(0, 1fr);
  background:
    radial-gradient(circle at 100% 0%, rgba(200, 16, 46, .045) 0, rgba(200, 16, 46, 0) 28%),
    linear-gradient(180deg, #f7f8fb 0%, #f3f5f9 100%);
}

body[data-page^="role-"] .sidebar {
  min-height: calc(100vh - 16px);
  margin: 8px 0 8px 8px;
  padding: 22px 15px 18px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 24% -8%, rgba(255, 255, 255, .16) 0, rgba(255, 255, 255, 0) 33%),
    linear-gradient(180deg, #c91b30 0%, #b81125 45%, #930c17 100%);
  box-shadow: 0 14px 28px rgba(92, 8, 18, .16);
}

body[data-page^="role-"] .brand {
  margin: 0 0 10px;
  padding: 0 0 15px;
  border-bottom-color: rgba(255, 255, 255, .20);
}

body[data-page^="role-"] .brand-top {
  min-height: 102px;
  align-items: start;
  padding-top: 4px;
}

body[data-page^="role-"] .brand-logo {
  width: 92px;
  height: 92px;
  border-radius: 16px;
  box-shadow: 0 9px 18px rgba(55, 0, 12, .18);
}

body[data-page^="role-"] .sidebar-toggle {
  top: 3px;
  right: 0;
  width: 29px;
  height: 29px;
  border-radius: 7px;
  background: rgba(255, 255, 255, .11);
}

body[data-page^="role-"] .nav {
  gap: 5px;
}

body[data-page^="role-"] .nav-button {
  min-height: 39px;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.18;
}

body[data-page^="role-"] .nav-button.active,
body[data-page^="role-"] .nav .active {
  border-radius: 9px;
  color: #970d1b;
  box-shadow: 0 7px 15px rgba(69, 3, 12, .14);
  font-weight: 700;
}

body[data-page^="role-"] .nav-icon {
  width: 18px;
  height: 18px;
}

body[data-page^="role-"] .nav-icon svg {
  width: 17px;
  height: 17px;
}

body[data-page^="role-"] .sidebar-footer {
  padding-top: 12px;
  border-top-color: rgba(255, 255, 255, .20);
}

body[data-page^="role-"] .sidebar-user.compact {
  grid-template-columns: 33px minmax(0, 1fr);
  gap: 9px;
  padding: 0 4px;
}

body[data-page^="role-"] .sidebar-avatar {
  width: 33px;
  height: 33px;
  font-size: 10.5px;
}

body[data-page^="role-"] .sidebar-user.compact strong {
  font-size: 12.5px;
}

body[data-page^="role-"] .sidebar-user.compact span:not(.sidebar-avatar) {
  font-size: 10.5px;
}

body[data-page^="role-"] .app {
  padding: 25px 28px 25px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .58) 0%, rgba(255, 255, 255, 0) 26%),
    transparent;
}

body[data-page^="role-"] .topbar {
  margin-bottom: 11px;
}

body[data-page^="role-"] .topbar h1 {
  font-size: 25px;
  color: #151b32;
}

body[data-page^="role-"] .role-filter-card,
body[data-page^="role-"] .role-scope-card,
body[data-page^="role-"] .metric-card,
body[data-page^="role-"] .panel,
body[data-page="hod-department"] .role-scope-card,
body[data-page="hod-department"] .metric-card,
body[data-page="hod-department"] .panel {
  border-color: #dfe5ee;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 26px rgba(15, 23, 42, .045);
}

body[data-page^="role-"] .role-filter-card,
body[data-page^="role-"] .role-scope-card,
body[data-page="hod-department"] .role-scope-card {
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #fdfefe 100%);
}

body[data-page^="role-"] .role-scope-card,
body[data-page="hod-department"] .role-scope-card {
  position: relative;
  overflow: hidden;
}

body[data-page^="role-"] .role-scope-card::before,
body[data-page="hod-department"] .role-scope-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, #c8102e, #d8a33e);
}

body[data-page^="role-"] .role-scope-icon {
  background: #fff3f4;
  color: #a70f20;
}

body[data-page^="role-"] .kpi-metric-grid {
  gap: 14px;
  margin-bottom: 14px;
}

body[data-page^="role-"] .metric-card {
  position: relative;
  min-height: 128px;
  overflow: hidden;
  gap: 12px;
  padding: 13px 14px 12px;
  border-radius: 10px;
  background:
    radial-gradient(circle at 100% -18%, rgba(216, 163, 62, .12) 0, rgba(216, 163, 62, 0) 42%),
    linear-gradient(145deg, #ffffff 0%, #ffffff 70%, #fffaf2 100%);
}

body[data-page^="role-"] .metric-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, #c8102e 0%, #c8102e 58%, #d8a33e 58%, #d8a33e 100%);
}

body[data-page^="role-"] .metric-card.metric-zero {
  background: linear-gradient(145deg, #ffffff 0%, #fafbfc 100%);
}

body[data-page^="role-"] .metric-card .kpi-icon {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, .92);
  box-shadow: 0 6px 14px rgba(15, 23, 42, .08);
}

body[data-page^="role-"] .metric-card .kpi-label {
  color: #2e3648;
  font-size: 12px;
}

body[data-page^="role-"] .metric-card .kpi-value {
  margin-top: 2px;
  color: #111827;
  font-size: 29px;
  letter-spacing: 0;
}

body[data-page^="role-"] .metric-note {
  color: #687386;
}

body[data-page^="role-"] .metric-mini {
  margin-top: 5px;
}

body[data-page^="role-"] .metric-spark svg {
  height: 32px;
}

body[data-page^="role-"] .metric-spark-area {
  opacity: .18;
}

body[data-page^="role-"] .metric-progress span {
  height: 8px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .02);
}

body[data-page^="role-"] .metric-progress span i {
  background: linear-gradient(90deg, #2d8746, #4fb56d);
}

body[data-page^="role-"] .dashboard-grid {
  gap: 14px;
}

body[data-page^="role-"] .panel {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background:
    linear-gradient(180deg, #ffffff 0%, #ffffff 74%, #fcfdff 100%);
}

body[data-page^="role-"] .panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, #c8102e 0%, #c8102e 18%, #d8a33e 18%, #d8a33e 28%, rgba(216, 163, 62, 0) 28%);
}

body[data-page^="role-"] .panel-header {
  margin-bottom: 11px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eef1f5;
}

body[data-page^="role-"] .panel-title {
  color: #1b2435;
  font-size: 13.5px;
  font-weight: 850;
}

body[data-page^="role-"] .panel-subtitle {
  color: #6b7485;
}

body[data-page^="role-"] .panel-export {
  border-color: #dfe5ee;
  color: #5e6a7d;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

body[data-page^="role-"] .panel-export:hover {
  color: #a70f20;
  border-color: #efc6cc;
  background: #fff7f8;
}

body[data-page^="role-"] .status-bars {
  gap: 7px;
}

body[data-page^="role-"] .status-row {
  position: relative;
  padding: 6px 8px 6px 11px;
  border-radius: 8px;
  background: #fafbfc;
  grid-template-columns: minmax(0, 1.35fr) minmax(92px, 1fr) minmax(36px, auto);
}

body[data-page^="role-"] .status-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 4px;
  height: 24px;
  border-radius: 999px;
  transform: translateY(-50%);
  background: #5b6b7f;
}

body[data-page^="role-"] .status-critical::before { background: #9f1d22; }
body[data-page^="role-"] .status-warning::before { background: #b45309; }
body[data-page^="role-"] .status-info::before { background: #44619d; }
body[data-page^="role-"] .status-success::before { background: #1c7c3c; }

body[data-page^="role-"] .status-track,
body[data-page^="role-"] .hbar-track {
  height: 9px;
  background: #e9edf4;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .025);
}

body[data-page^="role-"] .status-fill {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}

body[data-page^="role-"] .status-fill-critical { background: linear-gradient(90deg, #8f1720, #c03a43); }
body[data-page^="role-"] .status-fill-warning { background: linear-gradient(90deg, #a95706, #dc8a22); }
body[data-page^="role-"] .status-fill-success { background: linear-gradient(90deg, #1f7338, #43a765); }
body[data-page^="role-"] .status-fill-info { background: linear-gradient(90deg, #40598f, #5b74ad); }
body[data-page^="role-"] .status-fill-neutral { background: linear-gradient(90deg, #59677a, #7b8797); }

body[data-page^="role-"] .hbar {
  padding: 6px 8px;
  border-radius: 8px;
  background: #fafbfc;
  grid-template-columns: minmax(122px, 1.25fr) minmax(78px, 2fr) 42px;
}

body[data-page^="role-"] .hbar-fill {
  background: linear-gradient(90deg, #8f1720, #c8102e) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}

body[data-role-tab="faculty-overview"] .panel[data-panel="Lowest current pass rates"] .hbar-fill {
  background: linear-gradient(90deg, #246f3b, #43a764) !important;
}

body[data-page^="role-"] th {
  background: linear-gradient(180deg, #fbfaf8 0%, #f7f8fb 100%);
  border-bottom-color: #dde3ed;
}

body[data-page^="role-"] tbody tr:hover {
  background: #fff6f7;
}

body[data-page^="role-"] .badge {
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .025);
}

@media (max-width: 1280px) {
  body[data-page^="role-"] {
    grid-template-columns: 204px minmax(0, 1fr);
  }
}

@media (min-width: 1025px) {
  body.sidebar-collapsed[data-page^="role-"] {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  body.sidebar-collapsed[data-page^="role-"] .sidebar {
    padding: 17px 8px;
  }

  body.sidebar-collapsed[data-page^="role-"] .brand-top {
    min-height: 76px;
  }

  body.sidebar-collapsed[data-page^="role-"] .brand-logo {
    width: 50px;
    height: 50px;
    border-radius: 11px;
  }

  body.sidebar-collapsed[data-page^="role-"] .sidebar-toggle {
    top: 56px;
    width: 32px;
    height: 28px;
  }

  body.sidebar-collapsed[data-page^="role-"] .nav-button {
    min-height: 40px;
    padding: 8px;
  }
}

/* ── Faculty Overview panel balance ──────────────────────────────────────────
   The three middle statusBars panels share a row and stretch to the tallest
   (Lowest pass rates). The shorter ones (Concern profile, Marks captured) were
   left with a large empty bottom void. Let their bars distribute across the full
   panel height so the row reads as balanced. Scoped with :has() to statusBars
   panels ONLY — tables and every other panel are untouched. */
body[data-page^="role-"] .panel:has(> .status-bars) {
  display: flex;
  flex-direction: column;
}
body[data-page^="role-"] .panel:has(> .status-bars) .status-bars {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  justify-content: space-evenly;
}

/* ════════════════════════════════════════════════════════════════════════════
   SIGN-IN PAGE  — implements the "SPU Sign-in" Claude Design handoff.
   Full-screen overlay shown when signed out. Fonts: Spectral + Hanken Grotesk
   (loaded in index.html). Classes are .lg-* so nothing collides with the
   dashboard's global .badge / .field / .divider rules.
   ════════════════════════════════════════════════════════════════════════════ */
body.login-view { overflow: hidden; min-width: 0; grid-template-columns: 1fr; }

.spu-login {
  position: fixed; inset: 0; z-index: 200;
  display: flex; overflow: auto;
  background: #eef0f2; color: #1c1518;
  font-family: "Hanken Grotesk", system-ui, sans-serif;
}

/* ---- Left brand panel (diagonal clip) ---- */
.lg-brand {
  position: relative; flex: 1 1 52%; min-width: 0; overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 88% 100%, 0 100%);
  background: linear-gradient(150deg, #b81f33 0%, #9c1024 46%, #6f0a18 100%);
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 0 0 clamp(48px, 7vw, 118px);
}
.lg-grid {
  position: absolute; inset: 0; opacity: .5;
  background-image: radial-gradient(rgba(255, 255, 255, .12) 1.4px, transparent 1.4px);
  background-size: 30px 30px;
}
.lg-motif { position: absolute; left: 0; bottom: 0; width: 78%; height: 62%; opacity: .5; }
.lg-inner { position: relative; max-width: 560px; }
.lg-lockup { display: flex; align-items: center; gap: 18px; margin-bottom: clamp(40px, 6vh, 72px); }
.lg-wordmark { line-height: 1; color: #fff; }
.lg-wordmark .l1 { font-size: 26px; font-weight: 700; letter-spacing: .16em; }
.lg-wordmark .l2 { font-size: 17px; font-weight: 500; letter-spacing: .34em; margin-top: 6px; color: rgba(255, 255, 255, .92); }
.lg-brand h1 { font-size: clamp(40px, 4.4vw, 62px); line-height: 1.02; font-weight: 800; letter-spacing: -.015em; color: #fff; margin: 0; }
.lg-rule { width: 88px; height: 4px; border-radius: 3px; background: #f5a623; margin: 30px 0 26px; }
.lg-brand p { font-size: clamp(16px, 1.4vw, 19px); line-height: 1.55; color: rgba(255, 255, 255, .86); margin: 0; max-width: 430px; }
.lg-chip {
  display: inline-flex; align-items: center; gap: 9px; margin-top: clamp(34px, 5vh, 54px);
  padding: 9px 16px; border: 1px solid rgba(255, 255, 255, .28); border-radius: 999px;
  background: rgba(255, 255, 255, .07); color: rgba(255, 255, 255, .9); font-size: 13px; font-weight: 500;
}

/* ---- Right form panel ---- */
.lg-form-side {
  position: relative; flex: 1 1 48%; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px clamp(28px, 4vw, 64px);
}
.lg-topo { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; }
.lg-form-wrap { position: relative; width: 100%; max-width: 432px; }
.lg-card {
  position: relative; background: #fff; border-radius: 24px; padding: 44px 44px 38px;
  box-shadow: 0 30px 70px -34px rgba(70, 8, 18, .4), 0 2px 10px rgba(0, 0, 0, .04);
}
.lg-badge {
  position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%);
  width: 88px; height: 88px; border-radius: 50%; background: #fff;
  box-shadow: 0 12px 26px -10px rgba(70, 8, 18, .4);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
/* Real SPU crest (logo.jpg = crest + "SOL PLAATJE UNIVERSITY") on a white plaque
   so the white-background image reads cleanly against the red brand panel. */
.lg-logo {
  width: 164px; height: auto; display: block;
  background: #fff; border-radius: 16px; padding: 12px 16px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .22);
}
.lg-badge-logo { width: 70px; height: 70px; object-fit: contain; }
.lg-head { text-align: center; margin-bottom: 30px; }
.lg-head h2 { font-family: "Spectral", serif; font-size: 34px; font-weight: 700; color: #1c1518; margin: 0; }
.lg-head p { font-size: 15px; color: #7a747a; margin: 8px 0 0; }
.lg-sso {
  width: 100%; height: 50px; border: 1px solid #dcdce2; border-radius: 12px; background: #fff;
  font-family: inherit; font-size: 14.5px; font-weight: 600; color: #1c1518;
  display: flex; align-items: center; justify-content: center; gap: 11px; cursor: pointer; transition: .15s;
}
.lg-sso:hover { background: #faf7f8; border-color: #9c1024; }
.lg-ms { display: inline-grid; grid-template-columns: 1fr 1fr; gap: 2px; width: 17px; height: 17px; }
.lg-ms i:nth-child(1) { background: #f25022; }
.lg-ms i:nth-child(2) { background: #7fba00; }
.lg-ms i:nth-child(3) { background: #00a4ef; }
.lg-ms i:nth-child(4) { background: #ffb900; }
.lg-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.lg-divider span { font-size: 12px; color: #a3a0a4; font-weight: 500; }
.lg-divider hr { flex: 1; border: 0; height: 1px; background: #ececed; margin: 0; }
.lg-label { display: block; font-size: 13.5px; font-weight: 700; color: #2c2429; margin-bottom: 8px; }
.lg-field { position: relative; margin-bottom: 20px; }
.lg-lead { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #a3a0a4; }
.lg-field input {
  width: 100%; height: 52px; border: 1.5px solid #dcdce2; border-radius: 12px;
  padding: 0 16px 0 44px; font-family: inherit; font-size: 15px; color: #1c1518; background: #fbfbfc;
  outline: none; transition: .15s;
}
.lg-field input::placeholder { color: #a3a0a4; }
.lg-field input:focus { border-color: #9c1024; background: #fff; box-shadow: 0 0 0 4px rgba(156, 16, 36, .1); }
.lg-field.lg-pw input { padding-right: 48px; }
.lg-eye {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px;
  border: 0; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #8a868b;
}
.lg-pw-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.lg-pw-row a { font-size: 13px; color: #9c1024; font-weight: 700; text-decoration: none; cursor: pointer; }
.lg-pw-row a:hover { text-decoration: underline; }
.lg-error {
  margin: 0 0 18px; font-size: 13px; line-height: 1.4; color: #8c0f20;
  background: #fcebed; border: 1px solid #f4ccd1; border-radius: 10px; padding: 10px 13px;
}
.lg-submit {
  width: 100%; height: 54px; border: 0; border-radius: 12px;
  background: linear-gradient(160deg, #bb1e33, #8c0f20); color: #fff; font-family: inherit;
  font-size: 16px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 14px 26px -12px rgba(140, 15, 32, .75); transition: .15s; margin-top: 6px;
}
.lg-submit:hover { filter: brightness(1.07); transform: translateY(-1px); }
.lg-submit:disabled { opacity: .7; cursor: progress; filter: none; transform: none; }
.lg-submit:focus-visible { outline: 2px solid #8c0f20; outline-offset: 2px; }
.lg-support { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 24px; font-size: 13.5px; color: #7a747a; }
.lg-support a { color: #9c1024; font-weight: 700; text-decoration: underline; }
.lg-copyright { text-align: center; margin-top: 24px; font-size: 12.5px; color: #9a979c; }

@media (max-width: 880px) {
  .lg-brand { display: none; }
  .lg-form-side { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .lg-field input, .lg-submit, .lg-sso { transition: none; }
}

/* ── Department page inline tab bar ──────────────────────────────────────── */
.dept-tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 12px 16px 0;
  border-bottom: 2px solid var(--border, #e4e2e8);
  margin-bottom: 20px;
  background: var(--surface, #fff);
  position: sticky;
  top: 0;
  z-index: 10;
}

.dept-tab-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px 11px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2, #5b6b7f);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  border-radius: 4px 4px 0 0;
  transition: color .12s, border-color .12s, background .12s;
  white-space: nowrap;
}
.dept-tab-btn:hover {
  color: var(--text-1, #1a1523);
  background: var(--surface-raised, #f5f3f8);
}
.dept-tab-btn.active {
  color: var(--accent, #9f1d22);
  border-bottom-color: var(--accent, #9f1d22);
  font-weight: 600;
}
.dept-tab-btn .nav-icon {
  opacity: .75;
  font-size: 15px;
  line-height: 1;
}
.dept-tab-btn.active .nav-icon { opacity: 1; }

/* Scope chip shown instead of role-scope-card in dept page */
.dept-scope-chip {
  display: inline-flex !important;
  margin: 0 16px 12px;
}

@media (max-width: 768px) {
  .dept-tab-bar { gap: 2px; padding: 8px 10px 0; }
  .dept-tab-btn { padding: 8px 10px 10px; font-size: 13px; gap: 5px; }
}

