/* === AIS Assessment Dashboard — 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: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
  min-height: 56px;
}
.header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.header-logo { height: 40px; width: auto; flex-shrink: 0; }
.header-brand-text { display: flex; flex-direction: column; }
.header-brand-text h1 { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.header-school { font-size: 0.65rem; font-weight: 500; opacity: 0.8; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-300); }
.header-nav { display: flex; gap: 0.2rem; justify-content: center; align-items: center; }
.nav-btn {
  background: transparent;
  color: rgba(255,255,255,0.75);
  border: none;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius);
  transition: all 0.15s;
  white-space: nowrap;
}
.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); }

/* Tests dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-trigger { display: flex; align-items: center; gap: 4px; }
.nav-arrow { font-size: 0.65rem; opacity: 0.6; transition: transform 0.2s; }
.nav-dropdown.open .nav-arrow { transform: rotate(180deg); }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  min-width: 140px;
  padding: 6px;
  z-index: 200;
}
.nav-dropdown.open .nav-dropdown-menu { display: block; }
.nav-dropdown-item {
  display: block;
  width: 100%;
  padding: 8px 14px;
  border: none;
  background: none;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--grey-700);
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.12s;
}
.nav-dropdown-item:hover { background: var(--teal-50); color: var(--teal-900); }
.nav-dropdown-item.active { background: var(--teal-100); color: var(--teal-900); font-weight: 600; }

/* === 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; position: relative; }
.filter-search input { width: 100%; }
.filter-search-results {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  max-height: 280px;
  overflow-y: auto;
  z-index: 100;
  margin-top: 2px;
}
.filter-search-results.open { display: block; }
.filter-search-results .search-result-item {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--grey-100);
}
.filter-search-results .search-result-item:last-child { border-bottom: none; }
.filter-search-results .search-result-item:hover { background: var(--gold-50); }
.filter-search-results .search-result-item .yr {
  font-size: 0.75rem;
  color: var(--grey-400);
  background: var(--grey-100);
  padding: 0.1rem 0.5rem;
  border-radius: 10px;
  white-space: nowrap;
  margin-left: 0.5rem;
}

/* === 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;
}

/* Profile card — grouped 2 or 3 column layout */
.student-profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 2rem;
}
.student-profile-grid.has-support {
  grid-template-columns: 1fr 1fr 1fr;
}
.profile-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.profile-col-support {
  border-left: 2px solid var(--grey-100);
  padding-left: 1.5rem;
}
.profile-col-support .profile-flag-badge {
  display: inline-block;
  margin-top: 0.15rem;
}
@media (max-width: 700px) {
  .student-profile-grid,
  .student-profile-grid.has-support {
    grid-template-columns: 1fr;
  }
  .profile-col-support {
    border-left: none;
    border-top: 2px solid var(--grey-100);
    padding-left: 0;
    padding-top: 0.75rem;
    margin-top: 0.25rem;
  }
}

.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; }
.dob-missing { background: var(--gold-100); }

/* === 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;
  justify-self: end;
}
.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 { grid-template-columns: 1fr auto; padding: 0.6rem 0; }
  .header-nav { grid-column: 1 / -1; width: 100%; overflow-x: auto; padding-bottom: 0.25rem; justify-content: flex-start; }
  .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.35rem 0.55rem; font-size: 0.78rem; }
  .header-brand-text h1 { font-size: 0.95rem; }
}

/* 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: removed — no longer used */

/* === 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); }
a.sub-nav-btn { text-decoration: none; display: inline-block; }
.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);
}
.about-list a {
  color: var(--teal-600);
  text-decoration: none;
}
.about-list a:hover {
  text-decoration: underline;
}
.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-eal-exited {
  color: var(--green);
  font-weight: 600;
  font-size: 0.82rem;
}
.profile-flag-send {
  background: #f0e6f6;
  color: #7d3c98;
  border: 1px solid #d7bde2;
}
.profile-flag-diagnosis {
  background: #fdecea;
  color: #b71c1c;
  border: 1px solid #ffcdd2;
}
.profile-diag-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.1rem;
}
.send-edit-field { margin-top: 0.5rem; }
.send-edit-btn {
  background: none;
  border: 1px solid var(--grey-300);
  color: var(--grey-600);
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 500;
}
.send-edit-btn:hover { background: var(--grey-100); border-color: var(--grey-400); }

/* SEND edit modal */
.send-edit-modal-card { max-width: 400px; }
.send-edit-subtitle { font-size: 0.82rem; color: var(--grey-500); margin: -0.25rem 0 1rem; }
.send-diag-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 1rem;
  margin-bottom: 1.25rem;
}
.send-diag-option {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.84rem;
  cursor: pointer;
}
.send-diag-option input { margin: 0; cursor: pointer; }
.send-edit-status { font-size: 0.8rem; color: var(--red); margin-top: 0.5rem; min-height: 1.2em; }

/* School house badges */
.house-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  background: var(--grey-100);
  color: var(--grey-700);
  border: 1px solid var(--grey-200);
}
.house-badge.house-garuda  { background: #e3f2fd; color: #1565c0; border-color: #90caf9; }
.house-badge.house-komodo  { background: #fff9c4; color: #f9a825; border-color: #fff176; }
.house-badge.house-naga    { background: #fce4ec; color: #c62828; border-color: #ef9a9a; }
.house-badge.house-sempati { background: #e8f5e9; color: #2e7d32; border-color: #a5d6a7; }

/* DIBELS growth indicators */
.growth-positive { color: var(--green); font-weight: 600; }
.growth-negative { color: var(--red); font-weight: 600; }

/* Small EAL/SEND badges for student list */
.eal-badge-sm {
  display: inline-block;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
  white-space: nowrap;
}
.send-badge-sm {
  display: inline-block;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 600;
  background: #fce4ec;
  color: #c62828;
  border: 1px solid #ef9a9a;
  cursor: help;
}

/* === EAL STATUS & MOVEMENT BADGES === */
.eal-status-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--grey-900);
}
.eal-badge-improved  { background: #d4edda; color: #155724; }
.eal-badge-maintained { background: var(--gold-100); color: #856404; }
.eal-badge-regressed  { background: #f8d7da; color: #721c24; }

/* === EAL VIEWS (within EAL section) === */
.eal-view { display: none; }
.eal-view.active { display: block; }
.selected-row td { background: var(--teal-50) !important; }

/* === EAL KPI ACCENT VARIANTS === */
.kpi-card.kpi-teal { border-left-color: var(--teal-600); }
.kpi-card.kpi-gold { border-left-color: var(--gold-500); }

/* === EAL Student Info Grid === */
.student-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.35rem 1rem;
  font-size: 0.9rem;
  color: var(--grey-700);
}
.student-info-grid strong {
  font-size: 1.05rem;
  color: var(--grey-900);
}

/* === EAL Sort Headers === */
.data-table th[data-ealsort] { cursor: pointer; user-select: none; }
.data-table th[data-ealsort]:hover { color: var(--teal-600); }

/* === DISABLED NAV DROPDOWN ITEMS === */
.nav-dropdown-item.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* Manual match dropdown */
.unmatched-link-select {
  font-size: 0.8rem;
  padding: 0.25rem;
  border: 1px solid var(--grey-200);
  border-radius: 4px;
  max-width: 220px;
}

/* === PROFILE TEST CARDS === */
.profile-test-cards {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 1rem;
}

/* Subject group sections on profile */
.subject-group {
  margin-bottom: 1.25rem;
}
.subject-group-heading {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--grey-500);
  margin-bottom: 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--grey-200);
}
.subject-group-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 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); }
.test-card.clickable-card { cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; }
.test-card.clickable-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.12); }
.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);
}

