/* Outreach HQ — blue and white.
   Navy rail, white work surface, cobalt for actions and logged work. */

:root {
  --navy-950: #081a33;
  --navy-900: #0e2240;
  --navy-800: #16305a;
  --navy-700: #1f3f74;
  --cobalt-700: #1a43a8;
  --cobalt-600: #2251c9;
  --cobalt-500: #3366e0;
  --cobalt-400: #6690ec;
  --sky-300: #a9c4f2;
  --sky-200: #cddcf8;
  --sky-100: #e3edfc;
  --sky-50: #f2f7fe;
  --white: #ffffff;
  --mist-50: #f6f8fb;
  --mist-100: #edf1f6;
  --mist-200: #e0e6ee;
  --mist-300: #c7d0dc;
  --slate-500: #63718a;
  --slate-600: #4a586e;
  --ink: #0f1c30;
  --danger: #b42318;

  --font: 'Instrument Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --r-sm: 6px;
  --r: 9px;
  --r-lg: 14px;
  --shadow-overlay: 0 24px 60px -16px rgba(8, 26, 51, 0.38), 0 2px 6px rgba(8, 26, 51, 0.08);
  --shadow-pop: 0 10px 28px -8px rgba(8, 26, 51, 0.22);
  --chev-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%234a586e' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --chev-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23ffffff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { color-scheme: light; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--mist-50);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--cobalt-600); }
img { display: block; }
:focus-visible { outline: 2px solid var(--cobalt-500); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.boot { min-height: 100vh; display: grid; place-items: center; color: var(--slate-500); }
.num, .tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--slate-500); }

