/* =====================================================================
   Monoso Design System (MDS) · E-wallet Business Ledger
   Personality: professional, predictable, efficient. Emotion: confidence.
   Colour: shared MDS neutrals, one accent (Ledger blue #1D4ED8), status always icon + word.
   Type: Space Grotesk for titles and the key number (40 / 28 / 22); Inter for the rest (17 / 16 / 14, never under 13).
   Space: 4 8 12 16 20 24 32 48 · screen margin 20 · radius 8 12 16 pill · touch targets 48.
   ===================================================================== */
:root {
  --ground: #F7F8FA; --surface: #FFFFFF; --sunk: #EEF0F3;
  --ink: #14181F; --muted: #4B5563; --line: #E3E6EB; --line-strong: #C9CED6; --control: #7B8494;
  --accent: #1D4ED8; --accent-strong: #1E3A8A; --accent-soft: #EAF0FD; --on-accent: #FFFFFF;
  --good: #05603A; --good-soft: #E5F3EC;
  --attention: #7A2E00; --attention-soft: #FDF0E6;
  --emergency: #B42318; --emergency-soft: #FDECEB;
  --waiting: #374151; --waiting-soft: #EEF0F3;
  --cash-in: #05603A; --cash-in-bg: #E5F3EC; --cash-out: #5B21B6; --cash-out-bg: #F0EAFC; --adj: #374151; --adj-bg: #EEF0F3;
  --chart-1: #A9BEF3; --chart-2: #5B82E6; --chart-3: #1D4ED8;
  --shadow-1: 0 1px 2px rgba(20, 24, 31, .06), 0 1px 1px rgba(20, 24, 31, .04);
  --shadow-2: 0 12px 32px rgba(20, 24, 31, .14);
  --scrim: rgba(20, 24, 31, .5);
  --r-8: 8px; --r-12: 12px; --r-16: 16px; --r-pill: 999px;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", Inter, system-ui, sans-serif;
  /* Older names used across the app, mapped onto MDS so every screen follows the same system. */
  --surface-100: var(--ground); --surface-0: var(--surface); --surface-200: var(--sunk);
  --ink-muted: var(--muted); --ink-subtle: var(--muted); --line-faint: var(--line); --control-border: var(--control);
  --brand-600: var(--accent); --brand-800: var(--accent-strong); --brand-100: var(--accent-soft); --on-brand: var(--on-accent); --brand-partial: var(--chart-1);
  --focus-ring: var(--accent);
  --good-bg: var(--good-soft); --action-cash-in: var(--good);
  --warning: var(--attention); --warning-bg: var(--attention-soft); --danger: var(--emergency); --danger-bg: var(--emergency-soft);
  --seq-3: var(--chart-1); --seq-4: var(--chart-2); --seq-5: var(--chart-3);
  --shadow-selected: var(--shadow-1); --shadow-raised: var(--shadow-2);
  --radius-xs: var(--r-8); --radius-sm: var(--r-8); --radius-md: var(--r-12); --radius-lg: var(--r-16); --radius-pill: var(--r-pill);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0E1116; --surface: #161A21; --sunk: #20252E;
    --ink: #EEF1F5; --muted: #A9B2BF; --line: #2A313B; --line-strong: #3A424E; --control: #7E8794;
    --accent: #8AAEFF; --accent-strong: #B9CDFF; --accent-soft: #1B2642; --on-accent: #0B1220;
    --good: #5CD69C; --good-soft: #10291D; --attention: #F5B27A; --attention-soft: #33210F; --emergency: #FF8F84; --emergency-soft: #3A1512;
    --waiting: #C3CAD4; --waiting-soft: #252A33;
    --cash-in: #5CD69C; --cash-in-bg: #10291D; --cash-out: #C7AEFA; --cash-out-bg: #261B3F; --adj: #C3CAD4; --adj-bg: #252A33;
    --chart-1: #2B4A8F; --chart-2: #5578D0; --chart-3: #8AAEFF;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .4); --shadow-2: 0 12px 32px rgba(0, 0, 0, .55); --scrim: rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --ground: #0E1116; --surface: #161A21; --sunk: #20252E;
    --ink: #EEF1F5; --muted: #A9B2BF; --line: #2A313B; --line-strong: #3A424E; --control: #7E8794;
    --accent: #8AAEFF; --accent-strong: #B9CDFF; --accent-soft: #1B2642; --on-accent: #0B1220;
    --good: #5CD69C; --good-soft: #10291D; --attention: #F5B27A; --attention-soft: #33210F; --emergency: #FF8F84; --emergency-soft: #3A1512;
    --waiting: #C3CAD4; --waiting-soft: #252A33;
    --cash-in: #5CD69C; --cash-in-bg: #10291D; --cash-out: #C7AEFA; --cash-out-bg: #261B3F; --adj: #C3CAD4; --adj-bg: #252A33;
    --chart-1: #2B4A8F; --chart-2: #5578D0; --chart-3: #8AAEFF;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .4); --shadow-2: 0 12px 32px rgba(0, 0, 0, .55); --scrim: rgba(0, 0, 0, .6);
    color-scheme: dark;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--ground); color: var(--ink); font: 400 16px/24px var(--sans); font-variant-numeric: tabular-nums; -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; margin: 0; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: 28px; line-height: 34px; }
