/* ═══ DESIGN TOKENS ══════════════════════════════════════════════════════
   Accent, motion, elevation, and focus-ring variables.
   Light-theme elevation overrides on html[data-theme="light"].
   ════════════════════════════════════════════════════════════════════════ */
:root {
  /* Accent palette */
  --c-accent:            #FFD028;
  --c-accent-hi:         #FFE060;
  --c-accent-mid:        #E0B20D;
  --c-accent-deep:       #C19909;
  --c-accent-ink:        #0A0A0A;
  --c-accent-text-light: #7A5500;
  /* Motion */
  --dur-fast:   120ms;
  --dur-med:    200ms;
  --dur-slow:   360ms;
  --ease-out:   cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-spring:cubic-bezier(0.34, 1.4, 0.64, 1);
  /* Elevation (dark default — sharp offset + soft drop) */
  --elev-1: 0 1px 0 rgba(0,0,0,.35), 0 2px 6px rgba(0,0,0,.18);
  --elev-2: 0 2px 0 rgba(0,0,0,.40), 0 8px 18px rgba(0,0,0,.28);
  --elev-3: 0 4px 0 rgba(0,0,0,.50), 0 18px 36px rgba(0,0,0,.40);
  /* Focus ring */
  --ring: 0 0 0 2px #FFD028, 0 0 0 4px rgba(255,208,40,.25);
}
/* Softer warm shadows on light parchment backgrounds */
html[data-theme="light"] {
  --elev-1: 0 1px 0 rgba(80,60,20,.10), 0 2px 6px rgba(80,60,20,.10);
  --elev-2: 0 2px 0 rgba(80,60,20,.12), 0 8px 18px rgba(80,60,20,.14);
  --elev-3: 0 4px 0 rgba(80,60,20,.15), 0 18px 36px rgba(80,60,20,.20);
}

@font-face {
  font-family: "TradeGothic-BoldCondTwenty";
  src: url("../fonts/TradeGothic-BoldCondTwenty.eot");
  src:
    url("../fonts/TradeGothic-BoldCondTwenty.eot?#iefix")
      format("embedded-opentype"),
    url("../fonts/TradeGothic-BoldCondTwenty.woff2") format("woff2"),
    url("../fonts/TradeGothic-BoldCondTwenty.woff") format("woff"),
    url("../fonts/TradeGothic-BoldCondTwenty.ttf") format("truetype"),
    url("../fonts/TradeGothic-BoldCondTwenty.svg#TradeGothic-BoldCondTwenty")
      format("svg");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

html {
  overflow-x: hidden;
}
html,
body {
  max-width: 100%;
}
body {
  font-family: "Source Sans Pro", sans-serif;
  padding-top: 65px;
}

/* Global typography hierarchy */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "TradeGothic-BoldCondTwenty", "Arial Narrow", Arial, sans-serif;
}
#nav-holder a {
  font-family: "TradeGothic-BoldCondTwenty", "Arial Narrow", Arial, sans-serif;
  text-decoration: none;
}
#nav-holder a:hover {
  text-decoration: none;
}

/* ── Global link baseline (kills Bootstrap blue on unclassed <a> tags) ── */
a {
  color: var(--c-accent);
  text-decoration: none;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: transparent;
  transition: color var(--dur-med), text-decoration-color var(--dur-med);
}
a:hover {
  text-decoration-line: underline;
  text-decoration-color: currentColor;
}
@media (prefers-color-scheme: light) {
  body[class*="page-"] a { color: var(--c-accent-text-light); }
}
html[data-theme="light"] body[class*="page-"] a {
  color: var(--c-accent-text-light);
}
@media (hover: none) {
  .btn-outline-success:hover {
    background-color: inherit !important;
    color: var(--bs-btn-color) !important;
  }
}
.form-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.form-loader .loader-icon {
  width: 25vw;
  max-width: 100px;
}
.form-loader .loader-icon path {
  fill: #ccc;
}

.super-small {
  font-size: 0.625em;
}

.folders-list ul {
  margin: 0;
  padding: 0;
  list-style-type: none;
}
.folders-list .btn-sm {
  padding: 0.2rem 0.5rem;
  font-size: 0.875rem;
  line-height: 1;
  border-radius: 0;
}

img {
  max-width: 100%;
  height: auto;
}

.siteHeader {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: 60px;
  border: none;
  z-index: 999;
  box-shadow: 0 1px 0 rgba(255,255,255,.06), 0 2px 8px rgba(0,0,0,.4);
}
/* overflow:hidden removed — was clipping the settings submenu dropdown */
.siteHeader::after {
  content: "";
  display: table;
  clear: both;
}
.siteHeader .container-fluid {
  padding-left: 0;
  padding-right: 0;
}
.logo {
  width: 128px;
  background: #000;
  position: absolute;
  left: 0;
  padding-bottom: 1px;
}
.logo img {
  max-height: 59px;
}
.app-version {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.5625rem;
  letter-spacing: 0.05em;
}
/* ID needed to out-specify the global `body[class*="page-"] a` link-color rule (both themes) */
#appVersionLink {
  color: var(--c-muted);
  text-decoration: none;
}
#appVersionLink:hover,
#appVersionLink:focus-visible {
  color: var(--c-accent);
  text-decoration: underline;
}

.icon-24x24 {
  width: 24px;
  height: 24px;
  margin-bottom: 3px;
}

#nav-holder {
  padding-left: 128px;
  background: rgba(0, 0, 0, 0.95);
  width: 100%;
  display: table;
}
.nav {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  padding-left: 0;
  margin-bottom: 0;
  list-style: none;
  text-transform: uppercase;
}
#nav-holder .nav {
  float: left;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 1.5px;
}
#nav-holder .nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
ul li,
ol li {
  list-style-position: inside;
}
#nav-holder .nav ul li {
  float: left;
  margin-bottom: 0;
}

#nav-holder .nav ul li a {
  color: #fff;
  text-decoration: none;
  padding: 16px 5px;
  display: block;
  position: relative;
  -webkit-transition: all 0.3s ease 0s;
  -moz-transition: all 0.3s ease 0s;
  -ms-transition: all 0.3s ease 0s;
  transition: all 0.3s ease 0s;
}
.submenu {
  margin-bottom: 25px !important;
}
#nav-holder .nav ul ul {
  background: #fff;
  position: absolute;
  opacity: 0;
  visibility: hidden;
  padding-bottom: 10px;
  min-width: 220px;
  font-size: 0.875rem;
  -webkit-transition: all 0.3s ease 0s;
  -moz-transition: all 0.3s ease 0s;
  -ms-transition: all 0.3s ease 0s;
  transition: all 0.3s ease 0s;
}
#nav-holder .nav ul ul li a {
  display: block;
  padding: 10px 20px;
  color: #fff;
  font-weight: 400;
  font-family: inherit;
  letter-spacing: 1px;
}

.header-login,
.header-search,
.mobileNav-close,
.header-hamburger {
  float: left;
  position: relative;
  min-width: 56px;
  max-width: 56px;
}
.header-login .button {
  position: relative;
  padding: 8px 0 8px;
  text-align: center;
  cursor: pointer;
  min-height: 60px;
  display: flex;
  align-items: center;
  color: #fff;
  font-size: 1.125rem;
  background: transparent;
  border: none;
  font-family: inherit;
  width: 100%;
}
.header-login a {
  text-decoration: none;
}
.header-login .nav-submenu {
  right: 0;
  left: auto;
  min-width: 160px;
}
/* #headerLogin (ID) beats html[data-theme="light"] body[class*="page-"] a —
 * that global rule has 2 attribute selectors + 3 element selectors, which
 * out-specifies a plain 2-class rule; the dropdown is always on the dark
 * header regardless of site theme, so it must never inherit that color. */
#headerLogin .nsub-link {
  display: block;
  padding: 10px 16px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
#headerLogin .nsub-link:hover {
  color: #ffd028;
  background: rgba(255, 255, 255, 0.06);
}
#headerLogin .nsub-link + .nsub-link {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.header-right {
  float: right;
  min-height: 60px;
}

.header-login {
  border: 0;
  background-color: transparent;
}

.login-menu {
  text-align: right;
}
.search-box,
.login-menu {
  height: 60px;
  right: 55px;
  overflow: hidden;
  background: #000;
  position: absolute;
  z-index: 2;
  right: 56px;
  top: 0;
  width: 0;
  -webkit-transition: all 0.4s cubic-bezier(0.075, 0.82, 0.165, 1);
  -moz-transition: all 0.4s cubic-bezier(0.075, 0.82, 0.165, 1);
  -ms-transition: all 0.4s cubic-bezier(0.075, 0.82, 0.165, 1);
  transition: all 0.4s cubic-bezier(0.075, 0.82, 0.165, 1);
}

.grecaptcha-badge {
  right: 5px !important;
  width: 60px !important;
}
.grecaptcha-badge:hover {
  width: 303px !important;
}

header a .svg-icon use,
header .button .svg-icon use {
  fill: none;
  stroke: #ffffff;
  stroke-width: 1;
  stroke-miterlimit: 10;
}
header a:hover .svg-icon use,
header .button:hover .svg-icon use {
  stroke: #f9d222;
  stroke-width: 1.5;
}
.header-login.active .button .svg-icon use,
.header-search.active .button .svg-icon use {
  stroke: #f9d222;
  stroke-width: 1.5;
}
/* Settings icon is fill-based — override the stroke rules */
header a .svg-icon use[href="#menu-settings"],
header .button .svg-icon use[href="#menu-settings"] {
  fill: #ffffff;
  stroke: none;
}
header a:hover .svg-icon use[href="#menu-settings"],
header .button:hover .svg-icon use[href="#menu-settings"] {
  fill: #f9d222;
  stroke: none;
}
.header-login.active .button .svg-icon use[href="#menu-settings"] {
  fill: #f9d222;
  stroke: none;
}

.menu-right {
  margin-top: 0;
  padding-top: 0;
}
.menu-right ul li {
  height: 60px;
  margin-right: 32px;
}
.menu-right ul li a {
  height: 100%;
  padding-top: 17px;
  border: 0;
}
.menu-right ul li:last-child {
  margin-right: 15px;
}

.mobileNav-close {
  float: right;
  border-left: 1px solid rgba(255, 255, 255, 0.4);
  border-right: 0;
}
.mobileNav-close .button {
  padding-top: 17px;
  text-align: center;
}
.header-hamburger .button {
  padding-top: 17px;
  text-align: center;
}

.header-login.active {
  background-color: #000;
}

.header-hamburger {
  border: 0;
  background-color: transparent;
  border-left: 1px solid transparent;
  border-right: 1px solid transparent;
}

.login-menu ul li {
  border-right: 0;
  margin-right: 3px;
}
.login-menu ul li a {
  padding: 23px 6px;
}
.login-menu ul li a:hover {
  color: #f9d222;
}
.login-menu ul li a i {
  margin-right: 3px;
  transition: margin 300ms;
}
.login-menu ul li a:hover i {
  margin-right: 0;
  margin-left: 3px;
}
.search-box input[type="text"],
.search-box input[type="search"],
.login-menu input[type="text"],
.login-menu input[type="search"] {
  border-left: 0;
}

.search-box ul,
.login-menu ul {
  width: auto;
  display: inline-flex;
}

.mobile-top-nav {
  padding: 0;
  float: right;
}
.mobile-top-nav ul li {
  margin-right: 32px;
  height: 60px;
}
.mobile-top-nav ul li:last-child {
  margin-right: 15px;
}
.mobile-top-nav ul li a {
  position: relative;
  height: 100%;
  padding-top: 17px;
}

.header-user-avatar {
  margin: 0;
  padding: 0;
}
#mobile-nav-holder .header-user-avatar {
  margin: 0 auto;
  padding: 0;
  width: 24px;
  height: 24px;
}
#mobile-nav-holder .login-menu li:first-child {
  border-left: 0;
}
#mobile-nav-holder .header-search {
  float: right;
}
#mobile-nav-holder .header-cart-icon {
  float: right;
}
#mobile-nav-holder .header-login {
  border-left: 0;
}
#mobileNav ul li ul li a:hover {
  color: #f9d222;
}

/* Menu Styles */
#desktopNav ul li {
  display: inline-block;
}
#desktopNav ul li a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
  padding: 18px 16px;
}
#desktopNav ul li a .svg-icon {
  flex-shrink: 0;
}
#desktopNav ul li a:hover {
  color: #f9d222;
}
#desktopNav ul li.active > a {
  color: #f9d222;
}
#desktopNav ul li.active > a .svg-icon use {
  stroke: #f9d222;
  stroke-width: 1.5;
}
#desktopNav ul li.active > a .svg-icon use[href="#menu-settings"] {
  fill: #f9d222;
  stroke: none;
}

/* ── Settings submenu ──────────────────────────────────────────────────── */
#desktopNav ul li.has-nsub {
  position: relative;
}
/* Trigger button — visually identical to a nav <a> */
#desktopNav ul li.has-nsub .nav-sub-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 60px;
  box-sizing: border-box;
  color: #fff;
  background: none;
  border: none;
  padding: 18px 16px;
  margin: 0;
  line-height: 1;
  cursor: pointer;
  font-family: "TradeGothic-BoldCondTwenty", "Arial Narrow", Arial, sans-serif;
  font-size: 1rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  white-space: nowrap;
}
#desktopNav ul li.has-nsub .nav-sub-trigger .svg-icon {
  flex-shrink: 0;
}
#desktopNav ul li.has-nsub .nav-sub-trigger .svg-icon use {
  fill: #fff;
  stroke: none;
}
#desktopNav ul li.has-nsub .nav-sub-trigger:hover,
#desktopNav ul li.has-nsub.nsub-open .nav-sub-trigger {
  color: #f9d222;
}
#desktopNav ul li.has-nsub .nav-sub-trigger:hover .svg-icon use,
#desktopNav ul li.has-nsub.nsub-open .nav-sub-trigger .svg-icon use {
  fill: #f9d222;
}
#desktopNav ul li.has-nsub.active .nav-sub-trigger {
  color: #f9d222;
}
#desktopNav ul li.has-nsub.active .nav-sub-trigger .svg-icon use {
  fill: #f9d222;
}
/* Submenu panel */
.nav-submenu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 225px;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: none;
  border-radius: 0 0 6px 6px;
  padding: 8px 0 2px;
  z-index: 1010;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
}
/* Show on hover (desktop) or JS-toggled class (mobile) */
.has-nsub:hover .nav-submenu,
.has-nsub.nsub-open .nav-submenu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.nsub-row {
  display: flex;
  align-items: center;
  padding: 5px 10px;
  gap: 10px;
}
.nsub-lbl {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.625rem;
  color: rgba(255, 255, 255, 0.4);
  width: 36px;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.nsub-btns {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}
.nsub-btn {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.625rem;
  padding: 3px 7px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 3px;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  transition:
    background 0.12s,
    color 0.12s,
    border-color 0.12s;
  white-space: nowrap;
}
.nsub-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}
.nsub-btn.active {
  background: #ffd028;
  border-color: #ffd028;
  color: #000;
}
.nsub-footer-link {
  display: block;
  padding: 8px 14px 7px;
  margin-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  letter-spacing: 0.3px;
}
.nsub-footer-link:hover {
  color: #ffd028;
}
@media (max-width: 768px) {
  #desktopNav ul li.has-nsub .nav-sub-trigger {
    padding: 18px 5px;
  }
  #desktopNav ul li.has-nsub .nav-sub-trigger .menu-text {
    display: none;
  }
  .nav-submenu {
    right: 0;
    left: auto;
  }
}
@media (min-width: 769px) {
  #desktopNav ul li.has-nsub .nav-sub-trigger .menu-text {
    display: inline;
    margin-left: 0;
  }
}

#headerLogin {
  max-width: 140px;
}
.user-name,
.user-role {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-role {
  font-size: 0.7em;
  color: #f9d222;
}

/* Mobile: Hide menu text, show icons only */
@media (max-width: 768px) {
  #desktopNav ul li a {
    padding: 18px 12px;
  }
  #desktopNav ul li a .menu-text {
    display: none;
  }
}

/* Desktop: Show both icons and text */
@media (min-width: 769px) {
  #desktopNav ul li a .menu-text {
    display: inline;
    margin-left: 3px;
  }
}

.hero-image {
  margin-top: 60px;
  width: 100%;
  position: relative;
  overflow: hidden;
}
#mainContent {
  background: #fff !important;
  width: 100%;
  overflow: visible !important;
}

pre {
  margin: 0;
  font-family: sans-serif;
  font-size: 0.7em;
}

.html-print-ul {
  margin-block-start: 0em;
  margin-block-end: 0em;
  padding-inline-start: 1.2em;
  font-size: 0.85em;
  line-height: 1em;
  list-style: none;
}
.html-print-ul .span-key,
.span-key {
  color: red;
}
.html-print-ul .span-equals,
.span-equals {
  color: grey;
}
.html-print-ul .span-value,
.span-value {
  color: blue;
}