/* ── Shell ─────────────────────────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.rail {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: 18px 12px 14px;
  background: var(--navy-900);
  color: #d8e3f5;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 20px; color: #fff; font-weight: 650; font-size: 16px; letter-spacing: -0.005em; text-decoration: none; }
.brand-mark { width: 28px; height: 28px; flex: none; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 12.5px; color: #8299be; padding: 18px 10px 6px; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px;
  color: #c4d2ea; text-decoration: none; font-weight: 500;
}
.nav a svg { width: 18px; height: 18px; flex: none; opacity: 0.85; }
.nav a:hover { background: var(--navy-800); color: #fff; }
.nav a[aria-current='page'] { background: var(--navy-800); color: #fff; box-shadow: inset 3px 0 0 var(--cobalt-400); }
.nav .count { margin-left: auto; font-size: 12.5px; font-weight: 600; font-stretch: 85%; color: #8299be; font-variant-numeric: tabular-nums; }
.nav .count.done { color: #fff; }
.nav .badge { margin-left: auto; min-width: 20px; padding: 0 7px; border-radius: 999px; background: var(--cobalt-500); color: #fff; font-size: 11.5px; font-weight: 700; text-align: center; line-height: 20px; }
.rail-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.rail-foot .who { min-width: 0; flex: 1; }
.rail-foot .who a { color: #fff; font-weight: 600; text-decoration: none; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-foot .who a:hover { text-decoration: underline; }
.rail-foot .who small { color: #8299be; font-size: 12px; }
.rail-foot .icon-btn { color: #9fb2d3; }
.rail-foot .icon-btn:hover { background: var(--navy-800); color: #fff; }

.main { min-width: 0; padding: 30px 40px 72px; }
.main:focus { outline: none; }
.page { max-width: 1240px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
h1 { margin: 0; font-size: 27px; line-height: 1.15; font-weight: 650; letter-spacing: -0.015em; color: var(--navy-900); }
.sub { margin: 5px 0 0; color: var(--slate-500); }
h2 { margin: 0; font-size: 16px; font-weight: 650; color: var(--navy-900); }
.section { margin-top: 30px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.section-head p { margin: 2px 0 0; color: var(--slate-500); font-size: 13.5px; }
.panel { background: var(--white); border: 1px solid var(--mist-200); border-radius: var(--r-lg); }

/* ── Tracks: daily quota drawn as an edit timeline, one clip per lead ──── */
.tracks { display: flex; flex-direction: column; gap: 12px; padding: 20px 22px; }
.track { display: grid; grid-template-columns: 168px minmax(0, 1fr) 96px; align-items: center; gap: 18px; }
.track-name { display: flex; flex-direction: column; line-height: 1.25; color: var(--navy-900); font-weight: 600; text-decoration: none; }
.track-name small { color: var(--slate-500); font-weight: 500; font-size: 12.5px; }
a.track-name:hover { color: var(--cobalt-600); }
.lane {
  display: flex; gap: 2px; height: 32px; padding: 4px;
  background: var(--mist-100); border: 1px solid var(--mist-200); border-radius: 8px;
}
.clip { flex: 1 1 0; min-width: 2px; border-radius: 3px; background: rgba(14, 34, 64, 0.06); transform-origin: left center; }
.clip.on { background: var(--cobalt-500); }
.clip.on.won-ish { background: var(--navy-900); }
.clip.extra { background: var(--cobalt-700); }
.track.done .lane { background: var(--sky-100); border-color: var(--sky-200); }
.track-count { text-align: right; font-size: 24px; line-height: 1; font-weight: 700; font-stretch: 75%; color: var(--navy-900); font-variant-numeric: tabular-nums; white-space: nowrap; }
.track-count span { font-size: 15px; font-weight: 600; color: var(--slate-500); }
.track.done .track-count span { color: var(--cobalt-600); }
.tracks-total { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px; border-top: 1px solid var(--mist-200); color: var(--slate-600); font-size: 13.5px; }
.tracks-total strong { color: var(--navy-900); font-variant-numeric: tabular-nums; }
.tracks.single { padding: 14px 18px; }
.animate-in .clip.on { animation: clip-in 0.42s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes clip-in { from { transform: scaleX(0); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px;
  border: 1px solid transparent; border-radius: var(--r);
  font-weight: 600; font-size: 14px; white-space: nowrap; cursor: pointer;
  text-decoration: none; transition: background-color 0.12s, border-color 0.12s;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--cobalt-600); color: #fff; }
.btn-primary:hover { background: var(--cobalt-700); }
.btn-secondary { background: #fff; border-color: var(--mist-300); color: var(--navy-900); }
.btn-secondary:hover { border-color: var(--slate-500); }
.btn-ghost { background: transparent; color: var(--slate-600); }
.btn-ghost:hover { background: var(--mist-100); color: var(--navy-900); }
.btn-danger { background: #fff; border-color: #efc7c2; color: var(--danger); }
.btn-danger:hover { background: #fff6f5; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn kbd { font: inherit; font-size: 11px; font-weight: 700; padding: 1px 5px; border-radius: 4px; background: rgba(255, 255, 255, 0.18); }
.icon-btn { width: 34px; height: 34px; padding: 0; display: inline-grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--slate-600); cursor: pointer; }
.icon-btn:hover { background: var(--mist-100); color: var(--navy-900); }
.icon-btn svg { width: 18px; height: 18px; }

/* ── Forms ─────────────────────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid .wide { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field > .label { font-size: 13px; font-weight: 600; color: var(--slate-600); }
.field .req { color: var(--cobalt-600); }
.input {
  width: 100%; height: 40px; padding: 0 12px;
  border: 1px solid var(--mist-300); border-radius: 8px; background: #fff;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.input::placeholder { color: #9aa6b8; }
.input:focus { outline: none; border-color: var(--cobalt-500); box-shadow: 0 0 0 3px var(--sky-200); }
textarea.input { height: auto; min-height: 88px; padding: 10px 12px; line-height: 1.45; resize: vertical; }
select.input { appearance: none; padding-right: 34px; background: #fff var(--chev-dark) no-repeat right 12px center / 11px; cursor: pointer; }
.field.has-error .input { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 12.5px; }
.field-hint { color: var(--slate-500); font-size: 12.5px; }
.prefix-wrap { position: relative; }
.prefix-wrap .prefix { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--slate-500); pointer-events: none; }
.prefix-wrap .input { padding-left: 26px; }
.toggle { display: inline-flex; align-items: center; gap: 10px; height: 40px; cursor: pointer; user-select: none; font-weight: 500; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle .knob { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--mist-300); transition: background-color 0.15s; flex: none; }
.toggle .knob::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); transition: transform 0.15s; }
.toggle input:checked + .knob { background: var(--cobalt-600); }
.toggle input:checked + .knob::after { transform: translateX(16px); }
.toggle input:focus-visible + .knob { outline: 2px solid var(--cobalt-500); outline-offset: 2px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.alert { padding: 12px 14px; border-radius: 10px; background: var(--sky-50); border: 1px solid var(--sky-200); color: var(--navy-800); font-size: 13.5px; }
.alert.warn { background: #fff8eb; border-color: #f4d9a6; color: #6b4708; }
.alert.error { background: #fff4f2; border-color: #f3c6c0; color: #7a271a; }
.alert strong { display: block; margin-bottom: 2px; }
.alert .alert-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* ── Filters ───────────────────────────────────────────────────────────── */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--mist-200); }
.filters .input { height: 34px; width: auto; font-size: 13.5px; }
.filters select.input { padding-right: 30px; background-position: right 10px center; }
.filters .search { flex: 1 1 200px; max-width: 280px; }
.filters .summary { margin-left: auto; color: var(--slate-500); font-size: 13px; white-space: nowrap; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 9px; background: var(--mist-100); }
.seg button { border: 0; background: transparent; padding: 5px 11px; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--slate-600); cursor: pointer; white-space: nowrap; }
.seg button:hover { color: var(--navy-900); }
.seg button[aria-pressed='true'] { background: #fff; color: var(--navy-900); box-shadow: 0 1px 2px rgba(14, 34, 64, 0.14); }

/* ── Tables ────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; }
.grid th { padding: 10px 14px; text-align: left; font-size: 12.5px; font-weight: 600; color: var(--slate-500); background: var(--mist-50); border-bottom: 1px solid var(--mist-200); white-space: nowrap; }
.grid td { padding: 11px 14px; border-bottom: 1px solid var(--mist-100); vertical-align: middle; white-space: nowrap; }
.grid tbody tr:last-child td { border-bottom: 0; }
.grid th.num, .grid td.num { text-align: right; font-variant-numeric: tabular-nums; }
.grid.leads { min-width: 820px; }
.grid.leads tbody tr { cursor: pointer; }
.grid.leads tbody tr:hover { background: var(--sky-50); }
.grid.leads tbody tr.fresh { animation: row-flash 1.4s ease-out; }
@keyframes row-flash { from { background: var(--sky-100); } to { background: transparent; } }
.grid td.title { min-width: 220px; max-width: 360px; white-space: normal; font-weight: 600; color: var(--navy-900); }
.grid td.title small { display: block; font-weight: 500; color: var(--slate-500); }
.grid td.clip-text { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.link-out { display: inline-flex; align-items: center; gap: 4px; color: var(--cobalt-600); font-weight: 600; text-decoration: none; }
.link-out:hover { text-decoration: underline; }
.link-out svg { width: 14px; height: 14px; }
.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--mist-100); color: var(--slate-600); font-size: 12.5px; font-weight: 600; }
.yes { color: var(--cobalt-600); }
.yes svg, .no svg { width: 16px; height: 16px; vertical-align: -3px; }
.no { color: var(--mist-300); }
.owner { display: inline-flex; align-items: center; gap: 8px; }
.notes-count { display: inline-flex; align-items: center; gap: 4px; color: var(--slate-500); font-size: 13px; }
.notes-count svg { width: 15px; height: 15px; }
.empty { padding: 52px 24px; text-align: center; color: var(--slate-500); }
.empty strong { display: block; margin-bottom: 4px; font-size: 16px; color: var(--navy-900); }
.empty .btn { margin-top: 16px; }
.loading-row td { padding: 40px 14px; text-align: center; color: var(--slate-500); }
.board td.person { min-width: 180px; }
.board tr.me td { background: var(--sky-50); }
.pct { display: inline-flex; align-items: center; gap: 8px; }
.pct .bar { width: 64px; height: 6px; border-radius: 999px; background: var(--mist-100); overflow: hidden; }
.pct .bar i { display: block; height: 100%; background: var(--cobalt-500); border-radius: 999px; }

/* Status pill (doubles as a select) */
.status {
  appearance: none; border: 0; border-radius: 999px;
  padding: 3px 26px 3px 11px;
  font-size: 12.5px; font-weight: 600; line-height: 1.6; cursor: pointer;
  background: var(--mist-100) var(--chev-dark) no-repeat right 9px center / 9px;
  color: var(--slate-600);
}
.status:focus-visible { outline: 2px solid var(--cobalt-500); outline-offset: 2px; }
span.status { cursor: default; padding-right: 11px; background-image: none; display: inline-block; }
.status[data-s='Viewed'] { background-color: var(--sky-100); color: var(--navy-700); }
.status[data-s='Replied'] { background-color: var(--sky-200); color: var(--navy-800); }
.status[data-s='Call Booked'] { background-color: var(--cobalt-400); color: #fff; background-image: var(--chev-light); }
.status[data-s='Negotiating'] { background-color: var(--cobalt-600); color: #fff; background-image: var(--chev-light); }
.status[data-s='Won'] { background-color: var(--navy-900); color: #fff; background-image: var(--chev-light); }
.status[data-s='Lost'] { background-color: #fff; color: var(--slate-500); box-shadow: inset 0 0 0 1px var(--mist-300); }
.status[data-s='No Response'] { background-color: var(--mist-50); color: var(--slate-500); box-shadow: inset 0 0 0 1px var(--mist-200); }
span.status[data-s] { background-image: none; }
.status option { background: #fff; color: var(--ink); }

/* Avatars */
.avatar { flex: none; border-radius: 50%; object-fit: cover; display: inline-grid; place-items: center; color: #fff; font-weight: 650; letter-spacing: 0.01em; background: var(--cobalt-500); overflow: hidden; }
.avatar[data-tone='1'] { background: var(--navy-700); }
.avatar[data-tone='2'] { background: var(--cobalt-600); }
.avatar[data-tone='3'] { background: #3f7fd8; }
.avatar[data-tone='4'] { background: #1e5aa8; }
.avatar[data-tone='5'] { background: #5c79a8; }

/* ── Overlays ──────────────────────────────────────────────────────────── */
.backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(8, 26, 51, 0.4); animation: fade-in 0.15s ease-out; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 41;
  width: min(580px, 100%);
  display: flex; flex-direction: column;
  background: #fff; box-shadow: var(--shadow-overlay);
  animation: drawer-in 0.22s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.modal {
  position: fixed; left: 50%; top: 5vh; z-index: 41;
  width: min(660px, calc(100% - 24px)); max-height: 90vh;
  transform: translateX(-50%);
  display: flex; flex-direction: column;
  background: #fff; border-radius: 16px; box-shadow: var(--shadow-overlay);
  animation: modal-in 0.18s ease-out;
}
.modal.small { width: min(440px, calc(100% - 24px)); }
.overlay-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 24px 16px; border-bottom: 1px solid var(--mist-200); }
.overlay-head .grow { flex: 1; min-width: 0; }
.overlay-head h2 { font-size: 19px; line-height: 1.25; }
.overlay-head p { margin: 4px 0 0; color: var(--slate-500); font-size: 13.5px; }
.overlay-body { flex: 1; overflow-y: auto; padding: 20px 24px 24px; }
.overlay-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding: 14px 24px; border-top: 1px solid var(--mist-200); background: var(--mist-50); border-radius: 0 0 16px 16px; }
.overlay-foot .left { margin-right: auto; color: var(--slate-500); font-size: 13px; }
.drawer .overlay-foot { border-radius: 0; }
.eyebrow-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; color: var(--slate-500); font-size: 13px; }
.detail-block + .detail-block { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--mist-200); }
.detail-block h3 { margin: 0 0 12px; font-size: 14.5px; font-weight: 650; color: var(--navy-900); }
@keyframes fade-in { from { opacity: 0; } }
@keyframes drawer-in { from { transform: translateX(32px); opacity: 0; } }
@keyframes modal-in { from { transform: translate(-50%, 10px); opacity: 0; } }

/* Notes */
.notes { display: flex; flex-direction: column; gap: 16px; margin-bottom: 16px; }
.note { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; }
.note-meta { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.note-meta strong { color: var(--navy-900); font-weight: 650; }
.note-meta time { color: var(--slate-500); }
.note-meta .icon-btn { width: 24px; height: 24px; margin-left: auto; color: var(--mist-300); }
.note-meta .icon-btn:hover { color: var(--danger); background: #fff4f2; }
.note-meta .icon-btn svg { width: 14px; height: 14px; }
.note-body { margin-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.mention { padding: 0 3px; border-radius: 4px; background: var(--sky-100); color: var(--cobalt-700); font-weight: 600; }
.mention.me { background: var(--cobalt-600); color: #fff; }
.composer { position: relative; }
.composer .composer-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; }
.composer .composer-actions small { color: var(--slate-500); }
.mention-menu { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 5; max-height: 232px; overflow-y: auto; padding: 4px; border: 1px solid var(--mist-200); border-radius: 10px; background: #fff; box-shadow: var(--shadow-pop); }
.composer.menu-up .mention-menu { top: auto; bottom: calc(100% + 4px); }
.mention-menu button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 8px; border: 0; border-radius: 7px; background: none; text-align: left; cursor: pointer; }
.mention-menu button[aria-selected='true'], .mention-menu button:hover { background: var(--sky-100); }

/* Mentions inbox */
.inbox { display: flex; flex-direction: column; }
.inbox-item { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--mist-100); cursor: pointer; text-align: left; background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; }
.inbox-item:last-child { border-bottom: 0; }
.inbox-item:hover { background: var(--sky-50); }
.inbox-item.unread { background: var(--sky-50); box-shadow: inset 3px 0 0 var(--cobalt-500); }
.inbox-item .what { color: var(--slate-600); font-size: 13.5px; }
.inbox-item .what strong { color: var(--navy-900); }
.inbox-item .note-body { color: var(--ink); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.inbox-item time { color: var(--slate-500); font-size: 12.5px; white-space: nowrap; }

/* Profile */
.profile-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; padding: 26px; }
.photo-picker { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.photo-picker .btns { display: flex; gap: 8px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-lg { display: flex; flex-direction: column; gap: 20px; }

/* Toasts */
#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 70; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; max-width: 380px; padding: 11px 15px; border-radius: 10px; background: var(--navy-900); color: #fff; font-weight: 500; box-shadow: var(--shadow-pop); animation: toast-in 0.18s ease-out; }
.toast.error { box-shadow: inset 3px 0 0 #f97066, var(--shadow-pop); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

/* ── Auth ──────────────────────────────────────────────────────────────── */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); background: #fff; }
.auth-brand { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: 44px 52px; background: var(--navy-900); color: #fff; }
.auth-brand .brand { padding: 0; }
.auth-brand h1 { color: #fff; font-size: clamp(32px, 4vw, 46px); line-height: 1.04; font-weight: 700; font-stretch: 80%; letter-spacing: -0.01em; max-width: 13ch; }
.auth-brand p { color: #b4c4e0; font-size: 16px; max-width: 40ch; margin: 14px 0 0; }
.demo-tracks { display: flex; flex-direction: column; gap: 10px; max-width: 520px; }
.demo-tracks .track { grid-template-columns: 112px minmax(0, 1fr) 64px; gap: 14px; }
.demo-tracks .track-name { color: #dbe5f6; }
.demo-tracks .track-name small { color: #8299be; }
.demo-tracks .lane { background: var(--navy-800); border-color: rgba(255, 255, 255, 0.06); height: 26px; }
.demo-tracks .clip { background: rgba(255, 255, 255, 0.06); }
.demo-tracks .clip.on { background: var(--cobalt-500); }
.demo-tracks .track-count { color: #fff; font-size: 20px; }
.demo-tracks .track-count span { color: #8299be; font-size: 13px; }
.demo-tracks .track.done .lane { background: var(--navy-700); border-color: rgba(255, 255, 255, 0.1); }
.demo-tracks .track.done .track-count span { color: var(--sky-300); }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h2 { font-size: 24px; letter-spacing: -0.01em; }
.auth-card > p { color: var(--slate-500); margin: 6px 0 24px; }
.auth-switch { margin-top: 22px; color: var(--slate-500); font-size: 14px; }
.auth-switch a, .text-btn { color: var(--cobalt-600); font-weight: 600; text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; }
.auth-switch a:hover, .text-btn:hover { text-decoration: underline; }
.auth-setup { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--mist-200); font-size: 13px; color: var(--slate-500); }
.avatar-row { display: flex; align-items: center; gap: 12px; }

/* Setup / config screens */
.center-card { max-width: 620px; margin: 8vh auto; padding: 0 16px; }
.center-card .panel { padding: 28px; }
.env-list { margin: 16px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.env-list li { padding: 12px 14px; border: 1px solid var(--mist-200); border-radius: 10px; background: var(--mist-50); }
.env-list code { font-weight: 700; color: var(--navy-900); }
.report { margin: 10px 0 0; padding-left: 18px; color: var(--slate-600); }

/* ── Small screens ─────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { position: sticky; top: 0; z-index: 30; height: auto; flex-direction: row; align-items: center; gap: 6px; padding: 8px 10px; overflow-x: auto; scrollbar-width: none; }
  .rail::-webkit-scrollbar { display: none; }
  .brand { padding: 0 6px 0 2px; }
  .brand span { display: none; }
  .nav { flex-direction: row; gap: 2px; }
  .nav-label { display: none; }
  .nav a { padding: 7px 10px; white-space: nowrap; }
  .nav a[aria-current='page'] { box-shadow: inset 0 -2px 0 var(--cobalt-400); }
  .rail-foot { margin: 0 0 0 auto; padding: 0 0 0 6px; border: 0; }
  .rail-foot .who { display: none; }
  .main { padding: 22px 16px 60px; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-brand { padding: 28px 24px; gap: 24px; }
  .auth-brand h1 { font-size: 32px; }
  .profile-grid { grid-template-columns: minmax(0, 1fr); padding: 20px; gap: 24px; }
}
@media (max-width: 640px) {
  body { font-size: 14px; }
  h1 { font-size: 23px; }
  .track { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .track .lane { grid-column: 1 / -1; order: 3; gap: 1px; height: 26px; }
  .tracks { padding: 16px; }
  .tracks-total { padding: 12px 16px; flex-direction: column; align-items: flex-start; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .modal { top: 0; left: 0; transform: none; width: 100%; height: 100%; max-height: 100%; border-radius: 0; animation: fade-in 0.15s; }
  .overlay-foot { border-radius: 0; }
  .overlay-head, .overlay-body { padding-left: 18px; padding-right: 18px; }
  .overlay-foot { padding: 12px 18px; }
  .filters .search { max-width: none; }
  .filters .summary { margin-left: 0; width: 100%; }
  .auth-brand .demo-tracks { display: none; }
  .page-head .btn { width: 100%; }
  .page-head > div:first-child { width: 100%; }
  #toasts { left: 16px; right: 16px; bottom: 16px; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-delay: 0ms !important; transition-duration: 0.001ms !important; }
}