/* --- Recommendation comments on cards --- */
.tc-recommendation {
  margin-top: 0.5rem;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  font-size: 0.78rem;
  line-height: 1.4;
}
.tc-recommendation.rec-good {
  background: var(--green-bg);
  color: #1a7a3a;
  border-left: 3px solid var(--green);
}
.tc-recommendation.rec-monitor {
  background: var(--gold-100);
  color: #8a6d10;
  border-left: 3px solid var(--gold-500);
}
.tc-recommendation.rec-action {
  background: var(--red-bg);
  color: #9e2a22;
  border-left: 3px solid var(--red);
}

/* --- Overall student summary --- */
.student-summary {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}
.student-summary.rec-good {
  background: var(--green-bg);
  color: #1a7a3a;
  border-left: 4px solid var(--green);
}
.student-summary.rec-monitor {
  background: var(--gold-100);
  color: #8a6d10;
  border-left: 4px solid var(--gold-500);
}
.student-summary.rec-action {
  background: var(--red-bg);
  color: #9e2a22;
  border-left: 4px solid var(--red);
}

/* === 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;
}

/* ================================================================
   HELP PAGE
   ================================================================ */

.help-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.help-header h2 { margin: 0; }

.help-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 1.5rem;
  padding: 14px;
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.help-tab {
  padding: 8px 16px;
  border: 2px solid var(--grey-200);
  background: var(--white);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.15s;
}
.help-tab:hover { border-color: var(--teal-700); color: var(--teal-700); }
.help-tab.active { background: var(--teal-900); color: var(--white); border-color: var(--teal-900); }

.help-section { display: none; }
.help-section.active { display: block; }

.help-steps { margin: 1em 0; }
.help-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.help-step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: var(--teal-900);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}
.help-step strong { display: block; margin-bottom: 2px; }

.help-tip {
  background: var(--gold-100);
  border-left: 4px solid var(--gold-500);
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  margin: 12px 0;
  font-size: 0.95rem;
}
.help-note {
  background: var(--teal-50);
  border-left: 4px solid var(--teal-500);
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  margin: 12px 0;
  font-size: 0.95rem;
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.help-grid-item {
  background: var(--grey-50);
  border: 1px solid var(--grey-200);
  border-radius: 8px;
  padding: 14px;
  text-align: center;
  font-size: 0.9rem;
}
.help-grid-item strong { display: block; color: var(--teal-900); margin-bottom: 4px; }
.help-grid-admin { opacity: 0.45; border-style: dashed; }

.help-swatch {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--grey-200);
  background: var(--white);
}
.help-swatch-red { background: #f8d7da; border-color: #f5c6cb; }
.help-swatch-green { background: #d4edda; border-color: #c3e6cb; }

.help-colour-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--grey-100);
  font-size: 0.95rem;
}

.help-faq-list { margin-top: 0.5em; }
.help-faq {
  margin-bottom: 8px;
  border: 1px solid var(--grey-200);
  border-radius: 8px;
  overflow: hidden;
}
.help-faq summary {
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 600;
  background: var(--grey-50);
  font-size: 0.95rem;
  list-style: none;
}
.help-faq summary::-webkit-details-marker { display: none; }
.help-faq summary::before {
  content: '+ ';
  color: var(--teal-700);
  font-weight: 700;
}
.help-faq[open] summary::before { content: '\2212  '; }
.help-faq[open] summary { background: var(--teal-50); }
.help-faq p { padding: 12px 16px; margin: 0; font-size: 0.95rem; color: var(--grey-500); }

/* ================================================================
   PRESENTATION OVERLAY
   ================================================================ */

.pres-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #111;
}
.pres-overlay.active { display: block; }

.pres-close {
  position: fixed;
  top: 16px;
  right: 24px;
  z-index: 10001;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  padding: 8px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  backdrop-filter: blur(4px);
}
.pres-close:hover { background: rgba(0,0,0,0.8); }

.pres-deck {
  position: relative;
  width: 100vw;
  height: 100vh;
}

.pres-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px 80px 80px;
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
  overflow-y: auto;
  color: var(--grey-900);
}
.pres-slide.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.pres-slide--title {
  background: linear-gradient(135deg, var(--teal-900) 0%, var(--teal-700) 100%);
  color: var(--white);
}
.pres-slide--light { background: var(--white); }
.pres-slide--dark {
  background: var(--teal-900);
  color: var(--white);
}
.pres-slide--gold {
  background: linear-gradient(135deg, var(--gold-500) 0%, var(--gold-400) 100%);
  color: var(--teal-900);
}

.pres-inner { max-width: 960px; width: 100%; }
.pres-slide h1 { font-size: 3.2rem; margin-bottom: 0.3em; }
.pres-slide h2 { font-size: 2.2rem; margin-bottom: 0.5em; }
.pres-slide h3 { font-size: 1.3rem; margin-bottom: 0.3em; }
.pres-subtitle { font-size: 1.4rem; opacity: 0.85; margin-bottom: 0.5em; }

.pres-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  margin-top: 1em;
}
.pres-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 1em;
}

.pres-list { list-style: none; padding: 0; }
.pres-list li {
  padding: 6px 0 6px 20px;
  position: relative;
  font-size: 1.1rem;
  line-height: 1.5;
}
.pres-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-500);
}
.pres-slide--gold .pres-list li::before { background: var(--teal-900); }
.pres-slide--dark .pres-list li::before { background: var(--gold-500); }

.pres-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 1.2em 0;
}
.pres-kpi {
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  border-left: 4px solid var(--gold-500);
}
.pres-kpi-num {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--gold-500);
  line-height: 1;
  margin-bottom: 4px;
}
.pres-kpi-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.7;
}

.pres-feature {
  background: var(--grey-50);
  border-radius: 10px;
  padding: 22px;
  border-top: 3px solid var(--gold-500);
}
.pres-feature h3 { color: var(--teal-900); }
.pres-feature p { font-size: 0.95rem; color: var(--grey-500); }

.pres-impact {
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 22px;
}

.pres-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1em;
  font-size: 1rem;
}
.pres-table th { background: var(--teal-900); color: var(--white); padding: 10px 14px; text-align: left; font-weight: 600; }
.pres-table td { padding: 10px 14px; border-bottom: 1px solid var(--grey-200); }
.pres-table tr:nth-child(even) td { background: var(--grey-50); }