@keyframes rotating {
  from {
    -ms-transform: rotate(0deg);
    -moz-transform: rotate(0deg);
    -webkit-transform: rotate(0deg);
    -o-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  to {
    -ms-transform: rotate(360deg);
    -moz-transform: rotate(360deg);
    -webkit-transform: rotate(360deg);
    -o-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
.rotating {
  -webkit-animation: rotating 2s linear infinite;
  -moz-animation: rotating 2s linear infinite;
  -ms-animation: rotating 2s linear infinite;
  -o-animation: rotating 2s linear infinite;
  animation: rotating 2s linear infinite;
}

.switch-description {
  font-size: 0.75em;
}

/* Bootstrap override */
.form-check {
  padding-left: 0;
  margin-bottom: 15px;
}
.form-check .form-check-input {
  float: none;
}
.form-check .form-check-label {
  margin-right: 5px;
}
.form-switch .form-check-input {
  margin-left: 0;
  margin-right: 0;
}
.submit-button-wrapper {
  justify-content: right !important;
  display: none;
}

.lfa-yellow {
  color: #ffd028;
}
.btn-lfa-yellow {
  color: #212529;
  background-color: #ffd028;
  transition:
    background-color 1s ease,
    color 0.8s ease;
  --bs-border-opacity: 1;
  border-color: rgba(var(--bs-dark-rgb), var(--bs-border-opacity)) !important;
}
.btn-lfa-yellow:hover,
.btn-lfa-yellow:focus-visible {
  color: #ffd028;
  background-color: #212529;
}

.btn {
  border-radius: 0 !important;
  transition: all 0.3s ease;
  font-family: "TradeGothic-BoldCondTwenty", "Arial Narrow", Arial, sans-serif;
}

/* ── Universal button tactile press ─────────────────────────────────────
   Applies translateY(1px) to every bespoke button class on mousedown.
   Uses [class*="btn"] for breadth; excludes :disabled elements.
   ─────────────────────────────────────────────────────────────────────── */
[class*="btn"]:not(:disabled):active,
[class*="btn"]:not(.btn-close):not(:disabled):active {
  transform: translateY(1px) !important;
  transition-duration: var(--dur-fast) !important;
}

/* ── Universal focus ring (WCAG 2.4.7) ──────────────────────────────── */
[class*="btn"]:focus-visible,
a:focus-visible {
  outline: none !important;
  box-shadow: var(--ring) !important;
}

.form-control {
  border-radius: 0 !important;
}
.form-check-input:checked {
  background-color: #198754;
  border-color: #198754;
}

form#mainForm {
  --color-button-text: 26, 27, 24;
  --btn-duration-animate: 0.5s;
}

.btn.float-start,
.btn.float-end {
  position: relative;
  overflow: hidden;
}
.btn.float-start::after,
.btn.float-end::after {
  content: "";
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  transform: skew(-15deg);
  background-image: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 0, 0.25),
    transparent
  );
}
.btn.float-end::after {
  left: -100%;
}
.btn.float-start::after {
  left: 100%;
}
.btn.float-end:hover::after {
  animation: shine-right 0.5s ease 0.2s;
}
.btn.float-start:hover::after {
  animation: shine-left 0.5s ease 0.2s;
}

@keyframes shine-right {
  100% {
    left: 100%;
  }
}
@keyframes shine-left {
  100% {
    left: -100%;
  }
}

.pulse {
  -webkit-animation: pulse 2s infinite;
  animation: pulse 2s infinite;
  transform: scale(1);
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(20, 33, 61, 0.8);
  }
  70% {
    box-shadow: 0 0 0 10px transparent;
  }
  to {
    box-shadow: 0 0 0 0 transparent;
  }
}
.pulse-green {
  -webkit-animation: pulse-green 2s infinite;
  animation: pulse-green 2s infinite;
  transform: scale(1);
}
@keyframes pulse-green {
  0% {
    box-shadow: 0 0 0 0 rgba(50, 189, 8, 0.5);
  }
  70% {
    box-shadow: 0 0 0 5px rgba(50, 189, 8, 0);
  }
  to {
    box-shadow: 0 0 0 0 rgba(50, 189, 8, 0);
  }
}
.fade-out {
  -webkit-animation: fadeOut 0.2s;
  animation: fadeOut 0.2s;
  opacity: 0;
}
@keyframes fadeOut {
  0% {
    opacity: 1;
    visibility: visible;
  }
  to {
    opacity: 0;
    visibility: hidden;
  }
}
.fade-in {
  -webkit-animation: fadeIn 0.2s;
  animation: fadeIn 0.2s;
  opacity: 1;
}
@keyframes fadeIn {
  0% {
    opacity: 0;
    visibility: hidden;
  }
  to {
    opacity: 1;
    visibility: visible;
  }
}

