/* Fonts: Inter for everything, Playfair Display for the sign-in and the websites. Self-hosted (public/assets/fonts), nothing from a third party. */
@font-face { font-family: "Playfair Display"; src: url("../fonts/PlayfairDisplay-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url("../fonts/PlayfairDisplay-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url("../fonts/PlayfairDisplay-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-var.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

/* Platform stylesheet. One component library on design tokens; each company's brand comes in
   as --brand / --brand-ink / --accent from a nonce'd style block. Phone width first (360 px). */

:root {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #eef2f6;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #5b6676;
  --brand: #334155;
  --brand-ink: #ffffff;
  --accent: #d97706;
  --accent-ink: #111111;
  --ok: #166534;
  --ok-soft: #dcfce7;
  --warn: #92400e;
  --warn-soft: #fef3c7;
  --bad: #b91c1c;
  --bad-soft: #fee2e2;
  --info: #1e40af;
  --info-soft: #dbeafe;
  --neutral-soft: #eef2f6;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 2px 6px rgba(15, 23, 42, .06);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, .18);
  --ring: 0 0 0 3px color-mix(in srgb, var(--brand) 40%, transparent);
  --topbar-h: 56px;
  --sidebar-w: 248px;
  --tabbar-h: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Ubuntu, sans-serif;
  --font-display: "Playfair Display", "Iowan Old Style", Palatino, Georgia, serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0e1319;
  --surface: #151b23;
  --surface-2: #1a212b;
  --surface-3: #212a36;
  --border: #29323f;
  --border-strong: #3a4554;
  --text: #e6e9ee;
  --text-2: #c4cbd5;
  --muted: #98a3b3;
  --ok: #86efac;
  --ok-soft: rgba(34, 197, 94, .16);
  --warn: #fcd34d;
  --warn-soft: rgba(245, 158, 11, .16);
  --bad: #fca5a5;
  --bad-soft: rgba(239, 68, 68, .16);
  --info: #93c5fd;
  --info-soft: rgba(59, 130, 246, .18);
  --neutral-soft: rgba(148, 163, 184, .14);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1319;
    --surface: #151b23;
    --surface-2: #1a212b;
    --surface-3: #212a36;
    --border: #29323f;
    --border-strong: #3a4554;
    --text: #e6e9ee;
    --text-2: #c4cbd5;
    --muted: #98a3b3;
    --ok: #86efac;
    --ok-soft: rgba(34, 197, 94, .16);
    --warn: #fcd34d;
    --warn-soft: rgba(245, 158, 11, .16);
    --bad: #fca5a5;
    --bad-soft: rgba(239, 68, 68, .16);
    --info: #93c5fd;
    --info-soft: rgba(59, 130, 246, .18);
    --neutral-soft: rgba(148, 163, 184, .14);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}
img, svg { max-width: 100%; }
a { color: var(--brand); text-underline-offset: 2px; }
:root[data-theme="dark"] a { color: color-mix(in srgb, var(--brand) 45%, #ffffff); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) a { color: color-mix(in srgb, var(--brand) 45%, #ffffff); } }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .75rem; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 70%, #2563eb); outline-offset: 2px; }
.icon { width: 1.25rem; height: 1.25rem; flex: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: .5rem 1rem; z-index: 100; border-radius: var(--radius-sm); }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; }
.nowrap { white-space: nowrap; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; color: var(--muted); font-weight: 600; margin-bottom: .25rem; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---- App shell ------------------------------------------------------------------------- */
.layout-app .main { padding: calc(var(--topbar-h) + 16px) 16px calc(var(--tabbar-h) + var(--safe-bottom) + 24px); max-width: 1100px; margin: 0 auto; }
.layout-app .main-wide { max-width: 1400px; }
.topbar {
  position: fixed; inset: 0 0 auto 0; height: var(--topbar-h); z-index: 30;
  display: flex; align-items: center; gap: .5rem; padding: 0 8px 0 4px;
  background: var(--brand); color: var(--brand-ink);
  box-shadow: var(--shadow);
}
.topbar .icon-btn { color: var(--brand-ink); }
.topbar-end { margin-left: auto; display: flex; align-items: center; gap: .25rem; min-width: 0; }
.who { font-size: .875rem; max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: none; }
.company-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.company-switch select {
  font: inherit; font-weight: 600; color: var(--brand-ink); background: transparent;
  border: 1px solid color-mix(in srgb, var(--brand-ink) 45%, transparent); border-radius: var(--radius-sm);
  padding: .4rem 1.8rem .4rem .6rem; min-height: 40px; max-width: 12.5rem; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 14px) 52%, calc(100% - 9px) 52%; background-size: 5px 5px; background-repeat: no-repeat;
}
.company-switch select option { color: #111; background: #fff; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer;
}
.icon-btn:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.theme-light { display: none; }
:root[data-theme="dark"] .theme-light { display: block; }
:root[data-theme="dark"] .theme-dark { display: none; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; width: min(86vw, var(--sidebar-w)); z-index: 50;
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; transform: translateX(-102%); transition: transform .2s ease;
}
.sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
.sidebar-head { display: flex; align-items: center; gap: .6rem; height: var(--topbar-h); padding: 0 8px 0 16px; border-bottom: 1px solid var(--border); }
.brand-mark { width: 32px; height: 32px; border-radius: 8px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 700; font-size: .8rem; }
.brand-name { font-weight: 700; flex: 1; }
.sidebar nav { flex: 1; overflow-y: auto; padding: 8px; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar a, .sidebar .linklike {
  display: flex; align-items: center; gap: .75rem; padding: .7rem .8rem; border-radius: var(--radius-sm);
  color: var(--text-2); text-decoration: none; min-height: 44px; width: 100%; font: inherit; font-weight: 500;
}
.sidebar a:hover, .sidebar .linklike:hover { background: var(--surface-3); color: var(--text); }
.sidebar a[aria-current="page"] { background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--text); font-weight: 650; box-shadow: inset 3px 0 0 var(--brand); }
.nav-group { margin-top: .35rem; }
.nav-group > summary {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 32px; padding: .6rem .8rem .3rem;
  list-style: none; cursor: pointer; border-radius: var(--radius-sm); color: var(--muted); font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; user-select: none;
}
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary:hover { color: var(--text-2); }
.nav-group > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.nav-group > summary .icon { width: 14px; height: 14px; transition: transform .15s ease; }
.nav-group[open] > summary .icon { transform: rotate(90deg); }
.nav-group[data-here] > summary { color: var(--text-2); }
@media (pointer: fine) { .sidebar nav a { min-height: 38px; padding: .5rem .8rem; } }
@media (prefers-reduced-motion: reduce) { .nav-group > summary .icon { transition: none; } }
.sidebar-foot { border-top: 1px solid var(--border); padding: 8px; }
.sidebar-foot form { margin: 0; }
.linklike { background: none; border: 0; cursor: pointer; text-align: left; }
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 40; }

.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 30; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  height: calc(var(--tabbar-h) + var(--safe-bottom)); padding-bottom: var(--safe-bottom);
  background: var(--surface); border-top: 1px solid var(--border);
}
.tabbar a, .tabbar button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font: inherit; font-size: .75rem; color: var(--muted); text-decoration: none; background: none; border: 0; cursor: pointer; min-height: 48px;
}
.tabbar a:hover, .tabbar button:hover { color: var(--text); }

@media (min-width: 1024px) {
  .sidebar { transform: none; width: var(--sidebar-w); }
  .sidebar-close, .nav-open, .scrim, .tabbar { display: none !important; }
  .topbar { left: var(--sidebar-w); padding-left: 24px; }
  .layout-app .main { margin-left: var(--sidebar-w); padding: calc(var(--topbar-h) + 24px) 32px 48px; }
  .layout-app .main { max-width: calc(1100px + var(--sidebar-w)); }
  .layout-app .main-wide { max-width: none; }
  .who { display: inline; }
}
@media (min-width: 1024px) and (min-width: 1360px) { .layout-app .main:not(.main-wide) { margin-left: calc(var(--sidebar-w) + max(0px, (100vw - var(--sidebar-w) - 1100px) / 2 - 32px)); } }

/* ---- Page parts ------------------------------------------------------------------------ */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem 1rem; margin-bottom: 1rem; }
.page-head h1 { margin: 0; }
.page-head .lead { margin: .25rem 0 0; color: var(--muted); }
.page-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.backlink { display: inline-flex; align-items: center; gap: .25rem; margin-bottom: .75rem; text-decoration: none; font-weight: 500; min-height: 44px; }
.flashes:empty { display: none; }
.flashes { margin-bottom: 1rem; display: grid; gap: .5rem; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 1rem; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.card-head h2 { margin: 0; font-size: 1.05rem; }
.card-body { padding: 16px; }
.card-foot { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; }
.card-body > :last-child { margin-bottom: 0; }
.grid-2 { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
/* A grid cell never grows past the screen because of a wide table or a long word inside it. */
.grid-2 > *, .dash-grid > *, .site-cards > *, .form-grid > *, .site-footer-grid > *, .site-reviews > * { min-width: 0; }
@media (min-width: 800px) { .grid-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.stack > * + * { margin-top: .75rem; }

.big-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 1.25rem; }
.big-action {
  display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; padding: 16px; min-height: 104px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  color: var(--text); text-decoration: none; font-weight: 600;
}
.big-action .icon { width: 28px; height: 28px; color: var(--brand); }
:root[data-theme="dark"] .big-action .icon { color: color-mix(in srgb, var(--brand) 40%, #fff); }
.big-action small { font-weight: 400; color: var(--muted); }
.big-action:hover { border-color: var(--brand); }

.kv { display: grid; grid-template-columns: minmax(8rem, 34%) 1fr; gap: .5rem 1rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }

.empty { text-align: center; padding: 2rem 1rem; color: var(--muted); }
.empty-title { font-weight: 600; color: var(--text); }

/* ---- Buttons ------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .6rem 1.1rem; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--surface-3); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink) !important; }
.btn-primary:hover { background: color-mix(in srgb, var(--brand) 86%, #000); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink) !important; }
.btn-danger { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-sm { min-height: 40px; padding: .35rem .8rem; font-size: .9rem; }
.btn-lg { min-height: 56px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }
.inline-form { display: inline; margin: 0; }

/* ---- Pills and alerts ------------------------------------------------------------------ */
.pill { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-bad { background: var(--bad-soft); color: var(--bad); }
.pill-info { background: var(--info-soft); color: var(--info); }
.pill-neutral { background: var(--neutral-soft); color: var(--text-2); }
.alert { display: flex; gap: .6rem; align-items: flex-start; padding: .75rem 1rem; border-radius: var(--radius-sm); }
.alert .icon { margin-top: .1rem; }
.alert-success { background: var(--ok-soft); color: var(--ok); }
.alert-error { background: var(--bad-soft); color: var(--bad); }
.alert-warning { background: var(--warn-soft); color: var(--warn); }
.alert-info { background: var(--info-soft); color: var(--info); }
.alert span { color: var(--text); }

/* ---- Forms --------------------------------------------------------------------------- */
.form-grid { display: grid; gap: 0 1rem; }
@media (min-width: 720px) { .form-grid.cols-2 { grid-template-columns: 1fr 1fr; } .form-grid .span-2 { grid-column: 1 / -1; } }
@media (min-width: 720px) { .form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: .35rem; }
.optional { font-weight: 400; color: var(--muted); font-size: .875rem; }
.field input, .field select, .field textarea, .input {
  width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: .65rem .75rem; min-height: 48px;
}
.field input[type="file"] { padding: .55rem; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.field .hint { font-size: .875rem; color: var(--muted); margin: .35rem 0 0; }
.field .error { font-size: .875rem; color: var(--bad); margin: .35rem 0 0; font-weight: 600; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--bad); }
.checks { display: grid; gap: .25rem; margin: 0 0 1rem; padding: 0; border: 0; }
.checks legend { font-weight: 600; margin-bottom: .35rem; padding: 0; }
.check { display: flex; align-items: center; gap: .6rem; min-height: 44px; font-weight: 500; }
.check input { width: 24px; height: 24px; flex: 0 0 auto; accent-color: var(--brand); }
/* Every checkbox and radio at least 24 px (WCAG 2.5.8), never squeezed by a long label beside it. */
input[type="checkbox"], input[type="radio"] { min-width: 20px; min-height: 20px; flex-shrink: 0; accent-color: var(--brand); }
td > input[type="checkbox"], th > input[type="checkbox"] { width: 24px; height: 24px; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.filters .input, .filters select { width: auto; flex: 1 1 10rem; min-height: 44px; }

/* ---- Tables (collapse to cards on phones) ---------------------------------------------- */
.table-wrap { overflow-x: auto; position: relative; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: .7rem 1rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; background: var(--surface-2); }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.cell-title { font-weight: 600; }
.cell-sub { font-size: .875rem; color: var(--muted); }
.table a.cell-title { text-decoration: none; }
.table a.cell-title:hover { text-decoration: underline; }
@media (max-width: 719px) {
  .table.responsive thead { display: none; }
  .table.responsive tr { display: block; padding: .75rem 1rem; border-bottom: 1px solid var(--border); }
  .table.responsive tr:last-child { border-bottom: 0; }
  .table.responsive td { display: flex; justify-content: space-between; gap: 1rem; padding: .2rem 0; border: 0; }
  .table.responsive td::before { content: attr(data-label); color: var(--muted); font-size: .875rem; flex: none; }
  .table.responsive td.primary-cell { display: block; padding-bottom: .4rem; }
  .table.responsive td.primary-cell::before { content: none; }
  .table.responsive td.num { text-align: right; }
}

/* ---- Auth ---------------------------------------------------------------------------- */
.layout-auth { background: var(--bg); }
.layout-auth .main { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-rows: auto 1fr; padding: 0; }
.auth-side { position: relative; overflow: hidden; padding: 28px 20px 22px; color: #fff; background: linear-gradient(135deg, #1e293b 0%, #334155 55%, #475569 100%); isolation: isolate; }
.auth-side::before { content: ""; position: absolute; inset: -40% -20% auto auto; width: 70vw; max-width: 520px; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(217, 119, 6, .55), transparent 62%); z-index: -1; }
.auth-side::after { content: ""; position: absolute; inset: auto auto -50% -15%; width: 60vw; max-width: 460px; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(34, 197, 94, .35), transparent 62%); z-index: -1; }
.auth-side-in { max-width: 520px; }
.auth-mark { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); font-weight: 800; letter-spacing: .04em; margin-bottom: 14px; }
.auth-side h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 4.5vw, 2.4rem); line-height: 1.1; margin: 0 0 8px; letter-spacing: -.01em; }
.auth-side p { margin: 0; color: rgba(255, 255, 255, .82); font-size: .98rem; line-height: 1.5; max-width: 44ch; }
.auth-side ul { list-style: none; margin: 18px 0 0; padding: 0; display: none; gap: 8px; }
.auth-side li { display: flex; align-items: center; gap: 10px; color: rgba(255, 255, 255, .9); font-size: .95rem; }
.auth-side li .icon { width: 18px; height: 18px; color: #fbbf24; flex: none; }
.auth-wrap { display: grid; place-items: start center; padding: 20px 16px 40px; }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); padding: 28px 24px; margin-top: -28px; }
.auth-card h1 { font-size: 1.5rem; font-family: var(--font-display); letter-spacing: -.01em; }
.auth-card .btn-lg { min-height: 52px; border-radius: 12px; }
.auth-card .input { min-height: 50px; border-radius: 12px; }
@media (min-width: 900px) {
  .layout-auth .main { grid-template-rows: none; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  .auth-side { display: flex; align-items: center; padding: 64px 56px; min-height: 100vh; }
  .auth-side ul { display: grid; }
  .auth-wrap { place-items: center; padding: 40px 32px; }
  .auth-card { margin-top: 0; padding: 36px 32px; }
}
.auth-foot { margin-top: 1rem; font-size: .9rem; color: var(--muted); }
.dev-code { background: var(--warn-soft); color: var(--warn); border-radius: var(--radius-sm); padding: .5rem .75rem; font-size: .9rem; margin-bottom: 1rem; }
.otp-input { font-size: 1.6rem !important; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
.totp-qr { display: block; width: 220px; max-width: 100%; margin: .5rem auto 1rem; border-radius: 8px; }
.secret { word-break: break-all; background: var(--surface-3); padding: .5rem .75rem; border-radius: var(--radius-sm); display: block; text-align: center; }
.codes { columns: 2; font-size: 1.05rem; padding-left: 1.2rem; }
.debug { white-space: pre-wrap; font-size: .8rem; background: var(--surface-3); padding: .75rem; border-radius: 8px; overflow-x: auto; }

/* ---- Station screens ------------------------------------------------------------------- */
.layout-station { background: var(--bg); }
.station-bar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: 10px 12px; background: var(--brand); color: var(--brand-ink); min-height: 64px; overflow: hidden; max-width: 100vw;
}
.station-id { flex: 1 1 auto; }
.station-who { flex: 0 1 auto; gap: .35rem; }
@media (max-width: 640px) {
  .station-bar { gap: .35rem; padding: 8px 8px; }
  .station-company { font-size: .95rem; }
  .station-name { font-size: .78rem; }
  .sync-chip { padding: .35rem .55rem; }
  .sync-chip .sync-text { display: none; }
  .btn-station-switch { padding: .4rem .55rem; min-height: 40px; }
  .btn-guide .lbl { display: none; }
  .station-who form .btn-station-switch { font-size: 0; gap: 0; }
  .station-who form .btn-station-switch .icon { font-size: 1rem; width: 20px; height: 20px; }
}
.station-id { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.station-company { font-weight: 700; }
.station-name { font-size: .85rem; opacity: .9; }
.station-who { display: flex; align-items: center; gap: .5rem; font-weight: 600; min-width: 0; }
.station-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.station-who form { margin: 0; }
.btn-station-switch { background: var(--brand-ink); color: var(--brand); border: 0; min-height: 44px; padding: .4rem .8rem; }
.btn-station-switch:hover { background: color-mix(in srgb, var(--brand-ink) 85%, var(--brand)); }
.layout-station .main { padding: 16px 12px 32px; max-width: 900px; margin: 0 auto; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; text-align: center;
  min-height: 120px; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); text-decoration: none; font-weight: 600; box-shadow: var(--shadow);
}
.tile:hover { border-color: var(--brand); }
.avatar { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 15%, var(--surface)); color: var(--text); font-weight: 700; }
.tile small { font-weight: 400; color: var(--muted); }
.pin-panel { max-width: 340px; margin: 0 auto; text-align: center; }
.pin-dots { display: flex; justify-content: center; gap: 14px; margin: 1rem 0 1.25rem; min-height: 22px; }
.pin-dots span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border-strong); }
.pin-dots span.on { background: var(--brand); border-color: var(--brand); }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pinpad button {
  min-height: 64px; font: inherit; font-size: 1.5rem; font-weight: 600; border-radius: 14px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; box-shadow: var(--shadow);
}
.pinpad button:active { background: var(--surface-3); }
.pinpad .pin-ok { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); font-size: 1.1rem; }
.pin-field { position: absolute; opacity: 0; pointer-events: none; height: 1px; width: 1px; }
.station-home h1 { font-size: 1.3rem; }