.pres-badge-done { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 0.8rem; font-weight: 600; background: #d4edda; color: #155724; }
.pres-badge-planned { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 0.8rem; font-weight: 600; background: #d1ecf1; color: #0c5460; }

.pres-highlight {
  background: rgba(245,183,49,0.12);
  border: 2px solid var(--gold-500);
  border-radius: 10px;
  padding: 16px;
}

.pres-timeline { position: relative; padding-left: 28px; margin-top: 1em; }
.pres-timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gold-500);
}
.pres-tl-item {
  position: relative;
  margin-bottom: 1.2em;
  padding-left: 20px;
  font-size: 1.1rem;
  line-height: 1.5;
}
.pres-tl-dot {
  position: absolute;
  left: -24px;
  top: 5px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--gold-500);
  border: 3px solid var(--teal-900);
}

/* Presentation nav bar */
.pres-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  padding: 12px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10000;
  color: var(--white);
}
.pres-dots { display: flex; gap: 6px; }
.pres-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  cursor: pointer;
  transition: all 0.2s;
}
.pres-dot.active { background: var(--gold-500); transform: scale(1.3); }
.pres-dot:hover { background: rgba(255,255,255,0.5); }

.pres-nav-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--white);
  padding: 7px 18px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.15s;
}
.pres-nav-btn:hover { border-color: var(--gold-500); color: var(--gold-500); }
.pres-nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.pres-counter { font-size: 0.85rem; opacity: 0.5; font-variant-numeric: tabular-nums; }

@media (max-width: 768px) {
  .pres-slide { padding: 40px 24px 80px; }
  .pres-slide h1 { font-size: 2rem; }
  .pres-slide h2 { font-size: 1.5rem; }
  .pres-cols, .pres-grid-3 { grid-template-columns: 1fr; }
  .pres-kpi-row { grid-template-columns: 1fr 1fr; }
  .help-step { flex-direction: column; gap: 8px; }
}

/* === MANAGE SUB-VIEWS === */
.manage-view { display: none; }
.manage-view.active { display: block; }

/* === DATA MATCHING === */
.matching-stats-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem 1.25rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--teal-700);
  flex-wrap: wrap;
}
.matching-stats-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--grey-900);
}
.matching-stats-text .matching-count {
  color: var(--teal-700);
}
.matching-progress {
  flex: 1;
  max-width: 300px;
  min-width: 120px;
  height: 8px;
  background: var(--grey-200);
  border-radius: 4px;
  overflow: hidden;
}
.matching-progress-fill {
  height: 100%;
  background: var(--teal-500);
  border-radius: 4px;
  transition: width 0.3s ease;
}
.matching-stats-pct {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--teal-600);
}
.matching-help-text {
  font-size: 0.82rem;
  color: var(--grey-500);
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* PAT student selector in matching table */
.matching-select {
  width: 100%;
  min-width: 220px;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--grey-200);
  border-radius: var(--radius);
  font-size: 0.82rem;
  background: var(--white);
  color: var(--grey-900);
}
.matching-select:focus {
  outline: none;
  border-color: var(--teal-400);
  box-shadow: 0 0 0 3px rgba(0,92,75,0.15);
}

/* Link / Unlink buttons */
.btn-link-match {
  background: var(--teal-50);
  color: var(--teal-700);
  border: 1px solid var(--teal-100);
}
.btn-link-match:hover { background: var(--teal-100); }
.btn-link-match:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn-unlink-match {
  background: var(--orange-bg);
  color: var(--orange);
  border: 1px solid #f5cba7;
}
.btn-unlink-match:hover { background: #fde3cd; }
.btn-override-match {
  background: #f0f0f5;
  color: var(--grey-500);
  border: 1px solid var(--grey-200);
}
.btn-override-match:hover { background: var(--grey-100); color: var(--grey-700); }
.btn-no-pat {
  background: var(--grey-bg);
  color: var(--grey-500);
  border: 1px solid var(--grey-200);
  margin-left: 0.25rem;
}
.btn-no-pat:hover { background: var(--grey-100); color: var(--grey-700); }
.btn-restore-match {
  background: var(--teal-50);
  color: var(--teal-700);
  border: 1px solid var(--teal-100);
}
.btn-restore-match:hover { background: var(--teal-100); }

/* Match type badges */
.match-type-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.match-type-auto {
  background: var(--green-bg);
  color: var(--green);
}
.match-type-manual {
  background: var(--gold-100);
  color: var(--orange);
}
.match-type-nopat {
  background: var(--grey-bg);
  color: var(--grey-500);
}

/* Manual match row highlight */
.matching-row-manual { background: var(--gold-50); }
.matching-row-nopat { background: var(--grey-bg); }

/* Help box */
.matching-help-box {
  background: var(--teal-50);
  border: 1px solid var(--teal-100);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--grey-700);
}
.matching-help-box.hidden { display: none; }
.matching-help-box h4 {
  margin: 0 0 0.4rem;
  font-size: 0.9rem;
  color: var(--teal-700);
}
.matching-help-box h4:not(:first-child) { margin-top: 0.8rem; }
.matching-help-box ul,
.matching-help-box ol {
  margin: 0.3rem 0 0.5rem 1.2rem;
  padding: 0;
}
.matching-help-box li { margin-bottom: 0.25rem; }
.matching-help-note {
  font-size: 0.78rem;
  color: var(--grey-500);
  font-style: italic;
  margin-top: 0.5rem;
  margin-bottom: 0;
}

/* ========== DIBELS Styles ========== */

/* DIBELS profile card (orange border) */
.test-card.tc-dibels { border-top-color: var(--orange); }

/* Missing tests card on profile */
.test-card.tc-missing { border-top-color: var(--red); background: var(--red-bg); }
.tc-missing-list { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.5rem; }
.tc-missing-item {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(192, 57, 43, 0.12);
  color: var(--red);
}

/* DIBELS profile — period grouping */
.dibels-profile-period {
  margin-bottom: 0.75rem;
}
.dibels-profile-period:last-child { margin-bottom: 0; }
.dibels-profile-period-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--grey-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

/* DIBELS profile — score grid (same pattern as 1 Min) */
.dibels-profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 0.4rem;
}
.dibels-profile-op {
  background: var(--grey-50);
  border-radius: 6px;
  padding: 0.4rem 0.5rem;
  text-align: center;
}
.dibels-profile-op.perf-below   { background: var(--red-bg); }
.dibels-profile-op.perf-within  { background: var(--yellow-bg); }
.dibels-profile-op.perf-above   { background: var(--green-bg); }
.dibels-profile-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--grey-500);
  letter-spacing: 0.03em;
}
.dibels-profile-score {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--grey-700);
  line-height: 1.2;
}
.dibels-profile-op.perf-below .dibels-profile-score   { color: var(--red); }
.dibels-profile-op.perf-within .dibels-profile-score  { color: var(--yellow); }
.dibels-profile-op.perf-above .dibels-profile-score   { color: var(--green); }