/* ═══ STUDENT STATS POPUP ════════════════════════════════════════════ */
.sm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 1050;
  padding: 20px 12px;
  overflow-y: auto;
}
.sm-panel {
  background: var(--c-surface, #0f0f0f);
  border: 1px solid var(--c-border-md, #2e2e2e);
  width: 100%;
  max-width: 460px;
  position: relative;
  font-family: "Source Sans Pro", sans-serif;
  color: var(--c-text, #c8bfb0);
  flex-shrink: 0;
}
.sm-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: var(--c-muted, #888);
  font-size: 1.125rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px 6px;
  transition: color 0.2s;
}
.sm-close:hover {
  color: #ffd028;
}

/* Header */
.sm-hd {
  padding: 24px 20px 16px;
  border-bottom: 1px solid var(--c-border, #1e1e1e);
}
.sm-eyebrow {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 0.5625rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--c-muted, #888);
  margin-bottom: 8px;
}
.sm-name {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 1.75rem;
  letter-spacing: 1px;
  color: var(--c-text-str, #ede5d5);
  line-height: 1;
  margin-bottom: 4px;
  padding-right: 28px;
}
.sm-sub {
  font-family: "Source Code Pro", monospace;
  font-size: 0.625rem;
  letter-spacing: 1px;
  color: var(--c-muted, #888);
}

/* Stat boxes */
.sm-stats {
  display: flex;
  border-bottom: 1px solid var(--c-border, #1e1e1e);
}
.sm-stat {
  flex: 1;
  padding: 14px 10px;
  border-right: 1px solid var(--c-border, #1e1e1e);
  text-align: center;
}
.sm-stat:last-child {
  border-right: none;
}
.sm-stat-value {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 1.5rem;
  line-height: 1;
  color: #ffd028;
  margin-bottom: 4px;
}
.sm-stat-label {
  font-family: "Source Code Pro", monospace;
  font-size: 0.5rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--c-muted, #888);
}
.sm-val-absent {
  color: #bf3a3a;
}
.sm-val-auth {
  color: #6bb5e8;
}
.sm-risk-green .sm-stat-value {
  color: var(--c-green, #5ebf3a);
}
.sm-risk-amber .sm-stat-value {
  color: #ffd028;
}
.sm-risk-red .sm-stat-value {
  color: #bf3a3a;
}

/* Risk banner */
.sm-risk {
  font-family: "Source Code Pro", monospace;
  font-size: 0.625rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 8px 20px;
  border-bottom: 1px solid var(--c-border, #1e1e1e);
}
.sm-risk.sm-risk-green {
  color: var(--c-green, #5ebf3a);
  background: var(--c-gd, rgba(94, 191, 58, 0.07));
}
.sm-risk.sm-risk-amber {
  color: #ffd028;
  background: rgba(255, 208, 40, 0.07);
}
.sm-risk.sm-risk-red {
  color: #bf3a3a;
  background: rgba(191, 58, 58, 0.1);
}

/* Breakdown bars */
.sm-breakdown {
  padding: 12px 20px;
  border-bottom: 1px solid var(--c-border, #1e1e1e);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.sm-bd-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sm-bd-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sm-bd-label {
  font-family: "Source Code Pro", monospace;
  font-size: 0.5625rem;
  letter-spacing: 1px;
  color: var(--c-muted, #888);
  width: 68px;
  flex-shrink: 0;
}
.sm-bd-bar {
  flex: 1;
  height: 3px;
  background: var(--c-border, #1e1e1e);
}
.sm-bd-fill {
  height: 100%;
  display: block;
  transition: width 0.4s;
}
.sm-bd-val {
  font-family: "Source Code Pro", monospace;
  font-size: 0.625rem;
  color: var(--c-text, #c8bfb0);
  width: 20px;
  text-align: right;
  flex-shrink: 0;
}

/* Per-lesson section */
.sm-section-hd {
  font-family: "Source Code Pro", monospace;
  font-size: 0.5625rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--c-muted, #888);
  padding: 12px 20px 4px;
}
.sm-lesson {
  padding: 8px 20px 10px;
  border-bottom: 1px solid var(--c-border, #1e1e1e);
}
.sm-lesson:last-child {
  border-bottom: none;
}
.sm-lesson-title {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 0.875rem;
  letter-spacing: 1px;
  color: var(--c-text-str, #ede5d5);
  margin-bottom: 6px;
}
.sm-sched-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sm-sched-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sm-sched-date {
  font-family: "Source Code Pro", monospace;
  font-size: 0.625rem;
  color: var(--c-muted, #888);
  width: 88px;
  flex-shrink: 0;
}
.sm-sched-status {
  font-family: "Source Code Pro", monospace;
  font-size: 0.625rem;
  letter-spacing: 0.5px;
  min-width: 80px;
}
.sm-sched-notes {
  font-family: "Source Code Pro", monospace;
  font-size: 0.625rem;
  color: var(--c-muted, #888);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Loading / empty / error */
.sm-loading,
.sm-error,
.sm-empty {
  padding: 40px 20px;
  text-align: center;
  font-family: "Source Code Pro", monospace;
  font-size: 0.6875rem;
  color: var(--c-muted, #888);
  letter-spacing: 1px;
}
.sm-error {
  color: #bf3a3a;
}

/* Stats trigger button (on student card) */
.sm-trigger {
  font-family: "Source Code Pro", monospace;
  font-size: 0.5625rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--c-muted, #555);
  background: none;
  border: none;
  padding: 3px 0 0;
  cursor: pointer;
  display: block;
  transition: color 0.2s;
}
.sm-trigger:hover {
  color: #ffd028;
}

/* ═══ SHARED ERROR BLOCK ══════════════════════════════════════════════ */
/* Works across all page themes via CSS variable fallbacks */
.err-block {
  border: 1px solid var(--c-border, #1e1e1e);
  background: var(--c-surface, #0f0f0f);
  padding: 32px 24px;
  text-align: left;
}
.err-eyebrow {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 0.625rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--c-muted, #555);
  margin-bottom: 10px;
}
.err-title {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 2.25rem;
  letter-spacing: 2px;
  color: #bf3a3a;
  line-height: 1;
  margin-bottom: 16px;
}
.err-msg {
  font-size: 0.875rem;
  color: var(--c-text, #c8bfb0);
  line-height: 1.6;
  margin-bottom: 24px;
}
.err-msg p {
  margin-bottom: 6px;
}
.err-back-btn {
  display: inline-block;
  font-family: "Source Code Pro", monospace;
  font-size: 0.6875rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 10px 20px;
  border: 1px solid var(--c-border-md, #2e2e2e);
  color: var(--c-text, #c8bfb0);
  background: transparent;
  text-decoration: none;
  transition:
    border-color 0.2s,
    color 0.2s;
}
.err-back-btn:hover {
  border-color: #c19909;
  color: #c19909;
}

/* ═══ SHARED PAGE VARIABLES ════════════════════════════════════════════
   All body.page-* classes inherit these tokens. Page-specific additions
   (e.g. --att-* status colours) live in their own section below.
   ════════════════════════════════════════════════════════════════════ */

body[class*="page-"] {
  background: #080808;
  color: #c8bfb0;
  font-family: "Source Sans Pro", Georgia, serif;
  --c-surface: #0f0f0f;
  --c-border: #1e1e1e;
  --c-border-md: #2e2e2e;
  --c-muted: #888888;
  --c-text: #c8bfb0;
  --c-text-str: #ede5d5;
  --c-yd: rgba(255, 208, 40, 0.08);
  --c-green: #5ebf3a;
  --c-gd: rgba(94, 191, 58, 0.12);
  --c-red: #bf3a3a;
  --c-rd: rgba(191, 58, 58, 0.12);
  --c-chd: #0c0b09; /* card header bg — always dark regardless of theme */
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
  }
  body[class*="page-"] {
    background: #f5f0e6;
    color: #3a3028;
    --c-surface: #fdfaf4;
    --c-border: #d8cfba;
    --c-border-md: #c4b89e;
    --c-muted: #6a6050;
    --c-text: #3a3028;
    --c-text-str: #1a1410;
    --c-yd: rgba(255, 208, 40, 0.12);
    --c-green: #3a9e1a;
    --c-gd: rgba(58, 158, 26, 0.1);
    --c-red: #b5372f;
    --c-rd: rgba(181, 55, 47, 0.1);
    --c-chd: #0c0b09;
  }
  /* Unchecked checkboxes: transparent so light background shows through */
  body[class*="page-"] .form-check-input:not(:checked) {
    --bs-form-check-bg: transparent;
    background: transparent;
  }
  /* ── Yellow accent text → dark amber on light backgrounds ── */
  /* #FFD028 is ~1.5:1 on white; #7A5500 is ~6.4:1 */
  .courses-title,
  .lessons-title,
  .students-title,
  .settings-title,
  .home-title,
  .dash-title,
  .att-title,
  .home-hero,
  .man-idx-title,
  .man-doc-title,
  .man-idx-card-title {
    color: #7a5500;
    text-shadow: 0 0 2px black;
  }
  .c-stat-value,
  .l-stat-value,
  .s-stat-value,
  .att-stat-value,
  .att-mark-stat-value,
  .dash-stat-value {
    color: #7a5500;
  }
  .l-sched-today {
    color: #7a5500;
  }
  .s-note-shared-badge {
    color: #6d4c00;
    background: rgba(122, 85, 0, 0.12);
  }
  .man-body a {
    color: #7a5500;
  }
  .lfa-yellow {
    color: #7a5500;
  }
  /* #E0B20D is ~1.6:1 on white — swap to dark amber */
  .dash-mark-btn {
    border-color: #7a5500;
    color: #7a5500;
  }
  .l-btn-edit {
    border-color: #7a5500;
    color: #7a5500;
  }
  .l-btn-edit:hover {
    border-color: #7a5500;
    color: #0a0a0a;
    background: #ffd028;
  }
  .s-search-active strong,
  .s-db-search-btn {
    color: #7a5500;
  }
  .l-sched-comp-partial {
    color: #7a5500;
    background: rgba(122, 85, 0, 0.1);
  }
  .att-sched-badge {
    border-color: #7a5500;
    color: #7a5500;
  }
  .att-stu-grp-badge {
    border-color: #7a5500;
    color: #7a5500;
  }
  /* Dash mark btn hover/active */
  .dash-mark-btn:hover,
  .dash-mark-btn:active {
    border-color: #7a5500;
    color: #0a0a0a;
    background: #ffd028;
  }
  /* Stats popup: yellow values need outline on light bg */
  .sm-stat-value,
  .sm-risk-amber .sm-stat-value {
    color: #ffd028;
    text-shadow: 0 0 2px black;
  }
  .sm-risk.sm-risk-amber {
    color: #c19909;
  }
}

/* ── Shared page wrappers ────────────────────────────────────────────── */
.courses-wrap,
.lessons-wrap,
.students-wrap,
.settings-wrap,
.att-wrap,
.home-wrap,
.dash-wrap {
  text-align: left;
  padding: 0 2px;
}

/* ── Shared page title ───────────────────────────────────────────────── */
.courses-title,
.lessons-title,
.students-title,
.settings-title,
.home-title,
.dash-title {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 2.5rem;
  letter-spacing: 2px;
  color: #ffd028;
  text-shadow: 0 0 var(--c-text-str);
  line-height: 1;
  margin-bottom: 4px;
  padding: 5px 5px 0 5px;
}
@media (min-width: 576px) {
  .courses-title,
  .lessons-title,
  .students-title,
  .settings-title,
  .home-title,
  .dash-title {
    font-size: 3.25rem;
  }
}

/* ── Shared page subtitle ────────────────────────────────────────────── */
.courses-sub,
.lessons-sub,
.students-sub,
.settings-sub,
.att-sub,
.home-sub,
.dash-sub {
  /*font-family: 'Source Code Pro', monospace;*/
  font-size: 1rem;
  color: var(--c-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.dash-sub {
  font-size: 1rem;
  font-weight: bold;
  color: var(--c-text-str);
}
#dashTime {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  font-weight: normal;
  color: var(--c-muted);
  letter-spacing: 0.04em;
}

/* ═══ COURSES PAGE — Production Call Sheet ════════════════════════════ */

/* ── Stats strip — mobile: role full-width top, then 2-col numbers ─── */
.c-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--c-border);
  margin-bottom: 20px;
}
.c-stat {
  position: relative;
  padding: 12px 14px;
  background: var(--c-surface);
  border-right: 1px solid var(--c-border);
  box-shadow: var(--elev-1);
}
.c-stat::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    -55deg,
    transparent 0,
    transparent 8px,
    rgba(255, 208, 40, 0.1) 8px,
    rgba(255, 208, 40, 0.1) 16px
  );
}
.c-stat:nth-child(1) {
  grid-column: 1 / -1;
  border-right: none;
  border-bottom: 1px solid var(--c-border);
}
.c-stat:nth-child(2) {
  border-right: 1px solid var(--c-border);
}
.c-stat:nth-child(3) {
  border-right: none;
}
.c-stat-label {
  font-family: "Source Code Pro", monospace;
  font-size: 0.5625rem;
  color: var(--c-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.c-stat-value {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 1.75rem;
  color: #ffd028;
  text-shadow: 0 0 var(--c-text-str);
  line-height: 1;
  letter-spacing: 2px;
}
.c-stat-role {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 1rem;
  color: var(--c-text-str);
  line-height: 1.2;
  letter-spacing: 1px;
  margin-top: 3px;
}

@media (min-width: 480px) {
  .c-stats {
    grid-template-columns: repeat(3, 1fr);
  }
  .c-stat:nth-child(1) {
    grid-column: auto;
    border-right: 1px solid var(--c-border);
    border-bottom: none;
  }
}

/* ── Filter bar ─────────────────────────────────────────────────────── */
.c-filter {
  display: flex;
  margin-bottom: 20px;
}
.c-filter-label {
  font-family: "Source Code Pro", monospace;
  font-size: 0.625rem;
  letter-spacing: 2px;
  color: #0a0a0a;
  background: #ffd028;
  padding: 0 12px;
  display: flex;
  align-items: center;
  white-space: nowrap;
  text-transform: uppercase;
  flex-shrink: 0;
}
.c-filter-input {
  flex: 1;
  min-width: 0;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-left: none;
  color: var(--c-text-str);
  font-family: "Source Code Pro", monospace;
  font-size: 0.8125rem;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.2s;
}
.c-filter-input::placeholder {
  color: var(--c-muted);
}
.c-filter-input:focus {
  border-color: #ffd028;
}
.c-filter-btns {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-shrink: 0;
  margin-left: 8px;
}
.c-filter-btn {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.625rem;
  padding: 3px 7px;
  background: none;
  border: 1px solid var(--c-border-md);
  border-radius: 0;
  color: var(--c-muted);
  cursor: pointer;
  white-space: nowrap;
  transition:
    border-color 0.15s,
    color 0.15s;
}
.c-filter-btn:hover {
  border-color: var(--c-text-str);
  color: var(--c-text-str);
}

/* ── Course cards ───────────────────────────────────────────────────── */
.c-card {
  border: 1px solid var(--c-border);
  margin-bottom: 16px;
  box-shadow: var(--elev-1);
  transition: border-color var(--dur-med), box-shadow var(--dur-med);
}
.c-card:hover {
  border-color: var(--c-border-md);
  box-shadow: var(--elev-2);
}

/* Course header — always dark, diagonal clapperboard stripe */
.c-hd {
  position: relative;
  overflow: hidden;
  background: var(--c-chd);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.c-hd::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: repeating-linear-gradient(
    -55deg,
    transparent 0,
    transparent 6px,
    rgba(255, 208, 40, 0.07) 6px,
    rgba(255, 208, 40, 0.07) 12px
  );
}
.c-hd-text {
  position: relative;
  z-index: 1;
  min-width: 0;
}
.c-hd-meta {
  font-family: "Source Code Pro", monospace;
  font-size: 0.5625rem;
  color: #ffd028;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 3px;
  /* button reset */
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  transition: opacity 0.15s;
}
.c-hd-meta span:first-child {
  font-size: 2em;
}
.c-hd-name {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 1.375rem;
  letter-spacing: 2px;
  color: #ede5d5;
  line-height: 1.1;
}
.c-hd-btn {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  font-family: "TradeGothic-BoldCondTwenty", "Arial Narrow", Arial, sans-serif;
  font-size: 0.6875rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 1px solid #e0b20d;
  color: #e0b20d;
  background: transparent;
  text-decoration: none;
  white-space: nowrap;
  transition:
    border-color 0.2s,
    color 0.2s,
    background 0.2s;
}
.c-hd-btn:hover,
.c-hd-btn:active {
  border-color: #ffd028;
  color: #0a0a0a;
  background: #ffd028;
}

/* ── Batch rows — mobile-first: stacked column ──────────────────────── */
.c-batches {
  list-style: none;
  margin: 0;
  padding: 0;
}
.c-batch {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--c-border);
  background: var(--c-surface);
  transition: background 0.2s;
}
.c-batch:hover {
  background: var(--c-yd);
}
.c-batch-name {
  color: var(--c-text-str);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: "Source Sans Pro", Georgia, serif;
}
.c-batch-dates {
  font-family: "Source Code Pro", monospace;
  font-size: 0.6875rem;
  color: var(--c-muted);
  margin-top: 2px;
}
.c-batch-btns {
  display: flex;
  gap: 8px;
}

.c-batch-tutors {
  list-style: none;
  margin: 0;
  padding: 0;
  flex-basis: 100%;
}
.c-batch-tutors li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  line-height: 1.5;
}
.c-bt-name {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--c-text);
  text-decoration: none;
  white-space: nowrap;
}
.c-bt-name:hover {
  color: var(--c-text-str);
  text-decoration: none;
}
.c-bt-email {
  font-size: 0.6875rem;
  color: var(--c-muted);
  font-family: "IBM Plex Mono", monospace;
  text-decoration: none;
}
.c-bt-email:hover {
  color: var(--c-text);
  text-decoration: none;
}

/* ≥ 480 px: side-by-side row */
@media (min-width: 480px) {
  .c-batch {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
  }
  .c-batch-info {
    flex: 1;
    min-width: 0;
  }
  .c-batch-btns {
    flex-shrink: 0;
  }
}

/* Students — secondary, outline */
.btn-stu {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 0.8125rem;
  letter-spacing: 1px;
  padding: 7px 13px;
  border: 1px solid var(--c-border-md);
  color: var(--c-muted);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 1;
  justify-content: center;
  transition:
    border-color 0.2s,
    color 0.2s,
    background 0.2s;
}
.btn-stu:hover {
  border-color: var(--c-green);
  color: var(--c-green);
  background: var(--c-gd);
}
.c-count {
  font-family: "Source Code Pro", monospace;
  font-size: 0.625rem;
  color: var(--c-green);
  background: var(--c-gd);
  padding: 1px 5px;
}

/* Schedule — primary, yellow */
.btn-sch {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 0.8125rem;
  letter-spacing: 1px;
  font-weight: 700;
  padding: 7px 16px;
  background: #ffd028;
  color: #0a0a0a;
  border: 1px solid #ffd028;
  cursor: pointer;
  text-decoration: none;
  flex: 1;
  text-align: center;
  display: inline-block;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.btn-sch:hover,
.btn-sch:focus {
  background: #ffe060;
  border-color: #ffe060;
  color: #0a0a0a;
}

/* Desktop: auto-size buttons */
@media (min-width: 480px) {
  .btn-stu,
  .btn-sch {
    flex: none;
  }
}

/* ═══ LESSONS PAGE ══════════════════════════════════════════════════════ */

/* ── Back link ───────────────────────────────────────────────────────── */
.l-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  font-family: "Source Code Pro", monospace;
  font-size: 0.6875rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--c-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.l-back:hover {
  color: #ffd028;
}

/* ── Page title ──────────────────────────────────────────────────────── */
/* ── Stats strip ─────────────────────────────────────────────────────── */
.l-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--c-border);
  margin-bottom: 20px;
}
.l-stat {
  position: relative;
  padding: 12px 14px;
  background: var(--c-surface);
  border-right: 1px solid var(--c-border);
  box-shadow: var(--elev-1);
}
.l-stat::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    -55deg,
    transparent 0,
    transparent 8px,
    rgba(255, 208, 40, 0.1) 8px,
    rgba(255, 208, 40, 0.1) 16px
  );
}

.l-stat:last-of-type {
  border-right: none;
}
.l-stat-label {
  font-family: "Source Code Pro", monospace;
  font-size: 0.5625rem;
  color: var(--c-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.l-stat-value {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 1.75rem;
  color: #ffd028;
  text-shadow: 0 0 var(--c-text-str);
  line-height: 1;
}

/* Add Lesson button — third cell, yellow */
.l-stat-add {
  grid-column: 1 / -1; /* full width on mobile */
  padding: 12px 20px;
  background: #ffd028;
  color: #0a0a0a;
  border: none;
  outline: none;
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 0.875rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  transition: background 0.2s;
}
.l-stat-add:hover {
  background: #ffe060;
  color: #0a0a0a;
}

@media (min-width: 480px) {
  .l-stats.has-add {
    grid-template-columns: 1fr 1fr auto;
  }
  .l-stat-add {
    grid-column: auto;
    border-top: none;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
  }
  .l-stat:last-of-type {
    border-right: 1px solid var(--c-border);
  }
}

/* ── Alerts ──────────────────────────────────────────────────────────── */
@keyframes alertIn {
  from { transform: translateX(16px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
.l-alert {
  position: fixed;
  top: 72px;                              /* 60px fixed header + 12px gap */
  right: 16px;
  width: min(380px, calc(100vw - 32px));  /* near-full-width on narrow screens */
  z-index: 10000;                         /* above .cfm-overlay/.form-loader (9999) */
  padding: 12px 34px 12px 16px;
  border-left: 3px solid;
  border-radius: 4px;
  background: var(--c-surface, #0f0f0f);
  box-shadow: var(--elev-3);
  font-size: 0.8125rem;
  line-height: 1.35;
  text-align: left;
  overflow: hidden;
  cursor: pointer;
  animation: alertIn var(--dur-med) var(--ease-out);
  transition:
    opacity 0.4s var(--ease-out),
    transform 0.4s var(--ease-out);
}
.l-alert::after {
  content: "\00D7";
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 1rem;
  line-height: 1;
  font-family: sans-serif;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}
.l-alert:hover::after {
  opacity: 0.6;
}
.l-alert.l-alert-hiding {
  opacity: 0;
  transform: translateX(16px);
}
.l-alert-success {
  background:
    linear-gradient(var(--c-gd, rgba(94, 191, 58, 0.12)), var(--c-gd, rgba(94, 191, 58, 0.12))),
    var(--c-surface, #0f0f0f);
  border-color: var(--c-green, #5ebf3a);
  color: var(--c-green, #5ebf3a);
}
.l-alert-error {
  background:
    linear-gradient(var(--c-rd, rgba(191, 58, 58, 0.12)), var(--c-rd, rgba(191, 58, 58, 0.12))),
    var(--c-surface, #0f0f0f);
  border-color: var(--c-red, #bf3a3a);
  color: var(--c-red, #bf3a3a);
}
.l-alert-warning {
  background:
    linear-gradient(var(--c-yd, rgba(255, 208, 40, 0.12)), var(--c-yd, rgba(255, 208, 40, 0.12))),
    var(--c-surface, #0f0f0f);
  border-color: #ffd028;
  color: #ffd028;
}

/* progress bar */
.l-alert-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 100%;
  transform-origin: left center;
  transition: transform linear;
}
.l-alert-success .l-alert-bar {
  background: var(--c-green, #5ebf3a);
}
.l-alert-error .l-alert-bar {
  background: var(--c-red, #bf3a3a);
}
.l-alert-warning .l-alert-bar {
  background: #ffd028;
}

/* narrow viewports: tighter insets */
@media (max-width: 575.98px) {
  .l-alert {
    top: 68px;
    right: 10px;
    width: calc(100vw - 20px);
  }
}

/* ── Confirm dialog (global) ────────────────────────────────────────── */
.cfm-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.cfm-overlay.cfm-open {
  opacity: 1;
  pointer-events: all;
}
.cfm-box {
  background: var(--c-surface, #0f0f0f);
  border: 1px solid var(--c-border-md, #2e2e2e);
  border-radius: 0;
  padding: 1.5rem 1.75rem 1.25rem;
  max-width: 340px;
  width: 100%;
  box-shadow: var(--elev-3);
  transform: translateY(14px) scale(0.96);
  opacity: 0;
  transition:
    transform 0.22s var(--ease-spring),
    opacity 0.18s var(--ease-out),
    box-shadow 0.22s var(--ease-out);
}
.cfm-overlay.cfm-open .cfm-box {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.cfm-msg {
  font-size: 0.9375rem;
  color: var(--c-text-str, #ede5d5);
  margin-bottom: 1.375rem;
  line-height: 1.45;
}
.cfm-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}
.cfm-btn {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px 18px;
  border-radius: 0;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background 0.14s,
    opacity 0.14s,
    border-color 0.14s;
  line-height: 1;
}
.cfm-btn-cancel {
  background: transparent;
  border-color: var(--c-border-md, #2e2e2e);
  color: var(--c-muted, #888);
}
.cfm-btn-cancel:hover {
  background: var(--c-yd, rgba(255, 208, 40, 0.08));
  border-color: var(--c-border-md, #2e2e2e);
  color: var(--c-text-str, #ede5d5);
}
.cfm-btn-ok {
  background: #ffd028;
  border-color: #ffd028;
  color: #0f0f0f;
  font-weight: 600;
}
.cfm-btn-ok:hover {
  opacity: 0.85;
}

/* ── Lessons tutors section ─────────────────────────────────────────── */
.l-tutors {
  margin-bottom: 1rem;
  border: 1px solid var(--c-border);
  border-radius: 0;
  background: var(--c-surface);
  overflow: hidden;
}
.l-tutors-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-muted);
  padding: 8px 14px 6px;
  border-bottom: 1px solid var(--c-border);
}
.l-tutor-list {
  list-style: none;
  margin: 0;
  padding: 6px 0;
}
.l-tutor-item {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 5px 14px;
  flex-wrap: wrap;
}
.l-tutor-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--c-text-str);
  text-decoration: none;
  margin-right: 14px;
}
.l-tutor-name:hover {
  text-decoration: none;
  opacity: 0.8;
}
.l-tutor-email {
  font-size: 0.6875rem;
  color: var(--c-muted);
  text-decoration: none;
  font-family: "IBM Plex Mono", monospace;
}
.l-tutor-email:hover {
  text-decoration: none;
  color: var(--c-text);
}
/* ── Lesson list ─────────────────────────────────────────────────────── */
.l-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--c-border);
}
.l-row {
  padding: 14px 16px;
  border-bottom: 1px solid var(--c-border);
  background: var(--c-surface);
  transition: background 0.2s;
}
.l-row:last-child {
  border-bottom: none;
}
.l-row:hover {
  background: var(--c-yd);
}
.l-row.is-archived {
  opacity: 0.55;
}

.l-row-hd {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 5px;
}
.l-row-title {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 1.1875rem;
  letter-spacing: 1px;
  color: var(--c-text-str);
  line-height: 1.1;
}
.l-badge {
  font-family: "Source Code Pro", monospace;
  font-size: 0.5625rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 2px 6px;
}
.l-badge-active {
  color: var(--c-green);
  background: var(--c-gd);
}
.l-badge-archived {
  color: var(--c-muted);
  background: rgba(100, 100, 100, 0.1);
}

.l-row-meta {
  font-family: "Source Code Pro", monospace;
  font-size: 0.6875rem;
  color: var(--c-muted);
  margin-bottom: 4px;
}
.l-row-desc {
  font-size: 0.8125rem;
  color: var(--c-text);
  line-height: 1.5;
}

/* ── Row action buttons (staff) ──────────────────────────────────────── */
.l-row-foot {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--c-border);
}
.l-btn-edit {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 0.6875rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 12px;
  border: 1px solid #e0b20d;
  color: #e0b20d;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  transition:
    border-color 0.2s,
    color 0.2s,
    background 0.2s;
}
.l-btn-edit:hover {
  border-color: #ffd028;
  color: #0a0a0a;
  background: #ffd028;
}

.l-btn-archive {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 0.6875rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 12px;
  border: 1px solid var(--c-border-md);
  color: var(--c-muted);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  transition:
    border-color 0.2s,
    color 0.2s;
}
.l-btn-archive:hover {
  border-color: var(--c-muted);
  color: var(--c-text-str);
}

.l-btn-restore {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 0.6875rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 12px;
  border: 1px solid rgba(94, 191, 58, 0.4);
  color: var(--c-green);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  transition:
    border-color 0.2s,
    color 0.2s,
    background 0.2s;
}
.l-btn-restore:hover {
  border-color: var(--c-green);
  background: var(--c-gd);
}

.l-btn-delete {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 0.6875rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 12px;
  border: 1px solid rgba(220, 60, 60, 0.4);
  color: var(--att-a);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  transition:
    border-color 0.2s,
    color 0.2s,
    background 0.2s;
}
.l-btn-delete:hover {
  border-color: var(--att-a);
  background: var(--att-ad);
}

/* ── Empty state ─────────────────────────────────────────────────────── */
.l-empty {
  padding: 32px 20px;
  text-align: center;
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-muted);
  font-family: "Source Code Pro", monospace;
  font-size: 0.75rem;
  letter-spacing: 1px;
}

/* ── Schedule sub-section (within each lesson row) ───────────────────── */
.l-scheds {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--c-border);
}

/* Staff header: "Schedules" label + count badge */
.l-scheds-hd {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.l-scheds-label {
  font-family: "Source Code Pro", monospace;
  font-size: 0.5625rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--c-muted);
}
.l-scheds-count {
  font-family: "Source Code Pro", monospace;
  font-size: 0.5625rem;
  letter-spacing: 1px;
  padding: 1px 6px;
  background: rgb(55 44 2 / 44%);
  color: #ffd028;
}
html[data-theme="light"] .l-scheds-count {
  background: rgb(255 202 0 / 44%);
  color: var(--c-text);
}

/* Schedules toggle button in lesson header */
.l-scheds-toggle-btn {
  margin-left: auto;
  flex-shrink: 0;
  background: none;
  border: 1px solid var(--c-border-md);
  cursor: pointer;
  font-family: "Source Code Pro", monospace;
  font-size: 0.5625rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--c-muted);
  padding: 2px 8px;
  transition:
    border-color 0.2s,
    color 0.2s;
}
.l-scheds-toggle-btn:hover {
  border-color: var(--c-border-str);
  color: var(--c-text-str);
}
.l-scheds-toggle-btn::after {
  content: " \25BC";
  font-size: 0.5em;
}
.l-scheds-toggle-btn.open::after {
  content: " \25B2";
}

/* Batch header inside expanded schedules section */
.l-batch-hd {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 4px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--c-border);
}
.l-batch-hd:first-child {
  margin-top: 4px;
}
.l-batch-name {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 1rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--c-text-str);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.l-batch-edit-btn {
  flex-shrink: 0;
  font-family: "Source Code Pro", monospace;
  font-size: 0.5rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--c-muted);
  border: 1px solid var(--c-border-md);
  padding: 2px 7px;
  text-decoration: none;
  transition:
    color 0.2s,
    border-color 0.2s;
}
.l-batch-edit-btn:hover {
  color: #c19909;
  border-color: #c19909;
}

/* "Show previous" toggle (tutor only) */
.l-past-toggle {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: "Source Code Pro", monospace;
  font-size: 0.625rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--c-muted);
  transition: color 0.2s;
  margin-bottom: 8px;
  display: block;
}
.l-past-toggle:hover {
  color: #ffd028;
}

/* Schedule list */
.l-sched-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.l-sched-list-past {
  opacity: 0.6;
}

.l-sched-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid var(--c-border);
}
.l-sched-row:first-child {
  border-top: none;
}

.l-sched-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-family: "Source Code Pro", monospace;
  font-size: 0.625rem;
  color: var(--c-muted);
  min-width: 0;
}
.l-sched-date {
  color: var(--c-text-str);
  letter-spacing: 0.5px;
}
.l-sched-today {
  color: #ffd028;
}
.l-sched-sep {
  color: var(--c-border-md);
}
.l-sched-time {
  color: var(--c-text);
}
.l-sched-batch {
  color: var(--c-muted);
}

.l-sched-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Completion pill */
.l-sched-comp {
  font-family: "Source Code Pro", monospace;
  font-size: 0.5625rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 6px;
  white-space: nowrap;
}
.l-sched-comp-none {
  color: var(--c-muted);
  background: rgba(255, 255, 255, 0.04);
}
.l-sched-comp-partial {
  color: #e0b20d;
  background: rgba(255, 208, 40, 0.12);
}
.l-sched-comp-done {
  color: #5ebf3a;
  background: rgba(94, 191, 58, 0.13);
}

/* Mark button */
.l-sched-btn {
  font-family: "Source Code Pro", monospace;
  font-size: 0.5625rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 1px solid var(--c-border-md);
  color: var(--c-muted);
  background: transparent;
  text-decoration: none;
  transition:
    border-color 0.2s,
    color 0.2s;
  white-space: nowrap;
}
.l-sched-btn:hover {
  border-color: #c19909;
  color: #c19909;
}

/* Empty within schedules section */
.l-sched-empty {
  font-family: "Source Code Pro", monospace;
  font-size: 0.625rem;
  color: var(--c-muted);
  letter-spacing: 0.5px;
  padding: 4px 0;
}

/* ── Modals — dark/light aware ───────────────────────────────────────── */
body.page-lessons .modal-content {
  background: var(--c-surface);
  border: 1px solid var(--c-border-md);
  border-radius: 0;
}
body.page-lessons .modal-header {
  background: var(--c-chd);
  border-bottom: 1px solid var(--c-border-md);
}
body.page-lessons .modal-header .modal-title {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 1.25rem;
  letter-spacing: 1px;
  color: #ede5d5;
}
body.page-lessons .modal-header .btn-close {
  filter: invert(1) brightness(0.7);
}
body.page-lessons .modal-body {
  background: var(--c-surface);
  color: var(--c-text);
}
body.page-lessons .modal-footer {
  background: var(--c-surface);
  border-top: 1px solid var(--c-border-md);
}
body.page-lessons .modal-body .form-label {
  color: var(--c-muted);
  font-family: "Source Code Pro", monospace;
  font-size: 0.6875rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}
body.page-lessons .modal-body .form-control,
body.page-lessons .modal-body .form-select {
  background: var(--c-surface);
  border: 1px solid var(--c-border-md);
  color: var(--c-text-str);
  border-radius: 0;
}
body.page-lessons .modal-body .form-control:focus,
body.page-lessons .modal-body .form-select:focus {
  border-color: #ffd028;
  box-shadow: none;
  color: var(--c-text-str);
}

/* ═══ STUDENTS PAGE ═════════════════════════════════════════════════════ */

/* ── Page title ──────────────────────────────────────────────────────── */
/* ── Stats strip ─────────────────────────────────────────────────────── */
.s-stats {
  display: flex;
  border: 1px solid var(--c-border);
  margin-bottom: 20px;
}
.s-stat {
  position: relative;
  display: inline-grid;
  padding: 12px 14px;
  background: var(--c-surface);
  width: 100%;
  box-shadow: var(--elev-1);
}
.s-stat::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    -55deg,
    transparent 0,
    transparent 8px,
    rgba(255, 208, 40, 0.1) 8px,
    rgba(255, 208, 40, 0.1) 16px
  );
}
.s-stat-label {
  font-family: "Source Code Pro", monospace;
  font-size: 0.5625rem;
  color: var(--c-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.s-stat-value {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 1.75rem;
  letter-spacing: 2px;
  color: #ffd028;
  text-shadow: 0 0 var(--c-text-str);
  line-height: 1;
}

/* ── Student list ────────────────────────────────────────────────────── */
.s-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--c-border);
}
.s-row {
  position: relative;
  display: grid;
  grid-template-columns: 90px 1fr;
  grid-template-areas: "photo body" "notes notes";
  gap: 0 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--c-border);
  background: var(--c-surface);
  transition: background 0.2s;
}
.s-row:last-child {
  border-bottom: none;
}
.s-row:hover {
  background: var(--c-yd);
}

/* Card: CSS grid — photo + body top, notes full-width below (mobile) */
.s-photo-wrap {
  grid-area: photo;
  overflow: hidden;
}
.s-photo {
  width: 100%;
  height: 100%;
  min-height: 90px;
  display: block;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(25%);
  border: 1px solid var(--c-border-md);
}
.s-body {
  grid-area: body;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  padding-right: 48px;
}

/* Name row: name left, desktop stats right */
.s-name-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.s-name {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 1.1875rem;
  letter-spacing: 1px;
  color: var(--c-text-str);
  line-height: 1.2;
  margin-bottom: 2px;
}
.s-preferred {
  font-family: "Source Code Pro", monospace;
  font-size: 0.6875rem;
  color: var(--c-muted);
  margin-bottom: 1px;
}
.s-pronouns {
  color: var(--c-muted);
}
.s-email {
  font-size: 0.8125rem;
  color: var(--c-text);
  margin-bottom: 1px;
}
.s-email a {
  color: var(--c-text);
  text-decoration: none;
  border-bottom: 1px dotted var(--c-muted);
  transition:
    color 0.2s,
    border-color 0.2s;
}
.s-email a:hover {
  color: #ffd028;
  text-shadow: 0 0 var(--c-text-str);
  border-bottom-color: #ffd028;
}
.s-course {
  font-size: 0.9375rem;
  color: var(--c-text-str);
  font-weight: 600;
  margin-bottom: 2px;
}

/* Stats cell: icon button + #id — absolutely positioned top-right of card */
.s-smcell {
  position: absolute;
  top: 12px;
  right: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.s-smcell .sm-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--c-border-md);
  color: var(--c-muted);
  background: var(--c-surface);
  cursor: pointer;
  transition:
    border-color 0.2s,
    color 0.2s;
}
.s-smcell .sm-trigger:hover {
  border-color: #c19909;
  color: #c19909;
}
.s-smcell .s-id {
  font-family: "Source Code Pro", monospace;
  font-size: 0.5rem;
  color: var(--c-muted);
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.s-smcell .s-id a {
  color: inherit;
  text-decoration: none;
}
.s-smcell .s-id a:hover {
  color: #ffd028;
}

/* Group + spare row */
.s-gs-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
}
.s-gs-label {
  font-family: "Source Code Pro", monospace;
  font-size: 0.5rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 2px;
}
.s-gs-grp-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.s-gs-row--ro .att-grp-btn:disabled {
  opacity: 0.65;
  cursor: default;
  pointer-events: none;
}
.s-gs-row--ro .sg-sel:disabled {
  opacity: 0.65;
  cursor: default;
}

/* Desktop: ≥ 480px — photo spans full card height, notes in right column */
@media (min-width: 480px) {
  .s-row {
    grid-template-columns: 140px 1fr;
    grid-template-areas: "photo body" "photo notes";
  }
  .s-photo {
    min-height: 0;
  }
  .s-gs-row {
    flex-direction: row;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
  }
  .s-notes {
    margin-top: 8px;
  }
}

/* ── Empty state ─────────────────────────────────────────────────────── */
.s-empty {
  padding: 32px 20px;
  text-align: center;
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-muted);
  font-family: "Source Code Pro", monospace;
  font-size: 0.75rem;
  letter-spacing: 1px;
}

/* ── Student notes (students page) ──────────────────────────────────── */
.s-notes {
  grid-area: notes;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--c-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Editable own note */
.sn-edit-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.sn-shared-label {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  font-family: "Source Code Pro", monospace;
  font-size: 0.5625rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--c-muted);
}
.sn-shared-label--ro {
  cursor: default;
  opacity: 0.55;
}
.sn-shared {
  accent-color: #ffd028;
  cursor: pointer;
}
.sn-textarea {
  width: 100%;
  display: block;
  background: var(--c-surface);
  border: 1px solid var(--c-border-md);
  color: var(--c-text);
  font-family: "Source Code Pro", monospace;
  font-size: 0.6875rem;
  line-height: 1.5;
  padding: 6px 8px;
  resize: vertical;
  min-height: 48px;
  border-radius: 0;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.sn-textarea:focus {
  border-color: #ffd028;
}
.sn-textarea::placeholder {
  color: var(--c-muted);
}
.sn-status {
  font-family: "Source Code Pro", monospace;
  font-size: 0.5625rem;
  letter-spacing: 1px;
  color: var(--c-muted);
  text-align: right;
  min-height: 14px;
  margin-top: 2px;
}
.sn-status.sn-saved {
  color: #5ebf3a;
}
.s-note-label {
  font-family: "Source Code Pro", monospace;
  font-size: 0.625rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--c-muted);
  display: block;
  margin-bottom: 3px;
}
.s-note-shared-badge {
  font-size: 0.5625rem;
  letter-spacing: 1px;
  padding: 1px 5px;
  background: rgba(255, 208, 40, 0.15);
  color: #ffd028;
  margin-left: 5px;
}
.s-note-author {
  font-family: "Source Code Pro", monospace;
  font-size: 0.625rem;
  letter-spacing: 0.5px;
  color: var(--c-text-str);
  display: block;
  margin-bottom: 3px;
}
.s-note-text {
  font-size: 0.8125rem;
  color: var(--c-text);
  line-height: 1.4;
}
.s-note-other .s-note-author {
  color: var(--c-muted);
}

/* ── Pagination ──────────────────────────────────────────────────────── */
.s-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  margin-top: 4px;
  border-top: 1px solid var(--c-border);
}
.s-pager-btn {
  font-family: "Source Code Pro", monospace;
  font-size: 0.6875rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 8px 14px;
  border: 1px solid var(--c-border-md);
  color: var(--c-text);
  background: var(--c-surface);
  text-decoration: none;
  transition:
    border-color 0.2s,
    color 0.2s;
}
.s-pager-btn:hover {
  border-color: #c19909;
  color: #c19909;
}
.s-pager-disabled {
  color: var(--c-muted);
  cursor: default;
}
.s-pager-disabled:hover {
  border-color: var(--c-border-md);
  color: var(--c-muted);
}
.s-pager-info {
  font-family: "Source Code Pro", monospace;
  font-size: 0.6875rem;
  color: var(--c-muted);
  letter-spacing: 0.5px;
}

/* ── Search mode banner ──────────────────────────────────────────────── */
.s-search-active {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  padding: 10px 14px;
  margin-bottom: 14px;
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  font-size: 0.8125rem;
  color: var(--c-text);
}
.s-search-active strong {
  color: #e0b20d;
  font-weight: normal;
}
.s-search-clear {
  font-family: "Source Code Pro", monospace;
  font-size: 0.625rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--c-muted);
  text-decoration: none;
  flex-shrink: 0;
  transition: color 0.2s;
}
.s-search-clear:hover {
  color: #e0b20d;
}

/* ── Search in DB button ─────────────────────────────────────────────── */
.s-db-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
  border: 1px solid var(--c-border-md);
  background: rgba(255, 208, 40, 0.05);
}
.s-db-search-label {
  font-family: "Source Code Pro", monospace;
  font-size: 0.625rem;
  color: var(--c-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  flex-shrink: 0;
}
.s-db-search-btn {
  font-size: 0.8125rem;
  color: #e0b20d;
  text-shadow: 0 0 var(--c-text-str);
  text-decoration: none;
  transition: color 0.2s;
}
.s-db-search-btn:hover {
  color: #ffe060;
}

/* ═══ SETTINGS PAGE ═════════════════════════════════════════════════════ */

/* ── Page title ──────────────────────────────────────────────────────── */
/* ── Setting blocks ──────────────────────────────────────────────────── */
.set-block {
  border: 1px solid var(--c-border);
  margin-bottom: 16px;
}

/* Block header — same dark clapperboard stripe as courses */
.set-hd {
  position: relative;
  overflow: hidden;
  background: var(--c-chd);
  padding: 10px 16px;
}
.set-hd::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    -55deg,
    transparent 0,
    transparent 6px,
    rgba(255, 208, 40, 0.07) 6px,
    rgba(255, 208, 40, 0.07) 12px
  );
}
.set-hd-label {
  position: relative;
  z-index: 1;
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 1rem;
  letter-spacing: 2px;
  color: #ede5d5;
}

/* Info rows */
.set-rows {
  list-style: none;
  margin: 0;
  padding: 0;
}
.set-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  padding: 11px 16px;
  border-bottom: 1px solid var(--c-border);
  background: var(--c-surface);
}
.set-row:last-child {
  border-bottom: none;
}
.set-key {
  font-family: "Source Code Pro", monospace;
  font-size: 0.625rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--c-muted);
  flex-shrink: 0;
  min-width: 120px;
}
.set-val {
  font-size: 0.875rem;
  color: var(--c-text-str);
  flex: 1;
}
.set-val a {
  color: var(--c-text-str);
  text-decoration: none;
  transition: color 0.2s;
}
.set-val a:hover {
  color: #ffd028;
}

/* Body area (description + action) */
.set-body {
  padding: 16px;
  background: var(--c-surface);
}
.set-desc {
  font-size: 0.8125rem;
  color: var(--c-text);
  margin-bottom: 16px;
  line-height: 1.6;
}

/* Action button — yellow, same as l-stat-add */
.set-btn {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 0.875rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 10px 20px;
  background: #ffd028;
  color: #0a0a0a;
  border: none;
  outline: none;
  cursor: pointer;
  transition: background 0.2s;
}
.set-btn:hover {
  background: #ffe060;
}

/* ═══ ATTENDANCE PAGE ═══════════════════════════════════════════════════ */

body.page-attendance {
  /* Status colours (attendance-specific) */
  --att-p: #5ebf3a;
  --att-pd: rgba(94, 191, 58, 0.12); /* present   — green  */
  --att-a: #bf3a3a;
  --att-ad: rgba(191, 58, 58, 0.12); /* absent    — red    */
  --att-au: #3a8bbf;
  --att-aud: rgba(58, 139, 191, 0.12); /* authorised — blue  */
  --att-n: #9966cc;
  --att-nd: rgba(153, 102, 204, 0.12); /* notified  — purple */
  --att-l: #d4843a;
  --att-ld: rgba(212, 132, 58, 0.12); /* late      — amber  */
  --att-ex: #888888;
  --att-exd: rgba(136, 136, 136, 0.12); /* alt class / unmarked / total — neutral grey */
}

/* ── Page title row ──────────────────────────────────────────────────── */
.att-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  /*gap: 10px;*/
  margin-bottom: 5px;
}
.att-head-main {
  flex: 1;
  min-width: 0;
}
.att-head-main .att-title {
  margin-bottom: 4px;
}
.att-head-main .att-sub {
  margin-bottom: 0;
}
.att-head-sub-line {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: baseline;
  margin-top: 3px;
  margin-bottom: 4px;
}
.att-head-desc {
  font-size: 0.75rem;
  font-style: italic;
  color: var(--c-muted);
}
.att-head-tutors {
  font-size: 0.6875rem;
  font-family: "Source Code Pro", monospace;
  letter-spacing: 0.3px;
  color: var(--c-text);
}

.att-head-dt {
  flex-shrink: 0;
  text-align: right;
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  color: var(--c-text-str);
  background-color: var(--c-chd);
  letter-spacing: 0.5px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 6px;
}
.att-head-date,
.att-head-time {
  line-height: 1em;
  font-weight: bold;
  color: #ffd028;
  text-shadow: 0 0 2px black;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}
.att-head-date {
  font-size: 1.5em;
  line-height: 1.75em;
}
.att-head-time {
  font-size: 1.25em;
}
.att-dt-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  stroke: /*currentColor*/ var(--c-muted);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.att-sub-course {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--c-text);
}
.att-sub-batch {
  display: block;
  font-size: 0.75rem;
}

/* Generic sticky page-subtitle: pair a .sub-sticky-sentinel with a
 * .sub-sticky element right after it; templates/layout.php's IntersectionObserver
 * toggles .is-stuck on the latter once the former scrolls past the header. */
.sub-sticky-sentinel {
  height: 0;
}
.sub-sticky {
  position: sticky;
  top: 60px; /* site header height */
  z-index: 10;
  padding: 6px 4px;
  margin: 0 -4px 20px;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}
.sub-sticky.is-stuck {
  background: var(--c-accent);
  color: var(--c-accent-ink);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.sub-sticky.is-stuck .att-sub-course,
.sub-sticky.is-stuck .att-sub-batch {
  color: var(--c-accent-ink);
}

/* ── Page title ──────────────────────────────────────────────────────── */
.att-title {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 2.25rem;
  letter-spacing: 2px;
  color: #ffd028;
  background-color: var(--c-chd);
  text-shadow: 0 0 var(--c-text-str);
  line-height: 1;
  margin-bottom: 4px;
  padding: 0 5px;
}
@media (min-width: 576px) {
  .att-title {
    font-size: 3rem;
  }
}

/* ── Stats strip (batch overview) ────────────────────────────────────── */
.att-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--c-border);
  margin-bottom: 20px;
}
.att-stat {
  position: relative;
  padding: 12px 14px;
  background: var(--c-surface);
  border-right: 1px solid var(--c-border);
  box-shadow: var(--elev-1);
}
.a-stat::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    -55deg,
    transparent 0,
    transparent 8px,
    rgba(255, 208, 40, 0.1) 8px,
    rgba(255, 208, 40, 0.1) 16px
  );
}

.att-stat:last-child {
  border-right: none;
}
.att-stat-label {
  font-family: "Source Code Pro", monospace;
  font-size: 0.5625rem;
  color: var(--c-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.att-stat-value {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 1.625rem;
  color: #ffd028;
  text-shadow: 0 0 var(--c-text-str);
  line-height: 1;
  letter-spacing: 2px;
}
.att-stat-value--good {
  color: var(--att-p);
}
.att-stat-value--ok {
  color: var(--att-n);
}
.att-stat-value--bad {
  color: var(--att-a);
}

/* ── Lesson blocks (batch overview) ─────────────────────────────────── */
.att-lesson {
  border: 1px solid var(--c-border);
  margin-bottom: 16px;
}

.att-lesson-hd {
  position: relative;
  overflow: hidden;
  background: var(--c-chd);
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  scroll-margin-top: 72px;
}
.att-lesson-hd::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    -55deg,
    transparent 0,
    transparent 6px,
    rgba(255, 208, 40, 0.07) 6px,
    rgba(255, 208, 40, 0.07) 12px
  );
}
.att-lesson-hd-text {
  position: relative;
  z-index: 1;
  min-width: 0;
  flex-grow: 1;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.att-lesson-title {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 1.125rem;
  letter-spacing: 1.5px;
  color: #ede5d5;
}
.att-lesson-dur {
  font-family: "Source Code Pro", monospace;
  font-size: 0.625rem;
  color: rgba(255, 255, 255, 0.35);
}
.att-lesson-count {
  font-family: "Source Code Pro", monospace;
  font-size: 0.625rem;
  color: rgba(255, 255, 255, 0.5);
}
.att-lesson-chevron {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.5);
  transition: transform 0.2s ease;
  transform: rotate(-90deg);
}
.att-lesson-hd.is-open .att-lesson-chevron {
  transform: rotate(0deg);
}
.att-sched-add-btn {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 0.6875rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 1px solid #e0b20d;
  color: #e0b20d;
  background: transparent;
  cursor: pointer;
  transition:
    border-color 0.2s,
    color 0.2s,
    background 0.2s;
}
.att-sched-add-btn:hover,
.att-sched-add-btn:active {
  border-color: #ffd028;
  color: #0a0a0a;
  background: #ffd028;
}

.att-no-sched {
  padding: 10px 16px;
  font-family: "Source Code Pro", monospace;
  font-size: 0.6875rem;
  color: var(--c-muted);
  background: var(--c-surface);
}

/* Schedule list header row (title + archive toggle) */
.att-hd-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.att-archive-toggle {
  font-family: "Source Code Pro", monospace;
  font-size: 0.625rem;
  letter-spacing: 0.5px;
  color: var(--c-muted);
  text-decoration: none;
  white-space: nowrap;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.att-archive-toggle:hover {
  color: var(--c-text);
  border-bottom-color: var(--c-border-md);
}

/* Schedule rows */
.att-schedules {
  list-style: none;
  margin: 0;
  padding: 0;
}
.att-sched-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 16px;
  border-top: 1px solid var(--c-border);
  background: var(--c-surface);
  transition: background 0.2s;
}
@media (min-width: 576px) {
  .att-sched-row {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
}
.att-sched-row:hover {
  background: var(--c-yd);
}
.att-sched-complete {
  background: var(--att-pd);
}
@keyframes att-sched-flash {
  0%   { background: var(--c-yd); }
  100% { background: var(--c-surface); }
}
.att-sched-flash {
  animation: att-sched-flash 2s ease-out;
}

.att-sched-older-toggle-row {
  padding: 0;
  border-top: 1px dashed var(--c-border-md);
}
.att-sched-older-toggle {
  width: 100%;
  text-align: left;
  padding: 9px 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: "Source Code Pro", monospace;
  font-size: 0.75rem;
  color: var(--c-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}
.att-sched-older-toggle:hover {
  color: var(--c-text);
}
.att-sched-older-toggle svg {
  transition: transform 0.2s;
  flex-shrink: 0;
}
.att-sched-older-toggle.is-open svg {
  transform: rotate(180deg);
}

.att-sched-left {
  display: flex;
  flex-direction: column;
  min-width: 90px;
}
.att-sched-date {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 0.9375rem;
  letter-spacing: 1px;
  color: var(--c-text-str);
}
.att-sched-time {
  font-family: "Source Code Pro", monospace;
  font-size: 0.625rem;
  color: var(--c-muted);
}

/* Status pills + completion badge (stats row inside .att-sched-right) */
.att-sched-stats {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.att-pill {
  font-family: "Source Code Pro", monospace;
  font-size: 0.625rem;
  padding: 2px 5px;
}
.att-pill-p {
  color: var(--att-p);
  background: var(--att-pd);
}
.att-pill-a {
  color: var(--att-a);
  background: var(--att-ad);
}
.att-pill-au {
  color: var(--att-au);
  background: var(--att-aud);
}
.att-pill-n {
  color: var(--att-n);
  background: var(--att-nd);
}
.att-pill-l {
  color: var(--att-l);
  background: var(--att-ld);
}
.att-pill-xx {
  color: var(--c-muted);
  background: var(--c-border);
  cursor: default;
}
.att-pill-xx .att-pill-num {
  color: var(--c-text);
}

/* Right block: stats row stacked above the actions row — one unit that
 * drops below .att-sched-left as a whole on mobile (see .att-sched-row). */
.att-sched-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  margin-left: auto;
  width: 100%;
}
@media (min-width: 576px) {
  .att-sched-right {
    width: auto;
  }
}
.att-sched-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Completion badges */
.att-comp {
  font-family: "Source Code Pro", monospace;
  font-size: 0.625rem;
  letter-spacing: 1px;
  padding: 2px 7px;
}
.att-comp-none {
  color: var(--c-muted);
  background: rgba(100, 100, 100, 0.1);
}
.att-comp-partial {
  color: var(--c-muted);
  background: var(--att-nd);
}
.att-comp-done {
  color: var(--att-p);
  background: var(--att-pd);
}
.att-comp-archived {
  color: var(--c-muted);
  background: rgba(100, 100, 100, 0.1);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* Archived schedule row */
.att-sched-archived {
  opacity: 0.55;
}
.att-sched-archived:hover {
  opacity: 0.75;
}

/* Restore schedule button */
.att-restore-btn {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 0.8125rem;
  letter-spacing: 1px;
  padding: 5px 12px;
  border: 1px solid rgba(94, 191, 58, 0.4);
  color: var(--c-green);
  background: transparent;
  text-decoration: none;
  transition:
    border-color 0.2s,
    color 0.2s,
    background 0.2s;
}
.att-restore-btn:hover {
  border-color: var(--c-green);
  background: var(--c-gd);
}

/* Archive schedule button (in schedule row actions) */
.att-archive-btn {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 0.875rem;
  padding: 4px 10px;
  border: 1px solid var(--c-border-md);
  color: var(--c-muted);
  text-decoration: none;
  transition:
    border-color 0.2s,
    color 0.2s;
}
.att-archive-btn:hover {
  border-color: var(--c-muted);
  color: var(--c-text-str);
}

/* Mark + delete buttons */
.att-mark-btn {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 0.8125rem;
  letter-spacing: 1px;
  padding: 5px 14px;
  background: #ffd028;
  color: #0a0a0a;
  border: 1px solid #ffd028;
  text-decoration: none;
  transition: background 0.2s;
}
.att-mark-btn:hover {
  background: #ffe060;
  color: #0a0a0a;
  border-color: #ffe060;
}
.att-del-btn {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 0.875rem;
  padding: 4px 10px;
  border: 1px solid var(--c-border-md);
  color: var(--c-muted);
  text-decoration: none;
  transition:
    border-color 0.2s,
    color 0.2s;
}
.att-del-btn:hover {
  border-color: var(--att-a);
  color: var(--att-a);
}

/* Schedule description in row listing */
.att-sched-desc {
  display: block;
  font-size: 0.6875rem;
  color: var(--c-muted);
  font-style: italic;
  margin-top: 3px;
}
.att-sched-tutors {
  display: block;
  font-size: 0.6875rem;
  font-family: "Source Code Pro", monospace;
  letter-spacing: 0.3px;
  color: var(--c-text);
  margin-top: 2px;
}

/* Edit / Copy schedule buttons */
.att-edit-btn,
.att-copy-btn {
  padding: 4px 8px;
  border: 1px solid var(--c-border-md);
  color: var(--c-muted);
  background: transparent;
  cursor: pointer;
  transition:
    border-color 0.2s,
    color 0.2s;
  display: inline-flex;
  align-items: center;
}
.att-edit-btn:hover {
  border-color: #c19909;
  color: #c19909;
}
.att-copy-btn:hover {
  border-color: var(--c-text);
  color: var(--c-text);
}

/* Filter badges on schedule rows */
.att-sched-badge {
  display: inline-block;
  font-size: 0.625rem;
  font-family: "Source Code Pro", monospace;
  letter-spacing: 0.5px;
  padding: 1px 5px;
  border: 1px solid #e0b20d;
  color: #e0b20d;
  border-radius: 0;
  margin-top: 2px;
}
.att-sched-badge-combined {
  border-color: var(--c-muted);
  color: var(--c-muted);
}

/* Group / Spare multiselect toggle buttons */
.att-grp-btns {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.att-grp-btn {
  background: var(--c-surface);
  border: 1px solid var(--c-border-md);
  color: var(--c-muted);
  padding: 7px 9px;
  font-size: 0.75rem;
  font-family: "Source Code Pro", monospace;
  letter-spacing: 1px;
  cursor: pointer;
  line-height: 1.3;
  min-width: 32px;
  text-align: center;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
}
.att-grp-btn:hover {
  border-color: var(--c-muted);
  color: var(--c-text);
}
.att-grp-btn:active {
  background: #ffd028;
  border-color: #ffd028;
  color: #0a0a0a;
}
.att-grp-btn.active {
  background: #ffd028;
  border-color: #ffd028;
  color: #0a0a0a;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
}

/* Schedule modal — batch title row */
.att-modal-batch {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0 5px;
  margin-top: 16px;
  border-bottom: 1px solid var(--c-border-md);
}
.att-modal-batch:first-child {
  margin-top: 0;
}
.att-modal-batch-title {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6875rem;
  color: var(--c-text-str, inherit);
  line-height: 1.3;
}
.att-modal-batch-btns {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
  margin-left: 8px;
}

/* Schedule modal filter row */
.att-modal-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
  margin-top: 0;
  padding: 10px;
  padding-bottom: 4px;
  margin-bottom: 4px;
  border: 1px solid var(--c-border-md);
  border-top: none;
}

.att-extra-batch-section {
  margin-top: 16px;
}
/* Separated cohort section — dimmed */
.att-extra-batch-section[data-separated="1"] {
  opacity: 0.4;
  transition: opacity 0.15s;
}
.att-batch-separate-btn--active {
  color: var(--c-yd) !important;
  border-color: var(--c-yd) !important;
}

/* Cohort add button wrap */
.att-cohort-add-wrap {
  padding-top: 10px;
  margin-top: 4px;
  border-top: 1px solid var(--c-border);
}

/* Cohort picker panel (fixed overlay, appears over the schedule modal) */
.att-cohort-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1065;
}
.att-cohort-panel {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1070;
  width: min(380px, 92vw);
  background: var(--c-surface, #fff);
  border: 1px solid var(--c-border-md);
  border-radius: 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
  display: none;
  flex-direction: column;
}
.att-cohort-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--c-border);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--c-text-str, inherit);
}
.att-cohort-panel-close {
  background: none;
  border: none;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  color: var(--c-muted);
  padding: 0 2px;
}
.att-cohort-panel-close:hover {
  color: var(--c-text-str, inherit);
}
.att-cohort-panel-body {
  padding: 10px 14px;
  flex: 1;
}
.att-cohort-list {
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--c-border);
  border-radius: 0;
  margin-top: 8px;
}
.att-cohort-group {
  padding: 6px 10px 2px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.625rem;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--c-border, #fff);
  position: sticky;
  top: 0;
}
.att-cohort-item {
  padding: 6px 10px;
  font-size: 0.8125rem;
  cursor: pointer;
  color: var(--c-text, inherit);
}
.att-cohort-item:hover {
  background: var(--c-border);
}
.att-cohort-item.selected {
  background: #ffd028;
  color: #0a0a0a;
}
.att-cohort-empty {
  padding: 10px;
  font-size: 0.8125rem;
  color: var(--c-muted);
  text-align: center;
}
.att-cohort-panel-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 14px 12px;
  border-top: 1px solid var(--c-border);
}

.att-modal-spare-sel {
  height: auto;
  padding: 2px;
}
.att-modal-spare-sel option {
  padding: 5px 8px;
  cursor: pointer;
}

/* ── Tutor multiselect in schedule modals ──────────────────────────── */
.att-tms { position: relative; }
.att-tms-trigger {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  background: var(--c-surface); border: 1px solid var(--c-border-md); color: var(--c-text);
  font-family: 'IBM Plex Mono', monospace; font-size: 0.6875rem;
  padding: 0.375rem 0.75rem; cursor: pointer; text-align: left; border-radius: 0;
}
.att-tms-trigger:hover { border-color: var(--c-muted); }
.att-tms-chevron { flex-shrink: 0; margin-left: 6px; }
.att-tms-panel {
  position: absolute; left: 0; right: 0; top: calc(100% + 2px);
  background: var(--c-surface); border: 1px solid var(--c-border-md);
  z-index: 200; box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.att-tms-search {
  display: block; width: 100%; border: none; border-bottom: 1px solid var(--c-border);
  background: transparent; color: var(--c-text); font-size: 0.8125rem;
  padding: 0.4rem 0.75rem; outline: none;
}
.att-tms-list { max-height: 180px; overflow-y: auto; }
.att-tms-item {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.35rem 0.75rem; cursor: pointer;
}
.att-tms-item:hover { background: var(--c-border); }
.att-tms-item input[type=checkbox] { flex-shrink: 0; cursor: pointer; }
.att-tms-item label { flex: 1; cursor: pointer; font-family: 'IBM Plex Mono', monospace; line-height: 1.3; min-width: 0; }
.att-tms-item-name { display: block; font-size: 0.75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-tms-item-email { display: block; color: var(--c-muted); font-size: 0.6875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-tms-empty { padding: 0.5rem 0.75rem; color: var(--c-muted); font-size: 0.75rem; text-align: center; font-style: italic; }
.att-tms-trigger-row { display: flex; align-items: center; gap: 6px; }
.att-tms-trigger-row .att-tms-trigger { flex: 1; }
.att-tms-clear { background: none; border: none; padding: 2px 4px; font-family: 'IBM Plex Mono', monospace; font-size: 0.6875rem; color: var(--c-muted); cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.att-tms-clear:hover { color: var(--c-text); }
.att-tms-none { font-size: 0.75rem; font-family: 'IBM Plex Mono', monospace; color: var(--bs-red); padding: 4px 0; margin-top: -2em; }
.att-tms-none a { color: inherit; }

/* Filter + sort bar on schedule attendance page */
.att-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: flex-end;
  margin-bottom: 12px;
}
.att-filter-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.att-filter-label {
  font-size: 0.625rem;
  font-family: "Source Code Pro", monospace;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--c-muted);
}
.att-filter-sel {
  background: var(--c-surface);
  border: 1px solid var(--c-border-md);
  color: var(--c-text);
  padding: 5px 28px 5px 8px;
  font-size: 0.8125rem;
  border-radius: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  min-width: 80px;
}
.att-filter-sel:focus {
  outline: none;
  border-color: #ffd028;
}

/* Student summary table (batch overview) */
.att-section-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.att-section-label {
  font-family: "Source Code Pro", monospace;
  font-size: 0.5625rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--c-muted);
  margin: 24px 0 8px;
}
.att-csv-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6875rem;
  color: var(--c-muted);
  text-decoration: none;
  white-space: nowrap;
  padding: 3px 8px;
  border: 1px solid var(--c-border);
  margin-top: 16px;
}
.att-csv-btn:hover {
  color: var(--c-text);
  border-color: var(--c-border-md);
}
.att-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--c-border);
  margin-bottom: 16px;
}
.att-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
.att-table thead tr {
  border-bottom: 1px solid var(--c-border);
  background: var(--c-chd);
}
.att-table th {
  padding: 8px 10px;
  font-family: "Source Code Pro", monospace;
  font-size: 0.75rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: normal;
  white-space: nowrap;
  text-align: center;
}
.att-table th:first-child {
  color: var(--c-surface);
  text-align: left;
}
.att-table th:last-child {
  color: var(--c-surface);
}
.att-th-p {
  color: var(--att-p);
}
.att-th-a {
  color: var(--att-a);
}
.att-th-au {
  color: var(--att-au);
}
.att-th-n {
  color: var(--att-n);
}
.att-th-l {
  color: var(--att-l);
}
.att-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text);
  background: var(--c-surface);
}
.att-table tr:last-child td {
  border-bottom: none;
}
.att-table tr:hover td {
  background: var(--c-yd);
}
.att-td-center {
  text-align: center;
  font-family: "Source Code Pro", monospace;
}
.att-pct-good {
  color: var(--att-p);
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 0.9375rem;
}
.att-pct-ok {
  color: var(--att-n);
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 0.9375rem;
}
.att-pct-bad {
  color: var(--att-a);
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 0.9375rem;
}

/* ── Marking view: 8-cell stats grid ─────────────────────────────────── */
.att-mark-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--c-border);
  margin-bottom: 16px;
}
@media (min-width: 480px) {
  .att-mark-stats {
    grid-template-columns: repeat(8, 1fr);
  }
}

