/* === PAT Score Tracker — Stylesheet === */

:root {
  /* AIS Indonesia Brand Palette */
  --teal-900: #003D32;
  --teal-800: #004A3D;
  --teal-700: #005C4B;
  --teal-600: #007A63;
  --teal-500: #009878;
  --teal-400: #33B396;
  --teal-100: #CCE8E0;
  --teal-50:  #E8F4F0;
  --gold-500: #F5B731;
  --gold-400: #F7C85A;
  --gold-300: #FAD983;
  --gold-200: #FCE9B1;
  --gold-100: #FEF4D8;
  --gold-50:  #FFFAEB;
  --grey-900: #1c2833;
  --grey-700: #2c3e50;
  --grey-500: #5d6d7e;
  --grey-400: #7f8c8d;
  --grey-300: #aeb6bf;
  --grey-200: #d5d8dc;
  --grey-100: #eaecee;
  --grey-50:  #f8f9fa;
  --white:    #ffffff;
  --green:    #27ae60;
  --green-bg: #eafaf1;
  --yellow:   #f39c12;
  --yellow-bg:#fef9e7;
  --orange:   #e67e22;
  --orange-bg:#fdf2e9;
  --red:      #c0392b;
  --red-bg:   #fdedec;
  --radius:   8px;
  --shadow:   0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md:0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--grey-50);
  color: var(--grey-900);
  line-height: 1.5;
  min-height: 100vh;
}

/* === HEADER === */
.header {
  background: linear-gradient(135deg, var(--teal-900), var(--teal-700));
  color: var(--white);
  padding: 0 1.5rem;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 3px solid var(--gold-500);
}
.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 64px;
  flex-wrap: wrap;
}
.header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.header-logo { height: 48px; width: auto; flex-shrink: 0; }
.header-brand-text { display: flex; flex-direction: column; }
.header-brand-text h1 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.header-school { font-size: 0.72rem; font-weight: 500; opacity: 0.9; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-300); }
.header-subtitle { font-size: 0.72rem; color: rgba(255,255,255,0.6); letter-spacing: 0.01em; }
.header-nav { display: flex; gap: 0.25rem; }
.nav-btn {
  background: transparent;
  color: rgba(255,255,255,0.75);
  border: none;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius);
  transition: all 0.15s;
}
.nav-btn:hover { background: rgba(245,183,49,0.12); color: var(--white); }
.nav-btn.active { background: rgba(245,183,49,0.18); color: var(--gold-400); font-weight: 600; border-bottom: 2px solid var(--gold-500); }

/* === FILTERS === */
.filters-bar {
  background: var(--white);
  border-bottom: 1px solid var(--grey-200);
  padding: 0.75rem 1.5rem;
}
.filters-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  gap: 1rem;
  align-items: end;
  flex-wrap: wrap;
}
.filter-group { display: flex; flex-direction: column; gap: 0.25rem; }
.filter-group label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--grey-500);
}
.filter-group select, .filter-group input {
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--grey-200);
  border-radius: var(--radius);
  font-size: 0.85rem;
  background: var(--white);
  color: var(--grey-900);
  min-width: 140px;
}
.filter-group select:focus, .filter-group input:focus {
  outline: none;
  border-color: var(--teal-400);
  box-shadow: 0 0 0 3px rgba(0,92,75,0.15);
}
.filter-search { flex: 1; min-width: 200px; }
.filter-search input { width: 100%; }

/* === MAIN === */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* === PAGES (top-level router) === */
.page { display: none; }
.page.active { display: block; }

/* === PAT SUB-VIEWS (within PAT section) === */
.pat-view { display: none; }
.pat-view.active { display: block; }

/* === CARDS === */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.card h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--teal-700);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gold-200);
}

/* === KPI ROW === */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.kpi-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--teal-700);
}
.kpi-card.green  { border-left-color: var(--green); }
.kpi-card.orange { border-left-color: var(--orange); }
.kpi-card.red    { border-left-color: var(--red); }
.kpi-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--grey-500);
  margin-bottom: 0.25rem;
}
.kpi-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--grey-900);
  line-height: 1.2;
}
.kpi-sub {
  font-size: 0.75rem;
  color: var(--grey-400);
  margin-top: 0.15rem;
}

/* === GRID === */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

/* === TABLES === */
.table-wrap { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.data-table th {
  text-align: left;
  padding: 0.6rem 0.75rem;
  background: var(--grey-50);
  color: var(--grey-700);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 2px solid var(--grey-200);
  white-space: nowrap;
}
.data-table th[data-sort] { cursor: pointer; user-select: none; }
.data-table th[data-sort]:hover { color: var(--teal-600); }
.data-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--grey-100);
  vertical-align: middle;
}
.data-table tbody tr:hover { background: var(--gold-50); }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* === FLAGS === */
.flag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.flag-strong     { background: var(--green-bg);  color: var(--green); }
.flag-expected   { background: var(--yellow-bg); color: var(--yellow); }
.flag-minimal    { background: var(--orange-bg); color: var(--orange); }
.flag-regression { background: var(--red-bg);    color: var(--red); }

