/* ============================================================
   TKOB STUDIO ADMIN — "stage manager" shell
   Layers on top of site.css (same cinema design language):
   stage black panels, tungsten marigold accents, mono data type.
   ============================================================ */

.admin-body { overflow: hidden; font-size: 15.5px; }

/* the [hidden] attribute must always win, even over display:flex rules below */
[hidden] { display: none !important; }

/* ------------------------------------------------ stage door (gate) */
.gate {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background:
    radial-gradient(ellipse 70% 50% at 50% -10%, rgba(242,169,59,.18), transparent 60%),
    radial-gradient(ellipse 55% 60% at 50% 115%, rgba(200,67,47,.16), transparent 65%),
    var(--ink);
  overflow-y: auto;
}
.gate-card {
  width: min(430px, 100%); text-align: center;
  background: var(--ink-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 44px 36px 32px; box-shadow: var(--shadow);
}
.gate-title {
  font-family: var(--font-display); text-transform: uppercase;
  font-size: clamp(38px, 7vw, 52px); line-height: 1; letter-spacing: .02em;
  margin: 12px 0 8px;
}
.gate-title .accent { color: var(--marigold); }
.gate-sub { color: var(--cream-2); font-size: 15px; margin-bottom: 26px; }
#gateForm { display: flex; flex-direction: column; gap: 14px; }
#gateInput {
  width: 100%; text-align: center;
  background: var(--ink); border: 1px solid var(--ink-3); border-radius: 8px;
  color: var(--cream); font-family: var(--font-mono);
  font-size: 18px; letter-spacing: .3em; padding: 13px 14px;
}
#gateInput:focus { outline: none; border-color: var(--marigold); }
.gate-btn { width: 100%; }
.gate-error { color: #e06a52; font-family: var(--font-mono); font-size: 13px; margin-top: 14px; }
.gate-note {
  font-family: var(--font-mono); font-size: 11.5px; line-height: 1.7;
  color: var(--cream-2); opacity: .85; margin-top: 22px;
  border-top: 1px dashed var(--line); padding-top: 16px;
}
@keyframes gate-shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-7px); }
  40%, 60% { transform: translateX(7px); }
}
.gate-card.shake { animation: gate-shake .5s ease; }

/* ------------------------------------------------ app shell */
.app { display: flex; height: 100vh; height: 100dvh; }

.topbar { display: none; }

.sidebar {
  flex: 0 0 230px; width: 230px;
  display: flex; flex-direction: column;
  background: #140d10; border-right: 1px solid var(--line);
  padding: 22px 14px 18px;
}
.side-brand { padding: 2px 12px 20px; border-bottom: 1px dashed var(--line); margin-bottom: 16px; }
.side-logo {
  display: block; font-family: var(--font-display); font-size: 30px;
  letter-spacing: .06em; color: var(--cream); line-height: 1;
}
.side-tag {
  display: block; margin-top: 6px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--marigold);
}
.side-nav { display: flex; flex-direction: column; gap: 3px; }
.side-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 8px; border-left: 2px solid transparent;
  color: var(--cream-2); font-size: 15px; font-weight: 500; letter-spacing: .02em;
  transition: color .12s ease, background .12s ease;
}
.side-nav a:hover { color: var(--cream); background: rgba(246,236,220,.05); text-decoration: none; }
.side-nav a.active {
  color: var(--marigold); background: rgba(242,169,59,.09);
  border-left-color: var(--sindoor); font-weight: 600;
}
.side-nav svg { width: 18px; height: 18px; flex: none; }