.att-mark-stat {
  padding: 5px 3px;
  background: var(--c-surface);
  border-right: 1px solid var(--c-border);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, border-color 0.15s;
}
.att-mark-stat:last-child {
  border-right: none;
}
.att-mark-stat:hover {
  border-color: var(--c-muted);
}
.att-mark-stat-label {
  font-family: "Source Code Pro", monospace;
  font-size: 0.5625rem;
  color: var(--c-muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 3px;
}
.att-mark-stat-value {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 1.375rem;
  color: #ffd028;
  text-shadow: 0 0 var(--c-text-str);
  line-height: 1;
}

.att-ms-p .att-mark-stat-value {
  color: var(--att-p) !important;
}
.att-ms-a .att-mark-stat-value {
  color: var(--att-a) !important;
}
.att-ms-au .att-mark-stat-value {
  color: var(--att-au) !important;
}
.att-ms-n .att-mark-stat-value {
  color: var(--att-n) !important;
}
.att-ms-l .att-mark-stat-value {
  color: var(--att-l) !important;
}
.att-ms-ex .att-mark-stat-value {
  color: var(--att-ex) !important;
}
.att-ms-u .att-mark-stat-value {
  color: var(--c-muted) !important;
}

.att-ms-p.active     { background: var(--att-pd); }
.att-ms-a.active     { background: var(--att-ad); }
.att-ms-au.active    { background: var(--att-aud); }
.att-ms-n.active     { background: var(--att-nd); }
.att-ms-l.active     { background: var(--att-ld); }
.att-ms-ex.active    { background: var(--att-exd); }
.att-ms-u.active     { background: var(--att-exd); }
.att-ms-total.active { background: var(--att-exd); }

/* ── Lesson meta (marking view) ──────────────────────────────────────── */
.att-lesson-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: baseline;
  margin-bottom: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--c-border);
}
.att-lesson-meta-dur {
  font-family: "Source Code Pro", monospace;
  font-size: 0.6875rem;
  color: var(--c-muted);
}
.att-lesson-meta-desc {
  font-size: 0.8125rem;
  color: var(--c-text);
}

