/* Layout concept: a dispatch-board roster. One row per person, one column per system. */
:root {
  --bg: #eef2f4; --surface: #ffffff; --surface-2: #e3e9ed; --ink: #15242e; --muted: #526470; --line: #cdd7dd;
  --brand: #123a50; --brand-ink: #ffffff; --accent: #0b6e8f;
  --ok: #17693f; --ok-bg: #dcf1e5; --warn: #8a5300; --warn-bg: #fbecd0; --bad: #a3231f; --bad-bg: #fae1df; --off: #55626b; --off-bg: #e3e7ea;
  --display: "Inter", "Segoe UI", system-ui, Arial, sans-serif;
  --body: "Inter", "Segoe UI", system-ui, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0f1a21; --surface: #17252e; --surface-2: #203340; --ink: #e8eff3; --muted: #9fb1bc; --line: #2d4351;
  --brand: #0b2533; --brand-ink: #f2f7fa; --accent: #5cc0e0;
  --ok: #7ddba6; --ok-bg: #143727; --warn: #f2c26b; --warn-bg: #3d2d10; --bad: #ff9d97; --bad-bg: #431b19; --off: #a9b6be; --off-bg: #2a3944; color-scheme: dark;
} }
:root[data-theme="dark"] {
  --bg: #0f1a21; --surface: #17252e; --surface-2: #203340; --ink: #e8eff3; --muted: #9fb1bc; --line: #2d4351;
  --brand: #0b2533; --brand-ink: #f2f7fa; --accent: #5cc0e0;
  --ok: #7ddba6; --ok-bg: #143727; --warn: #f2c26b; --warn-bg: #3d2d10; --bad: #ff9d97; --bad-bg: #431b19; --off: #a9b6be; --off-bg: #2a3944; color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.45 var(--body); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; line-height: 1.15; text-wrap: balance; }
h1 { font-size: 30px; } h2 { font-size: 21px; } h3 { font-size: 17px; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mono { font-family: var(--body); font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: .01em; } /* codes, times and IDs: Inter with even-width digits */
.muted { color: var(--muted); }
.small { font-size: 13px; }

.top { background: var(--brand); color: var(--brand-ink); padding-block: 10px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
.brand { font: 700 20px var(--display); letter-spacing: .02em; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.nav a { color: inherit; text-decoration: none; padding: 5px 10px; border-radius: 4px; font-weight: 500; }
.nav a:hover { background: rgba(255,255,255,.12); }
.nav a.on { background: rgba(255,255,255,.2); }
.who { display: flex; gap: 10px; align-items: center; font-size: 13px; flex-wrap: wrap; }
.linkbtn { background: none; border: 1px solid rgba(255,255,255,.5); color: inherit; border-radius: 4px; padding: 3px 9px; cursor: pointer; }
.count { display: inline-block; background: #b3261e; color: #fff; border-radius: 9px; min-width: 18px; padding: 0 5px; margin-left: 5px; text-align: center; font-size: 12px; line-height: 18px; }

main { max-width: 1180px; margin: 0 auto; padding-block: 20px 48px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: grid; gap: 18px; }
.head { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: end; justify-content: space-between; }
.tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
input[type=search], input[type=text], input[type=email], input[type=password], select, textarea { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 8px 10px; max-width: 100%; }
#q { width: 280px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 6px 10px; cursor: pointer; }
.chip[aria-pressed=true] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.tablewrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th { text-align: left; font: 600 13px var(--display); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tr.row { cursor: pointer; }
tr.row:hover td { background: var(--surface-2); }
.pname a { font-weight: 600; color: inherit; text-decoration: none; }
.pname a:hover { text-decoration: underline; }
.flagtxt { font-size: 13px; margin-top: 2px; color: var(--muted); }
.flagtxt.critical { color: var(--bad); font-weight: 500; }

.pill { display: inline-block; font-size: 12.5px; font-weight: 600; border-radius: 3px; padding: 1px 7px; white-space: nowrap; }
.pill.active, .pill.onboarding, .pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.terminated, .pill.critical { background: var(--bad-bg); color: var(--bad); }
.pill.inactive, .pill.deactivated, .pill.removed, .pill.unknown { background: var(--off-bg); color: var(--off); }
.pill.none { background: transparent; color: var(--warn); border: 1px dashed var(--warn); }
.pill.warning { background: var(--warn-bg); color: var(--warn); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 16px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.back { font-size: 14px; text-decoration: none; }
.issues { display: grid; gap: 8px; }
.issue { border-left: 4px solid var(--warn); background: var(--warn-bg); padding: 9px 12px; border-radius: 0 4px 4px 0; }
.issue.critical { border-color: var(--bad); background: var(--bad-bg); }
.issue strong { display: block; }
.clear { color: var(--ok); font-weight: 500; }
.syshead { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
dl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 4px 10px; margin: 0; font-size: 14px; }
dt { color: var(--muted); } dd { margin: 0; overflow-wrap: anywhere; }
.restricted { font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px; }

.thread { display: grid; gap: 6px; max-height: 300px; overflow-y: auto; }
.msg { max-width: 82%; padding: 7px 10px; border-radius: 6px; background: var(--surface-2); justify-self: start; }
.msg.out { justify-self: end; background: var(--ok-bg); }
.msg small { display: block; color: var(--muted); font-size: 12px; }
.btn { background: var(--accent); color: var(--surface); border: 0; border-radius: 4px; padding: 8px 14px; font-weight: 600; cursor: pointer; }
.btn.alt { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.row-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row-form > input, .row-form > textarea, .row-form > select { flex: 1 1 200px; min-width: 0; }
.notice { padding: 9px 12px; border-radius: 4px; background: var(--surface-2); font-size: 14px; }
.notice.error { background: var(--bad-bg); color: var(--bad); }
.notice.good { background: var(--ok-bg); color: var(--ok); }
.preview { background: var(--warn-bg); color: var(--warn); padding-block: 8px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-weight: 500; }
.login { max-width: 380px; margin: 9vh auto 0; padding-inline: 16px; }
.login form { display: grid; gap: 12px; }
label { display: grid; gap: 4px; font-weight: 500; font-size: 14px; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
@media (max-width: 640px) { #q { width: 100%; } .tools { width: 100%; } h1 { font-size: 26px; } }

.stats { display: flex; flex-wrap: wrap; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.stat { background: var(--surface); padding: 9px 14px; flex: 1 1 96px; display: grid; }
.stat b { font: 600 25px/1.1 var(--display); font-variant-numeric: tabular-nums; }
.stat span { font-size: 12.5px; color: var(--muted); }
.stat.warn b { color: var(--warn); } .stat.bad b { color: var(--bad); }
tr.hot td:first-child { box-shadow: inset 4px 0 0 var(--bad); }
.flagtxt.warning { color: var(--warn); }
td select { padding: 4px 6px; max-width: 150px; }
.btn.tiny { padding: 4px 9px; font-size: 13px; font-weight: 500; }
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.upload { display: grid; gap: 6px; }
.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: 3px; font-size: 14px; }
.pill.scheduled, .pill.checked_in, .pill.on_road, .pill.returned, .pill.tier-fantasticplus, .pill.tier-fantastic, .pill.tier-great { background: var(--ok-bg); color: var(--ok); }
.pill.call_out, .pill.tier-fair { background: var(--warn-bg); color: var(--warn); }
.pill.no_show, .pill.tier-poor { background: var(--bad-bg); color: var(--bad); }
.up { color: var(--ok); } .down { color: var(--bad); }
td.miss { color: var(--bad); font-weight: 600; }
.warntxt { color: var(--warn); font-weight: 500; }
h3.big { font-size: 17px; }
.msgtxt { white-space: pre-wrap; overflow-wrap: anywhere; font: 400 14px/1.45 var(--body); margin: 0; background: var(--surface-2); padding: 9px 11px; border-radius: 4px; }
textarea { width: 100%; }

.panel p, .head p { margin: 0; }
.head p { margin-top: 3px; }
.failtxt { color: var(--bad); }
@media (max-width: 640px) { .board th:nth-child(2), .board td:nth-child(2), .board th:nth-child(3), .board td:nth-child(3) { display: none; } .board td, .board th { padding: 8px; } .board td select { max-width: 104px; } }

.linkbtn { text-decoration: none; font-size: 13px; }
.pwpanel { max-width: 420px; }
.login-form { display: grid; gap: 12px; }

.setup { max-width: 520px; }
.qr svg { display: block; width: 220px; height: 220px; background: #fff; border-radius: 4px; }

.sched th.num, .sched td.num { text-align: center; min-width: 58px; }
.sched th.today, .sched td.today { background: var(--surface-2); }
.sched tr.total td { border-top: 2px solid var(--line); }
.sched tr.sep td { font: 600 13px var(--display); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding-top: 16px; }
.cell { font: 600 16px var(--body); font-variant-numeric: tabular-nums; background: none; border: 1px solid transparent; border-radius: 4px; padding: 3px 10px; cursor: pointer; color: var(--accent); }
.cell:hover, .cell.on { border-color: var(--accent); background: var(--surface); }
.plain.cols { columns: 3 220px; display: block; }
.plain.cols li { break-inside: avoid; padding: 2px 0; }

.sched .rt { font: 600 16px var(--body); font-variant-numeric: tabular-nums; }
.sched .waves { display: grid; gap: 1px; font-size: 11.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.sched .waves b { color: var(--ink); font-weight: 600; }
.sched .neg { color: var(--bad); }

.sched td.lbl { color: var(--muted); font-size: 13.5px; white-space: nowrap; padding-left: 22px; }
.sched tr.cyc td { background: var(--surface-2); border-top: 2px solid var(--line); padding-block: 7px; font-size: 15px; }
.sched tr.cyc:first-child td { border-top: 0; }
.sched tr.cyc td strong { font: 600 16px var(--display); letter-spacing: .02em; }
.sched tr.tot td { font-variant-numeric: tabular-nums; }
.sched tr.tot td strong { font-size: 16px; }
.sched tr.gaprow td { border-bottom: 0; padding-top: 4px; }
.gap { display: inline-block; min-width: 44px; padding: 2px 8px; border-radius: 4px; font: 600 14px var(--body); font-variant-numeric: tabular-nums; }
.gap.short { background: var(--bad-bg); color: var(--bad); }
.gap.over { background: var(--ok-bg); color: var(--ok); }
.gap.even { background: var(--surface-2); color: var(--muted); }
.sched th.today, .sched td.today { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.sched tr.cyc td.today { background: var(--surface-2); }
.sched td { vertical-align: middle; }

.syncbtn { background: var(--surface); color: var(--ink); border: 0; border-radius: 4px; padding: 4px 11px; font-weight: 600; font-size: 13px; cursor: pointer; }
.syncbtn:disabled { opacity: .7; cursor: progress; }
.toast { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); max-width: min(460px, calc(100% - 32px)); padding: 11px 14px; border-radius: 6px; font-size: 14px; box-shadow: 0 4px 16px rgba(0,0,0,.2); z-index: 20; }
.toast.good { background: var(--ok-bg); color: var(--ok); }
.toast.error { background: var(--bad-bg); color: var(--bad); }

.hrs { font-size: 12.5px; margin-top: 2px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hrs.warn { color: var(--warn); font-weight: 600; }
.hrs.over { color: var(--bad); font-weight: 600; }
.whc td.num { text-align: center; min-width: 64px; }
.whc .roll { font: 600 15px var(--body); font-variant-numeric: tabular-nums; }
.whc .day { font-size: 11.5px; color: var(--muted); }
.whc td.warn { background: var(--warn-bg); }
.whc td.warn .roll { color: var(--warn); }
.whc td.over { background: var(--bad-bg); }
.whc td.over .roll { color: var(--bad); }
.whc td.off .roll { color: var(--muted); font-weight: 400; }
.whc .day.long { color: var(--bad); font-weight: 700; }
.livebadge { font-size: 12px; padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,.12); white-space: nowrap; }
.livebadge.on::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #3ddc84; margin-right: 6px; vertical-align: 1px; }
.livebadge.off { opacity: .75; }
.uploadbox { display: grid; gap: 8px; }

/* Break match: one full-width card per driver, table beside the text */
.bm-list { display: grid; gap: 14px; }
.bm-card { padding: 14px 16px; }
.bm-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.bm-head h3 { margin: 0; }
.bm-body { display: grid; gap: 14px; }
.bm-body > * { min-width: 0; }
.bm-table { font-size: 13px; width: 100%; }
.bm-table td, .bm-table th { vertical-align: top; padding: 7px 10px; }
.bm-table .nowrap { white-space: nowrap; }
.bm-text { display: grid; gap: 8px; }
.bm-text .msgtxt { font-size: 13px; }
/* Each text with its buttons beside it; stacked on phones. */
.bm-msg { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 14px; align-items: start; border-top: 1px solid var(--line); padding-top: 12px; }
.bm-msg .msgtxt { margin: 0; white-space: pre-wrap; }
.bm-actions { display: grid; gap: 8px; align-content: start; }
.bm-actions .btn { width: 100%; }
@media (max-width: 720px) { .bm-msg { grid-template-columns: minmax(0, 1fr); } }
.bm-table .bm-issue { min-width: 150px; }

/* Payroll audit */
.audit-grid td.hit { background: var(--bad-bg, #fde2e1); color: var(--bad, #b42318); font-weight: 700; }
.audit-grid th.num, .audit-grid td.num { min-width: 2.2em; }
.audit-rules td:first-child { width: 2.5em; }

/* Clickable stat tiles (filters) */
button.stat.pick { border: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
button.stat.pick:hover { background: var(--off-bg); }
button.stat.pick[aria-pressed="true"] { box-shadow: inset 0 -3px 0 var(--ink, currentColor); background: var(--off-bg); }
button.stat.pick:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }

/* Payroll audit: rule counts jump to the rule's list */
button.pill.jump { border: 0; cursor: pointer; font: inherit; }
button.pill.jump:hover { text-decoration: underline; }
section.panel.flash { box-shadow: 0 0 0 3px var(--bad, #b42318); transition: box-shadow .3s; }
.audit-grid button.jump-x { border: 0; background: none; color: inherit; font: inherit; font-weight: 700; cursor: pointer; padding: 2px 6px; }
details.howto summary { cursor: pointer; color: var(--muted, #667); }
details.howto p { margin: 8px 0 0; }

/* Sortable table headers */
th .sortbtn { border: 0; background: none; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; padding: 0; white-space: nowrap; }
th .sortbtn:hover { text-decoration: underline; }
th[aria-sort="none"] .sortbtn span { opacity: .4; }
.whc .roll .day { font-weight: 400; margin-left: 2px; }
.whc .adpl { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; border-top: 1px solid var(--line, rgba(0,0,0,.08)); margin-top: 2px; padding-top: 2px; }
.whc .adpl.warn { color: var(--warn); font-weight: 600; }
.whc .adpl.over { color: var(--bad); font-weight: 700; }
.whc td.hit { background: var(--bad-bg); box-shadow: inset 0 0 0 2px var(--bad); }
.whc td.hit .hitline, .whc td.hit .hitline .day { color: var(--bad); font-weight: 700; }
.whc .hitwhy { font-size: 10.5px; color: var(--bad); font-weight: 700; margin-top: 2px; line-height: 1.2; }
.sortbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sortbar button[aria-pressed="true"] { font-weight: 700; }
.udx { padding: 12px 16px; }
.udx .bm-head { margin-bottom: 4px; }
.udx-one { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.adp-up { padding: 10px 14px; }
.adp-up .uploadbox { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------- Refresh (Nov 2026): Inter, wider page, lighter surfaces, fewer borders. Navy stays as the brand. ---------- */
:root {
  --display: "Inter", "Segoe UI", system-ui, Arial, sans-serif;
  --body: "Inter", "Segoe UI", system-ui, Arial, sans-serif;
  --radius: 10px;
}
:root {
  --bg: #f5f7f9; --surface: #ffffff; --surface-2: #f0f3f6; --ink: #14212b; --muted: #5d6c77; --line: #e2e7eb;
  --brand: #123a50; --accent: #0f5f7d; --off-bg: #eef1f4;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --line: #263a47; } }
body { font: 400 14.5px/1.5 var(--body); -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
h1, h2, h3 { font-family: var(--display); font-weight: 650; letter-spacing: -0.015em; }
h1 { font-size: 26px; } h2 { font-size: 18px; } h3 { font-size: 15.5px; }
main { max-width: 1440px; gap: 16px; padding-block: 24px 56px; }

/* Top bar: same navy, quieter links */
.brand { font: 700 18px var(--display); letter-spacing: -0.01em; }
.nav a { font-size: 13.5px; padding: 6px 10px; border-radius: 6px; }
.linkbtn { border-radius: 6px; }

/* Panels: one soft card, no heavy lines */
.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); gap: 12px; }
.panel .tablewrap, .bm-body .tablewrap { border: 0; border-radius: 0; background: transparent; }
.tablewrap { border-radius: var(--radius); }
th { font: 600 11.5px var(--display); letter-spacing: .04em; color: var(--muted); padding: 10px 12px; }
td { padding: 10px 12px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }

/* Tiles: one row, no dividers between numbers */
.stats { gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.stat { background: transparent; padding: 12px 16px; flex: 1 1 110px; gap: 2px; }
.stat b { font: 650 24px/1.1 var(--display); letter-spacing: -0.02em; }
.stat span { font-size: 12px; line-height: 1.35; }
button.stat.pick { border-radius: 0; }
button.stat.pick:hover { background: var(--surface-2); }
button.stat.pick[aria-pressed="true"] { background: var(--surface-2); box-shadow: inset 0 -2px 0 var(--brand); }

/* Tabs and chips: rounded, navy when selected */
.chip { border-radius: 999px; padding: 6px 14px; font-size: 13.5px; font-weight: 500; border-color: var(--line); }
.chip[aria-pressed=true] { background: var(--brand); color: #fff; border-color: var(--brand); }

/* Buttons and labels */
.btn { background: var(--brand); color: #fff; border-radius: 8px; padding: 8px 15px; font-weight: 600; }
.btn:hover:not(:disabled) { filter: brightness(1.12); }
.btn.alt { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn.alt:hover:not(:disabled) { background: var(--surface-2); filter: none; }
.btn.tiny { border-radius: 6px; }
.pill { border-radius: 999px; padding: 2px 9px; font-size: 12px; }
.notice { border-radius: 8px; }
input[type=search], input[type=text], input[type=email], input[type=password], select, textarea { border-radius: 8px; }

/* Upload line and "loaded" note: plain lines, not boxes */
.adp-up { background: transparent; border: 0; box-shadow: none; padding: 0; }
.adp-up .uploadbox { gap: 12px; }
section.loaded { padding: 0 2px; }
section.loaded p { margin: 0; }

/* Driver cards */
.bm-card { padding: 18px 20px; }
.bm-head { margin-bottom: 6px; }
.bm-msg .msgtxt { background: var(--surface-2); border-radius: 8px; }
#udx-panel:empty { display: none; }
.adp-up .upload { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; color: var(--muted); }
.adp-up .upload input[type=file] { color: var(--ink); }
.adp-up .row-form { gap: 10px; }

/* ---------- Navy header with centered menu and account menu; white page (Nov 2026) ---------- */
:root { --bg: #f3f6fa; --surface: #ffffff; --line: #e4e9f0; --card-shadow: 0 1px 2px rgba(18, 58, 80, .05), 0 2px 8px rgba(18, 58, 80, .06); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --card-shadow: none; } }
:root[data-theme="dark"] { --card-shadow: none; }
.panel, .stats, main > .tablewrap { box-shadow: var(--card-shadow); }
.panel.adp-up { box-shadow: none; background: transparent; border: 0; }
.top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px 20px; padding-block: 8px; position: sticky; top: 0; z-index: 15; }
.brand { justify-self: start; }
.nav { justify-content: center; flex: none; }
.who { justify-self: end; flex-wrap: nowrap; }
@media (max-width: 1180px) { .top { grid-template-columns: 1fr auto; } .nav { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; } }

.profile { position: relative; }
.profile summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 3px 8px 3px 3px; border-radius: 999px; border: 1px solid rgba(255,255,255,.35); user-select: none; }
.profile summary::-webkit-details-marker { display: none; }
.profile summary:hover, .profile[open] summary { background: rgba(255,255,255,.14); }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: #fff; color: var(--brand); display: grid; place-items: center; font-size: 12px; font-weight: 600; letter-spacing: .02em; }
.pname-top { font-size: 13.5px; font-weight: 500; }
.caret { font-size: 11px; opacity: .75; }
.profile-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 240px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(16, 24, 40, .12); padding: 6px; display: grid; z-index: 30; }
.profile-who { display: grid; gap: 2px; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; overflow-wrap: anywhere; }
.profile-menu a, .profile-menu button { display: block; text-align: left; padding: 8px 10px; border-radius: 6px; color: var(--ink); text-decoration: none; background: none; border: 0; font-size: 14px; cursor: pointer; width: 100%; }
.profile-menu a:hover, .profile-menu button:hover { background: var(--surface-2); }
@media (max-width: 640px) { .pname-top { display: none; } }

/* Schedule: one card per cycle */
.sched-list { display: grid; gap: 14px; }
.sched-card { gap: 8px; padding: 14px 18px 12px; }
.sched-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sched-title h2 { font-size: 17px; }
.sched-card .sched td.lbl { padding-left: 4px; width: 190px; }
.sched-card .sched thead th { padding-top: 4px; }
.sched-total { border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }
.sched-names { border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 8px; }
.sched-names h3 { font-size: 15px; }
.sched .target { font: 600 16px var(--body); font-variant-numeric: tabular-nums; color: var(--brand); }
.sched tr.targetrow td { background: color-mix(in srgb, var(--brand) 4%, transparent); }
.sched-tabs { margin-top: -4px; }
.sched tr.bycyc-head td { padding-top: 16px; font: 600 11.5px var(--display); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.sched tr.bycyc td { padding-block: 6px; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.linkish:hover { color: var(--brand); }
.profile-sep { border: 0; border-top: 1px solid var(--line); margin: 4px 2px; }
.profile-menu a.on { background: var(--surface-2); font-weight: 600; }
.profile-menu .profile-who strong { color: var(--ink); }
/* Sign-in: passkey button and remember-this-computer box */
.login .btn.wide { width: 100%; justify-content: center; margin: 4px 0 8px; }
.login .center { text-align: center; margin: 0 0 12px; }
.login label.check { display: flex; flex-direction: row; align-items: center; gap: 8px; font-weight: 400; font-size: 13px; }
.login label.check input { width: auto; margin: 0; }
/* Approve / deny one line of a driver's text */
.line-pick { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
/* Time card issues: filter drivers by their next text (initial, reminder, final notice) */
.stage-filter { display: flex; justify-content: flex-end; align-items: center; gap: 6px; flex-wrap: wrap; margin: 4px 0 10px; }
/* Attendance */
.att-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.att-grid h4, .panel h4 { margin: 4px 0 6px; font-weight: 600; }
.barrow { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; width: 100%; background: none; border: 0; padding: 4px 0; text-align: left; color: inherit; font: inherit; cursor: pointer; }
.barrow:disabled { cursor: default; }
.barrow[aria-pressed="true"] span:first-child { font-weight: 700; color: var(--accent); }
.barrow .bar { grid-column: 1 / -1; height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.barrow .bar span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.att-cols { display: flex; align-items: flex-end; gap: 6px; height: 140px; }
.att-cols > div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 2px; min-width: 0; }
.att-cols .col { width: 100%; max-width: 36px; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 2px; }
.att-cols.trend { height: 120px; }
.row-form.wrap { flex-wrap: wrap; }
/* Today → Callouts */
.card-callouts h2 { margin: 0; }
.co-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.co-sum > div { display: flex; align-items: baseline; gap: 8px; }
.co-sum b { font-size: 1.8rem; line-height: 1; }
.old-today > summary { cursor: pointer; }
.old-today[open] > summary { margin-bottom: 8px; }
label.check { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
label.check input { width: auto; margin: 0; }
/* Driver chat */
.chat-card h2 { margin: 0; }
.chat-grid { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 12px; min-height: 280px; }
@media (max-width: 760px) { .chat-grid { grid-template-columns: 1fr; } }
.chat-list { display: grid; align-content: start; gap: 2px; max-height: 420px; overflow-y: auto; border-right: 1px solid var(--line); padding-right: 8px; }
@media (max-width: 760px) { .chat-list { border-right: 0; padding-right: 0; max-height: 220px; } }
.chat-row { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; text-align: left; background: none; border: 0; border-radius: 6px; padding: 8px; color: inherit; font: inherit; cursor: pointer; }
.chat-row:hover, .chat-row.on { background: var(--surface-2); }
.chat-row .chat-last { grid-column: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-row > span:last-child { grid-column: 2; grid-row: 1; }
.chat-name { font-weight: 600; }
.chat-dot { background: #b42318; color: #fff; border-radius: 999px; font-size: 11px; padding: 0 6px; }
.chat-pane { display: grid; gap: 8px; align-content: start; min-width: 0; }
.chat-pane h3 { margin: 0; }
.empty-pane { place-content: center; text-align: center; }
.chat-msgs { display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow-y: auto; padding: 4px; }
.bubble { max-width: 78%; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.out { align-self: flex-end; background: var(--accent); color: #fff; }
.bubble.out .muted { color: rgba(255,255,255,.8); }
.bubble span { display: block; margin-top: 2px; }
.chat-send { display: flex; gap: 8px; align-items: flex-end; }
.chat-send textarea { flex: 1; }
.chat-pane textarea, .chat-pane select, .chat-pane input { font: inherit; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); width: 100%; }
@media (max-width: 760px) { .chat-pane textarea, .chat-pane input, .chat-pane select { font-size: 16px; } }
.row-form.inline { display: inline-flex; margin-left: 8px; }
input.w90 { width: 90px; }
td.up { color: #146c43; font-weight: 600; } td.down { color: #b42318; font-weight: 600; }
tr.muted td { color: var(--muted); }

.brand { display: flex; align-items: center; gap: 8px; }
.brand-logo { height: 30px; width: auto; display: block; }
.login-logo { display: grid; justify-items: center; gap: 4px; margin-bottom: 8px; }
.login-logo img { width: min(260px, 80%); height: auto; display: block; }
.login-ops { font-size: 1rem; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }

.route-sheet .dev { width: 9em; font: inherit; padding: 4px 6px; }
.route-sheet .dev.bad, .route-sheet select.bad { outline: 2px solid var(--bad, #b42318); }
.route-sheet th.c, .route-sheet td.c { text-align: center; }
.route-sheet td.c input { width: 20px; height: 20px; }

.chat-send .attach { position: relative; overflow: hidden; font-size: 1.1rem; align-self: stretch; display: grid; place-items: center; }
.chat-send .attach input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.chat-send .attach.busy { opacity: .5; pointer-events: none; }
.chat-img { display: block; max-width: 260px; max-height: 280px; border-radius: 10px; margin-bottom: 4px; }
.chat-file { display: inline-block; padding: 8px 10px; background: rgba(0,0,0,.06); border-radius: 8px; color: inherit; text-decoration: none; font-weight: 600; margin-bottom: 4px; }
.chat-file small { font-weight: 400; opacity: .7; }
.daynav { display: inline-flex; align-items: center; gap: 6px; }
.daynav [data-dstep="-1"], .daynav [data-dstep="1"] { font-size: 1.15rem; line-height: 1; min-width: 34px; padding: 6px 8px; }
.btn.danger { color: #b42318; border-color: #f1b8b2; }
.btn.danger:hover { background: #fdecea; }
/* Work hours: each day cell = two aligned lines (Flex, ADP): label · that day's hours · 7-day total */
.whc td.num { min-width: 108px; padding: 6px 6px; vertical-align: middle; }
.whc td.num.off { vertical-align: middle; }
.whc .wh { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; line-height: 1.25; padding: 2px 0; text-align: left; }
.whc .wh + .wh { border-top: 1px dashed var(--line, rgba(0,0,0,.12)); margin-top: 3px; padding-top: 4px; }
.whc .src, .wh-demo .src { font-size: 9.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; border-radius: 4px; padding: 1px 0; text-align: center; }
.whc .src.flex, .wh-demo .src.flex { background: #e3ecf7; color: #1d4f91; }
.whc .src.adp, .wh-demo .src.adp { background: #ece7f6; color: #5b3a94; }
.whc .dh, .wh-demo .dh { font-size: 12.5px; color: var(--ink, inherit); }
.whc .dh.long { color: var(--bad); font-weight: 700; }
.whc .wk, .wh-demo .wk { font-size: 13px; font-weight: 700; min-width: 36px; text-align: right; }
.whc .wk.warn { color: var(--warn); } .whc .wk.over { color: var(--bad); }
.whc td.off .wh .dh { color: var(--muted); }
.whc td.hit .wh.hitline .dh, .whc td.hit .wh.hitline .wk { color: var(--bad); font-weight: 800; }
.whc .hitwhy { text-align: center; margin-top: 4px; }
.wh-key { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 4px 0 10px; }
.wh-demo { display: inline-grid; grid-template-columns: 34px auto auto; gap: 6px; align-items: center; padding: 4px 8px; border: 1px solid var(--line, #dfe5ec); border-radius: 8px; background: var(--surface); font-variant-numeric: tabular-nums; }
.wh-chip { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.wh-chip.warn { background: var(--warn-bg); color: var(--warn); } .wh-chip.over { background: var(--bad-bg); color: var(--bad); } .wh-chip.hit { background: var(--bad-bg); color: var(--bad); box-shadow: inset 0 0 0 2px var(--bad); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .whc .src.flex, :root:not([data-theme="light"]) .wh-demo .src.flex { background: #1c3352; color: #9cc3f5; } :root:not([data-theme="light"]) .whc .src.adp, :root:not([data-theme="light"]) .wh-demo .src.adp { background: #2e2447; color: #c7b3f0; } }
.whc td.num, .whc thead th.num { border-left: 1px solid var(--line); padding-left: 10px; padding-right: 10px; }
.whc td.num { min-width: 118px; }
.whc .wh { grid-template-columns: 34px 1fr auto; column-gap: 8px; }
.whc .wh-sub { display: grid; grid-template-columns: 34px 1fr auto; column-gap: 8px; margin-top: 3px; font-size: 9.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); text-align: left; }
.whc .wh-sub span:first-child { grid-column: 2; } .whc .wh-sub span:last-child { text-align: right; }
.whc tbody tr:nth-child(even) td:not(.warn):not(.over):not(.hit) { background: color-mix(in srgb, var(--surface-2) 35%, transparent); }
.whc .wh-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 3px; }
.whc .wh-st { font-size: 10.5px; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; line-height: 17px; }
.whc .wh.wh-tot { grid-template-columns: 34px auto; justify-content: start; max-width: 120px; }
.whc .wh.wh-tot + .wh.wh-tot { border-top: 0; margin-top: 0; padding-top: 2px; }
.whc td.wh-iss { min-width: 170px; } .whc td.num { min-width: 104px; padding-left: 8px; padding-right: 8px; }
.whc td.pname { width: 200px; max-width: 220px; }
.whc .wh-name { display: block; white-space: normal; }
.whc .wh-name a, .whc .wh-name > span:first-child { white-space: normal; }
.whc .wh-st { display: inline-block; margin-left: 6px; vertical-align: 1px; white-space: nowrap; }
.whc td.pname .wh-name a { white-space: normal; }
.viewas-bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; padding: 8px 16px; background: #f7941d; color: #1d1300; font-size: 14px; }
.viewas-bar button { font: inherit; font-weight: 700; border: 0; border-radius: 8px; padding: 5px 12px; background: #243040; color: #fff; cursor: pointer; }
.profile-menu button[data-viewas].on { font-weight: 700; }
/* Today → Daily dispatch */
.daily-dispatch { padding: 0; overflow: hidden; }
.daily-dispatch .ds-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; padding: 16px 18px 6px; }
.daily-dispatch .ds-head p { margin: 4px 0 0; }
.ds-stats { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; padding: 8px 18px 14px; }
.ds-stat { background: var(--surface-2); border-radius: 10px; padding: 8px 12px; display: grid; gap: 1px; }
.ds-stat b { font-size: 20px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.ds-stat span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.ds-stat.brk b { color: var(--ok); }
.daily-dispatch .tablewrap { border-top: 1px solid var(--line); }
table.ds { width: 100%; }
table.ds th { background: var(--surface-2); position: sticky; top: 0; z-index: 1; }
table.ds td { padding: 8px 12px; vertical-align: middle; border-bottom: 1px solid var(--line); }
table.ds th.c, table.ds td.c { text-align: center; }
table.ds tbody tr:not(.ds-group):hover td { background: color-mix(in srgb, var(--accent) 5%, transparent); }
table.ds tr.ds-group td { background: #243040; color: #fff; padding: 6px 12px; border-bottom: 0; }
table.ds tr.ds-group span { font-weight: 700; font-size: 13px; letter-spacing: .02em; }
table.ds tr.ds-group em { font-style: normal; font-size: 12px; color: #c9d3dd; margin-left: 10px; }
table.ds tr.ds-group td { border-left: 4px solid #f7941d; }
.ds-name { font-weight: 600; } .ds-st { margin-left: 6px; font-size: 10.5px; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; line-height: 17px; display: inline-block; }
.ds-time { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 500; }
.ds-route { display: inline-block; font-weight: 700; font-variant-numeric: tabular-nums; background: var(--surface-2); border-radius: 6px; padding: 2px 8px; white-space: nowrap; }
.daily-dispatch select, .daily-dispatch .dev { font: inherit; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.daily-dispatch .dev { width: 8.5em; }
.daily-dispatch .dev.bad, .daily-dispatch select.bad, .daily-dispatch input.bad { outline: 2px solid var(--bad); }
.ds-pill { display: inline-block; min-width: 44px; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.ds-pill.yes { background: var(--ok-bg); color: var(--ok); } .ds-pill.no { background: var(--bad-bg); color: var(--bad); } .ds-pill.on { background: var(--warn-bg); color: var(--warn); } .ds-pill.none { color: var(--muted); }
.ds-sub { font-size: 11px; color: var(--muted); margin-top: 2px; white-space: nowrap; }
.ds-check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.ds-check input { width: 18px; height: 18px; accent-color: var(--ok); cursor: pointer; }
.ds-check span { font-size: 12.5px; font-weight: 600; min-width: 22px; text-align: left; color: var(--muted); }
.ds-check input:checked + span { color: var(--ok); }
@media (max-width: 900px) { .ds-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* Daily dispatch fits the page: no sideways scrolling */
.daily-dispatch .tablewrap { overflow-x: visible; }
table.ds { table-layout: auto; width: 100%; }
table.ds th { white-space: normal; line-height: 1.2; vertical-align: bottom; padding: 8px 8px; }
table.ds td { padding: 7px 8px; }
table.ds td.pname { min-width: 150px; }
table.ds .ds-route { white-space: normal; max-width: 150px; line-height: 1.35; }
.daily-dispatch select { width: 92px; padding: 4px 6px; }
.daily-dispatch .dev { width: 80px; padding: 4px 6px; }
.ds-time { font-size: 13.5px; }
@media (max-width: 1100px) { table.ds { font-size: 13px; } table.ds td.pname { min-width: 120px; } }
/* Today → No route today */
.no-route { padding: 0; overflow: hidden; }
.no-route .ds-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 18px 10px; }
.no-route .ds-head p { margin: 4px 0 0; }
.no-route .tablewrap { border-top: 1px solid var(--line); overflow-x: visible; }
.no-route select { font: inherit; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); min-width: 170px; }
.no-route td:first-child { border-left: 4px solid transparent; }
.no-route tr.nr-open td:first-child { border-left-color: #f7941d; }
.no-route tr.nr-rescuer td:first-child, .no-route tr.nr-trainer td:first-child { border-left-color: var(--ok); }
.no-route tr.nr-special td:first-child { border-left-color: var(--accent); }
.no-route tr.nr-sent_home td:first-child { border-left-color: var(--bad); }
.nr-count { font-size: 12.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.nr-count.open { background: var(--warn-bg); color: var(--warn); } .nr-count.done { background: var(--ok-bg); color: var(--ok); }
.nr-empty { padding: 0 18px 16px; margin: 0; }
.ds-type { max-width: 180px; white-space: normal; line-height: 1.25; }
.ds-stage { display: inline-block; font-weight: 700; color: #8a4b00; background: #fff1de; border-radius: 6px; padding: 2px 8px; white-space: nowrap; }
.daily-dispatch select.bad { outline: 2px solid var(--bad); background: var(--bad-bg); color: var(--bad); font-weight: 600; }
.ds-err { font-size: 11px; font-weight: 700; color: var(--bad); margin-top: 3px; white-space: nowrap; }
.daily-dispatch select { width: 150px; }
.ds-stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.pill.staff { background: #e8eefb; color: #1d4f91; }
.proof-links { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 4px; }
.proof-links a { font-weight: 600; font-size: 12px; background: var(--surface-2); border-radius: 999px; padding: 2px 9px; text-decoration: none; color: inherit; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.proof-chip { display: inline-block; font-weight: 600; font-size: 12px; background: var(--surface-2); border-radius: 999px; padding: 2px 9px; text-decoration: none; color: inherit; margin: 1px 0; }
.test-bar { position: sticky; top: 0; z-index: 31; text-align: center; padding: 6px 12px; background: repeating-linear-gradient(135deg, #7c3aed 0 14px, #6d28d9 14px 28px); color: #fff; font-weight: 700; font-size: 13px; letter-spacing: .02em; }
.ln-row input[data-lnt] { flex: 0 1 34%; } .ln-row input[data-lnu] { flex: 1 1 50%; } .ln-row { margin-bottom: 6px; }

/* Phone: works like an app when saved to the Home Screen. Tabs sit in a bar at the bottom,
   the header clears the iPhone clock bar, and typing in a box doesn't zoom the page. */
.nav .ni, .nav .ns { display: none; }
.top { padding-top: max(8px, env(safe-area-inset-top, 0px)); }
@media (max-width: 760px) {
  html { -webkit-text-size-adjust: 100%; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); -webkit-tap-highlight-color: transparent; }
  .top { grid-template-columns: 1fr auto; padding-bottom: 8px; }
  .nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; flex-wrap: nowrap; justify-content: flex-start; gap: 0; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
    background: var(--brand); border-top: 1px solid rgba(255,255,255,.12); padding: 4px max(4px, env(safe-area-inset-right, 0px)) calc(4px + env(safe-area-inset-bottom, 0px)) max(4px, env(safe-area-inset-left, 0px)); grid-column: auto; grid-row: auto; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: 0 0 auto; min-width: 68px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 6px 4px; border-radius: 10px; font-size: 11px; font-weight: 600; color: rgba(255,255,255,.72); }
  .nav a.on { color: #fff; background: rgba(255,255,255,.16); }
  .nav .ni { display: block; font-size: 21px; line-height: 1; }
  .nav .nl { display: none; }
  .nav .ns { display: block; white-space: nowrap; }
  .livebadge { font-size: 11px; }
  .syncbtn { padding: 6px 10px; }
  input, select, textarea { font-size: 16px; }
  .test-bar { font-size: 11px; padding: 4px 8px; }
}

/* Compliance: name search on each tab */
.cmp-search { display: flex; gap: 10px; align-items: center; margin: 0 0 12px; }
.cmp-search input { flex: 1; max-width: 420px; }
[hidden] { display: none !important; }

/* Message reactions (like iPhone Tapbacks) and the emoji picker */
.rx-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; align-items: center; }
.rx, .rx-add { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 1px 7px; font-size: 13px; line-height: 1.5; cursor: pointer; }
.rx.mine { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.rx-add { opacity: .55; font-size: 12px; }
.bubble:hover .rx-add, .rx-add:focus { opacity: 1; }
.rx-pick { display: flex; gap: 2px; margin-top: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 2px 6px; width: max-content; }
.rx-pick button, .emo-panel button { background: none; border: 0; font-size: 20px; line-height: 1; padding: 4px; cursor: pointer; border-radius: 8px; }
.rx-pick button:hover, .emo-panel button:hover { background: var(--surface-2); }
.emo-panel { display: grid; grid-template-columns: repeat(auto-fill, minmax(36px, 1fr)); gap: 2px; padding: 6px; margin-bottom: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); max-height: 160px; overflow-y: auto; }
.emo-btn { font-size: 18px; padding: 4px 8px; }
