:root {
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: #17212b;
  background: #f4f7f6;
  font-synthesis: none;
  --ink: #17212b;
  --muted: #61707b;
  --line: #dce5e2;
  --teal: #0f766e;
  --teal-dark: #0b5954;
  --teal-soft: #e3f3ef;
  --coral: #dc5a48;
  --coral-soft: #fce9e5;
  --gold: #c78818;
  --gold-soft: #fff3d6;
  --blue: #3977a8;
  --blue-soft: #e8f2fa;
  --violet: #7656a3;
  --violet-soft: #f0eafb;
  --white: #ffffff;
  --shadow: 0 8px 26px rgba(21, 41, 39, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 6px;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 4px;
  font-size: 17px;
  letter-spacing: 0;
}

.boot-screen,
.center-state {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  color: var(--muted);
}

.boot-screen strong {
  color: var(--ink);
  font-size: 22px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--teal);
  color: var(--white);
  font-weight: 800;
  box-shadow: 4px 4px 0 #f0b94f;
}

.login-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 500px) minmax(360px, 1fr);
  background: #eef4f1;
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px clamp(28px, 7vw, 86px);
  background: var(--white);
}

.login-brand,
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.login-brand {
  margin-bottom: 70px;
}

.login-brand div:last-child,
.sidebar-brand div:last-child {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.login-brand strong {
  font-size: 21px;
}

.login-brand span,
.sidebar-brand span {
  color: var(--muted);
  font-size: 12px;
}

.login-copy {
  margin-bottom: 28px;
}

.login-copy p:not(.eyebrow) {
  max-width: 380px;
  color: var(--muted);
  line-height: 1.6;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.login-footnote {
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.login-context {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(40px, 9vw, 120px);
  overflow: hidden;
  background: #123e3a;
  color: var(--white);
}

.login-context::before,
.login-context::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.16);
  transform: rotate(14deg);
}

.login-context::before {
  width: 360px;
  height: 360px;
  right: -120px;
  top: -100px;
}

.login-context::after {
  width: 220px;
  height: 220px;
  left: -90px;
  bottom: -70px;
}

.context-kicker {
  margin-bottom: 30px;
  color: #f3c45e;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.context-line {
  max-width: 560px;
  padding: 17px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.17);
  font-size: clamp(23px, 3vw, 38px);
  font-weight: 650;
}

.button {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 750;
}

.button-primary {
  background: var(--teal);
  color: var(--white);
}

.button-primary:hover {
  background: var(--teal-dark);
}

.button-secondary {
  border-color: var(--line);
  background: var(--white);
  color: var(--ink);
}

.button-full {
  width: 100%;
}

.google-mark {
  display: inline-grid;
  width: 24px;
  height: 24px;
  margin-right: 8px;
  place-items: center;
  border-radius: 50%;
  background: var(--white);
  color: #4285f4;
}

.notice {
  margin-bottom: 16px;
  padding: 11px 13px;
  border: 1px solid;
  border-radius: 6px;
  font-size: 13px;
}

.notice-error {
  border-color: #f2b9af;
  background: var(--coral-soft);
  color: #8e3024;
}

.workspace {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 22px 15px 16px;
  border-right: 1px solid #d6e2df;
  background: #f9fbfa;
}

.sidebar-brand {
  padding: 0 9px 24px;
}

.sidebar-brand strong {
  font-size: 18px;
}

.nav-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 11px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #4d5e67;
  font-size: 13px;
  font-weight: 650;
  text-align: left;
}

.nav-item svg,
.empty-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.nav-item:hover {
  background: #edf4f1;
  color: var(--ink);
}