/* ── Bulk action bar ─────────────────────────────────────────────────── */
.att-bulk {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
}
/* Bespoke bulk action buttons — replace Bootstrap .btn-success/danger/etc. */
.att-bulk-p,
.att-bulk-a,
.att-bulk-c,
.att-bulk-save {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 0.6875rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 6px 14px;
  border: 1px solid;
  cursor: pointer;
  transition:
    background var(--dur-med) var(--ease-out),
    border-color var(--dur-med) var(--ease-out),
    color var(--dur-med) var(--ease-out),
    box-shadow var(--dur-med) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}
.att-bulk-p {
  background: var(--att-p);
  border-color: var(--att-p);
  color: #fff;
}
.att-bulk-p:hover { filter: brightness(1.12); box-shadow: var(--elev-1); }
.att-bulk-a {
  background: var(--att-a);
  border-color: var(--att-a);
  color: #fff;
}
.att-bulk-a:hover { filter: brightness(1.12); box-shadow: var(--elev-1); }
.att-bulk-c {
  background: transparent;
  border-color: var(--c-border-md);
  color: var(--c-muted);
}
.att-bulk-c:hover {
  border-color: var(--c-muted);
  color: var(--c-text-str);
}
.att-bulk-save {
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: var(--c-accent-ink);
  box-shadow: var(--elev-1);
  min-width: 110px;
  font-size: 1rem;
}
.att-bulk-save:hover {
  background: var(--c-accent-hi);
  border-color: var(--c-accent-hi);
  box-shadow: var(--elev-2);
  transform: translateY(-1px);
}