/* === YEAR LEVEL VIEW === */
.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.view-header h2 { font-size: 1.1rem; color: var(--teal-700); }
.yl-selector { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.yl-btn {
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--grey-200);
  background: var(--white);
  border-radius: var(--radius);
  font-size: 0.8rem;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.15s;
}
.yl-btn:hover { border-color: var(--teal-400); color: var(--teal-600); }
.yl-btn.active { background: var(--teal-700); color: var(--white); border-color: var(--teal-700); }

/* === STUDENT VIEW === */
.student-select-area { max-width: 500px; }
.search-input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--grey-200);
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}
.search-input:focus {
  outline: none;
  border-color: var(--teal-400);
  box-shadow: 0 0 0 3px rgba(0,92,75,0.15);
}
.search-results {
  max-height: 300px;
  overflow-y: auto;
}
.search-result-item {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  border-radius: 4px;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.search-result-item:hover { background: var(--gold-50); }
.search-result-item .yr {
  font-size: 0.75rem;
  color: var(--grey-400);
  background: var(--grey-100);
  padding: 0.1rem 0.5rem;
  border-radius: 10px;
}

.student-detail.hidden { display: none; }
.student-info-card { border-left: 4px solid var(--teal-700); }
.student-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}
.student-info-field label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--grey-500);
}
.student-info-field span {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--grey-900);
}

/* === ADMISSION BADGE === */
.admission-badge {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 10px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--gold-100);
  color: var(--orange);
  vertical-align: middle;
  margin-left: 0.25rem;
}
.admission-row { background: var(--gold-50); }

/* === MANAGE STUDENTS === */
.manage-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.manage-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--grey-700);
  cursor: pointer;
  user-select: none;
}
.manage-toggle input { cursor: pointer; }
.manage-toolbar {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.manage-toolbar .search-input { flex: 1; min-width: 200px; margin-bottom: 0; }
.manage-stats {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
.manage-stat {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--grey-500);
  padding: 0.25rem 0.6rem;
  background: var(--grey-100);
  border-radius: 12px;
}
.manage-stat-left { background: var(--red-bg); color: var(--red); }
.manage-status {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}
.manage-status-active { background: var(--green-bg); color: var(--green); }
.manage-status-left   { background: var(--red-bg);   color: var(--red); }
.manage-row-left { opacity: 0.55; }
.manage-row-left td { text-decoration: line-through; text-decoration-color: var(--grey-300); }
.manage-row-left td:last-child,
.manage-row-left td:nth-last-child(2) { text-decoration: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
.btn-xs { padding: 0.2rem 0.5rem; font-size: 0.75rem; }
.btn-outline {
  background: var(--white);
  color: var(--teal-700);
  border: 1px solid var(--teal-400);
}
.btn-outline:hover { background: var(--teal-50); }
.btn-left {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid #f5c6cb;
}
.btn-left:hover { background: #fad7da; }
.btn-restore {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid #a3d9b1;
}
.btn-restore:hover { background: #d4efdf; }

/* === FOOTER === */
.footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.75rem;
  color: var(--grey-500);
  border-top: 2px solid var(--teal-100);
  margin-top: 2rem;
  background: var(--teal-50);
}

/* === AUTH / LOGIN OVERLAY === */
.login-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: linear-gradient(135deg, var(--teal-900), var(--teal-700));
  justify-content: center;
  align-items: center;
}
.login-overlay.active {
  display: flex;
}
.login-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 2.5rem 2rem;
  text-align: center;
  max-width: 400px;
  width: 90%;
}
.login-logo {
  height: 72px;
  width: auto;
  margin-bottom: 1rem;
}
.login-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--teal-700);
  margin-bottom: 0.25rem;
}
.login-subtitle {
  font-size: 0.9rem;
  color: var(--grey-500);
  margin-bottom: 1.5rem;
}
.login-google-btn {
  display: flex;
  justify-content: center;
  margin-bottom: 0.75rem;
}
.fallback-google-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 280px;
  padding: 0.65rem 1.25rem;
  font-size: 0.95rem;
  font-family: inherit;
  font-weight: 500;
  color: var(--grey-700);
  background: var(--white);
  border: 1px solid var(--grey-300);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  box-shadow: var(--shadow);
}
.fallback-google-btn:hover {
  background: var(--grey-50);
  box-shadow: var(--shadow-md);
}
.login-setup-msg {
  font-size: 0.85rem;
  color: var(--grey-500);
  line-height: 1.6;
  padding: 1rem;
  background: var(--gold-50);
  border: 1px solid var(--gold-200);
  border-radius: var(--radius);
}
.login-error {
  font-size: 0.85rem;
  color: var(--red);
  background: var(--red-bg);
  border: 1px solid #f5c6cb;
  border-radius: var(--radius);
  padding: 0.75rem;
  margin-top: 0.75rem;
}
.auth-hidden {
  display: none !important;
}