.side-foot {
  margin-top: auto; padding: 16px 12px 0; border-top: 1px dashed var(--line);
  display: flex; flex-direction: column; gap: 10px;
}
.side-site { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.side-logout {
  display: flex; align-items: center; gap: 10px;
  background: none; border: 1px solid var(--ink-3); border-radius: 8px;
  color: var(--cream-2); font-family: var(--font-body); font-size: 14px; font-weight: 600;
  padding: 9px 12px; cursor: pointer; transition: border-color .12s ease, color .12s ease;
}
.side-logout:hover { border-color: var(--sindoor); color: var(--sindoor); }
.side-logout svg { width: 16px; height: 16px; }
.side-note { font-family: var(--font-mono); font-size: 10.5px; color: var(--cream-2); opacity: .6; line-height: 1.6; }

.main { flex: 1; min-width: 0; overflow-y: auto; padding: 34px clamp(20px, 4vw, 48px) 80px; }
#view { max-width: 1060px; }

/* ------------------------------------------------ sample banner */
.banner {
  max-width: 1060px; display: flex; align-items: center; gap: 14px;
  border: 1px dashed var(--gold); border-radius: 8px;
  padding: 11px 16px; margin-bottom: 26px;
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.6; color: var(--cream-2);
}
.banner a { color: var(--marigold); }
.banner-x {
  margin-left: auto; background: none; border: none; color: var(--cream-2);
  font-size: 14px; cursor: pointer; padding: 4px 6px; line-height: 1;
}
.banner-x:hover { color: var(--marigold); }

/* ------------------------------------------------ view scaffolding */
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 28px; }
.view-head h2 {
  font-family: var(--font-display); text-transform: uppercase;
  font-size: clamp(26px, 4vw, 38px); line-height: 1.05; letter-spacing: .02em;
  margin-top: 8px;
}
.view-head h2 .accent { color: var(--marigold); }
.view-head .lede { color: var(--cream-2); font-size: 15px; margin-top: 6px; max-width: 560px; }
.view-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.btn.sm, .btn-ghost.sm {
  font-size: 13.5px; padding: 9px 20px;
}
.btn.danger { background: var(--sindoor); color: var(--cream); }
.btn.danger:hover { box-shadow: 0 8px 24px rgba(200,67,47,.35); }

/* mono utility */
.mono { font-family: var(--font-mono); }

/* archived-toggle */
.arch-toggle {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--cream-2); user-select: none;
}
.arch-toggle input { accent-color: var(--marigold); width: 14px; height: 14px; cursor: pointer; }

/* ------------------------------------------------ stat tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 34px; }
.tile {
  background: var(--ink-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 18px 20px 16px;
}
.tile .n {
  font-family: var(--font-display); font-size: 34px; line-height: 1.1;
  color: var(--marigold); letter-spacing: .03em;
}
.tile .l {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--cream-2); margin-top: 5px;
}

/* ------------------------------------------------ panels & rows */
.panel {
  background: var(--ink-2); border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; margin-bottom: 20px;
}
.panel-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
  padding: 13px 18px; border-bottom: 1px dashed var(--line);
}
.panel-head .day {
  font-family: var(--font-display); text-transform: uppercase; font-size: 19px;
  letter-spacing: .05em; color: var(--cream);
}
.panel-head .sub {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--marigold);
}
.panel-head h3 {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--marigold); font-weight: 600;
}

.row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 12px 18px; border-bottom: 1px solid rgba(217,164,65,.10);
  font-size: 14.5px;
}
.row:last-child { border-bottom: none; }
.row .t { font-family: var(--font-mono); font-size: 13px; color: var(--cream); white-space: nowrap; min-width: 158px; }
.row .loc { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--marigold); min-width: 130px; }
.row .d { color: var(--cream-2); flex: 1; min-width: 130px; }
.row .count { font-family: var(--font-mono); font-size: 12px; color: var(--cream-2); white-space: nowrap; }
.row .acts { display: flex; gap: 8px; margin-left: auto; }
.row.archived { opacity: .55; }

.row-btn {
  background: none; border: 1px solid var(--ink-3); border-radius: 999px;
  color: var(--cream-2); font-family: var(--font-mono); font-size: 11.5px;
  letter-spacing: .06em; padding: 5px 13px; cursor: pointer;
  transition: border-color .12s ease, color .12s ease;
}
.row-btn:hover { border-color: var(--marigold); color: var(--marigold); }
.row-btn.warn:hover { border-color: var(--sindoor); color: var(--sindoor); }

/* SAMPLE badge */
.badge-sample {
  display: inline-block; vertical-align: 2px; margin-left: 8px;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--gold);
  border: 1px dashed var(--gold); border-radius: 4px; padding: 1px 6px;
}

/* ------------------------------------------------ dashboard cards */
.today-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 34px; }
.today-card {
  background: var(--ink-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 18px 20px; display: flex; flex-direction: column; gap: 8px;
}
.today-card .tt { font-family: var(--font-mono); font-size: 15px; color: var(--cream); }
.today-card .tl { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--marigold); }
.today-card .td { color: var(--cream-2); font-size: 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.today-card .btn { margin-top: 10px; align-self: flex-start; }

.sect-label {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--marigold); margin: 0 0 14px;
}