.nav-item.active {
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.sidebar-user {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 9px;
  padding: 13px 8px 2px;
  border-top: 1px solid var(--line);
}

.sidebar-user div:nth-child(2) {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.sidebar-user strong,
.sidebar-user span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user strong {
  font-size: 12px;
}

.sidebar-user span {
  color: var(--muted);
  font-size: 11px;
  text-transform: capitalize;
}

.avatar {
  width: 34px;
  height: 34px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #f5d889;
  color: #5d4310;
  font-weight: 800;
}

.icon-button,
.mobile-menu {
  border: 0;
  background: transparent;
  color: var(--muted);
}

.main-area {
  min-width: 0;
}

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

.global-search {
  max-width: 700px;
  display: flex;
  flex: 1;
  align-items: center;
  gap: 9px;
}

.global-search span {
  color: var(--muted);
  font-size: 22px;
}

.global-search input {
  width: 100%;
  height: 38px;
  padding: 0 4px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
}

.environment-badge {
  padding: 5px 8px;
  border: 1px solid #efd38f;
  border-radius: 5px;
  background: var(--gold-soft);
  color: #76530d;
  font-size: 11px;
  font-weight: 800;
}

.mobile-menu {
  display: none;
}

.page {
  max-width: 1480px;
  margin: 0 auto;
  padding: 30px 30px 60px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.page-header p:not(.eyebrow),
.section-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  margin-bottom: 26px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.metric-strip.loading {
  opacity: 0.6;
}

.metric {
  position: relative;
  min-height: 74px;
  display: flex;
  align-items: center;
  padding: 13px 15px;
  border-right: 1px solid var(--line);
}

.metric:last-child {
  border-right: 0;
}

.metric-accent {
  width: 4px;
  height: 34px;
  margin-right: 11px;
  border-radius: 2px;
}

.metric-accent.teal {
  background: var(--teal);
}

.metric-accent.gold {
  background: var(--gold);
}

.metric-accent.coral,
.attention-dot.coral {
  background: var(--coral);
}

.metric-accent.blue {
  background: var(--blue);
}

.metric-accent.red,
.attention-dot.red {
  background: #bd3d3d;
}

.metric-accent.violet,
.attention-dot.violet {
  background: var(--violet);
}

.metric div {
  display: flex;
  flex-direction: column;
}

.metric strong {
  font-size: 21px;
}

.metric div span {
  color: var(--muted);
  font-size: 11px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(250px, 0.8fr);
  gap: 22px;
}

.content-section,
.attention-panel {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--white);
}

.content-section {
  overflow: hidden;
}

.section-heading {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 17px;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  margin-bottom: 2px;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
}

.attention-panel {
  align-self: start;
  overflow: hidden;
}

.attention-row {
  width: 100%;
  min-height: 52px;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) 12px;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font-size: 12px;
  text-align: left;
}

.attention-row:last-child {
  border-bottom: 0;
}

.attention-row:hover {
  background: #f8fbfa;
}

.attention-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

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

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 11px 16px;
  border-bottom: 1px solid #edf1f0;
  font-size: 12px;
  text-align: left;
  white-space: nowrap;
}

th {
  background: #fafcfc;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

td:first-child {
  display: flex;
  flex-direction: column;
}

td:first-child span {
  color: var(--muted);
  font-size: 10px;
}

.status-pill,
.risk-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  text-transform: capitalize;
}

.status-pill.high,
.risk-badge.high {
  background: var(--coral-soft);
  color: #9f3528;
}

.status-pill.medium,
.risk-badge.medium {
  background: var(--gold-soft);
  color: #76530d;
}

.status-pill.low,
.risk-badge.low,
.status-pill.open {
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.empty-inline {
  min-height: 180px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.empty-inline strong {
  color: var(--ink);
  font-size: 14px;
}

.empty-state {
  min-height: 350px;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 36px;
  border: 1px dashed #cbd9d5;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.65);
  color: var(--muted);
  text-align: center;
}

.empty-state h2 {
  color: var(--ink);
}

.empty-state p {
  max-width: 420px;
  line-height: 1.5;
}

.empty-icon {
  width: 42px;
  height: 42px;
  display: grid;
  margin-bottom: 12px;
  place-items: center;
  border-radius: 7px;
  background: var(--teal-soft);
  color: var(--teal);
}

.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
}

.directory-count {
  align-self: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.directory-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr)) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 16px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--white);
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.filter-field span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.filter-field select {
  width: 100%;
  height: 36px;
  padding: 0 30px 0 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  outline: none;
  background: var(--white);
  color: var(--ink);
  font-size: 12px;
}

