/* Halden admin panel — styles. Tokens first, then layout, then components. */
:root {
  --ink: #111413;
  --ink-2: #1A1E1D;
  --ink-3: #262B29;
  --ink-line: #2E3432;
  --on-ink: #F2F3F0;
  --on-ink-2: #CDD3D0;
  --on-ink-muted: #A3ABA8;

  --paper: #F4F4F1;
  --surface: #FFFFFF;
  --surface-2: #F7F7F5;
  --line: #E1E3DF;
  --line-2: #ECEDEA;
  --field: #DADDD8;
  --text: #111413;
  --text-2: #3A413E;
  --muted: #5B6360;

  --accent: #FF6A2B;
  --accent-text: #B4410F;
  --accent-soft: #FFE1D2;
  --accent-row: #FFF1E9;
  --blue-bg: #DDE8FA;
  --blue-text: #12305F;
  --blue-line: #9DB8E6;
  --done-bg: #ECEDEA;
  --red-bg: #FBE1DC;
  --red-text: #8A2414;

  --font: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --radius: 16px;
  --hour: 64px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.4; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: 0.55; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ico { flex: 0 0 auto; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

/* ---------- shell ---------- */
.shell { min-height: 100vh; display: flex; }
.sidebar { flex: 0 0 236px; background: var(--ink); color: var(--on-ink); padding: 24px 16px; display: flex; flex-direction: column; gap: 28px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 8px; }
.wordmark { display: flex; flex-direction: column; gap: 3px; }
.wordmark b { font-size: 18px; line-height: 1; font-weight: 800; font-stretch: 125%; letter-spacing: 0.06em; }
.wordmark small { font-family: var(--mono); font-size: 9px; letter-spacing: 0.26em; color: var(--on-ink-muted); }
.tag-admin { font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: 0.12em; padding: 4px 6px; border-radius: 6px; background: var(--ink-3); color: var(--on-ink-2); }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--on-ink-2); font-size: 15px; }
.nav a:hover { background: var(--ink-2); color: #fff; }
.nav a[aria-current="page"] { background: var(--ink-3); color: #fff; font-weight: 600; }
.nav a[aria-current="page"] .ico { color: var(--accent); }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.side-link { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--ink-line); color: var(--on-ink-2); font-size: 14px; background: none; width: 100%; text-align: left; }
.side-link:hover { background: var(--ink-2); }
.me { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.me .avatar { background: var(--accent); color: var(--ink); }
.me span { display: flex; flex-direction: column; gap: 1px; font-size: 14px; font-weight: 600; }
.me small { font-size: 12px; font-weight: 400; color: var(--on-ink-muted); }
.demo-flag { font-size: 12px; color: var(--on-ink-muted); padding: 0 8px; }

.main { flex: 1 1 auto; min-width: 0; padding: 24px 28px 40px; display: flex; flex-direction: column; gap: 20px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.page-head h1 { font-size: 28px; line-height: 1.05; font-weight: 800; font-stretch: 112%; }
.page-head p { font-size: 14px; color: var(--muted); margin-top: 4px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.row-wrap { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 20px; }
.grow { flex: 999 1 560px; min-width: 0; }
.side { flex: 1 1 300px; min-width: 0; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.toolbar .group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* ---------- buttons & fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid var(--field); background: var(--surface); color: var(--text); font-size: 14px; font-weight: 600; white-space: nowrap; }
.btn:hover:not(:disabled) { border-color: #B9BDB8; }
.btn-primary { border: 0; background: var(--accent); color: var(--ink); font-size: 15px; font-weight: 700; }
.btn-primary:hover:not(:disabled) { background: #FF7C43; }
.btn-dark { border: 0; background: var(--ink); color: var(--on-ink); }
.btn-danger { border: 0; background: var(--red-text); color: #fff; }
.btn-text { border: 0; background: none; height: 40px; padding: 0 4px; color: var(--accent-text); font-weight: 700; }
.btn-text.danger { color: var(--red-text); }
.btn-sq { border-radius: 12px; }
.btn-icon { width: 44px; height: 44px; padding: 0; border-radius: 12px; border: 1px solid var(--field); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; color: var(--text); }
.btn-icon.small { width: 36px; height: 36px; border-radius: 10px; }
.btn-block { width: 100%; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: #E6E8E4; }
.seg button { height: 38px; padding: 0 14px; border-radius: 9px; border: 0; background: transparent; color: var(--text-2); font-size: 14px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); font-weight: 600; }
.chip { height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid var(--field); background: var(--surface); font-size: 14px; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); font-weight: 600; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field > .label, legend { font-size: 13px; font-weight: 600; }
.input, .field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea, select.input {
  height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--field); background: var(--surface); color: var(--text); font-size: 15px; width: 100%; min-width: 0;
}
.field textarea { height: auto; min-height: 72px; padding: 10px 12px; resize: vertical; }
.field input[readonly] { background: var(--surface-2); color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 12px; }
.search { position: relative; display: flex; align-items: center; }
.search .ico { position: absolute; left: 14px; color: var(--muted); pointer-events: none; }
.search input { height: 44px; width: 100%; padding: 0 14px 0 40px; border-radius: 22px; border: 1px solid var(--field); background: var(--surface); font-size: 14px; }
fieldset { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--field); font-size: 14px; background: var(--surface); }
.check input, .cbx { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }

/* switch: a real checkbox styled as a toggle */
.switch { position: relative; display: inline-flex; flex: 0 0 auto; width: 52px; height: 32px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 16px; background: #D3D6D1; transition: background .15s; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 13px; background: #fff; transition: transform .15s, background .15s; }
.switch input:checked + span { background: var(--ink); }
.switch input:checked + span::after { transform: translateX(20px); background: var(--accent); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch.small { width: 44px; height: 26px; }
.switch.small span::after { width: 20px; height: 20px; }
.switch.small input:checked + span::after { transform: translateX(18px); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; border-top: 1px solid var(--line-2); }
.toggle-row .txt { display: flex; flex-direction: column; gap: 2px; }
.toggle-row b { font-size: 14px; }
.toggle-row small { font-size: 12px; color: var(--muted); }

/* ---------- cards, badges, avatars ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card-pad { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.card-head h2, .card h2 { font-size: 17px; font-weight: 700; }
.card-head p { font-size: 13px; color: var(--muted); margin-top: 4px; }
.eyebrow { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: 0.12em; color: var(--muted); text-transform: uppercase; }
.badge { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: #E4E6E2; color: var(--text-2); white-space: nowrap; }
.st-confirmed { background: var(--blue-bg); color: var(--blue-text); }
.st-checked { background: var(--accent-soft); color: #7A2C08; }
.st-chair { background: var(--accent); color: var(--ink); }
.st-done { background: #E4E6E2; color: var(--text-2); }
.st-noshow, .badge.warn { background: var(--red-bg); color: var(--red-text); }
.st-cancelled { background: transparent; border: 1px solid var(--field); color: var(--muted); }
.badge.new { background: var(--blue-bg); color: var(--blue-text); }
.badge.soft { background: var(--accent-soft); color: #7A2C08; }
.badge.dark { background: var(--ink); color: var(--on-ink); }
.avatar { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; background: var(--field); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }
.avatar.lg { width: 48px; height: 48px; font-size: 15px; }
.avatar.xl { width: 56px; height: 56px; font-size: 18px; font-stretch: 115%; }
.avatar.ink { background: var(--ink); color: var(--accent); }
.stat-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat-tile { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--paper); }
.stat-tile b { font-family: var(--mono); font-size: 18px; font-weight: 600; }
.stat-tile span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.stat-tile { min-width: 0; overflow: hidden; }
.kv { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.list-row { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.list-row:last-child { border-bottom: 0; }
.empty { padding: 32px 20px; text-align: center; color: var(--muted); font-size: 14px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; padding: 14px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td, .table tbody th { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody th { text-align: left; font-family: var(--font); font-size: 14px; letter-spacing: 0; color: var(--text); text-transform: none; font-weight: 600; }
.table th:first-child, .table td:first-child { padding-left: 18px; }
.table th:last-child, .table td:last-child { padding-right: 18px; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.clickable:hover { background: var(--surface-2); }
.table tbody tr.selected { background: var(--accent-row); }
.table .group-row th { background: var(--surface-2); padding: 10px 18px; font-size: 13px; font-weight: 700; color: var(--text); text-transform: none; letter-spacing: 0; font-family: var(--font); }
.table tfoot td, .table tfoot th { font-weight: 700; padding: 12px; border-bottom: 0; }
.who { display: flex; align-items: center; gap: 10px; }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; font-size: 13px; color: var(--muted); }

/* ---------- calendar ---------- */
.legend { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; color: var(--text-2); }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.cal { overflow-x: auto; }
.cal-inner { min-width: 680px; }
.cal-head, .cal-body { display: grid; grid-template-columns: 56px repeat(var(--cols), minmax(150px, 1fr)); }
.cal-head { border-bottom: 1px solid var(--line); }
.cal-head .who { height: 64px; padding: 0 12px; border-left: 1px solid var(--line-2); }
.cal-head .who b { font-size: 14px; display: block; }
.cal-head .who small { font-size: 12px; color: var(--muted); }
.cal-body { position: relative; }
.cal-gutter { position: relative; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.cal-gutter span { position: absolute; right: 8px; }
.cal-col { position: relative; border-left: 1px solid var(--line-2); background-image: repeating-linear-gradient(to bottom, var(--line-2) 0 1px, transparent 1px var(--hour)); cursor: copy; }
.ev { position: absolute; left: 4px; right: 4px; box-sizing: border-box; padding: 5px 8px; border-radius: 8px; overflow: hidden; font-size: 12px; line-height: 16px; border: 0; text-align: left; cursor: pointer; color: var(--blue-text); background: var(--blue-bg); }
.ev.compact { white-space: nowrap; text-overflow: ellipsis; }
.ev.tiny { padding: 1px 8px; font-size: 11px; border-radius: 6px; }
.ev.st-done { background: var(--done-bg); color: var(--text-2); }
.ev.st-chair { background: var(--accent); color: var(--ink); }
.ev.st-checked { background: var(--accent-soft); color: #7A2C08; }
.ev.st-noshow { background: var(--red-bg); color: var(--red-text); }
.ev.st-cancelled { background: var(--surface); border: 1px dashed var(--field); color: var(--muted); text-decoration: line-through; }
.ev.selected { outline: 2px solid var(--ink); outline-offset: -2px; }
.ev:hover { filter: brightness(0.97); }
.hatch { position: absolute; left: 4px; right: 4px; border-radius: 8px; padding: 5px 8px; font-size: 12px; color: var(--muted); background: repeating-linear-gradient(135deg, var(--line-2) 0 6px, #fff 6px 12px); pointer-events: none; }
.now-line { position: absolute; left: 56px; right: 0; height: 2px; background: var(--accent); pointer-events: none; z-index: 2; }
.now-chip { position: absolute; left: 4px; padding: 1px 4px; border-radius: 4px; background: var(--accent); color: var(--ink); font-family: var(--mono); font-size: 11px; font-weight: 600; line-height: 16px; z-index: 2; }
.closed-day { padding: 64px 20px; text-align: center; color: var(--muted); }
.activity { display: flex; flex-direction: column; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.activity .list-row { border: 0; padding: 0; }

/* ---------- staff week table ---------- */
.hours-cell { display: block; padding: 8px 0; border-radius: 8px; background: var(--paper); text-align: center; font-family: var(--mono); font-size: 13px; }
.hours-cell.today { background: var(--accent-soft); font-weight: 600; }
.hours-cell.off { background: none; color: var(--muted); }
.hours-cell.away { background: repeating-linear-gradient(135deg, var(--line-2) 0 6px, #fff 6px 12px); color: var(--text-2); }
th.today-col { color: var(--accent-text) !important; border-bottom: 2px solid var(--accent) !important; }
.staff-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; }

/* ---------- reports ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 16px; }
.kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.kpi span { font-size: 13px; color: var(--muted); }
.kpi b { font-family: var(--mono); font-size: 30px; line-height: 1.1; font-weight: 600; }
.kpi small { font-size: 13px; color: var(--text-2); }
.chart { display: flex; gap: 8px; padding-top: 44px; }
.chart-y { position: relative; flex: 0 0 28px; height: 180px; font-family: var(--mono); font-size: 11px; color: var(--muted); text-align: right; }
.chart-y span { position: absolute; right: 0; transform: translateY(50%); }
.chart-plot { position: relative; height: 180px; display: flex; align-items: flex-end; gap: 2px; border-bottom: 1px solid #C9CCC7; }
.chart-grid { position: absolute; left: 0; right: 0; height: 1px; background: var(--line-2); pointer-events: none; }
.bar { position: relative; flex: 1 1 0; min-width: 6px; height: 100%; display: flex; align-items: flex-end; border: 0; padding: 0; background: none; cursor: default; }
.bar i { display: block; width: 100%; border-radius: 4px 4px 0 0; background: var(--text-2); }
.bar.hl i { background: var(--accent); }
.bar:hover i, .bar:focus-visible i { background: var(--ink); }
.bar.hl:hover i { background: #E85A1E; }
.bar .tip { display: none; position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); padding: 6px 10px; border-radius: 8px; background: var(--ink); color: var(--on-ink); font-size: 12px; line-height: 16px; white-space: nowrap; z-index: 3; pointer-events: none; }
.bar:hover .tip, .bar:focus-visible .tip { display: block; }
.bar.tl .tip { left: 0; transform: none; }
.bar.tr .tip { left: auto; right: 0; transform: none; }
.chart-x { display: flex; gap: 2px; font-family: var(--mono); font-size: 11px; color: var(--muted); margin-left: 36px; }
.chart-x span { flex: 1 1 0; min-width: 6px; text-align: center; }
.hbar { display: flex; flex-direction: column; gap: 5px; }
.hbar .top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.hbar .track { display: block; height: 10px; border-radius: 0 4px 4px 0; background: var(--line-2); }
.hbar .fill { height: 10px; border-radius: 0 4px 4px 0; background: var(--text-2); }
.meter { display: flex; align-items: center; gap: 10px; }
.meter .track { flex: 0 0 120px; height: 8px; border-radius: 4px; background: var(--line-2); display: flex; }
.meter .fill { border-radius: 4px; background: var(--text-2); }

/* ---------- settings ---------- */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(480px, 100%), 1fr)); gap: 20px; align-items: start; }
.settings-grid section { scroll-margin-top: 16px; }
.hours-row { display: grid; grid-template-columns: 96px 52px minmax(0, 1fr) 12px minmax(0, 1fr); align-items: center; gap: 10px; min-height: 52px; border-bottom: 1px solid var(--line-2); }
.hours-row .dash { text-align: center; color: var(--muted); }
.jump { display: flex; flex-wrap: wrap; gap: 8px; }
.jump a { display: inline-flex; align-items: center; height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid var(--field); background: var(--surface); font-size: 14px; }
.jump a:hover { border-color: var(--ink); }
.logo-drop { flex: 0 0 auto; width: 88px; height: 88px; border-radius: 16px; border: 1px dashed #A9AEA9; background: var(--surface-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--text-2); overflow: hidden; }
.logo-drop img { width: 100%; height: 100%; object-fit: cover; }
.note-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: 13px; color: var(--text-2); }
.save-bar { position: sticky; bottom: 0; z-index: 5; display: none; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-radius: 14px; background: var(--ink); color: var(--on-ink); box-shadow: 0 8px 24px rgba(17, 20, 19, 0.2); }
.save-bar.show { display: flex; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: var(--ink); }
.login-card { width: 100%; max-width: 400px; padding: 32px; border-radius: 24px; background: var(--surface); display: flex; flex-direction: column; gap: 20px; }
.login-card .wordmark b { font-size: 26px; }
.login-card .wordmark small { color: var(--muted); }
.demo-hint { font-size: 13px; color: var(--text-2); padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }

/* ---------- modal & toast ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(17, 20, 19, 0.45); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow-y: auto; }
.modal { width: 100%; max-width: 480px; border-radius: 20px; background: var(--surface); box-shadow: 0 20px 60px rgba(17, 20, 19, 0.25); }
.modal-wide { max-width: 640px; }
.modal-form { display: flex; flex-direction: column; gap: 16px; padding: 22px 24px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-head h2 { font-size: 19px; font-weight: 700; }
.modal-head .btn-icon { border: 0; }
.modal-body { display: flex; flex-direction: column; gap: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.form-error { font-size: 14px; color: var(--red-text); background: var(--red-bg); padding: 10px 12px; border-radius: 10px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; }
.slots label { position: relative; }
.slots input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.slots span { display: flex; align-items: center; justify-content: center; height: 40px; border-radius: 10px; border: 1px solid var(--field); font-family: var(--mono); font-size: 14px; }
.slots input:checked + span { background: var(--ink); color: var(--on-ink); border-color: var(--ink); font-weight: 600; }
.slots input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 60; padding: 12px 18px; border-radius: 12px; background: var(--ink); color: var(--on-ink); font-size: 14px; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-error { background: var(--red-text); }
.loading { padding: 48px; text-align: center; color: var(--muted); }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .sidebar { position: static; height: auto; flex: none; padding: 12px; gap: 12px; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .nav { flex-direction: row; overflow-x: auto; flex: 1 1 100%; order: 3; }
  .nav a { flex: 0 0 auto; }
  .sidebar-foot { margin: 0 0 0 auto; flex-direction: row; align-items: center; }
  .sidebar-foot .side-link:first-child, .me span, .demo-flag { display: none; }
  .main { padding: 16px; }
  .grid-2, .grid-3, .checks { grid-template-columns: minmax(0, 1fr); }
  .hours-row { grid-template-columns: 80px 52px minmax(0, 1fr) 10px minmax(0, 1fr); gap: 6px; }
}