h2 { font-size: 22px; line-height: 28px; }
.card h2, .tile h2 { font-size: 17px; line-height: 24px; font-family: var(--sans); letter-spacing: 0; }
h3 { font-size: 17px; line-height: 24px; font-family: var(--sans); }
p { margin: 0; }
a { color: var(--accent); font-weight: 600; text-decoration: none; }
a:hover { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }
code.code { font: 600 15px/1.4 ui-monospace, Menlo, Consolas, monospace; background: var(--ground); border: 1px solid var(--line); padding: 8px 12px; border-radius: var(--r-8); word-break: break-all; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small, small { font-size: 14px; line-height: 20px; }
.good { color: var(--good); }
.warn-text { color: var(--attention); }
.num { text-align: right; }
.nowrap { white-space: nowrap; }
.pad { padding: 24px; }
.display { font-family: var(--display); font-weight: 700; letter-spacing: -.02em; }

.row { display: flex; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.gap { gap: 8px; }
.grow { flex: 1 1 0; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 12px; }
.stack-xs { display: flex; flex-direction: column; gap: 8px; }
.stack-lg { display: flex; flex-direction: column; gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px 16px; }
.narrow { max-width: 680px; display: flex; flex-direction: column; gap: 16px; }

/* ---------- Shell: where am I ---------- */
.demo-bar { background: var(--attention-soft); color: var(--attention); font-size: 13px; line-height: 20px; font-weight: 600; text-align: center; padding: 4px 16px; }
.app-shell { display: flex; min-height: 100vh; }
.nav { width: 240px; flex: none; background: var(--surface); border-right: 1px solid var(--line); padding: 20px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.nav-brand { display: flex; align-items: center; gap: 12px; font: 700 17px/24px var(--display); padding: 0 8px 20px; }
.nav-item { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 12px; border-radius: var(--r-12); color: var(--muted); font-weight: 600; font-size: 16px; }
@media (hover: hover) { .nav-item:hover { background: var(--ground); color: var(--ink); text-decoration: none; } .nav-item.on:hover { background: var(--accent-soft); color: var(--accent-strong); } }
.nav-item:hover { text-decoration: none; }
.nav-item.on { background: var(--accent-soft); color: var(--accent-strong); }
.nav-item.on svg { color: var(--accent); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--surface); border-bottom: 1px solid var(--line); padding: 12px max(20px, env(safe-area-inset-right)) 12px max(20px, env(safe-area-inset-left)); position: sticky; top: 0; z-index: 15; }
.who { display: flex; flex-direction: column; min-width: 0; }
.who strong { font-size: 17px; line-height: 24px; }
.who small, .brand small { color: var(--muted); }
.top-more { display: none; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand span:last-child { display: flex; flex-direction: column; }
.brand-mark { width: 36px; height: 36px; border-radius: var(--r-8); background: var(--accent); color: var(--on-accent); font: 700 14px var(--display); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.brand-mark.big { width: 52px; height: 52px; border-radius: var(--r-12); font-size: 19px; }
.switcher select { min-height: 48px; max-width: 100%; font-weight: 600; }
.page { width: 100%; max-width: 1180px; margin: 0 auto; padding: 24px max(20px, env(safe-area-inset-right)) 48px max(20px, env(safe-area-inset-left)); display: flex; flex-direction: column; gap: 20px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 16px; flex-wrap: wrap; }
.page-head > div:first-child { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.app-foot { text-align: center; color: var(--muted); font-size: 14px; line-height: 20px; display: flex; flex-direction: column; gap: 4px; padding: 8px 0; }

@media (max-width: 760px) {
  .nav { position: fixed; bottom: 0; left: 0; right: 0; top: auto; width: auto; height: auto; flex-direction: row; padding: 4px 8px max(4px, env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); z-index: 20; gap: 4px; overflow: visible; box-shadow: 0 -4px 16px rgba(20, 24, 31, .05); }
  .nav-brand, .nav-desk, .nav-foot { display: none !important; }
  .nav-item { flex: 1; flex-direction: column; gap: 2px; padding: 6px 0; font-size: 13px; line-height: 16px; min-height: 60px; justify-content: center; border-radius: var(--r-12); }
  .nav-item.on { background: transparent; color: var(--accent); }
  .nav-item.on .nav-ic { background: var(--accent-soft); }
  .nav-ic { padding: 4px 16px; border-radius: var(--r-pill); }
  .main { padding-bottom: 84px; }
  .topbar { padding-top: 8px; padding-bottom: 8px; }
  .top-more { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); color: var(--ink); font-size: 15px; font-weight: 600; }
  .top-more.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }
  .top-more:hover { text-decoration: none; }
  .switcher { width: 100%; }
  .switcher select { width: 100%; }
  .page { padding-top: 20px; gap: 16px; }
  h1 { font-size: 28px; line-height: 34px; }
}

/* ---------- Cards and key numbers: what is important ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-16); padding: 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; box-shadow: var(--shadow-1); }
.card.soft { background: var(--surface); }
.card.list { padding: 4px 20px; gap: 0; }
.card.empty, .card.done { align-items: center; text-align: center; padding: 32px 20px; gap: 16px; }
.card.done .kv { width: 100%; max-width: 420px; }
.card.done .btn-block { max-width: 420px; }
.done-icon { width: 72px; height: 72px; border-radius: 50%; background: var(--good-soft); color: var(--good); display: flex; align-items: center; justify-content: center; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 12px; }
.tiles .tile-hero { grid-column: span 2; }
@media (min-width: 1000px) { .tiles .tile-hero { grid-column: auto; } }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-16); padding: 16px 20px; display: flex; flex-direction: column; gap: 4px; min-width: 0; box-shadow: var(--shadow-1); }
.tile-hero { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.tile-label { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--muted); }
.tile-hero .tile-label, .tile-hero .tile-note { color: var(--on-accent); }
.tile-value { font: 700 22px/28px var(--display); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.tile-value.big { font-size: 40px; line-height: 44px; letter-spacing: -.02em; }
.tile-note { font-size: 14px; line-height: 20px; color: var(--muted); }
.amount { font: 700 28px/34px var(--display); letter-spacing: -.01em; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 16px; line-height: 24px; }
.kv span { color: var(--muted); }
.kv strong { text-align: right; }
.big-num { font: 700 22px/28px var(--display); }
.line { padding: 12px 0; border-top: 1px solid var(--line); }
.line:first-of-type { border-top: 0; }

/* ---------- Status: always an icon and a word ---------- */
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; line-height: 18px; font-weight: 600; padding: 3px 10px 3px 7px; border-radius: var(--r-pill); white-space: nowrap; align-self: flex-start; vertical-align: middle; }
.pill svg { flex: none; }
.pill-good { background: var(--good-soft); color: var(--good); }
.pill-warn { background: var(--attention-soft); color: var(--attention); white-space: normal; }
.pill-danger { background: var(--emergency-soft); color: var(--emergency); }
.pill-info { background: var(--accent-soft); color: var(--accent-strong); }
.pill-neutral, .pill-wait { background: var(--waiting-soft); color: var(--waiting); }
.alert { position: relative; border-radius: var(--r-12); padding: 14px 16px 14px 48px; font-size: 16px; line-height: 24px; font-weight: 500; border: 1px solid transparent; }
.alert::before { content: ""; position: absolute; left: 16px; top: 16px; width: 20px; height: 20px; background: currentColor;
  -webkit-mask: var(--alert-ic) center / contain no-repeat; mask: var(--alert-ic) center / contain no-repeat; }
.alert strong { font-weight: 700; }
.alert ul { margin: 6px 0 0; padding-left: 18px; font-weight: 500; }
.alert-danger { background: var(--emergency-soft); color: var(--emergency); border-color: color-mix(in srgb, var(--emergency) 25%, transparent);
  --alert-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l9.5 17h-19z'/%3E%3Cpath d='M12 10v4.5M12 17.5v.01'/%3E%3C/svg%3E"); }
.alert-warn { background: var(--attention-soft); color: var(--attention); border-color: color-mix(in srgb, var(--attention) 20%, transparent);
  --alert-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5.5M12 16.5v.01'/%3E%3C/svg%3E"); }
.alert-info { background: var(--accent-soft); color: var(--accent-strong);
  --alert-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5.5M12 7.5v.01'/%3E%3C/svg%3E"); }
.note-info { background: var(--accent-soft); color: var(--accent-strong); border-radius: var(--r-12); padding: 12px 16px; font-weight: 600; }
.form-error { color: var(--emergency); font-size: 15px; line-height: 22px; font-weight: 600; }
.form-error:not(:empty)::before { content: "⚠ "; }
.form-error:empty { display: none; }

/* ---------- Buttons: one primary action per screen ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: var(--r-12); font: 600 16px/1.2 var(--sans); cursor: pointer; border: 1px solid transparent; text-align: center; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.btn:hover { text-decoration: none; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { cursor: not-allowed; background: var(--sunk); color: var(--muted); border-color: transparent; }
.btn-primary { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.btn-primary:hover:not(:disabled) { background: var(--accent-strong); color: var(--on-accent); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover:not(:disabled) { border-color: var(--control); background: var(--ground); color: var(--ink); }
.btn-outline { background: var(--surface); color: var(--accent); border: 2px solid var(--accent); }
.btn-cashin { background: var(--good); color: #fff; }
.btn-cashin:hover { color: #fff; filter: brightness(.95); }
.btn-danger { background: var(--surface); color: var(--emergency); border: 2px solid var(--emergency); }
.btn-danger:hover:not(:disabled) { background: var(--emergency-soft); }
.btn-quiet { background: transparent; color: var(--accent); }
.btn-quiet:hover:not(:disabled) { background: var(--accent-soft); color: var(--accent-strong); }
.btn-block { width: 100%; }
.btn-lg { min-height: 56px; font-size: 17px; }
.btn-xl { min-height: 64px; font-size: 18px; }
.btn-sm { min-height: 48px; padding: 0 14px; font-size: 15px; }
.link { background: none; border: 0; padding: 0 2px; color: var(--accent); font: 600 16px var(--sans); cursor: pointer; min-height: 48px; display: inline-flex; align-items: center; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.chip { min-height: 48px; padding: 0 18px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: 600 15px var(--sans); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.chip:hover { border-color: var(--control); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.chip.on::before { content: "✓"; font-weight: 700; }

/* ---------- Segmented control ---------- */
.segmented { display: inline-flex; background: var(--sunk); padding: 4px; border-radius: var(--r-12); gap: 4px; }
.segmented button, .segmented label span { min-height: 44px; padding: 0 16px; border: 0; border-radius: var(--r-8); background: transparent; color: var(--muted); font: 600 15px var(--sans); cursor: pointer; display: flex; align-items: center; justify-content: center; text-align: center; }
.segmented button.on, .segmented input:checked + span { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: var(--shadow-1); }
.segmented.big { display: grid; grid-template-columns: 1fr 1fr; }
.segmented.big button { min-height: 52px; font-size: 17px; }
.segmented label { flex: 1; display: flex; }
.segmented label span { flex: 1; padding: 8px 12px; line-height: 20px; }
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.seg-field { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.seg-field legend { font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.seg-field .segmented { display: flex; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); min-width: 0; }
.field > small, .field .muted { font-weight: 400; }
.field.inline { min-width: 160px; }
input, select, textarea { font: 400 16px/24px var(--sans); color: var(--ink); background: var(--surface); border: 1px solid var(--control); border-radius: var(--r-12); padding: 11px 14px; min-height: 48px; width: 100%; min-width: 0; transition: border-color .15s ease, box-shadow .15s ease; }
input:hover, select:hover, textarea:hover { border-color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input[type="checkbox"], input[type="radio"] { width: 22px; height: 22px; min-height: 0; padding: 0; accent-color: var(--accent); box-shadow: none; }
textarea { resize: vertical; }
.money-input { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 2px solid var(--accent); border-radius: var(--r-12); padding: 0 16px; min-height: 64px; }
.money-input span { font: 700 28px var(--display); color: var(--muted); }
.money-input input { border: 0; padding: 0; font: 700 32px/40px var(--display); min-height: 60px; background: transparent; box-shadow: none; letter-spacing: -.01em; }
.money-input input:focus { box-shadow: none; }
.money-input:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }

/* ---------- Transaction rows ---------- */
.tx-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; padding: 14px 0; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; font: inherit; cursor: pointer; min-height: 64px; }
@media (hover: hover) { .tx-row:hover { background: var(--ground); } }
.card .tx-row:first-of-type { border-top: 0; }
.tx-row > span:first-child { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tx-row small { color: var(--muted); }
.tx-row .fee { font-weight: 700; color: var(--good); white-space: nowrap; }
.tx-row.voided { color: var(--muted); }
.tx-row.voided .fee { color: var(--muted); }
.menu-row { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); color: var(--ink); min-height: 64px; }
.menu-row:hover { text-decoration: none; color: var(--ink); }
.menu-row:hover strong { color: var(--accent); }
.menu-row:first-child { border-top: 0; }
.menu-row > span.grow { display: flex; flex-direction: column; }
.menu-row small { color: var(--muted); font-weight: 400; }
.menu-row > svg { color: var(--muted); flex: none; }
.menu-ic { width: 40px; height: 40px; border-radius: var(--r-12); background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.detail { border: 2px solid var(--accent); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 22px; }
.table th { text-align: left; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--muted); padding: 10px 10px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; background: var(--surface); }
.table td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:hover td { background: var(--ground); }
.table th.num, .table td.num { text-align: right; }
.table select { min-height: 44px; padding: 6px 10px; font-size: 15px; width: auto; }
.fee-table input { min-height: 44px; padding: 8px 10px; max-width: 120px; }

/* ---------- Charts ---------- */
.chart { width: 100%; height: auto; display: block; max-height: 280px; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .baseline { stroke: var(--line-strong); stroke-width: 1; }
.chart .axis { fill: var(--muted); font: 600 13px var(--sans); }
.chart .hit { fill: transparent; }
.chart .bar { fill: var(--accent); }
.chart .partial { fill: var(--chart-1); }
.chart .peak { fill: var(--chart-3); }
.chart .busy { fill: var(--chart-2); }
.chart .quiet { fill: var(--chart-1); }
.chart g:hover .bar, .chart g:hover .partial { fill: var(--accent-strong); }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.chart .dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.chart g:hover .dot { r: 6; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 14px; color: var(--muted); align-items: center; margin: 0; }
.legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.sw.peak { background: var(--chart-3); } .sw.busy { background: var(--chart-2); } .sw.quiet { background: var(--chart-1); }
.rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rank li { display: grid; grid-template-columns: 22px 96px minmax(0, 1fr) 40px; gap: 8px; align-items: center; font-size: 15px; }
.rank-n { font-weight: 700; color: var(--muted); }
.rank-name { font-weight: 600; }
.rank-bar { height: 16px; background: var(--ground); border-radius: 0 4px 4px 0; display: block; }
.rank-bar span { display: block; height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; }
.meter { display: block; height: 8px; border-radius: var(--r-pill); background: var(--sunk); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--accent); border-radius: var(--r-pill); }
.meter span.full { background: var(--attention); }

/* ---------- Sign-in and gate screens ---------- */
.gate { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 20px; background: radial-gradient(1200px 600px at 50% -10%, var(--accent-soft), transparent 70%), var(--ground); }
.gate-card { width: 100%; max-width: 440px; gap: 16px; padding: 28px 24px; box-shadow: var(--shadow-2); border-color: transparent; }
.gate-card h1 { font-size: 28px; line-height: 34px; }
.demo-card { gap: 12px; }

.toast { position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 12px); transform: translateX(-50%); box-shadow: var(--shadow-2); background: var(--ink); color: var(--surface); padding: 14px 18px; border-radius: var(--r-12); font-weight: 600; font-size: 15px; line-height: 22px; max-width: calc(100% - 40px); z-index: 50; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

.de-head { display: flex; flex-direction: column; gap: 2px; }
.de-head label { font-weight: 700; }
@media (max-width: 760px) { .app-shell { background: none; } }

/* Queue */
.nav-ic { position: relative; display: inline-flex; }
.badge { position: absolute; top: -6px; right: -10px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--warning); color: var(--surface-0); font-size: 13px; font-weight: 700; line-height: 18px; text-align: center; }
.section-label { font: 600 15px/22px var(--sans); color: var(--muted); letter-spacing: 0; }
.q-title { font-size: 17px; display: block; }
.q-mine { border: 2px solid var(--brand-600); }
.q-other { background: var(--surface-100); border-style: dashed; }
.menu-card { flex-direction: row; justify-content: space-between; align-items: center; color: var(--ink); }
.menu-card > span:first-child { display: flex; flex-direction: column; }
.menu-card > span.row { flex-direction: row; align-items: center; }
.menu-card > span.row > span:last-child { display: flex; flex-direction: column; }
.menu-card small { color: var(--ink-muted); font-weight: 500; }
.menu-card.attention { border-color: var(--warning); }
.menu-card .count { width: 34px; height: 34px; border-radius: 10px; background: var(--warning-bg); color: var(--warning); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.link-code { font-size: 13px; line-height: 1.5; }

/* Customer tablet: larger everything, readable at arm's length */
.tablet { min-height: 100vh; background: var(--surface-100); font-size: 18px; line-height: 26px; }
.tab-head { display: flex; align-items: center; gap: 14px; padding: 20px max(24px, env(safe-area-inset-left)); background: var(--surface-0); border-bottom: 1px solid var(--line); }
.tab-head span:last-child { display: flex; flex-direction: column; }
.tab-head strong { font-size: 24px; line-height: 30px; }
.tab-head small { font-size: 15px; color: var(--ink-muted); }
.tab-main { max-width: 760px; margin: 0 auto; padding: 28px max(20px, env(safe-area-inset-left)) 40px; display: flex; flex-direction: column; gap: 20px; }
.tab-main.center { align-items: center; text-align: center; }
.tab-main h1 { font-size: 30px; line-height: 36px; }
.tab-types { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tab-types button { min-height: 116px; border-radius: var(--radius-lg); border: 2px solid var(--control-border); background: var(--surface-0); color: var(--ink); font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px; }
.tab-types button strong { font-size: 26px; line-height: 30px; }
.tab-types button span { font-size: 15px; line-height: 20px; color: var(--ink-muted); }
.tab-types button.on { border: 3px solid var(--brand-600); background: var(--brand-100); color: var(--brand-800); }
.field.big { font-size: 16px; }
.field.big input { font-size: 24px; min-height: 64px; }
.tab-sum { width: 100%; max-width: 560px; align-self: center; padding: 18px 22px; }
.tab-sum .kv { font-size: 19px; }
.tab-sum .kv.total strong { font-size: 30px; color: var(--brand-800); }
.consent { display: flex; gap: 14px; align-items: flex-start; font-size: 15px; line-height: 21px; color: var(--ink-muted); cursor: pointer; }
.consent input { width: 28px; height: 28px; min-height: 0; flex: none; margin: 0; accent-color: var(--brand-600); }
.tab-btn { min-height: 72px; font-size: 22px; border-radius: var(--radius-lg); }
.tab-number { font-size: 88px; line-height: 1; font-weight: 700; color: var(--brand-600); letter-spacing: -.02em; }
.steps { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; font-size: 15px; font-weight: 600; }
.steps span { padding: 8px 12px; border-radius: 10px; background: var(--surface-200); color: var(--ink-muted); }
.steps span.done { background: var(--good-bg); color: var(--good); }
.steps span.on { background: var(--brand-600); color: var(--on-brand); }
@media (max-width: 600px) { .tab-types { grid-template-columns: 1fr; } .tab-number { font-size: 64px; } }

/* Logo */
.brand-icon { width: 34px; height: 34px; border-radius: 9px; flex: none; display: block; }
.logo-full { width: 220px; max-width: 70%; height: auto; display: block; align-self: center; }
.logo-full.small { width: 140px; }
.gate-card { align-items: stretch; }
.gate-card > h1 { text-align: center; }
.tab-foot { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 16px; font-size: 13px; color: var(--ink-subtle); }
.tab-foot img { border-radius: 5px; }

/* Receipts and links */
.receipt-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-btn.busy { opacity: .6; pointer-events: none; }
.file-btn:focus-within { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.receipt { margin: 0; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.receipt img { max-width: 100%; max-height: 480px; border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface-0); }
.tab-receipt { width: 100%; max-width: 560px; }
.tab-receipt img { max-height: 620px; }
.tab-receipt figcaption { font-size: 15px; color: var(--ink-muted); }
tr.dim td { color: var(--ink-subtle); }
.attention-card { border: 2px solid var(--brand-600); }
.done-list { list-style: none; margin: 0; padding: 0; }
.done-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.done-list li:first-child { border-top: 0; }
.done-list li > span:first-child { display: flex; flex-direction: column; }
.tab-like { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tab-like small { color: var(--ink-muted); font-size: 14px; }
.sound-card { margin-bottom: 4px; }
.sound-card > .row > span:first-child { display: flex; flex-direction: column; }
.table tfoot th, .table tfoot td { font-weight: 700; color: var(--ink); border-top: 2px solid var(--line); border-bottom: 0; padding: 12px 8px; font-size: 14px; text-transform: none; letter-spacing: 0; white-space: nowrap; }
.link-list { list-style: none; margin: 8px 0 0; padding: 0; }
.link-item { display: flex; flex-direction: column; gap: 6px; padding: 14px 0; border-top: 1px solid var(--line); }
.link-item:first-child { border-top: 0; }
.link-item.dim strong { color: var(--ink-subtle); }
.link-code { word-break: break-all; white-space: pre-wrap; }

/* ---------- Owner console ---------- */
.alert-info { background: var(--brand-100); color: var(--brand-800); }
.plan-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; }
.plan-note .btn, .plan-note .link { padding-left: 0; }
.owner-page { max-width: 1320px; }
.nav-foot { margin-top: auto; padding: 12px 8px 4px; line-height: 16px; }
.owner-shell .topbar { justify-content: space-between; }
.owner-shell .updated { white-space: nowrap; }
.o-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 4px 0 18px; }
.o-head h1 { font-size: 30px; line-height: 36px; letter-spacing: -.02em; margin: 0; }
.eyebrow { margin: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--ink-muted); }
.lede { margin: 6px 0 0; color: var(--ink-muted); max-width: 72ch; font-size: 15px; line-height: 22px; }
.lede strong { color: var(--ink); }
.back-link { display: inline-block; margin-bottom: 8px; font-weight: 600; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface-0); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kpi-label { font-size: 13px; font-weight: 600; color: var(--ink-muted); }
.kpi-value { font-size: clamp(22px, 2.2vw, 30px); line-height: 1.15; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi-value small { font-size: 14px; font-weight: 600; color: var(--ink-muted); letter-spacing: 0; }
.kpi-sub { font-size: 13px; color: var(--ink-muted); }
.kpi-link { font-size: 13px; font-weight: 600; margin-top: auto; padding-top: 6px; }
.kpi .spark { margin-top: 6px; }
.delta { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--good); }
.delta.down { color: var(--danger); }
.delta.flat { color: var(--ink-muted); font-weight: 600; }
.spark { display: block; overflow: visible; }
.spark polyline { fill: none; stroke: var(--brand-600); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark circle { fill: var(--brand-600); stroke: var(--surface-0); stroke-width: 2; }

.o-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; align-items: start; }
.o-grid > .card { margin: 0; }
@media (max-width: 1000px) { .o-grid { grid-template-columns: 1fr; } }

.att { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.att-item { display: flex; gap: 12px; padding: 12px; border-radius: var(--radius-md); background: var(--surface-100); border-left: 4px solid var(--brand-600); }
.att-item.warn { border-left-color: var(--warning); }
.att-item.danger { border-left-color: var(--danger); background: var(--danger-bg); }
.att-ic { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--brand-100); color: var(--brand-800); }
.att-item.warn .att-ic { background: var(--warning-bg); color: var(--warning); }
.att-item.danger .att-ic { background: var(--danger); color: var(--surface-0); }
.att-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.att-body small { color: var(--ink-muted); }
.att-body .row { margin-top: 4px; }
.all-clear { display: flex; flex-direction: column; gap: 2px; padding: 16px; border-radius: var(--radius-md); background: var(--good-bg); margin-top: 12px; }
.all-clear strong { color: var(--good); }

.rank { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.rank li { display: flex; gap: 10px; align-items: flex-start; }
.rank-n { flex: none; width: 22px; font-weight: 700; color: var(--ink-muted); padding-top: 8px; text-align: right; font-variant-numeric: tabular-nums; }
.rank-body { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 8px; border-radius: var(--radius-md); color: inherit; text-decoration: none; min-width: 0; }
.rank-body:hover { background: var(--surface-100); }
.rank-body small { color: var(--ink-muted); }
.bar-track { display: block; height: 6px; background: var(--surface-200); border-radius: var(--radius-pill); overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--brand-600); border-radius: var(--radius-pill); }

.meter-row { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; margin-top: 8px; font-size: 13px; }
.meter-label { color: var(--ink-muted); font-weight: 600; }
.meter-num { font-variant-numeric: tabular-nums; font-weight: 600; }
.meter .meter-fill.high { background: var(--seq-4, var(--brand-600)); }
.meter .meter-fill.full { background: var(--warning); }

.plan-mix { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.plan-cell { display: flex; flex-direction: column; gap: 2px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-md); }
.plan-name { font-weight: 700; }
.plan-n { font-size: 26px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .plan-mix { grid-template-columns: 1fr; } }

.log { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; }
.log li { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line-faint); font-size: 14px; }
.log li:first-child { border-top: 0; }
.log li > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.log-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; background: var(--brand-600); }
.log-dot.renew { background: var(--good); }
.log-dot.plan { background: var(--seq-3, var(--brand-600)); }

.o-tools { display: flex; flex-direction: column; gap: 12px; }
.search input { width: 100%; min-height: 44px; padding: 10px 14px; font-size: 16px; border: 1px solid var(--control-border); border-radius: var(--radius-md); background: var(--surface-0); color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip span { color: var(--ink-muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.chip.on span { opacity: .85; }
.chip:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

.o-row { cursor: pointer; }
.o-row:hover td { background: var(--surface-100); }
.o-row:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.o-row td { vertical-align: top; }
.o-row a { color: inherit; }
.warn-text { color: var(--warning); font-weight: 600; }
.ends { font-weight: 600; }
.ends.soon { color: var(--warning); }
.ends.over { color: var(--danger); }
.o-cards { display: none; flex-direction: column; gap: 10px; }
.o-card { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-md); color: inherit; text-decoration: none; }
.o-card.total { background: var(--surface-100); }
.o-card-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.o-card-nums span { display: flex; flex-direction: column; min-width: 0; }
.o-card-nums b { font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o-card-nums small { color: var(--ink-muted); font-size: 13px; }
@media (max-width: 900px) { .o-table { display: none; } .o-cards { display: flex; } }

.board { display: grid; grid-template-columns: repeat(6, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.lane { background: var(--surface-100); border-radius: var(--radius-lg); padding: 12px; display: flex; flex-direction: column; gap: 8px; border-top: 4px solid var(--line); min-height: 120px; }
.lane.over { border-top-color: var(--danger); }
.lane.soon { border-top-color: var(--warning); }
.lane h2 { font-size: 15px; margin: 0 0 4px; display: flex; justify-content: space-between; }
.lane h2 span { color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.r-card { background: var(--surface-0); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.r-card a { color: inherit; }
.r-card .row { margin-top: 6px; }
@media (max-width: 900px) { .board { grid-template-columns: 1fr; overflow: visible; } }

.control .ctl { padding: 14px 0; border-top: 1px solid var(--line-faint); display: flex; flex-direction: column; gap: 8px; }
.control .ctl:first-of-type { border-top: 0; padding-top: 4px; }
.ctl-label { font-size: 13px; font-weight: 700; letter-spacing: 0; color: var(--ink-muted); }
.ctl p { margin: 0; }
.plan-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.plan-opt { text-align: left; padding: 10px; border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface-0); color: var(--ink); font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 2px; min-height: 64px; }
.plan-opt small { color: var(--ink-muted); font-size: 13px; }
.plan-opt.on { border: 2px solid var(--brand-600); background: var(--brand-100); cursor: default; }
.plan-opt .cur { color: var(--brand-800); font-weight: 700; }
.plan-opt:not(.on):hover { border-color: var(--brand-600); }

.modal-back { position: fixed; inset: 0; background: var(--scrim); z-index: 60; }
.modal { position: fixed; z-index: 61; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface-0); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-raised); display: flex; flex-direction: column; gap: 14px; }
.modal h2 { margin: 0; font-size: 20px; }
.modal-body { display: flex; flex-direction: column; gap: 10px; }
.modal .end { justify-content: flex-end; }
.impact { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.cmp { width: 100%; border-collapse: collapse; font-size: 14px; }
.cmp th, .cmp td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line-faint); }
@media (min-width: 1000px) { .kpis.k3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 999px) and (min-width: 520px) { .kpis.k3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.att + .o-head, .att { margin-bottom: 16px; }
.card .att { margin-bottom: 0; }
.board { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); overflow: visible; }
@media (max-width: 760px) { .nav-foot { display: none; } .owner-shell .updated { display: none; } .o-head h1 { font-size: 24px; line-height: 30px; } }
@media (max-width: 519px) { .kpis.k3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpis .kpi { padding: 12px; } .kpi-value { font-size: 20px; } }
.arch-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.folder-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-md); }
.folder-row > span:first-child { display: flex; flex-direction: column; gap: 2px; flex: 1 1 220px; }
/* Version label: quiet, same everywhere */
.ver { font-size: 13px; line-height: 16px; color: var(--ink-subtle); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.ver-line { margin: 12px 0 0; text-align: center; font-size: 13px; line-height: 16px; color: var(--ink-subtle); }
.nav-foot { display: flex; flex-direction: column; gap: 6px; }
.only-small { display: none; }
@media (max-width: 760px) { .only-small { display: block; } }
@media (min-width: 761px) { .demo-bar + .app-shell .nav { height: calc(100vh - 30px); } }

/* ---------- Today: status, guidance, week strip (Nielsen pass) ---------- */
.status-line { margin: 0; font-size: 13px; color: var(--ink-muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); flex: none; }
.dot.off { background: var(--danger); }
.hero-split { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; }
.hero-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 280px; }
.wk { display: flex; align-items: flex-end; gap: 6px; height: 84px; flex: 0 1 300px; }
.wk-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 22px; }
.wk-bar { width: 100%; max-width: 26px; border-radius: 4px 4px 0 0; background: var(--on-brand); opacity: .45; }
.wk-col.now .wk-bar { opacity: 1; }
.wk-day { font-size: 13px; line-height: 16px; color: var(--on-brand); opacity: .85; white-space: nowrap; }
.wk-col.now .wk-day { opacity: 1; font-weight: 700; }
.bal { display: flex; flex-direction: column; gap: 4px; }
.bal-low { border: 2px solid var(--warning); }
.ok-line { color: var(--good); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.other-wallets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.btn-2l { flex-direction: column; gap: 2px; padding-top: 12px; padding-bottom: 12px; height: auto; text-align: center; }
.btn-2l small { font-size: 13px; font-weight: 500; opacity: .95; }
.btn-2l, .btn-2l:hover { color: #fff; }
.btn-cashout { background: var(--cash-out); color: #fff; }
.btn-cashout:hover { color: #fff; filter: brightness(.95); }
:root[data-theme="dark"] .btn-2l, :root[data-theme="dark"] .btn-2l:hover { color: #0B1220; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-2l, :root:not([data-theme="light"]) .btn-2l:hover { color: #0B1220; } :root:not([data-theme="light"]) .btn-cashin, :root:not([data-theme="light"]) .btn-cashout { color: #0B1220; } }
.menu-card .pill { margin-right: 6px; }
.hero-split { flex-direction: row; }
.wk { height: 84px; flex: 0 0 auto; width: min(300px, 100%); }
@media (max-width: 760px) { .nav .nav-foot { display: none; } }
.center { justify-content: center; }

/* ---------- Ledger table ---------- */
.jtabs { margin-bottom: 12px; }
.lg-sum { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; padding: 10px 12px; margin-bottom: 10px; border-radius: var(--radius-md); background: var(--surface-100); font-size: 14px; position: sticky; top: 0; z-index: 2; }
.lg-wrap { max-height: 70vh; overflow: auto; }
.table.lg { font-size: 15px; line-height: 22px; }
.table.lg thead th { position: sticky; top: 0; background: var(--surface-0); z-index: 1; white-space: nowrap; }
.table.lg td, .table.lg th { padding: 10px 10px; }
.table.lg input[type="checkbox"] { width: 22px; height: 22px; }
.table.lg tr.lg-on td { background: var(--brand-100); }
.table.lg tr.lg-void td { color: var(--muted); }
.table.lg tr.lg-void td.amt { text-decoration: line-through; }
.table.lg tr.lg-editing td { background: var(--surface-100); vertical-align: top; }
.lg-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.lg-form .field { min-width: 160px; }
.lg-form .form-error, .lg-form small { flex-basis: 100%; }
.nowrap { white-space: nowrap; }
.table.lg .btn-sm { min-height: 44px; padding: 0 12px; }
.table.lg td { padding: 6px 10px; vertical-align: middle; }
.table.lg td:nth-child(8), .table.lg td:nth-child(10) { white-space: nowrap; }

/* Record: send-to / received-from */
.via { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 12px; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.via legend { font-weight: 600; padding: 0 6px; }
.caps { text-transform: uppercase; }
.caps::placeholder { text-transform: none; }
.danger-zone { border: 1px solid var(--danger); }
.radio, .check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.radio input, .check input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.radio > span { display: flex; flex-direction: column; gap: 2px; }
.step-label { margin: 0; font-size: 13px; font-weight: 700; color: var(--ink-muted); }
.countdown { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px; border-radius: var(--radius-md); background: var(--danger-bg); border: 2px solid var(--danger); }
.countdown strong { color: var(--danger); font-size: 17px; }

/* Known-customer suggestions (Record only) */
.sugg-wrap { position: relative; }
.sugg-wrap > label { font-weight: 600; font-size: 14px; }
.sugg { position: absolute; left: 0; right: 0; top: calc(100% - 26px); z-index: 30; list-style: none; margin: 4px 0 0; padding: 4px; background: var(--surface-0); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-raised); max-height: 320px; overflow: auto; }
.sugg-item { display: grid; grid-template-columns: auto 1fr; gap: 0 12px; padding: 10px 12px; border-radius: var(--radius-sm, 6px); cursor: pointer; }
.sugg-item.on, .sugg-item:hover { background: var(--brand-100); }
.sugg-num { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sugg-num mark { background: transparent; color: var(--brand-700, var(--brand-600)); text-decoration: underline; text-underline-offset: 3px; }
.sugg-name { font-weight: 600; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sugg-meta { grid-column: 1 / -1; font-size: 12.5px; color: var(--ink-muted); }
.cust-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-height: 0; margin-top: 6px; }
.cust-note:empty { display: none; }
.sugg-anchor { position: relative; }
.sugg-anchor > input { width: 100%; }
.sugg { top: 100%; }

/* Reports: drill into a row */
.cell-btn { background: none; border: 0; padding: 4px 6px; margin: -4px -6px; font: inherit; color: var(--brand-700, var(--brand-600)); cursor: pointer; border-radius: 6px; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; font-variant-numeric: tabular-nums; }
.cell-btn:hover { background: var(--brand-100); }
.cell-btn.on { background: var(--brand-100); font-weight: 700; text-decoration: none; }
.cell-btn.period { text-decoration: none; font-weight: 600; color: var(--ink); text-align: left; }
.cell-btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
tr.rp-open td { background: var(--surface-100); }
tr.rp-detail-row > td { padding: 0 0 12px; background: var(--surface-100); }
.rp-detail { padding: 12px; border-left: 3px solid var(--brand-600); background: var(--surface-0); border-radius: 0 var(--radius-md) var(--radius-md) 0; display: flex; flex-direction: column; gap: 10px; }
.rp-detail-head { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: flex-start; }
.rp-detail-head > span:first-child { display: flex; flex-direction: column; gap: 2px; }
.rp-wrap { max-height: 60vh; overflow: auto; }

/* Receipt box: browse, drag, paste, preview */
.drop { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px; border: 2px dashed var(--line); border-radius: var(--radius-md); background: var(--surface-100); transition: border-color .12s, background .12s; }
.drop:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.drop.over { border-color: var(--brand-600); background: var(--brand-100); }
.drop.busy { opacity: .6; pointer-events: none; }
.drop-ic { color: var(--brand-600); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--surface-0); flex: none; }
.drop-body { display: flex; flex-direction: column; gap: 4px; flex: 1 1 180px; min-width: 0; }
.drop.compact { padding: 0; border: 0; background: none; display: inline-flex; }
.drop.compact.over { outline: 2px dashed var(--brand-600); outline-offset: 4px; border-radius: 8px; }
.drop.has-preview { border-style: solid; border-color: var(--brand-600); background: var(--surface-0); align-items: flex-start; }
.drop-thumb { width: 120px; max-height: 200px; object-fit: contain; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-0); flex: none; }
@media (max-width: 420px) { .drop-thumb { width: 100%; max-height: 320px; } }

/* Tap a number: shown big, with Copy */
.num-tap { font: inherit; color: var(--brand-700, var(--brand-600)); background: none; border: 0; padding: 2px 4px; margin: -2px -4px; border-radius: 6px; cursor: zoom-in; font-variant-numeric: tabular-nums; text-decoration: underline dotted; text-underline-offset: 3px; white-space: nowrap; }
.num-tap:hover { background: var(--brand-100); }
.num-tap:focus-visible { outline: 2px solid var(--focus-ring); }
.modal.zoom { width: min(720px, calc(100vw - 24px)); gap: 18px; }
.zoom-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line-faint); }
.zoom-label { grid-column: 1 / -1; font-size: 13px; font-weight: 700; color: var(--ink-muted); letter-spacing: 0; }
.zoom-val { font-size: clamp(30px, 8vw, 48px); line-height: 1.1; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .02em; overflow-wrap: anywhere; user-select: all; }
.zoom-val.first { font-size: clamp(40px, 10.6vw, 60px); color: var(--ink); }
.zoom-row .btn { min-width: 92px; }
@media (max-width: 480px) { .modal.zoom { padding: 16px 14px; } .zoom-row { grid-template-columns: 1fr; } .zoom-row .btn { width: 100%; } }
.num-tap, .nowrap { white-space: nowrap; }
@media (max-width: 560px) { .q-mine .btn.grow { flex: 1 1 100%; } }

/* Receipt viewer (Queue › Completed today) */
.modal.rviewer { width: min(760px, calc(100vw - 16px)); max-height: calc(100vh - 16px); gap: 12px; }
.rv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.rv-head > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rv-head strong { font-size: 20px; }
.rv-img { display: flex; justify-content: center; background: var(--surface-100); border-radius: var(--radius-md); padding: 8px; max-height: 62vh; overflow: auto; }
.rv-img img { max-width: 100%; max-height: calc(62vh - 16px); object-fit: contain; border-radius: 8px; cursor: zoom-in; background: #fff; }
.rv-img.full { max-height: 70vh; justify-content: flex-start; }
.rv-img.full img { max-width: none; max-height: none; cursor: zoom-out; }
.rv-actions .btn-primary { flex: 1 1 220px; }
.tab-show h1 { margin: 4px 0; }
.tab-show { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.tab-kicker { margin: 0; font-weight: 700; color: var(--ink-muted); letter-spacing: 0; font-size: 13px; }
.tab-show .tab-btn { min-width: 200px; }

/* Customer screen: today's requests */
.tab-today-btn { min-height: 44px; }
.today-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.today-item { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-0); }
.today-no { font-size: 18px; font-variant-numeric: tabular-nums; }
.today-main { font-size: 20px; font-weight: 700; }
.tab-btn-sm { align-self: flex-start; margin-top: 6px; min-height: 48px; padding: 0 20px; font-size: 16px; }
.today-detail { font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
/* The customer sees the screenshot as is: full width, the whole picture, scroll to read it. */
.tab-show .tab-receipt { max-width: 720px; }
.tab-show .tab-receipt img { max-height: none; width: 100%; height: auto; }
.tab-head { display: flex; align-items: center; gap: 12px; }
.tab-head .grow { flex: 1; min-width: 0; }
.tab-today-btn { min-height: 48px; font-size: 16px; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.badge-n { background: var(--surface-0); color: var(--brand-700, var(--brand-600)); border-radius: 999px; padding: 0 8px; font-size: 13px; font-weight: 800; line-height: 20px; }
@media (max-width: 420px) { .tab-today-btn { padding: 0 12px; font-size: 15px; } }
.tab-head .grow { display: flex; flex-direction: column; gap: 2px; }
.tab-head .grow strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Google Drive filing ---------- */
.gd-card h2 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gd-how { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.gd-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px 16px; margin: 0; }
.gd-facts div { display: flex; flex-direction: column; min-width: 0; }
.gd-facts dt { font-size: 13px; font-weight: 600; color: var(--ink-muted); letter-spacing: 0; }
.gd-facts dd { margin: 0; overflow-wrap: anywhere; font-weight: 600; }
.gd-folders { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.gd-folders li { padding: 8px 12px; background: var(--surface-100); border: 1px solid var(--line-faint); border-radius: var(--radius-sm); overflow-wrap: anywhere; }
.gd-filed { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; border: 1px dashed var(--line); border-radius: var(--radius-md); }
.gd-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-weight: 500; }
.gd-banner > span:first-child { flex: 1 1 280px; }
.confirm-box { border: 2px solid var(--danger); border-radius: var(--radius-md); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.confirm-box p { margin: 0; }
.narrow-card { max-width: 640px; }
/* demo copy of Google's folder chooser */
#gd-demo-picker .modal-back { position: fixed; inset: 0; background: rgba(10, 20, 30, .45); z-index: 60; }
.gd-pick { position: fixed; z-index: 61; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto; background: var(--surface-0); border-radius: var(--radius-lg); padding: 16px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.gd-pick-head { display: flex; flex-direction: column; }
.gd-pick-q { min-height: 44px; border: 1px solid var(--control-border); border-radius: var(--radius-md); padding: 0 12px; font: inherit; background: var(--surface-0); color: var(--ink); }
.gd-crumbs { font-size: 13px; color: var(--ink-muted); }
.gd-crumbs button, .gd-list button { background: none; border: 0; font: inherit; color: var(--brand-600); cursor: pointer; padding: 4px 0; }
.gd-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-faint); }
.gd-list li { border-bottom: 1px solid var(--line-faint); }
.gd-list button { width: 100%; text-align: left; min-height: 44px; color: var(--ink); }
.gd-list button:hover { background: var(--surface-100); }

/* ---------- missed entries, corrections, deletions ---------- */
.when { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 10px 12px 12px; margin: 0; }
.when legend { font-weight: 600; padding: 0 6px; }
.when-row { align-items: flex-end; }
.when-row input[type="date"], .when-row input[type="time"] { min-height: 44px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--brand-600); }
.late-box { display: flex; flex-direction: column; gap: 8px; }
.tx-edit { border-top: 1px solid var(--line-faint); padding-top: 12px; }
.tx-edit .grid-2 { gap: 10px 12px; }
.tx-changes { font-size: 14px; }
.tx-changes summary { cursor: pointer; color: var(--brand-600); font-weight: 600; min-height: 32px; }
.tx-changes ul { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.lg-editing td { white-space: normal; }
.lg-editing .tx-edit { max-width: 760px; }

/* ---------- Customers ---------- */
@media (max-width: 760px) { .nav-item[href="#customers"] { display: none; } }
.cu-segs { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.tile-btn { text-align: left; cursor: pointer; font: inherit; color: inherit; border: 1px solid var(--line); }
.tile-btn:hover { border-color: var(--brand-600); }
.tile-btn.on { border-color: var(--brand-600); box-shadow: inset 0 0 0 1px var(--brand-600); background: var(--brand-100); }
.cu-boards { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.cu-board .rank li { display: grid; gap: 8px; grid-template-columns: 22px minmax(122px, 1.3fr) minmax(30px, 1fr) auto; align-items: center; }
.cu-who { display: flex; flex-direction: column; align-items: flex-start; text-align: left; background: none; border: 0; padding: 2px 0; font: inherit; color: inherit; cursor: pointer; min-width: 0; }
.cu-who strong { color: var(--brand-600); }
.cu-who small { color: var(--ink-muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.cu-q { min-height: 40px; border: 1px solid var(--control-border); border-radius: var(--radius-md); padding: 0 12px; font: inherit; background: var(--surface-0); color: var(--ink); min-width: 220px; }
.th-sort { background: none; border: 0; font: inherit; font-weight: 600; color: inherit; cursor: pointer; padding: 0; white-space: nowrap; }
.th-sort.on { color: var(--brand-600); }
.cu-title { font-variant-numeric: tabular-nums; }
.cu-names { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cu-names li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; background: var(--surface-100); border-radius: var(--radius-sm); overflow-wrap: anywhere; }
.cu-table td { vertical-align: top; }
.tile-date { font-size: 22px; line-height: 1.25; white-space: normal; display: block; }
.time-box { display: flex; gap: 6px; align-items: stretch; }
.time-box input[type="text"] { width: 96px; min-height: 44px; font-size: 18px; font-variant-numeric: tabular-nums; text-align: center; }
.ampm { display: inline-flex; border: 1px solid var(--control-border); border-radius: var(--radius-md); overflow: hidden; }
.ampm button { min-width: 48px; min-height: 44px; border: 0; background: var(--surface-0); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.ampm button + button { border-left: 1px solid var(--control-border); }
.ampm button.on { background: var(--brand-600); color: #fff; }
.time-field small.err { color: var(--danger); }

/* Elements hidden with the hidden attribute stay hidden even when a class sets display. */
[hidden] { display: none !important; }

/* ---------- Cash In / Cash Out at a glance ---------- */
.tt { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px 2px 7px; border-radius: 999px; font-size: 13px; font-weight: 700; line-height: 1.5; white-space: nowrap; letter-spacing: .01em; }
.tt-in { color: var(--cash-in); background: var(--cash-in-bg); }
.tt-out { color: var(--cash-out); background: var(--cash-out-bg); }
.tt-adj { color: var(--adj); background: var(--adj-bg); font-weight: 600; }
.tx-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tx-row.t-in, .tx-row.t-out, .tx-row.t-adj { padding-left: 12px; box-shadow: inset 4px 0 0 var(--cash-in); }
.tx-row.t-out { box-shadow: inset 4px 0 0 var(--cash-out); }
.tx-row.t-adj { box-shadow: inset 4px 0 0 var(--line); }
.tx-row.voided { box-shadow: inset 4px 0 0 var(--line-faint); }
.tx-row.voided .tt { opacity: .6; }
.done-list li.t-in, .done-list li.t-out { padding-left: 12px; box-shadow: inset 4px 0 0 var(--cash-in); }
.done-list li.t-out { box-shadow: inset 4px 0 0 var(--cash-out); }
.chip.chip-in.on { background: var(--cash-in); border-color: var(--cash-in); color: var(--surface-0); }
.chip.chip-out.on { background: var(--cash-out); border-color: var(--cash-out); color: var(--surface-0); }
.chip.chip-in:not(.on) { color: var(--cash-in); }
.chip.chip-out:not(.on) { color: var(--cash-out); }
.segmented .seg-in.on { background: var(--cash-in); color: var(--surface-0); }
.segmented .seg-out.on { background: var(--cash-out); color: var(--surface-0); }
/* Ledger rows: coloured edge by type */
.table.lg tr.t-in > td:first-child { box-shadow: inset 4px 0 0 var(--cash-in); }
.table.lg tr.t-out > td:first-child { box-shadow: inset 4px 0 0 var(--cash-out); }
.table.lg tr.t-adj > td:first-child { box-shadow: inset 4px 0 0 var(--line); }
.table.lg tr.lg-void > td:first-child { box-shadow: inset 4px 0 0 var(--line-faint); }
.lg-sum .tt { font-size: 13px; padding: 0 6px; }
.lg-selecting { border: 1px solid var(--brand-600); }

/* Desktop: side bar runs the full height */
@media (min-width: 761px) { .app-shell { background: linear-gradient(to right, var(--surface) 0 239px, var(--line) 239px 240px, transparent 240px); } }
/* Phones: long filter rows scroll sideways in one line instead of stacking (less to scan, same choices visible) */
@media (max-width: 760px) {
  .chips, .jchips { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 2px 20px; scroll-padding: 20px; }
  .chips::-webkit-scrollbar, .jchips::-webkit-scrollbar { display: none; }
  .chips > *, .jchips > * { flex: none; }
  .page-head .btn { min-height: 48px; padding: 0 16px; font-size: 15px; }
}
.when-now { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; padding: 4px 16px; border: 1px solid var(--line); border-radius: var(--r-12); background: var(--surface); }
.when-now > span { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.when-now strong { color: var(--ink); }
.nav-phone { display: none !important; }
@media (max-width: 760px) { .nav-phone { display: flex !important; } }
/* Dark mode: the income tile keeps strong contrast */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tile-hero { background: #1E3A8A; border-color: #2B4BA8; color: #fff; } :root:not([data-theme="light"]) .tile-hero .tile-label, :root:not([data-theme="light"]) .tile-hero .tile-note, :root:not([data-theme="light"]) .wk-day { color: #fff; } :root:not([data-theme="light"]) .wk-bar { background: #fff; } }
:root[data-theme="dark"] .tile-hero { background: #1E3A8A; border-color: #2B4BA8; color: #fff; }
/* Customer screen header: the store name always reads in full */
.tab-head { padding: 16px 20px; }
.tab-head .grow strong { white-space: normal; overflow: visible; font: 700 22px/28px var(--display); }
.tab-head small { font-size: 15px; line-height: 20px; }
@media (max-width: 480px) { .tab-head { flex-wrap: wrap; } .tab-head #t-today-slot { flex-basis: 100%; } .tab-head #t-today-slot .btn { width: 100%; } }
/* Ledger: names and staff stay on one line; the table scrolls sideways when the screen is narrow */
.table.lg td:nth-last-child(-n+7) { white-space: nowrap; }
.table.lg td { white-space: nowrap; }
.table.lg td:nth-last-child(2) { white-space: normal; min-width: 160px; }
.card > .btn:not(.btn-block), .card > .row > .btn:only-child { align-self: flex-start; }
/* Touch targets: links inside text and tables keep their look but get a 44px tall tap area */
.num-tap { padding: 11px 4px; margin: -11px -4px; display: inline-block; line-height: 22px; }
.cell-btn { padding: 11px 6px; margin: -11px -6px; display: inline-block; line-height: 22px; }
.th-sort { min-height: 44px; display: inline-flex; align-items: center; }
.cu-q { min-height: 48px; }
.btn-send { min-height: 64px; font-size: 18px; }