.filter-field select:focus {
  border-color: #7fb6ae;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.compact-button {
  min-height: 36px;
}

.filter-chip {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.filter-chip.active {
  border-color: #a8cbc5;
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.learner-list {
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: var(--white);
}

.learner-row {
  width: 100%;
  min-height: 66px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) minmax(160px, auto) 16px;
  align-items: center;
  gap: 12px;
  padding: 10px 15px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  text-align: left;
}

.learner-row:last-child {
  border-bottom: 0;
}

.learner-row:hover {
  background: #f8fbfa;
}

.learner-main,
.learner-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.learner-main span,
.learner-main small,
.learner-meta span:first-child {
  color: var(--muted);
  font-size: 11px;
}

.learner-main small {
  font-size: 10px;
}

.learner-meta {
  align-items: flex-end;
}

.row-arrow {
  color: var(--muted);
  font-size: 20px;
}

.risk-badge.unassessed {
  background: #edf1f0;
  color: var(--muted);
}

.load-more {
  display: flex;
  justify-content: center;
  padding: 18px;
}

.back-button {
  margin-bottom: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
}

.profile-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 20px;
}

.profile-identity {
  display: flex;
  align-items: center;
  gap: 15px;
}

.profile-avatar {
  width: 58px;
  height: 58px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 7px;
  background: #123e3a;
  color: var(--white);
  font-size: 22px;
  font-weight: 850;
  box-shadow: 4px 4px 0 #f0b94f;
}

.profile-title-line,
.profile-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-title-line h1 {
  margin-bottom: 0;
}

.profile-identity p {
  margin: 5px 0 3px;
  color: var(--muted);
  font-size: 12px;
}

.assignment-line {
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 750;
}

.profile-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--white);
  overflow: hidden;
}

.profile-summary > div {
  min-height: 66px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 10px 15px;
  border-right: 1px solid var(--line);
}

.profile-summary > div:last-child {
  border-right: 0;
}

.profile-summary span,
.status-section-title small,
.ca-statuses span {
  color: var(--muted);
  font-size: 10px;
}

.profile-summary strong {
  font-size: 14px;
}

.academic-status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.25fr;
  gap: 12px;
  margin-bottom: 16px;
}

.status-section {
  min-height: 104px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--teal);
  border-radius: 7px;
  background: var(--white);
}

.status-section:nth-child(2) {
  border-top-color: var(--gold);
}

.status-section:nth-child(3) {
  border-top-color: var(--violet);
}

.status-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 12px;
  font-weight: 800;
}

.large-status {
  display: block;
  font-size: 18px;
}

.ca-statuses {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.ca-statuses div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ca-statuses strong {
  font-size: 12px;
}

.profile-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.profile-section {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--white);
  overflow: hidden;
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.detail-list div {
  min-height: 66px;
  padding: 12px 16px;
  border-right: 1px solid #edf1f0;
  border-bottom: 1px solid #edf1f0;
}

.detail-list div:nth-child(2n) {
  border-right: 0;
}

.detail-list div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.detail-list dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.detail-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 700;
}

.risk-panel {
  min-height: 62px;
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold);
  border-radius: 7px;
  background: var(--white);
}

.risk-panel.high {
  border-left-color: var(--coral);
}

.risk-panel.low {
  border-left-color: var(--teal);
}

.risk-panel > div {
  display: flex;
  flex-direction: column;
}

.risk-panel span {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.risk-panel strong {
  font-size: 20px;
}

.risk-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.semester-section {
  margin-bottom: 16px;
}

.profile-activity {
  align-items: start;
}

.timeline {
  padding: 6px 17px 15px;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #edf1f0;
}

.timeline-item:last-child {
  border-bottom: 0;
}

.timeline-dot {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--teal);
}