/* ------------------------------------------------ attendance */
.att-controls {
  display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end;
  margin-bottom: 22px;
}
.att-controls .form-row { margin-bottom: 0; flex: 1; min-width: 230px; }
.att-controls .form-row.date { flex: 0 0 190px; min-width: 170px; }
.att-controls input, .att-controls select { color-scheme: dark; }

.att-row {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 13px 18px; border-bottom: 1px solid rgba(217,164,65,.10);
}
.att-row:last-child { border-bottom: none; }
.att-name { flex: 1; min-width: 170px; font-weight: 600; color: var(--cream); font-size: 15px; }
.att-chips { display: flex; gap: 8px; }

.mark {
  background: none; border: 1px solid var(--ink-3); border-radius: 999px;
  color: var(--cream-2); font-family: var(--font-mono); font-size: 11px;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 6px 15px; cursor: pointer;
  transition: border-color .12s ease, color .12s ease, background .12s ease;
}
.mark:hover { border-color: var(--cream-2); color: var(--cream); }
.mark.p.on { border-color: var(--ok); color: var(--ok); background: rgba(127,176,105,.13); }
.mark.l.on { border-color: var(--gold); color: var(--gold); background: rgba(217,164,65,.13); }
.mark.a.on { border-color: var(--sindoor); color: #e8836e; background: rgba(200,67,47,.13); }

.att-bar {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: rgba(20, 13, 16, .96);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 13px 18px; margin-top: 18px;
}
.att-counts { font-family: var(--font-mono); font-size: 13px; color: var(--cream-2); }
.att-counts b { color: var(--cream); font-weight: 600; }

.hist-counts { font-family: var(--font-mono); font-size: 12px; color: var(--cream-2); }
.hist-counts .cp { color: var(--ok); }
.hist-counts .cl { color: var(--gold); }
.hist-counts .ca { color: #e06a52; }

/* ------------------------------------------------ students */
.stu-tools { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.stu-search {
  flex: 1; min-width: 220px; max-width: 380px;
  background: var(--ink-2); border: 1px solid var(--ink-3); border-radius: 999px;
  color: var(--cream); font-family: var(--font-body); font-size: 14.5px;
  padding: 10px 18px;
}
.stu-search:focus { outline: none; border-color: var(--marigold); }

.stu-row {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 14px 18px; border-bottom: 1px solid rgba(217,164,65,.10);
}
.stu-row:last-child { border-bottom: none; }
.stu-row.archived { opacity: .55; }
.stu-id { flex: 1 1 200px; min-width: 180px; }
.stu-name { font-weight: 600; color: var(--cream); font-size: 15px; }
.stu-meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--cream-2); margin-top: 3px; }
.stu-batches { flex: 2 1 240px; display: flex; gap: 6px; flex-wrap: wrap; }
.stu-batch-chip {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .05em;
  color: var(--cream-2); border: 1px solid var(--ink-3); border-radius: 999px;
  padding: 2px 10px; white-space: nowrap;
}
.stu-batch-chip.gone { border-style: dashed; opacity: .6; }
.stu-pct { font-family: var(--font-mono); font-size: 13px; color: var(--marigold); min-width: 56px; text-align: right; }
.stu-pct .pl { display: block; font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--cream-2); }

/* inline student form */
.stu-form { padding: 20px 18px; border-bottom: 1px dashed var(--line); background: rgba(242,169,59,.03); }
.stu-form .grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 18px; }
.batch-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 18px; margin-top: 8px; }
.batch-checks .bc-day {
  grid-column: 1 / -1; font-family: var(--font-mono); font-size: 11px;
  letter-spacing: .16em; text-transform: uppercase; color: var(--marigold);
  margin-top: 10px;
}
.batch-checks label {
  display: flex; align-items: center; gap: 9px; cursor: pointer;
  font-size: 13.5px; color: var(--cream-2); font-family: var(--font-body);
}
.batch-checks input { accent-color: var(--marigold); width: 15px; height: 15px; flex: none; cursor: pointer; }
.batch-checks .bt { font-family: var(--font-mono); font-size: 12px; color: var(--cream); }
.form-acts { display: flex; gap: 12px; margin-top: 20px; }

