/* StriveBuddy office website, 2026 look (same class names as before, so every page picks it up). */
:root {
  --ink: #14213D;          /* navy: text, active menu item */
  --ink-2: #22315A;
  --bus: #FFC93C;          /* school-bus yellow: brand, primary buttons, vans */
  --bus-soft: #FFF4D1;     /* "moving" tint */
  --bus-tint: #FFF0C2;
  --bus-dot: #E0A100;
  --bus-text: #6B4A00;     /* readable text on yellow tints */
  --paper: #FFFFFF;
  --ground: #F3F4F8;
  --tint: #EDF0F6;         /* soft buttons, avatars */
  --line: #E8EBF2;
  --muted: #5B6475;
  --body: #3D4656;
  --ok: #0F6B36;  --ok-dot: #1F9D55; --ok-soft: #E3F4E8;
  --warn: #8A5A00; --warn-soft: #FFF4D1;
  --alert: #B42318; --alert-soft: #FDECEA;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(20,33,61,.04), 0 8px 24px rgba(20,33,61,.06);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); color: var(--ink); background: var(--ground); font-size: 14.5px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #4C7DFF; outline-offset: 2px; }
h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.6px; margin: 0; line-height: 1.2; }
h2 { font-size: 17px; font-weight: 700; margin: 0 0 12px; letter-spacing: -0.2px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@keyframes sb-pulse { 0% { box-shadow: 0 0 0 0 rgba(224,161,0,.5); } 70% { box-shadow: 0 0 0 9px rgba(224,161,0,0); } 100% { box-shadow: 0 0 0 0 rgba(224,161,0,0); } }
@keyframes sb-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes sb-shimmer { from { background-position: -400px 0; } to { background-position: 400px 0; } }

/* ---------- Shell: floating light menu + content ---------- */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); gap: 16px; min-height: 100%; padding: 16px; }
.sidebar { background: var(--paper); border-radius: 24px; box-shadow: var(--shadow); padding: 18px 12px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 16px; height: calc(100vh - 32px); overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; font-weight: 700; font-size: 16px; }
.school-brand { align-items: center; }
.school-logo { width: 40px; height: 40px; border-radius: 12px; background: #fff; object-fit: contain; flex: none; box-shadow: 0 0 0 1px var(--line); }
.school-logo.initials { display: grid; place-items: center; color: var(--ink); background: var(--bus); box-shadow: none; font-weight: 700; font-size: 14px; }
.school-name { line-height: 1.2; font-size: 15px; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; background: var(--bus); display: grid; place-items: center; flex: none; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 14px; color: var(--body); text-decoration: none; font-weight: 500; transition: background .15s, color .15s; }
.nav a svg { flex: none; }
.nav a:hover { background: var(--ground); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--ink); color: #fff; font-weight: 600; }
.nav a[aria-current="page"] svg { stroke: var(--bus); }
.nav .badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; font-size: 12px; font-weight: 700; display: none; align-items: center; justify-content: center; background: var(--tint); color: var(--ink); }
.nav .badge.show { display: inline-flex; }
.nav .badge.live { background: var(--bus-soft); color: var(--bus-text); }
.nav .badge.alert { background: var(--alert); color: #fff; }
.nav a[aria-current="page"] .badge { background: rgba(255,255,255,.16); color: #fff; }
.nav-group { margin-top: 14px; padding: 0 12px 6px; font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: .6px; text-transform: uppercase; }
.sidebar-foot { margin-top: auto; padding: 12px; border-radius: 16px; background: var(--ground); font-size: 13px; color: var(--muted); display: grid; grid-template-columns: 36px 1fr; gap: 2px 10px; align-items: center; }
.sidebar-foot .avatar { grid-row: span 2; width: 36px; height: 36px; border-radius: 50%; background: var(--tint); display: grid; place-items: center; font-weight: 700; color: var(--ink); font-size: 13px; }
.sidebar-foot .who { font-weight: 600; color: var(--ink); line-height: 1.2; }
.sidebar-foot button { grid-column: 1 / -1; margin-top: 10px; height: 36px; background: var(--paper); border: none; color: var(--ink); border-radius: 12px; font-weight: 600; cursor: pointer; }
.sidebar-foot button:hover { background: var(--tint); }
.sidebar-foot .powered { grid-column: 1 / -1; margin-top: 6px; font-size: 12px; }

.main { padding: 6px 8px 48px; min-width: 0; animation: sb-fade .25s ease-out; }
.topbar { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-trigger { flex: 0 1 380px; height: 46px; display: flex; align-items: center; gap: 10px; padding: 0 12px 0 14px; border: none; border-radius: var(--radius-sm); background: var(--paper); box-shadow: var(--shadow); color: var(--muted); cursor: pointer; text-align: left; }
.search-trigger span.grow { flex: 1; }
.kbd { font-size: 12px; font-weight: 600; color: var(--muted); padding: 3px 8px; border-radius: 8px; background: var(--ground); }
.school-picker { display: flex; align-items: center; gap: 8px; }
.school-picker select { min-width: 220px; }
.topbar > strong { padding: 0 6px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { margin: 6px 0 0; }
.school-header { display: flex; gap: 16px; align-items: center; }
.school-header .logo { width: 64px; height: 64px; border-radius: 18px; background: #fff; box-shadow: var(--shadow); object-fit: contain; display: grid; place-items: center; font-weight: 700; font-size: 22px; flex: none; }

/* ---------- Surfaces ---------- */
.panel { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px; }
.panel.flush { padding: 0; overflow: hidden; }
.split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr); gap: 16px; align-items: start; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.split > .stack > .panel { margin-bottom: 0; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-items: end; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 16px; }
.kpi { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.kpi .big { font-size: 28px; font-weight: 700; letter-spacing: -0.6px; line-height: 1.1; }
.kpi .big small { font-size: 15px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.bars { display: flex; align-items: flex-end; gap: 12px; height: 120px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; justify-content: flex-end; height: 100%; }
.bars .bar span.fill { width: 100%; max-width: 44px; background: var(--ink); border-radius: 10px; min-height: 4px; transition: height .5s ease-out; }
.bars .bar.today span.fill { background: var(--bus); }

/* ---------- Forms ---------- */
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--body); }
input[type=text], input[type=tel], input[type=password], input[type=email], input[type=number], input[type=date], input[type=time], input[type=datetime-local], input[type=search], select, textarea {
  height: 44px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; background: #fff; font-weight: 500; width: 100%; transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; padding: 10px 14px; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 4px rgba(20,33,61,.08); }
input { min-width: 0; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--ink); }
/* Buttons always look like buttons: a clear edge or fill, a visible hover and press, a clearly greyed disabled state. */
.btn { height: 42px; padding: 0 16px; border-radius: 12px; border: 1.5px solid #C3CADA; background: #fff; color: var(--ink); font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s; }
.btn:hover { background: var(--ground); border-color: var(--ink); }
.btn:active { transform: scale(.97); background: var(--tint); }
.btn.primary, .btn.dark, .btn.alert { border-color: transparent; }
.btn.primary { background: var(--bus); color: var(--ink); }
.btn.primary:hover { background: #F5BB1F; }
.btn.dark { background: var(--ink); color: #fff; }
.btn.dark:hover { background: var(--ink-2); }
.btn.danger { background: #fff; border-color: #E9A8A0; color: var(--alert); }
.btn.danger:hover { background: var(--alert-soft); border-color: var(--alert); }
.btn.alert { background: var(--alert); color: #fff; }
.btn.alert:hover { background: #9A1F15; }
.btn.white { background: #fff; border-color: transparent; }
.btn.white:hover { border-color: var(--ink); }
.btn.small { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.link { background: none; border: none; text-decoration: underline; padding: 0 4px; height: auto; font-weight: 600; }
.btn:disabled, .btn[aria-busy="true"] { background: #F1F3F7; border-color: var(--line); color: #8A93A3; cursor: not-allowed; transform: none; }
.error-text { color: var(--alert); font-size: 13px; font-weight: 600; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #FAFBFD; white-space: nowrap; text-transform: uppercase; letter-spacing: .4px; }
td { padding: 13px 16px; border-bottom: 1px solid #F0F2F6; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #F8F9FC; }
td.num { font-variant-numeric: tabular-nums; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }

/* ---------- Status ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--tint); color: var(--muted); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.alert { background: var(--alert-soft); color: var(--alert); }
.pill.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok-dot); }
.alert-banner { background: var(--alert-soft); color: var(--alert); box-shadow: 0 0 0 1.5px #F4B8B1; border-radius: var(--radius); padding: 16px 18px; font-weight: 600; margin-bottom: 16px; }

/* ---------- Map ---------- */
.map { height: 460px; border-radius: var(--radius); box-shadow: var(--shadow); z-index: 0; }
.map.tall { height: 560px; }
.leaflet-container { font-family: var(--font); }
.van-marker { background: var(--bus); color: var(--ink); border-radius: 12px; font-weight: 700; font-size: 12px; padding: 6px 11px; white-space: nowrap; box-shadow: 0 4px 12px rgba(20,33,61,.25); transform: translate(-50%, -50%); display: inline-block; transition: transform .2s; }
.van-marker.alert { background: var(--alert); color: #fff; }
.school-pin { width: 44px; height: 44px; border-radius: 50%; background: var(--ink); display: grid; place-items: center; box-shadow: 0 6px 16px rgba(20,33,61,.3); transform: translate(-50%, -50%); }
.stop-marker { width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 2.5px solid var(--ink); display: grid; place-items: center; font-weight: 700; font-size: 12px; color: var(--ink); box-shadow: 0 2px 6px rgba(20,33,61,.15); }
.stop-marker.done { background: var(--ink); color: #fff; }
.stop-marker.skipped { border-style: dashed; color: var(--muted); }

/* ---------- Route editor ---------- */
.stop-list { display: flex; flex-direction: column; }
.stop-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; grid-template-areas: "num name name" ". time tools"; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid #F0F2F6; }
.stop-row > :nth-child(1) { grid-area: num; }
.stop-row > :nth-child(2) { grid-area: name; }
.stop-row > :nth-child(3) { grid-area: time; max-width: 160px; }
.stop-row > :nth-child(4) { grid-area: tools; }
.stop-row:last-child { border-bottom: none; }
.stop-num { width: 26px; height: 26px; border-radius: 50%; background: var(--tint); display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.stop-tools { display: flex; gap: 4px; }
.icon-btn { width: 34px; height: 34px; border-radius: 10px; border: 1.5px solid #C3CADA; background: #fff; cursor: pointer; display: grid; place-items: center; }
.icon-btn:hover { background: #E2E6EF; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 4px 11px; border-radius: 999px; background: var(--tint); font-size: 13px; font-weight: 600; }
.hint { background: var(--bus-soft); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 13px; }

/* ---------- Trip ---------- */
.kid { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; }
.stop-block { padding: 14px 0; border-bottom: 1px solid #F0F2F6; }
.stop-block:last-child { border-bottom: none; }
.stop-title { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; }

/* ---------- Login ---------- */
.login { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 16px; gap: 16px; }
.login-art { background: var(--ink); color: #fff; padding: 56px; border-radius: 28px; display: flex; flex-direction: column; justify-content: space-between; }
.login-art h1 { font-size: 42px; max-width: 12ch; letter-spacing: -1px; }
.road { height: 14px; border-radius: 7px; background: repeating-linear-gradient(90deg, var(--bus) 0 36px, transparent 36px 60px); opacity: .9; }
.login-form { display: grid; place-items: center; padding: 32px; }
.login-form form { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 16px; }

/* ---------- Modal, toast, search palette ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(20,33,61,.4); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 1000; padding: 20px; animation: sb-fade .15s ease-out; }
.modal { background: #fff; border-radius: 24px; width: min(560px, 100%); max-height: 86vh; overflow: auto; padding: 24px; box-shadow: 0 24px 64px rgba(20,33,61,.25); }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.secret { font-size: 26px; font-weight: 700; letter-spacing: 2px; background: var(--bus-soft); border-radius: var(--radius-sm); padding: 14px 16px; text-align: center; user-select: all; }
#toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 1100; }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 14px; font-weight: 600; max-width: 380px; box-shadow: 0 12px 32px rgba(20,33,61,.25); animation: sb-fade .2s ease-out; }
.toast.alert { background: var(--alert); }
.check-list { max-height: 50vh; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.check-list label { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid #F0F2F6; cursor: pointer; }
.check-list label:last-child { border-bottom: none; }

.cmdk-back { position: fixed; inset: 0; background: rgba(20,33,61,.35); backdrop-filter: blur(3px); z-index: 1000; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; animation: sb-fade .12s ease-out; }
.cmdk { width: min(620px, 100%); background: #fff; border-radius: 22px; box-shadow: 0 24px 64px rgba(20,33,61,.25); overflow: hidden; display: flex; flex-direction: column; max-height: 70vh; }
.cmdk-input { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.cmdk-input input { border: none; box-shadow: none; height: 58px; font-size: 16px; padding: 0; }
.cmdk-input input:focus { box-shadow: none; }
.cmdk-list { overflow-y: auto; padding: 8px; }
.cmdk-group { padding: 10px 10px 4px; font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .6px; text-transform: uppercase; }
.cmdk-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border: none; background: none; border-radius: 12px; cursor: pointer; text-align: left; }
.cmdk-item .avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--tint); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.cmdk-item .sub { font-size: 12.5px; color: var(--muted); }
.cmdk-item[aria-selected="true"] { background: var(--ground); }
.cmdk-foot { padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); display: flex; gap: 14px; }

/* ---------- Dashboard (bento) ---------- */
.greet { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.greet p { margin: 4px 0 0; color: var(--muted); }
.live-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; padding: 18px 22px; border-radius: 24px; background: var(--paper); box-shadow: var(--shadow); margin-bottom: 16px; transition: background .4s; }
.live-strip.live { background: var(--bus-soft); }
.live-strip.ok { background: var(--ok-soft); }
.live-strip.alert { background: var(--alert-soft); box-shadow: 0 0 0 1.5px #F4B8B1; }
.live-strip .lead { flex: 1 1 300px; display: flex; align-items: center; gap: 12px; }
.live-strip .dot { width: 10px; height: 10px; border-radius: 50%; background: #C9CFDA; flex: none; }
.live-strip.live .dot { background: var(--bus-dot); animation: sb-pulse 1.8s ease-out infinite; }
.live-strip.ok .dot { background: var(--ok-dot); }
.live-strip.alert .dot { background: var(--alert); }
.live-strip .label { font-size: 12px; font-weight: 700; letter-spacing: .4px; color: var(--muted); }
.live-strip.live .label { color: var(--bus-text); }
.live-strip.ok .label { color: var(--ok); }
.live-strip.alert .label { color: var(--alert); }
.live-strip .title { font-size: 22px; font-weight: 700; letter-spacing: -0.4px; line-height: 1.2; }
.live-strip .meter { flex: 2 1 340px; display: flex; flex-direction: column; gap: 8px; }
.live-strip .meter-text { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--body); flex-wrap: wrap; }
.progress { height: 10px; border-radius: 99px; background: rgba(255,255,255,.75); overflow: hidden; display: flex; }
.live-strip:not(.live):not(.ok):not(.alert) .progress { background: var(--tint); }
.progress span { display: block; height: 100%; transition: width .6s ease-out; }
.progress .done { background: var(--ok-dot); }
.progress .moving { background: var(--bus); }
.live-strip .chips .chip { background: #fff; }

.bento { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }
.bento > * { min-width: 0; }
.bento .wide { flex: 2 1 560px; }
.bento .narrow { flex: 1 1 320px; }
.card { background: var(--paper); border-radius: 24px; box-shadow: var(--shadow); padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.card-head a { font-size: 13px; font-weight: 600; text-decoration: none; }
.map-card { position: relative; height: 440px; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); background: #E8EEF2; }
.map-card .map { height: 100%; border-radius: 0; box-shadow: none; }
.map-overlay { position: absolute; left: 14px; right: 14px; top: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; z-index: 500; pointer-events: none; }
.map-overlay > * { pointer-events: auto; }
.glass { background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-radius: 99px; padding: 8px 14px; font-size: 13px; font-weight: 600; box-shadow: 0 2px 8px rgba(20,33,61,.08); }
.glass.ok { color: var(--ok); }
.map-overlay .open { margin-left: auto; background: var(--ink); color: #fff; text-decoration: none; }
.van-float { position: absolute; left: 14px; bottom: 14px; width: 300px; max-width: calc(100% - 28px); z-index: 500; padding: 14px 16px; border-radius: 18px; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); box-shadow: 0 8px 24px rgba(20,33,61,.14); display: flex; flex-direction: column; gap: 4px; animation: sb-fade .25s ease-out; }
.van-float .head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 700; font-size: 15px; }
.map-empty { height: 100%; display: grid; place-items: center; text-align: center; padding: 24px; color: var(--muted); }
.map-empty strong { display: block; color: var(--ink); font-size: 18px; margin-bottom: 4px; }

.feed { display: flex; flex-direction: column; gap: 10px; }
.feed-item { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 18px; background: var(--ground); animation: sb-fade .25s ease-out; }
.feed-item.alert { background: var(--alert-soft); }
.feed-item .ico { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; background: #fff; }
.feed-item .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.feed-item .t { font-weight: 600; }
.feed-item.alert .t { color: #9A1F15; font-weight: 700; }
.feed-item .s { font-size: 13px; color: var(--body); }
.feed-item .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.feed-ok { padding: 12px 14px; border-radius: 16px; background: var(--ok-soft); color: var(--ok); font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 10px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 16px; }
.stat { background: var(--paper); border-radius: 22px; box-shadow: var(--shadow); padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.stat.ring { flex-direction: row; align-items: center; gap: 14px; }
.stat .v { font-size: 28px; font-weight: 700; letter-spacing: -0.6px; line-height: 1.1; }
.stat .v small { font-size: 15px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.stat .l { font-size: 13px; color: var(--muted); }
.stat .spark { margin-top: 6px; width: 100%; height: 28px; }
.meter-bar { height: 8px; border-radius: 99px; background: var(--tint); overflow: hidden; margin-top: 10px; }
.meter-bar span { display: block; height: 100%; border-radius: 99px; }

.vans-list { display: flex; flex-direction: column; min-width: 560px; }
.vans-list .r { display: grid; grid-template-columns: 1.1fr 1.6fr 1.1fr 1fr 1.8fr; gap: 12px; align-items: center; padding: 12px 12px; border-radius: 14px; text-decoration: none; color: var(--ink); }
.vans-list .r:nth-child(even) { background: #F8F9FC; }
.vans-list a.r:hover { background: var(--ground); }
.vans-list .h { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; background: none !important; padding-top: 4px; padding-bottom: 4px; }
.vans-list .now { font-size: 13px; color: var(--body); }
.timeline { display: flex; flex-direction: column; gap: 12px; }
.timeline .e { display: flex; gap: 10px; align-items: flex-start; }
.timeline .e .d { width: 8px; height: 8px; border-radius: 50%; background: #C9CFDA; margin-top: 7px; flex: none; }
.timeline .e .d.ok { background: var(--ok-dot); }
.timeline .e .d.live { background: var(--bus); }
.timeline .e .w { font-size: 12px; color: var(--muted); }
.skeleton { border-radius: 24px; background: linear-gradient(90deg, #E9ECF2 0px, #F4F6FA 160px, #E9ECF2 320px); background-size: 800px 100%; animation: sb-shimmer 1.4s linear infinite; }

/* ---------- Print: login slips ---------- */
#print-area { display: none; }
@media print {
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block; }
  .slips { display: grid; grid-template-columns: 1fr 1fr; gap: 10mm; }
  .slip { border: 1.5px dashed #555; border-radius: 6px; padding: 8mm; break-inside: avoid; font-size: 12pt; }
  .slip h3 { margin: 0 0 4mm; font-size: 14pt; }
  .slip .pw { font-size: 16pt; font-weight: 800; letter-spacing: 1px; }
}

/* Hamburger button: only on tablets and phones */
.menu-btn { display: none; width: 46px; height: 46px; border: 1.5px solid #C3CADA; border-radius: var(--radius-sm); background: #fff; color: var(--ink); align-items: center; justify-content: center; cursor: pointer; flex: none; }
tr.clickable:focus-visible td { background: var(--ground); }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; padding: 10px; gap: 10px; }
  /* The side menu becomes a drawer that slides in from the left */
  .sidebar { position: fixed; top: 10px; left: 10px; bottom: 10px; height: auto; width: min(290px, calc(100vw - 20px)); z-index: 950;
    transform: translateX(calc(-100% - 20px)); transition: transform .22s ease-out; box-shadow: 0 24px 64px rgba(20,33,61,.25); }
  .shell.menu-open .sidebar { transform: none; }
  .shell.menu-open::after { content: ""; position: fixed; inset: 0; background: rgba(20,33,61,.35); z-index: 940; }
  .menu-btn { display: inline-flex; }
  .topbar { justify-content: flex-start; }
  .main { padding: 4px 4px 32px; }
  .split, .login { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .search-trigger { flex: 1 1 200px; }
  .school-picker select { min-width: 0; }
  .map-card { height: 340px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Dashboard: operational cards, event ticker ---------- */
@keyframes sb-alert-pulse { 0% { box-shadow: 0 0 0 0 rgba(180,35,24,.35), var(--shadow); } 70% { box-shadow: 0 0 0 10px rgba(180,35,24,0), var(--shadow); } 100% { box-shadow: 0 0 0 0 rgba(180,35,24,0), var(--shadow); } }
a.stat.link { text-decoration: none; color: var(--ink); transition: transform .12s, box-shadow .12s; }
a.stat.link:hover { transform: translateY(-2px); }
.stat.warn { background: var(--warn-soft); }
.stat.warn .v { color: var(--warn); }
.stat.alert { background: var(--alert-soft); }
.stat.alert .v, .stat.alert .l { color: var(--alert); }
.pulse { animation: sb-alert-pulse 1.8s ease-out infinite; }
.feed-item.pulse { animation: sb-alert-pulse 1.8s ease-out 3; }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 99px; background: var(--ground); }
.tabs .tab { border: none; background: none; padding: 7px 12px; border-radius: 99px; font-weight: 600; font-size: 13px; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.tabs .tab.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(20,33,61,.12); }
.tabs .count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--tint); color: var(--ink); font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.tabs .count.alert { background: var(--alert); color: #fff; }
.side-feed .feed { max-height: 380px; overflow-y: auto; }
.map-overlay .show-feed { display: none; border: none; cursor: pointer; color: var(--ink); }
.bento.feed-hidden .side-feed { display: none; }
.bento.feed-hidden .map-overlay .show-feed { display: inline-flex; }

/* ---------- Route editor: stops as a timeline, drag to reorder ---------- */
.stop-list.timeline .tl-item { position: relative; padding-left: 4px; border-radius: 14px; transition: background .15s, opacity .15s; }
.stop-list.timeline .tl-item::before { content: ""; position: absolute; left: 17px; top: 34px; bottom: -10px; width: 2px; background: var(--line); }
.stop-list.timeline .tl-item.last::before { display: none; }
.stop-list.timeline .stop-row { border-bottom: none; }
.stop-list.timeline .stop-num { position: relative; z-index: 1; background: var(--ink); color: #fff; width: 28px; height: 28px; }
.stop-list.timeline .tl-item:first-child .stop-num { background: var(--bus); color: var(--ink); }
.drag-handle { position: absolute; left: -16px; top: 4px; cursor: grab; color: var(--muted); font-size: 14px; }
.tl-item.dragging { opacity: .45; }
.tl-item.drop-target { background: var(--bus-soft); }

/* ---------- StriveBuddy logo ---------- */
.brand-mark { width: 38px; height: 38px; object-fit: contain; flex: none; background: none; }
.login-badge { width: 44px; height: 44px; border-radius: 12px; background: #fff; display: inline-grid; place-items: center; margin-right: 10px; vertical-align: middle; }
.login-badge img { width: 34px; height: 34px; object-fit: contain; }
.login-art .brand { display: flex; align-items: center; color: #fff; font-size: 20px; }
.login-logo { width: min(280px, 80%); height: auto; margin-bottom: 8px; }

/* ---------- Messages to parents ---------- */
.modal.wide { width: min(760px, 100%); }
.msg-section { border-top: 1px solid var(--line); padding-top: 14px; }
.msg-section > h3 { margin: 0 0 10px; font-size: 14px; }
.msg-reach { background: var(--ok-soft); color: var(--ok); border-radius: var(--radius-sm); padding: 12px 14px; font-weight: 600; }
.msg-reach.none { background: var(--alert-soft); color: var(--alert); }
.msg-body { white-space: pre-wrap; background: var(--ground); border-radius: var(--radius-sm); padding: 14px; line-height: 1.5; }
.msg-checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.msg-checks label { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.msg-count { display: flex; gap: 10px; flex-wrap: wrap; }
.msg-count > div { flex: 1 1 110px; background: var(--ground); border-radius: var(--radius-sm); padding: 12px 14px; }
.msg-count strong { display: block; font-size: 22px; }
.pill.cat-fee { background: #E7F0FF; color: #1D4ED8; }
.pill.cat-holiday { background: var(--ok-soft); color: var(--ok); }
.pill.cat-van { background: var(--warn-soft); color: var(--warn); }
.pill.cat-event { background: #F1E9FF; color: #6D28D9; }
.pill.cat-urgent { background: var(--alert-soft); color: var(--alert); }
.live-strip.holiday { background: var(--ok-soft); color: var(--ok); }
