/* ==========================================================================
   Bizora BMS — "Market ledger" design system
   Warm paper, ink outlines, kente-inspired accents. No build step required.
   ========================================================================== */

:root {
  --paper: #f5efe3;
  --paper-2: #ece4d3;
  --card: #fffdf8;
  --ink: #1d1b16;
  --ink-2: #4a463c;
  --muted: #7b7566;
  --line: #d9cfbb;
  --green: #0d5c46;
  --green-soft: #d8eadf;
  --gold: #f0a500;
  --gold-soft: #fcefc7;
  --clay: #c0432b;
  --clay-soft: #f8ddd5;
  --sky: #2a6f97;
  --sky-soft: #dcebf3;
  --shadow: 3px 3px 0 var(--ink);
  --shadow-sm: 2px 2px 0 var(--ink);
  --radius: 14px;
  --radius-sm: 9px;
  --font-display: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --kente: repeating-linear-gradient(90deg,
      var(--green) 0 18px, var(--gold) 18px 26px, var(--ink) 26px 30px,
      var(--clay) 30px 40px, var(--gold) 40px 44px, var(--green) 44px 60px);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper: #15140f; --paper-2: #1e1c16; --card: #22201a; --ink: #f1ebdc; --ink-2: #cfc7b4;
  --muted: #9b937f; --line: #3a362b; --green: #3fbf93; --green-soft: #173a2f; --gold: #f5b82e;
  --gold-soft: #3b2f10; --clay: #ef7a5f; --clay-soft: #42221a; --sky: #6fb3d9; --sky-soft: #172d3a;
  --shadow: 3px 3px 0 #000; --shadow-sm: 2px 2px 0 #000; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 15px/1.5 var(--font-body); min-height: 100vh;
  background-image: radial-gradient(var(--line) 0.6px, transparent 0.6px);
  background-size: 22px 22px;
}
a { color: inherit; }
img { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .4em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 800; }
h2 { font-size: 1.25rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 .8em; }
.num, .mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.tiny { font-size: .75rem; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.grow { flex: 1 1 auto; }
.hide { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.kente { height: 6px; background: var(--kente); }

/* ---------- App frame ---------- */
.dock {
  position: sticky; top: 0; z-index: 40; background: var(--card);
  border-bottom: 1.5px solid var(--ink);
}
.dock-inner { display: flex; align-items: center; gap: 1rem; padding: .6rem 1.25rem; max-width: 1440px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; }
.brand-mark { width: 38px; height: 38px; display: block; flex: none; }
.auth-art .brand-mark { width: 44px; height: 44px; }
.brand small { display: block; font: 600 .68rem/1 var(--font-body); color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.dock-nav { display: flex; gap: .25rem; flex: 1; overflow-x: auto; scrollbar-width: none; }
.dock-nav::-webkit-scrollbar { display: none; }
.dock-link {
  display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .75rem; border-radius: 999px;
  text-decoration: none; font-weight: 600; font-size: .9rem; color: var(--ink-2); white-space: nowrap; border: 1.5px solid transparent;
}
.dock-link:hover { background: var(--paper-2); color: var(--ink); }
.dock-link.active { background: var(--ink); color: var(--paper); }
.dock-link .icon { width: 17px; height: 17px; }
.dock-tools { display: flex; align-items: center; gap: .5rem; }
.sell-btn {
  display: inline-flex; align-items: center; gap: .45rem; padding: .5rem 1rem; border-radius: 999px;
  background: var(--green); color: #fff; border: 1.5px solid var(--ink); box-shadow: var(--shadow-sm);
  font-weight: 700; text-decoration: none; white-space: nowrap;
}
.sell-btn:hover { transform: translate(-1px, -1px); box-shadow: var(--shadow); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--green-soft);
  display: grid; place-items: center; font-weight: 800; font-size: .8rem; cursor: pointer; color: var(--ink);
}
.kbd { font: 600 .7rem var(--font-mono); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px; color: var(--muted); background: var(--paper); }
.jump-btn { display: inline-flex; align-items: center; gap: .5rem; border: 1.5px solid var(--line); border-radius: 999px; padding: .4rem .7rem; background: var(--paper); color: var(--muted); cursor: pointer; font: inherit; font-size: .85rem; }
.jump-btn:hover { border-color: var(--ink); color: var(--ink); }
.theme-btn { width: 38px; height: 38px; padding: 0; justify-content: center; }
.theme-btn .icon { width: 18px; height: 18px; }
.theme-btn .when-dark, :root[data-theme="dark"] .theme-btn .when-light { display: none; }
:root[data-theme="dark"] .theme-btn .when-dark { display: inline; }
@media (max-width: 1440px) { .jump-btn .label, .jump-btn .kbd { display: none; } }
@media (max-width: 1520px) { .dock-link .icon { display: none; } .dock-link { padding: .45rem .65rem; } .dock-inner { gap: .75rem; } }
.auth-theme { position: fixed; top: 1rem; right: 1rem; z-index: 50; background: var(--card); }

.statusbar { background: var(--ink); color: var(--paper); font-size: .82rem; }
.statusbar-inner { max-width: 1440px; margin: 0 auto; padding: .35rem 1.25rem; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.statusbar a { color: var(--gold); font-weight: 700; }
.statusbar select { background: transparent; color: inherit; border: 1px solid #ffffff44; border-radius: 6px; padding: 1px 6px; font: inherit; }
.statusbar select option { color: #000; }

.page { max-width: 1440px; margin: 0 auto; padding: 1.5rem 1.25rem 6rem; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head .eyebrow { font: 700 .72rem var(--font-body); text-transform: uppercase; letter-spacing: .12em; color: var(--green); margin-bottom: .25rem; }
.page-head h1 { margin: 0; }
.page-head p { margin: .3rem 0 0; color: var(--muted); }

/* Bottom tabs (phones) */
.tabbar { display: none; }
@media (max-width: 820px) {
  .dock-nav, .jump-btn .label, .jump-btn .kbd, .sell-btn .label-long { display: none; }
  .dock-inner { padding: .5rem 1rem; }
  .page { padding: 1rem 1rem 6.5rem; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 45;
    background: var(--card); border-top: 1.5px solid var(--ink); padding: .3rem .25rem calc(.3rem + env(safe-area-inset-bottom));
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .68rem; font-weight: 600; text-decoration: none; color: var(--muted); padding: .25rem 0; }
  .tabbar a.active { color: var(--ink); }
  .tabbar a.sell .icon { background: var(--green); color: #fff; border-radius: 50%; padding: 7px; width: 38px; height: 38px; border: 1.5px solid var(--ink); margin-top: -18px; box-shadow: var(--shadow-sm); }
  .tabbar .icon { width: 22px; height: 22px; }
}

/* ---------- Cards & panels ---------- */
.card { background: var(--card); border: 1.5px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 1.15rem 1.25rem; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .9rem 1.25rem; border-bottom: 1.5px dashed var(--line); }
.card-head h2, .card-head h3 { margin: 0; }
.card-foot { padding: .8rem 1.25rem; border-top: 1.5px dashed var(--line); }
.panel { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-main { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .grid-4 { grid-template-columns: 1fr 1fr; gap: .6rem; } }

/* Stat tiles: tags pinned to a board */
.tile { position: relative; padding: 1rem 1.1rem .95rem; background: var(--card); border: 1.5px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.tile::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--tile-accent, var(--green)); }
.tile .label { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.tile .value { font: 700 clamp(1.25rem, 2.2vw, 1.7rem)/1.2 var(--font-mono); margin-top: .35rem; letter-spacing: -0.03em; }
.tile .hint { font-size: .8rem; color: var(--muted); margin-top: .2rem; }
.tile.gold { --tile-accent: var(--gold); }
.tile.clay { --tile-accent: var(--clay); }
.tile.sky { --tile-accent: var(--sky); }

/* Receipt-shaped ledger card */
.ledger { position: relative; background: var(--card); border: 1.5px solid var(--ink); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; padding: 1.2rem 1.3rem 1.6rem; box-shadow: var(--shadow); }
.ledger::after {
  content: ""; position: absolute; left: -1.5px; right: -1.5px; bottom: -12px; height: 12px;
  background: linear-gradient(-45deg, transparent 8px, var(--card) 0) 0 0 / 16px 12px, linear-gradient(45deg, transparent 8px, var(--card) 0) 0 0 / 16px 12px;
  filter: drop-shadow(0 1.5px 0 var(--ink));
}
.ledger-line { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; border-bottom: 1px dotted var(--line); }
.ledger-line:last-child { border-bottom: 0; }
.ledger-line .num { font-weight: 600; }
.ledger-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: .4rem; padding-top: .6rem; border-top: 2px solid var(--ink); }
.ledger-total .num { font-size: 1.6rem; font-weight: 800; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .55rem 1rem; min-height: 40px;
  border-radius: var(--radius-sm); border: 1.5px solid var(--ink); background: var(--card); color: var(--ink);
  font: 700 .9rem var(--font-body); text-decoration: none; cursor: pointer; box-shadow: var(--shadow-sm); transition: transform .08s, box-shadow .08s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: var(--shadow); }
.btn:active { transform: translate(1px, 1px); box-shadow: none; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary { background: var(--green); color: #fff; }
.btn-gold { background: var(--gold); color: #1d1b16; }
.btn-danger { background: var(--clay); color: #fff; }
.btn-ghost { border-color: transparent; box-shadow: none; background: transparent; }
.btn-ghost:hover { background: var(--paper-2); box-shadow: none; transform: none; }
.btn-sm { padding: .3rem .65rem; min-height: 32px; font-size: .82rem; }
.btn-lg { padding: .8rem 1.4rem; min-height: 52px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn .icon { width: 17px; height: 17px; }
.link { color: var(--green); font-weight: 700; text-decoration: none; }
.link:hover { text-decoration: underline; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: .3rem; }
.field label, .label-text { font-weight: 700; font-size: .85rem; }
.field .help { font-size: .78rem; color: var(--muted); }
.field .error { font-size: .8rem; color: var(--clay); font-weight: 600; }
.input, .select, .textarea {
  width: 100%; padding: .6rem .75rem; min-height: 42px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--card); color: var(--ink); font: inherit; transition: border-color .1s, box-shadow .1s;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--gold-soft); }
.input.is-invalid { border-color: var(--clay); }
.textarea { min-height: 90px; resize: vertical; }
.input-group { display: flex; align-items: stretch; }
.input-group .addon { display: grid; place-items: center; padding: 0 .7rem; border: 1.5px solid var(--line); border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); background: var(--paper-2); font-weight: 700; font-size: .85rem; }
.input-group .input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.check { display: flex; align-items: flex-start; gap: .55rem; cursor: pointer; font-size: .92rem; }
.check input { width: 18px; height: 18px; accent-color: var(--green); margin-top: 2px; flex: none; }
.form-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
fieldset { border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 1rem; margin: 0; }
legend { font-weight: 800; padding: 0 .4rem; font-family: var(--font-display); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; padding: .65rem 1rem; border-bottom: 1.5px solid var(--ink); white-space: nowrap; }
.table td { padding: .7rem 1rem; border-bottom: 1px dashed var(--line); vertical-align: middle; }
.table tbody tr:hover { background: var(--paper); }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; }
.table th.num { text-align: right; }
.table tfoot td { font-weight: 800; border-top: 1.5px solid var(--ink); border-bottom: 0; }
.row-link { text-decoration: none; font-weight: 700; }
.row-link:hover { color: var(--green); }

/* ---------- Chips, alerts, misc ---------- */
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .55rem; border-radius: 999px; font-size: .74rem; font-weight: 800; border: 1.5px solid currentColor; white-space: nowrap; }
.chip.green { color: var(--green); background: var(--green-soft); }
.chip.gold { color: #8a5c00; background: var(--gold-soft); }
.chip.clay { color: var(--clay); background: var(--clay-soft); }
.chip.sky { color: var(--sky); background: var(--sky-soft); }
.chip.ink { color: var(--ink-2); background: var(--paper-2); }
:root[data-theme="dark"] .chip.gold { color: var(--gold); }

.alert { display: flex; gap: .7rem; align-items: flex-start; padding: .8rem 1rem; border-radius: var(--radius-sm); border: 1.5px solid var(--ink); margin-bottom: 1rem; font-weight: 600; }
.alert .icon { flex: none; width: 20px; height: 20px; margin-top: 1px; }
.alert.success { background: var(--green-soft); }
.alert.error { background: var(--clay-soft); }
.alert.warn { background: var(--gold-soft); }
.alert.info { background: var(--sky-soft); }
.alert .grow a { font-weight: 800; }

.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty .icon { width: 42px; height: 42px; color: var(--line); margin-bottom: .5rem; }
.empty h3 { color: var(--ink); }

.tabs { display: flex; gap: .3rem; border-bottom: 1.5px solid var(--ink); margin-bottom: 1rem; overflow-x: auto; }
.tabs a { padding: .55rem .9rem; text-decoration: none; font-weight: 700; color: var(--muted); border: 1.5px solid transparent; border-bottom: 0; border-radius: 10px 10px 0 0; margin-bottom: -1.5px; white-space: nowrap; }
.tabs a.active { color: var(--ink); background: var(--card); border-color: var(--ink); }

.filters { display: flex; gap: .6rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1rem; }
.filters .field { min-width: 150px; }
.filters .grow { min-width: 220px; }

.pagination { display: flex; gap: .3rem; flex-wrap: wrap; justify-content: center; padding: 1rem; }
.pagination a, .pagination span { min-width: 36px; height: 36px; display: grid; place-items: center; padding: 0 .6rem; border-radius: 8px; border: 1.5px solid var(--line); text-decoration: none; font-weight: 700; font-size: .85rem; }
.pagination .current { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pagination .disabled { opacity: .4; }

.icon { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: middle; }

.menu { position: relative; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: var(--card); border: 1.5px solid var(--ink); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: .4rem; z-index: 60; }
.menu-panel a, .menu-panel button { display: flex; width: 100%; align-items: center; gap: .55rem; padding: .5rem .65rem; border-radius: 7px; text-decoration: none; font: 600 .9rem var(--font-body); background: none; border: 0; color: var(--ink); cursor: pointer; text-align: left; }
.menu-panel a:hover, .menu-panel button:hover { background: var(--paper-2); }
.menu-panel hr { border: 0; border-top: 1px dashed var(--line); margin: .3rem 0; }
.menu-panel .menu-head { padding: .5rem .65rem; font-size: .8rem; color: var(--muted); }

/* Bars (CSS charts) */
.bars { display: flex; align-items: flex-end; gap: 4px; height: 160px; padding-top: 10px; }
.bars .bar { flex: 1; background: var(--green); border: 1.5px solid var(--ink); border-bottom: 0; border-radius: 5px 5px 0 0; min-height: 2px; position: relative; }
.bars .bar.alt { background: var(--gold); }
.bars .bar:hover::after { content: attr(data-label); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 3px 7px; border-radius: 6px; font-size: .72rem; white-space: nowrap; z-index: 2; }
.bars-axis { display: flex; gap: 4px; border-top: 1.5px solid var(--ink); padding-top: 4px; }
.bars-axis span { flex: 1; text-align: center; font-size: .65rem; color: var(--muted); overflow: hidden; white-space: nowrap; }
.meter { height: 10px; background: var(--paper-2); border-radius: 999px; border: 1.5px solid var(--ink); overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--green); }
.meter.warn > span { background: var(--gold); }
.meter.full > span { background: var(--clay); }
.heat { display: grid; grid-template-columns: 38px repeat(24, 1fr); gap: 2px; font-size: .62rem; }
.heat div { aspect-ratio: 1; border-radius: 3px; background: var(--green); }
.heat .lbl { background: none; aspect-ratio: auto; color: var(--muted); display: flex; align-items: center; }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-art { background: var(--green); color: #f8f3e6; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; border-right: 1.5px solid var(--ink); }
.auth-art::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 16px; background: var(--kente); }
.auth-art h2 { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 800; max-width: 14ch; color: #fff; }
.auth-art .ticket { background: #fffdf8; color: #1d1b16; border: 1.5px solid #1d1b16; box-shadow: 5px 5px 0 #1d1b16; border-radius: 14px; padding: 1rem 1.2rem; max-width: 330px; transform: rotate(-2deg); font-family: var(--font-mono); font-size: .85rem; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 2rem 1.25rem; }
.auth-form .card { width: 100%; max-width: 440px; }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-art { display: none; } }
.plan-pick { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
.plan-pick label { border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: .65rem .75rem; cursor: pointer; display: block; }
.plan-pick input { position: absolute; opacity: 0; }
.plan-pick input:checked + span { color: var(--green); }
.plan-pick label:has(input:checked) { border-color: var(--ink); box-shadow: var(--shadow-sm); background: var(--green-soft); }
.plan-pick strong { display: block; }

/* ---------- POS ---------- */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 1rem; height: calc(100vh - 150px); min-height: 520px; }
.pos-catalog { display: flex; flex-direction: column; min-height: 0; }
.pos-search { display: flex; gap: .5rem; margin-bottom: .75rem; }
.pos-search .input { font-size: 1.05rem; min-height: 50px; border: 1.5px solid var(--ink); box-shadow: var(--shadow-sm); }
.pos-cats { display: flex; gap: .35rem; overflow-x: auto; padding-bottom: .5rem; margin-bottom: .25rem; scrollbar-width: thin; }
.pos-cats button { border: 1.5px solid var(--line); background: var(--card); border-radius: 999px; padding: .3rem .8rem; font: 700 .82rem var(--font-body); cursor: pointer; white-space: nowrap; color: var(--ink); }
.pos-cats button.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; overflow-y: auto; padding: 2px 6px 6px 2px; align-content: start; }
.pos-item { text-align: left; border: 1.5px solid var(--ink); background: var(--card); border-radius: 12px; padding: .7rem; cursor: pointer; font: inherit; color: var(--ink); display: flex; flex-direction: column; gap: .3rem; min-height: 104px; box-shadow: var(--shadow-sm); position: relative; }
.pos-item:hover { transform: translate(-1px, -1px); box-shadow: var(--shadow); }
.pos-item:active { transform: translate(1px, 1px); box-shadow: none; }
.pos-item .name { font-weight: 700; font-size: .88rem; line-height: 1.25; flex: 1; }
.pos-item .price { font: 700 .95rem var(--font-mono); }
.pos-item .stock { font-size: .72rem; color: var(--muted); }
.pos-item .stock.low { color: var(--clay); font-weight: 700; }
.pos-item::before { content: ""; position: absolute; top: 0; right: 14px; width: 10px; height: 16px; background: var(--cat, var(--gold)); border: 1.5px solid var(--ink); border-top: 0; border-radius: 0 0 3px 3px; }
.pos-cart { display: flex; flex-direction: column; min-height: 0; }
.pos-cart .card { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.cart-lines { flex: 1; overflow-y: auto; padding: .25rem .9rem; }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: .25rem .6rem; padding: .65rem 0; border-bottom: 1px dashed var(--line); }
.cart-line .name { font-weight: 700; font-size: .9rem; }
.cart-line .meta { font-size: .76rem; color: var(--muted); }
.cart-line .total { font: 700 .95rem var(--font-mono); text-align: right; }
.qty { justify-self: start; display: inline-flex; align-items: center; border: 1.5px solid var(--ink); border-radius: 8px; overflow: hidden; }
.qty button { width: 30px; height: 30px; border: 0; background: var(--paper-2); font: 800 1rem var(--font-body); cursor: pointer; color: var(--ink); }
.qty input { width: 54px; height: 30px; text-align: center; border: 0; border-left: 1.5px solid var(--ink); border-right: 1.5px solid var(--ink); font: 700 .9rem var(--font-mono); background: var(--card); color: var(--ink); }
.cart-sum { padding: .75rem .9rem; border-top: 1.5px solid var(--ink); background: var(--paper); }
.cart-sum .line { display: flex; justify-content: space-between; font-size: .88rem; padding: .12rem 0; }
.cart-sum .grand { font: 800 1.5rem var(--font-mono); }
.pay-methods { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.pay-row { display: grid; grid-template-columns: 130px 1fr auto; gap: .5rem; align-items: center; margin-bottom: .5rem; }
.quick-cash { display: flex; gap: .35rem; flex-wrap: wrap; }
@media (max-width: 1000px) {
  .pos { grid-template-columns: 1fr; height: auto; }
  .pos-grid { max-height: 52vh; }
  .pos-cart .card { max-height: none; }
}

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(20, 18, 12, .55); display: none; align-items: center; justify-content: center; z-index: 80; padding: 1rem; }
.modal.open { display: flex; }
.modal .card { width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto; }
.palette .card { max-width: 560px; align-self: flex-start; margin-top: 10vh; }
.palette input { border: 0; border-bottom: 1.5px solid var(--ink); border-radius: var(--radius) var(--radius) 0 0; font-size: 1.1rem; padding: 1rem 1.2rem; }
.palette-list { max-height: 50vh; overflow-y: auto; padding: .4rem; }
.palette-list a { display: flex; gap: .6rem; align-items: center; padding: .6rem .8rem; border-radius: 8px; text-decoration: none; font-weight: 600; }
.palette-list a.active, .palette-list a:hover { background: var(--gold-soft); }
.palette-list .group { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: .6rem .8rem .2rem; }

.toast { position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: .7rem 1.1rem; border-radius: 10px; font-weight: 700; z-index: 90; box-shadow: var(--shadow); }
@media (max-width: 820px) { .toast { bottom: 5.5rem; } }

/* Receipt print */
.receipt { background: #fff; color: #000; font: 12.5px/1.4 var(--font-mono); padding: 14px; margin: 0 auto; }
.receipt.w80 { width: 302px; }
.receipt.w58 { width: 219px; font-size: 11px; }
.receipt.a4 { width: 100%; max-width: 720px; font-family: var(--font-body); font-size: 14px; }
.receipt h2 { font-family: inherit; font-size: 1.15em; text-align: center; margin: 0 0 4px; }
.receipt .c { text-align: center; }
.receipt hr { border: 0; border-top: 1px dashed #000; margin: 8px 0; }
.receipt table { width: 100%; border-collapse: collapse; }
.receipt td { padding: 1px 0; vertical-align: top; }
.receipt .r { text-align: right; white-space: nowrap; }
.receipt .big { font-size: 1.25em; font-weight: 800; }
@media print {
  body { background: #fff !important; }
  .no-print, .dock, .statusbar, .tabbar, .kente { display: none !important; }
  .page { padding: 0; max-width: none; }
  .card { box-shadow: none; border: 0; }
}

/* Workspace choice (registration and settings) */
.workspace-pick { display: grid; gap: .6rem; }
/* Other Business templates */
.template-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .75rem; }
.template-card { position: relative; display: flex; flex-direction: column; gap: .35rem; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 1rem; cursor: pointer; background: var(--paper); }
.template-card input { position: absolute; opacity: 0; }
.template-card .ws-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--paper-2); border: 1.5px solid var(--line); }
.template-card .flow { font-family: var(--font-mono, monospace); color: var(--ink-2, inherit); font-size: .75rem; line-height: 1.4; }
.template-card:has(input:checked) { border-color: var(--ink); background: var(--green-soft); box-shadow: var(--shadow-sm); }
.template-card:has(input:focus-visible) { outline: 2px solid var(--green); outline-offset: 2px; }
.template-card.is-locked { opacity: .55; cursor: not-allowed; }
.module-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .4rem .9rem; }
.workspace-pick label { position: relative; display: grid; grid-template-columns: 40px 1fr; column-gap: .75rem; align-items: center; border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: .7rem .85rem; cursor: pointer; }
.workspace-pick input { position: absolute; opacity: 0; }
.workspace-pick .ws-icon { grid-row: span 2; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--paper-2); border: 1.5px solid var(--line); }
.workspace-pick label:has(input:checked) { border-color: var(--ink); background: var(--green-soft); box-shadow: var(--shadow-sm); }
.workspace-pick label:has(input:checked) .ws-icon { background: var(--green); color: #fff; border-color: var(--ink); }
.workspace-pick label:has(input:focus-visible) { outline: 3px solid var(--gold); }

/* Setup wizard */
.steps { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.steps a, .steps span { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .7rem; border-radius: 999px; border: 1.5px solid var(--line); font-size: .8rem; font-weight: 700; text-decoration: none; color: var(--muted); background: var(--card); }
.steps .done { color: var(--green); border-color: var(--green); }
.steps .current { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.steps .num { font-family: var(--font-mono); }

/* Offline sync status */
.sync-pill { position: fixed; left: 1rem; bottom: 1rem; z-index: 70; background: var(--gold); color: #1d1b16; border: 1.5px solid var(--ink); box-shadow: var(--shadow-sm); border-radius: 999px; padding: .45rem .9rem; font-weight: 800; font-size: .82rem; text-decoration: none; }
.sync-pill.attention { background: var(--clay); color: #fff; }
@media (max-width: 820px) { .sync-pill { bottom: 5.4rem; } }
.net-chip { display: inline-flex; align-items: center; gap: .35rem; border-radius: 999px; padding: .2rem .65rem; font: 800 .75rem var(--font-body); border: 1.5px solid currentColor; cursor: pointer; background: var(--green-soft); color: var(--green); }
.net-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.net-chip.offline { background: var(--paper-2); color: var(--muted); }
.net-chip.waiting { background: var(--gold-soft); color: #8a5c00; }
.net-chip.attention { background: var(--clay-soft); color: var(--clay); }

/* Food menu */
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .9rem; }
.menu-card { background: var(--card); border: 1.5px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; display: flex; flex-direction: column; }
.menu-card img, .menu-ph { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; border-bottom: 1.5px solid var(--ink); }
.menu-ph { display: grid; place-items: center; background: var(--gold-soft); color: #8a5c00; }
.menu-ph .icon { width: 40px; height: 40px; }
.menu-card.off { opacity: .55; }
.pos-item .thumb { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.pos-item.unavailable { opacity: .45; cursor: not-allowed; }
.pos-item.unavailable::after { content: "Unavailable"; position: absolute; top: 8px; left: 8px; background: var(--clay); color: #fff; font-size: .65rem; font-weight: 800; padding: 1px 6px; border-radius: 6px; }

/* Orders board */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-items: start; }
/* Workflow boards: one column per stage, scrolling sideways when there are many. */
.board-flow { grid-template-columns: repeat(var(--cols, 4), minmax(200px, 1fr)); overflow-x: auto; padding-bottom: .25rem; }
@media (max-width: 1000px) { .board, .board-flow { grid-template-columns: 1fr; } }
.board-col { background: var(--paper-2); border: 1.5px dashed var(--line); border-radius: var(--radius); padding: .75rem; min-height: 200px; }
.board-col h3 { display: flex; justify-content: space-between; margin: 0 0 .6rem; }
.order-card { background: var(--card); border: 1.5px solid var(--ink); border-radius: 12px; box-shadow: var(--shadow-sm); padding: .75rem .85rem; margin-bottom: .7rem; }
.order-no { font: 800 1.6rem/1 var(--font-mono); letter-spacing: -0.03em; }

/* Saved-offline records */
.sync-pill { cursor: pointer; font-family: var(--font-body); }
.sync-panel { position: fixed; left: 1rem; bottom: 3.6rem; z-index: 71; width: min(420px, calc(100vw - 2rem)); }
.sync-row { padding: .55rem 0; border-bottom: 1px dashed var(--line); }
.sync-row:last-of-type { border-bottom: 0; }
@media (max-width: 820px) { .sync-panel { bottom: 8rem; } }

/* ---------- Phone: app shell ----------
 * On phones Bizora behaves like an installed app: a compact top bar with the page title, a bottom
 * tab bar, a "More" sheet for everything else, lists as cards and pop-ups as bottom sheets. */
.appbar-title, .phone-only, .pos-cartbar, .pos-cart-backdrop, .auth-phone-brand, .filter-toggle { display: none; }
.sheet { display: none; }
html { -webkit-tap-highlight-color: transparent; }

@media (max-width: 820px) {
  .desk-only { display: none !important; }
  .phone-only { display: block; }
  html.sheet-open, html.sheet-open body { overflow: hidden; }
  body { overscroll-behavior-y: none; }
  .kente { height: 4px; }
  .dock { padding-top: env(safe-area-inset-top); box-shadow: 0 1px 0 var(--line); border-bottom-width: 1px; }
  .dock-inner { gap: .6rem; padding: .45rem .9rem; min-height: 56px; }
  .brand > span { display: none; }
  .brand-mark { width: 34px; height: 34px; }
  .appbar-title { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.15; }
  .appbar-title strong { font: 800 1.12rem var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .appbar-title small { font-size: .72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dock-tools { gap: .4rem; }
  .statusbar-inner { padding: .35rem .9rem; font-size: .78rem; }

  /* The page title is already in the top bar */
  .page { padding: .9rem .85rem calc(6.2rem + env(safe-area-inset-bottom)); }
  .page-head { margin-bottom: .9rem; gap: .6rem; align-items: stretch; }
  .page-head h1 { font-size: 1.55rem; }
  .page-head .eyebrow { display: none; }
  .page-head > :last-child:not(:first-child) { display: flex; gap: .5rem; flex-wrap: wrap; width: 100%; }
  .page-head > :last-child:not(:first-child) > .btn, .page-head > :last-child:not(:first-child) > form, .page-head > :last-child:not(:first-child) > a { flex: 1 1 auto; justify-content: center; }

  /* Touch: bigger targets, no zoom on focus (iOS zooms below 16px) */
  .input, .select, textarea, input[type="text"], input[type="number"], input[type="search"], input[type="email"], input[type="tel"], input[type="date"], input[type="password"], select { font-size: 16px !important; }
  .btn { min-height: 44px; }
  .btn-sm { min-height: 36px; }
  .card { border-radius: 16px; }
  .card-pad { padding: 1rem; }
  .card-head { padding: .8rem 1rem; }

  /* Bottom tab bar */
  .tabbar { padding: .25rem .25rem calc(.35rem + env(safe-area-inset-bottom)); box-shadow: 0 -6px 18px rgba(0, 0, 0, .06); }
  .tabbar a { font-size: .7rem; min-height: 50px; justify-content: center; }
  .tabbar a.active { color: var(--green); font-weight: 800; }
  .tabbar a.active .icon { stroke-width: 2.4; }

  /* Lists: each table row becomes a card line */
  .table-wrap { overflow: visible; }
  table.table, .table tbody, .table tfoot { display: block; width: 100%; }
  .table thead { display: none; }
  .table tr { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .7rem; padding: .75rem 1rem; border-bottom: 1px dashed var(--line); position: relative; }
  .table tbody tr:hover { background: transparent; }
  .table tbody tr:active { background: var(--paper); }
  .table tr:last-child { border-bottom: 0; }
  .table td { display: block; padding: 0; border: 0; max-width: 100%; font-size: .88rem; }
  .table td:first-child { font-weight: 700; }
  .table td.num { margin-left: auto; font-weight: 700; }
  .table td:empty { display: none; }
  .table tfoot tr { border-top: 1.5px solid var(--ink); }
  .table td .row-link::after { content: ""; position: absolute; inset: 0; }
  .table td[data-label]::before { content: attr(data-label) " "; font: 600 .7rem var(--font-body); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-right: .25rem; }
  .table td.num[data-label] { margin-left: 0; }

  /* Pop-ups slide up from the bottom */
  .modal { align-items: flex-end; padding: 0; }
  .modal .card { max-width: none; border-radius: 20px 20px 0 0; max-height: 90vh; padding-bottom: env(safe-area-inset-bottom); animation: sheet-up .22s ease-out; border-bottom: 0; }
  .palette .card { margin-top: 0; align-self: flex-end; }
  .toast { bottom: calc(5.8rem + env(safe-area-inset-bottom)); max-width: calc(100vw - 2rem); text-align: center; }
  .menu-panel { position: fixed; left: .75rem; right: .75rem; top: auto; bottom: calc(5.5rem + env(safe-area-inset-bottom)); min-width: 0; }

  /* "More" sheet */
  .sheet { display: block; position: fixed; inset: 0; z-index: 70; pointer-events: none; }
  .sheet-backdrop { position: absolute; inset: 0; background: rgba(20, 18, 12, .5); opacity: 0; transition: opacity .2s; }
  .sheet-body { position: absolute; left: 0; right: 0; bottom: 0; background: var(--card); border-top: 1.5px solid var(--ink); border-radius: 22px 22px 0 0; padding: .4rem 1rem calc(1rem + env(safe-area-inset-bottom)); max-height: 88vh; overflow-y: auto; transform: translateY(105%); transition: transform .24s ease-out; }
  .sheet.open { pointer-events: auto; }
  .sheet.open .sheet-backdrop { opacity: 1; }
  .sheet.open .sheet-body { transform: none; visibility: visible; transition: transform .24s ease-out; }
  .sheet-body, .pos-cart { visibility: hidden; transition: transform .24s ease-out, visibility 0s .24s; }
  .pos-cart.open { visibility: visible; transition: transform .24s ease-out; }
  .page-head h1.same-as-appbar { display: none; }
  .sheet-grip { width: 42px; height: 5px; border-radius: 3px; background: var(--line); margin: .35rem auto .8rem; }
  .sheet-user { display: flex; align-items: center; gap: .7rem; margin-bottom: .8rem; }
  .sheet-search { display: flex; align-items: center; gap: .5rem; width: 100%; padding: .75rem .9rem; border-radius: 12px; border: 1.5px solid var(--line); background: var(--paper); color: var(--muted); font: inherit; margin-bottom: .9rem; }
  .sheet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-bottom: 1rem; }
  .sheet-grid a { display: flex; flex-direction: column; align-items: center; gap: .35rem; text-align: center; text-decoration: none; font-size: .76rem; font-weight: 600; padding: .65rem .25rem; border-radius: 14px; color: var(--ink); line-height: 1.2; }
  .sheet-grid a:active, .sheet-grid a.active { background: var(--paper-2); }
  .sheet-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); border: 1.5px solid var(--ink); }
  .sheet-icon .icon { width: 22px; height: 22px; }

  /* Till: full-screen menu, cart slides up from a bar */
  .pos { display: block; height: auto; min-height: 0; }
  .pos-search .input { min-height: 46px; }
  .pos-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: none; overflow: visible; gap: .5rem; padding: 2px; }
  .pos-item { min-height: 92px; border-radius: 14px; }
  .pos-cats { margin: 0 -.85rem .25rem; padding: 0 .85rem .5rem; scrollbar-width: none; }
  .pos-cart { position: fixed; left: 0; right: 0; bottom: 0; z-index: 66; transform: translateY(105%); transition: transform .24s ease-out; }
  .pos-cart.open { transform: none; }
  .pos-cart .card { border-radius: 22px 22px 0 0; max-height: 90vh; height: auto; padding-bottom: env(safe-area-inset-bottom); border-bottom: 0; }
  .pos-cart .cart-lines { max-height: 38vh; }
  .pos-cart-backdrop { position: fixed; inset: 0; z-index: 65; background: rgba(20, 18, 12, .5); }
  html:not(.sheet-open) .pos-cart-backdrop { display: none; }
  html.sheet-open .pos-cart-backdrop { display: block; }
  .pos-cartbar { display: flex; align-items: center; gap: .7rem; position: fixed; left: .75rem; right: .75rem; bottom: calc(4.6rem + env(safe-area-inset-bottom)); z-index: 46; padding: .75rem 1rem; border-radius: 16px; border: 1.5px solid var(--ink); background: var(--paper-2); color: var(--muted); font: 700 .95rem var(--font-body); box-shadow: var(--shadow); }
  .pos-cartbar.has-items { background: var(--green); color: #fff; }
  .pos-cartbar-count { min-width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .22); font-family: var(--font-mono); padding: 0 .35rem; }
  .pos-cartbar:not(.has-items) .pos-cartbar-count { background: var(--card); }
  .pos-cartbar.bump { animation: bump .25s ease-out; }

  /* Food board: one column, newest work first */
  .board { gap: .8rem; }
  .order-card .btn { flex: 1 1 auto; justify-content: center; }
  .sync-pill { left: .75rem; bottom: calc(5.4rem + env(safe-area-inset-bottom)); }
  .sync-panel { left: .75rem; right: .75rem; width: auto; bottom: calc(8rem + env(safe-area-inset-bottom)); }

  /* Search and filters fold behind a button */
  .filter-toggle { display: inline-flex; justify-content: center; margin-bottom: .8rem; }
  form.filters-fold:not(.filters-open) { display: none; }

  /* Sign-in screens */
  .auth { min-height: 100dvh; }
  .auth-form { align-items: flex-start; padding: calc(2.5rem + env(safe-area-inset-top)) 1rem 2rem; }
  .auth-phone-brand { display: flex; flex-direction: column; align-items: center; gap: .3rem; margin-bottom: 1.4rem; text-align: center; }
  .auth-phone-brand img { width: 64px; height: 64px; border-radius: 18px; box-shadow: var(--shadow-sm); }
  .auth-phone-brand strong { font: 800 1.6rem var(--font-display); }
  .auth-phone-brand span { color: var(--muted); font-size: .9rem; }
}
@media (max-width: 380px) { .sheet-grid { grid-template-columns: repeat(3, 1fr); gap: .3rem; } .pos-item .name { font-size: .82rem; } }
@keyframes sheet-up { from { transform: translateY(40%); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes bump { 50% { transform: scale(1.03); } }

/* Receipts and tickets: open in the same tab, with a way back */
.print-bar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; padding: .6rem .5rem calc(.6rem); margin: -1rem -1rem 1rem; background: var(--paper-2); border-bottom: 1.5px solid var(--line); padding-top: calc(.6rem + env(safe-area-inset-top)); }
.print-bar .btn { min-height: 42px; }
.print-sheet { position: fixed; inset: 0; z-index: 95; background: var(--paper-2); overflow-y: auto; padding: 1rem; }
.print-sheet .print-bar { margin: -1rem -1rem 1rem; }
.print-slip { background: #fff; color: #111; font: 12px/1.45 var(--font-mono); width: 300px; max-width: 100%; margin: 0 auto; padding: 14px 12px; border: 1px solid var(--line); }
.print-slip table { width: 100%; border-collapse: collapse; }
.print-slip hr { border: 0; border-top: 1px dashed #999; }
@media print {
  html.printing-sheet body > :not(.print-sheet) { display: none !important; }
  html.printing-sheet .print-sheet { position: static; padding: 0; background: #fff; }
  .print-slip { border: 0; width: auto; }
}

/* Plan comparison: one column per plan, name and price centred together */
.compare-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.compare { table-layout: fixed; min-width: 640px; }
.compare col.compare-feature { width: 30%; }
.compare col.is-current { background: var(--green-soft); }
.compare th, .compare td { text-align: center; vertical-align: middle; }
.compare th:first-child, .compare td:first-child { text-align: left; font-weight: 600; }
.compare thead th:first-child { vertical-align: bottom; }
.compare-plan { padding-top: .9rem !important; padding-bottom: .9rem !important; }
.compare-name { display: block; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.compare-price { display: block; margin-top: .2rem; font: 800 1.25rem var(--font-mono); color: var(--ink); text-transform: none; letter-spacing: 0; white-space: nowrap; }
.compare-price small { font: 600 .72rem var(--font-body); color: var(--muted); margin-left: 2px; }
.compare-plan .chip { margin-top: .35rem; }
.compare .icon { width: 18px; height: 18px; }
@media (max-width: 820px) {
  /* Keep the comparison as a real table on phones: swipe sideways, feature names stay in view */
  .compare-wrap table.compare { display: table; min-width: 560px; }
  .compare-wrap .compare thead { display: table-header-group; }
  .compare-wrap .compare tbody { display: table-row-group; }
  .compare-wrap .compare tr { display: table-row; padding: 0; }
  .compare-wrap .compare th, .compare-wrap .compare td { display: table-cell; padding: .6rem .5rem; border-bottom: 1px dashed var(--line); }
  .compare-wrap .compare th:first-child, .compare-wrap .compare td:first-child { position: sticky; left: 0; background: var(--card); z-index: 1; font-size: .82rem; }
  .compare col.compare-feature { width: 132px; }
  .compare-wrap table.compare { min-width: 600px; }
  .compare-price { font-size: 1.02rem; }
  .compare-price small { display: block; margin: 0; }
}

/* Attendance */
.attendance-row { display: grid; grid-template-columns: minmax(0, 1.6fr) 150px 120px 120px auto; gap: .5rem; align-items: center; padding: .65rem 1rem; border-bottom: 1px dashed var(--line); }
.attendance-row:last-child { border-bottom: 0; }
.month-grid { min-width: 900px; }
.month-grid th, .month-grid td { padding: .35rem .2rem !important; font-size: .78rem; }
.month-grid .mark { font-weight: 800; }
.mark-present { color: var(--green); } .mark-absent { color: var(--clay); background: var(--clay-soft); } .mark-leave, .mark-half_day { color: #8a5c00; background: var(--gold-soft); } .mark-off { color: var(--muted); }
details.adjust { display: inline-block; position: relative; }
details.adjust[open] > form { position: absolute; right: 0; z-index: 10; }
@media (max-width: 820px) {
  .attendance-row { grid-template-columns: 1fr 1fr; }
  .attendance-row .attendance-who { grid-column: 1 / -1; }
  .attendance-row .btn { grid-column: 1 / -1; }
  details.adjust[open] > form { position: static; }
}
.clock-card { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; border-left: 6px solid var(--green); }
@media (max-width: 820px) { .clock-card { flex-wrap: wrap; } .clock-card .btn { width: 100%; justify-content: center; } }

/* Barcode scanning */
.camera-btn { padding: 0 .8rem; flex: none; }
.input-group .camera-btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; min-height: 0; }
.camera-scan { position: fixed; inset: 0; z-index: 100; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; color: #fff; padding: 1rem; }
.camera-scan video { width: 100%; max-width: 520px; max-height: 70vh; object-fit: cover; border-radius: 14px; }
.camera-scan .camera-frame { position: absolute; width: min(70vw, 360px); height: 120px; border: 3px solid var(--gold); border-radius: 12px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .25); pointer-events: none; }
.camera-scan p { margin: 0; font-weight: 700; }
.input-group .input:has(+ .camera-btn) { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }

/* Pricing: plan cards like a product pricing page */
.pricing { margin-bottom: 1.25rem; }
.pricing-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.pricing-scheduled { display: flex; align-items: center; gap: .6rem; background: var(--gold-soft); border: 1.5px solid var(--ink); border-radius: 12px; padding: .45rem .6rem .45rem .9rem; font-size: .88rem; }
.pricing-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; align-items: stretch; }
.price-card { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1.5px solid var(--line); border-radius: 18px; padding: 1.4rem 1.2rem 1.2rem; box-shadow: var(--shadow-sm); }
.price-card.is-popular { border-color: var(--ink); box-shadow: var(--shadow); }
.price-card.is-current { border: 2px solid var(--green); background: linear-gradient(180deg, var(--green-soft), var(--card) 40%); }
.price-ribbon { position: absolute; top: -12px; left: 1.2rem; background: var(--ink); color: var(--paper); font: 800 .7rem var(--font-body); letter-spacing: .08em; text-transform: uppercase; padding: .3rem .7rem; border-radius: 999px; }
.price-ribbon.current { background: var(--green); color: #fff; }
.price-card h3 { margin: 0; font-size: 1.25rem; }
.price-tagline { margin: .2rem 0 .9rem; color: var(--muted); font-size: .86rem; min-height: 2.4em; }
.price-amount { font: 800 2.4rem/1 var(--font-display); letter-spacing: -.02em; margin-bottom: 1rem; }
.price-amount .currency { font-size: 1rem; vertical-align: top; margin-right: .15rem; color: var(--muted); }
.price-amount .per { font: 600 .85rem var(--font-body); color: var(--muted); margin-left: .2rem; }
.price-limits, .price-features ul, .check-list { list-style: none; margin: 0; padding: 0; }
.price-limits { border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); padding: .7rem 0; margin-bottom: .9rem; }
.price-limits li, .price-features li, .check-list li { display: flex; gap: .5rem; align-items: flex-start; font-size: .88rem; padding: .18rem 0; }
.price-limits .icon { width: 16px; height: 16px; color: var(--muted); flex: none; margin-top: 2px; }
.price-features { flex: 1; margin-bottom: 1.1rem; }
.price-features .icon, .check-list.good .icon { width: 16px; height: 16px; color: var(--green); flex: none; margin-top: 2px; }
.check-list.bad .icon { width: 16px; height: 16px; color: var(--clay); flex: none; margin-top: 2px; }
.plan-move { display: flex; align-items: center; justify-content: center; gap: 1.25rem; }
.plan-move-side { flex: 1; text-align: center; padding: 1rem; border: 1.5px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; gap: .2rem; }
.plan-move-side strong { font: 800 1.3rem var(--font-display); }
.plan-move-side.is-new { border-color: var(--green); background: var(--green-soft); }
.plan-move-arrow { width: 28px; height: 28px; flex: none; color: var(--muted); }
@media (max-width: 1100px) { .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1.6rem; } }
@media (max-width: 600px) { .pricing-grid { grid-template-columns: 1fr; } .plan-move { gap: .5rem; } .plan-move-side { padding: .7rem .4rem; } }

/* Bookings */
.booking-row { display: flex; gap: 1rem; align-items: flex-start; padding: .85rem 1.1rem; border-bottom: 1px dashed var(--line); }
.booking-row:last-child { border-bottom: 0; }
.booking-row.is-done { opacity: .65; }
.booking-time { display: flex; flex-direction: column; min-width: 70px; font-family: var(--font-mono); }
.booking-time strong { font-size: 1.2rem; }
.booking-actions details[open] > form { position: absolute; right: 1rem; z-index: 10; background: var(--card); }
.booking-actions details { position: relative; }
@media (max-width: 820px) { .booking-row { flex-wrap: wrap; } .booking-actions { width: 100%; } .booking-actions details[open] > form { position: static; } }
.segmented { display: inline-flex; border: 1.5px solid var(--ink); border-radius: 999px; padding: 3px; gap: 3px; background: var(--card); margin-bottom: 1rem; }
.segmented a { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .9rem; border-radius: 999px; text-decoration: none; font-weight: 700; font-size: .88rem; color: var(--muted); }
.segmented a.active { background: var(--ink); color: var(--paper); }
.segmented .icon { width: 16px; height: 16px; }

/* Delivery driver link: one column, big buttons, works on any phone */
.driver-page { background: var(--paper-2); }
.driver { max-width: 520px; margin: 0 auto; padding: 1rem 1rem 2rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.driver > * { min-width: 0; }
.driver-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; }
.driver-head h1 { margin: .1rem 0 0; font-size: 1.5rem; }
.driver .segmented { display: flex; margin: 0; }
.driver .segmented label { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .55rem .9rem; border-radius: 999px; font-weight: 700; cursor: pointer; }
.driver .segmented label:has(input:checked) { background: var(--ink); color: var(--paper); }
.driver .segmented input { accent-color: var(--green); }

/* Debtor ageing */
.aging { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem; padding: 1rem; }
@media (max-width: 760px) { .aging { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.aging-col { display: grid; gap: .25rem; }
.aging-bar { height: 8px; background: var(--paper-2); border-radius: 999px; overflow: hidden; }
.aging-bar span { display: block; height: 100%; background: var(--green); }
.aging-d31_60 .aging-bar span, .aging-d1_30 .aging-bar span { background: var(--gold, #d9a21b); }
.aging-d61_90 .aging-bar span, .aging-d90 .aging-bar span { background: var(--clay); }
@media print { .statement { border: 0; box-shadow: none; } }

/* Online booking page */
.book-option { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .7rem .85rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; color: inherit; }
.book-option.is-on, .book-chip.is-on { border-color: var(--ink); background: var(--green-soft); }
.chips-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.book-chip { display: inline-flex; align-items: center; justify-content: center; padding: .5rem .8rem; border: 1.5px solid var(--line); border-radius: 999px; text-decoration: none; color: inherit; font-weight: 600; white-space: nowrap; }
.book-day { flex-direction: column; border-radius: var(--radius-sm); min-width: 64px; line-height: 1.2; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .4rem; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ===== Delivery: app-style screens (driver link and business pages) ===== */
.dl-app { background: var(--paper-2); min-height: 100dvh; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.dl-top { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: calc(.75rem + env(safe-area-inset-top)) 1rem .75rem; background: var(--green); color: #fff; }
.dl-top-business { font-size: .78rem; opacity: .85; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.dl-top-number { font: 800 1.25rem var(--font-display); }
.dl-status { padding: .35rem .75rem; border-radius: 999px; font-weight: 700; font-size: .8rem; background: rgba(255,255,255,.16); border: 1.5px solid rgba(255,255,255,.4); white-space: nowrap; }
.dl-status-out_for_delivery { background: #f0a500; color: #1d1b16; border-color: #1d1b16; animation: dl-pulse 1.8s ease-in-out infinite; }
.dl-status-delivered { background: #14c285; color: #08251b; border-color: #08251b; }
.dl-status-failed, .dl-status-cancelled { background: #c4472a; border-color: #fff; }
@keyframes dl-pulse { 50% { box-shadow: 0 0 0 6px rgba(240,165,0,.25); } }

.dl-map { position: relative; height: 230px; overflow: hidden; background: #e8efe6; border-bottom: 1.5px solid var(--ink); }
.dl-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: saturate(.9); }
.dl-map-fallback, .dl-map-fallback svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.dl-pin { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; border: 3px solid #fff; box-shadow: 0 6px 16px rgba(0,0,0,.25); pointer-events: none; animation: dl-bob 2.4s ease-in-out infinite; }
.dl-pin .icon { width: 22px; height: 22px; }
@keyframes dl-bob { 50% { transform: translate(-50%, calc(-50% - 6px)); } }
.dl-map.is-card { height: 200px; border: 1.5px solid var(--ink); border-radius: var(--radius); }

.dl-sheet { position: relative; margin: -22px auto 0; max-width: 560px; background: var(--card); border: 1.5px solid var(--ink); border-bottom: 0; border-radius: 22px 22px 0 0; padding: .6rem 1rem 1.25rem; display: grid; gap: .9rem; min-height: 60vh; }
.dl-grip { width: 44px; height: 5px; border-radius: 999px; background: var(--line); margin: 0 auto .2rem; }
.dl-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

.dl-track { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); position: relative; }
.dl-track::before { content: ""; position: absolute; top: 15px; left: 16.6%; right: 16.6%; height: 3px; background: var(--line); }
.dl-track li { position: relative; display: grid; justify-items: center; text-align: center; gap: .2rem; }
.dl-track .dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 2px solid var(--line); font-weight: 800; font-size: .85rem; color: var(--muted); z-index: 1; }
.dl-track .dot .icon { width: 16px; height: 16px; }
.dl-track li.done .dot { background: var(--green); border-color: var(--green); color: #fff; }
.dl-track li.current .dot { border-color: #f0a500; color: #1d1b16; animation: dl-pulse 1.8s ease-in-out infinite; }
.dl-track.is-bad li:last-child.done .dot { background: var(--clay); border-color: var(--clay); }
.dl-track .label { font-weight: 700; font-size: .8rem; }
.dl-track .time { font-size: .72rem; color: var(--muted); min-height: 1em; }

.dl-person, .dl-address { display: flex; align-items: center; gap: .75rem; padding: .8rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); }
.dl-avatar { width: 46px; height: 46px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 800 1rem var(--font-display); background: #fde7b0; color: #1d1b16; border: 1.5px solid var(--ink); }
.dl-round { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--ink); background: var(--card); color: var(--ink); }
.dl-round-wa { background: #25d366; color: #fff; border-color: #128c4a; }
.dl-address-icon { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); }
.dl-note { margin-top: .3rem; font-size: .85rem; background: #fff6dc; border-left: 3px solid #f0a500; padding: .3rem .5rem; border-radius: 6px; }
.dl-order { padding: .8rem; border: 1.5px dashed var(--line); border-radius: var(--radius-sm); }
.dl-order-line { padding: .3rem 0; border-bottom: 1px dotted var(--line); font-size: .92rem; }
.dl-order-line:last-child { border-bottom: 0; }
.dl-cash { display: flex; justify-content: space-between; align-items: center; padding: 1rem; border-radius: var(--radius); background: #1d1b16; color: #fff; }
.dl-cash .dl-label { color: #f0a500; }
.dl-cash-amount { font: 800 2rem var(--font-mono); line-height: 1.1; }
.dl-cash > .icon { width: 36px; height: 36px; color: #f0a500; }
.dl-cash.is-paid { background: var(--green); }
.dl-cash.is-paid .dl-label, .dl-cash.is-paid > .icon { color: #b9f5dc; }
.dl-done { padding: .8rem; border-radius: var(--radius-sm); background: var(--green-soft); }
.dl-fail summary { cursor: pointer; color: var(--clay); font-weight: 700; text-align: center; padding: .4rem; }

.dl-actionbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--paper-2) 70%, transparent); }
.dl-actionbar > * { max-width: 560px; margin: 0 auto; }
.dl-cta { width: 100%; display: flex; align-items: center; justify-content: center; gap: .6rem; min-height: 60px; border-radius: 16px; border: 2px solid #1d1b16; background: var(--green); color: #fff; font: 800 1.1rem var(--font-display); box-shadow: 0 5px 0 #1d1b16; cursor: pointer; }
.dl-cta:active { transform: translateY(3px); box-shadow: 0 2px 0 #1d1b16; }
.dl-cta .icon { width: 22px; height: 22px; }

.dl-modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.dl-modal[hidden] { display: none; }
.dl-modal-backdrop { position: absolute; inset: 0; background: rgba(15,14,10,.5); opacity: 0; transition: opacity .2s; }
.dl-modal-sheet { position: relative; width: 100%; max-width: 560px; background: var(--card); border: 1.5px solid var(--ink); border-radius: 22px 22px 0 0; padding: .6rem 1rem calc(1.25rem + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform .22s ease-out; }
.dl-modal.open .dl-modal-backdrop { opacity: 1; }
.dl-modal.open .dl-modal-sheet { transform: none; }
.dl-amount { font: 800 1.8rem var(--font-mono); text-align: center; min-height: 64px; }
.dl-methods { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.dl-methods label { display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 52px; border: 1.5px solid var(--line); border-radius: 14px; font-weight: 700; cursor: pointer; }
.dl-methods input { position: absolute; opacity: 0; }
.dl-methods label:has(input:checked) { border-color: var(--ink); background: var(--green-soft); box-shadow: var(--shadow-sm); }

/* Business side: dispatch board */
.dl-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-items: start; margin-bottom: 1.25rem; }
@media (max-width: 1000px) { .dl-board { grid-template-columns: 1fr; } }
.dl-col h3 { display: flex; justify-content: space-between; align-items: center; margin: 0 0 .6rem; font-size: 1rem; }
.dl-card { display: grid; gap: .55rem; padding: .85rem; margin-bottom: .6rem; border: 1.5px solid var(--ink); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-sm); text-decoration: none; color: inherit; transition: transform .12s; }
.dl-card:hover { transform: translateY(-2px); }
.dl-card-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.dl-card-route { display: grid; grid-template-columns: 14px 1fr; gap: .1rem .5rem; font-size: .85rem; }
.dl-card-route .stop { width: 10px; height: 10px; border-radius: 50%; margin-top: .35rem; background: var(--green); }
.dl-card-route .stop.end { background: var(--clay); }
.dl-card-route .line { width: 2px; height: 12px; margin-left: 4px; background: var(--line); }
.dl-card-foot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-size: .85rem; }
.dl-driver { display: inline-flex; align-items: center; gap: .4rem; }
.dl-driver .dl-avatar { width: 28px; height: 28px; font-size: .7rem; }

/* ===== Sign-in and registration ===== */
.auth2 { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); background: var(--paper); }
.auth2-art { position: sticky; top: 0; height: 100dvh; overflow: hidden; background: #1d1b16; color: #fff; border-right: 1.5px solid var(--ink); }
.auth2-art::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 14px; background: var(--kente); z-index: 3; }
.auth2-shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(13,30,24,.55) 0%, rgba(13,30,24,0) 30%, rgba(13,30,24,0) 45%, rgba(13,30,24,.88) 100%); }
.auth2-brand { position: absolute; z-index: 2; top: 1.6rem; left: 1.8rem; display: inline-flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font: 800 1.5rem var(--font-display); }
.auth2-brand img { border-radius: 12px; }
.auth2-pitch { position: absolute; z-index: 2; left: 1.8rem; right: 1.8rem; bottom: 2.6rem; }
.auth2-pitch h2 { margin: 0 0 1rem; color: #fff; font-size: clamp(1.9rem, 3.4vw, 3rem); font-weight: 800; line-height: 1.05; max-width: 16ch; text-wrap: balance; }
.auth2-points { list-style: none; padding: 0; margin: 0 0 1.2rem; display: grid; gap: .45rem; font-weight: 600; }
.auth2-points li { display: flex; align-items: center; gap: .5rem; }
.auth2-points .icon { width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: #14c285; color: #08251b; }
.auth2-dots { display: flex; gap: .4rem; }
.auth2-dots span { width: 28px; height: 4px; border-radius: 999px; background: rgba(255,255,255,.3); overflow: hidden; position: relative; }
.auth2-dots span::after { content: ""; position: absolute; inset: 0; background: #f0a500; transform: scaleX(0); transform-origin: left; animation: dot-fill 36s linear infinite; animation-delay: calc(var(--i) * 6s); }
@keyframes dot-fill { 0% { transform: scaleX(0); } 16.6% { transform: scaleX(1); } 16.7%, 100% { transform: scaleX(0); } }

.scenes { position: absolute; inset: 0; }
.scene { position: absolute; inset: 0; margin: 0; opacity: 0; animation: scene-fade 36s infinite; animation-delay: calc(var(--i) * 6s); }
.scene:first-child { opacity: 1; }
.scene-art, .scene-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: scene-zoom 36s infinite; animation-delay: calc(var(--i) * 6s); }
.scene figcaption { position: absolute; z-index: 2; top: 1.6rem; right: 1.6rem; display: grid; justify-items: end; gap: .1rem; text-align: right; padding: .55rem .8rem; border-radius: 12px; background: rgba(255,253,248,.92); color: #1d1b16; border: 1.5px solid #1d1b16; box-shadow: 4px 4px 0 #1d1b16; font-size: .8rem; }
.scene figcaption strong { font: 800 .95rem var(--font-display); }
.scene figcaption em { font-style: normal; color: #0d5c46; font-weight: 700; }
@keyframes scene-fade { 0% { opacity: 0; } 2%, 16% { opacity: 1; } 18%, 100% { opacity: 0; } }
@keyframes scene-zoom { 0% { transform: scale(1); } 18% { transform: scale(1.07); } 100% { transform: scale(1.07); } }

.scene .steam path { animation: steam 2.4s ease-in-out infinite; }
.scene .steam path + path { animation-delay: .8s; }
@keyframes steam { 0% { opacity: 0; transform: translateY(10px); } 40% { opacity: .9; } 100% { opacity: 0; transform: translateY(-30px); } }
.scene .wheel { transform-box: fill-box; transform-origin: center; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.scene .road { animation: road .6s linear infinite; }
@keyframes road { to { stroke-dashoffset: -90; } }
.scene .rider { animation: bob 0.5s ease-in-out infinite alternate; }
.scene .bob { animation: bob 2.2s ease-in-out infinite alternate; }
@keyframes bob { to { transform: translateY(-6px); } }
.scene .sway { transform-box: fill-box; transform-origin: bottom center; animation: sway 2.6s ease-in-out infinite alternate; }
@keyframes sway { from { transform: rotate(-2deg); } to { transform: rotate(2deg); } }
.scene .phone-pop { transform-box: fill-box; transform-origin: center; animation: pop 6s ease-out infinite; }
@keyframes pop { 0%, 20% { opacity: 0; transform: scale(.6) translateY(10px); } 30%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.scene .truck { animation: truck 6s ease-in-out infinite; }
@keyframes truck { 0% { transform: translateX(80px); } 30%, 100% { transform: none; } }
.scene .braid { animation: braid 1.6s ease-in-out infinite alternate; }
@keyframes braid { to { transform: translateX(2px); } }
.scene .spark path { animation: steam 1s ease-in-out infinite; }

.auth2-form { display: flex; justify-content: center; align-items: center; padding: 2.5rem 1.5rem; }
.auth2-inner { width: 100%; }
.auth2-mobile-brand { display: none; }
.auth2-card { background: var(--card); border: 1.5px solid var(--ink); border-radius: 20px; box-shadow: 6px 6px 0 var(--ink); padding: 1.75rem; }
.auth2-card h1 { margin: 0 0 .25rem; font-size: 2rem; }
.auth2-sub { margin: 0 0 1.4rem; color: var(--muted); }
.auth2-divider { display: flex; align-items: center; gap: .75rem; color: var(--muted); font-size: .85rem; margin: 1.2rem 0; }
.auth2-divider::before, .auth2-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth2-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1rem; margin-top: 1rem; font-size: .8rem; color: var(--muted); }
.auth2-trust span { display: inline-flex; align-items: center; gap: .3rem; }
.auth2-trust .icon { width: 15px; height: 15px; color: var(--green); }

@media (max-width: 900px) {
  .auth2 { grid-template-columns: 1fr; }
  .auth2-art { position: relative; height: 300px; border-right: 0; border-bottom: 1.5px solid var(--ink); }
  .auth2-pitch { bottom: 2.2rem; left: 1rem; right: 1rem; }
  .auth2-pitch h2 { font-size: 1.6rem; margin-bottom: .6rem; }
  .auth2-points { display: none; }
  .auth2-brand { top: calc(1rem + env(safe-area-inset-top)); left: 1rem; font-size: 1.25rem; }
  .auth2-brand img { width: 32px; height: 32px; }
  .scene figcaption { top: calc(1rem + env(safe-area-inset-top)); right: 1rem; font-size: .72rem; padding: .4rem .6rem; }
  .scene figcaption em { display: none; }
  .auth2-form { padding: 0 1rem 2rem; align-items: flex-start; }
  .auth2-card { margin-top: -1.5rem; position: relative; padding: 1.4rem 1.1rem; border-radius: 18px; }
  .auth2-card h1 { font-size: 1.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  .scene, .scene *, .scene-art, .auth2-dots span::after { animation: none !important; }
  .scene:not(:first-child) { display: none; }
}
@media (max-width: 900px) { .auth-theme { top: auto; bottom: calc(1rem + env(safe-area-inset-bottom)); } }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 3rem; }
.pw-toggle { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
/* Registration wizard */
.reg-progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; margin: 0 0 1.2rem; }
.reg-step-dot { display: grid; gap: .3rem; font-size: .75rem; color: var(--muted); }
.reg-step-dot::before { content: ""; height: 5px; border-radius: 999px; background: var(--line); }
.reg-step-dot b { display: none; }
.reg-step-dot em { font-style: normal; font-weight: 700; }
.reg-step-dot.is-done::before, .reg-step-dot.is-active::before { background: var(--green); }
.reg-step-dot.is-active { color: var(--ink); }
.reg-step { border: 0; padding: 0; margin: 0; }
.reg-step legend { font: 800 1.2rem var(--font-display); margin-bottom: .8rem; padding: 0; }
form.is-wizard .reg-step:not(.is-active) { display: none; }
form.is-wizard .reg-step.is-active { animation: reg-in .25s ease-out; }
@keyframes reg-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
form:not(.is-wizard) [data-step-next], form:not(.is-wizard) [data-step-back], form:not(.is-wizard) .reg-progress { display: none; }
.reg-types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
@media (max-width: 560px) { .reg-types { grid-template-columns: 1fr; } }
.reg-type { position: relative; display: grid; gap: .3rem; align-content: start; padding: .9rem; border: 1.5px solid var(--line); border-radius: 16px; cursor: pointer; background: var(--paper); transition: transform .12s, border-color .12s; }
.reg-type:hover { transform: translateY(-2px); border-color: var(--ink); }
.reg-type input, .reg-plan input { position: absolute; opacity: 0; }
.reg-type-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); border: 1.5px solid var(--ink); }
.reg-type:has(input:checked) { border-color: var(--ink); background: var(--green-soft); box-shadow: 4px 4px 0 var(--ink); }
.reg-type:has(input:checked) .reg-type-icon { background: var(--green); color: #fff; }
.reg-type:has(input:focus-visible), .reg-plan:has(input:focus-visible) { outline: 2px solid var(--green); outline-offset: 2px; }
.reg-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.reg-plan { position: relative; display: grid; gap: .2rem; padding: 1rem; border: 1.5px solid var(--line); border-radius: 16px; cursor: pointer; background: var(--paper); }
.reg-plan:has(input:checked) { border-color: var(--ink); background: var(--green-soft); box-shadow: 4px 4px 0 var(--ink); }
.reg-plan.is-locked { opacity: .45; cursor: not-allowed; }
.reg-plan.is-popular { border-color: #f0a500; }
.reg-ribbon { position: absolute; top: -10px; right: 10px; background: #f0a500; color: #1d1b16; border: 1.5px solid #1d1b16; border-radius: 999px; padding: .1rem .55rem; font-size: .7rem; font-weight: 800; }
.reg-price { font: 800 1.5rem var(--font-mono); }
.reg-price small { font: 600 .8rem var(--font-body, inherit); color: var(--muted); }
.reg-nav { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-top: .4rem; }
.reg-nav [hidden] { display: none; }
form:not(.is-wizard) .reg-nav { justify-content: flex-end; }
/* Scene on top, words below — nothing important hidden behind the text. */
.auth2-art { background: #0d3b2e; }
.auth2-art .scenes { inset: 0 0 auto 0; height: 60%; border-bottom: 1.5px solid #1d1b16; }
.auth2-shade { background: linear-gradient(180deg, rgba(13,30,24,.45) 0%, rgba(13,30,24,0) 22%); height: 60%; }
.auth2-pitch { bottom: auto; top: calc(60% + 1.6rem); }
@media (max-width: 900px) {
  .auth2-art { height: 360px; }
  .auth2-art .scenes, .auth2-shade { height: 220px; }
  .auth2-pitch { top: calc(220px + .9rem); bottom: auto; }
  .auth2-pitch h2 { font-size: 1.35rem; max-width: none; }
  .auth2-dots { display: none; }
}
@media (max-width: 900px) {
  .auth2-art { height: 300px; }
  .auth2-card { margin-top: -.9rem; }
}
@media (max-width: 560px) {
  .reg-type { grid-template-columns: 44px 1fr; column-gap: .75rem; align-items: center; padding: .75rem; }
  .reg-type-icon { grid-row: span 2; }
  .reg-type .small { grid-column: 2; }
  .reg-plans { grid-template-columns: 1fr 1fr; }
  .reg-plan { padding: .8rem; }
  .reg-price { font-size: 1.2rem; }
}

/* Scene overlays: words that build up and live cards that pop in, timed to each 6-second scene. */
.scene-photo-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 35%, rgba(0,0,0,0) 55%, rgba(0,0,0,.55) 100%); }
.scene-words { position: absolute; z-index: 2; left: 1.6rem; right: 40%; bottom: 1.4rem; display: flex; flex-wrap: wrap; gap: 0 .45rem; font: 800 clamp(1.6rem, 3.2vw, 2.6rem) / 1.05 var(--font-display); color: #fff; text-shadow: 0 3px 16px rgba(0,0,0,.55); }
.scene-words span { display: inline-block; opacity: 0; animation: word-in 36s infinite; animation-delay: calc(var(--i) * 6s + var(--d)); }
.scene-words span:nth-child(2n) { color: #f0a500; }
@keyframes word-in { 0% { opacity: 0; transform: translateY(18px) rotate(-3deg); filter: blur(4px); } 1.2% { opacity: 1; transform: none; filter: none; } 14% { opacity: 1; transform: none; } 15.5%, 100% { opacity: 0; transform: translateY(-8px); } }
.scene-card { position: absolute; z-index: 2; display: flex; align-items: center; gap: .6rem; padding: .55rem .8rem .55rem .55rem; border-radius: 14px; background: rgba(255,253,248,.96); color: #1d1b16; border: 1.5px solid #1d1b16; box-shadow: 4px 4px 0 #1d1b16; opacity: 0; animation: card-in 36s infinite; animation-delay: calc(var(--i) * 6s + var(--d)); max-width: 230px; }
.scene-card strong { display: block; font: 800 .95rem var(--font-display); }
.scene-card small { display: block; font-size: .78rem; color: #4a463c; }
.scene-card-icon { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: #0d5c46; color: #fff; }
.scene-card-icon .icon { width: 18px; height: 18px; }
.scene-card.pos-b .scene-card-icon { background: #f0a500; color: #1d1b16; }
.scene-card.pos-c .scene-card-icon { background: #c4472a; }
.scene-card.pos-a { top: 30%; left: 1.4rem; }
.scene-card.pos-b { top: 46%; right: 1.4rem; }
.scene-card.pos-c { top: 14%; left: 38%; }
@keyframes card-in { 0% { opacity: 0; transform: translateY(20px) scale(.85); } 1.3% { opacity: 1; transform: translateY(-4px) scale(1.03); } 2% { transform: none; } 8% { transform: translateY(-5px); } 14% { opacity: 1; transform: none; } 15.5%, 100% { opacity: 0; transform: scale(.95); } }
@media (max-width: 900px) {
  .scene-words { left: 1rem; right: 1rem; bottom: .8rem; font-size: 1.35rem; }
  .scene-card { padding: .35rem .55rem .35rem .35rem; border-radius: 11px; box-shadow: 3px 3px 0 #1d1b16; max-width: 170px; }
  .scene-card-icon { width: 26px; height: 26px; border-radius: 8px; }
  .scene-card strong { font-size: .78rem; }
  .scene-card small { font-size: .68rem; }
  .scene-card.pos-a { top: 32%; left: .8rem; }
  .scene-card.pos-b { top: 52%; right: .8rem; }
  .scene-card.pos-c { display: none; }
  .auth2-pitch h2 { display: none; }
}
@media (prefers-reduced-motion: reduce) { .scene-words span, .scene-card { animation: none !important; opacity: 1; } }
.scene .phone-pop { display: none; }
@media (max-width: 900px) {
  .auth2-art { height: 250px; }
  .auth2-art .scenes, .auth2-shade { height: 250px; }
  .auth2-pitch { display: none; }
}
.scene-card.pos-a { top: 24%; left: 1.4rem; }
.scene-card.pos-b { top: 42%; right: 1.4rem; }
.scene-card.pos-c { top: auto; left: auto; bottom: 1.6rem; right: 1.4rem; }
@media (max-width: 900px) {
  .scene-words { bottom: 1.7rem; }
  .scene-card.pos-a { top: 30%; }
  .scene-card.pos-b { top: 50%; }
}

/* Sign-in pitch: message on the left, happy traders on the right */
.auth2-pitch { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 1.2rem; align-items: center; }
.auth2-pitch h2 { font-size: clamp(1.8rem, 2.9vw, 2.7rem); }
.auth2-points li { align-items: flex-start; font-weight: 500; line-height: 1.35; }
.auth2-points li strong { color: #fff; font-weight: 800; }
.auth2-points li span { color: #d7efe5; }
.auth2-points .icon { flex: none; width: 26px; height: 26px; padding: 5px; margin-top: 1px; border-radius: 8px; background: #f0a500; color: #1d1b16; }
.people { position: relative; height: 230px; }
.people-tile { position: absolute; width: 104px; height: 104px; border-radius: 20px; overflow: hidden; border: 3px solid #fff; box-shadow: 0 10px 24px rgba(0,0,0,.35); background: #fff; animation: people-float 5s ease-in-out infinite; animation-delay: calc(var(--n) * -1s); }
.people-tile img, .people-tile svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.people-tile:nth-child(1) { left: 0; top: 10px; transform: rotate(-6deg); --r: -6deg; }
.people-tile:nth-child(2) { left: 96px; top: 0; width: 112px; height: 112px; --r: 5deg; }
.people-tile:nth-child(3) { left: 50px; top: 100px; width: 120px; height: 120px; z-index: 2; --r: -2deg; }
.people-tile:nth-child(4) { left: 150px; top: 110px; width: 86px; height: 86px; border-radius: 50%; --r: 8deg; }
.people-tile:nth-child(5) { left: -14px; top: 128px; width: 72px; height: 72px; border-radius: 50%; --r: -10deg; }
@keyframes people-float { 0%, 100% { transform: rotate(var(--r, 0deg)) translateY(0); } 50% { transform: rotate(var(--r, 0deg)) translateY(-8px); } }
.people-badge { position: absolute; z-index: 3; right: -6px; bottom: 6px; display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .6rem; border-radius: 999px; background: #fff; color: #1d1b16; border: 1.5px solid #1d1b16; font-weight: 800; font-size: .75rem; box-shadow: 3px 3px 0 #1d1b16; }
.people-badge .icon { width: 14px; height: 14px; color: #c4472a; fill: #c4472a; }
@media (max-width: 1150px) { .auth2-pitch { grid-template-columns: 1fr; } .people { display: none; } }
@media (prefers-reduced-motion: reduce) { .people-tile { animation: none; } }

/* Poster-style group: cut-out people with a thick sticker outline on a sunny panel */
.people-group { position: relative; height: 230px; }
.people-group-panel { position: absolute; left: 6px; right: 6px; top: 34px; bottom: 0; border-radius: 26px; border: 3px solid #fff; background: radial-gradient(circle at 70% 25%, #ffe08a 0 22%, transparent 23%), repeating-linear-gradient(135deg, #f0a500 0 14px, #f4b324 14px 28px); box-shadow: 0 12px 28px rgba(0,0,0,.35); overflow: hidden; }
.people-group-cut { position: absolute; left: 50%; bottom: 0; width: 112%; max-height: 120%; transform: translateX(-50%); object-fit: contain; object-position: bottom;
  filter: drop-shadow(4px 0 0 #fff) drop-shadow(-4px 0 0 #fff) drop-shadow(0 4px 0 #fff) drop-shadow(0 -4px 0 #fff) drop-shadow(5px 0 0 #0d5c46) drop-shadow(-5px 0 0 #0d5c46) drop-shadow(0 -5px 0 #0d5c46) drop-shadow(0 10px 14px rgba(0,0,0,.35));
  animation: group-in 1s cubic-bezier(.2,1.4,.4,1) both, group-breathe 6s ease-in-out 1s infinite; transform-origin: bottom center; }
.people-group-panel { clip-path: inset(0 round 26px); }
.people-group .people-badge { bottom: 10px; right: 0; }
.pg-person { transform-box: fill-box; transform-origin: bottom center; animation: group-nod 4s ease-in-out infinite; }
.pg-person:nth-child(2) { animation-delay: -1s; } .pg-person:nth-child(3) { animation-delay: -2s; } .pg-person:nth-child(4) { animation-delay: -3s; }
@keyframes group-in { from { opacity: 0; transform: translateX(-50%) translateY(30px) scale(.9); } to { opacity: 1; transform: translateX(-50%); } }
@keyframes group-breathe { 50% { transform: translateX(-50%) scale(1.025); } }
@keyframes group-nod { 50% { transform: rotate(1.5deg) translateY(-2px); } }
@media (max-width: 1150px) { .people-group { display: none; } }
@media (prefers-reduced-motion: reduce) { .people-group-cut, .pg-person { animation: none; } }
.people-group-cut { filter: drop-shadow(0 10px 14px rgba(0,0,0,.3)); }
.people-group-panel { display: none; }
.people-group .people-badge { top: 18px; bottom: auto; right: 0; }
.auth2-pitch { grid-template-columns: minmax(0, 1fr) 290px; align-items: end; }
.people-group { height: 320px; margin-top: -40px; }
.people-group-cut { width: 118%; max-height: none; height: 100%; }
/* Badge sits on the bottom-right corner of the group, in front of it. */
.people-group .people-badge { top: auto; bottom: 14px; right: 6px; z-index: 4; }
/* Headline on exactly two lines. */
.auth2-pitch h2 { max-width: none; font-size: clamp(1.5rem, 2.25vw, 2.3rem); }
.auth2-pitch h2 span { display: block; white-space: nowrap; }
.auth2-pitch-text { container-type: inline-size; }
.auth2-pitch h2 { font-size: min(2.6rem, 8cqi); }
/* The group stands on the kente strip: the pitch block runs to the strip, and the photo is pinned to its bottom. */
.auth2-pitch { bottom: 14px; align-items: stretch; }
.auth2-pitch-text { align-self: center; padding-bottom: 1.2rem; }
.people-group { height: auto; min-height: 260px; margin: -50px 0 0; align-self: stretch; }
.people-group-cut { bottom: 0; height: 100%; object-position: bottom center; filter: none; }
@media (min-width: 901px) and (max-height: 800px) {
  .auth2-art .scenes, .auth2-shade { height: 50%; }
  .auth2-pitch { top: calc(50% + 1rem); }
  .auth2-points { gap: .3rem; margin-bottom: .8rem; font-size: .9rem; }
  .auth2-pitch h2 { margin-bottom: .6rem; }
}

/* Top menu: when it doesn't fit, faded edges and arrows show there is more to the left or right. */
.dock-scroll { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; }
.dock-scroll .dock-nav { flex: 1; min-width: 0; scroll-behavior: smooth; }
.dock-arrow { position: absolute; top: 50%; z-index: 2; width: 34px; height: 34px; margin-top: -17px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--card); color: var(--ink); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-sm); opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; }
.dock-arrow .icon { width: 16px; height: 16px; }
.dock-arrow:hover { transform: scale(1.08); }
.dock-arrow-left { left: 0; }
.dock-arrow-right { right: 0; }
.dock-scroll::before, .dock-scroll::after { content: ""; position: absolute; top: 0; bottom: 0; width: 64px; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .15s; }
.dock-scroll::before { left: 0; background: linear-gradient(to right, var(--card) 35%, transparent); }
.dock-scroll::after { right: 0; background: linear-gradient(to left, var(--card) 35%, transparent); }
.dock-scroll.can-left::before, .dock-scroll.can-right::after { opacity: 1; }
.dock-scroll.can-left .dock-arrow-left, .dock-scroll.can-right .dock-arrow-right { opacity: 1; pointer-events: auto; }
.dock-scroll.can-right .dock-arrow-right { animation: dock-nudge 1.6s ease-in-out 3; }
@keyframes dock-nudge { 50% { transform: translateX(3px); } }
@media (max-width: 900px) { .dock-scroll { display: none; } }

/* ===== Bookings calendar ===== */
.cal-toolbar { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.cal-nav { display: flex; align-items: center; gap: .4rem; }
.cal-title { font: 800 1.15rem var(--font-display); margin-left: .4rem; }
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.25rem; align-items: start; }
@media (max-width: 1100px) { .cal-layout { grid-template-columns: 1fr; } .cal-side { order: -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; } }
.cal-side { display: grid; gap: 1rem; }
.cal-card { overflow: hidden; }
.cal-grid { overflow-x: auto; }
.cal-head, .cal-body { display: grid; grid-template-columns: 64px repeat(var(--cols), minmax(150px, 1fr)); min-width: calc(64px + var(--cols) * 150px); }
.cal-head { position: sticky; top: 0; z-index: 3; background: var(--card); border-bottom: 1.5px solid var(--ink); }
.cal-colhead { display: flex; align-items: center; gap: .55rem; padding: .7rem .75rem; border-left: 1px solid var(--line); }
.cal-colhead strong { display: block; font-size: .9rem; }
.cal-colhead small { display: block; font-size: .72rem; color: var(--muted); }
.cal-colhead.is-today { background: var(--green-soft); }
.cal-avatar { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 800 .75rem var(--font-display); background: #fde7b0; color: #1d1b16; border: 1.5px solid var(--ink); }
.cal-avatar-lg { width: 40px; height: 40px; font-size: .85rem; }
.cal-body { position: relative; }
.cal-times { border-right: 1px solid var(--line); }
.cal-time { height: var(--hour); padding: .2rem .5rem 0 0; text-align: right; font: 600 .72rem var(--font-mono); color: var(--muted); border-top: 1px solid var(--line); }
.cal-col { position: relative; border-left: 1px solid var(--line); }
.cal-slot { display: block; height: var(--hour); border-top: 1px solid var(--line); background-image: linear-gradient(to bottom, transparent calc(50% - .5px), color-mix(in srgb, var(--line) 55%, transparent) calc(50% - .5px), color-mix(in srgb, var(--line) 55%, transparent) calc(50% + .5px), transparent calc(50% + .5px)); text-decoration: none; }
.cal-slot span { display: none; padding: .3rem .5rem; font-size: .75rem; font-weight: 700; color: var(--green); }
.cal-slot:hover { background-color: var(--green-soft); }
.cal-slot:hover span { display: block; }
.cal-event { position: absolute; left: 4px; right: 6px; z-index: 2; overflow: hidden; display: flex; flex-direction: column; gap: .05rem; padding: .3rem .5rem .3rem .6rem; border-radius: 10px; border: 1.5px solid #1d1b16; border-left-width: 5px; background: #fff6dc; color: #1d1b16; text-decoration: none; font-size: .78rem; line-height: 1.25; box-shadow: 2px 2px 0 rgba(29,27,22,.85); transition: transform .12s; }
.cal-event:hover { transform: translateY(-1px); z-index: 4; }
.cal-event strong { font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-event-time { font: 700 .7rem var(--font-mono); opacity: .8; }
.cal-event-service { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .85; }
.cal-event-tag { position: absolute; top: .3rem; right: .35rem; font-size: .62rem; font-weight: 800; padding: .05rem .35rem; border-radius: 999px; background: #2e86de; color: #fff; }
.cal-event.is-booked { background: #fff6dc; border-left-color: #f0a500; }
.cal-event.is-confirmed { background: #dff5ea; border-left-color: #0d5c46; }
.cal-event.is-completed { background: #eceae3; border-left-color: #8c8c8c; opacity: .75; }
.cal-event.is-cancelled, .cal-event.is-no_show { background: #f8e1da; border-left-color: #c4472a; opacity: .6; text-decoration: line-through; }
.cal-now { position: absolute; left: 64px; right: 0; z-index: 3; height: 2px; background: #c4472a; pointer-events: none; }
.cal-now::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #c4472a; }
.cal-now span { position: absolute; left: -60px; top: -9px; font: 700 .68rem var(--font-mono); color: #fff; background: #c4472a; padding: .05rem .3rem; border-radius: 6px; }
.cal-agenda-day { padding: .55rem 1.1rem; background: var(--paper-2); font-weight: 800; font-size: .85rem; border-bottom: 1px solid var(--line); }
.booking-row:target { background: #fff6dc; box-shadow: inset 4px 0 0 #f0a500; }
.mini-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.mini-cal-dow { font-size: .7rem; font-weight: 800; color: var(--muted); padding: .2rem 0; }
.mini-cal-day { position: relative; display: grid; place-items: center; height: 34px; border-radius: 10px; text-decoration: none; color: inherit; font-weight: 600; font-size: .85rem; }
.mini-cal-day:hover { background: var(--paper-2); }
.mini-cal-day.is-out { color: var(--muted); opacity: .5; }
.mini-cal-day.is-today { color: var(--green); font-weight: 800; box-shadow: inset 0 0 0 1.5px var(--green); }
.mini-cal-day.is-picked { background: var(--ink); color: var(--paper); }
.mini-cal-day i { position: absolute; bottom: 4px; width: 5px; height: 5px; border-radius: 50%; background: #f0a500; }
.cal-stats { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.cal-confirm { display: flex; align-items: center; gap: .6rem; padding: .65rem 1rem; border-top: 1px dashed var(--line); }
.cal-share { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: inherit; background: var(--green-soft); }
.cal-share > .icon { width: 28px; height: 28px; color: var(--green); }
.cal-share strong { display: block; }
.cal-share .tiny { display: block; }
.cal-event.is-short { flex-direction: row; align-items: center; gap: .4rem; padding-top: .15rem; padding-bottom: .15rem; }
.cal-event.is-short .cal-event-service, .cal-event.is-short .cal-event-tag { display: none; }
.cal-now span { left: -62px; width: 52px; text-align: center; }
@media (max-width: 1100px) { .cal-side { order: 0; } }
@media (max-width: 700px) { .cal-toolbar .cal-title { width: 100%; margin: .2rem 0 0; } .cal-nav { flex-wrap: wrap; } }

/* ===== Online booking page (customers) ===== */
.bk-page { background: var(--paper-2); min-height: 100dvh; }
.bk-hero { position: relative; background: linear-gradient(135deg, #0d5c46, #0a3f31 70%); color: #fff; padding: calc(1.6rem + env(safe-area-inset-top)) 1rem 3.2rem; }
.bk-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px; background: var(--kente); }
.bk-hero-inner { max-width: 640px; margin: 0 auto; display: flex; align-items: center; gap: 1rem; }
.bk-logo { width: 64px; height: 64px; flex: none; border-radius: 18px; display: grid; place-items: center; background: #f0a500; color: #1d1b16; font: 800 1.4rem var(--font-display); border: 2px solid #fff; box-shadow: 0 8px 20px rgba(0,0,0,.25); }
.bk-hero h1 { margin: 0 0 .3rem; color: #fff; font-size: clamp(1.5rem, 5vw, 2rem); line-height: 1.1; }
.bk-meta { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .85rem; opacity: .9; }
.bk-meta span { display: inline-flex; align-items: center; gap: .35rem; }
.bk-meta .icon { width: 15px; height: 15px; }
.bk-main { max-width: 640px; margin: -2rem auto 0; padding: 0 1rem 7rem; position: relative; display: grid; gap: 1rem; }
.bk-steps { list-style: none; margin: 0; padding: .55rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: .3rem; background: var(--card); border: 1.5px solid var(--ink); border-radius: 16px; box-shadow: var(--shadow-sm); }
.bk-steps li { display: flex; align-items: center; justify-content: center; gap: .4rem; font-size: .8rem; font-weight: 700; color: var(--muted); padding: .35rem; border-radius: 10px; text-align: center; }
.bk-steps li span { width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; background: var(--paper-2); border: 1.5px solid var(--line); }
.bk-steps li.current { background: var(--green-soft); color: var(--ink); }
.bk-steps li.current span { background: var(--green); color: #fff; border-color: var(--green); }
.bk-steps li.done span { background: #14c285; color: #08251b; border-color: #14c285; }
.bk-intro { margin: 0; padding: .75rem 1rem; border-radius: 14px; background: #fff6dc; border-left: 4px solid #f0a500; font-size: .92rem; }
.bk-card { background: var(--card); border: 1.5px solid var(--ink); border-radius: 20px; padding: 1.1rem; box-shadow: 4px 4px 0 var(--ink); }
.bk-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .8rem; }
.bk-card-head h2 { margin: 0; font-size: 1.15rem; }
.bk-change { font-weight: 700; font-size: .85rem; color: var(--green); }
.bk-services { display: grid; gap: .55rem; }
.bk-service { display: flex; align-items: center; gap: .8rem; padding: .8rem; border: 1.5px solid var(--line); border-radius: 16px; text-decoration: none; color: inherit; background: var(--paper); transition: border-color .12s, transform .12s; }
a.bk-service:hover { border-color: var(--ink); transform: translateY(-1px); }
.bk-service.is-on { border-color: var(--green); background: var(--green-soft); }
.bk-service strong { display: block; }
.bk-service small { display: inline-flex; align-items: center; gap: .25rem; color: var(--muted); font-size: .8rem; }
.bk-service small .icon { width: 13px; height: 13px; }
.bk-service-icon { width: 44px; height: 44px; flex: none; border-radius: 14px; display: grid; place-items: center; font: 800 1.1rem var(--font-display); background: #fde7b0; color: #1d1b16; }
.bk-service-icon .icon { width: 22px; height: 22px; }
.bk-price { font: 700 .95rem var(--font-mono); white-space: nowrap; }
.bk-go { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--paper); }
.bk-go .icon { width: 15px; height: 15px; }
.bk-label { margin: .9rem 0 .45rem; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.bk-label:first-of-type { margin-top: 0; }
.bk-staff { display: flex; gap: .6rem; overflow-x: auto; padding-bottom: .2rem; }
.bk-person { display: grid; justify-items: center; gap: .3rem; min-width: 70px; text-decoration: none; color: inherit; font-size: .8rem; font-weight: 700; }
.bk-avatar { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font: 800 1rem var(--font-display); background: var(--paper-2); border: 2px solid var(--line); }
.bk-person.is-on .bk-avatar { border-color: var(--green); background: var(--green); color: #fff; box-shadow: 0 0 0 3px var(--green-soft); }
.bk-days { display: flex; gap: .45rem; overflow-x: auto; padding: .1rem .1rem .4rem; scroll-snap-type: x mandatory; }
.bk-day { flex: none; scroll-snap-align: start; display: grid; justify-items: center; gap: .05rem; width: 62px; padding: .55rem 0; border: 1.5px solid var(--line); border-radius: 16px; text-decoration: none; color: inherit; background: var(--paper); }
.bk-day small { font-size: .7rem; color: var(--muted); font-weight: 700; }
.bk-day strong { font: 800 1.3rem var(--font-display); }
.bk-day.is-on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.bk-day.is-on small { color: #f0a500; }
.bk-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .45rem; }
.bk-time { display: grid; place-items: center; min-height: 46px; border: 1.5px solid var(--line); border-radius: 12px; text-decoration: none; color: inherit; font-weight: 700; background: var(--paper); }
.bk-time:hover { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.bk-empty { display: flex; align-items: center; gap: .6rem; padding: 1rem; border-radius: 14px; background: var(--paper-2); color: var(--muted); font-size: .9rem; }
.bk-summary { display: grid; gap: .2rem; padding: .85rem 1rem; border-radius: 14px; background: var(--paper-2); border: 1.5px dashed var(--line); }
.bk-summary > div:first-child { display: flex; justify-content: space-between; gap: .5rem; font-weight: 700; }
.bk-cta { width: 100%; display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 56px; border-radius: 16px; border: 2px solid #1d1b16; background: var(--green); color: #fff; font: 800 1.05rem var(--font-display); box-shadow: 0 5px 0 #1d1b16; cursor: pointer; }
.bk-cta:active { transform: translateY(3px); box-shadow: 0 2px 0 #1d1b16; }
.bk-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; align-items: center; gap: .75rem; max-width: 640px; margin: 0 auto; padding: .8rem 1rem calc(.8rem + env(safe-area-inset-bottom)); background: #1d1b16; color: #fff; border-radius: 18px 18px 0 0; }
.bk-bar strong { display: block; }
.bk-bar small { color: #cfc7b4; }
.bk-bar-hint { font-weight: 700; color: #f0a500; white-space: nowrap; }
.bk-done { text-align: center; display: grid; gap: .6rem; justify-items: center; }
.bk-done h2 { margin: 0; font-size: 1.6rem; }
.bk-done p { margin: 0; }
.bk-check { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: #14c285; color: #08251b; border: 3px solid #1d1b16; animation: bk-pop .5s cubic-bezier(.2, 1.6, .4, 1) both; }
.bk-check .icon { width: 38px; height: 38px; stroke-width: 3; }
@keyframes bk-pop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
.bk-ticket { width: 100%; display: grid; gap: .1rem; text-align: left; padding: .4rem 1rem; border-radius: 16px; background: var(--paper-2); border: 1.5px dashed var(--line); }
.bk-ticket > div { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px dotted var(--line); }
.bk-ticket > div:last-child { border-bottom: 0; }
.bk-ticket span { color: var(--muted); font-size: .85rem; }
.bk-ticket strong { text-align: right; }
.bk-done-actions { width: 100%; display: grid; gap: .5rem; }
.bk-time.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.bk-main { grid-template-columns: minmax(0, 1fr); }
.bk-main > * { min-width: 0; }

/* Legal pages */
.legal-nav { display: flex; gap: .4rem; margin-bottom: 1rem; }
.legal-nav a { padding: .45rem .9rem; border-radius: 999px; border: 1.5px solid var(--line); text-decoration: none; color: inherit; font-weight: 700; font-size: .9rem; }
.legal-nav a.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.legal-doc { line-height: 1.6; }
.legal-doc h1 { margin: 0 0 .25rem; }
.legal-doc h2 { font-size: 1.15rem; margin: 1.6rem 0 .5rem; scroll-margin-top: 1rem; }
.legal-doc ul, .legal-doc ol { padding-left: 1.2rem; }
.legal-doc li { margin: .3rem 0; }
.legal-table { font-size: .9rem; margin: .5rem 0 1rem; }
.legal-table td, .legal-table th { vertical-align: top; }
/* Keyboard users: jump straight past the menu */
.skip-link { position: absolute; left: .75rem; top: -60px; z-index: 1000; padding: .6rem 1rem; border-radius: 10px; background: var(--ink); color: var(--paper); font-weight: 800; text-decoration: none; transition: top .15s; }
.skip-link:focus { top: .75rem; }
.link-btn { background: none; border: 0; padding: 0; color: var(--green); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.legal-dialog { width: min(760px, 94vw); max-height: 86vh; padding: 0; border: 1.5px solid var(--ink); border-radius: 18px; background: var(--card); color: var(--ink); box-shadow: 6px 6px 0 var(--ink); }
.legal-dialog::backdrop { background: rgba(15,14,10,.55); }
.legal-dialog-head { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .9rem 1.2rem; background: var(--card); border-bottom: 1px solid var(--line); }
.legal-dialog-head h2 { margin: 0; font-size: 1.2rem; }
.legal-dialog-body { padding: 0 1.2rem 1.2rem; }
.cancel-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.cancel-option { position: relative; display: grid; gap: .4rem; align-content: start; padding: 1.1rem 1.1rem 1.1rem 3rem; border: 1.5px solid var(--line); border-radius: 18px; background: var(--card); cursor: pointer; }
.cancel-option input { position: absolute; left: 1.1rem; top: 1.25rem; width: 18px; height: 18px; accent-color: var(--green); }
.cancel-option .chip { justify-self: start; }
.cancel-option ul { margin: 0; padding-left: 1.1rem; font-size: .9rem; color: var(--ink-2); }
.cancel-option:has(input:checked) { border-color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }

/* Keyboard users always see where they are. */
:focus-visible { outline: 3px solid #f0a500; outline-offset: 2px; }
.btn:focus-visible, .dock-link:focus-visible, .tabbar a:focus-visible, .book-chip:focus-visible, .bk-time:focus-visible, .bk-day:focus-visible, .cal-slot:focus-visible, .cal-event:focus-visible { outline: 3px solid #f0a500; outline-offset: 2px; box-shadow: none; }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: none; }
main:focus, [tabindex="-1"]:focus { outline: none; }
.cal-slot:focus-visible span { display: block; }
.bell-count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--clay); color: #fff; font: 700 .65rem/18px var(--font-body); text-align: center; padding: 0 4px; }

/* Phones and tablets: nothing wider than the screen (found by the page-width check). */
.bars, .bars-axis { min-width: 0; }
.bars .bar, .bars-axis span { min-width: 0; }
.bars-axis span { flex: 1; overflow: visible; white-space: nowrap; }
.cal-main, .cal-side { min-width: 0; }
@media (max-width: 1100px) { .cal-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 820px) {
  .table td { min-width: 0; overflow-wrap: anywhere; }
  .table td .muted, .table td small { white-space: normal; }
  .card, .page > * { min-width: 0; max-width: 100%; }
}