.timeline-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}

.timeline-heading time,
.timeline-item small {
  color: var(--muted);
  font-size: 10px;
}

.timeline-item p {
  margin: 6px 0;
  color: #3f5059;
  font-size: 12px;
  line-height: 1.5;
}

.profile-followups article {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid #edf1f0;
}

.profile-followups article:last-child {
  border-bottom: 0;
}

.profile-followups article > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-followups article > div:last-child {
  align-items: flex-end;
}

.profile-followups strong {
  font-size: 12px;
}

.profile-followups span,
.profile-followups time {
  color: var(--muted);
  font-size: 10px;
}

.profile-followups .text-button {
  align-self: flex-end;
  padding: 0;
  font-size: 10px;
}

.table-learner {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.table-learner span,
td > span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.status-pill.completed {
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.activity-filter-panel {
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--white);
}

.activity-filter-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
}

.activity-search-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.grow-field {
  flex: 1;
}

.filter-scope {
  min-height: 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f8fbfa;
}

.filter-scope span {
  color: var(--muted);
  font-size: 10px;
}

.filter-scope strong {
  font-size: 11px;
}

.register-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2px 0 9px;
  font-size: 12px;
}

.register-heading span {
  color: var(--muted);
  font-size: 10px;
}

.activity-table {
  min-width: 960px;
}

.activity-table td {
  vertical-align: top;
}

.summary-cell {
  min-width: 260px;
  max-width: 420px;
}

.summary-cell span {
  white-space: normal;
  line-height: 1.45;
}

.cross-lsm-note {
  width: max-content;
  padding: 2px 5px;
  border-radius: 4px;
  background: #f2ebfb;
  color: #6f42a6;
}

.report-filter-bar {
  display: grid;
  grid-template-columns: 170px 170px minmax(220px, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--white);
}

.report-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: var(--white);
}

.report-metric {
  position: relative;
  min-height: 84px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 12px 14px 12px 18px;
  border-right: 1px solid var(--line);
}

.report-metric:last-child {
  border-right: 0;
}

.report-metric .metric-accent {
  top: 14px;
  bottom: 14px;
}

.report-metric strong {
  font-size: 22px;
}

.report-metric > span:last-child {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.report-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.breakdown-panel {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--white);
  overflow: hidden;
}

.breakdown-list {
  padding: 4px 16px 14px;
}

.breakdown-row {
  padding: 9px 0;
  border-bottom: 1px solid #edf1f0;
}

.breakdown-row:last-child {
  border-bottom: 0;
}

.breakdown-row > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 11px;
}

.breakdown-track {
  height: 5px;
  overflow: hidden;
  border-radius: 3px;
  background: #edf1f0;
}

.breakdown-track span {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--teal);
}

.report-details {
  margin-bottom: 30px;
}

.modal-backdrop {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(18, 42, 48, 0.42);
}

.activity-dialog {
  width: min(720px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 24px 70px rgba(18, 42, 48, 0.24);
}

.dialog-header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px 17px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.dialog-header h2 {
  margin: 2px 0 4px;
  font-size: 22px;
}

.dialog-header > div > span {
  color: var(--muted);
  font-size: 11px;
}

.dialog-close {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--white);
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
}

