:root {
  --ink: #07090c;
  --ink-soft: #0c1116;
  --panel: rgba(17, 23, 29, 0.92);
  --panel-solid: #11171d;
  --panel-raised: #172029;
  --paper: #f1f4e9;
  --muted: #96a2a6;
  --muted-strong: #bac5c7;
  --line: rgba(220, 255, 92, 0.16);
  --line-strong: rgba(220, 255, 92, 0.34);
  --acid: #dcff57;
  --acid-dark: #9fbd23;
  --cyan: #35e7d2;
  --cyan-dark: #17a999;
  --coral: #ff6846;
  --coral-dark: #b83d24;
  --warning: #ffb84d;
  --danger: #ff4d5e;
  --success: #8cff72;
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
  --font-body: "HarmonyOS Sans SC", "Source Han Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --font-display: "Impact", "Haettenschweiler", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --font-mono: "Cascadia Code", "JetBrains Mono", "Consolas", monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-width: 0;
  margin: 0;
  padding-bottom: 42px;
  color: var(--paper);
  background:
    radial-gradient(circle at 86% 7%, rgba(53, 231, 210, 0.11), transparent 29rem),
    radial-gradient(circle at 5% 42%, rgba(220, 255, 87, 0.08), transparent 27rem),
    radial-gradient(circle at 65% 87%, rgba(255, 104, 70, 0.07), transparent 30rem),
    linear-gradient(160deg, #080b0f 0%, #090d12 55%, #070a0d 100%);
  font-family: var(--font-body);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
svg {
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
[hidden] { display: none !important; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.space-dust {
  position: fixed; z-index: -2; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(241, 244, 233, 0.8) 0 1px, transparent 1.4px),
    radial-gradient(circle, rgba(53, 231, 210, 0.7) 0 1px, transparent 1.4px),
    radial-gradient(circle, rgba(220, 255, 87, 0.65) 0 1px, transparent 1.4px);
  background-size: 173px 173px, 241px 241px, 317px 317px;
  background-position: 17px 31px, 76px 114px, 143px 58px;
  opacity: 0.22;
  animation: dustDrift 36s linear infinite;
}
.grid-noise {
  position: fixed; z-index: -1; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(241,244,233,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(241,244,233,.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}
@keyframes dustDrift { to { background-position: 190px 204px, 317px 355px, 460px 375px; } }
.topbar {
  position: sticky; z-index: 30; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  width: min(1480px, calc(100% - 48px)); margin: 18px auto 0; padding: 10px 12px 10px 14px;
  border: 1px solid rgba(241,244,233,.09); background: rgba(8,12,16,.74); box-shadow: 0 12px 40px rgba(0,0,0,.22);
  backdrop-filter: blur(18px); clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
}
.brand, .top-actions, .nav-link, .button, .status-pill, .location-block, .location-copy, .field > span, .field-label, .live-clock, .dashboard-actions { display: flex; align-items: center; }
.brand { gap: 11px; }
.brand-mark {
  display: grid; flex: 0 0 auto; width: 38px; height: 38px; place-items: center; color: var(--ink); background: var(--acid);
  box-shadow: 0 0 26px rgba(220,255,87,.22); clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 0 100%);
}
.brand-mark svg { width: 22px; height: 22px; stroke-width: 1.9; }
.brand-copy { display: grid; line-height: 1.2; }
.brand-copy strong { font-size: 15px; letter-spacing: .04em; }
.brand-copy small, .dashboard-brand small, .footer-meta, .footer-signature span { color: var(--muted); font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; }
.top-actions { gap: 6px; }
.nav-link { min-height: 38px; padding: 0 14px; color: var(--muted-strong); font-size: 13px; border: 1px solid transparent; transition: color 180ms ease, border-color 180ms ease, background 180ms ease; }
.nav-link:hover, .nav-link:focus-visible { color: var(--paper); border-color: rgba(241,244,233,.12); background: rgba(241,244,233,.04); }
.button {
  justify-content: center; gap: 9px; min-height: 48px; padding: 0 20px; border: 1px solid transparent; border-radius: 0; cursor: pointer;
  font-size: 13px; font-weight: 800; letter-spacing: .02em; transition: transform 170ms ease, background 170ms ease, color 170ms ease, border-color 170ms ease, box-shadow 170ms ease;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}
.button:hover:not(:disabled) { transform: translateY(-2px); }
.button:active:not(:disabled) { transform: translateY(0); }
.button:disabled { cursor: not-allowed; opacity: .42; filter: saturate(.45); }
.button svg { width: 18px; height: 18px; }
.button-small { min-height: 38px; padding: 0 14px; font-size: 12px; }
.button-primary { color: #111500; background: var(--acid); box-shadow: 0 12px 30px rgba(220,255,87,.13); }
.button-primary:hover:not(:disabled) { background: #e9ff83; box-shadow: 0 15px 34px rgba(220,255,87,.22); }
.button-secondary { color: #071312; background: var(--cyan); box-shadow: 0 12px 30px rgba(53,231,210,.12); }
.button-secondary:hover:not(:disabled) { background: #71f4e4; }
.button-alert { color: white; background: var(--coral); box-shadow: 0 12px 30px rgba(255,104,70,.16); }
.button-alert:hover:not(:disabled) { background: #ff8064; }
.button-ghost { color: var(--muted-strong); border-color: rgba(241,244,233,.14); background: rgba(241,244,233,.035); }
.button-ghost:hover:not(:disabled) { color: var(--paper); border-color: rgba(241,244,233,.28); background: rgba(241,244,233,.07); }
.button-full { width: 100%; }
main { width: min(1480px, calc(100% - 48px)); margin: 0 auto; }
.hero { display: grid; grid-template-columns: minmax(0, .97fr) minmax(520px, 1.03fr); gap: clamp(36px, 5vw, 88px); align-items: center; min-height: calc(100vh - 96px); padding: 78px 0 76px; }
.hero-copy { position: relative; max-width: 700px; }
.hero-copy::before { position: absolute; z-index: -1; top: -86px; left: -88px; width: 240px; height: 240px; content: ""; border: 1px solid rgba(53,231,210,.12); border-radius: 50%; box-shadow: 0 0 0 28px rgba(53,231,210,.025), 0 0 0 58px rgba(53,231,210,.018); }
.eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 25px; color: var(--muted-strong); font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; }
.pulse-dot, .status-dot, .readout-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 0 4px rgba(220,255,87,.1), 0 0 16px rgba(220,255,87,.62); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; transform: scale(.78); } }
.eyebrow-line { width: 46px; height: 1px; background: rgba(241,244,233,.18); }
.hero h1 { max-width: 760px; margin: 0; font-family: var(--font-display); font-size: clamp(59px, 7.25vw, 118px); font-weight: 900; letter-spacing: -.052em; line-height: .86; text-transform: uppercase; }
.outline-text { color: transparent; -webkit-text-stroke: 1.5px var(--acid); text-shadow: 5px 5px 0 rgba(220,255,87,.07); }
.hero-lead { max-width: 590px; margin: 30px 0 28px; color: var(--muted-strong); font-size: clamp(16px, 1.4vw, 20px); line-height: 1.85; }
.maker-card { position: relative; display: grid; max-width: 650px; margin: 0 0 32px 32px; padding: 17px 20px 17px 25px; overflow: hidden; border: 1px solid rgba(220,255,87,.26); background: linear-gradient(100deg, rgba(220,255,87,.11), rgba(220,255,87,.018) 75%), rgba(12,17,22,.82); box-shadow: 0 18px 48px rgba(0,0,0,.25), inset 4px 0 0 var(--acid); clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%); }
.maker-card::after { position: absolute; top: -28px; right: -8px; width: 112px; height: 94px; content: "M78"; color: rgba(220,255,87,.045); font-family: var(--font-display); font-size: 54px; line-height: 1; transform: rotate(-8deg); }
.maker-kicker { margin-bottom: 3px; color: var(--acid); font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; }
.maker-card strong { position: relative; z-index: 1; font-size: clamp(17px, 1.55vw, 23px); letter-spacing: -.025em; line-height: 1.35; }
.maker-note { position: relative; z-index: 1; margin-top: 4px; color: var(--muted); font-size: 12px; }
.hero-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; max-width: 650px; border: 1px solid rgba(241,244,233,.09); background: rgba(241,244,233,.08); }
.hero-facts > div { display: grid; gap: 2px; padding: 15px 17px; background: rgba(8,12,16,.94); }
.hero-facts span { color: var(--muted); font-size: 11px; }
.hero-facts strong { color: var(--cyan); font-family: var(--font-mono); font-size: 15px; }
.checkin-console { position: relative; padding: clamp(24px, 2.5vw, 38px); border: 1px solid rgba(241,244,233,.11); background: linear-gradient(135deg, rgba(53,231,210,.055), transparent 35%), linear-gradient(315deg, rgba(255,104,70,.045), transparent 32%), var(--panel); box-shadow: var(--shadow); clip-path: polygon(0 0, calc(100% - 30px) 0, 100% 30px, 100% 100%, 30px 100%, 0 calc(100% - 30px)); }
.checkin-console::before { position: absolute; top: 0; left: clamp(24px, 2.5vw, 38px); width: 94px; height: 3px; content: ""; background: var(--acid); box-shadow: 0 0 18px rgba(220,255,87,.55); }
.console-head, .card-heading, .table-toolbar, .form-head, .dashboard-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.console-head { margin-bottom: 28px; }
.section-index, .mini-label { display: block; color: var(--cyan); font-family: var(--font-mono); font-size: 10px; letter-spacing: .13em; }
.console-head h2, .rules-heading h2, .auth-view h2, .dashboard-header h2 { margin: 4px 0 0; font-size: clamp(25px, 2.2vw, 34px); letter-spacing: -.035em; line-height: 1.2; }
.status-pill { flex: 0 0 auto; gap: 8px; min-height: 32px; padding: 0 11px; color: var(--muted-strong); border: 1px solid rgba(241,244,233,.12); background: rgba(241,244,233,.035); font-family: var(--font-mono); font-size: 10px; white-space: nowrap; }
.status-pill.compact { min-height: 28px; }
.status-pill.is-open { color: var(--acid); border-color: rgba(220,255,87,.32); background: rgba(220,255,87,.07); }
.status-pill.is-closed { color: var(--coral); border-color: rgba(255,104,70,.3); background: rgba(255,104,70,.07); }
.status-pill.is-open .status-dot { background: var(--success); box-shadow: 0 0 0 4px rgba(140,255,114,.1), 0 0 16px rgba(140,255,114,.6); }
.status-pill.is-closed .status-dot { background: var(--coral); box-shadow: 0 0 0 4px rgba(255,104,70,.1), 0 0 16px rgba(255,104,70,.5); }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: grid; gap: 7px; margin-bottom: 15px; }
.field > span, .field-label { gap: 6px; color: var(--muted-strong); font-size: 12px; font-weight: 700; }
.field > span svg, .field-label svg { width: 15px; height: 15px; color: var(--cyan); }
.field input, .field select, .filter-field select, .filter-field input, .search-field input { width: 100%; min-height: 46px; color: var(--paper); border: 1px solid rgba(241,244,233,.12); border-radius: 0; outline: none; background: rgba(5,8,11,.72); transition: border-color 170ms ease, box-shadow 170ms ease, background 170ms ease; }
.field input, .field select, .filter-field select, .filter-field input { padding: 0 13px; }
.field input::placeholder, .search-field input::placeholder, .manual-location input::placeholder { color: #697477; }
.field input:focus, .field select:focus, .filter-field select:focus, .filter-field input:focus, .search-field:focus-within, .manual-location input:focus { border-color: rgba(53,231,210,.68); background: rgba(7,12,16,.94); box-shadow: 0 0 0 3px rgba(53,231,210,.085); }
.field input:invalid:not(:placeholder-shown) { border-color: rgba(255,77,94,.62); }
.location-block { justify-content: space-between; gap: 16px; margin-top: 4px; padding: 15px 0 11px; border-top: 1px solid rgba(241,244,233,.08); }
.location-copy { align-items: flex-start; gap: 10px; }
.location-copy > div { display: grid; }
.location-copy p { max-width: 390px; margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.location-readout { display: flex; align-items: center; gap: 9px; min-height: 42px; margin: 4px 0 14px; padding: 0 13px; color: var(--muted-strong); border-left: 3px solid rgba(241,244,233,.16); background: rgba(241,244,233,.032); font-family: var(--font-mono); font-size: 11px; }
.location-readout[data-state="loading"] { border-color: var(--warning); }
.location-readout[data-state="success"] { color: var(--cyan); border-color: var(--cyan); background: rgba(53,231,210,.055); }
.location-readout[data-state="error"] { color: #ff9d8b; border-color: var(--coral); background: rgba(255,104,70,.055); }
.location-readout[data-state="loading"] .readout-dot { background: var(--warning); box-shadow: 0 0 12px rgba(255,184,77,.52); }
.location-readout[data-state="success"] .readout-dot { background: var(--cyan); box-shadow: 0 0 12px rgba(53,231,210,.52); }
.location-readout[data-state="error"] .readout-dot { background: var(--coral); box-shadow: 0 0 12px rgba(255,104,70,.52); }
.manual-location { display: grid; gap: 7px; margin: -2px 0 15px; color: var(--warning); font-size: 11px; }
.manual-location input { min-height: 44px; padding: 0 13px; color: var(--paper); border: 1px solid rgba(255,184,77,.35); background: rgba(255,184,77,.04); outline: none; }
.window-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 5px 0 20px; border: 1px solid rgba(241,244,233,.09); background: rgba(241,244,233,.09); }
.window-card { display: grid; gap: 2px; padding: 14px 15px; background: rgba(6,10,13,.9); transition: background 180ms ease, box-shadow 180ms ease; }
.window-card.is-open { background: rgba(220,255,87,.06); box-shadow: inset 0 -2px 0 var(--acid); }
.window-card.is-closed { opacity: .72; }
.window-label { color: var(--muted); font-size: 10px; }
.window-card strong { font-family: var(--font-mono); font-size: 17px; letter-spacing: -.04em; }
.window-card small { color: var(--muted); font-size: 10px; }
.form-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-actions .button { min-height: 55px; }
.form-footnote { margin: 12px 0 0; color: #717d80; font-size: 10px; text-align: center; }
.student-status { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; padding: 15px; border: 1px dashed rgba(53,231,210,.27); background: rgba(53,231,210,.035); }
.student-status strong { display: block; margin-top: 2px; }
.status-chips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.status-chip { padding: 5px 9px; color: var(--muted-strong); border: 1px solid rgba(241,244,233,.1); background: rgba(241,244,233,.04); font-size: 11px; }
.status-chip.is-done { color: var(--acid); border-color: rgba(220,255,87,.28); background: rgba(220,255,87,.06); }
.rules-section { display: grid; grid-template-columns: minmax(260px, .72fr) minmax(0, 1.28fr); gap: clamp(32px, 6vw, 100px); padding: 90px 0 118px; border-top: 1px solid rgba(241,244,233,.08); }
.rules-heading h2 { margin-top: 10px; font-size: clamp(34px, 4vw, 58px); line-height: 1.08; }
.rules-heading p { max-width: 450px; margin: 20px 0 0; color: var(--muted); }
.rules-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: rgba(241,244,233,.09); }
.rule-card { position: relative; min-height: 290px; padding: 28px 24px 24px; overflow: hidden; background: rgba(12,17,22,.96); transition: transform 190ms ease, background 190ms ease; }
.rule-card:hover { z-index: 1; background: var(--panel-raised); transform: translateY(-7px); }
.rule-card::after { position: absolute; right: -7px; bottom: -38px; content: attr(data-number); color: rgba(241,244,233,.032); font-family: var(--font-display); font-size: 118px; line-height: 1; }
.rule-card > svg { width: 32px; height: 32px; color: var(--acid); }
.rule-card:nth-child(2) > svg { color: var(--cyan); }
.rule-card:nth-child(3) > svg { color: var(--coral); }
.rule-card h3 { margin: 54px 0 10px; font-size: 20px; }
.rule-card p { position: relative; z-index: 1; margin: 0; color: var(--muted); font-size: 13px; }
.footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; width: min(1480px, calc(100% - 48px)); margin: 0 auto; padding: 25px 0 55px; border-top: 1px solid rgba(241,244,233,.08); }
.footer-signature { display: grid; }
.footer-signature strong { margin-top: 4px; color: var(--acid); font-size: clamp(16px, 1.7vw, 24px); letter-spacing: -.025em; }
.footer-meta { display: flex; gap: 22px; color: var(--muted); text-align: right; }
.maker-ticker { position: fixed; z-index: 40; right: 0; bottom: 0; left: 0; height: 42px; overflow: hidden; color: var(--ink); border-top: 1px solid rgba(220,255,87,.48); background: var(--acid); font-family: var(--font-mono); font-size: 11px; font-weight: 800; }
.ticker-track { display: flex; align-items: center; gap: 60px; width: max-content; height: 100%; padding-left: 100vw; animation: tickerMove 32s linear infinite; }
.ticker-track span { position: relative; white-space: nowrap; }
.ticker-track span::before { position: absolute; top: 50%; left: -31px; width: 6px; height: 6px; content: ""; background: var(--ink); transform: translateY(-50%) rotate(45deg); }
@keyframes tickerMove { to { transform: translateX(-50%); } }
.modal-backdrop { position: fixed; z-index: 100; inset: 0; padding: 24px; overflow: auto; background: rgba(3,5,7,.82); backdrop-filter: blur(16px); }
.admin-modal { position: relative; width: min(1480px, 100%); min-height: min(860px, calc(100vh - 48px)); margin: 0 auto; overflow: hidden; border: 1px solid rgba(241,244,233,.12); background: #0c1116; box-shadow: 0 35px 110px rgba(0,0,0,.58); clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 28px 100%, 0 calc(100% - 28px)); }
.modal-close { position: absolute; z-index: 10; top: 17px; right: 17px; }
.icon-button { display: grid; width: 40px; height: 40px; padding: 0; place-items: center; color: var(--muted-strong); border: 1px solid rgba(241,244,233,.12); background: rgba(7,10,13,.78); cursor: pointer; transition: color 170ms ease, border-color 170ms ease, background 170ms ease; }
.icon-button:hover { color: var(--paper); border-color: rgba(241,244,233,.28); background: rgba(241,244,233,.08); }
.icon-button svg { width: 18px; height: 18px; }
.auth-view { display: grid; grid-template-columns: minmax(360px, .85fr) minmax(480px, 1.15fr); min-height: min(860px, calc(100vh - 48px)); }
.auth-aside { position: relative; display: flex; flex-direction: column; justify-content: center; padding: clamp(40px, 6vw, 90px); overflow: hidden; border-right: 1px solid rgba(241,244,233,.08); background: linear-gradient(150deg, rgba(53,231,210,.1), transparent 42%), linear-gradient(330deg, rgba(220,255,87,.07), transparent 48%), #0a0f13; }
.auth-aside::before { position: absolute; inset: 0; content: ""; background-image: linear-gradient(rgba(241,244,233,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(241,244,233,.03) 1px, transparent 1px); background-size: 38px 38px; mask-image: linear-gradient(135deg, black, transparent 74%); }
.auth-aside > * { position: relative; z-index: 1; }
.auth-aside h2 { margin-top: 12px; font-size: clamp(38px, 4.2vw, 66px); line-height: 1; }
.auth-aside p { max-width: 500px; color: var(--muted); }
.auth-illustration { position: relative; width: min(360px, 76%); aspect-ratio: 1; margin-top: 54px; }
.orbit { position: absolute; inset: 8%; border: 1px solid rgba(53,231,210,.28); border-radius: 50%; }
.orbit::after { position: absolute; top: 17%; left: 10%; width: 11px; height: 11px; content: ""; border-radius: 50%; background: var(--acid); box-shadow: 0 0 18px rgba(220,255,87,.8); }
.orbit-one { animation: orbitSpin 13s linear infinite; }
.orbit-two { inset: 24%; border-color: rgba(255,104,70,.34); transform: rotate(62deg) scaleX(.65); animation: orbitSpinReverse 9s linear infinite; }
.core { position: absolute; top: 50%; left: 50%; width: 58px; height: 58px; border: 2px solid var(--acid); background: rgba(220,255,87,.08); box-shadow: 0 0 34px rgba(220,255,87,.2); transform: translate(-50%, -50%) rotate(45deg); }
@keyframes orbitSpin { to { transform: rotate(360deg); } }
@keyframes orbitSpinReverse { to { transform: rotate(-298deg) scaleX(.65); } }
.auth-main { display: grid; padding: clamp(44px, 7vw, 110px); place-items: center; }
.auth-form { width: min(560px, 100%); padding: 34px; border: 1px solid rgba(241,244,233,.1); background: rgba(17,23,29,.82); box-shadow: var(--shadow); clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%); }
.form-head { display: block; margin-bottom: 27px; }
.form-head h3 { margin: 6px 0 8px; font-size: 25px; }
.form-head p { margin: 0; color: var(--muted); font-size: 13px; }
.dashboard-view { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: min(860px, calc(100vh - 48px)); }
.dashboard-sidebar { display: flex; flex-direction: column; padding: 22px 16px; border-right: 1px solid rgba(241,244,233,.09); background: linear-gradient(180deg, rgba(53,231,210,.055), transparent 38%), #0a0f13; }
.dashboard-brand { display: flex; align-items: center; gap: 10px; padding: 0 6px 21px; border-bottom: 1px solid rgba(241,244,233,.08); }
.dashboard-brand > div { display: grid; }
.dashboard-brand strong { font-size: 14px; }
.admin-identity { display: flex; align-items: center; gap: 10px; margin: 18px 4px; padding: 12px; border: 1px solid rgba(241,244,233,.08); background: rgba(241,244,233,.025); }
.identity-avatar { display: grid; flex: 0 0 auto; width: 37px; height: 37px; place-items: center; color: var(--ink); background: var(--cyan); font-family: var(--font-display); font-size: 19px; }
.admin-identity > div { display: grid; min-width: 0; }
.admin-identity strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.admin-identity small { color: var(--muted); font-family: var(--font-mono); font-size: 9px; letter-spacing: .1em; }
.dashboard-nav { display: grid; gap: 5px; margin-top: 8px; }
.dashboard-tab { display: flex; align-items: center; gap: 11px; min-height: 45px; padding: 0 12px; color: var(--muted-strong); border: 0; border-left: 2px solid transparent; background: transparent; cursor: pointer; font-size: 13px; text-align: left; transition: color 170ms ease, border-color 170ms ease, background 170ms ease; }
.dashboard-tab:hover, .dashboard-tab.is-active { color: var(--paper); border-color: var(--acid); background: rgba(220,255,87,.055); }
.dashboard-tab svg { width: 17px; height: 17px; }
.sidebar-maker { display: grid; gap: 6px; margin: auto 0 15px; padding: 13px; color: var(--muted); border: 1px dashed rgba(220,255,87,.2); background: rgba(220,255,87,.03); font-size: 9px; }
.sidebar-maker strong { color: var(--acid); font-size: 11px; line-height: 1.5; }
.dashboard-main { min-width: 0; padding: 26px clamp(20px, 3vw, 42px) 42px; overflow: auto; background: radial-gradient(circle at 100% 0, rgba(53,231,210,.06), transparent 28rem), #0d1217; }
.dashboard-header { align-items: center; margin-bottom: 24px; }
.dashboard-actions { gap: 9px; }
.live-clock { gap: 8px; min-height: 40px; padding: 0 13px; color: var(--acid); border: 1px solid rgba(220,255,87,.16); background: rgba(220,255,87,.035); font-family: var(--font-mono); font-size: 12px; }
.dashboard-panel { display: none; }
.dashboard-panel.is-active { display: block; animation: panelIn 220ms ease both; }
@keyframes panelIn { from { opacity: 0; transform: translateY(7px); } }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 15px; }
.metric-card { position: relative; min-height: 135px; padding: 18px; overflow: hidden; border: 1px solid rgba(241,244,233,.09); background: rgba(17,23,29,.92); }
.metric-card::after { position: absolute; right: -16px; bottom: -48px; width: 100px; height: 100px; content: ""; border: 1px solid rgba(53,231,210,.10); border-radius: 50%; }
.metric-card span, .metric-card small { color: var(--muted); font-size: 11px; }
.metric-card strong { display: block; margin: 9px 0 4px; color: var(--paper); font-family: var(--font-mono); font-size: 35px; letter-spacing: -.06em; line-height: 1; }
.metric-card.accent-acid { border-top-color: var(--acid); }
.metric-card.accent-acid strong { color: var(--acid); }
.metric-card.accent-coral { border-top-color: var(--coral); }
.metric-card.accent-coral strong { color: var(--coral); }
.metric-card.accent-cyan { border-top-color: var(--cyan); }
.metric-card.accent-cyan strong { color: var(--cyan); }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.28fr) minmax(320px, .72fr); gap: 15px; margin-bottom: 15px; }
.control-card, .activity-card, .table-card { border: 1px solid rgba(241,244,233,.09); background: rgba(17,23,29,.92); }
.control-card { padding: 23px; }
.card-heading { margin-bottom: 20px; }
.card-heading h3, .table-toolbar h3 { margin: 3px 0 0; font-size: 19px; }
.time-form { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(130px, 1fr) auto; gap: 12px; align-items: end; }
.time-form .field { margin: 0; }
.time-form input[type="time"] { color-scheme: dark; }
.control-note, .owner-only-hint { margin: 14px 0 0; color: var(--muted); font-size: 11px; }
.owner-card.is-disabled form { pointer-events: none; opacity: .42; }
.owner-card.is-disabled { border-color: rgba(255,104,70,.15); }
.owner-only-hint.is-warning { color: var(--coral); }
.quota-badge { flex: 0 0 auto; padding: 6px 9px; color: var(--acid); border: 1px solid rgba(220,255,87,.22); background: rgba(220,255,87,.05); font-family: var(--font-mono); font-size: 11px; }
.admin-add-form .field-grid { gap: 10px; }
.admin-add-form .field { margin-bottom: 10px; }
.activity-card { padding: 22px; }
.activity-list { display: grid; }
.activity-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 13px 0; border-top: 1px solid rgba(241,244,233,.07); }
.activity-icon { display: grid; width: 36px; height: 36px; place-items: center; color: var(--acid); border: 1px solid rgba(220,255,87,.18); background: rgba(220,255,87,.045); }
.activity-icon.checkout { color: var(--coral); border-color: rgba(255,104,70,.2); background: rgba(255,104,70,.045); }
.activity-row > div { display: grid; }
.activity-row strong { font-size: 13px; }
.activity-row small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.activity-time { color: var(--muted-strong); font-family: var(--font-mono); font-size: 10px; text-align: right; }
.table-card { min-height: 600px; }
.table-toolbar { align-items: center; padding: 22px 23px 18px; }
.table-note { color: var(--muted); font-size: 11px; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 23px 17px; border-bottom: 1px solid rgba(241,244,233,.08); }
.search-field { display: flex; align-items: center; flex: 1 1 300px; min-height: 42px; padding-left: 12px; color: var(--muted); border: 1px solid rgba(241,244,233,.12); background: rgba(5,8,11,.72); }
.search-field svg { flex: 0 0 auto; width: 16px; height: 16px; }
.search-field input { min-height: 40px; padding: 0 11px; border: 0; background: transparent; box-shadow: none; }
.filter-field { flex: 0 0 auto; }
.filter-field select, .filter-field input { min-height: 42px; color-scheme: dark; }
.table-wrap { position: relative; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { padding: 13px 16px; border-bottom: 1px solid rgba(241,244,233,.065); text-align: left; vertical-align: top; }
th { color: var(--muted); background: rgba(7,10,13,.46); font-family: var(--font-mono); font-size: 9px; font-weight: 700; letter-spacing: .08em; white-space: nowrap; }
td { color: var(--muted-strong); }
td strong { display: block; color: var(--paper); font-size: 13px; }
td small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.type-badge, .location-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border: 1px solid rgba(220,255,87,.2); color: var(--acid); background: rgba(220,255,87,.05); font-size: 10px; white-space: nowrap; }
.type-badge.checkout { color: var(--coral); border-color: rgba(255,104,70,.23); background: rgba(255,104,70,.05); }
.location-badge.manual { color: var(--warning); border-color: rgba(255,184,77,.25); background: rgba(255,184,77,.05); }
.location-link { color: var(--cyan); text-decoration: underline; text-decoration-color: rgba(53,231,210,.32); text-underline-offset: 3px; }
.empty-state { padding: 55px 20px; color: var(--muted); text-align: center; }
.admin-roster { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 0 23px 25px; }
.admin-card { position: relative; display: grid; min-height: 170px; padding: 18px; overflow: hidden; border: 1px solid rgba(241,244,233,.09); background: rgba(7,10,13,.55); }
.admin-card.owner { border-color: rgba(220,255,87,.27); background: rgba(220,255,87,.04); }
.admin-card::after { position: absolute; right: -10px; bottom: -28px; content: "M78"; color: rgba(241,244,233,.028); font-family: var(--font-display); font-size: 68px; }
.admin-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.admin-card h4 { margin: 12px 0 1px; font-size: 17px; }
.admin-card p { margin: 0; color: var(--muted); font-size: 11px; }
.role-tag { padding: 3px 7px; color: var(--cyan); border: 1px solid rgba(53,231,210,.23); font-family: var(--font-mono); font-size: 9px; }
.role-tag.owner { color: var(--acid); border-color: rgba(220,255,87,.26); }
.admin-remove { position: relative; z-index: 1; align-self: end; justify-self: start; margin-top: 18px; }
.toast-stack { position: fixed; z-index: 200; right: 22px; bottom: 62px; display: grid; gap: 9px; width: min(390px, calc(100% - 44px)); }
.toast { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 13px 14px; color: var(--paper); border: 1px solid rgba(53,231,210,.24); background: rgba(10,15,19,.96); box-shadow: 0 18px 55px rgba(0,0,0,.42); animation: toastIn 220ms ease both; }
.toast.success { border-color: rgba(140,255,114,.3); }
.toast.error { border-color: rgba(255,104,70,.36); }
.toast.warning { border-color: rgba(255,184,77,.36); }
.toast-icon { display: grid; width: 28px; height: 28px; place-items: center; color: var(--cyan); background: rgba(53,231,210,.08); }
.toast.success .toast-icon { color: var(--success); background: rgba(140,255,114,.07); }
.toast.error .toast-icon { color: var(--coral); background: rgba(255,104,70,.07); }
.toast.warning .toast-icon { color: var(--warning); background: rgba(255,184,77,.07); }
.toast strong { display: block; font-size: 12px; }
.toast span { display: block; color: var(--muted); font-size: 10px; line-height: 1.45; }
.toast-close { padding: 5px 7px; color: var(--muted); border: 0; background: transparent; cursor: pointer; font-size: 15px; }
@keyframes toastIn { from { opacity: 0; transform: translateX(18px); } }
@media (max-width: 1180px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 70px; }
  .hero-copy, .maker-card, .hero-facts { max-width: 840px; }
  .maker-card, .hero-facts { max-width: 700px; }
  .rules-section { grid-template-columns: 1fr; }
  .overview-grid { grid-template-columns: 1fr; }
  .auth-view { grid-template-columns: minmax(310px, .72fr) minmax(440px, 1.28fr); }
  .dashboard-view { grid-template-columns: 218px minmax(0, 1fr); }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-roster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 880px) {
  .topbar, main, .footer { width: min(calc(100% - 28px), 1480px); }
  .topbar { margin-top: 10px; }
  .nav-link { display: none; }
  .hero { gap: 38px; padding: 55px 0 64px; }
  .hero h1 { font-size: clamp(52px, 15vw, 92px); }
  .maker-card { margin-left: 0; }
  .rules-section { padding: 64px 0 82px; }
  .rules-grid { grid-template-columns: 1fr; }
  .rule-card { min-height: 210px; }
  .rule-card h3 { margin-top: 32px; }
  .modal-backdrop { padding: 0; }
  .admin-modal { min-height: 100vh; clip-path: none; }
  .auth-view { grid-template-columns: 1fr; min-height: 100vh; }
  .auth-aside { min-height: 330px; padding: 58px 30px 35px; border-right: 0; border-bottom: 1px solid rgba(241,244,233,.08); }
  .auth-illustration { position: absolute; right: -30px; bottom: -95px; width: 260px; opacity: .68; }
  .auth-main { padding: 42px 22px 60px; }
  .dashboard-view { grid-template-columns: 1fr; min-height: 100vh; }
  .dashboard-sidebar { display: block; padding: 12px 58px 12px 14px; border-right: 0; border-bottom: 1px solid rgba(241,244,233,.08); }
  .dashboard-brand, .admin-identity, .sidebar-maker { display: none; }
  .dashboard-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
  .dashboard-tab { justify-content: center; min-height: 42px; padding: 0 6px; border-bottom: 2px solid transparent; border-left: 0; font-size: 11px; }
  .dashboard-tab.is-active { border-bottom-color: var(--acid); border-left-color: transparent; }
  .dashboard-tab svg { display: none; }
  .dashboard-sidebar > .button { display: none; }
  .dashboard-main { max-height: calc(100vh - 67px); padding: 23px 15px 36px; }
  .dashboard-header { align-items: flex-start; }
  .live-clock { display: none; }
}
@media (max-width: 640px) {
  .topbar { width: calc(100% - 20px); }
  .brand-copy small { display: none; }
  .top-actions .button span { display: none; }
  .top-actions .button { width: 40px; padding: 0; }
  .hero h1 { letter-spacing: -.06em; }
  .hero-facts { grid-template-columns: 1fr; }
  .hero-facts > div { grid-template-columns: 1fr auto; align-items: center; }
  .checkin-console { padding: 22px 17px; clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px)); }
  .field-grid, .form-actions, .window-grid { grid-template-columns: 1fr; }
  .console-head { align-items: flex-start; margin-bottom: 22px; }
  .status-pill { padding: 0 8px; }
  .location-block { align-items: flex-start; }
  .location-copy p { max-width: 230px; }
  .student-status { align-items: flex-start; flex-direction: column; }
  .status-chips { justify-content: flex-start; }
  .footer { align-items: flex-start; flex-direction: column; }
  .footer-meta { flex-direction: column; gap: 4px; text-align: left; }
  .auth-aside h2 { font-size: 40px; }
  .auth-form { padding: 24px 18px; }
  .metric-grid, .admin-roster { grid-template-columns: 1fr; }
  .dashboard-nav { overflow-x: auto; }
  .dashboard-tab span { white-space: nowrap; }
  .time-form { grid-template-columns: 1fr; }
  .table-toolbar { align-items: flex-start; flex-direction: column; }
  .filter-bar { align-items: stretch; flex-direction: column; }
  .search-field, .filter-field, .filter-field select, .filter-field input { width: 100%; flex-basis: auto; }
  th, td { padding: 11px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

.class-stats-card {
  margin-bottom: 15px;
  padding: 22px 23px;
  border: 1px solid rgba(241,244,233,.09);
  background: linear-gradient(120deg, rgba(53,231,210,.035), rgba(17,23,29,.94));
}
.class-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.class-stat {
  position: relative;
  display: grid;
  gap: 3px;
  min-height: 116px;
  padding: 15px;
  overflow: hidden;
  border: 1px solid rgba(241,244,233,.09);
  background: rgba(7,10,13,.56);
}
.class-stat::after {
  position: absolute;
  right: -12px;
  bottom: -34px;
  content: attr(data-code);
  color: rgba(241,244,233,.025);
  font-family: var(--font-display);
  font-size: 70px;
  line-height: 1;
}
.class-stat span,
.class-stat small { color: var(--muted); font-size: 10px; }
.class-stat strong { color: var(--cyan); font-family: var(--font-mono); font-size: 28px; line-height: 1.1; }
.class-stat div { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; font-size: 10px; color: var(--muted-strong); }
.class-stat b { color: var(--paper); font-family: var(--font-mono); }
.admin-presets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 14px;
}
.admin-presets button {
  min-height: 34px;
  padding: 0 9px;
  color: var(--muted-strong);
  border: 1px solid rgba(241,244,233,.12);
  background: rgba(241,244,233,.03);
  cursor: pointer;
  font-size: 10px;
  transition: color 170ms ease, border-color 170ms ease, background 170ms ease;
}
.admin-presets button:hover { color: var(--acid); border-color: rgba(220,255,87,.32); background: rgba(220,255,87,.05); }
.scope-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 1px 0 14px;
  padding: 10px 12px;
  color: var(--muted);
  border-left: 3px solid var(--cyan);
  background: rgba(53,231,210,.04);
  font-size: 10px;
}
.scope-preview strong { color: var(--cyan); text-align: right; }
@media (max-width: 1180px) {
  .class-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .class-stats-grid { grid-template-columns: 1fr; }
  .admin-presets { grid-template-columns: 1fr; }
}
.admin-scope { color: var(--acid) !important; }

.strict-notice {
  display: grid;
  gap: 3px;
  margin: 4px 0 15px;
  padding: 12px 14px;
  border-left: 3px solid var(--acid);
  background: rgba(220,255,87,.055);
}
.strict-notice strong { color: var(--acid); font-size: 11px; }
.strict-notice span { color: var(--muted); font-size: 10px; }
.strict-card { margin-bottom: 15px; }
.toggle-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-bottom: 12px; }
.toggle-row { display: flex; align-items: flex-start; gap: 9px; padding: 12px; border: 1px solid rgba(241,244,233,.09); background: rgba(7,10,13,.45); cursor: pointer; }
.toggle-row input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--acid); }
.toggle-row span { display: grid; }
.toggle-row strong { color: var(--paper); font-size: 11px; }
.toggle-row small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.geofence-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.geofence-grid .field { margin-bottom: 8px; }
.compact-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.roster-import { padding: 0 23px 18px; }
.roster-import textarea {
  width: 100%; min-height: 120px; padding: 12px; resize: vertical;
  color: var(--paper); border: 1px solid rgba(241,244,233,.12); outline: none;
  background: rgba(5,8,11,.72); font-family: var(--font-mono); font-size: 11px; line-height: 1.55;
}
.roster-import textarea:focus { border-color: rgba(53,231,210,.68); box-shadow: 0 0 0 3px rgba(53,231,210,.085); }
.file-button { position: relative; overflow: hidden; cursor: pointer; }
.file-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
@media (max-width: 1180px) {
  .toggle-grid { grid-template-columns: 1fr; }
  .geofence-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 880px) {
  .dashboard-nav { display: flex; overflow-x: auto; }
  .dashboard-tab { flex: 0 0 auto; min-width: 92px; }
}
@media (max-width: 640px) {
  .geofence-grid, .compact-actions { grid-template-columns: 1fr; }
  .roster-import { padding: 0 15px 15px; }
}
