/* school.css — AMOS Sovereign School Operating System.
   Ultra-premium deep glassmorphism: obsidian midnight, sapphire mesh, radiant gold, and ruby accents.
   Strict CSP compliant: zero inline styles required. */

:root {
  color-scheme: dark;
  --bg: #050813;
  --bg-2: #080d1e;
  --panel: #0f162e;
  --panel-2: #141d3d;
  --raise: #1a254c;
  --ink: #f8f6f2;
  --muted: #a6b3cf;
  --faint: #7280a3;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --field-edge: rgba(255, 255, 255, 0.16);

  --gold: #f5c451;
  --gold-hi: #fed876;
  --gold-soft: rgba(245, 196, 81, 0.14);
  --gold-glow: 0 0 24px rgba(245, 196, 81, 0.45);

  --red: #ef3e46;
  --red-hi: #ff545c;
  --red-strong: #cf2c34;
  --red-deep: #a81a22;
  --red-soft: rgba(239, 62, 70, 0.16);
  --red-glow: 0 0 24px rgba(239, 62, 70, 0.45);

  --calm: #8fd3e0;
  --calm-soft: rgba(143, 211, 224, 0.14);
  --ok: #3ddc97;
  --ok-soft: rgba(61, 220, 151, 0.14);
  --ok-glow: 0 0 20px rgba(61, 220, 151, 0.4);

  --warn: #f6c38b;
  --warn-soft: rgba(246, 195, 139, 0.14);

  --radius: 20px;
  --radius-sm: 13px;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.65), 0 1px 0 rgba(255, 255, 255, 0.12) inset;
  --shadow-lg: 0 36px 90px rgba(0, 0, 0, 0.75), 0 1px 0 rgba(255, 255, 255, 0.18) inset;
  --font: "Helvetica Neue", Helvetica, Arial, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1300px 850px at 85% -10%, rgba(37, 99, 235, 0.22), transparent 70%),
    radial-gradient(1000px 750px at -10% 45%, rgba(99, 102, 241, 0.14), transparent 65%),
    radial-gradient(1100px 800px at 25% 115%, rgba(245, 196, 81, 0.12), transparent 60%),
    radial-gradient(800px 600px at 50% 50%, rgba(14, 165, 233, 0.05), transparent 75%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[hidden] { display: none !important; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.skip {
  position: fixed; top: -100px; left: 16px; z-index: 50;
  background: var(--ink); color: #040711;
  padding: 12px 18px; border-radius: 8px; font-weight: 800;
  box-shadow: 0 12px 30px rgba(0,0,0,0.5);
}
.skip:focus { top: 16px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Top bar (Luminous Glass Header) ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 24px;
  background: rgba(5, 8, 19, 0.75);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-height: 44px; }
.brand img {
  width: 38px; height: 38px; border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 20px rgba(245, 196, 81, 0.2);
  transition: transform .2s var(--ease);
}
.brand:hover img { transform: scale(1.05); }
.brand b { font-size: 19px; font-weight: 900; letter-spacing: .05em; color: #fff; }
.brand small { display: block; color: var(--gold); font-size: 10px; font-weight: 800; letter-spacing: .22em; margin-top: 2px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- Pills, Badges & Status Indicators ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 34px; padding: 5px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase;
  color: var(--muted); background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 10px var(--warn); }
.pill.test .dot { background: var(--warn); }
.pill.ok { color: var(--ok); border-color: rgba(61, 220, 151, 0.35); background: rgba(61, 220, 151, 0.08); }
.pill.ok .dot { background: var(--ok); box-shadow: var(--ok-glow); }

.count {
  min-width: 26px; height: 26px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; font-size: 12px; font-weight: 900;
  background: rgba(255, 255, 255, 0.08); color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.count.live {
  background: linear-gradient(135deg, var(--gold-hi) 0%, #d49e24 100%);
  color: #050813;
  box-shadow: 0 0 22px rgba(245, 196, 81, 0.65), 0 1px 0 rgba(255, 255, 255, 0.4) inset;
  border-color: transparent;
}

/* ---------- Buttons (Tactile, Weighted, Luxury Glass) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 22px;
  border-radius: var(--radius-sm); border: 1px solid transparent;
  font-weight: 800; font-size: 15px; letter-spacing: -.01em; text-decoration: none;
  transition: transform .16s var(--ease), background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(145deg, #ffffff 0%, #ece7de 100%);
  color: #060a17;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.18), 0 1px 0 #ffffff inset;
}
.btn-primary:hover:not(:disabled) {
  background: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(255, 255, 255, 0.28), 0 1px 0 #ffffff inset;
}

.btn-red {
  background: linear-gradient(135deg, #cf2c34 0%, #991b1b 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 36px rgba(207, 44, 52, 0.42), 0 1px 0 rgba(255, 255, 255, 0.25) inset;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.btn-red:hover:not(:disabled) {
  background: linear-gradient(135deg, #e53935 0%, #b71c1c 100%);
  transform: translateY(-2px);
  box-shadow: 0 18px 48px rgba(207, 44, 52, 0.6), 0 1px 0 rgba(255, 255, 255, 0.35) inset;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--ink);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2), 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}
.btn-ghost:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 1px 0 rgba(255, 255, 255, 0.12) inset;
}

.btn-ok {
  background: linear-gradient(135deg, #3ddc97 0%, #15803d 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 30px rgba(61, 220, 151, 0.35), 0 1px 0 rgba(255, 255, 255, 0.25) inset;
}
.btn-ok:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(61, 220, 151, 0.5), 0 1px 0 rgba(255, 255, 255, 0.3) inset;
}

.btn-danger-ghost {
  background: transparent;
  border: 1px solid rgba(239, 62, 70, 0.4);
  color: #ff8a8f;
}
.btn-danger-ghost:hover:not(:disabled) {
  background: var(--red-soft);
  border-color: var(--red);
  transform: translateY(-1px);
}

.btn-sm { min-height: 42px; padding: 8px 16px; font-size: 13px; border-radius: 11px; }
.btn-block { width: 100%; }
.btn .arrow { margin-left: auto; font-size: 20px; line-height: 1; }

/* ---------- Cards (Rich Frosted Deep Glass) ---------- */
.card {
  position: relative;
  background: linear-gradient(145deg, rgba(20, 29, 60, 0.72) 0%, rgba(10, 16, 35, 0.86) 100%);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  transition: transform .22s var(--ease), box-shadow .22s ease, border-color .22s ease;
}
.card + .card { margin-top: 18px; }
.card, .item { scroll-margin-top: 84px; }
.card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-lg);
}

.card-quiet {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.eyebrow {
  display: flex; align-items: center; gap: 9px;
  font-size: 11px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 14px;
}
.eyebrow .signal {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold); box-shadow: var(--gold-glow);
  flex-shrink: 0;
}
.display { font-size: clamp(34px, 8vw, 52px); line-height: 1; letter-spacing: -.055em; font-weight: 800; margin: 0 0 14px; color: #fff; }
.display em { font-style: normal; color: var(--gold); text-shadow: 0 0 24px rgba(245, 196, 81, 0.25); }
.title { font-size: 22px; line-height: 1.25; letter-spacing: -.03em; font-weight: 800; margin: 0 0 6px; color: #fff; }
.lead { color: var(--muted); font-size: 17px; margin: 0 0 22px; max-width: 48ch; line-height: 1.6; }
.small { font-size: 13px; color: var(--muted); }
.fine { font-size: 12px; color: var(--faint); }

/* ---------- Notices & Alerts (Crimson / Emerald Glass) ---------- */
.notice {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 18px; border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  font-size: 14px; color: var(--muted); line-height: 1.55;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}
.notice b { color: #fff; }
.notice .icon { font-size: 18px; line-height: 1.2; }
.notice.test {
  border-color: rgba(246, 195, 139, 0.35);
  background: rgba(246, 195, 139, 0.08);
  color: #ffeed9;
}
.notice.ok {
  border-color: rgba(61, 220, 151, 0.35);
  background: rgba(61, 220, 151, 0.08);
  color: #d1fae5;
  box-shadow: 0 8px 24px rgba(61, 220, 151, 0.15), 0 1px 0 rgba(255, 255, 255, 0.1) inset;
}
.notice.alert {
  border-color: rgba(239, 62, 70, 0.45);
  background: linear-gradient(135deg, rgba(207, 44, 52, 0.32) 0%, rgba(136, 19, 26, 0.42) 100%);
  color: #ffe4e6;
  box-shadow: 0 16px 48px rgba(207, 44, 52, 0.32), 0 1px 0 rgba(255, 255, 255, 0.15) inset;
}

/* ---------- Form Inputs (Translucent Glass Inset) ---------- */
.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field label, .label { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.input {
  width: 100%; min-height: 52px; padding: 12px 16px;
  background: rgba(6, 11, 25, 0.82);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  font-size: 16px; color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5) inset;
  transition: all .18s ease;
}
.input::placeholder { color: #64748b; }
.input:focus {
  border-color: var(--gold);
  outline: none;
  box-shadow: 0 0 0 3px rgba(245, 196, 81, 0.25), 0 2px 8px rgba(0, 0, 0, 0.5) inset;
}
textarea.input { min-height: 96px; resize: vertical; }
.hint { font-size: 12px; color: var(--faint); margin-top: -2px; }

/* ---------- Chips & Segmented Radio Groups ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; border: 0; }
.chips legend { width: 100%; padding: 0; margin-bottom: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 999px;
  background: rgba(255, 255, 255, 0.04); color: var(--muted);
  font-size: 14px; font-weight: 600; text-align: left;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: all .16s ease;
}
.chip:hover { border-color: rgba(255, 255, 255, 0.25); color: #fff; transform: translateY(-1px); }
.chip[aria-pressed="true"], .chip[aria-checked="true"] {
  border-color: var(--calm);
  background: rgba(143, 211, 224, 0.16);
  color: #fff;
  box-shadow: 0 0 0 1px var(--calm) inset, 0 4px 16px rgba(143, 211, 224, 0.2);
}
.segmented { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-bottom: 18px; }
.segmented .chip { justify-content: center; border-radius: var(--radius-sm); }

/* ---------- Tabs ---------- */
.tabs {
  display: flex; gap: 6px; padding: 6px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 8px 16px; border: 0; border-radius: 11px;
  background: transparent; color: var(--muted); font-size: 14px; font-weight: 800; white-space: nowrap;
  transition: all .16s ease;
}
.tab:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.tab[aria-selected="true"] {
  background: linear-gradient(145deg, rgba(30, 44, 88, 0.8) 0%, rgba(18, 27, 56, 0.9) 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(255, 255, 255, 0.15) inset;
}

/* ---------- Toast Notification ---------- */
.toast {
  position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 60;
  transform: translateX(-50%);
  width: min(580px, calc(100% - 32px));
  display: flex; align-items: center; gap: 12px;
  padding: 16px 22px; border-radius: 16px;
  background: rgba(18, 26, 54, 0.88);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75), 0 1px 0 rgba(255, 255, 255, 0.12) inset;
  font-size: 14px; font-weight: 700; color: #fff;
}
.toast[hidden] { display: none; }

/* ---------- Helplines ---------- */
.lines { display: grid; gap: 10px; }
.line-link {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  min-height: 64px; padding: 12px 18px; border-radius: 14px; text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all .16s ease;
}
.line-link:hover {
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.line-link b { display: block; font-size: 16px; color: #fff; }
.line-link span { font-size: 13px; color: var(--muted); }
.line-link .num { font-weight: 900; font-size: 15px; letter-spacing: .02em; }
.line-link.urgent {
  border-color: rgba(239, 62, 70, 0.45);
  background: linear-gradient(90deg, rgba(239, 62, 70, 0.18), rgba(239, 62, 70, 0.05));
}
.line-link.urgent .num { color: #ff8a8f; }

/* ---------- Steps & Timelines ---------- */
.steps { list-style: none; margin: 18px 0; padding: 0; display: grid; gap: 0; }
.steps li { position: relative; padding: 0 0 18px 40px; color: var(--faint); font-weight: 700; }
.steps li::before {
  content: ""; position: absolute; left: 6px; top: 5px; width: 14px; height: 14px;
  border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.15); background: var(--bg);
  z-index: 1; box-sizing: border-box;
}
.steps li::after { content: ""; position: absolute; left: 12px; top: 22px; bottom: 0; width: 2px; background: rgba(255, 255, 255, 0.08); }
.steps small { font-weight: 400; margin-top: 2px; display: block; color: var(--muted); font-size: 13px; }
.steps li:last-child::after { display: none; }
.steps li.done { color: #fff; }
.steps li.done::before { border-color: var(--ok); background: var(--ok); box-shadow: var(--ok-glow); }
.steps li.now { color: #fff; }
.steps li.now::before { border-color: var(--warn); background: var(--warn); animation: pulse 1.8s ease-in-out infinite; }

.bubble {
  margin-top: 10px; padding: 12px 16px; border-radius: 14px 14px 14px 4px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1); font-size: 15px; color: #fff;
}
.bubble b { display: block; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--calm); margin-bottom: 4px; }

@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(246, 195, 139, 0.5); } 50% { box-shadow: 0 0 0 8px rgba(246, 195, 139, 0); } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.rise { animation: rise .35s var(--ease) both; }

/* ---------- Check-in page layout ---------- */
.checkin-main { width: min(640px, 100%); margin: 0 auto; padding: 24px 16px 120px; }
.checkin-main > .tabs { margin: 8px 0 20px; }
.mark { display: flex; justify-content: center; margin: 4px 0 20px; }
.mark-orb {
  width: 90px; height: 90px; border-radius: 30px; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, rgba(255, 224, 138, 0.35), rgba(245, 196, 81, 0.15) 50%, transparent 75%), #101732;
  border: 1px solid rgba(245, 196, 81, 0.45);
  box-shadow: 0 0 60px rgba(245, 196, 81, 0.3), 0 12px 30px rgba(0, 0, 0, 0.5);
  transition: transform .25s var(--ease);
}
.mark-orb:hover { transform: scale(1.06); }
.mark-orb img { width: 58px; height: 58px; border-radius: 18px; }

.actions { display: grid; gap: 12px; margin: 8px 0 24px; }
.emergency-banner { margin-bottom: 18px; align-items: center; flex-wrap: wrap; }
.emergency-banner .notice-content { flex: 1 1 240px; }
.emergency-banner #btnApproveTransitGroup { margin-left: auto; }

/* ---------- Office Console (Glass Command Matrix) ---------- */
.office { display: grid; grid-template-columns: 270px 1fr; min-height: calc(100vh - 69px); }

.office-nav {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding: 24px 16px; display: flex; flex-direction: column; gap: 8px;
  position: sticky; top: 69px; height: calc(100vh - 69px);
  background: rgba(5, 9, 21, 0.65);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
}

.nav-btn {
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 50px; padding: 12px 16px; border: 1px solid transparent; border-radius: var(--radius-sm);
  background: transparent; color: var(--muted); font-weight: 800; font-size: 14px; text-align: left;
  transition: all .16s ease;
}
.nav-btn .count { margin-left: auto; }
.nav-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.08); }
.nav-btn[aria-selected="true"] {
  color: #fff;
  background: linear-gradient(135deg, rgba(245, 196, 81, 0.16) 0%, rgba(255, 255, 255, 0.05) 100%);
  border-left: 3px solid var(--gold);
  border-color: rgba(245, 196, 81, 0.35) rgba(255, 255, 255, 0.08) rgba(255, 255, 255, 0.08) var(--gold);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), 0 1px 0 rgba(255, 255, 255, 0.1) inset;
}

.nav-foot { margin-top: auto; display: grid; gap: 10px; }
.office-main { padding: 32px clamp(18px, 3.5vw, 44px) 100px; min-width: 0; }
.office-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.office-head h1 { font-size: clamp(32px, 4.5vw, 48px); letter-spacing: -.05em; line-height: 1; margin: 0; color: #fff; }
.staff-field { display: grid; gap: 6px; min-width: min(340px, 100%); }
.staff-field .input { min-height: 48px; }

.panel-grid { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 24px; align-items: start; }
.queue { display: grid; gap: 16px; }

/* ---------- Glass Queue Item Card ---------- */
.item {
  padding: 24px; border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(22, 32, 64, 0.75) 0%, rgba(11, 17, 36, 0.88) 100%);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(255, 255, 255, 0.1) inset;
  transition: all .2s var(--ease);
}
.item:hover {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 26px 64px rgba(0, 0, 0, 0.65), 0 1px 0 rgba(255, 255, 255, 0.15) inset;
}
.item.rise { animation: rise .35s var(--ease) both; }

.item-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.item-head h3 { margin: 0; font-size: 21px; letter-spacing: -.03em; color: #fff; }

.meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; color: var(--muted); margin: 0 0 16px; padding: 0; list-style: none; }
.meta li { display: inline-flex; gap: 6px; }
.meta b { color: #fff; font-weight: 700; }

.tag {
  display: inline-flex; align-items: center; min-height: 28px; padding: 3px 12px;
  border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.12); color: var(--muted); background: rgba(255, 255, 255, 0.04);
  white-space: nowrap; backdrop-filter: blur(12px);
}
.tag.warn { color: var(--warn); border-color: rgba(246, 195, 139, 0.4); background: rgba(246, 195, 139, 0.08); }
.tag.ok { color: var(--ok); border-color: rgba(61, 220, 151, 0.4); background: rgba(61, 220, 151, 0.08); }
.tag.red, .tag.critical {
  color: #fff; background: var(--red-strong); border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 16px rgba(207, 44, 52, 0.45);
}

.item-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.reply { display: grid; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.prompt-row { display: flex; flex-wrap: wrap; gap: 8px; }
.prompt-row .chip { min-height: 38px; padding: 6px 14px; font-size: 13px; }

.empty {
  display: grid; place-items: center; text-align: center; gap: 8px;
  min-height: 240px; padding: 36px; border-radius: var(--radius);
  border: 1px dashed rgba(255, 255, 255, 0.14); color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}
.empty b { color: #fff; font-size: 19px; letter-spacing: -.02em; }

.side { display: grid; gap: 18px; position: sticky; top: 92px; }
.side .card { padding: 24px; }
.quote { font-size: 17px; line-height: 1.5; letter-spacing: -.01em; margin: 0 0 10px; color: #fff; }
.export-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.drill-grid { display: grid; gap: 12px; margin: 18px 0; }
.drill {
  display: grid; grid-template-columns: 46px 1fr; gap: 16px; align-items: center; text-align: left;
  min-height: 72px; padding: 14px 18px; border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: all .18s ease;
}
.drill:hover {
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}
.drill b { display: block; font-size: 16px; color: #fff; }
.drill span { font-size: 13px; color: var(--muted); }
.drill .face {
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px;
  background: rgba(255, 255, 255, 0.08); font-size: 22px;
}

/* ---------- Screen Lock Gate ---------- */
.gate {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center; padding: 16px;
  background: radial-gradient(1000px 600px at 50% 10%, rgba(37, 99, 235, 0.35), transparent 70%), rgba(4, 7, 17, 0.92);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
}
.gate .card { width: min(460px, 100%); text-align: center; }
.gate .input { text-align: center; letter-spacing: .45em; font-size: 24px; font-weight: 800; }
.gate .mark { margin-bottom: 16px; }
.gate .eyebrow { justify-content: center; }
.gate .btn { margin: 6px 0 16px; }

/* ---------- Teacher Classroom Lifeline & Staff Assist ---------- */
.incident-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 18px 0; }
.incident-card {
  display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1); text-align: left; cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25), 0 1px 0 rgba(255, 255, 255, 0.05) inset;
  transition: all .2s var(--ease);
}
.incident-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
.incident-card[aria-checked="true"] {
  border-color: var(--red);
  background: linear-gradient(145deg, rgba(239, 62, 70, 0.25) 0%, rgba(181, 35, 43, 0.35) 100%);
  box-shadow: 0 0 0 1px var(--red) inset, 0 14px 40px rgba(239, 62, 70, 0.35);
}
.incident-card b { display: flex; align-items: center; gap: 8px; font-size: 15px; color: #fff; }
.incident-card span { font-size: 13px; color: var(--muted); line-height: 1.45; }
.incident-card .badge-urgency {
  margin-left: auto; font-size: 10px; font-weight: 800; letter-spacing: .1em;
  padding: 3px 9px; border-radius: 999px; text-transform: uppercase;
}
.urgency-crit { background: var(--red-deep); color: #fff; }
.urgency-high { background: #b56214; color: #fff; }
.urgency-med { background: #1c3d5a; color: var(--calm); }

.silent-box {
  padding: 26px; border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(155deg, rgba(20, 29, 62, 0.8) 0%, rgba(8, 13, 29, 0.92) 100%);
  backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  box-shadow: var(--shadow-lg); margin: 20px 0;
}
.silent-box .status-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.silent-protocol { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 12px; font-size: 14px; }
.silent-protocol li { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); }
.silent-protocol li b { color: #fff; }
.action-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-top: 16px; }

.headcount-wrap { display: flex; align-items: center; gap: 12px; margin: 14px 0; flex-wrap: wrap; }
.headcount-input { width: 90px; text-align: center; font-size: 20px; font-weight: 800; min-height: 44px; }
.section-subhead { margin-top: 20px; font-size: 17px; }
.spaced-top { margin-top: 18px; }
.actions-spaced { margin-top: 22px; }

/* ---------- Public Portal Doors (Launchpad) ---------- */
.site-main { width: min(1040px, 100%); margin: 0 auto; padding: 36px 20px 120px; }
.site-hero { margin-bottom: 36px; text-align: left; }
.door-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin: 28px 0 44px; }
.door {
  display: flex; flex-direction: column; gap: 8px; padding: 24px; border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(22, 33, 68, 0.72) 0%, rgba(10, 16, 36, 0.88) 100%);
  backdrop-filter: blur(28px) saturate(180%); -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08); text-decoration: none;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(255, 255, 255, 0.1) inset;
  transition: all .24s var(--ease); min-height: 220px;
}
.door:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 196, 81, 0.45);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.7), 0 0 32px rgba(245, 196, 81, 0.2), 0 1px 0 rgba(255, 255, 255, 0.2) inset;
}
.door .face { font-size: 32px; line-height: 1; margin-bottom: 4px; }
.door b { font-size: 18px; color: #fff; letter-spacing: -.02em; }
.door span { color: var(--muted); font-size: 14px; line-height: 1.5; }
.door .go { margin-top: auto; color: var(--gold); font-weight: 800; font-size: 14px; display: inline-flex; align-items: center; gap: 4px; }

.how { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.how .card + .card { margin-top: 0; }
.site-foot {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 60px; padding-top: 24px; display: flex; flex-wrap: wrap; gap: 8px 24px;
  justify-content: space-between; font-size: 12px; color: var(--faint);
}
.site-foot a { color: var(--muted); }

/* ---------- Emergency Status Badges ---------- */
.pill.code-black { background: #000000dd; color: #ff545c; border-color: #ef3e46; box-shadow: 0 0 16px rgba(239, 62, 70, 0.4); }
.pill.code-red { background: rgba(239, 62, 70, 0.16); color: #ff8a8f; border-color: #ef3e46; }
.pill.code-amber { background: rgba(245, 196, 81, 0.16); color: #f5c451; border-color: #f5c451; }
.pill.code-clear { background: rgba(61, 220, 151, 0.16); color: #3ddc97; border-color: #3ddc97; }

/* ---------- Responsive Layout ---------- */
@media (max-width: 1100px) {
  .panel-grid { grid-template-columns: 1fr; }
  .side { position: static; }
}

@media (max-width: 860px) {
  .office { grid-template-columns: 1fr; }
  .office-nav {
    position: sticky; top: 61px; z-index: 15; height: auto;
    flex-direction: row; overflow-x: auto; gap: 6px; padding: 10px 14px;
    border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(5, 8, 19, 0.88); backdrop-filter: blur(20px);
    scrollbar-width: none;
  }
  .office-nav::-webkit-scrollbar { display: none; }
  .nav-btn { width: auto; flex: 0 0 auto; min-height: 44px; padding: 8px 14px; }
  .nav-foot { display: none; }
  .office-main { padding-top: 22px; }
  .how { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .topbar { padding: 12px 16px; }
  .brand b { font-size: 17px; }
  .brand small { font-size: 9px; letter-spacing: .18em; }
  .card { padding: 20px 16px; }
  .item { padding: 18px 14px; }
  .silent-box { padding: 18px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Roll call (teacher /roll, office /rolls) ---------- */
.input.list-box { min-height: 220px; resize: vertical; line-height: 1.55; font-family: inherit; }
.roll-wide { width: min(1100px, 100%); margin: 0 auto; padding: 24px 16px 64px; display: grid; gap: 18px; }
.roll-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.roll-head h1, .roll-head h2 { margin: 0; font-size: clamp(28px, 6vw, 40px); letter-spacing: -.05em; line-height: 1; color: #fff; }
.roll-counts { display: flex; flex-wrap: wrap; gap: 6px; }
.roll-list { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.roll-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 6px 6px 14px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.03); }
.roll-row[data-status="away"] { border-color: var(--calm); background: var(--calm-soft); }
.roll-row[data-status="late"] { border-color: var(--warn); background: var(--warn-soft); }
.roll-row .who { font-weight: 700; color: #fff; min-width: 0; overflow-wrap: anywhere; }
.roll-marks { display: flex; gap: 4px; flex-shrink: 0; }
.roll-marks .chip { min-height: 44px; padding: 6px 12px; font-size: 13px; border-radius: 10px; }
.roll-marks .chip[data-mark="here"][aria-pressed="true"] { border-color: var(--line-2); background: var(--raise); box-shadow: none; color: #fff; }
.roll-marks .chip[data-mark="late"][aria-pressed="true"] { border-color: var(--warn); background: var(--warn-soft); box-shadow: 0 0 0 1px var(--warn) inset; }
.class-picks { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.away-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tag.calm { color: var(--calm); border-color: rgba(143, 211, 224, 0.4); background: rgba(143, 211, 224, 0.08); }
.away-list .item { padding: 14px 18px; min-height: 0; }
.away-list .item-head { margin: 0; align-items: center; }
.away-list .item-head h3 { font-size: 18px; }
.away-list .small { margin: 2px 0 0; }
.away-list + .empty, .away-list + .actions, .empty + .actions { margin-top: 16px; }

/* Add a device (/join): the QR stays black on white for every phone camera. */
.join-qr { width: min(320px, 100%); margin: 8px auto 4px; }
.join-qr svg { display: block; width: 100%; height: auto; border-radius: 12px; }
.join-code { margin: 8px 0 4px; text-align: center; font-size: clamp(32px, 9vw, 48px); font-weight: 800; letter-spacing: 0.18em; color: var(--gold); font-variant-numeric: tabular-nums; }