/* ── InitiaLit ──────────────────────────────────────────────── */
.initialit-table th.initialit-comp-th {
  font-size: 0.72em;
  white-space: nowrap;
  padding: 4px 6px;
}
.initialit-table td.num {
  min-width: 48px;
}

/* Profile card component grid */
/* InitiaLit hybrid layout */
.il-top-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  align-items: stretch;
  height: 200px;
}
.il-latest-panel {
  flex-shrink: 0;
  width: 140px;
  background: #f0e6f6;
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  overflow-y: auto;
}
.il-latest-session {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7d3c98;
  margin-bottom: 0.25rem;
}
.il-latest-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.2rem 0.35rem;
  border-radius: 4px;
  font-size: 0.78rem;
}
.il-latest-row.perf-above  { background: var(--green-bg); }
.il-latest-row.perf-within { background: var(--yellow-bg); }
.il-latest-row.perf-below  { background: var(--red-bg); }
.il-latest-lbl { color: var(--grey-600); font-size: 0.72rem; flex: 1; }
.il-latest-val { font-weight: 700; font-size: 0.88rem; margin-left: 0.35rem; }
.il-latest-total {
  margin-top: 0.3rem;
  padding-top: 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-top: 1px solid rgba(0,0,0,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.il-latest-pct { font-weight: 700; font-size: 0.9rem; }
.il-latest-total.perf-above .il-latest-pct { color: var(--green); }
.il-latest-total.perf-within .il-latest-pct { color: var(--yellow); }
.il-latest-total.perf-below .il-latest-pct { color: var(--red); }

.il-chart-area {
  flex: 1;
  min-width: 0;
  position: relative;
  height: 100%;
}
.il-chart-area canvas { width: 100% !important; }

/* Scrollable session history */
.il-sessions-scroll {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--grey-300) transparent;
}
.il-sessions-scroll::-webkit-scrollbar { height: 4px; }
.il-sessions-scroll::-webkit-scrollbar-thumb { background: var(--grey-300); border-radius: 2px; }

.il-session-card {
  flex-shrink: 0;
  width: 120px;
  min-height: 200px;
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: 6px;
  padding: 0.5rem 0.6rem;
}
.il-session-card.il-session-latest {
  border-color: #7d3c98;
  background: #f9f4fd;
}
.il-sc-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--grey-500);
  margin-bottom: 0.35rem;
  letter-spacing: 0.04em;
}
.il-session-latest .il-sc-label { color: #7d3c98; }
.il-sc-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  padding: 0.12rem 0.25rem;
  border-radius: 3px;
  margin-bottom: 0.1rem;
}
.il-sc-row.perf-above  { background: var(--green-bg); }
.il-sc-row.perf-within { background: var(--yellow-bg); }
.il-sc-row.perf-below  { background: var(--red-bg); }
.il-sc-lbl { color: var(--grey-500); }
.il-sc-val { font-weight: 600; }
.il-sc-total {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: right;
  padding-top: 0.25rem;
  border-top: 1px solid var(--grey-100);
}
.il-sc-total.perf-above  { color: var(--green); }
.il-sc-total.perf-within { color: var(--yellow); }
.il-sc-total.perf-below  { color: var(--red); }
.il-session-placeholder { opacity: 0.38; border-style: dashed !important; }
.il-sc-empty { text-align: center; font-size: 1.1rem; color: var(--grey-300); padding: 1.2rem 0 0.5rem; }
.initialit-profile-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0;
}
.initialit-profile-comp {
  flex: 1 1 80px;
  min-width: 70px;
  border-radius: 6px;
  padding: 6px 8px;
  background: var(--card-bg, #f8f8f8);
  text-align: center;
}
.initialit-profile-comp-label {
  font-size: 0.7em;
  color: #666;
  margin-bottom: 2px;
}
.initialit-profile-comp-score {
  font-size: 1.05em;
  font-weight: 700;
}
.initialit-profile-comp.perf-above  { background: var(--green-bg); }
.initialit-profile-comp.perf-within { background: var(--yellow-bg); }
.initialit-profile-comp.perf-below  { background: var(--red-bg); }
.initialit-profile-comp.perf-above  .initialit-profile-comp-score { color: var(--green); }
.initialit-profile-comp.perf-within .initialit-profile-comp-score { color: var(--yellow); }
.initialit-profile-comp.perf-below  .initialit-profile-comp-score { color: var(--red); }

.initialit-profile-window {
  margin-bottom: 10px;
}
.initialit-profile-window-label {
  font-size: 0.78em;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.initialit-profile-total {
  font-size: 0.82em;
  margin-top: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
}
.initialit-profile-total.perf-above  { background: var(--green-bg);  color: var(--green); }
.initialit-profile-total.perf-within { background: var(--yellow-bg); color: var(--yellow); }
.initialit-profile-total.perf-below  { background: var(--red-bg);    color: var(--red); }
.initialit-total-pct { margin-left: 4px; opacity: 0.85; }

/* Nav accent */
.tc-initialit .tc-header { background: #5b3a8a; color: #fff; }
.initialit-insight {
  font-size: 0.9em;
  margin: 0 0 12px 0;
  color: #444;
  line-height: 1.5;
}
.initialit-chart-wrap {
  position: relative;
  min-height: 160px;
}

/* DIBELS assessment box summary (Students search page) */
.dibels-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  margin-top: 0.3rem;
}
.dibels-summary-item {
  background: var(--grey-50);
  border-radius: 6px;
  padding: 0.3rem 0.4rem;
  text-align: center;
}
.dibels-summary-item.perf-below   { background: var(--red-bg); }
.dibels-summary-item.perf-within  { background: var(--yellow-bg); }
.dibels-summary-item.perf-above   { background: var(--green-bg); }
.dibels-summary-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--grey-400);
}
.dibels-summary-score {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--grey-700);
}
.dibels-summary-item.perf-below .dibels-summary-score   { color: var(--red); }
.dibels-summary-item.perf-within .dibels-summary-score  { color: var(--yellow); }
.dibels-summary-item.perf-above .dibels-summary-score   { color: var(--green); }

/* DIBELS table row click */
#tableDibelsStudents tbody tr { cursor: pointer; }
#tableDibelsStudents th[data-dbsort] { cursor: pointer; }
#tableDibelsStudents th[data-dbsort]:hover { color: var(--teal-600); }

/* Matching source toggle tabs */
.matching-source-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}
.matching-source-btn {
  padding: 0.4rem 1rem;
  border: 1px solid var(--grey-200);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--grey-500);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.matching-source-btn:hover {
  background: var(--grey-50);
  color: var(--grey-700);
}
.matching-source-btn.active {
  background: var(--teal-700);
  color: var(--white);
  border-color: var(--teal-700);
}

/* === TEACHERS & CLASSES === */
.teachers-intro {
  color: var(--grey-500);
  font-size: 0.88rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}
