/* The customer's account app (WP96, Leo 2026-10-28) - Super Buy's own look.
 *
 * Its own stylesheet: pos.css is a touch-till design for a thumb across a counter; a customer is on a phone,
 * holding it. Phone first: a bottom tab bar, big cards, 44 px touch targets; a desk gets the tabs across the top.
 * The pineapple's orange and leaf green, a warm paper canvas, system fonts, and a dark mode from the same tokens.
 * CSP: style-src 'self' - nothing inline anywhere. */

:root {
  --ink: #111827;
  --ink-2: #374151;
  --muted: #6b7280;
  --line: #e5e7eb;
  --paper: #ffffff;
  --canvas: #f3f4f6;
  --raised: #f9fafb;
  --brand: #e8891a;          /* pineapple orange (accents, hero) */
  --brand-ink: #a85a00;      /* orange that reads as text on white (4.9:1) */
  --brand-soft: #f3f4f6;
  --green: #2e7d32;          /* leaf green: the action colour (5.1:1 with white) */
  --green-700: #23632a;
  --green-soft: #e7f4e4;
  --good: #2e7d32;
  --good-soft: #e7f4e4;
  --bad: #c62828;
  --bad-soft: #fdecea;
  --warn: #9a6200;
  --warn-soft: #fff4dc;
  --info: #1f63b3;
  --info-soft: #e7f0fb;
  --brand-700: #1f63b3;
  --hold: #b7791f;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, .05);
  --shadow: 0 1px 2px rgba(17, 24, 39, .05), 0 4px 14px rgba(17, 24, 39, .06);
  --shadow-lg: 0 18px 50px rgba(29, 31, 26, .22);
  --tabbar-h: 66px;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, "Helvetica Neue", Arial, sans-serif; /* the KairyxOS stack */
  --mono: var(--sans); /* money reads in the same font; .num keeps the digits lined up */
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f3f4f6; --ink-2: #d1d5db; --muted: #9ca3af; --line: #2d2f34; --paper: #1b1c1f; --canvas: #111214; --raised: #232428;
    --brand: #f2a03d; --brand-ink: #f5b25e; --brand-soft: #232428;
    --green: #4caf50; --green-700: #66bb6a; --green-soft: #1d3320;
    --good: #6cc070; --good-soft: #1d3320; --bad: #ff7b72; --bad-soft: #3d1d1b; --warn: #f0b54a; --warn-soft: #3a2d12;
    --info: #79aef0; --info-soft: #172a42; --brand-700: #79aef0; --hold: #f0b54a;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
  .go:not(.secondary) { color: #0d150d; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
body.locked { overflow: hidden; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
/* Line icons only - the member card's barcode SVG keeps its own fills. */
.tab svg, .iconbtn svg, .go svg, .filebtn svg, .search svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

.app { max-width: 1120px; margin: 0 auto; padding: 12px 16px calc(var(--tabbar-h) + 32px + env(safe-area-inset-bottom)); }
.app[data-view="signin"], .app[data-view="activate"], .app[data-view="closed"], .app[data-view="loading"] { max-width: 480px; padding-bottom: 48px; }

/* header */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 4px 0 12px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo { display: block; height: 44px; width: auto; flex: none; }
.name { font-size: 19px; font-weight: 750; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iconbtn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; min-width: 44px; justify-content: center; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink-2); cursor: pointer; font-weight: 600; font-size: 14px; }
.iconbtn:hover { color: var(--ink); }
#signOut span { display: none; }
@media (min-width: 760px) { #signOut span { display: inline; } }

/* The door (sign in, activate, not open yet): the logo over the door, big and centred. The logo's "supermarket"
 * line is dark ink, so on a dark canvas it sits on a white plate. */
.app[data-view="signin"] .topbar, .app[data-view="activate"] .topbar, .app[data-view="closed"] .topbar, .app[data-view="loading"] .topbar { justify-content: center; padding: 28px 0 6px; }
.app[data-view="signin"] .logo, .app[data-view="activate"] .logo, .app[data-view="closed"] .logo, .app[data-view="loading"] .logo { height: 128px; }
.app[data-view="signin"] .name, .app[data-view="activate"] .name, .app[data-view="closed"] .name, .app[data-view="loading"] .name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (prefers-color-scheme: dark) {
  .logo { background: #fff; border-radius: 10px; padding: 3px 5px; }
  .app[data-view="signin"] .logo, .app[data-view="activate"] .logo, .app[data-view="closed"] .logo, .app[data-view="loading"] .logo { border-radius: 20px; padding: 12px 16px; }
}

/* cards + text */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.card h1 { font-size: 24px; margin: 0 0 6px; letter-spacing: -.02em; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.auth { margin-top: 18px; padding: 24px 20px; box-shadow: var(--shadow); }
.greeting { font-size: 28px; line-height: 1.15; margin: 6px 0 2px; letter-spacing: -.02em; }
.sub { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.page-title { font-size: 26px; margin: 6px 0 12px; letter-spacing: -.02em; }
.label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.muted { color: var(--muted); margin: 10px 0 0; }
.muted.small, .small { font-size: 13px; }
.muted.small { text-align: center; }
.muted.small.left { text-align: left; margin-top: 12px; }
.hint { font-weight: 400; color: var(--muted); font-size: 13px; text-transform: none; letter-spacing: 0; }
.center { text-align: center; }
.center-block { display: block; margin: 14px auto 0; }
.bad-text { color: var(--bad); }
.h2 { font-size: 21px; margin: 4px 0 12px; letter-spacing: -.01em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.loading { grid-column: 1 / -1; padding: 36px 0; text-align: center; color: var(--muted); }
.empty { color: var(--muted); padding: 10px 0; margin: 0; }

/* forms */
form label { display: block; font-weight: 600; margin: 14px 0 0; }
form input:not([type=radio]):not([type=checkbox]):not([type=file]), form textarea {
  display: block; width: 100%; margin-top: 6px; padding: 12px; min-height: 48px; font: 17px var(--sans); border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--raised); color: var(--ink); }
form textarea { resize: vertical; min-height: 72px; }
form input:focus, form textarea:focus { outline: 2px solid var(--green); outline-offset: 1px; border-color: var(--green); }
.go { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 50px; margin-top: 16px; padding: 12px 18px;
  font: 650 17px var(--sans); color: #fff; background: var(--green); border: 0; border-radius: var(--radius-sm); cursor: pointer; box-shadow: var(--shadow-sm); }
.go:hover { background: var(--green-700); }
.go.secondary { background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
.go.secondary:hover { background: var(--raised); }
.go:disabled { opacity: .5; cursor: default; }
.go.danger, .danger { color: var(--bad); }
.go.secondary.danger { border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.link { background: none; border: 0; padding: 0; color: var(--green); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; min-height: 32px; }
.link.danger { color: var(--bad); }
.error { color: var(--bad); margin: 10px 0 0; font-weight: 600; }
.ok { color: var(--good); margin: 10px 0 0; font-weight: 600; }
.status { min-height: 1.4em; margin: 8px 0 0; color: var(--ink-2); font-size: 14px; }

/* pills */
.pill { display: inline-flex; align-items: center; align-self: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font: 700 12px var(--sans); white-space: nowrap;
  background: var(--info-soft); color: var(--info); }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.done { background: color-mix(in srgb, var(--muted) 16%, transparent); color: var(--ink-2); }

/* the tab bar: a phone's bottom bar; across the top on a desk */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: space-around; gap: 2px;
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--paper) 94%, transparent);
  border-top: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.tab { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px;
  padding: 4px 2px; border: 0; border-radius: 12px; background: none; color: var(--muted); font: 600 11.5px var(--sans); cursor: pointer; }
.tab svg { width: 24px; height: 24px; }
.tab[aria-current="page"] { color: var(--green); background: var(--green-soft); }
@media (min-width: 760px) {
  .app { padding-bottom: 48px; }
  .tabs { position: sticky; top: 0; left: auto; right: auto; bottom: auto; margin: 0 0 18px; padding: 6px; border: 1px solid var(--line);
    border-radius: 16px; justify-content: flex-start; box-shadow: var(--shadow-sm); }
  .tab { flex: 0 0 auto; flex-direction: row; gap: 8px; min-height: 44px; padding: 0 16px; font-size: 15px; color: var(--ink-2); }
  .tab svg { width: 20px; height: 20px; }
  .tab[aria-current="page"] { background: var(--green); color: #fff; }
}
@media (min-width: 760px) and (prefers-color-scheme: dark) { .tab[aria-current="page"] { color: #0d150d; } }

/* home */
.hero { position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px;
  padding: 20px 18px; margin: 10px 0 14px; border-radius: 20px; color: #2b1a00;
  background: linear-gradient(135deg, #ffd27a 0%, #f6a53b 55%, #e8891a 100%); box-shadow: var(--shadow); }
.hero::after { content: ""; position: absolute; right: -40px; top: -50px; width: 190px; height: 190px; border-radius: 50%; background: rgba(255, 255, 255, .18); pointer-events: none; }
.hero[data-tone="good"] { background: linear-gradient(135deg, #d9f0c9 0%, #9ccf6f 60%, #6cae3e 100%); color: #13300f; }
.hero-label { display: block; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.hero-amount { display: block; font-size: 40px; font-weight: 750; line-height: 1.1; letter-spacing: -.03em; }
.hero-note { display: block; font-size: 14px; font-weight: 600; margin-top: 4px; opacity: .9; }
.hero-pay { width: auto; margin: 0; min-width: 140px; background: #1d1f1a; color: #fff; position: relative; z-index: 1; }
.hero-pay:hover { background: #000; }
@media (prefers-color-scheme: dark) { .go.hero-pay { background: #1d1f1a; color: #fff; } }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; } }
.stat { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 96px; padding: 14px; text-align: left; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
button.stat { cursor: pointer; }
button.stat:hover { border-color: color-mix(in srgb, var(--green) 40%, var(--line)); }
.stat-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.stat-value { font-size: 22px; font-weight: 750; margin-top: 4px; }
.stat-sub { font-size: 13px; color: var(--muted); }
.stat[data-tone="bad"] { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, var(--line)); }
.stat[data-tone="bad"] .stat-value, .stat[data-tone="bad"] .stat-label { color: var(--bad); }
.banner { display: block; width: 100%; min-height: 48px; margin: 0 0 14px; padding: 12px 16px; border-radius: var(--radius-sm); text-align: left; font-weight: 650; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--info) 30%, var(--line)); background: var(--info-soft); color: var(--info); }

/* rows (activity, history, payments) */
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.row:first-child, .label + .row { border-top: 0; }
.row-main { display: flex; flex-direction: column; min-width: 0; }
.row-main .sub, .inv-main .sub, .inv-amt .sub { margin: 0; font-size: 13px; }
.plus { color: var(--good); font-weight: 700; }

/* invoices */
.segmented { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 4px; margin-bottom: 14px; background: var(--paper);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); }
.segmented button { min-height: 44px; border: 0; border-radius: 10px; background: none; font-weight: 650; font-size: 14px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.segmented button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.count { font: 600 12px var(--mono); opacity: .7; }
.card.list { padding: 4px 0; overflow: hidden; }
.inv { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main amt" "pill amt"; align-items: center; gap: 4px 12px; width: 100%;
  min-height: 72px; padding: 12px 16px; border: 0; border-top: 1px solid var(--line); background: var(--paper); text-align: left; cursor: pointer; }
.inv:first-child { border-top: 0; }
.inv:hover { background: var(--raised); }
.inv-main { grid-area: main; display: flex; flex-direction: column; min-width: 0; }
.inv-num { font-weight: 750; font-size: 16px; }
.inv-amt { grid-area: amt; display: flex; flex-direction: column; align-items: flex-end; }
.inv .pill { grid-area: pill; justify-self: start; }
.inv-bal { font-weight: 750; font-size: 17px; }
@media (min-width: 760px) {
  .inv { grid-template-columns: minmax(0, 1fr) 160px 150px; grid-template-areas: "main pill amt"; }
  .inv .pill { justify-self: center; }
}

/* invoice document (sheet + print) */
.invdoc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.invdoc-head .sub { display: block; margin: 0; }
.big-num { display: block; font-size: 24px; }
.defs { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; margin: 0 0 14px; }
.defs dt { color: var(--muted); }
.defs dd { margin: 0; text-align: right; font-weight: 600; }
.defs.totals { padding-top: 10px; border-top: 1px solid var(--line); }
.lines { width: 100%; border-collapse: collapse; margin: 6px 0 12px; font-size: 14px; }
.lines th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 6px 0; border-bottom: 1px solid var(--line); }
.lines td { padding: 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.lines th.num, .lines td.num { text-align: right; padding-left: 10px; white-space: nowrap; }
.block { margin-top: 14px; }
.signature { display: block; max-width: 260px; width: 100%; height: auto; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }

/* pay */
.pay-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.chipbtn { min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font-weight: 650; font-size: 14px; cursor: pointer; }
.chipbtn:hover { border-color: var(--green); color: var(--green); }
.chipbtn:disabled { opacity: .5; cursor: default; }
.upto { display: flex; align-items: center; gap: 6px; padding: 0 4px 0 12px; min-height: 40px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); }
.upto label { margin: 0; font-size: 14px; font-weight: 650; white-space: nowrap; }
.upto input { width: 92px; min-height: 32px !important; margin: 0 !important; padding: 4px 8px !important; font: 600 15px var(--mono) !important; border-radius: 8px !important; }
.upto .chipbtn { min-height: 32px; }
.payrow { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; grid-template-areas: "box main amt" "box pill amt"; align-items: center; gap: 2px 12px;
  margin: 0; padding: 14px 16px; min-height: 68px; border-top: 1px solid var(--line); cursor: pointer; font-weight: 400; }
.payrow:first-child { border-top: 0; }
.payrow input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.payrow .box { grid-area: box; width: 26px; height: 26px; border: 2px solid var(--line); border-radius: 8px; background: var(--paper); display: flex; align-items: center; justify-content: center; }
.payrow input:checked + .box { background: var(--green); border-color: var(--green); }
.payrow input:checked + .box::after { content: ""; width: 7px; height: 13px; margin-top: -3px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg); }
.payrow input:focus-visible + .box { outline: 3px solid var(--brand); outline-offset: 2px; }
.payrow .inv-main { grid-area: main; }
.payrow .inv-bal { grid-area: amt; }
.payrow .pill { grid-area: pill; justify-self: start; }
.payrow.on { background: var(--green-soft); }
.payrow.off { cursor: default; opacity: .62; }
.subrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.label + .subrow, #paySubsList .subrow:first-child { border-top: 0; }
.subrow-act { display: flex; align-items: center; gap: 10px; }
.paybar { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + 10px + env(safe-area-inset-bottom)); z-index: 35; max-width: 720px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 18px; border-radius: 18px; background: var(--ink); color: var(--paper); box-shadow: var(--shadow-lg); }
.paybar-text { flex: 1; display: flex; flex-direction: column; line-height: 1.25; font-size: 13px; opacity: .95; }
.paybar-text strong { font-size: 21px; }
.paybar .go { width: auto; margin: 0; min-width: 170px; }
.app[data-tab="pay"] { padding-bottom: calc(var(--tabbar-h) + 120px + env(safe-area-inset-bottom)); }
@media (min-width: 760px) { .paybar { bottom: 18px; } .app[data-tab="pay"] { padding-bottom: 120px; } }
.lockcard { background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 25%, var(--line)); }
.lock-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lock-amount { font-size: 24px; font-weight: 750; }
.lock-note { margin: 8px 0 0; font-size: 13px; color: var(--ink-2); }
.proof-actions { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .proof-actions { grid-template-columns: 1fr 1fr; } }
.filebtn { position: relative; display: flex !important; align-items: center; justify-content: center; gap: 10px; min-height: 56px; margin: 0 !important; padding: 12px 16px;
  border: 2px dashed color-mix(in srgb, var(--green) 45%, var(--line)); border-radius: var(--radius-sm); background: var(--green-soft); color: var(--green); font-weight: 700; cursor: pointer; text-align: center; }
.filebtn.alt { border-style: solid; border-color: var(--line); background: var(--paper); color: var(--ink); }
.filebtn input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
@media (max-width: 759px), (pointer: coarse) { #proofPhone { display: none !important; } }
.files { list-style: none; margin: 10px 0 0; padding: 0; }
.files li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.files li:first-child { border-top: 0; }
.file-ico { flex: none; width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font: 700 11px var(--sans); background: var(--raised); border: 1px solid var(--line); color: var(--ink-2); }
.files .row-main { flex: 1; }
.ok-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--good); flex: none; }
.qr { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.qr img { width: 232px; height: 232px; padding: 10px; background: #fff; border-radius: 14px; border: 1px solid var(--line); }
.steps-list { margin: 0; padding-left: 20px; color: var(--ink-2); font-size: 15px; }
.steps-list li { margin: 4px 0; }

/* account */
.acct-grid { display: grid; gap: 0 18px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .acct-grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.profile-name { font-size: 20px; font-weight: 750; margin: 0 0 12px; }
.points-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.points-row .right { text-align: right; }
.big { display: block; font-size: 44px; font-weight: 750; line-height: 1.1; }
#tier { font-size: 14px; padding: 4px 12px; background: var(--brand-soft); color: var(--brand-ink); }

/* member card: the printed card's proportions, so what a customer shows on a phone is the card the shop printed */
.mc { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 12px; background: linear-gradient(180deg, #ffffff, #fff8ee); color: #1d1f1a; display: flex; flex-direction: column; gap: 6px; }
.mc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.mc-store { font-weight: 750; color: var(--brand-ink); }
.mc-kind { font-size: 11px; letter-spacing: .14em; color: #6b7065; }
.mc-name { font-size: 20px; font-weight: 750; }
.mc-code { font-size: 15px; letter-spacing: .06em; }
.mc-barcode svg { display: block; width: 100%; max-width: 320px; height: 64px; }
.mc-foot { font-size: 12px; color: #6b7065; }

/* the sheet (invoice detail, QR, statement): up from the bottom on a phone, a dialog on a desk */
.sheet-back { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; background: rgba(15, 17, 12, .5); }
.sheet { width: 100%; max-height: 92vh; display: flex; flex-direction: column; background: var(--paper); border-radius: 22px 22px 0 0; box-shadow: var(--shadow-lg);
  padding-bottom: env(safe-area-inset-bottom); animation: up .22s ease-out; }
@keyframes up { from { transform: translateY(24px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.sheet-head .h2 { margin: 0; font-size: 19px; }
.sheet-body { flex: 1; overflow-y: auto; padding: 16px; -webkit-overflow-scrolling: touch; }
.sheet-foot { display: flex; gap: 10px; padding: 12px 16px 16px; border-top: 1px solid var(--line); }
.sheet-foot:empty { display: none; }
.sheet-foot .go { margin: 0; }
@media (min-width: 760px) {
  .sheet-back { align-items: center; padding: 24px; }
  .sheet { max-width: 640px; border-radius: 22px; max-height: 88vh; }
}

/* toast */
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(var(--tabbar-h) + 20px + env(safe-area-inset-bottom)); margin: 0 auto; max-width: 528px; padding: 12px 14px;
  border-radius: 12px; background: var(--ink); color: var(--paper); text-align: center; z-index: 70; box-shadow: var(--shadow-lg); }

/* print: only what was put in #printRoot (an invoice, the statement) */
.print-root { display: none; }
.print-head { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 10px; margin-bottom: 14px; border-bottom: 2px solid #1d1f1a; }
@media print {
  body.printing .app { display: none !important; }
  body.printing .print-root { display: block; color: #000; background: #fff; }
  body.printing { background: #fff; }
}

/* ---------------------------------------------------------------------------------------------
 * WP89 ONLINE ORDERING (shop.js). Mobile first: a phone held in one hand, big photos, thumb-sized
 * steppers, a sticky search and a sticky "View your order" bar. No prices anywhere.
 * ------------------------------------------------------------------------------------------- */
.shop-head { margin: 4px 0 10px; font-weight: 700; color: var(--ink-2); }

/* search + sort */
.shop-bar { display: flex; gap: 8px; position: sticky; top: 0; z-index: 15; background: var(--canvas); padding: 4px 0 8px; }
@media (min-width: 760px) { .shop-bar { top: 64px; } }
.search { flex: 1; position: relative; display: block; margin: 0 !important; }
.search svg { position: absolute; left: 12px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); stroke: var(--muted); stroke-width: 2; }
.search input { width: 100%; min-height: 48px; padding: 13px 12px 13px 40px; font: 16px var(--sans); border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); box-shadow: var(--shadow-sm); }
.search input:focus, .sort:focus { outline: 2px solid var(--green); outline-offset: 1px; border-color: var(--green); }
.sort { max-width: 44%; padding: 0 10px; font: 600 14px var(--sans); border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); }

/* department chips: one scrolling row on a phone, wrapping on a desk */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font: 600 14px var(--sans); color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.chip[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip-n { font: 12px var(--mono); color: var(--muted); }
.chip[aria-selected="true"] .chip-n { color: inherit; opacity: .7; }
@media (min-width: 900px) { .chips { flex-wrap: wrap; overflow: visible; } }

/* product grid */
.grid { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; } }
.pcard { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow .18s, transform .18s; }
@media (hover: hover) { .pcard:hover { box-shadow: var(--shadow); transform: translateY(-2px); } }
.pphoto { position: relative; aspect-ratio: 1 / 1; background: #fff; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--line); }
.pphoto img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.ph { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-ink); font: 700 22px var(--sans); }
.incart { position: absolute; top: 8px; left: 8px; padding: 3px 8px; border-radius: 999px; background: var(--good); color: #fff; font: 700 12px var(--sans); }
.pbody { display: flex; flex-direction: column; gap: 4px; padding: 10px 10px 12px; flex: 1; }
.pname { margin: 0; font-size: 15px; line-height: 1.3; font-weight: 650; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.psize { margin: 0; font-size: 13px; color: var(--muted); min-height: 1em; }
.ptimes { margin: 0; font-size: 12px; color: var(--green); font-weight: 600; }
.pact { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 6px; }
.pact .pill, .cinfo .pill { align-self: flex-start; }

/* unit / case switch + stepper */
.mode, .seg { display: flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--paper); }
.mode label, .seg label { flex: 1; margin: 0; font-weight: 600; position: relative; }
.mode input, .seg input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; margin: 0; }
.mode span, .seg span { display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 4px; text-align: center; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.seg span { min-height: 48px; padding: 11px 6px; font-size: 15px; }
.mode input:checked + span, .seg input:checked + span { background: var(--ink); color: var(--paper); }
.mode input:focus-visible + span, .seg input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: -3px; }
.stepper { display: grid; grid-template-columns: 44px 1fr 44px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.stepper button { border: 0; background: var(--raised); font: 600 22px var(--sans); color: var(--ink); cursor: pointer; min-height: 44px; }
.stepper button:active { background: var(--line); }
.stepper input { width: 100%; min-width: 0; border: 0; text-align: center; font: 600 17px var(--mono); background: var(--paper); color: var(--ink); -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.stepper.small { grid-template-columns: 40px 44px 40px; }
.stepper.small span { display: flex; align-items: center; justify-content: center; font-weight: 700; }
.stepper.small button { min-height: 40px; font-size: 19px; }
.add { min-height: 44px; border: 0; border-radius: 10px; background: var(--green); color: #fff; font: 700 16px var(--sans); cursor: pointer; }
.add:active { background: var(--green-700); }
.shop-empty { text-align: center; padding: 32px 0; color: var(--muted); }
.go.small { display: inline-flex; width: auto; min-height: 44px; padding: 10px 18px; font-size: 15px; }
.go.more { max-width: 320px; margin: 18px auto 0; display: flex; }

/* the sticky "View your order" bar */
.cartbar { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + 10px + env(safe-area-inset-bottom)); z-index: 30; max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 14px 18px; border: 0; border-radius: 16px; background: var(--ink); color: var(--paper); font: 700 17px var(--sans); box-shadow: var(--shadow-lg); cursor: pointer; }
@media (min-width: 760px) { .cartbar { bottom: 18px; } }
.cartbar-count { min-width: 30px; height: 30px; padding: 0 8px; border-radius: 999px; background: var(--green); color: #fff; display: inline-flex; align-items: center; justify-content: center; font: 700 15px var(--mono); }
.cartbar-text { flex: 1; text-align: left; }
.app[data-tab="shop"] { padding-bottom: calc(var(--tabbar-h) + 96px + env(safe-area-inset-bottom)); }

/* cart + checkout */
.cartview, #ordersView, #orderView, #doneView, #payView, #invoicesView { max-width: 760px; margin: 0 auto; }
.back { display: inline-flex; align-items: center; margin: 0 0 8px; font-weight: 650; text-decoration: none; min-height: 44px; }
.clist { padding: 4px 12px; }
.cline { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.cline:first-child { border-top: 0; }
.cline.bad { background: var(--bad-soft); margin: 0 -12px; padding: 10px 12px; }
.cphoto { width: 56px; height: 56px; border-radius: 10px; border: 1px solid var(--line); background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cphoto img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.cphoto .ph { width: 40px; height: 40px; font-size: 15px; }
.cname { font-weight: 650; line-height: 1.3; }
.csub { font-size: 13px; color: var(--muted); }
.cproblem { font-size: 13px; color: var(--bad); font-weight: 600; margin-top: 2px; }
.cqty { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.cqty .link { font-size: 13px; color: var(--muted); }
.checkout .label { margin-top: 16px; }
.checkout .label:first-child { margin-top: 0; }
.choices { display: flex; flex-direction: column; gap: 8px; }
.choice { display: flex; gap: 12px; align-items: flex-start; margin: 0 !important; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.choice input { width: auto; margin: 3px 0 0; padding: 0; display: inline-block; accent-color: var(--green); }
.choice:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
.choice.off { cursor: default; background: var(--raised); }
.choice.off strong { color: var(--muted); }
.choice-text { display: flex; flex-direction: column; gap: 2px; font-weight: 400; }
.choice-text small { color: var(--ink-2); font-size: 13px; line-height: 1.4; }
.note { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--info-soft); color: var(--ink-2); font-size: 14px; }
#ageNote { background: var(--warn-soft); }
.done { text-align: center; padding: 28px 20px; }
.done .go { margin-top: 10px; }
.tick { width: 72px; height: 72px; margin: 6px auto 12px; border-radius: 50%; background: var(--good-soft); position: relative; }
.tick::after { content: ""; position: absolute; left: 25px; top: 13px; width: 18px; height: 32px; border: solid var(--good); border-width: 0 6px 6px 0; transform: rotate(45deg); }

/* orders */
.olist { padding: 0; overflow: hidden; }
.orow { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; width: 100%; min-height: 60px; padding: 14px 16px; border: 0; border-top: 1px solid var(--line); background: var(--paper); text-align: left; font: inherit; color: inherit; cursor: pointer; }
.orow:first-child { border-top: 0; }
.orow:hover { background: var(--raised); }
.onum { font-weight: 700; }
.osub { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
.ohead { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ohead .h2 { margin: 0; font-size: 18px; white-space: nowrap; }
.callout { border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); background: var(--warn-soft); }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.steps li:first-child { border-top: 0; }
.steps small { color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--info); }
.dot.warn { background: var(--hold); }
.dot.good { background: var(--good); }
.dot.bad { background: var(--bad); }
.dot.done { background: var(--ink-2); }
.row.struck > span:first-child { text-decoration: line-through; color: var(--muted); }

/* WP99 (Leo, 2026-10-28): the customer confirms the PRICED order (confirm.html) - prices only on this page. */
.cf-app { max-width: 560px; padding-bottom: 48px; }
.cf-head .cf-number { font-size: 26px; margin: 2px 0 2px; }
.cf-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.cf-changes { border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); background: var(--warn-soft); }
.cf-edit-list { margin: 0; padding-left: 18px; }
.cf-edit-list li { margin: 4px 0; }
.cf-why { display: block; color: var(--ink-2); font-size: 13px; }
.cf-lines { display: grid; gap: 0; }
.cf-line { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "what total" "qty total"; gap: 0 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cf-line-what { grid-area: what; display: flex; flex-direction: column; min-width: 0; }
.cf-line-what b { font-weight: 650; }
.cf-code { color: var(--muted); font-size: 12px; }
.cf-line-qty { grid-area: qty; color: var(--ink-2); font-size: 14px; }
.cf-line-total { grid-area: total; align-self: center; font-weight: 700; font-size: 17px; }
.cf-totals { margin-top: 10px; }
.cf-row { display: flex; justify-content: space-between; padding: 4px 0; color: var(--ink-2); }
.cf-row.cf-total { color: var(--ink); font-size: 22px; font-weight: 800; border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 10px; }
.cf-field { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 12px; font-weight: 600; font-size: 14px; }
.cf-field input, .cf-field textarea { font: inherit; font-size: 17px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--raised); color: var(--ink); min-height: 48px; }
.cf-sig-label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.cf-sig { display: block; width: 100%; height: 170px; border: 2px dashed var(--line); border-radius: var(--radius-sm); background: #fff; touch-action: none; }
.cf-ask { margin-top: 6px; }

/* WP99 v2: what the driver dropped off (My orders). */
.dproof-photo { display: block; width: 100%; height: auto; margin-top: 12px; border-radius: var(--radius-sm); }
.dproof-sig { display: block; width: 100%; max-width: 360px; height: auto; margin-top: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); }

/* Leo 2026-10-31: white and grey, the KairyxOS font, a clean header. Colour is kept for meaning (overdue, actions). */
.topbar { margin: -12px -16px 14px; padding: 8px 16px; background: var(--paper); box-shadow: 0 0 0 100vmax var(--paper), 0 1px 0 100vmax var(--line); clip-path: inset(0 -100vmax -1px); }
.logo { height: 46px; }
.name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } /* the logo says it; screen readers keep the name */
.iconbtn { min-height: 40px; min-width: 40px; background: none; }
.app[data-view="signin"] .topbar, .app[data-view="activate"] .topbar, .app[data-view="closed"] .topbar, .app[data-view="loading"] .topbar { margin: 0; padding: 28px 0 6px; background: none; box-shadow: none; clip-path: none; }
.num { font-variant-numeric: tabular-nums; letter-spacing: 0; }
h1, h2, h3, .card h1, .greeting, .page-title, .h2, .pname { font-weight: 600; }
.greeting { font-size: 22px; line-height: 1.25; margin: 4px 0 2px; letter-spacing: -.01em; }
.page-title { font-size: 22px; letter-spacing: -.01em; }
.card h1 { font-size: 22px; letter-spacing: -.01em; }
.label { font-size: 11.5px; font-weight: 600; letter-spacing: .05em; }
.card { box-shadow: none; }
.go { font-weight: 600; font-size: 16px; }

.hero, .hero[data-tone="good"] { display: block; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: none; padding: 18px 16px; }
.hero::after { display: none; }
.hero-label { font-size: 12px; font-weight: 600; letter-spacing: .05em; color: var(--muted); opacity: 1; }
.hero-amount { font-size: 34px; font-weight: 650; letter-spacing: -.02em; margin-top: 2px; }
.hero-note { font-size: 14px; font-weight: 400; color: var(--muted); opacity: 1; }
.go.hero-pay { width: 100%; margin-top: 14px; background: var(--green); color: #fff; }
.go.hero-pay:hover { background: var(--green-700); }
@media (prefers-color-scheme: dark) { .go.hero-pay { background: var(--green); color: #0d150d; } }
@media (min-width: 760px) { .go.hero-pay { width: auto; } }

.tab { font-weight: 500; font-size: 11px; }
@media (max-width: 759px) { .tab[aria-current="page"] { background: none; font-weight: 650; } }
.stat[data-tone="bad"] { background: var(--paper); border-color: var(--line); }
.stat-label { font-size: 11.5px; font-weight: 600; letter-spacing: .05em; }
.stat-value { font-weight: 650; }
/* The tagline shows at the door only, under the logo. */
.tagline { display: none; }
.app[data-view="signin"] .brand, .app[data-view="activate"] .brand, .app[data-view="closed"] .brand, .app[data-view="loading"] .brand { flex-direction: column; gap: 10px; }
.app[data-view="signin"] .tagline, .app[data-view="activate"] .tagline, .app[data-view="closed"] .tagline, .app[data-view="loading"] .tagline { display: block; font-size: 14px; font-weight: 500; letter-spacing: .04em; color: var(--muted); text-align: center; }

/* The header, Leo 2026-10-31: one white bar. The logo, the menu as plain words with a fine underline on the current
 * page (desk), a quiet Sign out. On a phone: a slim bar, the tab bar stays at the thumb. */
.app { position: relative; }
.topbar { min-height: 60px; padding: 7px 16px; margin-bottom: 18px; }
.logo { height: 46px; }
.iconbtn, .iconbtn:hover { border: 0; background: none; padding: 0 4px; min-height: 44px; font-weight: 500; color: var(--muted); }
.iconbtn:hover { color: var(--ink); }
@media (max-width: 759px) {
  .tab { color: var(--muted); }
  .tab svg { stroke-width: 1.6; }
  .tab[aria-current="page"] { color: var(--ink); font-weight: 600; }
}
@media (min-width: 760px) {
  .topbar { min-height: 76px; padding: 10px 16px; margin-bottom: 26px; }
  .logo { height: 56px; }
  .iconbtn svg { display: none; }
  .iconbtn { font-size: 14.5px; }
  .tabs { position: absolute; top: 0; left: 104px; right: 110px; height: 76px; margin: 0; padding: 0; gap: 4px; align-items: stretch; border: 0; border-radius: 0; background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; z-index: 5; }
  .tab { min-height: 0; padding: 0 16px; border-radius: 0; font-size: 15px; font-weight: 500; color: var(--ink-2); box-shadow: inset 0 -2px 0 transparent; transition: color .12s, box-shadow .12s; }
  .tab svg { display: none; }
  .tab:hover { color: var(--ink); background: none; box-shadow: inset 0 -2px 0 var(--line); }
  .tab[aria-current="page"], .tab[aria-current="page"]:hover { background: none; color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--green); }
  .shop-bar { top: 0; }
  .greeting { font-size: 28px; }
}
@media (min-width: 760px) and (prefers-color-scheme: dark) { .tab[aria-current="page"] { color: var(--ink); } }
.app[data-view="signin"] .logo, .app[data-view="activate"] .logo, .app[data-view="closed"] .logo, .app[data-view="loading"] .logo { height: 128px; }
.app[data-view="signin"] .topbar, .app[data-view="activate"] .topbar, .app[data-view="closed"] .topbar, .app[data-view="loading"] .topbar { min-height: 0; margin: 0; padding: 28px 0 6px; }