/* ---- Badges (CR80 cards, the same markup on screen and in print) --------------------- */
.card-sheet { display: flex; flex-wrap: wrap; gap: 16px; }
.idcard-pair { display: flex; flex-wrap: wrap; gap: 6mm; }
.idcard {
  width: 85.6mm; height: 54mm; border-radius: 3.18mm; overflow: hidden; position: relative; background: #fff; color: #111;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25); font-family: var(--font); -webkit-print-color-adjust: exact; print-color-adjust: exact;
  display: flex; flex-direction: column;
}
.idcard-band { height: 12.5mm; background: var(--bp); color: var(--bi); display: flex; align-items: center; gap: 2.5mm; padding: 0 3.5mm; border-bottom: .9mm solid var(--ba); }
.idcard-logo { height: 9.5mm; width: auto; max-width: 22mm; object-fit: contain; background: #fff; border-radius: 1.2mm; padding: .6mm; }
.idcard-company { font-weight: 700; font-size: 3.3mm; line-height: 1.15; }
.idcard-body { flex: 1; display: grid; grid-template-columns: 19mm minmax(0, 1fr) 24mm; gap: 2.5mm; padding: 2.5mm 3mm 2.5mm 3.5mm; align-items: center; }
.idcard-photo { width: 19mm; height: 24mm; border-radius: 1.5mm; overflow: hidden; background: #eef0f3; display: grid; place-items: center; border: .3mm solid #d5d9df; }
.idcard-photo img { width: 100%; height: 100%; object-fit: cover; }
.idcard-photo span { font-size: 7mm; font-weight: 700; color: #6b7280; }
.idcard-text { min-width: 0; align-self: stretch; display: flex; flex-direction: column; justify-content: center; gap: .6mm; }
.idcard-name { font-weight: 800; font-size: 4.2mm; line-height: 1.1; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.idcard-name.is-long { font-size: 3.6mm; }
.idcard-name.is-verylong { font-size: 3.1mm; }
.idcard-post { font-size: 2.9mm; font-weight: 600; color: #333; line-height: 1.15; }
.idcard-dept { font-size: 2.6mm; color: #555; }
.idcard-no { margin-top: 1mm; font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; font-size: 3.2mm; letter-spacing: .2mm; }
.idcard-label { margin-top: 1mm; font-size: 2.3mm; font-weight: 600; color: #555; text-transform: uppercase; letter-spacing: .2mm; }
.customer-card .idcard-no { margin-top: 0; }
.idcard-company .idcard-call { display: block; font-weight: 600; font-size: 2.6mm; opacity: .92; }
.customer-card .idcard-body { padding-block: 1.5mm 1mm; }
.idcard-foot { padding: 0 3.5mm 1.8mm; font-size: 2.25mm; line-height: 1.25; color: #444; }
.idcard-qr { width: 24mm; height: 24mm; }
.idcard-qr svg { width: 24mm; height: 24mm; display: block; }
.idcard-back-band { height: 4mm; background: var(--bp); border-bottom: .9mm solid var(--ba); }
.idcard-back-body { flex: 1; padding: 4mm 5mm; display: flex; flex-direction: column; gap: 2mm; }
.idcard-back-text { font-size: 2.9mm; line-height: 1.35; margin: 0; }
.idcard-back-contact { font-size: 2.7mm; font-weight: 600; margin: 0; }
.idcard-back-no { font-size: 2.5mm; color: #555; margin: auto 0 0; }
/* Staff badges are one SVG per face (src/badges.php); the rules above serve customer cards. */
.idcard > .idcard-svg { display: block; width: 100%; height: 100%; }
.badge-actions { margin: 0 0 1.25rem; justify-content: flex-start; }
.badge-actions .dropdown-menu { right: auto; left: 0; }
.badge-faces { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 24px; margin: 0 0 1rem; }
.badge-face { margin: 0; max-width: 540px; }
.badge-face svg { display: block; width: 100%; height: auto; border-radius: 3.7% / 5.9%; box-shadow: 0 8px 24px rgba(0, 0, 0, .16), 0 1px 3px rgba(0, 0, 0, .18); }
.badge-face figcaption { margin-top: .6rem; color: var(--muted); font-size: .85rem; font-weight: 600; text-align: center; }
.scanner { position: relative; display: grid; place-items: center; min-height: 150px; margin: 0 0 1rem; border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-2); overflow: hidden; }
.scanner.is-live { aspect-ratio: 4 / 3; max-height: 55vh; border-style: solid; background: #000; }
.scanner video { width: 100%; height: 100%; object-fit: cover; }
.scanner.is-live .scanner-idle { display: none; }
.scanner.is-live::after { content: ""; position: absolute; inset: 16% 20%; border: 3px solid rgba(255, 255, 255, .9); border-radius: 14px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .3); pointer-events: none; }
.scanner-idle { display: grid; justify-items: center; gap: .75rem; padding: 1.25rem 1rem; text-align: center; }
.scanner-idle > .icon { width: 40px; height: 40px; color: var(--muted); }
.scanner-idle .hint { margin: 0; }

.print-only { display: none; }
@media print {
  @page { size: A4; margin: 10mm; }
  body { background: #fff !important; }
  .sidebar, .topbar, .tabbar, .scrim, .no-print, .flashes, .backlink, .skip, .page-head { display: none !important; }
  .layout-app .main { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  .print-only { display: block; }
  /* No buttons, links styled as buttons or form controls on paper (29 Oct 2026, James). */
  button, .btn, .page-actions, .filters, .pager, .card-foot, .app-footer, .toasts, [data-print], [data-close] { display: none !important; }
  .card-sheet { gap: 4mm; display: block; }
  .idcard-pair { break-inside: avoid; margin-bottom: 4mm; gap: 2mm; }
  .idcard { box-shadow: none; outline: .2mm dashed #bbb; }
  .sheet-cardprinter .idcard-pair { display: block; margin: 0; }
  .sheet-cardprinter .idcard { border-radius: 0; outline: 0; break-after: page; }
}

.confirm-dialog { border: 0; border-radius: var(--radius); padding: 20px; max-width: min(92vw, 420px); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
.confirm-dialog::backdrop { background: rgba(0, 0, 0, .45); }
.confirm-dialog p { font-size: 1.05rem; margin-bottom: 1rem; }
.confirm-dialog .page-actions { justify-content: flex-end; }
.mt-2 { margin-top: 1.5rem; }
.narrow { max-width: 440px; margin-left: auto; margin-right: auto; }
.avatar-lg { width: 72px; height: 72px; font-size: 1.4rem; margin: 0 auto .5rem; }

.person-head { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.person-head h1 { overflow-wrap: anywhere; }
.person-photo, .company-logo { width: 72px; height: 72px; flex: none; border-radius: 14px; overflow: hidden; background: var(--surface-3); display: grid; place-items: center; font-weight: 700; font-size: 1.4rem; color: var(--muted); }
.person-photo img { width: 100%; height: 100%; object-fit: cover; }
.company-logo { background: #fff; border: 1px solid var(--border); }
.company-logo img { max-width: 64px; max-height: 64px; object-fit: contain; }
.swatch { display: inline-flex; width: 44px; height: 28px; border-radius: 6px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }
.swatch span { flex: 1; }
.sw-a { flex: 2 !important; }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
.enrol-card { text-align: center; }
.enrol-code { font-size: 2.2rem; font-weight: 800; letter-spacing: .12em; margin: .25rem 0 .75rem; }
.enrol-qr { width: 180px; height: 180px; display: block; margin: .5rem auto; }
.credential .big-code { font-size: 1.25rem; font-weight: 800; letter-spacing: .08em; }
.changes div { font-size: .85rem; overflow-wrap: anywhere; }
.field input[type="color"] { padding: .25rem; height: 48px; }
@media (max-width: 419px) { .station-who > span { display: none; } }
.bell { position: relative; }
.bell-count { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #dc2626; color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center; }

/* ---- Till ------------------------------------------------------------------------------- */
.layout-station .main-wide { max-width: 1400px; }
.till-status { display: flex; gap: .5rem; align-items: center; min-height: 28px; margin-bottom: .5rem; }
.till-home { margin-left: auto; font-weight: 600; }
.till-rejects { display: grid; gap: .5rem; margin-bottom: .75rem; }
.till-rejects .alert { justify-content: space-between; align-items: center; }
.till-grid { display: grid; gap: 12px; }
@media (min-width: 900px) { .till-grid { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; } .till-cart { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow-y: auto; overscroll-behavior: contain; } }
.till-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.till-cats { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; }
.chip.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.till-buttons { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; }
.prod { min-height: 84px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 4px; text-align: left; padding: 10px 12px;
  border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; box-shadow: var(--shadow); cursor: pointer; }
.prod:active { background: var(--surface-3); }
.prod-name { font-weight: 700; line-height: 1.2; }
.prod-price { font-size: .9rem; color: var(--muted); }
.till-cart { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); }
.cart-lines { list-style: none; margin: 0; padding: 0; max-height: 46vh; overflow-y: auto; }
.cart-empty { color: var(--muted); padding: 1rem 0; text-align: center; }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.cl-name { font-weight: 600; display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.cl-qty { display: flex; align-items: center; gap: 6px; grid-row: span 2; }
.cl-qty .btn { min-width: 40px; }
.cl-n { min-width: 2ch; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
input.cl-n { width: 4.5ch; min-height: 40px; padding: 4px; text-align: center; }
.cl-tiers { grid-column: 1 / -1; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.till-later { grid-column: 1 / -1; }
.snapshot { max-height: 70vh; overflow: auto; font-size: .8rem; white-space: pre-wrap; word-break: break-word; }
.att-more > summary { cursor: pointer; padding: 12px 16px; min-height: 44px; font-weight: 600; color: var(--muted); }
.prod-break { display: block; padding: 0 10px 6px; font-size: .78rem; color: var(--muted); line-height: 1.3; }
.cl-price { font-size: .875rem; color: var(--muted); text-align: left; padding: 0; min-height: 32px; text-decoration: underline dotted; }
.cl-total { grid-column: 1 / -1; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0; font-size: 1.1rem; }
.cart-total strong { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.cart-pay { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cart-pay [data-clear] { grid-column: 1 / -1; }
.till-recent { margin-top: 12px; }
.till-recent summary { cursor: pointer; color: var(--muted); min-height: 40px; display: flex; align-items: center; }
.till-dialog { border: 0; border-radius: var(--radius); padding: 20px; width: min(94vw, 440px); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
.till-dialog::backdrop { background: rgba(0, 0, 0, .5); }
.till-dialog h2 { display: flex; justify-content: space-between; gap: 1rem; }
.till-dialog label { display: block; font-weight: 600; margin: .75rem 0 .35rem; }
.big-input { font-size: 1.6rem !important; font-variant-numeric: tabular-nums; }
.quick-cash { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.change-line { font-size: 1.2rem; margin: 1rem 0 .5rem; }
.mpesa-state { min-height: 3em; margin: .75rem 0; font-weight: 600; }
.till-dialog .page-actions { justify-content: flex-end; margin-top: 1rem; }
.pick { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px; }
.pick:has(input:checked) { border-color: var(--brand); box-shadow: var(--ring); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.price-grid .input { min-height: 44px; width: 100%; max-width: 8.5rem; }
.lines { display: grid; gap: 8px; }
.line-row { display: grid; grid-template-columns: minmax(0, 1fr) 7.5rem; gap: 8px; }
/* Labels */
.label-sheet { display: flex; flex-wrap: wrap; gap: 4mm; }
.label { background: #fff; color: #000; border: .2mm dashed #bbb; padding: 1.5mm 2mm; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5mm; align-items: center; overflow: hidden; font-family: var(--font); }
.label-product { font-weight: 800; font-size: 3.2mm; line-height: 1.1; }
.label-pack { font-size: 2.6mm; }
.label-dates { font-size: 2.4mm; line-height: 1.25; margin-top: .6mm; }
.label-batch { font-size: 2.6mm; font-weight: 700; margin-top: .4mm; }
.label-maker { font-size: 2mm; color: #333; }
.label-qr { width: 12mm; height: 12mm; }
@media print { .label-sheet { display: block; } .label { border: 0; break-after: page; } }
/* Gate */
.gate-counts { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-bottom: .75rem; color: var(--muted); }
.gate-counts strong { color: var(--text); font-size: 1.2rem; margin-left: .25rem; }
.gate-result { display: flex; gap: 12px; align-items: center; padding: 16px; border-radius: var(--radius); margin-bottom: 12px; font-weight: 600; }
.gate-result p { margin: 0; }
.gate-in { background: #15803d; color: #fff; }
.gate-out { background: #1e3a8a; color: #fff; }
.gate-bad { background: #b91c1c; color: #fff; }
.gate-wait, .gate-queued { background: var(--surface-3); color: var(--text); }
.gate-big { font-size: 1.7rem; font-weight: 800; line-height: 1.15; }
.gate-name { font-size: 1.25rem; }
.gate-photo { width: 88px; height: 110px; object-fit: cover; border-radius: 10px; border: 3px solid rgba(255, 255, 255, .7); flex: none; }
.gate-camera video { width: 100%; max-height: 50vh; border-radius: 12px; background: #000; margin: 10px 0; }
.gate-kinds { display: grid; gap: 8px; margin-top: 10px; grid-template-columns: 1fr 1fr; }
.gate-kinds .btn-lg { grid-column: 1 / -1; }
/* Threads, notifications, stats */
.thread { display: grid; gap: 10px; margin-bottom: 1rem; }
.msg { padding: 12px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.msg-recipient { background: var(--info-soft); border-color: transparent; }
.msg p { margin: 0 0 .35rem; overflow-wrap: anywhere; }
.speak { max-width: 560px; }
.codes-kv dd { font-size: 1.4rem; }
.notes { list-style: none; margin: 0; padding: 0; }
.notes li { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.notes li.unread { background: var(--info-soft); }
.stats .big-action { font-size: 1.3rem; font-variant-numeric: tabular-nums; min-height: 0; }
/* Requisition line editor: a table on wide screens, one card per line on phones. */
.card-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.choice-row { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.choice-row .choice { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; margin: 0; font-weight: 500; }
.req-lines-table { width: 100%; }
.req-lines-table td { vertical-align: top; padding: 8px 6px; }
.req-lines-table .req-no { width: 2.2rem; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 18px; }
.req-lines-table .req-item { min-width: 15rem; width: 30%; }
.req-lines-table .req-note { min-width: 10rem; }
.req-lines-table .req-qty { width: 6.5rem; }
.req-lines-table .req-unit { width: 8rem; }
.req-lines-table .req-price { width: 9.5rem; }
.req-lines-table .req-total { width: 8rem; padding-top: 18px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.req-lines-table input.num { text-align: right; }
.req-stockinfo { font-size: .8rem; margin-top: 4px; min-height: 0; }
.req-stockinfo:empty { display: none; }
.req-newstock { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; margin: 6px 0 0; font-size: .85rem; font-weight: 500; }
.req-newstock[hidden] { display: none; }
.req-newstock input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--brand); }
.req-newstock .input-sm { min-height: 34px; }
.req-row.is-new { animation: req-flash 1.2s ease-out; }
@keyframes req-flash { from { background: var(--info-soft); } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .req-row.is-new { animation: none; } }
.req-summary .kv dd strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
@media (max-width: 899px) {
  .req-lines-table thead { display: none; }
  .req-lines-table, .req-lines-table tbody, .req-lines-table tfoot { display: block; }
  .req-lines-table tfoot tr { display: flex; justify-content: space-between; padding: 10px 16px; }
  .req-lines-table tfoot th:last-child:empty { display: none; }
  .req-lines-table tbody tr { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr) minmax(0, 1fr) auto; gap: 6px 8px; padding: 12px 12px; border-bottom: 1px solid var(--border); }
  .req-lines-table td { display: block; padding: 0; border: 0; width: auto; min-width: 0; }
  .req-lines-table .req-no { grid-row: 1; grid-column: 1; padding-top: 12px; }
  .req-lines-table .req-item { grid-row: 1; grid-column: 2 / 4; width: auto; min-width: 0; }
  .req-lines-table .actions { grid-row: 1; grid-column: 4; }
  .req-lines-table .req-note { grid-row: 2; grid-column: 2 / 5; }
  .req-lines-table .req-qty { grid-row: 3; grid-column: 2; }
  .req-lines-table .req-unit { grid-row: 3; grid-column: 3 / 5; }
  .req-lines-table .req-price { grid-row: 4; grid-column: 2; }
  .req-lines-table .req-total { grid-row: 4; grid-column: 3 / 5; padding-top: 12px; text-align: right; }
}
.card-note { margin: 0; padding: 10px 16px 0; color: var(--muted); font-size: .9rem; }
.req-form fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
.req-form fieldset.field legend { font-weight: 600; padding: 0; margin-bottom: .35rem; }
.hide-sm { display: inline; }
@media (max-width: 719px) { .hide-sm { display: none; } }
progress.req-progress { width: 7rem; height: 8px; vertical-align: middle; accent-color: var(--info); }
progress.req-progress.is-ok { accent-color: var(--ok); }
.cl-price { min-height: 44px; }
.till-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 10px 16px calc(10px + var(--safe-bottom)); background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -4px 12px rgba(0, 0, 0, .08); font-size: 1.1rem; }
.till-bar strong { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
@media (min-width: 900px) { .till-bar { display: none !important; } }
@media (max-width: 899px) { .till { padding-bottom: 76px; } }
#till-pay { scroll-margin-top: 80px; }
.field-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.field-customer { padding: 8px 12px; border-radius: var(--radius-sm); background: var(--info-soft); margin-bottom: 8px; font-weight: 600; }
.route-stops { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; max-height: 60vh; overflow-y: auto; }
.route-pick { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; min-height: 52px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); text-align: left; font: inherit; cursor: pointer; text-decoration: none; }
.route-pick:hover, .route-pick:focus-visible { border-color: var(--brand); }
.route-no { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-weight: 700; font-variant-numeric: tabular-nums; }
.route-main { flex: 1; min-width: 0; display: grid; }
.route-main small { color: var(--muted); }
.route-main small.route-order, .field-order { color: var(--text); font-weight: 600; }
.field-order { margin: 4px 0; font-size: .92em; }
.field-customer .btn { margin-top: 4px; }
.route-state { flex: none; font-size: .8rem; color: var(--muted); }
.route-stop.is-done .route-no { background: var(--ok-soft); color: var(--ok); }
.route-stop.is-done .route-state { color: var(--ok); font-weight: 600; }
.field-video { width: 100%; max-height: 40vh; border-radius: 10px; background: #000; margin-bottom: 8px; }
.prod-left { font-size: .8rem; color: var(--muted); }
.prod:disabled { opacity: .45; }
.input-sm { min-height: 40px; padding: .35rem .6rem; width: auto; display: inline-block; max-width: 11rem; }
.qty-input { width: 6rem; text-align: right; }
.signatures { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.note-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.note-qr { width: 120px; height: 120px; flex: none; }
.packing { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.pack-group { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; }
.statement { border-top: 1px solid var(--border); }
.statement:first-of-type { border-top: 0; }
@media print { .load-note { box-shadow: none; border: 0; } }
.power { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 1rem 0; padding: 12px; border: 1px dashed var(--border-strong); border-radius: var(--radius); }
.debtor-body { grid-template-columns: minmax(0, 1fr) 24mm; }
.attention { list-style: none; margin: 0; padding: 0; }
.attention li a, .attention li > div { display: flex; gap: .75rem; align-items: center; padding: .7rem 1rem; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text); min-height: 48px; }
.attention li:last-child a { border-bottom: 0; }
.attention li a span { flex: 1; }
.att-bad .icon:first-child { color: var(--bad); }
.att-warn .icon:first-child { color: var(--warn); }
.att-info .icon:first-child { color: var(--info); }
/* The company cards fill every row to the end: three side by side on a wide screen, and when they
   wrap the last one stretches across its row instead of leaving an empty slot. */
.dash-grid { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 1rem; }
.dash-grid > * { flex: 1 1 300px; margin: 0; }
.dash-card .card-head h2 { display: flex; align-items: center; gap: .6rem; }
.dash-card .swatch { width: 28px; height: 18px; }
.dash-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.fig { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 14px 14px 14px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: inherit; overflow: hidden; transition: border-color .15s ease, transform .12s ease; }
.fig::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--brand); opacity: .85; }
.fig span { font-size: .8rem; color: var(--muted); font-weight: 600; }
.fig strong { font-size: 1.45rem; line-height: 1.15; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.fig small { font-size: .78rem; color: var(--muted); }
a.fig:hover { border-color: var(--brand); transform: translateY(-1px); }
@media (prefers-reduced-motion: reduce) { .fig { transition: none; } a.fig:hover { transform: none; } }
.section-row th { background: var(--surface-3); color: var(--text); font-size: .85rem; }

/* ---- Week 3: restaurant (floor, orders, kitchen screen, bills, portions) ---------------- */
.chip.is-active, a.chip[aria-current] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
a.chip { display: inline-flex; align-items: center; text-decoration: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem; }
.input-narrow { width: 6.5rem; max-width: 100%; }
.input-cell { min-width: 6.5rem; padding-left: 6px; padding-right: 6px; }
.actions-row { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; margin: -.5rem 0 1.25rem; }
.big-actions.compact { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
button.big-action { font: inherit; cursor: pointer; text-align: left; }
.is-today { background: color-mix(in srgb, var(--brand) 8%, transparent); }

.ready-strip .card-head { gap: .5rem; }
.ready-list { list-style: none; margin: 0; padding: 0 16px 8px; }
.ready-item { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .75rem; padding: 10px 0; border-bottom: 1px solid var(--border); }
.ready-item:last-child { border-bottom: 0; }
.ready-item > span { flex: 1 1 10rem; }
.ready-list > .muted { padding: 10px 0; }
.table-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 1.25rem; }
.table-tile { display: flex; flex-direction: column; gap: 2px; min-height: 96px; padding: 12px; border-radius: var(--radius); border: 2px solid var(--border);
  background: var(--surface); color: var(--text); text-decoration: none; box-shadow: var(--shadow); }
.table-tile:focus-visible { outline: none; box-shadow: var(--ring); }
.table-label { font-size: 1.35rem; font-weight: 800; }
.table-amount { font-weight: 700; font-variant-numeric: tabular-nums; }
.table-tile small { color: var(--muted); }
.table-tile.is-busy { border-color: var(--info); }
.table-tile.is-asked { border-color: var(--warn); background: var(--warn-soft); }
.table-tile.is-ready { border-color: var(--ok); background: var(--ok-soft); }
.table-tile.is-waiting { border-color: var(--bad); background: var(--bad-soft); }

.order-card.is-waiting { border: 2px solid var(--warn); }
.order-items { list-style: none; margin: 0; padding: 0 16px; }
.order-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.order-item:last-child { border-bottom: 0; }
.order-items > .section-row { padding: 10px 0 4px; border-bottom: 1px solid var(--border); list-style: none; }
.oi-main { display: flex; flex-direction: column; min-width: 0; }
.oi-main small { color: var(--muted); }
.oi-note { color: var(--warn) !important; font-weight: 600; }
.oi-price { font-variant-numeric: tabular-nums; text-align: right; }
.oi-state { grid-column: 1; }
.oi-acts { grid-column: 2; display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; }
.order-item.is-cancelled .oi-main strong { text-decoration: line-through; color: var(--muted); }
@media (min-width: 700px) {
  .order-item { grid-template-columns: minmax(0, 1fr) auto auto auto; }
  .oi-state, .oi-acts { grid-column: auto; }
}

.waiter-title { font-size: 1.3rem; margin: 0 0 .5rem; }
.waiter .input { margin-bottom: 8px; }
.menu-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.menu-item { display: flex; flex-direction: column; gap: 4px; width: 100%; min-height: 56px; padding: 10px 12px; text-align: left; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; }
.menu-item:hover { border-color: var(--brand); }
.menu-item:focus-visible { outline: none; box-shadow: var(--ring); }
.menu-item.is-off { opacity: .6; cursor: not-allowed; }
.mi-top { display: flex; justify-content: space-between; gap: .75rem; }
.mi-price { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mi-sub { display: flex; flex-wrap: wrap; gap: .35rem .5rem; font-size: .9rem; }
.waiter .cart-line { grid-template-columns: auto auto auto minmax(0, 1fr); align-items: center; }
.waiter .cl-name { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.waiter .cl-name small { color: var(--muted); }
.waiter .cl-qty { min-width: 2ch; text-align: center; font-weight: 700; }
.waiter .cl-amt { text-align: right; font-variant-numeric: tabular-nums; }
.choice-group { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px; margin: .75rem 0; }
.choice-group legend { font-weight: 700; padding: 0 4px; }
.till-dialog .choice { display: flex; align-items: center; gap: .6rem; min-height: 44px; margin: 0; font-weight: 500; }
.choice input { width: 22px; height: 22px; accent-color: var(--brand); }
.choice.is-off { color: var(--muted); }
.qty-stepper { display: flex; align-items: center; gap: .75rem; margin-top: .75rem; }
.qty-stepper .btn { min-width: 48px; font-size: 1.3rem; }
.qty-stepper output { min-width: 2ch; text-align: center; font-size: 1.3rem; font-weight: 700; }
.guest-head { margin-bottom: .75rem; }
.guest .till-cart h2 { margin-top: 0; }

.bill-sum .kv dd strong { font-size: 1.2rem; }
.pay-box { flex-direction: column; align-items: stretch; justify-content: flex-start; }
.pay-box label { font-weight: 600; }
.pay-buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }

/* Kitchen and bar wall screen: large type, colour for age, readable from across the kitchen. */
.layout-station .main:has(.kds) { max-width: none; }
.kds-bar { flex-wrap: wrap; gap: .5rem .75rem; }
.kds-views { display: flex; gap: 6px; }
.kds-clock { margin-left: auto; font-size: 1.4rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.kds-short { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.kds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; align-items: start; }
.kds-empty { grid-column: 1 / -1; text-align: center; font-size: 1.3rem; color: var(--muted); padding: 3rem 1rem; }
.kds-card { background: var(--surface); border: 3px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.kds-card.is-warn { border-color: #d97706; }
.kds-card.is-late { border-color: var(--bad); }
.kds-card.is-late .kds-head { background: var(--bad); color: #fff; }
.kds-card.is-warn .kds-head { background: var(--warn-soft); }
.kds-card.is-ready { opacity: .75; border-color: var(--ok); }
.kds-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; padding: 10px 14px; background: var(--surface-3); }
.kds-where { font-size: 1.5rem; }
.kds-age { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.kds-meta { margin: 6px 14px 0; color: var(--muted); font-size: .95rem; }
.kds-note { margin: 6px 14px 0; padding: 6px 10px; border-radius: var(--radius-sm); background: var(--warn-soft); color: var(--warn); font-weight: 700; }
.kds-items { list-style: none; margin: 8px 0; padding: 0 10px; display: grid; gap: 6px; }
.kds-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; min-height: 60px; padding: 8px 10px;
  border-radius: var(--radius-sm); border: 2px solid var(--border); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.kds-item:focus-visible { outline: none; box-shadow: var(--ring); }
.kds-qty { font-size: 1.6rem; font-weight: 800; min-width: 2ch; text-align: center; }
.kds-name { display: flex; flex-direction: column; font-size: 1.25rem; font-weight: 700; }
.kds-name small { font-size: 1rem; font-weight: 500; color: var(--text-2); }
.kds-name .kds-item-note { color: var(--warn); font-weight: 700; }
.kds-state { font-size: .9rem; font-weight: 700; padding: 4px 8px; border-radius: 999px; background: var(--neutral-soft); }
.kds-item.is-preparing { border-color: var(--info); background: var(--info-soft); }
.kds-item.is-preparing .kds-state { background: var(--info); color: #fff; }
.kds-item.is-ready { border-color: var(--ok); background: var(--ok-soft); cursor: default; }
.kds-item.is-ready .kds-state { background: var(--ok); color: #fff; }
.kds-item.is-cancelled { cursor: default; background: var(--bad-soft); border-color: var(--bad); }
.kds-item.is-cancelled .kds-name { text-decoration: line-through; }
.kds-foot { display: flex; gap: 8px; padding: 0 10px 10px; }
.kds-foot .btn { flex: 1; }

.portion-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.portion-card .inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .75rem; }
.portion-card details { margin-top: .75rem; }
.portion-card summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.choice-editor { border-top: 1px solid var(--border); }
.roster td { vertical-align: top; }
.detail-row > td { padding-top: 0; }
.detail-row summary { cursor: pointer; font-weight: 600; min-height: 40px; display: flex; align-items: center; }
.order-item .inline-form { display: flex; flex-wrap: wrap; gap: .4rem; }

/* Table QR sheet: three cards across an A4 page. */
.qr-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.qr-card { border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); padding: 14px; text-align: center; background: #fff; color: #111; break-inside: avoid; }
.qr-card-head { display: flex; align-items: center; justify-content: center; gap: .5rem; font-weight: 700; }
.qr-card-table { font-size: 1.6rem; font-weight: 800; margin: .4rem 0; }
.qr-card .qr-table { width: 46mm; height: 46mm; }
.qr-card-hint { font-size: .85rem; margin: .4rem 0 0; }
@media print {
  .qr-sheet { grid-template-columns: repeat(3, 1fr); gap: 0; }
  .qr-card { border-radius: 0; height: 90mm; }
}

/* Public pages (table QR, the business's own site). */
.layout-public { background: var(--bg); }
.public-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 10px 16px; background: var(--brand); color: var(--brand-ink); }
.public-brand { display: flex; align-items: center; gap: .6rem; color: inherit; text-decoration: none; font-weight: 800; font-size: 1.1rem; }
.public-brand img { border-radius: 8px; background: #fff; object-fit: contain; }
.public-bar .icon-btn { color: inherit; }
.site-hero { padding: 1.5rem 0 1rem; }
.site-hero h1 { font-size: 2rem; margin: 0 0 .25rem; }
.site-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.site-menu-item.is-off .oi-main strong { color: var(--muted); }
.layout-public .main { padding: 16px 16px 48px; max-width: 1100px; margin: 0 auto; }
.layout-station .main.main-wide:has(.kds) { max-width: none; }
/* On a phone the menu's categories are one row that scrolls sideways, so the dishes stay in view. */
@media (max-width: 899px) {
  .waiter .till-cats { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
  .waiter .till-cats .chip { flex: 0 0 auto; }
}
.till-grid > * { min-width: 0; }

/* ---- Week 4 ---------------------------------------------------------------------------- */
.segmented { display: flex; gap: 0; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 0; margin: 0 0 8px; overflow: hidden; }
.segmented label { flex: 1; display: flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; cursor: pointer; font-weight: 600; background: var(--surface); }
.segmented label:has(input:checked) { background: var(--brand); color: var(--brand-ink); }
.segmented input { accent-color: var(--brand); }
.table-booking { color: var(--info) !important; font-weight: 600; }
.track-steps { list-style: none; margin: 0; padding: 16px; display: grid; gap: 10px; counter-reset: step; }
.track-steps li { position: relative; padding-left: 40px; min-height: 30px; display: flex; align-items: center; color: var(--muted); }
.track-steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--border-strong); font-weight: 700; background: var(--surface); }
.track-steps li.is-done { color: var(--text); }
.track-steps li.is-done::before { content: "\2713"; background: var(--ok); border-color: var(--ok); color: #fff; }
.track-steps li.is-now { color: var(--text); font-weight: 700; }
.track-steps li.is-now::before { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.stars { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; border: 0; padding: 0; margin: 0 0 12px; }
.stars legend { width: 100%; font-weight: 700; margin-bottom: 4px; }
.stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars label { font-size: 2rem; line-height: 1; cursor: pointer; color: var(--border-strong); min-width: 44px; min-height: 44px; display: grid; place-items: center; }
.stars input:checked ~ label, .stars label:hover, .stars label:hover ~ label { color: #d97706; }
.stars input:focus-visible + label { outline: 2px solid var(--brand); border-radius: 6px; }
.bars { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 3px; align-items: end; height: 140px; padding: 8px 16px 0; }
.bars span { background: var(--brand); border-radius: 3px 3px 0 0; min-height: 2px; }
.bars-axis { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 3px; padding: 4px 16px 12px; font-size: .7rem; color: var(--muted); text-align: center; }
.board-col h3 { margin: 0 0 .5rem; font-size: 1rem; }
.notice-body { white-space: pre-wrap; line-height: 1.55; }

/* Bar heights in 5% steps (no inline styles under the CSP). */
.bars .bar-h0 { height: 1%; }
.bars .bar-h5 { height: 5%; }
.bars .bar-h10 { height: 10%; }
.bars .bar-h15 { height: 15%; }
.bars .bar-h20 { height: 20%; }
.bars .bar-h25 { height: 25%; }
.bars .bar-h30 { height: 30%; }
.bars .bar-h35 { height: 35%; }
.bars .bar-h40 { height: 40%; }
.bars .bar-h45 { height: 45%; }
.bars .bar-h50 { height: 50%; }
.bars .bar-h55 { height: 55%; }
.bars .bar-h60 { height: 60%; }
.bars .bar-h65 { height: 65%; }
.bars .bar-h70 { height: 70%; }
.bars .bar-h75 { height: 75%; }
.bars .bar-h80 { height: 80%; }
.bars .bar-h85 { height: 85%; }
.bars .bar-h90 { height: 90%; }
.bars .bar-h95 { height: 95%; }
.bars .bar-h100 { height: 100%; }
.big-action.is-alert { border-color: var(--warn); background: var(--warn-soft); }

/* ---- Guides, booklets and station cards (G13) ------------------------------------------ */
.guide.is-current { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 30%, transparent); }
.guide-what p { margin: 0 0 .5rem; color: var(--text-2); }
.guide-task { border-top: 1px solid var(--border); padding: .75rem 0; }
.guide-task h3 { font-size: 1.05rem; margin: 0 0 .4rem; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.guide-task h3 small { font-weight: 500; color: var(--muted); }
.guide-task ol { margin: 0 0 .4rem; padding-left: 1.4rem; }
.guide-task li { margin: .2rem 0; }
.guide-task.is-other { opacity: .6; }
.guide-see { margin: 0; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--ok-soft); color: var(--text); }
.guide-problems { border-top: 1px solid var(--border); padding-top: .75rem; }
.guide-problems h3 { font-size: 1.05rem; margin: 0 0 .4rem; }
.guide-problems dt { font-weight: 700; margin-top: .5rem; }
.guide-problems dd { margin: .2rem 0 0; }
.booklet ol, .booklet ul { padding-left: 1.4rem; margin: 0; }
.booklet li { margin: .35rem 0; line-height: 1.5; }
.booklet h3 { font-size: 1rem; margin: 1rem 0 .25rem; }
.fw-speak { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; }
.fw-speak .fw-qr { width: 30mm; height: 30mm; flex: 0 0 auto; }
.station-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.station-card { border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 16px; background: #fff; color: #111; break-inside: avoid; }
.station-card header { display: flex; align-items: center; gap: .6rem; padding-bottom: .5rem; border-bottom: 3px solid var(--brand); }
.station-card header div { display: flex; flex-direction: column; }
.station-card header span { font-size: 1.3rem; font-weight: 800; }
.station-card h3 { font-size: .95rem; margin: .8rem 0 .3rem; text-transform: uppercase; letter-spacing: .04em; }
.station-card ol, .station-card ul { margin: 0; padding-left: 1.2rem; }
.station-card li { margin: .2rem 0; }
.station-card .sc-who { margin: .5rem 0 0; font-weight: 600; }
.station-card footer { display: flex; align-items: center; gap: .75rem; margin-top: .8rem; padding-top: .5rem; border-top: 1px solid #ccc; }
.station-card footer p { margin: 0; font-size: .85rem; }
.station-card .sc-qr { width: 24mm; height: 24mm; flex: 0 0 auto; }
@media print {
  .guide, .booklet { break-inside: avoid-page; box-shadow: none; }
  .guide-task.is-other { opacity: 1; }
  .station-cards { grid-template-columns: 1fr; gap: 0; }
  .station-card { height: 138mm; border-radius: 0; break-after: auto; }
  .station-card:nth-child(2n) { break-after: page; }
  .station-who, .btn-station-switch { display: none !important; }
}
@media print { .page-head.guide-head { display: flex !important; } .layout-app .main, .layout-station .main { margin: 0 !important; padding: 0 !important; max-width: none !important; } }
.station-who .who-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.station-id { min-width: 0; }
.station-id span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 480px) {
  .btn-guide .lbl { display: none; }
  .btn-guide { padding-left: 10px; padding-right: 10px; }
  .station-who .who-name { max-width: 5.5rem; }
}
@media (max-width: 480px) { .station-id { max-width: 42%; } .station-who .who-name { min-width: 3rem; } }

/* ---- Public websites (R13, B13) ---------------------------------------------------------- */
.site-nav { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.site-nav ul { list-style: none; margin: 0 auto; padding: 0 8px; max-width: 1100px; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.site-nav ul::-webkit-scrollbar { display: none; }
.site-nav a { display: flex; align-items: center; min-height: 48px; padding: 0 12px; color: var(--text-2); text-decoration: none; font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent; }
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--brand); }
.site-hero .lead { color: var(--text-2); }
.site-actions .btn { min-height: 48px; }
.site-actions-quiet { margin-top: .5rem; }
.site-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 16px; }
.site-cards .card { margin: 0; }
.site-cards h2 { font-size: 1.15rem; margin: 0 0 .5rem; }
.site-score { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.site-score .icon { color: var(--accent); }
.site-filter-empty { margin-top: 1rem; }
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 24px 16px 32px; margin-top: 24px; }
.site-footer-grid { max-width: 1100px; margin: 0 auto; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.site-footer h2 { font-size: 1rem; margin: 0 0 .5rem; }
.site-footer p { margin: 0 0 .4rem; color: var(--text-2); }
.site-footer a { display: inline-flex; align-items: center; gap: .4rem; min-height: 32px; }
.site-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.site-legal { max-width: 1100px; margin: 20px auto 0; padding-top: 16px; border-top: 1px solid var(--border); font-size: .9rem; color: var(--muted); }
.site-legal a { min-height: 0; }
.site-reviews { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.site-review { margin: 0; }
.site-review blockquote { margin: .4rem 0 .6rem; font-size: 1.05rem; }
.site-stars { margin: 0; color: var(--accent); letter-spacing: 2px; font-size: 1.1rem; }
.prose { max-width: 760px; }
.prose h1 { font-size: 1.6rem; margin-top: 0; }
.prose h2 { font-size: 1.1rem; margin: 1.4rem 0 .4rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .35rem; }
.web-checkout { border: 0; padding: 0; margin: 12px 0; display: grid; gap: 6px; }
.web-checkout label { font-weight: 600; margin-top: 4px; }
.web-checkout .segmented label { margin-top: 0; }
.pay-panel h2 { margin: 0 0 .5rem; font-size: 1.25rem; }
.pay-wait { display: flex; align-items: center; gap: .6rem; font-weight: 600; }
.pay-again { display: grid; gap: 10px; margin-top: 12px; }
.pay-again details summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--text-2); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--border-strong); border-top-color: var(--brand); animation: spin .9s linear infinite; flex: 0 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.card > .cart-total.card-body { padding: 12px 16px; border-top: 1px solid var(--border); }

/* ---- Debtor accounts ------------------------------------------------------------------------ */
.statement-head h1 { font-size: 1.3rem; margin: 6mm 0 1mm; }
.statement-head p { margin: 0 0 4mm; }
.void-form { gap: 4px; }
.void-form .input-sm { min-height: 32px; padding: 4px 8px; width: 9rem; }

/* ---- Libraries: SweetAlert2, Select2, DataTables (Responsive), in the platform's own look ---- */
/* SweetAlert2 */
.swal2-container { z-index: 2000; }
.swal2-container.swal2-backdrop-show { background: rgba(8, 12, 18, .55); }
.swal-popup.swal2-popup { background: var(--surface); color: var(--text); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 1.25rem 1.25rem 1rem; width: min(30rem, calc(100vw - 32px)); font-family: var(--font); }
.swal-popup .swal2-title { color: var(--text); font-size: 1.2rem; padding: .25rem 0 0; }
.swal-popup .swal2-html-container { color: var(--text-2); font-size: 1rem; margin: .75rem 0 0; }
.swal-actions.swal2-actions { gap: .5rem; width: 100%; margin-top: 1.25rem; flex-wrap: wrap; justify-content: flex-end; }
.swal-actions .btn { min-width: 7.5rem; margin: 0; }
@media (max-width: 479px) { .swal-actions .btn { flex: 1 1 100%; } }
.swal2-input.input, .swal-input { margin: 1rem 0 0; width: 100%; box-sizing: border-box; font-size: 16px; height: auto; }
.swal-error.swal2-validation-message { background: var(--bad-soft); color: var(--bad); margin: .75rem 0 0; }
.swal2-icon { transform: scale(.8); margin: .25rem auto 0; }
.swal2-icon.swal2-question { border-color: var(--info); color: var(--info); }
.swal2-icon.swal2-warning { border-color: var(--warn); color: var(--warn); }
.swal-toast.swal2-popup.swal2-toast { background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .75rem 1rem; }
.swal-toast .swal2-title { color: var(--text); font-size: .95rem; font-weight: 600; margin: 0 .5rem; }
.swal-toast .swal2-timer-progress-bar { background: var(--brand); }
/* Toasts sit under the top bar, never over its buttons (Switch, notifications). */
.swal2-container.swal2-top-end { top: calc(var(--topbar-h) + var(--safe-top, 0px)) !important; }
@media (max-width: 599px) { .swal2-container.swal2-top-end { width: calc(100vw - 16px); padding: 8px; } .swal-toast.swal2-popup.swal2-toast { width: 100%; } }

/* Select2: as tall and as clear as the platform's own fields */
select.select2-hidden-accessible { left: 0 !important; } /* never pushes a phone page wider */
.select2-container { max-width: 100%; font-size: 16px; }
.select2-container--default .select2-selection--single, .select2-container--default .select2-selection--multiple {
  min-height: 48px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); }
.select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 46px; padding-left: .75rem; padding-right: 2.5rem; color: var(--text); }
.select2-container--default .select2-selection--single .select2-selection__placeholder { color: var(--muted); }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 46px; width: 2.25rem; }
.select2-container--default .select2-selection--single .select2-selection__arrow b { border-top-color: var(--text-2); }
.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b { border-bottom-color: var(--text-2); }
.select2-container--default .select2-selection--single .select2-selection__clear { height: 46px; min-width: 32px; margin-right: 2rem; color: var(--muted); font-size: 1.25rem; display: inline-flex; align-items: center; justify-content: center; }
.select2-container--default.select2-container--focus .select2-selection, .select2-container--default.select2-container--open .select2-selection { border-color: var(--brand); box-shadow: var(--ring); outline: none; }
.select2-container.is-invalid .select2-selection { border-color: var(--bad); }
.select2-container--default.select2-container--disabled .select2-selection { background: var(--surface-2); opacity: .7; }
.select2-container--default .select2-selection--multiple .select2-selection__choice { background: var(--surface-3); border-color: var(--border); color: var(--text); border-radius: 999px; padding: 2px 10px 2px 24px; }
.select2-dropdown { background: var(--surface); border-color: var(--border-strong); color: var(--text); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); z-index: 2100; overflow: hidden; }
.select2-container--default .select2-search--dropdown { padding: .5rem; }
.select2-container--default .select2-search--dropdown .select2-search__field { min-height: 44px; font-size: 16px; padding: .4rem .65rem; background: var(--surface-2); color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); }
.select2-container--default .select2-results > .select2-results__options { max-height: min(18rem, 50vh); }
.select2-results__option { padding: .65rem .85rem; min-height: 44px; display: flex; align-items: center; }
.select2-container--default .select2-results__option--selected { background: var(--surface-3); color: var(--text); }
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable { background: var(--brand); color: var(--brand-ink); }
.select2-container--default .select2-results__option--disabled { color: var(--muted); }
.select2-container--default .select2-results__message { color: var(--muted); }
.filters .select2-container { flex: 1 1 10rem; min-width: 10rem; }
.filters .select2-container .select2-selection--single { min-height: 44px; }
.filters .select2-container .select2-selection--single .select2-selection__rendered { line-height: 42px; }
.filters .select2-container .select2-selection--single .select2-selection__arrow { height: 42px; }
.company-switch .select2-container { min-width: 9rem; }

/* DataTables with Responsive: the platform's table, a search and paging that fit a phone */
:root { --dt-row-hover: 15, 23, 42; --dt-row-hover-alpha: .04; --dt-row-stripe-alpha: 0; }
:root[data-theme="dark"] { --dt-row-hover: 255, 255, 255; --dt-row-stripe: 255, 255, 255; --dt-column-ordering: 255, 255, 255; --dt-html-background: #151b23; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --dt-row-hover: 255, 255, 255; --dt-row-stripe: 255, 255, 255; --dt-column-ordering: 255, 255, 255; --dt-html-background: #151b23; } }
.dt-container { color: var(--text); }
.dt-container .dt-layout-row { margin: 0; padding: .65rem 1rem; gap: .5rem; }
.dt-container .dt-layout-row.dt-layout-table { padding: 0; }
.dt-container .dt-search, .dt-container .dt-length { display: flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .9rem; }
.dt-container .dt-search input.dt-input, .dt-container .dt-length select.dt-input {
  font: inherit; font-size: 16px; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); min-height: 44px; padding: .4rem .75rem; margin: 0; }
.dt-container .dt-search input.dt-input { width: min(18rem, 100%); }
.dt-container .dt-search input.dt-input:focus, .dt-container .dt-length select.dt-input:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.dt-container .dt-info { color: var(--muted); font-size: .875rem; padding: 0; }
.dt-container .dt-paging nav { display: flex; flex-wrap: wrap; gap: .25rem; }
.dt-container .dt-paging .dt-paging-button { min-width: 44px; min-height: 44px; margin: 0; padding: .4rem .75rem; border-radius: var(--radius-sm); border: 1px solid transparent; background: transparent; color: var(--text) !important; }
.dt-container .dt-paging .dt-paging-button:hover { background: var(--surface-3); border-color: var(--border); color: var(--text) !important; }
.dt-container .dt-paging .dt-paging-button.current, .dt-container .dt-paging .dt-paging-button.current:hover { background: var(--brand); border-color: var(--brand); color: var(--brand-ink) !important; }
.dt-container .dt-paging .dt-paging-button.disabled { opacity: .45; }
@media (max-width: 599px) {
  .dt-container .dt-layout-row:not(.dt-layout-table) { flex-direction: column; align-items: stretch; }
  .dt-container .dt-search input.dt-input { width: 100%; }
  .dt-container .dt-layout-cell { width: 100%; }
}
.dt-container .dt-layout-cell.dt-layout-start, .dt-container .dt-layout-cell.dt-layout-end { flex-wrap: wrap; }
.table.dataTable { border-collapse: collapse; margin: 0; }
.table.dataTable > thead > tr > th, .table.dataTable > tbody > tr > td { padding: .7rem 1rem; border-bottom: 1px solid var(--border); }
.table.dataTable > thead > tr > th { border-bottom: 1px solid var(--border); }
.table.dataTable > tbody > tr > td.dt-type-numeric, .table.dataTable > tbody > tr > td.dt-type-date, .table.dataTable > tbody > tr > td.dt-type-kes { text-align: right; }
.table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:before { border-left-color: var(--brand); }
.table.dataTable.dtr-inline.collapsed > tbody > tr.dtr-expanded > td.dtr-control:before { border-top-color: var(--brand); border-left-color: transparent; }
.table.dataTable > tbody > tr.child > td { background: var(--surface-2); padding: .5rem 1rem .75rem; }
.table.dataTable > tbody > tr.child ul.dtr-details { width: 100%; }
.table.dataTable > tbody > tr.child ul.dtr-details > li { border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: .25rem 1rem; justify-content: space-between; padding: .5rem 0; }
.table.dataTable > tbody > tr.child ul.dtr-details > li:last-child { border-bottom: 0; }
.table.dataTable > tbody > tr.child span.dtr-title { color: var(--muted); font-weight: 600; min-width: 0; }
.table.dataTable > tbody > tr.child span.dtr-data { text-align: right; }
td.dt-empty { color: var(--muted); text-align: center; padding: 2rem 1rem !important; }

/* ---- Modals: forms open over the page (a bottom sheet on phones) ----------------------------- */
dialog.modal { border: 0; padding: 0; background: transparent; color: var(--text); width: min(640px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 48px); overflow: visible; }
dialog.modal.modal-wide { width: min(920px, calc(100vw - 32px)); }
dialog.modal::backdrop { background: rgba(8, 12, 18, .55); }
.modal-frame { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; max-height: calc(100dvh - 48px); overflow: hidden; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 14px 16px 14px 20px; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-size: 1.15rem; }
.modal-close { width: 44px; height: 44px; font-size: 1.6rem; line-height: 1; border-radius: var(--radius-sm); }
.modal-body { padding: 16px 20px 20px; overflow-y: auto; overscroll-behavior: contain; }
.modal-loading { color: var(--muted); padding: 2rem 0; text-align: center; }
.modal-page .page-head, .modal-page .backlink { display: none; }
.modal-page .card { box-shadow: none; border: 0; background: transparent; margin: 0 0 .5rem; }
.modal-page .card-head { padding: 0 0 .5rem; border-bottom: 0; }
.modal-page .card-head h2 { font-size: .95rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.modal-page .card-body { padding: 0; }
.modal-page .form-actions { position: sticky; bottom: -20px; background: var(--surface); padding: 12px 0 0; margin-top: .5rem; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; }
@media (max-width: 599px) {
  dialog.modal, dialog.modal.modal-wide { width: 100vw; max-height: 92dvh; margin: auto 0 0; }
  .modal-frame { border-radius: var(--radius) var(--radius) 0 0; max-height: 92dvh; }
  .modal-page .form-actions .btn { flex: 1 1 auto; }
}
.form-actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; }

/* ---- Dropdown menus (details.dropdown) -------------------------------------------------------- */
details.dropdown { position: relative; display: inline-block; }
details.dropdown > summary { list-style: none; cursor: pointer; }
details.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 13rem; padding: 6px; margin: 0; list-style: none; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); }
.dropdown-menu a, .dropdown-menu button { display: flex; align-items: center; gap: .6rem; width: 100%; min-height: 44px; padding: .5rem .75rem; border: 0; background: none; border-radius: 6px; color: var(--text); font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.dropdown-menu a:hover, .dropdown-menu button:hover, .dropdown-menu a:focus-visible, .dropdown-menu button:focus-visible { background: var(--surface-3); outline: none; }
.dropdown-menu .danger { color: var(--bad); }
.dropdown-menu hr { border: 0; border-top: 1px solid var(--border); margin: 4px 0; }
.dropdown-menu form { margin: 0; }
.row-actions { display: flex; gap: .25rem; justify-content: flex-end; align-items: center; }
.row-actions .btn { min-height: 40px; }

/* ---- Tabs: module tabs (links) and page tabs (role=tablist) ----------------------------------- */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin: 0 0 1rem; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs [role=tab] { display: inline-flex; align-items: center; gap: .45rem; min-height: 48px; padding: 0 1rem; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--text-2); font: inherit; font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer; margin-bottom: -1px; }
.tabs a:hover, .tabs [role=tab]:hover { color: var(--text); }
.tabs a[aria-current="page"], .tabs [role=tab][aria-selected="true"] { color: var(--text); border-bottom-color: var(--brand); }
.tabs [role=tab]:focus-visible, .tabs a:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--brand); border-radius: 6px 6px 0 0; }
.tabs .count { font-size: .75rem; font-weight: 700; padding: .05rem .45rem; border-radius: 999px; background: var(--surface-3); color: var(--text-2); }
.segment { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: var(--radius-sm); background: var(--surface-2); }
.segment a { display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: 0 .85rem; border-radius: 6px; color: var(--text-2); font-weight: 600; text-decoration: none; }
.segment a[aria-current="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.segment .count { font-size: .75rem; color: var(--muted); }
.btn .count { min-width: 1.6em; padding: .05rem .45rem; border-radius: 999px; background: rgba(127, 127, 127, .22); font-size: .75rem; font-weight: 700; text-align: center; }
.btn .count:empty { display: none; }
form > .alert, .modal-page .alert { margin-bottom: 1rem; }

/* ---- Stat tiles ------------------------------------------------------------------------------- */
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0 0 1rem; }
.stat-tiles > * { min-width: 0; }
.stat-tile { display: flex; align-items: center; gap: .75rem; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; min-width: 0; }
.stat-tile:hover { border-color: var(--border-strong); }
.stat-tile .stat-icon { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; }
.stat-tile .tone-ok { background: var(--ok-soft); color: var(--ok); }
.stat-tile .tone-warn { background: var(--warn-soft); color: var(--warn); }
.stat-tile .tone-neutral { background: var(--neutral-soft); color: var(--text-2); }
.stat-tile .tone-info { background: var(--info-soft); color: var(--info); }
.stat-tile strong { display: block; font-size: 1.45rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-tile span { color: var(--muted); font-size: .85rem; }

/* ---- People ----------------------------------------------------------------------------------- */
.person-cell { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.person-cell .person-name { min-width: 0; }
/* With a phone-width table the expand arrow sits beside the photo and name, not above them. */
table.dataTable td.dtr-control:has(> .person-cell) { white-space: nowrap; }
table.dataTable td.dtr-control > .person-cell { display: inline-flex; vertical-align: middle; max-width: calc(100% - 1.6em); white-space: normal; }
.avatar-sm { width: 40px; height: 40px; flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center; font-weight: 700; font-size: .85rem; color: var(--text); background: color-mix(in srgb, var(--brand) 18%, var(--surface-2)); }
.avatar-sm img { width: 100%; height: 100%; object-fit: cover; }
.profile-card { display: flex; flex-wrap: wrap; gap: 1rem 1.25rem; align-items: center; padding: 20px; }
.profile-card .person-photo { width: 96px; height: 96px; border-radius: 50%; font-size: 1.8rem; position: relative; }
.profile-card .profile-who { flex: 1 1 16rem; min-width: 0; }
.profile-card h1 { margin: 0 0 .25rem; font-size: 1.5rem; overflow-wrap: anywhere; }
.profile-card .meta { display: flex; flex-wrap: wrap; gap: .35rem .75rem; color: var(--muted); align-items: center; }
.profile-card .actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.profile-card .contact { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.photo-edit { position: absolute; right: -2px; bottom: -2px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); border: 2px solid var(--surface); cursor: pointer; }
.photo-edit input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.company-logo-lg { width: 112px; height: 96px; border-radius: 16px; position: relative; overflow: visible; }
.company-logo-lg img { max-width: 96px; max-height: 80px; }
.company-logo-lg .swatch { width: 64px; height: 40px; }
.company-avatar { background: #fff; border: 1px solid var(--border); border-radius: 10px; }
.company-avatar img { object-fit: contain; padding: 3px; }
.company-avatar .swatch { width: 28px; height: 18px; }
.field > .label { display: block; font-weight: 600; margin-bottom: .35rem; }
.dropdown-menu .swatch { width: 28px; height: 18px; flex: none; }
.info-grid { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .info-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.photo-field { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.photo-field .person-photo { width: 72px; height: 72px; border-radius: 50%; }
.photo-field img[hidden] { display: none; }
.danger-zone { border: 1px solid color-mix(in srgb, var(--bad) 35%, var(--border)); }
.danger-zone .card-head h2 { color: var(--bad); }
.linked-list { margin: .5rem 0 1rem; padding-left: 1.2rem; }
/* A responsive data table never scrolls sideways, so its menus may reach outside the table. */
.table-wrap:has(table.dataTable) { overflow: visible; }
.table.dataTable td.actions { width: 1%; white-space: nowrap; }

/* ---- Attendance ------------------------------------------------------------------------------- */
.stat-tile .tone-bad { background: var(--bad-soft); color: var(--bad); }
.stat-tile strong small { font-size: .9rem; color: var(--muted); font-weight: 600; }
.page-actions { align-items: center; }
.day-picker { flex-wrap: nowrap; gap: .25rem; }
.day-picker .input { flex: 0 1 11rem; min-width: 9.5rem; }
.month-nav { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: 0 0 1rem; }
.month-nav h2 { margin: 0; font-size: 1.15rem; text-align: center; }
.att-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.att-cal-head { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-align: center; padding-bottom: 2px; }
.att-day { min-height: 74px; padding: 6px 7px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.att-num { font-weight: 700; font-size: .9rem; }
.att-hours { font-size: .78rem; font-variant-numeric: tabular-nums; }
.att-label { font-size: .7rem; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-day.att-ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.att-day.att-warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.att-day.att-bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.att-day.att-info { background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 35%, transparent); }
.att-day.att-future { opacity: .45; }
.att-day.att-today { box-shadow: inset 0 0 0 2px var(--brand); }
.att-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin-top: .9rem; font-size: .82rem; color: var(--muted); }
.att-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.att-dot { width: 12px; height: 12px; border-radius: 4px; background: var(--surface-3); display: inline-block; }
.att-dot.att-ok { background: var(--ok); } .att-dot.att-warn { background: var(--warn); } .att-dot.att-bad { background: var(--bad); } .att-dot.att-info { background: var(--info); }
@media (max-width: 600px) {
  .att-cal { gap: 3px; }
  .att-day { min-height: 52px; padding: 4px; border-radius: 7px; }
  .att-label { display: none; }
  .att-hours { font-size: .66rem; }
}
.scan-timeline { list-style: none; margin: 0; padding: 4px 16px 12px; }
.scan-day h3 { font-size: .8rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 14px 0 6px; }
.scan-day ul { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); margin-left: 52px; }
.scan-item { display: flex; align-items: flex-start; gap: .75rem; padding: 8px 0 8px 0; position: relative; }
.scan-time { position: absolute; left: -58px; top: 9px; width: 48px; text-align: right; font-size: .85rem; color: var(--text-2); }
.scan-dot { width: 12px; height: 12px; border-radius: 50%; margin-left: -7px; margin-top: 5px; flex: none; border: 2px solid var(--surface); }
.scan-dot.is-in { background: var(--ok); } .scan-dot.is-out { background: var(--text-2); }
.scan-what { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.scan-what .muted { font-size: .85rem; }
.scan-item.is-void .scan-what strong { text-decoration: line-through; color: var(--muted); }
tr.is-void td { opacity: .65; }

/* ---- Notices ----------------------------------------------------------------------------------- */
.read-meter { display: flex; align-items: center; gap: .5rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.read-bar { width: 80px; height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; flex: none; }
.read-bar i { display: block; height: 100%; background: var(--ok); width: 0; }
.read-bar i.w-5 { width: 5%; } .read-bar i.w-10 { width: 10%; } .read-bar i.w-15 { width: 15%; } .read-bar i.w-20 { width: 20%; }
.read-bar i.w-25 { width: 25%; } .read-bar i.w-30 { width: 30%; } .read-bar i.w-35 { width: 35%; } .read-bar i.w-40 { width: 40%; }
.read-bar i.w-45 { width: 45%; } .read-bar i.w-50 { width: 50%; } .read-bar i.w-55 { width: 55%; } .read-bar i.w-60 { width: 60%; }
.read-bar i.w-65 { width: 65%; } .read-bar i.w-70 { width: 70%; } .read-bar i.w-75 { width: 75%; } .read-bar i.w-80 { width: 80%; }
.read-bar i.w-85 { width: 85%; } .read-bar i.w-90 { width: 90%; } .read-bar i.w-95 { width: 95%; } .read-bar i.w-100 { width: 100%; }
.notice-read-cta { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }

/* ---- Payroll and payslips ----------------------------------------------------------------------- */
.steps { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 10px; }
.steps li { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 10px 38px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); position: relative; min-width: 0; }
.steps li::before { content: ""; position: absolute; left: 12px; top: 13px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border-strong); }
.steps li.done::before { background: var(--ok); border-color: var(--ok); }
.steps li strong { font-size: .9rem; }
.steps li span { font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }
.payslip { background: #fff; color: #111; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 0 0 18px; max-width: 820px; overflow: hidden; }
.payslip-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 18px 22px; background: var(--brand); color: var(--brand-ink); border-bottom: 4px solid var(--accent); }
.payslip-head div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.payslip-head strong { font-size: 1.15rem; }
.payslip-head span { font-size: .82rem; opacity: .9; }
.payslip-title { text-align: right; }
.payslip-title strong { text-transform: uppercase; letter-spacing: .08em; }
.payslip-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 10px 18px; margin: 0; padding: 16px 22px; }
.payslip-facts dt { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #6b7280; }
.payslip-facts dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.payslip-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 18px; padding: 0 22px; }
.payslip-cols h2 { font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: #374151; background: #f1f5f9; padding: 7px 10px; margin: 0 0 4px; border-radius: 6px; }
.payslip-cols table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.payslip-cols td, .payslip-cols th { padding: 6px 10px; border-bottom: 1px solid #e5e7eb; text-align: left; }
.payslip-cols .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.payslip-cols tfoot th { border-top: 2px solid #94a3b8; border-bottom: 0; }
.payslip-net { display: flex; justify-content: space-between; align-items: center; margin: 16px 22px 0; padding: 14px 18px; border-radius: 10px; background: var(--brand); color: var(--brand-ink); }
.payslip-net span { font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.payslip-net strong { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.payslip-note { margin: 12px 22px 0; font-size: .82rem; color: #4b5563; }
@media print { .payslip { box-shadow: none; max-width: none; } }
.stat-tile > div { min-width: 0; }
.stat-tile strong { overflow-wrap: anywhere; }
.stat-tiles.money { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.stat-tiles.money strong { font-size: 1.25rem; }

/* ---- A notice as a document (manager screen and station) ---------------------------------------- */
.notice-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin-bottom: .9rem; }
.notice-flags { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; }
.notice-toolbar .page-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.notice-doc { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; margin: 0 0 1.25rem; max-width: 860px; }
.main-wide .notice-doc { max-width: 860px; }
.notice-tabs { max-width: none; }
.notice-layout { display: grid; gap: 0 1.25rem; align-items: start; }
@media (min-width: 1200px) { .notice-layout { grid-template-columns: minmax(0, 860px) minmax(260px, 320px); } .notice-aside { position: sticky; top: calc(var(--topbar-h, 64px) + 16px); } }
.notice-layout .notice-doc { margin-bottom: 1.25rem; }
.notice-aside h2 { font-size: .78rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 0 0 .5rem; }
.notice-aside-big { display: flex; align-items: baseline; gap: .4rem; margin: 0 0 .5rem; }
.notice-aside-big strong { font-size: 2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.notice-aside-big span { color: var(--muted); }
.notice-aside-list { list-style: none; margin: .9rem 0; padding: 0; border-top: 1px solid var(--border); }
.notice-aside-list li { display: flex; justify-content: space-between; gap: .5rem; padding: .55rem 0; border-bottom: 1px solid var(--border); }
.notice-aside-list span { color: var(--text-2); }
.notice-aside .hint { margin: .75rem 0 0; }
.notice-aside .btn { width: 100%; justify-content: center; }
.notice-tabs .count { font-variant-numeric: tabular-nums; }
.notice-letterhead { display: flex; justify-content: space-between; align-items: center; gap: .75rem 1.25rem; flex-wrap: wrap; padding: 16px 22px; background: var(--brand); color: var(--brand-ink); border-bottom: 4px solid var(--accent); }
.nl-brand { display: flex; align-items: center; gap: .8rem; min-width: 0; flex: 1 1 240px; }
.nl-brand img, .nl-mark { width: 48px; height: 48px; flex: none; border-radius: 10px; background: #fff; object-fit: contain; padding: 3px; }
.nl-mark { display: grid; place-items: center; padding: 0; color: var(--brand); font-weight: 800; font-size: 1.05rem; letter-spacing: .02em; }
.nl-brand div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nl-brand strong { font-size: 1.1rem; line-height: 1.2; }
.nl-brand span { font-size: .8rem; opacity: .9; overflow-wrap: anywhere; }
.nl-kind { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.nl-kind strong { text-transform: uppercase; letter-spacing: .12em; font-size: 1.05rem; }
.nl-kind span { font-size: .8rem; opacity: .9; }
.notice-sheet { padding: 22px 26px 8px; }
.notice-title { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem); line-height: 1.25; margin: 0 0 1rem; overflow-wrap: anywhere; }
.notice-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 10px 20px; margin: 0 0 1.25rem; padding: 0 0 1rem; border-bottom: 1px solid var(--border); }
.notice-facts dt { font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.notice-facts dd { margin: 3px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.notice-facts dd.mono { white-space: nowrap; font-size: .9rem; }
.notice-facts dd small { display: block; font-weight: 400; color: var(--muted); font-size: .82rem; }
.notice-text { font-size: 1.02rem; line-height: 1.7; max-width: 70ch; overflow-wrap: anywhere; }
.notice-text p { margin: 0 0 1em; }
.notice-text h3 { font-size: 1.02rem; margin: 1.4em 0 .5em; color: var(--brand); }
:root[data-theme="dark"] .notice-text h3 { color: var(--text); }
.notice-text ul, .notice-text ol { margin: 0 0 1em; padding-left: 1.4em; }
.notice-text li { margin: .25em 0; }
.notice-text li::marker { color: var(--brand); font-weight: 700; }
.notice-attachment { display: flex; align-items: center; gap: .85rem; flex-wrap: wrap; margin: 1.25rem 0 0; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2, var(--bg)); }
.na-icon { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--brand); color: var(--brand-ink); }
.na-name { display: flex; flex-direction: column; min-width: 0; flex: 1 1 180px; }
.na-name strong { overflow-wrap: anywhere; }
.na-name small { color: var(--muted); }
.na-actions { display: flex; gap: .4rem; }
.notice-sign { display: flex; flex-direction: column; gap: 2px; margin: 1.5rem 0 1rem; padding-top: .9rem; border-top: 1px dashed var(--border-strong, var(--border)); max-width: 320px; }
.notice-sign > span { font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.notice-sign strong { font-size: 1.05rem; }
.notice-sign small { color: var(--text-2); }
.notice-ack { display: flex; align-items: center; justify-content: space-between; gap: .75rem 1rem; flex-wrap: wrap; padding: 16px 22px; border-top: 1px solid var(--border); background: var(--warn-soft); }
.notice-ack > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 240px; }
.notice-ack strong { font-size: 1rem; }
.notice-ack span { color: var(--text-2); font-size: .9rem; }
.notice-ack.is-done, .notice-ack.is-off { justify-content: flex-start; }
.notice-ack.is-done { background: var(--ok-soft); }
.notice-ack.is-done > .icon { color: var(--ok); width: 28px; height: 28px; flex: none; }
.notice-ack.is-off { background: var(--neutral-soft); }
.notice-ack.is-off > .icon { color: var(--muted); width: 26px; height: 26px; flex: none; }
.notice-ack .btn-lg { flex: 0 0 auto; }
@media (max-width: 560px) {
  .notice-letterhead { padding: 14px 16px; }
  .nl-kind { align-items: flex-start; text-align: left; }
  .notice-sheet { padding: 18px 16px 6px; }
  .notice-ack { padding: 14px 16px; }
  .notice-ack .btn-lg { width: 100%; justify-content: center; }
  .notice-toolbar .page-actions .btn span { display: none; }
  .notice-tabs [role=tab] { padding: 0 .65rem; gap: .35rem; }
}
.layout-station .notice-doc { max-width: none; }
@media print {
  .notice-doc { box-shadow: none; border: 0; border-radius: 0; max-width: none; color: #111; background: #fff; }
  .notice-letterhead, .notice-ack, .na-icon { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .notice-text { max-width: none; font-size: 11pt; }
  .notice-text h3, .notice-text li::marker { color: var(--brand); }
  .notice-attachment, .notice-sign { break-inside: avoid; }
  .layout-station .station-bar { display: none !important; }
  .notice-panel-doc[hidden] { display: block !important; }
}

/* ---- Notifications: the page, live toasts, alerts on this device ------------------------------- */
.notif-kinds { margin: 0 0 1rem; flex-wrap: wrap; }
.notif-card { overflow: hidden; }
.notif-day { font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 0; padding: 14px 16px 6px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif { display: flex; align-items: flex-start; gap: .85rem; padding: 12px 16px; border-bottom: 1px solid var(--border); position: relative; }
.notif:last-child { border-bottom: 0; }
.notif.is-unread { background: color-mix(in srgb, var(--info-soft) 55%, transparent); }
.notif.is-unread::before { content: ""; position: absolute; left: 6px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--info); }
.notif.is-urgent .notif-icon { background: var(--bad-soft, var(--warn-soft)); color: var(--bad, var(--warn)); }
.notif.is-new { animation: notif-in .5s ease-out; }
@keyframes notif-in { from { background: var(--warn-soft); transform: translateY(-4px); opacity: .4; } to { transform: none; opacity: 1; } }
.notif-icon { width: 38px; height: 38px; flex: none; border-radius: 11px; display: grid; place-items: center; background: var(--neutral-soft); color: var(--text-2); }
.notif-icon .icon { width: 19px; height: 19px; }
.notif-notices .icon, .notif-icon.notif-notices { color: var(--info); }
.notif-icon.notif-notices { background: var(--info-soft); }
.notif-icon.notif-leave, .notif-icon.notif-rosters, .notif-icon.notif-attendance, .notif-icon.notif-hours { background: var(--ok-soft); color: var(--ok); }
.notif-icon.notif-payroll, .notif-icon.notif-payslips, .notif-icon.notif-payroll-input { background: var(--warn-soft); color: var(--warn); }
.notif-icon.notif-status, .notif-icon.notif-accounts, .notif-icon.notif-me { background: var(--bad-soft, var(--warn-soft)); color: var(--bad, var(--warn)); }
.notif-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; color: var(--text); text-decoration: none; }
.notif-main:hover strong { text-decoration: underline; }
.notif-main strong { font-weight: 600; overflow-wrap: anywhere; }
.notif.is-unread .notif-main strong { font-weight: 750; }
.notif-body { color: var(--text-2); font-size: .92rem; overflow-wrap: anywhere; }
.notif-main small { color: var(--muted); font-size: .8rem; }
.notif-mark { flex: none; }
.notif-mark .icon-btn { width: 36px; height: 36px; }
.notify-toasts { position: fixed; right: 16px; bottom: calc(16px + var(--tabbar-h, 0px) + var(--safe-bottom, 0px)); z-index: 90; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 32px)); }
.notify-toast { display: flex; align-items: center; gap: .7rem; padding: 12px; border-radius: var(--radius); background: var(--surface); color: var(--text); border: 1px solid var(--border); border-left: 4px solid var(--brand); box-shadow: var(--shadow-lg); animation: notif-toast .3s ease-out; transition: opacity .35s, transform .35s; }
.notify-toast.is-urgent { border-left-color: var(--bad, #dc2626); }
.notify-toast.is-leaving { opacity: 0; transform: translateX(16px); }
.notify-toast > div { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.notify-toast small { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.notify-toast strong { overflow-wrap: anywhere; }
.notify-toast span:not(.notif-icon) { color: var(--text-2); font-size: .88rem; overflow-wrap: anywhere; }
.notify-toast .icon-btn { width: 32px; height: 32px; font-size: 1.3rem; line-height: 1; }
@keyframes notif-toast { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .notif.is-new, .notify-toast { animation: none; } .notify-toast { transition: none; } }
.push-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.push-facts li { display: flex; gap: .6rem; align-items: flex-start; color: var(--text-2); }
.push-facts .icon { flex: none; color: var(--brand); margin-top: 2px; }
.push-panel .card-body .alert { margin-bottom: .9rem; }
.station-who .bell { position: relative; }
.station-who .bell .bell-count { top: -6px; right: -6px; }
@media print { .notify-toasts { display: none; } }

/* ---- Assets and equipment ------------------------------------------------------------------------ */
.asset-grid { display: grid; gap: 0 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .asset-grid { grid-template-columns: minmax(0, 1fr) 300px; } }
.asset-tag-card .card-body { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .5rem; }
.asset-photo { width: 100%; max-height: 220px; object-fit: cover; border-radius: var(--radius-sm, 8px); }
.asset-qr { width: 168px; height: 168px; background: #fff; padding: 6px; border-radius: 8px; }
.asset-qr svg { width: 100%; height: 100%; display: block; }
.asset-tag-no { font-size: 1.1rem; font-weight: 700; margin: 0; }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.plain-list li:last-child { border-bottom: 0; }
.job-steps { list-style: none; margin: 0; padding: 0 16px 8px; }
.job-steps li { display: grid; grid-template-columns: 22px 1fr; gap: .6rem; padding: 8px 0; border-left: 2px solid var(--border); margin-left: 10px; padding-left: 14px; position: relative; }
.job-steps li::before { content: ""; position: absolute; left: -7px; top: 13px; width: 12px; height: 12px; border-radius: 50%; background: var(--border-strong); }
.job-steps li.is-done::before { background: var(--ok); }
.job-steps li.is-now::before { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-soft); }
.job-steps li > div { grid-column: 1 / -1; }
.job-steps small { color: var(--muted); display: block; }
@media print {
  .tag-sheet { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4mm; }
}
.tag-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(62mm, 1fr)); gap: 4mm; padding: 4mm; background: #fff; color: #111; }
.tag-label { border: .3mm dashed #999; border-radius: 2mm; padding: 3mm; display: grid; grid-template-columns: 24mm 1fr; gap: 3mm; align-items: center; break-inside: avoid; }
.tag-label svg { width: 24mm; height: 24mm; }
.tag-label strong { display: block; font-size: 10pt; line-height: 1.2; }
.tag-label .mono { font-size: 11pt; font-weight: 700; }
.tag-label small { display: block; font-size: 7.5pt; color: #444; }
.station-more { margin-top: .75rem; }
.station-more summary { cursor: pointer; color: var(--text-2); padding: 8px 0; }
.station-more form { margin-top: .5rem; }

/* ---- Receiving, loads and sign-offs ----------------------------------------------------------- */
.step-dots { display: inline-flex; gap: 4px; }
.step-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--neutral-soft); color: var(--muted); }
.step-dot .icon { width: 14px; height: 14px; }
.step-dot.is-done { background: var(--ok-soft); color: var(--ok); }
.signoff-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); padding: 16px; }
.signoff { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.signoff.is-done { border-color: color-mix(in srgb, var(--ok) 40%, var(--border)); background: color-mix(in srgb, var(--ok-soft) 40%, transparent); }
.signoff.is-flag { border-color: color-mix(in srgb, var(--warn) 50%, var(--border)); background: color-mix(in srgb, var(--warn-soft) 50%, transparent); }
.signoff header { display: flex; align-items: center; gap: .5rem; font-weight: 700; }
.signoff header .icon { width: 18px; height: 18px; }
.signoff small { color: var(--muted); }
.count-table input.input { max-width: 110px; }
.count-table .diff { color: var(--warn); font-weight: 700; }
.signatures.print-only { display: none; }
@media print { .signatures.print-only { display: grid; } }

/* Stock (phase 5): sub-tabs, count and issue lines with the unit beside the box */
.tabs-sub { border-bottom: 0; gap: .5rem; margin-top: -.25rem; }
.tabs-sub a { min-height: 40px; padding: 0 .85rem; border: 1px solid var(--border); border-radius: 999px; margin-bottom: 0; font-weight: 500; }
.tabs-sub a[aria-current="page"] { border-color: var(--brand); background: var(--surface-2); color: var(--text); }
.card-sub { margin: 0; padding: 12px 16px 4px; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.count-lines { display: grid; gap: 0; }
.count-line { display: grid; grid-template-columns: minmax(0, 1fr) 9.5rem minmax(0, 14rem); gap: .5rem 1rem; align-items: center; padding: 10px 16px; border-top: 1px solid var(--border); }
.count-line label { display: flex; flex-direction: column; gap: 2px; margin: 0; }
.count-line > .input { min-width: 0; }
.input-unit { display: flex; align-items: center; gap: .4rem; }
.input-unit .input { text-align: right; min-width: 0; }
.input-unit span { color: var(--muted); min-width: 2rem; }
.station-actions { display: grid; gap: .75rem; margin-bottom: 1rem; }
@media (max-width: 640px) {
  .count-line { grid-template-columns: minmax(0, 1fr) 8.5rem; }
  .count-line > .input { grid-column: 1 / -1; }
}

/* Sign-offs entered by the platform administrator on someone's behalf */
.signoff.is-behalf { border-style: dashed; }
.signoff-behalf { display: inline-flex; align-items: center; gap: .3rem; color: var(--info); font-weight: 600; }
.signoff-behalf .icon { width: 14px; height: 14px; flex: none; }
.step-dot.is-behalf { box-shadow: inset 0 0 0 2px var(--info); }
.behalf-box { display: flex; gap: .75rem; align-items: flex-start; margin: 1rem 0; padding: 12px 14px; border: 1px dashed var(--info); border-radius: var(--radius-sm); background: var(--info-soft); }
.behalf-box > .icon { flex: none; margin-top: 6px; color: var(--info); }
.behalf-box > div { flex: 1; min-width: 0; }
.behalf-box .field { margin: 0; }
.signed-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 8px; }
.signed-list li { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.signed-list li > div { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.row-actions .btn { white-space: nowrap; }

/* What is paid for a delivery, and a cash trip's money */
.pay-box { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 1rem; margin: 0 0 .75rem; }
.pay-box dt { margin: 0; }
.pay-box dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pay-box dd .cell-sub { white-space: normal; }


/* Photo evidence on a delivery */
.evidence-grid { list-style: none; margin: 0; padding: 16px; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
.evidence-grid li { display: flex; flex-direction: column; gap: 6px; }
.evidence-grid img { width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2); }
.evidence-grid li > div { display: flex; flex-direction: column; gap: 2px; font-size: .85rem; }
.evidence-grid small { color: var(--muted); }
.card > .route-stops { padding: 0 16px 16px; }
.photo-preview { margin: 0 0 12px; } .photo-preview img { display: block; width: 100%; max-width: 320px; height: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); }

.menu-item.has-photo { display: grid; grid-template-columns: 64px 1fr; grid-template-rows: auto 1fr; column-gap: 12px; align-items: start; }
.menu-item.has-photo .mi-photo { grid-row: 1 / span 2; width: 64px; height: 64px; object-fit: cover; border-radius: 10px; background: var(--neutral-soft); }
.menu-item.has-photo .mi-top, .menu-item.has-photo .mi-sub { grid-column: 2; }
.inbox-list .order-item { grid-template-columns: minmax(0, 1fr); }
.inbox-list .oi-main { min-width: 0; }
.inbox-list .oi-main .wrap { white-space: normal; overflow-wrap: anywhere; display: block; margin-top: 4px; }
.inbox-list .oi-acts { grid-column: 1; justify-content: flex-start; }
.inbox-list .oi-acts .inline-form { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.inbox-list .oi-acts .input { flex: 1 1 220px; min-width: 0; }

/* ---- Offline layer: sync chip, panel, offline lock, manager banner (offline.js) ---- */
.layout-station [data-net], .layout-station [data-queue] { display: none !important; }
.sync-chip {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: .35rem .75rem; border-radius: 999px;
  border: 0; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; white-space: nowrap;
  background: var(--brand-ink); color: var(--brand);
}
.sync-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); flex: none; }
.sync-ok .sync-dot { background: #16a34a; }
.sync-info .sync-dot { background: #2563eb; animation: sync-pulse 1.2s ease-in-out infinite; }
.sync-warn { background: #fef3c7; color: #92400e; }
.sync-warn .sync-dot { background: #d97706; }
.sync-bad { background: #fee2e2; color: #991b1b; }
.sync-bad .sync-dot { background: #dc2626; }
@keyframes sync-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .sync-info .sync-dot { animation: none; } }
@media (max-width: 560px) { .sync-chip .sync-text { max-width: 9.5rem; overflow: hidden; text-overflow: ellipsis; } .station-who .who-name { display: none; } }
.sync-sheet { width: min(520px, calc(100vw - 24px)); max-height: 85vh; border: 1px solid var(--border); border-radius: var(--radius); padding: 0; background: var(--surface); color: var(--text); }
.sync-sheet::backdrop { background: rgba(15, 23, 42, .55); }
.sync-sheet-head { padding: 16px 18px 4px; }
.sync-sheet-head h2 { margin: 0; font-size: 1.15rem; }
.sync-sheet [data-body] { padding: 4px 18px 8px; overflow: auto; max-height: 60vh; }
.sync-sheet h3 { font-size: .95rem; margin: 1rem 0 .4rem; }
.sync-sheet-foot { display: flex; gap: .5rem; justify-content: flex-end; padding: 12px 18px 16px; border-top: 1px solid var(--border); }
.sync-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sync-item { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; display: grid; gap: 6px; background: var(--surface-2); }
.sync-item-top { display: flex; justify-content: space-between; gap: .5rem; }
.sync-reason { color: var(--bad); font-size: .9rem; }
.offline-as { background: var(--warn-soft); color: var(--warn); text-align: center; font-weight: 600; padding: 6px 12px; font-size: .9rem; }
.offline-lock { position: fixed; inset: 0; z-index: 1000; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; overflow: auto; }
.offline-lock-card { width: min(460px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); text-align: center; }
.offline-lock-card h2 { margin: 0 0 .25rem; }
.offline-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 12px 0; }
.offline-person { min-height: 64px; cursor: pointer; font: inherit; }
.offline-person.on { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent); }
.offline-pad .pinpad { max-width: 300px; margin: 0 auto; }
.offline-pad-title { font-weight: 600; margin: .5rem 0 0; }
.offline-msg { min-height: 1.4em; color: var(--bad); font-weight: 600; margin: .5rem 0 0; }
.offline-online-link { margin-top: 12px; }
.offline-banner { position: sticky; top: 0; z-index: 50; background: var(--warn-soft); color: var(--warn); text-align: center; font-weight: 600; padding: 8px 12px; border-bottom: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); }
.offline-card { max-width: 440px; margin: 10vh auto; }

/* Kitchen board: Waiting, Cooking, Ready columns (kitchen.js, layout "board"). */
.kds-layouts { display: inline-flex; gap: 6px; }
.kds-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
.kds-col { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; min-height: 60vh; display: flex; flex-direction: column; gap: 10px; }
.kds-col-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 8px; border-bottom: 3px solid var(--border-strong); }
.kds-col-head h2 { margin: 0; font-size: 1.25rem; }
.kds-col-count { min-width: 2.2rem; height: 2.2rem; display: grid; place-items: center; border-radius: 999px; font-weight: 800; font-size: 1.1rem; background: var(--surface-3); }
.kds-col-waiting .kds-col-head { border-bottom-color: #d97706; }
.kds-col-cooking .kds-col-head { border-bottom-color: #2563eb; }
.kds-col-ready .kds-col-head { border-bottom-color: #16a34a; }
.kds-col-waiting .kds-col-count { background: #fef3c7; color: #92400e; }
.kds-col-cooking .kds-col-count { background: #dbeafe; color: #1e40af; }
.kds-col-ready .kds-col-count { background: #dcfce7; color: #166534; }
.kds-col-list { display: grid; gap: 10px; }
.kds-col-act:empty { display: none; }
.kds-col-empty { color: var(--muted); text-align: center; padding: 2rem .5rem; margin: 0; }
.kds-col .kds-card { transition: transform .15s ease; }
@media (hover: hover) { .kds-col .kds-card:hover { transform: translateY(-2px); } }
@media (max-width: 900px) {
  .kds-board { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 86%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .kds-col { scroll-snap-align: start; min-height: 50vh; }
}
@media (prefers-reduced-motion: reduce) { .kds-col .kds-card { transition: none; } }

/* POS photo cards: the till (.prod) and the waiter's order screen (.waiter.cards). Photo on top in
   4:3, then the name and price; the number already in the sale on a badge. Items without a photo
   get a tinted tile with their initials, so the grid stays even. */
.till-buttons { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.prod { position: relative; justify-content: flex-start; padding: 0 0 10px; overflow: hidden; min-height: 0; gap: 2px; transition: transform .08s ease, box-shadow .15s ease, border-color .15s ease; }
.prod:hover { border-color: var(--brand); }
.prod:active { transform: scale(.97); }
.prod:focus-visible { outline: none; box-shadow: var(--ring); }
.prod-photo { display: block; width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; background: var(--neutral-soft); margin-bottom: 6px; }
.prod-ph, .mi-ph { display: grid; place-items: center; font-size: 1.6rem; font-weight: 800; letter-spacing: .04em;
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 22%, var(--surface)), color-mix(in srgb, var(--accent) 18%, var(--surface))); color: color-mix(in srgb, var(--brand) 75%, var(--text)); }
.prod-name, .prod-price, .prod-left { padding: 0 10px; }
.prod-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .98rem; }
.prod-price { font-weight: 800; color: var(--brand); font-size: 1rem; font-variant-numeric: tabular-nums; }
.prod-count, .mi-count { position: absolute; top: 8px; right: 8px; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 999px; display: grid; place-items: center;
  background: var(--brand); color: var(--brand-ink); font-weight: 800; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.prod-count[hidden], .mi-count[hidden], .mi-count:empty { display: none; }

.waiter.cards .menu-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.waiter.cards .menu-list > li { list-style: none; }
.waiter.cards .menu-item, .waiter.cards .menu-item.has-photo { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 0 0 10px; height: 100%; overflow: hidden;
  border-radius: 12px; box-shadow: var(--shadow); transition: transform .08s ease, border-color .15s ease; }
.waiter.cards .menu-item:active { transform: scale(.97); }
.waiter.cards .menu-item .mi-photo { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 0; margin-bottom: 4px; }
.waiter.cards .mi-top { flex-direction: column; gap: 2px; padding: 0 10px; }
.waiter.cards .mi-top strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.25; }
.waiter.cards .mi-price { color: var(--brand); font-weight: 800; }
.waiter.cards .mi-sub { padding: 0 10px; }
.waiter.cards .mi-sub .muted { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .82rem; }
@media (max-width: 480px) { .till-buttons, .waiter.cards .menu-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .prod, .waiter.cards .menu-item { transition: none; } }
.kds-item.has-photo { grid-template-columns: auto 48px minmax(0, 1fr) auto; }
.kds-photo { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; background: var(--neutral-soft); }

/* On-screen keyboards (keypad.js): docked at the bottom, big keys, the page padded so the field
   being typed stays above them. */
.osk { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; background: var(--surface-3); border-top: 1px solid var(--border-strong);
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 24px rgba(15, 23, 42, .18); }
.osk[hidden] { display: none; }
body.osk-open { padding-bottom: var(--osk-h, 280px); }
.osk-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; max-width: 980px; margin: 0 auto 6px; }
.osk-label { font-weight: 700; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.osk-row { display: flex; gap: 6px; justify-content: center; max-width: 980px; margin: 0 auto 6px; }
.osk-key { flex: 1 1 0; min-width: 0; min-height: 54px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-size: 1.25rem; font-weight: 600; cursor: pointer; box-shadow: 0 1px 0 var(--border-strong); touch-action: manipulation; user-select: none; }
.osk-key:active { background: var(--brand); color: var(--brand-ink); }
.osk-fn { background: var(--surface-2); font-size: 1.05rem; flex: 1.4 1 0; }
.osk-fn.is-on { background: var(--brand); color: var(--brand-ink); }
.osk-space { flex: 5 1 0; }
.osk-done { flex: 2 1 0; background: var(--brand); color: var(--brand-ink); border-color: var(--brand); font-size: 1.05rem; }
.osk-hide { flex: none; min-height: 40px; padding: 0 14px; font-size: .95rem; }
.osk-num { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-width: 420px; margin: 0 auto 6px; }
.osk-num .osk-key { min-height: 60px; font-size: 1.5rem; }
.osk-actions { max-width: 420px; }
.osk-toggle { padding: .4rem .6rem; }
.osk-toggle.is-off { opacity: .6; }
@media (max-width: 560px) { .osk-key { min-height: 46px; font-size: 1.1rem; } .osk-row { gap: 4px; } }


/* "Add to home screen" on a station's resting screen and the staff home (offline.js shows it only
   when the browser offers to install). */
/* Install the staff system as an app: a card that rises from the bottom (above the tab bar on phones). */
.app-install { position: fixed; z-index: 80; left: 12px; right: 12px; bottom: calc(12px + var(--safe-bottom, 0px)); display: grid; grid-template-columns: 48px 1fr; gap: 10px 14px; align-items: center; padding: 16px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.app-install[hidden] { display: none; }
.layout-app .app-install { bottom: calc(var(--tabbar-h) + 12px + var(--safe-bottom, 0px)); }
.app-install img { width: 48px; height: 48px; border-radius: 12px; }
.app-install h2 { margin: 0 0 2px; font-size: 1.02rem; }
.app-install p { margin: 0; color: var(--muted); font-size: .92rem; }
.app-install-steps { grid-column: 1 / -1; margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: .95rem; }
.app-install-steps[hidden] { display: none; }
.app-install-steps .icon { width: 18px; height: 18px; vertical-align: -4px; }
.app-install-act { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.app-install-act .btn { min-height: 44px; flex: 1 1 auto; }
.app-install.is-on { animation: app-install-rise .35s ease-out both; }
@keyframes app-install-rise { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .app-install.is-on { animation: none; } }
@media (min-width: 1024px) { .app-install, .layout-app .app-install { left: auto; right: 24px; bottom: 24px; width: 400px; } }
[data-app-install-btn][hidden] { display: none; }

/* Mail (src/mailbox.php): the menu count, the message list, a message, the compose form. */
.nav-count { margin-left: auto; min-width: 1.4rem; padding: 0 .4rem; border-radius: 999px; background: var(--brand); color: var(--on-brand, #fff); font-size: .72rem; font-weight: 700; line-height: 1.4rem; text-align: center; }
.mail-search { display: flex; gap: 4px; align-items: center; }
.mail-search input { min-height: 40px; min-width: 0; width: 14rem; max-width: 100%; }
.mail-list { list-style: none; margin: 0; padding: 0; }
.mail-list li + li { border-top: 1px solid var(--border); }
.mail-list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 16px; color: var(--text); text-decoration: none; }
.mail-list a:hover, .mail-list a:focus-visible { background: var(--surface-2); }
.mail-list .mail-who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-list .mail-when { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.mail-list .mail-subject { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.mail-list .mail-snippet { grid-column: 1 / -1; color: var(--muted); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-list .is-unread .mail-who, .mail-list .is-unread .mail-subject { font-weight: 700; }
.mail-list .is-unread a { box-shadow: inset 3px 0 0 var(--brand); }
.mail-head { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; margin: 0 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.mail-head dt { color: var(--muted); }
.mail-head dd { margin: 0; overflow-wrap: anywhere; }
.mail-body { overflow-wrap: anywhere; line-height: 1.55; }
.mail-body table { max-width: 100%; border-collapse: collapse; }
.mail-body td, .mail-body th { padding: 2px 6px; vertical-align: top; }
.mail-body blockquote { margin: .5rem 0; padding-left: .8rem; border-left: 3px solid var(--border); color: var(--text-2); }
.mail-body pre { white-space: pre-wrap; }
.mail-img { display: inline-block; padding: 0 .4rem; border: 1px dashed var(--border); border-radius: 4px; color: var(--muted); font-size: .85rem; }
.mail-link-bad { color: var(--bad); }
.mail-link-flag { font-size: .85rem; font-weight: 600; }
.mail-quote { margin-top: 1rem; }
.mail-quote summary { cursor: pointer; color: var(--text-2); }
.mail-risk { margin: .4rem 0 0; padding-left: 1.2rem; }
.mail-files-title { margin: 1.25rem 0 .5rem; font-size: 1rem; }
.mail-files { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.mail-files a { display: inline-flex; gap: .4rem; align-items: center; min-height: 40px; padding: 0 .8rem; border: 1px solid var(--border); border-radius: var(--radius-sm); text-decoration: none; }
.wrap-anywhere { overflow-wrap: anywhere; }
@media (max-width: 640px) { .mail-search, .mail-search input { width: 100%; } .mail-head { grid-template-columns: 1fr; } }

/* The developer's credit under staff pages, the sign-in pages and error pages (src/view.php powered_by()). */
.powered-by { margin: 28px 0 0; text-align: center; font-size: .8rem; color: var(--muted); }
.powered-by a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 8px; }
.powered-by a:hover, .powered-by a:focus-visible { color: var(--text); text-decoration: underline; }
@media print { .powered-by { display: none; } }
/* Printer switches on the selling and kitchen screens (public/assets/js/print.js). */
.print-settings { position: relative; display: inline-block; }
.print-settings > summary { list-style: none; cursor: pointer; }
.print-settings > summary::-webkit-details-marker { display: none; }
.print-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; width: min(320px, calc(100vw - 32px)); padding: 12px 14px; background: var(--surface, #fff); color: var(--text); border: 1px solid var(--border, #ddd); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.print-panel .check { font-weight: 500; }
.print-panel p { margin: 8px 0 0; }
@media print { .print-settings { display: none; } }
/* Selling screens: one header row (title left; network, printer and back right), and the order's
   options at the top of the cart card as compact toggles (28 Oct 2026). */
.pos-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 12px; }
.pos-head .waiter-title { margin: 0; font-size: 1.4rem; }
.pos-head .till-status { margin: 0; flex-wrap: wrap; justify-content: flex-end; }
.till-status .till-home.btn { margin-left: 0; }
.till-status > a.till-home:not(.btn) { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); text-decoration: none; color: var(--text); }
.till-status > a.till-home:not(.btn):hover { border-color: var(--brand); }
.print-settings > summary.btn { min-height: 40px; gap: .4rem; }
.till-status [data-net]:empty, .till-status [data-queue]:empty { display: none; }
.cart-head { padding-bottom: 12px; margin-bottom: 10px; border-bottom: 1px solid var(--border); }
.cart-title { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.till .segmented { background: var(--surface-2, var(--bg)); padding: 3px; gap: 3px; border-color: var(--border); border-radius: 10px; }
.till .segmented label { position: relative; min-height: 38px; border-radius: 8px; background: transparent; font-size: .92rem; color: var(--muted); transition: background .15s, color .15s; }
.till .segmented label:has(input:checked) { background: var(--brand); color: var(--brand-ink); box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.till .segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.till .segmented label:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.cart-fields { display: grid; gap: 8px; }
.cart-fields .input { min-height: 44px; }
.pos-order .till-products > .input[type="search"] { margin-bottom: 10px; }
@media (prefers-reduced-motion: reduce) { .till .segmented label { transition: none; } }
.till-status:not(.kds-bar) { justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.till-status:not(.kds-bar) [data-print-settings] { margin-left: auto; }
.till-status:not(.kds-bar) [data-print-settings] + .till-home { margin-left: 0; }
/* Held sales on the till (till.js renderHeld). */
.till-held { margin-top: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.till-held > summary { cursor: pointer; padding: 10px 12px; min-height: 44px; display: flex; align-items: center; gap: .5rem; font-weight: 600; }
.till-held ul { list-style: none; margin: 0; padding: 0 12px 8px; }
.held-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--border); }
.held-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.held-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Fixed module footer: the app, its version and build, and the credit (src/view.php app_footer()).
   On phones it sits just above the quick menu; on desktop at the foot of the content beside the sidebar. */
:root { --footer-h: 30px; }
.app-footer {
  position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + var(--safe-bottom)); z-index: 29; height: var(--footer-h);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px;
  font-size: .75rem; color: var(--muted); background: var(--surface); border-top: 1px solid var(--border);
  white-space: nowrap; overflow: hidden;
}
.app-footer a { color: inherit; text-decoration: none; }
.app-footer a:hover, .app-footer a:focus-visible { color: var(--text); text-decoration: underline; }
.app-ver { font-variant-numeric: tabular-nums; }
.layout-app .main { padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + var(--footer-h) + 24px); }
@media (max-width: 420px) { .app-footer .app-ver .muted { display: none; } }
@media (min-width: 1024px) {
  .app-footer { left: var(--sidebar-w); bottom: 0; padding: 0 32px; }
  .layout-app .main { padding-bottom: calc(var(--footer-h) + 32px); }
}
@media print { .app-footer { display: none; } }
/* Office till on a phone: the total bar sits above the footer and the quick menu, not under them. */
@media (max-width: 1023px) {
  .layout-app .till-bar { bottom: calc(var(--tabbar-h) + var(--safe-bottom) + var(--footer-h)); padding-bottom: 10px; }
}
/* Till M-Pesa dialog: prompt, typed code and the C2B pick list. */
.mpesa-sub { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 14px 0 6px; }
.mpesa-code { border-top: 1px solid var(--border); margin-top: 10px; }
.mpesa-found { margin: 0 0 10px; }
.mpesa-found-list { list-style: none; margin: 8px 0 0; padding: 0; max-height: 220px; overflow-y: auto; display: grid; gap: 6px; }
.mpesa-pick { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; text-align: left; padding: 8px 10px; min-height: 44px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text); cursor: pointer; }
.mpesa-pick small { grid-column: 1 / -1; }
.mpesa-pick.is-match { border-color: var(--good, #16a34a); }
.mpesa-pick:hover, .mpesa-pick:focus-visible { border-color: var(--brand); }
.mpesa-code .inline-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: stretch; }
.mpesa-code .inline-form .input { min-width: 0; text-transform: uppercase; letter-spacing: .08em; }
.mpesa-code .hint { margin: 6px 0 0; font-size: .82rem; color: var(--muted); }
/* The live M-Pesa list (c2b.js). */
.mpesa-found-head { display: flex; align-items: center; justify-content: space-between; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.mpesa-live { width: 8px; height: 8px; border-radius: 50%; background: var(--good, #16a34a); box-shadow: 0 0 0 0 rgba(22,163,74,.6); animation: mpesa-pulse 1.6s infinite; }
@keyframes mpesa-pulse { 70% { box-shadow: 0 0 0 8px rgba(22,163,74,0); } 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); } }
.mpesa-pick { grid-template-columns: 1fr auto; }
.mpesa-pick .mpesa-amt { font-weight: 700; font-variant-numeric: tabular-nums; }
.mpesa-pick small { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.mpesa-pick.is-old { border-style: dashed; }
.mpesa-pick.is-picked { border-color: var(--brand); box-shadow: var(--ring); }
.mpesa-wait { padding: 10px; text-align: center; }
.mpesa-found-old { margin-top: 6px; }
[data-found-more] { margin-top: 6px; }
/* Restaurant orders desk (app/station/desk.php). */
.desk-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 12px; }
.desk-stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.desk-stat span { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.desk-stat strong { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.desk-stat small { color: var(--muted); font-variant-numeric: tabular-nums; }
.desk-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.desk-bar .tabs { margin: 0; }
.desk-day .input { min-height: 40px; }
.table .cell-sub { display: block; font-size: .82rem; color: var(--muted); font-weight: 400; }
.table .cell-title { display: block; }
.prod-left.is-low { color: var(--warn, #b45309); font-weight: 600; }
.prod-left.is-out { color: var(--bad, #b91c1c); font-weight: 700; }
/* Server-side lists (src/datatable.php): the filter row above the table. */
.dt-card { padding: 0; }
.dt-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.dt-filter { display: flex; flex-direction: column; gap: 4px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.dt-filter .input, .dt-filter .select { min-height: 40px; min-width: 150px; }
.dt-spacer { flex: 1; }
.dt-card .dt-container { padding: 8px 16px 12px; }
.section-title { font-size: 1.05rem; margin: 18px 0 8px; }
div.dt-processing { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); }
table[data-dt] .cell-title.mono { white-space: nowrap; }
/* The rule pricing the till (till.js showPricing): by quantity, or the customer's special price. */
.till-pricing { margin: -2px 0 10px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); font-size: .85rem; color: var(--muted); }
.till-filters { grid-template-columns: 1fr; }
/* A customer's approved website order on the field phone (till.js webOrderBox). */
.field-weborder { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.field-weborder .field-order { flex-basis: 100%; }
.field-weborder .select, .field-weborder .input { flex: 1 1 140px; min-width: 0; }
/* Station home: the work tiles first; the person's own tiles (problems, notices, roster, PIN) smaller below. */
.station-me-title { margin-top: 1.25rem; font-size: .95rem; color: var(--muted); }
.station-me .big-action { min-height: 0; padding: .6rem .75rem; font-size: .9rem; }
.station-me .big-action small { display: none; }