/* ── Status select ───────────────────────────────────────────────────── */
.att-status-sel {
  -webkit-appearance: none;
  appearance: none;
  font-family: "Source Code Pro", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  padding: 6px 28px 6px 10px;
  border: 1px solid var(--c-border-md);
  background: var(--c-surface)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%23888'/%3E%3C/svg%3E")
    no-repeat right 10px center;
  background-size: 8px 5px;
  color: var(--c-muted);
  cursor: pointer;
  border-radius: 0;
  min-width: 130px;
  transition:
    border-color 0.2s,
    background-color 0.2s,
    color 0.2s;
}
.att-status-sel:focus {
  outline: none;
  border-color: #ffd028;
}
/* Status-coloured states — background-color only so SVG arrow stays visible */
.att-status-sel.sel-present {
  border-color: var(--att-p);
  color: var(--att-p);
  background-color: var(--att-pd);
}
.att-status-sel.sel-absent {
  border-color: var(--att-a);
  color: var(--att-a);
  background-color: var(--att-ad);
}
.att-status-sel.sel-authorised {
  border-color: var(--att-au);
  color: var(--att-au);
  background-color: var(--att-aud);
}
.att-status-sel.sel-notified {
  border-color: var(--att-n);
  color: var(--att-n);
  background-color: var(--att-nd);
}
.att-status-sel.sel-late {
  border-color: var(--att-l);
  color: var(--att-l);
  background-color: var(--att-ld);
}
.att-status-sel.sel-alt_class {
  border-color: var(--c-border-md);
  color: var(--c-muted);
}

/* ── Student cards (marking view) ────────────────────────────────────── */
.att-student {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  border-left: 3px solid transparent;
  padding: 12px 14px;
  margin-bottom: 8px;
  transition:
    background 0.15s,
    border-left-color 0.15s;
}
.att-row-p {
  border-left-color: var(--att-p);
  border-bottom-color: var(--att-p);
}
.att-row-a {
  border-left-color: var(--att-a);
  border-bottom-color: var(--att-a);
}
.att-row-au {
  border-left-color: var(--att-au);
  border-bottom-color: var(--att-au);
}
.att-row-n {
  border-left-color: var(--att-n);
  border-bottom-color: var(--att-n);
}
.att-row-l {
  border-left-color: var(--att-l);
  border-bottom-color: var(--att-l);
}
.att-row-ex {
  border-left-color: var(--c-border-md);
  opacity: 0.45;
}

/* Photo + body grid */
.att-stu-grid {
  display: grid;
  grid-template-columns: 125px 1fr;
  gap: 0 6px;
  align-items: stretch;
}
.att-stu-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border: 1px solid var(--c-border-md);
  filter: grayscale(20%);
  display: block;
}
.att-stu-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

/* Name row: name+pronouns left, group badge top-right */
.att-stu-namerow {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px;
}
.att-stu-nameblock {
  flex: 1;
  min-width: 0;
}
.att-stu-course {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.625rem;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}
.att-stu-name {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 1.0625rem;
  letter-spacing: 1px;
  color: var(--c-text-str);
  line-height: 1.1;
}
.att-stu-sub {
  font-family: "Source Code Pro", monospace;
  font-size: 0.85em;
  color: var(--c-muted);
  margin-top: 3px;
}
.att-stu-email {
  font-size: 0.75rem;
  margin-top: 2px;
}
.att-stu-email a {
  color: var(--c-muted);
  text-decoration: none;
  border-bottom: 1px dotted var(--c-muted);
  transition: color 0.2s, border-color 0.2s;
}
.att-stu-email a:hover {
  color: #ffd028;
  border-bottom-color: #ffd028;
}
.att-stu-grp-badge {
  font-family: "Source Code Pro", monospace;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 1px;
  color: #ffd028;
  border: 1px solid #ffd028;
  padding: 2px 5px;
  flex-shrink: 0;
  line-height: 1.4;
}
.att-stu-grp-moved {
  font-family: "Source Code Pro", monospace;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--c-muted);
  border: 1px dashed var(--c-muted);
  padding: 2px 5px;
  flex-shrink: 0;
  line-height: 1.4;
  cursor: default;
}

/* Flags container (right of name row) */
.att-stu-flags {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.att-stu-remove-btn {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.5625rem;
  padding: 2px 6px;
  border: 1px solid var(--c-border-md);
  color: var(--c-muted);
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1.4;
  transition:
    border-color 0.2s,
    color 0.2s;
}
.att-stu-remove-btn:hover {
  border-color: #dc3545;
  color: #dc3545;
}
.att-stu-remove-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

/* UKVI / Support Plan flags */
.att-flag {
  font-family: "Source Code Pro", monospace;
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 5px;
  flex-shrink: 0;
  line-height: 1.4;
  cursor: default;
}
.att-flag-ukvi {
  color: #3b82f6;
  border: 1px solid #3b82f6;
}
.att-flag-sp {
  color: #a855f7;
  border: 1px solid #a855f7;
}

/* Excluded attendance badge */
.att-badge-ex {
  background: var(--c-surface);
  color: var(--c-muted);
  border: 1px solid var(--c-border-md);
}

/* "Not on this register" panel */
.att-off-register {
  margin-top: 16px;
  border: 1px dashed var(--c-border-md);
}
.att-off-toggle {
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: "Source Code Pro", monospace;
  font-size: 0.75rem;
  color: var(--c-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.att-off-toggle svg {
  transition: transform 0.2s;
  flex-shrink: 0;
}
.att-off-register.att-off-open .att-off-toggle svg {
  transform: rotate(180deg);
}
.att-off-list {
  display: none;
  border-top: 1px dashed var(--c-border-md);
  padding: 8px 0;
}
.att-off-register.att-off-open .att-off-list {
  display: block;
}
.att-off-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-bottom: 1px solid var(--c-border);
}
.att-off-row:last-child {
  border-bottom: none;
}
.att-off-name {
  font-size: 0.8125rem;
  color: var(--c-text);
  flex: 1;
  min-width: 0;
}
.att-off-badge {
  font-family: "Source Code Pro", monospace;
  font-size: 0.5625rem;
  font-weight: 600;
  color: var(--c-muted);
  border: 1px solid var(--c-border-md);
  padding: 1px 4px;
  flex-shrink: 0;
}
.att-off-add {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6875rem;
  padding: 3px 10px;
  border: 1px solid var(--c-border-md);
  color: var(--c-muted);
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition:
    border-color 0.2s,
    color 0.2s;
}
.att-off-add:hover {
  border-color: #ffd028;
  color: #ffd028;
}
.att-off-add:disabled {
  opacity: 0.5;
  cursor: default;
}

/* Status dropdown row — right-aligned */
.att-stu-sel-row {
  display: flex;
  justify-content: flex-end;
}

/* Share checkbox + save button row */
.att-shared-check {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: -2px;
}
.att-save-btn {
  flex-shrink: 0;
  margin-left: auto;
}
.att-note-input {
  margin-bottom: 0 !important;
}

/* form-control dark overrides */
body.page-attendance .form-control,
body.page-attendance .form-select {
  background: var(--c-surface);
  border: 1px solid var(--c-border-md);
  color: var(--c-text-str);
  border-radius: 0;
}
body.page-attendance .form-control:focus,
body.page-attendance .form-select:focus {
  border-color: #ffd028;
  box-shadow: none;
  color: var(--c-text-str);
  background: var(--c-surface);
}
body.page-attendance .form-control::placeholder {
  color: var(--c-muted);
}
body.page-attendance .form-check-input {
  background-color: var(--c-surface);
  border-color: var(--c-border-md);
}
body.page-attendance .form-check-input:checked {
  background-color: #ffd028;
  border-color: #ffd028;
}
body.page-attendance .form-check-label {
  font-family: "Source Code Pro", monospace;
  font-size: 0.625rem;
  color: var(--c-muted);
}

/* btn-outline-primary (save button) */
body.page-attendance .btn-outline-primary {
  border-color: #e0b20d;
  color: #e0b20d;
  background: transparent;
}
body.page-attendance .btn-outline-primary:hover,
body.page-attendance .btn-outline-primary:active {
  border-color: #ffd028;
  color: #0a0a0a;
  background: #ffd028;
}

/* read-only note */
.att-stu-note-ro {
  font-size: 0.75rem;
  color: var(--c-muted);
  margin-top: 4px;
  font-family: "Source Code Pro", monospace;
}

/* Shared notes */
.att-shared-notes {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--c-border);
}
.att-shared-note {
  font-size: 0.75rem;
  color: var(--c-muted);
  margin-bottom: 2px;
}
.att-shared-email {
  color: var(--c-text-str);
  font-family: "Source Code Pro", monospace;
}

/* Attendance status badges (read-only view) */
.att-badge {
  font-family: "Source Code Pro", monospace;
  font-size: 0.625rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 3px 8px;
}
.att-badge-p {
  color: var(--att-p);
  background: var(--att-pd);
}
.att-badge-a {
  color: var(--att-a);
  background: var(--att-ad);
}
.att-badge-au {
  color: var(--att-au);
  background: var(--att-aud);
}
.att-badge-n {
  color: var(--att-n);
  background: var(--att-nd);
}
.att-badge-l {
  color: var(--att-l);
  background: var(--att-ld);
}

/* ── Attendance modals ───────────────────────────────────────────────── */
body.page-attendance .modal-content {
  background: var(--c-surface);
  border: 1px solid var(--c-border-md);
  border-radius: 0;
}
body.page-attendance .modal-header {
  background: var(--c-chd);
  border-bottom: 1px solid var(--c-border-md);
}
body.page-attendance .modal-header .modal-title {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 1.25rem;
  letter-spacing: 1px;
  color: #ede5d5;
}
body.page-attendance .modal-header .btn-close {
  filter: invert(1) brightness(0.7);
}
body.page-attendance .modal-body {
  background: var(--c-surface);
  color: var(--c-text);
}
body.page-attendance .modal-footer {
  background: var(--c-surface);
  border-top: 1px solid var(--c-border-md);
}
body.page-attendance .modal-body .form-label {
  color: var(--c-muted);
  font-family: "Source Code Pro", monospace;
  font-size: 0.6875rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ── Empty state ─────────────────────────────────────────────────────── */
.att-empty {
  padding: 28px 20px;
  text-align: left;
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-muted);
  font-family: "Source Code Pro", monospace;
  font-size: 0.75rem;
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.att-empty-title {
  color: var(--c-text);
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 14px;
  text-align: center;
}
.att-empty-steps {
  font-family: "Source Sans Pro", sans-serif;
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.att-empty-steps li {
  line-height: 1.5;
}
.att-empty-steps a {
  color: #ffd028;
}
@media (prefers-color-scheme: light) {
  .att-empty-steps a {
    color: #7a5500;
  }
}
html[data-theme="light"] .att-empty-steps a {
  color: #7a5500;
}

/* ═══ HOME PAGE ═════════════════════════════════════════════════════════ */

body.page-home {
  --att-n: #ffd028; /* notification/pending yellow */
}

@media (prefers-color-scheme: light) {
  body.page-home {
    --att-n: #c79f0e; /* slightly warmer in light mode */
  }
}

/* ── Unauthenticated welcome ─────────────────────────────────────────── */
.home-welcome {
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  padding: 40px 28px;
  text-align: left;
  position: relative;
  overflow: hidden;
}
.home-welcome::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    -55deg,
    transparent 0,
    transparent 8px,
    rgba(255, 208, 40, 0.04) 8px,
    rgba(255, 208, 40, 0.04) 16px
  );
}
.home-eyebrow {
  position: relative;
  z-index: 1;
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 0.625rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 10px;
}
.home-hero {
  position: relative;
  z-index: 1;
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 4rem;
  letter-spacing: 4px;
  color: #ffd028;
  line-height: 1;
  margin-bottom: 20px;
}
@media (min-width: 480px) {
  .home-hero {
    font-size: 5rem;
  }
}

.home-tagline {
  position: relative;
  z-index: 1;
  font-size: 0.875rem;
  color: var(--c-text);
  line-height: 1.6;
  max-width: 420px;
  margin-bottom: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--c-border);
}