/* === USER INFO (header) === */
.user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  margin-right: 1rem;
}
.user-name {
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
}
.sign-out-btn {
  background: rgba(245,183,49,0.15);
  color: var(--gold-400);
  border: 1px solid rgba(245,183,49,0.3);
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.sign-out-btn:hover {
  background: rgba(245,183,49,0.25);
  color: var(--gold-300);
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .header-inner { flex-direction: column; align-items: flex-start; padding: 0.75rem 0; }
  .header-nav { width: 100%; overflow-x: auto; padding-bottom: 0.25rem; }
  .filters-inner { flex-direction: column; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .main-content { padding: 0.75rem; }
  .kpi-row { grid-template-columns: 1fr; }
  .nav-btn { padding: 0.4rem 0.6rem; font-size: 0.8rem; }
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--white);
  background: var(--teal-700);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 9999;
  pointer-events: none;
  white-space: nowrap;
}
.toast.toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast-warning {
  background: var(--orange);
}

/* === HEADER BRAND LINK === */
.header-brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

/* === NAV DIVIDER === */
.nav-divider {
  width: 1px;
  height: 24px;
  background: rgba(255,255,255,0.2);
  margin: 0 0.25rem;
  align-self: center;
}

/* === VIEW HEADER SUBTITLE === */
.view-header-sub {
  font-size: 0.8rem;
  color: var(--grey-400);
  font-weight: 400;
}

/* === PAT SUB-NAV === */
.sub-nav {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--grey-200);
}
.sub-nav-btn {
  background: transparent;
  color: var(--grey-500);
  border: none;
  padding: 0.4rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius) var(--radius) 0 0;
  transition: all 0.15s;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}
.sub-nav-btn:hover { color: var(--teal-600); background: var(--teal-50); }
.sub-nav-btn.active {
  color: var(--teal-700);
  font-weight: 600;
  border-bottom-color: var(--teal-700);
  background: var(--teal-50);
}

/* === STUDENT LIST COUNT === */
.student-count {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--grey-500);
  padding: 0.25rem 0.6rem;
  background: var(--grey-100);
  border-radius: 12px;
}

/* === SORTABLE COLUMNS (student list + manage) === */
.data-table th[data-slsort],
.data-table th[data-msort],
.data-table th[data-omsort] { cursor: pointer; user-select: none; }
.data-table th[data-slsort]:hover,
.data-table th[data-msort]:hover,
.data-table th[data-omsort]:hover { color: var(--teal-600); }

/* === PROFILE PAGE === */
.profile-back { margin-bottom: 1rem; }
.profile-back .btn { text-decoration: none; }

/* === EAL BADGE === */
.eal-badge {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 10px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--teal-50);
  color: var(--teal-600);
  vertical-align: middle;
  margin-left: 0.25rem;
}

/* === TBC PLACEHOLDER CARD === */
.tbc-card {
  text-align: center;
  padding: 3rem 1.25rem;
  color: var(--grey-400);
}
.tbc-card h3 {
  color: var(--grey-400);
  border-bottom-color: var(--grey-200);
}

/* === HOME PAGE === */
.about-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
}
.about-list li {
  padding: 0.4rem 0;
  padding-left: 1.25rem;
  position: relative;
  font-size: 0.9rem;
  color: var(--grey-700);
}
.about-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.75rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal-400);
}
.data-timestamp {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--grey-400);
}

/* === PROFILE FLAGS BANNER === */
.profile-flags {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.profile-flag-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.75rem;
  border-radius: 16px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.profile-flag-eal {
  background: var(--teal-50);
  color: var(--teal-700);
  border: 1px solid var(--teal-100);
}
.profile-flag-send {
  background: #f0e6f6;
  color: #7d3c98;
  border: 1px solid #d7bde2;
}

/* === PROFILE TEST CARDS === */
.profile-test-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.test-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.25rem;
  border-top: 4px solid var(--grey-300);
}
.test-card.tc-maths   { border-top-color: var(--teal-700); }
.test-card.tc-reading { border-top-color: var(--orange); }
.test-card.tc-science { border-top-color: var(--green); }
.test-card.tc-other   { border-top-color: var(--grey-400); }
.tc-header {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--grey-500);
  margin-bottom: 0.25rem;
}
.tc-score {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--grey-900);
  line-height: 1.2;
}
.tc-band {
  font-size: 0.8rem;
  color: var(--grey-500);
  margin-bottom: 0.25rem;
}
.tc-test {
  font-size: 0.72rem;
  color: var(--grey-400);
}
.tc-window {
  font-size: 0.72rem;
  color: var(--grey-400);
  margin-bottom: 0.5rem;
}
.tc-history {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--grey-100);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.tc-history-item {
  font-size: 0.75rem;
  color: var(--grey-500);
}
.tc-history-item strong {
  color: var(--grey-700);
}