.activity-form {
  padding: 20px 22px 22px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field > span {
  color: #3f5059;
  font-size: 11px;
  font-weight: 750;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
  outline: none;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
}

.form-field textarea {
  resize: vertical;
  line-height: 1.5;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: #7fb6ae;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.full-field {
  margin-bottom: 14px;
}

.conditional-followup {
  margin: 4px 0 14px;
  padding: 16px;
  border-left: 4px solid var(--gold);
  background: #fffbf1;
}

.hidden {
  display: none !important;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 5px;
}

.dialog-error {
  margin: 16px 22px 0;
  padding: 10px 12px;
  border: 1px solid #f3b2aa;
  border-radius: 5px;
  background: #fff3f1;
  color: #a5362c;
  font-size: 11px;
}

.toast {
  position: fixed;
  z-index: 70;
  right: 22px;
  bottom: 22px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: 6px;
  background: #123e3a;
  color: var(--white);
  box-shadow: var(--shadow);
  font-size: 12px;
  font-weight: 750;
}

.toast.error {
  background: #a5362c;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--teal-soft);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1050px) {
  .metric-strip {
    grid-template-columns: repeat(3, 1fr);
  }

  .metric:nth-child(3) {
    border-right: 0;
  }

  .metric:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .directory-filters {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }

  .directory-filters .compact-button {
    width: max-content;
  }

  .academic-status-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .academic-status-grid .status-section:last-child {
    grid-column: 1 / -1;
  }

  .activity-filter-grid {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }

  .report-metrics {
    grid-template-columns: repeat(3, 1fr);
  }

  .report-metric:nth-child(3) {
    border-right: 0;
  }

  .report-metric:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 820px) {
  .login-layout {
    grid-template-columns: 1fr;
  }

  .login-context {
    display: none;
  }

  .login-panel {
    min-height: 100vh;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    z-index: 20;
    left: -250px;
    width: 232px;
    transition: left 0.18s ease;
    box-shadow: var(--shadow);
  }

  .sidebar.open {
    left: 0;
  }

  .mobile-menu {
    display: block;
  }

  .topbar {
    padding: 0 15px;
  }

  .environment-badge {
    display: none;
  }

  .page {
    padding: 22px 16px 44px;
  }

  .page-header {
    flex-direction: column;
  }

  .directory-count {
    align-self: flex-start;
  }

  .directory-filters,
  .academic-status-grid,
  .profile-columns {
    grid-template-columns: 1fr;
  }

  .academic-status-grid .status-section:last-child {
    grid-column: auto;
  }

  .profile-header {
    flex-direction: column;
  }

  .profile-actions {
    width: 100%;
  }

  .profile-actions .button {
    flex: 1;
  }

  .profile-title-line {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .profile-summary > div:nth-child(2) {
    border-right: 0;
  }

  .profile-summary > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .detail-list {
    grid-template-columns: 1fr;
  }

  .detail-list div,
  .detail-list div:nth-child(2n) {
    border-right: 0;
    border-bottom: 1px solid #edf1f0;
  }

  .detail-list div:last-child {
    border-bottom: 0;
  }

  .risk-panel {
    grid-template-columns: 1fr;
  }

  .metric-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .metric:nth-child(3) {
    border-right: 1px solid var(--line);
  }

  .metric:nth-child(2n) {
    border-right: 0;
  }

  .metric:nth-child(-n + 4) {
    border-bottom: 1px solid var(--line);
  }

  .learner-row {
    grid-template-columns: 38px minmax(0, 1fr) 16px;
  }

  .learner-meta {
    display: none;
  }

  .activity-filter-grid,
  .report-filter-bar,
  .report-breakdown-grid {
    grid-template-columns: 1fr;
  }

  .activity-search-row {
    align-items: stretch;
    flex-direction: column;
  }

  .activity-search-row .button,
  .report-filter-bar .button {
    width: 100%;
  }

  .report-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .report-metric,
  .report-metric:nth-child(3) {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .report-metric:nth-child(2n) {
    border-right: 0;
  }

  .report-metric:last-child {
    grid-column: 1 / -1;
    border-right: 0;
    border-bottom: 0;
  }

  .modal-backdrop {
    align-items: end;
    padding: 0;
  }

  .activity-dialog {
    width: 100%;
    max-height: 92vh;
    border-radius: 8px 8px 0 0;
  }

  .dialog-header,
  .activity-form {
    padding-left: 16px;
    padding-right: 16px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .dialog-actions .button {
    flex: 1;
  }
}