/* ── Authenticated home ──────────────────────────────────────────────── */
/* ── Access denied ───────────────────────────────────────────────────── */
.home-denied {
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  padding: 32px 24px;
}
.home-denied-title {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 2.25rem;
  letter-spacing: 2px;
  color: #bf3a3a;
  line-height: 1;
  margin-bottom: 16px;
}
.home-denied-msg {
  font-size: 0.875rem;
  color: var(--c-text);
  line-height: 1.6;
  margin-bottom: 24px;
}
.home-denied-msg p {
  margin-bottom: 6px;
}
.home-denied-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Shared buttons ──────────────────────────────────────────────────── */
.home-login-btn,
.home-dashboard-btn {
  display: inline-block;
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 0.9375rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 12px 24px;
  background: #ffd028;
  color: #0a0a0a;
  border: 1px solid #ffd028;
  text-decoration: none;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.home-login-btn:hover,
.home-dashboard-btn:hover {
  background: #ffe060;
  border-color: #ffe060;
  color: #0a0a0a;
}

.home-logout-btn {
  display: inline-block;
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 0.9375rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 12px 24px;
  background: transparent;
  color: var(--c-muted);
  border: 1px solid var(--c-border-md);
  text-decoration: none;
  transition:
    border-color 0.2s,
    color 0.2s;
}
.home-logout-btn:hover {
  border-color: var(--c-muted);
  color: var(--c-text-str);
}

/* ── Actions row ─────────────────────────────────────────────────────── */
.home-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* ═══ DASHBOARD PAGE ════════════════════════════════════════════════════ */

body.page-dashboard {
  /* Attendance status colours used in schedule cards */
  --att-p: #5ebf3a;
  --att-pd: rgba(94, 191, 58, 0.15);
  --att-a: #bf3a3a;
  --att-ad: rgba(191, 58, 58, 0.15);
  --att-n: #ffd028;
  --att-nd: rgba(255, 208, 40, 0.15);
}

@media (prefers-color-scheme: light) {
  body.page-dashboard {
    --c-chd: #1a1a1a; /* dashboard card headers — slightly lighter in light mode */
    --att-p: #5ebf3a;
    --att-pd: rgba(94, 191, 58, 0.15);
    --att-a: #bf3a3a;
    --att-ad: rgba(191, 58, 58, 0.15);
    --att-n: #ffd028;
    --att-nd: rgba(255, 208, 40, 0.15);
  }
}

/* ── Page header row (title + manual link) ───────────────────────────── */
.dash-hd-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.dash-hd-main {
  flex: 1;
  min-width: 0;
}
.dash-manual-link {
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 8px;
  font-family: "Source Code Pro", monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.5px;
  color: var(--c-muted);
  text-decoration: none;
  white-space: nowrap;
}
.dash-manual-link:hover {
  color: var(--c-text-str);
}

/* ── Page title ──────────────────────────────────────────────────────── */
/* ── Stats strip ─────────────────────────────────────────────────────── */
.dash-stats {
  border: 1px solid var(--c-border);
  margin-bottom: 20px;
  display: flex;
}
.dash-stat {
  position: relative;
  padding: 12px 14px;
  background: var(--c-surface);
  flex: 1;
  border-right: 1px solid var(--c-border);
  box-shadow: var(--elev-1);
}
.dash-stat:last-child {
  border-right: none;
}
.dash-stat::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    -55deg,
    transparent 0,
    transparent 8px,
    rgba(255, 208, 40, 0.1) 8px,
    rgba(255, 208, 40, 0.1) 16px
  );
}
.dash-stat-label {
  font-family: "Source Code Pro", monospace;
  font-size: 0.5625rem;
  color: var(--c-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.dash-stat-value {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 1.75rem;
  color: #ffd028;
  text-shadow: 0 0 var(--c-text-str);
  line-height: 1;
  letter-spacing: 2px;
}
.dash-stat-dim {
  color: var(--c-muted);
}

/* ── Past toggle ─────────────────────────────────────────────────────── */
.dash-past-toggle {
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  background: transparent;
  border: 1px dashed var(--c-border-md);
  color: var(--c-muted);
  font-family: "Source Code Pro", monospace;
  font-size: 0.6875rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  margin-bottom: 16px;
  transition:
    border-color 0.2s,
    color 0.2s;
}
.dash-past-toggle:hover {
  border-color: var(--c-text);
  color: var(--c-text);
}

/* ── Date section ────────────────────────────────────────────────────── */
.dash-section {
  margin-bottom: 4px;
}

.dash-section-hd {
  padding: 8px 14px;
  background: var(--c-chd);
  border: 1px solid var(--c-border);
  border-bottom: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.dash-date-label {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 0.9375rem;
  letter-spacing: 1.5px;
  color: #ffd028;
}
.dash-hd-today .dash-date-label {
  color: #ffd028;
}
.dash-hd-past .dash-date-label {
  color: var(--c-muted);
}

.dash-today-badge {
  font-family: "Source Code Pro", monospace;
  font-size: 0.5625rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 2px 6px;
  background: rgba(255, 208, 40, 0.15);
  color: #ffd028;
}

/* ── Schedule card ───────────────────────────────────────────────────── */
.dash-card {
  padding: 7px 16px 14px 16px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-top: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  box-shadow: var(--elev-1);
  transition: background var(--dur-med), box-shadow var(--dur-med);
}
.dash-card:hover {
  background: var(--c-yd);
  box-shadow: var(--elev-2);
}
.dash-card-past {
  opacity: 0.6;
}

/* Course+batch secondary line */
.dash-card-sub {
  font-size: 0.625rem;
  font-family: "Source Code Pro", monospace;
  color: var(--c-muted);
  letter-spacing: 0.3px;
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.dash-card-sub a {
  color: inherit;
  text-decoration: none;
}
.dash-card-sub a:hover {
  text-decoration: underline;
}
.dash-card-sub-sep {
  color: var(--c-border-md);
}

.dash-card-main {
  flex: 1;
  min-width: 0;
}
.dash-card-lesson {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 1.0625rem;
  letter-spacing: 1px;
  color: var(--c-text-str);
  line-height: 1.1;
  margin-bottom: 5px;
}
.dash-card-desc {
  font-size: 0.6875rem;
  color: var(--c-muted);
  font-style: italic;
  margin-bottom: 4px;
}
.dash-card-meta {
  font-family: "Source Code Pro", monospace;
  font-size: 0.625rem;
  color: var(--c-muted);
  letter-spacing: 0.5px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.dash-card-sep {
  color: var(--c-border-md);
}
.dash-card-time {
  color: var(--c-text);
}
a.dash-card-stu {
  color: inherit;
  text-decoration: none;
}
a.dash-card-stu:hover {
  text-decoration: underline;
}

.dash-card-tutors {
  margin-top: 5px;
  display: flex;
  flex-wrap: wrap;
  gap: 3px 6px;
}
.dash-card-tutor {
  font-size: 0.6875rem;
  font-family: "Source Code Pro", monospace;
  color: var(--c-text);
  text-decoration: none;
  padding: 0 5px;
  border: 1px solid #c19909;
}
a.dash-card-tutor:hover {
  text-decoration: underline;
}

.dash-card-foot {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

/* ── Completion pill ─────────────────────────────────────────────────── */
.dash-comp {
  font-family: "Source Code Pro", monospace;
  font-size: 0.5625rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 2px 6px;
  white-space: nowrap;
}
.dash-comp-total {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: normal;
}
.dash-comp-none {
  color: var(--c-muted);
  background: rgba(255, 255, 255, 0.04);
}
.dash-comp-partial {
  color: /*var(--att-n)*/ inherit;
  background: var(--att-nd);
}
.dash-comp-done {
  color: var(--att-p);
  background: var(--att-pd);
}

/* ── Mark button ─────────────────────────────────────────────────────── */
.dash-mark-btn {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 12px;
  border: 1px solid #e0b20d;
  color: #e0b20d;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  transition:
    border-color 0.2s,
    color 0.2s,
    background 0.2s;
}
.dash-mark-btn:hover {
  border-color: #ffd028;
  color: #0a0a0a;
  background: #ffd028;
}

/* ── Student group/spare controls (students page) ────────────────────── */
.sg-btns .att-grp-btn:disabled {
  opacity: 0.4;
  cursor: wait;
}
.sg-sel {
  -webkit-appearance: none;
  appearance: none;
  font-family: "Source Code Pro", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  padding: 7px 24px 7px 8px;
  border: 1px solid var(--c-border-md);
  background: var(--c-surface)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%23888'/%3E%3C/svg%3E")
    no-repeat right 8px center;
  background-size: 8px 5px;
  color: var(--c-muted);
  cursor: pointer;
  border-radius: 0;
  min-width: 60px;
  transition:
    border-color 0.2s,
    color 0.2s;
}
.sg-sel:focus {
  outline: none;
  border-color: #ffd028;
}
.sg-sel:disabled {
  opacity: 0.5;
  cursor: wait;
}

/* ── Empty state ─────────────────────────────────────────────────────── */
.dash-empty {
  padding: 32px 20px;
  text-align: center;
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-muted);
  font-family: "Source Code Pro", monospace;
  font-size: 0.75rem;
  letter-spacing: 1px;
}

/* ═══ GLOBAL: THEME + FONT SIZE OVERRIDES ════════════════════════════════
   Applied via html[data-theme] and html[data-fsize] set from cookies.
   These rules have higher specificity than the per-page @media blocks.
   ════════════════════════════════════════════════════════════════════════ */

/* Dark theme — overrides light media query */
html[data-theme="dark"] body {
  background: #080808 !important;
  color: #c8bfb0 !important;
}
html[data-theme="dark"] body[class*="page-"] {
  --c-surface: #0f0f0f;
  --c-border: #1e1e1e;
  --c-border-md: #2e2e2e;
  --c-muted: #888888;
  --c-text: #c8bfb0;
  --c-text-str: #ede5d5;
  --c-yd: rgba(255, 208, 40, 0.08);
  --c-green: #5ebf3a;
  --c-gd: rgba(94, 191, 58, 0.12);
  --c-red: #bf3a3a;
  --c-rd: rgba(191, 58, 58, 0.12);
  --c-chd: #0c0b09;
}

/* Light theme — overrides dark default */
html[data-theme="light"] {
  color-scheme: light;
} /* forces native form elements (checkboxes etc.) to render light */
html[data-theme="light"] body {
  background: #f5f0e6 !important;
  color: #3a3028 !important;
}
html[data-theme="light"] body[class*="page-"] {
  --c-surface: #fdfaf4;
  --c-border: #d8cfba;
  --c-border-md: #c4b89e;
  --c-muted: #6a6050;
  --c-text: #3a3028;
  --c-text-str: #1a1410;
  --c-yd: rgba(255, 208, 40, 0.12);
  --c-green: #3a9e1a;
  --c-gd: rgba(58, 158, 26, 0.1);
  --c-red: #b5372f;
  --c-rd: rgba(181, 55, 47, 0.1);
  --c-chd: #0c0b09;
}
/* Override Bootstrap's dark-mode checkbox bg for Bootstrap-styled checkboxes (form-check-input) */
html[data-theme="light"] body[class*="page-"] .form-check-input:not(:checked) {
  --bs-form-check-bg: transparent;
  background: transparent !important;
}
/* ── Yellow accent text → dark amber on light backgrounds ── */
html[data-theme="light"] .courses-title,
html[data-theme="light"] .lessons-title,
html[data-theme="light"] .students-title,
html[data-theme="light"] .settings-title,
html[data-theme="light"] .home-title,
html[data-theme="light"] .dash-title,
html[data-theme="light"] .att-title,
html[data-theme="light"] .home-hero,
html[data-theme="light"] .man-idx-title,
html[data-theme="light"] .man-doc-title,
html[data-theme="light"] .man-idx-card-title,
html[data-theme="light"] .dash-manual-link {
  color: /*#7A5500*/ #ffd028;
  /*text-shadow: 0 0 2px black;*/
  background-color: var(--c-chd);
}
html[data-theme="light"] .c-stat-value,
html[data-theme="light"] .l-stat-value,
html[data-theme="light"] .s-stat-value,
html[data-theme="light"] .att-stat-value,
html[data-theme="light"] .att-mark-stat-value,
html[data-theme="light"] .dash-stat-value {
  color: /*#C19909*/ #ffd028;
  text-shadow: 0 0 2px black;
}
html[data-theme="light"] .l-sched-today {
  color: /*#7A5500*/ #ffd028;
  text-shadow: 0 0 2px black;
}
html[data-theme="light"] .s-note-shared-badge {
  color: #6d4c00;
  background: rgba(122, 85, 0, 0.12);
}
html[data-theme="light"] .man-body a {
  color: /*#7A5500*/ #ffd028;
  text-shadow: 0 0 2px black;
}
html[data-theme="light"] .lfa-yellow {
  color: /*#7A5500*/ #ffd028;
  text-shadow: 0 0 2px black;
}
html[data-theme="light"] .dash-mark-btn {
  border-color: #c19909;
  color: #c19909;
}
html[data-theme="light"] .dash-mark-btn:hover,
html[data-theme="light"] .dash-mark-btn:active {
  border-color: #c19909;
  color: #0a0a0a;
  background: #ffd028;
}
html[data-theme="light"] .l-btn-edit {
  border-color: #c19909;
  color: #c19909;
}
html[data-theme="light"] .l-btn-edit:hover {
  border-color: #c19909;
  color: #0a0a0a;
  background: #ffd028;
}
html[data-theme="light"] .s-search-active strong,
html[data-theme="light"] .s-db-search-btn {
  color: /*#7A5500*/ #ffd028;
  text-shadow: 0 0 2px black;
}
html[data-theme="light"] .l-sched-comp-partial {
  color: /*#7A5500*/ /*#ffd028*/ #a58100;
  /*text-shadow: 0 0 2px black;*/
  background: rgba(122, 85, 0, 0.1);
}
html[data-theme="light"] .att-sched-badge {
  border-color: #c19909;
  color: #c19909;
}
html[data-theme="light"] .att-stu-grp-badge {
  border-color: #7a5500;
  color: #7a5500;
}
/* Stats popup: yellow values need outline on light bg */
html[data-theme="light"] .sm-stat-value,
html[data-theme="light"] .sm-risk-amber .sm-stat-value {
  color: #ffd028;
  text-shadow: 0 0 2px black;
}
html[data-theme="light"] .sm-risk.sm-risk-amber {
  color: #c19909;
}

/* ── Font size: scale html root so all rem values cascade ────────────
   Default browser = 16px (100%). Never use the 62.5% trick — it
   breaks user accessibility preferences. Modes stored in cookie and
   applied via html[data-fsize] before first paint (see layout.php).
   ─────────────────────────────────────────────────────────────────── */
:root {
  --base-font-size: 1rem;
} /* convenience token; actual scale = html font-size */

html[data-fsize="sm"] {
  font-size: 87.5%;
} /* ~14px */
html[data-fsize="md"] {
  font-size: 100%;
} /* 16px — same as browser default */
html[data-fsize="lg"] {
  font-size: 112.5%;
} /* ~18px */
html[data-fsize="xl"] {
  font-size: 125%;
} /* 20px */
html[data-fsize="hg"] {
  font-size: 150%;
} /* 24px */

/* ── Settings: appearance option buttons ─────────────────────────────── */
.set-opts {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: baseline;
}
.set-opt-btn {
  background: var(--c-surface);
  border: 1px solid var(--c-border-md);
  color: var(--c-muted);
  padding: 5px 14px;
  font-family: "Source Code Pro", monospace;
  font-size: 0.6875rem;
  letter-spacing: 1px;
  cursor: pointer;
  line-height: 1.5;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
}
.set-opt-btn:hover {
  border-color: var(--c-muted);
  color: var(--c-text);
}
.set-opt-btn.active {
  background: #ffd028;
  border-color: #ffd028;
  color: #0a0a0a;
}
/* Theme buttons: icon-only, square */
.set-theme-btn {
  padding: 6px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-theme {
  width: 16px;
  height: 16px;
  display: block;
  flex-shrink: 0;
}
.set-theme-btn .svg-icon use {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Nav submenu theme icon size */
.icon-theme-sm {
  width: 13px;
  height: 13px;
  display: block;
  flex-shrink: 0;
}
.nsub-theme .svg-icon use {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nsub-theme {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 6px;
}
/* Font-size preview: each button renders at its resulting size (medium = reference) */
.set-fsize-btn[data-val="sm"] {
  font-size: calc(0.6875rem * 0.875);
}
.set-fsize-btn[data-val="lg"] {
  font-size: calc(0.6875rem * 1.125);
}
.set-fsize-btn[data-val="xl"] {
  font-size: calc(0.6875rem * 1.25);
}
.set-fsize-btn[data-val="hg"] {
  font-size: calc(0.6875rem * 1.5);
}
/* Same proportions for nav submenu size buttons (base: 0.625rem) */
.nsub-fsize[data-val="sm"] {
  font-size: calc(0.625rem * 0.875);
}
.nsub-fsize[data-val="lg"] {
  font-size: calc(0.625rem * 1.125);
}
.nsub-fsize[data-val="xl"] {
  font-size: calc(0.625rem * 1.25);
}
.nsub-fsize[data-val="hg"] {
  font-size: calc(0.625rem * 1.5);
}
.set-opt-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--c-border);
  background: var(--c-surface);
}
.set-opt-row:last-child {
  border-bottom: none;
}
.set-opt-label {
  font-family: "Source Code Pro", monospace;
  font-size: 0.625rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--c-muted);
  min-width: 80px;
  flex-shrink: 0;
}

/* ═══ MANUAL PAGES ════════════════════════════════════════════════════════ */

/* ── Column override (manual pages need more width) ─────────────── */
body.page-manual .row > [class*="col-"] {
  flex: 0 0 auto;
  width: 100%;
  max-width: 960px;
  text-align: left;
}

/* ── Shared wrapper ─────────────────────────────────────────────── */
.man-wrap {
  text-align: left;
  padding: 0 2px;
}

/* ── Index page ─────────────────────────────────────────────────── */
.man-idx-title {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 2.5rem;
  letter-spacing: 2px;
  color: #ffd028;
  line-height: 1;
  margin-bottom: 4px;
}
@media (min-width: 576px) {
  .man-idx-title {
    font-size: 3.25rem;
  }
}

.man-idx-sub {
  font-family: "Source Code Pro", monospace;
  font-size: 0.625rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 28px;
}
.man-idx-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
@media (min-width: 576px) {
  .man-idx-cards {
    flex-direction: row;
  }
  .man-idx-card {
    flex: 1;
  }
}
.man-idx-card {
  display: block;
  text-decoration: none;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  padding: 22px 24px;
  transition: border-color 0.2s;
}
.man-idx-card:hover {
  border-color: #ffd028;
}
.man-idx-card-role {
  font-family: "Source Code Pro", monospace;
  font-size: 0.5625rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 8px;
}
.man-idx-card-title {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 1.75rem;
  letter-spacing: 1px;
  color: #ffd028;
  line-height: 1;
  margin-bottom: 10px;
}
.man-idx-card-desc {
  font-size: 0.875rem;
  color: var(--c-text);
  line-height: 1.55;
}

/* ── Back link ──────────────────────────────────────────────────── */
.man-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: "Source Code Pro", monospace;
  font-size: 0.625rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--c-muted);
  text-decoration: none;
  margin-bottom: 16px;
  transition: color 0.2s;
}
.man-back:hover {
  color: var(--c-text-str);
}

/* ── Table of contents ──────────────────────────────────────────── */
.man-toc {
  border: 1px solid var(--c-border);
  margin-bottom: 24px;
}
.man-toc-toggle {
  width: 100%;
  text-align: left;
  cursor: pointer;
  background: var(--c-chd);
  border: none;
  padding: 10px 14px;
  font-family: "Source Code Pro", monospace;
  font-size: 0.625rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--c-muted);
  transition: color 0.2s;
}
.man-toc-toggle:hover {
  color: #ede5d5;
} /* always light — bg is always dark c-chd */
.man-toc-body {
  padding: 12px 16px;
  background: var(--c-surface);
}
.man-toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.man-toc-list li {
  line-height: 1.25em;
}
.man-toc-list li + li {
  margin-top: 4px;
}
.man-toc-list a {
  font-family: "Source Code Pro", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.3px;
  color: var(--c-text);
  text-decoration: none;
  transition: color 0.2s;
}
.man-toc-list a:hover {
  color: #ffd028;
}
.man-toc-sub {
  padding-left: 16px;
  line-height: 0.6875rem;
}
.man-toc-sub a {
  font-size: 0.6875rem;
  color: var(--c-muted);
}

/* ── Document page title ────────────────────────────────────────── */
.man-doc-title {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 1.75rem;
  letter-spacing: 1px;
  color: #ffd028;
  line-height: 1;
  margin: 14px 0 6px;
}
.man-doc-sub {
  font-family: "Source Code Pro", monospace;
  font-size: 0.5625rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 18px;
}

/* ── Document body ──────────────────────────────────────────────── */
.man-body {
  max-width: 720px;
}

.man-h2 {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 1.3125rem;
  letter-spacing: 1px;
  color: var(--c-text-str);
  margin: 28px 0 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--c-border);
  scroll-margin-top: 72px;
}
.man-h2:first-child {
  margin-top: 12px;
}
.man-h3 {
  font-family: "Source Code Pro", monospace;
  font-size: 1rem;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--c-text-str);
  margin: 18px 0 6px;
  opacity: 0.7;
  scroll-margin-top: 72px;
}
.man-hr {
  border: none;
  border-top: 1px solid var(--c-border);
  margin: 20px 0;
}

.man-p {
  font-size: 0.9375rem;
  color: var(--c-text);
  line-height: 1.7;
  margin-bottom: 10px;
}
.man-bq {
  border-left: 3px solid #ffd028;
  margin: 14px 0;
  padding: 10px 16px;
  background: var(--c-yd);
}
.man-bq p {
  font-size: 0.875rem;
  color: var(--c-text);
  margin: 0;
  line-height: 1.6;
}

/* Lists */
.man-ul,
.man-ol {
  margin: 0 0 10px;
  padding-left: 0;
  list-style: none;
}
.man-ul > li,
.man-ol > li {
  font-size: 0.9375rem;
  color: var(--c-text);
  line-height: 1.6;
  padding: 2px 0 2px 20px;
  position: relative;
}
.man-ul > li::before {
  content: "\2013";
  position: absolute;
  left: 2px;
  color: var(--c-muted);
}
.man-ol {
  counter-reset: man-li;
}
.man-ol > li {
  counter-increment: man-li;
}
.man-ol > li::before {
  content: counter(man-li) ".";
  position: absolute;
  left: 0;
  font-family: "Source Code Pro", monospace;
  font-size: 0.75rem;
  color: var(--c-muted);
  line-height: 1.9;
}
/* Nested ul (inside any list) */
.man-ul > li > ul,
.man-ol > li > ul {
  margin: 4px 0 2px;
  padding-left: 0;
  list-style: none;
}
.man-ul > li > ul > li,
.man-ol > li > ul > li {
  font-size: 0.875rem;
  color: var(--c-text);
  opacity: 0.75;
  padding: 1px 0 1px 18px;
  position: relative;
}
.man-ul > li > ul > li::before {
  content: "\2013";
  position: absolute;
  left: 2px;
  color: var(--c-muted);
}