/* === STUDENT PROFILE — Assessment Boxes === */
.student-profile-detail.hidden { display: none; }
.assessment-boxes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}
.assessment-box {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  border-top: 5px solid var(--grey-300);
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.assessment-box:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.assessment-box-pat   { border-top-color: var(--teal-700); }
.assessment-box-1min  { border-top-color: var(--gold-500); }
.assessment-box-dibels { border-top-color: var(--orange); }
.assessment-box-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--grey-900);
}
.assessment-box-subtitle {
  font-size: 0.78rem;
  color: var(--grey-400);
}
.assessment-box-score {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--teal-700);
  line-height: 1.2;
}
.assessment-box-pat:hover   { border-top-color: var(--teal-500); background: var(--teal-50); }
.assessment-box-1min:hover  { border-top-color: var(--gold-400); background: var(--gold-50); }
.assessment-box-dibels:hover { border-top-color: var(--orange);   background: var(--orange-bg); }
.assessment-box-arrow {
  font-size: 0.75rem;
  color: var(--grey-300);
  margin-top: 0.25rem;
}
@media (max-width: 600px) {
  .assessment-boxes { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .assessment-boxes { grid-template-columns: 1fr 1fr; }
}

/* Student profile demographics grid (on Students tab) */
.profile-demographics {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
}
.profile-demo-section {
  padding: 0.5rem 0.75rem;
}
.profile-demo-section:not(:last-child) {
  border-right: 1px solid var(--grey-100);
}

/* === RESPONSIVE — sub-nav === */
@media (max-width: 900px) {
  .sub-nav { overflow-x: auto; flex-wrap: nowrap; }
  .sub-nav-btn { white-space: nowrap; }
}
@media (max-width: 600px) {
  .sub-nav-btn { padding: 0.35rem 0.6rem; font-size: 0.78rem; }
}

/* === 1 MIN — Performance Colour Coding === */
.perf-below  { background: var(--red-bg); }
.perf-within { background: var(--yellow-bg); }
.perf-above  { background: var(--green-bg); }
.perf-below strong  { color: var(--red); }
.perf-within strong { color: var(--yellow); }
.perf-above strong  { color: var(--green); }

.onemin-range {
  font-size: 0.65rem;
  color: var(--grey-400);
  font-weight: 400;
  line-height: 1.2;
}

/* 1 Min sort headers */
#tableOneminStudents th[data-omsort] { cursor: pointer; user-select: none; }
#tableOneminStudents th[data-omsort]:hover { color: var(--teal-600); }

/* 1 Min summary grid on student profile card */
.onemin-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
  width: 100%;
  margin: 0.25rem 0;
}
.onemin-summary-item {
  text-align: center;
  padding: 0.3rem 0.2rem;
  border-radius: 6px;
  background: var(--grey-50);
}
.onemin-summary-item.perf-below  { background: var(--red-bg); }
.onemin-summary-item.perf-within { background: var(--yellow-bg); }
.onemin-summary-item.perf-above  { background: var(--green-bg); }
.onemin-summary-label {
  display: block;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--grey-500);
}
.onemin-summary-score {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--grey-900);
}
.onemin-summary-item.perf-below .onemin-summary-score  { color: var(--red); }
.onemin-summary-item.perf-within .onemin-summary-score { color: var(--yellow); }
.onemin-summary-item.perf-above .onemin-summary-score  { color: var(--green); }

/* 1 Min card on student profile page */
.test-card.tc-1min { border-top-color: var(--gold-500); }
.onemin-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.4rem;
  margin: 0.5rem 0;
}
.onemin-profile-op {
  text-align: center;
  padding: 0.4rem 0.25rem;
  border-radius: 6px;
  background: var(--grey-50);
}
.onemin-profile-op.perf-below  { background: var(--red-bg); }
.onemin-profile-op.perf-within { background: var(--yellow-bg); }
.onemin-profile-op.perf-above  { background: var(--green-bg); }
.onemin-profile-label {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--grey-500);
}
.onemin-profile-score {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--grey-900);
  line-height: 1.3;
}
.onemin-profile-op.perf-below .onemin-profile-score  { color: var(--red); }
.onemin-profile-op.perf-within .onemin-profile-score { color: var(--yellow); }
.onemin-profile-op.perf-above .onemin-profile-score  { color: var(--green); }
.onemin-profile-range {
  font-size: 0.6rem;
  color: var(--grey-400);
  line-height: 1.2;
}