/* ------------------------------------------------ schedule board */
.sched-scroll { overflow-x: auto; padding-bottom: 8px; }
.sched-grid { display: grid; grid-template-columns: repeat(7, minmax(168px, 1fr)); gap: 12px; min-width: 1190px; }
.sched-col { background: var(--ink-2); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.sched-col header {
  font-family: var(--font-display); text-transform: uppercase; font-size: 16px;
  letter-spacing: .06em; color: var(--cream); text-align: center;
  padding: 10px 8px; border-bottom: 1px dashed var(--line);
}
.sched-slot { padding: 11px 13px; border-bottom: 1px solid rgba(217,164,65,.10); }
.sched-slot:last-child { border-bottom: none; }
.sched-slot .st { font-family: var(--font-mono); font-size: 11.5px; color: var(--cream); }
.sched-slot .sl { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--marigold); margin-top: 2px; }
.sched-slot .sd { font-size: 12.5px; color: var(--cream-2); margin: 3px 0 6px; }
.sched-empty { padding: 18px 13px; font-size: 12.5px; color: var(--cream-2); opacity: .6; font-style: italic; }

/* ------------------------------------------------ settings */
.set-card {
  background: var(--ink-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 22px 24px; margin-bottom: 18px;
}
.set-card h3 {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--marigold); margin-bottom: 8px;
}
.set-card p { color: var(--cream-2); font-size: 14px; margin-bottom: 14px; max-width: 560px; }
.set-card.danger-zone { border-color: rgba(200,67,47,.4); }
.set-err { font-family: var(--font-mono); font-size: 12.5px; color: #e06a52; margin-top: 12px; }
.set-stats { font-family: var(--font-mono); font-size: 12.5px; color: var(--cream-2); line-height: 2; }
.set-stats b { color: var(--marigold); font-weight: 600; }

/* ------------------------------------------------ empty states */
.empty {
  border: 1px dashed var(--line); border-radius: 10px;
  padding: 36px 24px; text-align: center; color: var(--cream-2);
  font-size: 15px; margin-bottom: 20px;
}
.empty .e-act { display: block; margin-top: 10px; font-family: var(--font-mono); font-size: 13px; }

/* ------------------------------------------------ modal */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(12, 8, 9, .88);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  overflow-y: auto;
}
.modal {
  width: min(480px, 100%); background: var(--ink-2);
  border: 1px solid var(--gold); border-radius: 12px;
  padding: 28px 28px 24px; box-shadow: var(--shadow);
  max-height: 88vh; overflow-y: auto;
}
.modal-title {
  font-family: var(--font-display); text-transform: uppercase;
  font-size: 24px; letter-spacing: .03em; margin-bottom: 6px;
}
.modal-body { color: var(--cream-2); font-size: 14.5px; margin-bottom: 20px; line-height: 1.6; }
.modal-body .mwarn { display: block; margin-top: 10px; font-family: var(--font-mono); font-size: 12px; color: var(--gold); }
.modal-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 22px; }
.modal .form-row input, .modal .form-row select { color-scheme: dark; }