/* Table */
.man-table-wrap {
  overflow-x: auto;
  margin: 12px 0;
}
.man-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.875rem;
}
.man-table th {
  font-family: "Source Code Pro", monospace;
  font-size: 0.5625rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--c-muted);
  padding: 6px 12px;
  border-bottom: 1px solid var(--c-border-md);
  text-align: left;
  white-space: nowrap;
}
.man-table td {
  padding: 7px 12px;
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text);
  vertical-align: top;
  line-height: 1.5;
}
.man-table tr:last-child td {
  border-bottom: none;
}

/* Inline code */
.man-body code {
  font-family: "Source Code Pro", monospace;
  font-size: 0.8em;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  padding: 1px 5px;
  color: var(--c-text-str);
}

/* Links inside body — yellow works on dark; use amber-brown on light */
.man-body a {
  color: #ffd028;
  text-decoration: none;
}
.man-body a:hover {
  text-decoration: underline;
}
html[data-theme="light"] .man-body a {
  color: #8b6200;
}
html[data-theme="light"] .man-body a:hover {
  color: #3a3028;
}
html[data-theme="light"] .man-toc-list a:hover {
  color: #8b6200;
}
/* Also cover OS-level light preference when no explicit theme cookie */
@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) .man-body a {
    color: #8b6200;
  }
  html:not([data-theme="dark"]) .man-body a:hover {
    color: #3a3028;
  }
  html:not([data-theme="dark"]) .man-toc-list a:hover {
    color: #8b6200;
  }
}

/* ═══ CONSOLIDATED BUTTON ENHANCEMENTS ══════════════════════════════════
   Hover-lift + elevation on primary yellow CTAs. Placed after all
   per-class rules so these overrides cascade correctly.
   ════════════════════════════════════════════════════════════════════════ */

/* Yellow primary CTAs — idle elevation + hover lift + hover elevation */
.btn-sch:hover,
.btn-lfa-yellow:hover,
.l-stat-add:hover,
.att-mark-btn:hover,
.set-btn:hover,
.home-login-btn:hover,
.home-dashboard-btn:hover,
.cfm-btn-ok:hover,
.dash-mark-btn:hover {
  box-shadow: var(--elev-2);
  transform: translateY(-1px);
  transition-duration: var(--dur-med);
}

/* Amber outline CTAs — hover gets level-1 elevation */
.c-hd-btn:hover,
.l-btn-edit:hover,
.att-sched-add-btn:hover {
  box-shadow: var(--elev-1);
}

/* Settings opt-btn active state — also get inset lock shadow */
.set-opt-btn.active {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
}

/* Bootstrap modal Cancel buttons — keep in-system on attendance page */
body.page-attendance .btn-secondary {
  background: transparent;
  border-color: var(--c-border-md);
  color: var(--c-muted);
}
body.page-attendance .btn-secondary:hover {
  background: var(--c-yd);
  border-color: var(--c-muted);
  color: var(--c-text-str);
}

/* ═══ REPORT PAGE ════════════════════════════════════════════════════════ */

.report-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1rem 3rem;
}
.report-hd-row {
  display: flex;
  background-color: var(--bs-black);
  padding: 0 5px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  background-color: var(--bs-black);
  padding: 5px;
}
.report-actions {
  flex-shrink: 0;
}
.rpt-page-title {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 1.75rem;
  letter-spacing: 1px;
  color: #ffd028;
  line-height: 1;
}
.rpt-page-sub {
  font-size: 0.75rem;
  color: var(--c-muted);
  margin-top: 4px;
}
.rpt-tutor {
  margin-bottom: 1.5rem;
  border: 1px solid var(--c-border);
}
.rpt-tutor-hd {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: var(--c-chd);
  color: var(--c-border-md);
  border-bottom: 1px solid var(--c-border);
}
.rpt-tutor-name {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  font-weight: 600;
}
.rpt-tutor-email {
  font-size: 0.75rem;
}
.rpt-table-wrap {
  overflow-x: auto;
}
.rpt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
.rpt-table th {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.5rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--c-muted);
  padding: 7px 12px;
  border-bottom: 1px solid var(--c-border-md);
  text-align: left;
}
.rpt-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text);
}
.rpt-table tr:last-child td {
  border-bottom: none;
}
.rpt-table a {
  color: var(--c-text);
  text-decoration: none;
  border-bottom: 1px dotted var(--c-border-md);
}
.rpt-table a:hover {
  color: #ffd028;
  border-color: #ffd028;
}
.rpt-num {
  text-align: right !important;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
}
.rpt-pct-good {
  color: var(--c-green);
}
.rpt-pct-ok {
  color: var(--c-yd);
}
.rpt-pct-bad {
  color: var(--c-chd);
}
.rpt-tutor-total td {
  background: var(--c-chd);
  color: var(--c-border-md);
  font-weight: 600;
  font-size: 0.75rem;
}
.rpt-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--c-muted);
  font-size: 0.875rem;
  border: 1px dashed var(--c-border);
}

/* Tutor multiselect filter */
.rpt-filter-wrap {
  margin-bottom: 1.75rem;
}
.rpt-date-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 1rem;
}
.rpt-date-input {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  padding: 4px 8px;
  border: 1px solid var(--c-border-md);
  border-radius: 4px;
  background: var(--c-surface);
  color: var(--c-text);
}
.rpt-active-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6875rem;
  color: var(--c-text);
  cursor: pointer;
  margin-left: auto;
}
.rpt-filter-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-muted);
  margin-bottom: 6px;
}
.rpt-ms {
  position: relative;
}
.rpt-ms-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 12px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  color: var(--c-text);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s;
}
.rpt-ms-trigger:hover,
.rpt-ms-trigger.open {
  border-color: var(--c-border-md);
}
.rpt-ms-trigger svg {
  flex-shrink: 0;
  opacity: 0.5;
  transition: transform 0.15s;
}
.rpt-ms-trigger.open svg {
  transform: rotate(180deg);
}
.rpt-ms-panel {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  background: var(--c-surface);
  border: 1px solid var(--c-border-md);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  z-index: 200;
  display: none;
}
.rpt-ms-panel.open {
  display: block;
}
.rpt-ms-search-wrap {
  padding: 8px;
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  background: var(--c-surface);
  z-index: 1;
}
.rpt-ms-search {
  width: 100%;
  padding: 6px 10px;
  background: var(--c-surface);
  border: 1px solid var(--c-border-md);
  color: var(--c-text);
  font-size: 0.8125rem;
  outline: none;
}
.rpt-ms-search:focus {
  border-color: #ffd028;
}
.rpt-ms-actions {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--c-border);
}
.rpt-ms-act-btn {
  flex: 1;
  padding: 5px 8px;
  background: none;
  border: none;
  border-right: 1px solid var(--c-border);
  color: var(--c-muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.5625rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
}
.rpt-ms-act-btn:last-child {
  border-right: none;
}
.rpt-ms-act-btn:hover {
  color: var(--c-surface);
  background: var(--c-chd);
}
.rpt-ms-list {
  max-height: 240px;
  overflow-y: auto;
}
.rpt-ms-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  cursor: pointer;
}
.rpt-ms-item:hover {
  background: var(--c-chd);
}
.rpt-ms-item input[type="checkbox"] {
  flex-shrink: 0;
  margin: 0;
  cursor: pointer;
  accent-color: #ffd028;
}
.rpt-ms-item label {
  flex: 1;
  cursor: pointer;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  color: var(--c-text);
}
.rpt-ms-item .rpt-ms-email {
  font-size: 0.6875rem;
  color: var(--c-muted);
}
.rpt-ms-empty {
  padding: 1rem;
  text-align: center;
  color: var(--c-muted);
  font-size: 0.8125rem;
}

/* Results state */
.rpt-results-placeholder {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--c-muted);
  font-size: 0.875rem;
  font-style: italic;
}
.rpt-loading {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--c-muted);
  font-size: 0.8125rem;
}

/* Students page — DB search form */
.s-search-form {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 1rem;
}
.s-search-form input[type="text"] {
  flex: 1;
  padding: 8px 12px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  color: var(--c-text);
  font-size: 0.875rem;
  outline: none;
  min-width: 0;
}
.s-search-form input[type="text"]:focus {
  border-color: var(--c-border-md);
}
.s-search-form .s-search-btn {
  padding: 8px 14px;
  white-space: nowrap;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6875rem;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  color: var(--c-text);
  cursor: pointer;
}
.s-search-form .s-search-btn:hover {
  border-color: #ffd028;
  color: #ffd028;
}
.s-search-clear {
  font-size: 0.75rem;
  color: var(--c-muted);
  text-decoration: none;
  white-space: nowrap;
  align-self: center;
}
.s-search-clear:hover {
  color: var(--c-text);
}
.s-browse-section {
  margin-bottom: 1.25rem;
}
.s-browse-cols {
  display: flex;
  gap: 10px;
}
.s-browse-col {
  flex: 1;
  min-width: 0;
}
.s-browse-q {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 5px 8px;
  margin-bottom: 4px;
  font-size: 0.8125rem;
  font-family: inherit;
  background: var(--c-surface);
  border: 1px solid var(--c-border-md);
  color: var(--c-text);
}
.s-browse-q:focus {
  outline: 2px solid var(--c-yd);
  outline-offset: -1px;
}
.s-browse-list {
  display: block;
  width: 100%;
  box-sizing: border-box;
  font-size: 0.8125rem;
  font-family: inherit;
  background: var(--c-surface);
  border: 1px solid var(--c-border-md);
  color: var(--c-text);
  padding: 2px 0;
}
.s-browse-list:focus {
  outline: 2px solid var(--c-muted);
  outline-offset: -1px;
}
.s-browse-list option {
  padding: 4px 8px;
}
.s-browse-list option:checked,
.s-browse-list option:focus {
  /* linear-gradient (not a plain color) forces Chromium to honor this even
     while the select itself has focus — a plain background-color here is
     silently ignored in favor of the native blue highlight in that state */
  background: linear-gradient(var(--c-accent), var(--c-accent));
  color: var(--c-accent-ink);
}
@media (max-width: 520px) {
  .s-browse-cols { flex-direction: column; }
}
.s-browse-btn {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 6px 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  background: var(--c-yd, #FFD028);
  color: var(--c-text);
  border: none;
  cursor: pointer;
}
.s-browse-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.s-search-section {
  margin-bottom: 1.25rem;
}
.s-search-section-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-muted);
  margin-bottom: 6px;
}

/* ═══ SERVICE PAGE ════════════════════════════════════════════════════════ */

.svc-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.svc-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.svc-status-dot.online {
  background: var(--c-green);
}
.svc-status-dot.maint {
  background: #e05a2b;
}
.svc-status-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--c-text-str);
}
.svc-msg {
  font-size: 0.8125rem;
  padding: 0.6rem 0.875rem;
  border: 1px solid;
  border-radius: 0;
  margin-bottom: 1rem;
}
.svc-msg.ok {
  border-color: var(--c-green);
  color: var(--c-green);
  background: var(--c-gd);
}
.svc-msg.warn {
  border-color: #e05a2b;
  color: #e05a2b;
  background: rgba(224, 90, 43, 0.1);
}

/* ═══ MAINTENANCE PAGE ════════════════════════════════════════════════════ */

.maint-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}
.maint-eyebrow {
  font-size: 0.6875rem;
  font-family: "IBM Plex Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-muted);
  margin-bottom: 1rem;
}
.maint-title {
  font-family: "TradeGothic-BoldCondTwenty", sans-serif;
  font-size: 2.25rem;
  letter-spacing: 2px;
  color: var(--c-text-str);
  margin-bottom: 0.5rem;
  line-height: 1.1;
}
.maint-sub {
  font-size: 0.875rem;
  color: var(--c-muted);
  margin-bottom: 2.5rem;
  max-width: 320px;
}
.maint-bar-wrap {
  width: 100%;
  max-width: 320px;
  height: 3px;
  background: var(--c-border);
  border-radius: 0;
  overflow: hidden;
  margin-bottom: 0.625rem;
}
.maint-bar {
  height: 100%;
  width: 0%;
  background: #ffd028;
  border-radius: 0;
  transition: width 0.9s linear;
}
.maint-countdown {
  font-size: 0.75rem;
  font-family: "IBM Plex Mono", monospace;
  color: var(--c-muted);
}
.maint-admin {
  margin-top: 2rem;
  font-size: 0.75rem;
}
.maint-admin a {
  color: var(--c-muted);
}
.maint-admin a:hover {
  color: var(--c-text);
}

/* ═══ BOOTSTRAP BORDER-RADIUS OVERRIDES ══════════════════════════════════ */

.modal-content,
.modal-header,
.modal-footer,
.btn,
.badge,
.form-control,
.form-select,
.input-group > .form-control,
.input-group > .form-select,
.input-group > .btn,
.input-group-text,
.card,
.card-header,
.card-footer,
.alert,
.dropdown-menu,
.dropdown-item,
.list-group,
.list-group-item,
.nav-tabs .nav-link,
.nav-pills .nav-link,
.pagination .page-link,
.toast,
.popover,
.tooltip .tooltip-inner,
.progress,
.progress-bar {
  border-radius: 0 !important;
}

/* ═══ ACTIVITY LOG PAGE ══════════════════════════════════════════════════ */

.act-wrap {
  padding: 1.25rem 1rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
}
.act-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.act-title {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-muted);
}
.act-meta {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6875rem;
  color: var(--c-muted);
  opacity: 0.6;
}
.act-empty {
  font-size: 0.8125rem;
  color: var(--c-muted);
  padding: 2rem 0;
}
.act-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--c-border);
}
.act-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
  table-layout: auto;
}
.act-th {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-muted);
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border-md);
  padding: 7px 10px;
  white-space: nowrap;
  text-align: left;
}
.act-td {
  padding: 7px 10px;
  vertical-align: top;
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text);
  line-height: 1.4;
}
.act-row:last-child .act-td {
  border-bottom: none;
}
.act-row:hover .act-td {
  background: var(--c-surface);
}
/* Column widths */
.act-th-time,  .act-td-time  { white-space: nowrap; min-width: 90px; }
.act-th-user,  .act-td-user  { min-width: 140px; }
.act-th-ev,    .act-td-ev    { white-space: nowrap; }
.act-th-page,  .act-td-page  { min-width: 100px; }
.act-th-rec,   .act-td-rec   { min-width: 120px; }
.act-th-ip,    .act-td-ip    { white-space: nowrap; font-family: "IBM Plex Mono", monospace; font-size: 0.6875rem; color: var(--c-muted); }
.act-th-detail,.act-td-detail { min-width: 160px; max-width: 340px; word-break: break-word; }

/* ═══ CONFLICTS PAGE ════════════════════════════════════════════════════ */

body.page-conflicts {
  /* .att-comp-done/.att-comp-partial (reused from the attendance page) read
   * these custom properties, but they're only defined under body.page-attendance
   * / body.page-dashboard — undefined here without this block, so the badges
   * silently lost their color. */
  --att-p:  #5ebf3a;
  --att-pd: rgba(94, 191, 58, 0.15);
  --att-n:  #ffd028;
  --att-nd: rgba(255, 208, 40, 0.15);
}

/* Sortable column headers (Conflicts page) */
.cfl-th-sort {
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-right: 18px;
}
.cfl-th-sort:hover {
  color: var(--c-text);
}
.cfl-th-sort::after {
  content: "\2195";
  position: absolute;
  right: 6px;
  opacity: 0.4;
}
.cfl-th-sort.is-sort-asc::after {
  content: "\2191";
  opacity: 1;
  color: var(--c-yd);
}
.cfl-th-sort.is-sort-desc::after {
  content: "\2193";
  opacity: 1;
  color: var(--c-yd);
}

/* Sticky table header (Conflicts page) — offset below the fixed 60px site header.
 * .cfl-table-wrap overrides .act-table-wrap's overflow-x:auto with overflow:visible:
 * per the CSS overflow-pairing rule, a non-visible overflow-x forces overflow-y to
 * compute to 'auto' as well, which turns the wrapper into a scroll-container
 * ancestor and silently breaks position:sticky on descendants (verified — the
 * header just scrolls away instead of pinning). This table's columns wrap instead
 * of needing horizontal scroll, so dropping overflow-x here is safe. */
.cfl-table-wrap {
  overflow: visible;
}
.cfl-table thead th {
  position: sticky;
  top: 60px;
  z-index: 10;
  background: var(--c-surface);
}

/* Batch cell: course name + batch title on two lines */
.cfl-batch-course {
  color: var(--c-text-str);
  font-weight: 600;
}
.cfl-batch-title {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6875rem;
  color: var(--c-muted);
  margin-top: 2px;
}

/* Conflicting-registers cell: one block per lesson, its registers listed below */
.cfl-lesson-block + .cfl-lesson-block {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--c-border);
}
.cfl-lesson-title {
  font-weight: 600;
  color: var(--c-text-str);
  margin-bottom: 2px;
}
.cfl-reg-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 2px 0;
}

.act-time-sub {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6875rem;
  color: var(--c-muted);
}
.act-uname {
  font-weight: 600;
  color: var(--c-text-str);
}
.act-uemail {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6875rem;
  color: var(--c-muted);
  margin-top: 1px;
}
.act-sub {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6875rem;
  color: var(--c-muted);
}
.act-dk {
  color: var(--c-muted);
}
.act-raw {
  font-family: "IBM Plex Mono", monospace;
  color: var(--c-muted);
}
/* Event type badges */
.act-ev {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 5px;
  border: 1px solid;
  display: inline-block;
}
.act-ev-view   { color: var(--c-muted);  border-color: var(--c-border-md); }
.act-ev-insert { color: var(--c-green);  border-color: var(--c-gd); }
.act-ev-update { color: var(--c-yd);     border-color: var(--c-yd); opacity: 0.8; }
.act-ev-delete { color: var(--c-chd);    border-color: var(--c-chd); }