.teachers-form-card {
  border-left: 4px solid var(--teal-600);
}
.teachers-form-card h3 {
  margin-bottom: 0.75rem;
  font-size: 1rem;
  color: var(--teal-700);
}
.teachers-form-row {
  display: grid;
  grid-template-columns: 1fr 2fr 2fr;
  gap: 0.75rem;
  align-items: end;
}
.teachers-form-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--grey-500);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.teachers-input {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--grey-200);
  border-radius: 6px;
  font-size: 0.9rem;
  transition: border-color 0.15s;
  background: var(--white);
}
.teachers-input:focus {
  outline: none;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 2px rgba(0,128,128,0.12);
}
.teachers-form-actions {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
}
.teachers-actions {
  display: flex;
  gap: 0.5rem;
}
.teachers-empty {
  text-align: center;
  color: var(--grey-400);
  padding: 1.5rem;
  font-size: 0.9rem;
}
#tableTeachers td { vertical-align: middle; }
#tableTeachers .teacher-name-cell { font-weight: 600; }
#tableTeachers .teacher-email-cell { color: var(--grey-500); font-size: 0.88rem; }
#tableTeachers .teacher-count-cell { text-align: center; }
.btn-edit-teacher {
  background: var(--teal-50);
  color: var(--teal-700);
  border: 1px solid var(--teal-200);
  border-radius: 4px;
  padding: 0.25rem 0.6rem;
  font-size: 0.78rem;
  cursor: pointer;
  margin-right: 0.25rem;
}
.btn-edit-teacher:hover { background: var(--teal-100); }
.btn-delete-teacher {
  background: var(--red-50, #fef2f2);
  color: var(--red);
  border: 1px solid #fca5a5;
  border-radius: 4px;
  padding: 0.25rem 0.6rem;
  font-size: 0.78rem;
  cursor: pointer;
}
.btn-delete-teacher:hover { background: #fee2e2; }
@media (max-width: 768px) {
  .teachers-form-row { grid-template-columns: 1fr; }
}

/* === STUDENTS PAGE — Full List with Test Availability === */
.data-table th[data-stusort] { cursor: pointer; user-select: none; }
.data-table th[data-stusort]:hover { color: var(--teal-600); }
.data-table .clickable-row { cursor: pointer; }
.data-table .clickable-row:hover { background: var(--teal-50); }
.test-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 700;
}
.test-check-yes {
  background: var(--green-bg);
  color: var(--green);
}
.test-check-no {
  background: var(--grey-100);
  color: var(--grey-300);
}
.kpi-badge {
  display: inline-block;
  background: var(--teal-50);
  color: var(--teal-700);
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 600;
}

/* === MISSING TESTS DASHBOARD === */
.missing-config-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
}
.missing-config-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.missing-config-row strong {
  min-width: 110px;
}
.missing-year-check {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  cursor: pointer;
}
.missing-class-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.missing-class-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  transition: background 0.15s;
  gap: 1rem;
  flex-wrap: wrap;
}
.missing-class-header:hover {
  background: var(--gold-50, #fffbeb);
}
.missing-class-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--grey-900);
}
.missing-class-title .teacher-label {
  font-weight: 400;
  color: var(--grey-500);
  margin-left: 0.5rem;
}
.missing-class-summary {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
}
.missing-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.missing-badge-ok {
  background: var(--green-bg);
  color: var(--green);
}
.missing-badge-warn {
  background: var(--orange-bg, #fff7ed);
  color: var(--orange, #ea580c);
}
.missing-badge-alert {
  background: var(--red-bg, #fef2f2);
  color: var(--red);
}
.missing-class-detail {
  display: none;
  padding: 0 1.25rem 1rem;
  border-top: 1px solid var(--grey-100);
}
.missing-class-detail.expanded {
  display: block;
}
.missing-class-expand-icon {
  font-size: 0.75rem;
  color: var(--grey-400);
  transition: transform 0.2s;
  margin-left: 0.25rem;
}
.missing-class-header.expanded .missing-class-expand-icon {
  transform: rotate(90deg);
}
.missing-class-detail .data-table td {
  font-size: 0.84rem;
  padding: 0.4rem 0.6rem;
}

/* === School Percentile Badges === */
.percentile-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 0.75rem;
  vertical-align: middle;
  margin-left: 0.35rem;
  letter-spacing: 0.02em;
  line-height: 1.3;
  cursor: help;
}
.percentile-badge.pct-high {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid var(--green);
}
.percentile-badge.pct-mid {
  background: var(--gold-100);
  color: var(--gold-500);
  border: 1px solid var(--gold-500);
}
.percentile-badge.pct-low {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid var(--red);
}

/* ================================================================
   FOUNDATION PAT PROFILE CARD
   ================================================================ */

/* Card accent — deep teal to distinguish from standard PAT */
.test-card.tc-foundation-pat { border-top-color: #1a7a6e; }

/* Window badge inside header */
.tc-window-badge {
  font-size: 0.72rem;
  font-weight: 400;
  background: rgba(255,255,255,0.25);
  border-radius: 10px;
  padding: 0.1rem 0.5rem;
  margin-left: 0.5rem;
  letter-spacing: 0.02em;
}

/* Three score blocks in a row */
.fpat-scores-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.fpat-score-block {
  flex: 1;
  background: var(--grey-50, #f9fafb);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  text-align: center;
}
.fpat-score-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--grey-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}
.fpat-score-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--grey-900, #111);
}
.fpat-score-denom {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--grey-500);
}

/* Stanine section */
.fpat-stanine-section { margin-bottom: 1rem; }
.fpat-stanine-label {
  font-size: 0.8rem;
  color: var(--grey-600);
  margin-bottom: 0.35rem;
}
.fpat-stanine-label em { font-style: normal; font-weight: 600; }

/* 9-cell stanine track */
.fpat-stanine-track {
  display: flex;
  gap: 3px;
}
.fpat-stanine-cell {
  flex: 1;
  height: 22px;
  border-radius: 3px;
  background: var(--grey-100, #f3f4f6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
}
.fpat-s-low    { background: var(--red, #c0392b); }
.fpat-s-below  { background: var(--gold-500, #e67e22); }
.fpat-s-avg    { background: var(--teal-600, #16a085); }
.fpat-s-above  { background: var(--green, #27ae60); }
.fpat-s-high   { background: #1a6b3a; }

/* Strand bar chart */
.fpat-strands-section { margin-bottom: 1rem; }
.fpat-strands-heading {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--grey-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
}
.fpat-strand-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}
.fpat-strand-label {
  width: 2.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--grey-700);
  text-align: right;
  cursor: default;
}
.fpat-bar-wrap {
  flex: 1;
  height: 10px;
  background: var(--grey-100, #f3f4f6);
  border-radius: 5px;
  overflow: hidden;
}
.fpat-bar {
  height: 100%;
  border-radius: 5px;
  transition: width 0.4s ease;
}
.fpat-bar-good { background: var(--green, #27ae60); }
.fpat-bar-mid  { background: var(--gold-500, #e67e22); }
.fpat-bar-low  { background: var(--red, #c0392b); }
.fpat-strand-pct {
  width: 2.5rem;
  font-size: 0.72rem;
  color: var(--grey-600);
  text-align: right;
}
.fpat-strand-key {
  font-size: 0.65rem;
  color: var(--grey-400);
  margin-top: 0.4rem;
  line-height: 1.5;
}

/* Historical window chips */
.fpat-history {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}
.fpat-hist-chip {
  font-size: 0.7rem;
  background: var(--grey-100);
  color: var(--grey-600);
  padding: 0.2rem 0.5rem;
  border-radius: 10px;
}

/* Auto-generated comment */
.fpat-comment {
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--grey-700);
  background: rgba(26, 122, 110, 0.06);
  border-left: 3px solid #1a7a6e;
  padding: 0.5rem 0.75rem;
  border-radius: 0 6px 6px 0;
  margin-bottom: 0.75rem;
}

/* Collapsible teacher guide */
.fpat-guide {
  border: 1px solid var(--grey-200, #e5e7eb);
  border-radius: 6px;
  overflow: hidden;
}
.fpat-guide-summary {
  padding: 0.5rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--grey-600);
  cursor: pointer;
  user-select: none;
  list-style: none;
}
.fpat-guide-summary::-webkit-details-marker { display: none; }
.fpat-guide-body {
  padding: 0.75rem;
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--grey-700);
  border-top: 1px solid var(--grey-100);
  background: var(--grey-50, #f9fafb);
}
.fpat-guide-body p { margin: 0 0 0.5rem; }
.fpat-guide-body p:last-child { margin-bottom: 0; }
.fpat-guide-caution {
  color: var(--gold-700, #b7791f);
  background: rgba(230, 126, 34, 0.08);
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  font-size: 0.76rem;
}

/* ===== FEEDBACK WIDGET ===== */
.feedback-btn {
  display: none; /* shown after auth:success */
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 900;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--teal-500);
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  transition: background 0.15s, transform 0.15s;
}
.feedback-btn:hover { background: var(--teal-600); transform: scale(1.08); }

.feedback-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 901;
  background: rgba(0,0,0,0.35);
}
.feedback-backdrop.open { display: block; }

.feedback-modal {
  display: none;
  position: fixed;
  bottom: 5.5rem;
  right: 1.5rem;
  z-index: 902;
  width: min(380px, calc(100vw - 2rem));
  background: #fff;
  border-radius: var(--radius, 8px);
  box-shadow: var(--shadow, 0 4px 20px rgba(0,0,0,0.18));
  flex-direction: column;
  overflow: hidden;
}
.feedback-modal.open { display: flex; }

.feedback-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem 0.75rem;
  border-bottom: 1px solid var(--teal-100);
  background: var(--teal-50);
}
.feedback-modal-header h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--teal-800);
}
.feedback-modal-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  color: var(--grey-400);
  padding: 0 0.2rem;
}
.feedback-modal-close:hover { color: var(--grey-700); }

.feedback-modal-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.feedback-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--grey-500, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.feedback-page-tag {
  display: inline-block;
  background: var(--teal-100);
  color: var(--teal-800);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  text-transform: capitalize;
  margin-bottom: 0.25rem;
}
.feedback-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--teal-100);
  border-radius: 6px;
  font-size: 0.88rem;
  font-family: inherit;
  resize: vertical;
  min-height: 100px;
  transition: border-color 0.15s;
}
.feedback-textarea:focus {
  outline: none;
  border-color: var(--teal-500);
}
.feedback-select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--grey-300);
  border-radius: var(--radius);
  font: inherit;
  background: #fff;
}
.feedback-private-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--grey-600, #555);
}
.feedback-char-count {
  font-size: 0.75rem;
  color: var(--grey-400);
  text-align: right;
}

.feedback-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--teal-100);
  background: var(--teal-50);
}

/* ===== FEEDBACK ADMIN TABLE ===== */
.feedback-admin-badge {
  display: inline-block;
  background: var(--teal-100);
  color: var(--teal-700, #0f766e);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.feedback-status-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
}
.feedback-status-new       { background: #fef9c3; color: #854d0e; }
.feedback-status-queued    { background: #dbeafe; color: #1e40af; }
.feedback-status-actioned  { background: #dcfce7; color: #166534; }
.feedback-status-dismissed { background: #f3f4f6; color: #6b7280; }

.feedback-vis-pill {
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: filter 0.15s ease;
}
.feedback-vis-pill:hover  { filter: brightness(0.94); }
.feedback-vis-pill:active { filter: brightness(0.88); }

.feedback-action-submit {
  background: var(--teal-600, #0d9488);
  color: #fff;
  border: none;
  font-weight: 600;
  white-space: nowrap;
}
.feedback-action-submit:hover { background: var(--teal-700, #0f766e); }
.feedback-action-submit:disabled { opacity: 0.6; cursor: wait; }

/* Claude analysis note rendered inside table cell */
.feedback-claude-note {
  margin-top: 0.5rem;
  padding: 0.5rem 0.6rem;
  background: #f0fdf4;
  border-left: 3px solid #86efac;
  border-radius: 0 4px 4px 0;
  font-size: 0.8rem;
}
.feedback-claude-tag {
  display: inline-block;
  background: #dcfce7;
  color: #166534;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  margin-right: 0.3rem;
  margin-bottom: 0.35rem;
}
.feedback-priority-high  { background: #fee2e2; color: #991b1b; }
.feedback-priority-medium { background: #fef9c3; color: #854d0e; }
.feedback-priority-low   { background: #f3f4f6; color: #4b5563; }
.feedback-claude-summary {
  color: #166534;
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.feedback-claude-action {
  color: #4b5563;
  font-style: italic;
}

/* ===== MARY CHAT WIDGET ===== */
.mary-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
  pointer-events: none;
}

.mary-toggle {
  pointer-events: all;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--teal-600, #0d9488);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(13,148,136,0.35);
  transition: background 0.15s, transform 0.12s;
  position: relative;
}
.mary-toggle:hover { background: var(--teal-700, #0f766e); transform: scale(1.06); }
.mary-toggle svg { width: 22px; height: 22px; }

.mary-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

.mary-panel {
  pointer-events: all;
  width: 340px;
  max-height: 520px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.16);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(12px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.mary-panel.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}

.mary-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--teal-600, #0d9488);
  color: #fff;
  flex-shrink: 0;
}
.mary-panel-title { display: flex; flex-direction: column; gap: 0.1rem; }
.mary-panel-title strong { font-size: 0.95rem; }
.mary-panel-title span { font-size: 0.75rem; opacity: 0.85; }
.mary-panel-close {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.25rem;
  opacity: 0.8;
  line-height: 1;
}
.mary-panel-close:hover { opacity: 1; }

.mary-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: #f8fafc;
}

.mary-msg {
  display: flex;
  max-width: 88%;
}
.mary-msg--user { align-self: flex-end; justify-content: flex-end; }
.mary-msg--assistant { align-self: flex-start; }

.mary-bubble {
  padding: 0.55rem 0.8rem;
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.mary-msg--user .mary-bubble {
  background: var(--teal-600, #0d9488);
  color: #fff;
  border-bottom-right-radius: 3px;
}
.mary-msg--assistant .mary-bubble {
  background: #fff;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  border-bottom-left-radius: 3px;
}

/* Typing indicator */
.mary-dots {
  display: inline-flex;
  gap: 3px;
  align-items: center;
  height: 1em;
}
.mary-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal-400, #2dd4bf);
  animation: maryDot 1.2s infinite ease-in-out;
}
.mary-dots span:nth-child(2) { animation-delay: 0.2s; }
.mary-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes maryDot {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

.mary-compose {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  border-top: 1px solid #e2e8f0;
  background: #fff;
  flex-shrink: 0;
}

.mary-input {
  flex: 1;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  font-size: 0.85rem;
  font-family: inherit;
  resize: none;
  line-height: 1.4;
  max-height: 120px;
  outline: none;
  transition: border-color 0.15s;
}
.mary-input:focus { border-color: var(--teal-500, #14b8a6); }

.mary-send {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--teal-600, #0d9488);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}
.mary-send:hover { background: var(--teal-700, #0f766e); }
.mary-send:disabled { opacity: 0.5; cursor: wait; }
.mary-send svg { width: 16px; height: 16px; }

@media (max-width: 480px) {
  .mary-panel { width: calc(100vw - 2rem); }
  .mary-widget { right: 1rem; bottom: 1rem; }
}

/* === Shared modal (used by SEND edit and similar in-page modals) === */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem;
  width: 480px;
  max-width: 92vw;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.modal-card h3 { font-size: 1.1rem; font-weight: 700; margin: 0; }
.modal-actions { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 0.25rem; }
.modal-cancel {
  background: none;
  border: 1px solid var(--grey-200);
  border-radius: var(--radius);
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--grey-700);
  transition: all 0.15s;
}
.modal-cancel:hover { background: var(--grey-100); }

/* ============================================================
   MacqLit Profile Card
   ============================================================ */
.tc-macqlit .tc-header { background: #1565c0; color: #fff; }

.mql-warl-row { margin-bottom: 0.75rem; }
.mql-stat-label { font-size: 0.75rem; color: var(--grey-500); margin-bottom: 0.3rem; }
.mql-stat-label strong { color: var(--grey-900); }
.mql-chart-area { height: 160px; position: relative; }

.mql-year-badge {
  display: inline-block;
  font-size: 0.68rem;
  padding: 0.05rem 0.35rem;
  background: var(--grey-100);
  border-radius: 999px;
  color: var(--grey-600);
  margin-left: 0.25rem;
  vertical-align: middle;
}

.mql-parts-row-wrap { margin-bottom: 0.75rem; }
.mql-parts-row {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.3rem;
}
.mql-part-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--grey-300);
  background: var(--grey-50);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--grey-400);
  cursor: default;
}
.mql-part-dot.mql-part-done {
  background: #1565c0;
  border-color: #1565c0;
  color: #fff;
}

.mql-placement-wrap { margin-top: 0.5rem; }
.mql-placement-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 0.3rem;
}
.mql-part-badge {
  display: inline-block;
  background: #1565c0;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius);
}
.mql-placement-score, .mql-sight {
  font-size: 0.78rem;
  color: var(--grey-700);
}
.mql-placement-notes {
  font-size: 0.75rem;
  color: var(--grey-500);
  margin-top: 0.3rem;
  font-style: italic;
}

/* MacqLit WCPM inline bar */
.mql-wcpm-cell { min-width: 120px; }
.mql-wcpm-bar-wrap {
  position: relative;
  height: 24px;
  background: var(--grey-100);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.mql-wcpm-bar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  border-radius: 4px;
  opacity: 0.25;
}
.mql-wcpm-val {
  position: relative;
  padding: 0 0.5rem;
  font-weight: 700;
  font-size: 0.85rem;
  z-index: 1;
}

/* Compact part dots in table */
.mql-parts-row--table { gap: 0.2rem; flex-wrap: nowrap; margin-top: 0; }
.mql-parts-row--table .mql-part-dot {
  width: 20px;
  height: 20px;
  font-size: 0.62rem;
}

/* Unmatched Names manage tab */
.unmatched-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--grey-100);
  flex-wrap: wrap;
}
.unmatched-row:last-child { border-bottom: none; }
.unmatched-name { flex: 0 0 220px; }
.unmatched-raw { font-weight: 600; font-size: 0.88rem; color: var(--grey-900); display: block; }
.unmatched-source {
  font-size: 0.72rem; color: var(--grey-500);
  background: var(--grey-100); padding: 0.1rem 0.4rem;
  border-radius: 999px; display: inline-block; margin-top: 0.2rem;
}
.unmatched-link { flex: 1; display: flex; gap: 0.5rem; align-items: center; position: relative; min-width: 280px; }
.unmatched-search {
  flex: 1; padding: 0.35rem 0.6rem; border: 1px solid var(--grey-300);
  border-radius: var(--radius); font-size: 0.82rem;
}
.unmatched-results {
  position: absolute; top: 100%; left: 0; right: 60px; z-index: 100;
  background: var(--white); border: 1px solid var(--grey-200);
  border-radius: var(--radius); box-shadow: var(--shadow);
  max-height: 200px; overflow-y: auto;
}
.unmatched-result-item {
  padding: 0.4rem 0.75rem; cursor: pointer; font-size: 0.82rem;
}
.unmatched-result-item:hover { background: var(--grey-50); }

/* ── School Overview ─────────────────────────────────────────────────── */
.overview-charts-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem;
}
@media (max-width: 900px) { .overview-charts-row { grid-template-columns: 1fr; } }
.overview-chart-card { padding: 1rem 1.25rem; }
.overview-chart-card h3 { margin: 0 0 0.75rem; font-size: 0.95rem; color: var(--navy); }

.ov-eal-kpi { font-size: 0.82rem; color: var(--grey-600); margin-right: 1rem; }
.ov-eal-improved strong { color: var(--teal-600); }
.overview-eal-kpis { margin-bottom: 0.5rem; }

/* Coverage table */
.cov-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.cov-table th { text-align: center; font-size: 0.75rem; color: var(--grey-500); padding: 0.3rem 0.4rem; border-bottom: 1px solid var(--grey-200); }
.cov-table th:first-child { text-align: left; }
.cov-table td { padding: 0.35rem 0.4rem; border-bottom: 1px solid var(--grey-100); text-align: center; }
.cov-table td:first-child { text-align: left; font-weight: 600; color: var(--grey-700); }
.cov-dot { font-size: 0.85rem; }
.cov-yes { color: var(--teal-600); }
.cov-no  { color: var(--grey-300); }

/* ── Classes Page ────────────────────────────────────────────────────── */
.classes-layout {
  display: grid; grid-template-columns: 180px 1fr; gap: 1.25rem; align-items: start;
}
@media (max-width: 768px) { .classes-layout { grid-template-columns: 1fr; } }

/* Sidebar */
.classes-sidebar {
  position: sticky; top: 1rem;
  background: var(--white); border: 1px solid var(--grey-200);
  border-radius: var(--radius); padding: 0.5rem 0; overflow: hidden;
}
.csb-group { margin-bottom: 0.25rem; }
.csb-group-label {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--grey-400);
  padding: 0.5rem 0.85rem 0.25rem;
  display: flex; align-items: center; gap: 0.4rem;
}
.csb-group-pill {
  font-size: 0.68rem; font-weight: 700;
  background: var(--grey-200); color: var(--grey-600);
  border-radius: 0.8rem; padding: 0.05rem 0.45rem;
  line-height: 1.4;
}
.csb-btn {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 0.45rem 0.85rem;
  border: none; background: none; cursor: pointer; text-align: left;
  font-size: 0.83rem; color: var(--grey-700);
  transition: background 0.12s;
}
.csb-btn:hover { background: var(--grey-50); }
.csb-btn.active { background: var(--teal-50); color: var(--teal-700); font-weight: 700; }
.csb-n { font-size: 0.72rem; color: var(--grey-400); background: var(--grey-100); border-radius: 0.8rem; padding: 0 0.4rem; }
.csb-btn.active .csb-n { background: var(--teal-700); color: #fff; }

/* Year header */
.classes-year-header {
  display: flex; align-items: baseline; gap: 0.75rem; margin-bottom: 1rem;
}
.classes-year-header h2 { margin: 0; font-size: 1.3rem; color: var(--navy); }
.classes-year-total { font-size: 0.85rem; color: var(--grey-500); }

/* Class panels */
.classes-panels {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1rem;
}
.class-panel {
  background: var(--white); border: 1px solid var(--grey-200);
  border-radius: var(--radius); overflow: hidden;
}
.cp-header {
  padding: 0.9rem 1rem; border-bottom: 1px solid var(--grey-100);
  background: var(--grey-50);
}
.cp-code { font-size: 1.4rem; font-weight: 800; color: var(--navy); line-height: 1; }
.cp-teacher { font-size: 0.82rem; color: var(--grey-600); margin: 0.2rem 0 0.5rem; }
.cp-meta { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; font-size: 0.78rem; color: var(--grey-500); }
.cp-badge { border-radius: 0.8rem; padding: 0.1rem 0.5rem; font-size: 0.7rem; font-weight: 700; white-space: nowrap; }
.cp-eal  { background: var(--teal-50); color: var(--teal-700); }
.cp-send { background: #fff3e0; color: #c84b00; }

.cp-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.cp-table thead th { padding: 0.3rem 0.6rem; font-size: 0.72rem; color: var(--grey-400); text-align: left; border-bottom: 1px solid var(--grey-100); }
.cp-row { cursor: pointer; }
.cp-row:hover { background: var(--grey-50); }
.cp-row td { padding: 0.35rem 0.6rem; border-bottom: 1px solid var(--grey-100); }
.cp-row:last-child td { border-bottom: none; }
.cp-num { color: var(--grey-400); font-size: 0.72rem; width: 24px; }
.cp-name { font-weight: 500; }

/* ── Roadmap page ──────────────────────────────────────────────────────── */
.roadmap-doc {
  max-width: 860px;
  padding: 2rem 2.5rem;
  color: var(--grey-800);
}
.roadmap-header { margin-bottom: 2.5rem; }
.roadmap-header h1 { font-size: 1.6rem; font-weight: 700; margin-bottom: 0.3rem; }
.roadmap-meta { font-size: 0.85rem; color: var(--grey-500); }
.roadmap-section { margin-bottom: 2.5rem; }
.roadmap-section h2 {
  font-size: 1.1rem; font-weight: 700;
  border-bottom: 2px solid var(--teal-400);
  padding-bottom: 0.3rem; margin-bottom: 1rem;
  display: flex; align-items: center; gap: 0.6rem;
}
.roadmap-section h3 { font-size: 0.95rem; font-weight: 600; margin: 1rem 0 0.5rem; color: var(--grey-700); }
.roadmap-section p, .roadmap-section li { font-size: 0.9rem; line-height: 1.65; }
.roadmap-section ul { padding-left: 1.4rem; margin: 0; }
.roadmap-section li { margin-bottom: 0.3rem; }

/* Module table */
.roadmap-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; margin-top: 0.75rem; }
.roadmap-table th {
  text-align: left; padding: 0.5rem 0.75rem;
  background: var(--grey-100); color: var(--grey-600);
  font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em;
}
.roadmap-table td { padding: 0.45rem 0.75rem; border-bottom: 1px solid var(--grey-100); }
.roadmap-group-header {
  background: var(--teal-50); font-weight: 700; font-size: 0.82rem;
  color: var(--teal-700); letter-spacing: 0.02em; padding: 0.4rem 0.75rem;
}
.roadmap-sub { padding-left: 1.5rem; color: var(--grey-700); }

/* NOW/NEXT/LATER timeline */
.roadmap-timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 0.75rem; }
.roadmap-phase { background: var(--grey-50); border-radius: 0.5rem; padding: 1rem 1.2rem; }
.roadmap-phase ul { padding-left: 1.2rem; margin: 0.5rem 0 0; }
.roadmap-phase li { font-size: 0.85rem; margin-bottom: 0.4rem; }
.roadmap-phase-label {
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em;
  border-radius: 0.25rem; padding: 0.2rem 0.6rem; display: inline-block; margin-bottom: 0.5rem;
}
.roadmap-phase-now  { background: var(--teal-100); color: var(--teal-800); }
.roadmap-phase-next { background: #fef3c7; color: #92400e; }
.roadmap-phase-later { background: var(--grey-200); color: var(--grey-600); }

/* Future tag + note */
.roadmap-future-tag {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.08em;
  background: var(--grey-200); color: var(--grey-500);
  border-radius: 0.25rem; padding: 0.15rem 0.5rem; text-transform: uppercase;
}
.roadmap-note { font-size: 0.82rem; color: var(--grey-500); font-style: italic; margin-top: 0.75rem; }

@media (max-width: 768px) {
  .roadmap-timeline { grid-template-columns: 1fr; }
  .roadmap-doc { padding: 1.25rem; }
}

/* ── Data tab ──────────────────────────────────────────────────────────── */
.data-tab-upload-card {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  background: var(--white); border: 1px solid var(--grey-200);
  border-radius: var(--radius); padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow); margin-bottom: 1.5rem;
}
.data-tab-upload-card p { font-size: 0.85rem; color: var(--grey-500); margin: 0.25rem 0 0; }
.data-tab-logs h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.75rem; }
.data-tab-logs-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.data-tab-logs-header h3 { margin: 0; }
.data-tab-logs-filters { display: flex; gap: 0.5rem; }