/* ------------------------------------------------ toasts */
.toasts {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  z-index: 300; display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none;
}
.toast {
  background: #140d10; border: 1px solid var(--line); border-left: 3px solid var(--marigold);
  border-radius: 8px; padding: 10px 20px;
  font-family: var(--font-mono); font-size: 12.5px; color: var(--cream);
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
  animation: toast-in .25s ease;
  max-width: min(480px, 88vw);
}
.toast.err { border-left-color: var(--sindoor); }
.toast.out { opacity: 0; transform: translateY(8px); transition: opacity .3s ease, transform .3s ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* ------------------------------------------------ front desk (leads) */
.lead-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.lead-tab {
  background: none; border: 1px solid var(--ink-3); border-radius: 999px;
  color: var(--cream-2); font-family: var(--font-mono); font-size: 11px;
  letter-spacing: .1em; text-transform: uppercase; padding: 7px 15px; cursor: pointer;
  transition: border-color .12s ease, color .12s ease;
}
.lead-tab:hover { border-color: var(--cream-2); color: var(--cream); }
.lead-tab.on { border-color: var(--marigold); color: var(--marigold); }
.lead-tab b { font-weight: 700; }

/* min(100%,300px) so cards never force horizontal scroll on <300px phones */
.lead-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.lead-card {
  background: var(--ink-2); border: 1px solid var(--line); border-left: 3px solid var(--ink-3);
  border-radius: 10px; padding: 16px 18px; display: flex; flex-direction: column; gap: 9px;
}
.lead-card.s-new { border-left-color: var(--marigold); }
.lead-card.s-contacted { border-left-color: var(--gold); }
.lead-card.s-enrolled { border-left-color: var(--ok); }
.lead-card.s-archived { opacity: .6; }
.lead-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.lead-name { font-weight: 600; color: var(--cream); font-size: 15.5px; }
.lead-when { font-family: var(--font-mono); font-size: 11px; color: var(--cream-2); white-space: nowrap; }
.lead-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.lead-meta span {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; color: var(--cream-2);
  border: 1px solid var(--ink-3); border-radius: 4px; padding: 1px 7px;
}
.lead-phone {
  font-family: var(--font-mono); font-size: 14px; color: var(--marigold);
  text-decoration: none; align-self: flex-start;
}
.lead-phone:hover { text-decoration: underline; }
.lead-msg { margin: 0; color: var(--cream-2); font-size: 14px; line-height: 1.5; }
.lead-notes {
  width: 100%; box-sizing: border-box; resize: vertical;
  background: var(--ink); border: 1px solid var(--ink-3); border-radius: 8px;
  color: var(--cream); font-family: var(--font-body); font-size: 13.5px; padding: 8px 12px;
}
.lead-notes:focus { outline: none; border-color: var(--marigold); }
.lead-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.lead-act {
  background: none; border: 1px solid var(--ink-3); border-radius: 999px;
  color: var(--cream-2); font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: .08em; text-transform: uppercase; padding: 5px 12px; cursor: pointer;
  transition: border-color .12s ease, color .12s ease, background .12s ease;
}
.lead-act:hover { border-color: var(--cream-2); color: var(--cream); }
.lead-act.on { border-color: var(--marigold); color: var(--marigold); background: rgba(242,169,59,.12); }

/* ------------------------------------------------ responsive */
@media (max-width: 860px) {
  .admin-body { overflow: auto; }
  .app { display: block; height: auto; min-height: 100vh; }

  .topbar {
    display: flex; align-items: center; gap: 14px;
    position: sticky; top: 0; z-index: 90;
    background: rgba(20, 13, 16, .96);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line); padding: 12px 18px;
  }
  .topbar-burger {
    background: none; border: 1px solid var(--line); border-radius: 8px;
    padding: 7px 11px; cursor: pointer; color: var(--cream); font-size: 17px; line-height: 1;
  }
  .topbar-title { font-family: var(--font-mono); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--cream-2); }
  .topbar-title b { color: var(--marigold); font-weight: 600; }

  .sidebar {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 120;
    width: 240px; transform: translateX(-102%);
    transition: transform .22s ease;
    box-shadow: var(--shadow); overflow-y: auto;
  }
  .sidebar.open { transform: translateX(0); }
  .scrim { position: fixed; inset: 0; z-index: 110; background: rgba(12,8,9,.6); }

  .main { overflow: visible; padding: 22px 18px 70px; }
  .att-bar { bottom: 10px; }
  .row .t { min-width: 130px; }
  .view-head h2 { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .gate-card.shake { animation: none; }
  .toast { animation: none; }
  .sidebar { transition: none; }
}

/* ------------------------------------------------ print (schedule board) */
@media print {
  .sched-empty { color: #666 !important; opacity: 1 !important; }
  .tt, .tl, .td, .set-stats, .set-card p, .set-card h3, .stu-name, .stu-meta,
  .att-name, .hist-counts, .sect-label, .view-sub, .panel .row .t, .panel .row .d,
  .panel .row .loc, .panel .row .count { color: #111 !important; }
  .admin-body { overflow: visible; background: #fff; color: #000; }
  .gate, .sidebar, .topbar, .scrim, .banner, .toasts, .modal-backdrop,
  .view-actions, .att-bar, .btn, .btn-ghost, .row-btn { display: none !important; }
  .app { display: block; height: auto; }
  .main { overflow: visible; padding: 0; }

  .view-head h2, .view-head .lede, .eyebrow, .sect-label { color: #000 !important; }
  .view-head h2 .accent { color: #000; }

  .sched-scroll { overflow: visible; }
  .sched-grid { min-width: 0; grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .sched-col, .panel, .tile, .set-card, .today-card {
    background: #fff !important; border-color: #000 !important;
    break-inside: avoid;
  }
  .sched-col header, .sched-slot .st, .sched-slot .sl, .sched-slot .sd,
  .panel-head .day, .panel-head .sub, .row .t, .row .loc, .row .d,
  .tile .n, .tile .l { color: #000 !important; }
  .sched-slot, .row { border-color: #ccc !important; }
  .chip { color: #000 !important; border-color: #000 !important; opacity: 1 !important; }
}
