/* Delivery Bell — shared styles (customer pages are mobile-first; admin adds admin.css) */

:root {
  --bg: #f6f4ee;
  --surface: #ffffff;
  --surface-2: #efece3;
  --text: #1b2a21;
  --muted: #5b6a61;
  --border: #e0dccf;
  /* v3.1: the Delivery Bell logo's colours (Bell Green, Ring Orange); App Cosmetics can change them. */
  --primary: #1b4c2f;
  --primary-strong: #163d26;
  --primary-soft: #e5f5ec;
  --on-primary: #ffffff;
  --accent: #f26f17;
  --accent-strong: #b54f0a;
  --accent-soft: #faeee5;
  --danger: #b3261e;
  --danger-soft: #fbe9e7;
  --warning: #8a5a00;
  --warning-soft: #fff3cf;
  --info: #25507a;
  --info-soft: #e8f0f8;
  --focus: #1e5434;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 35, 25, 0.05), 0 6px 20px rgba(20, 35, 25, 0.06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --tap: 48px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111814;
    --surface: #18211c;
    --surface-2: #1f2a24;
    --text: #e8efe9;
    --muted: #a3b2a8;
    --border: #2d3a33;
    --primary: #56c382;
    --primary-strong: #7bd09e;
    --primary-soft: #1d3527;
    --on-primary: #08130d;
    --accent: #ed955a;
    --accent-strong: #ed955a;
    --accent-soft: #3a2519;
    --danger: #f2877e;
    --danger-soft: #3b1f1c;
    --warning: #f0c35a;
    --warning-soft: #372d14;
    --info: #8fb9e6;
    --info-soft: #1b2a3a;
    --focus: #7bd09e;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 20px rgba(0, 0, 0, 0.25);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 0.5rem; }
h1 { font-size: 1.6rem; letter-spacing: -0.01em; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 0.75rem; }
a { color: var(--primary); text-underline-offset: 2px; }
a:hover { color: var(--primary-strong); }
img, svg { max-width: 100%; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.pre-line { white-space: pre-line; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }
.stack-sm > * + * { margin-top: 0.5rem; }
.row { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1 1 auto; }

/* ---------- Layout (customer) ---------- */

.app-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--border);
}
.app-header .inner {
  max-width: 640px; margin: 0 auto; padding: 0.6rem 1rem;
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
}
.brand { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; color: var(--text); font-weight: 700; }
.brand img { width: 32px; height: 32px; }
.brand span { font-size: 1.05rem; letter-spacing: -0.01em; }

.page { max-width: 640px; margin: 0 auto; padding: 1.25rem 1rem 6rem; }
.page.narrow { max-width: 480px; }

.hero { text-align: center; padding: 1.5rem 0 0.5rem; }
.hero img { width: 72px; height: 72px; }
.hero h1 { margin-top: 0.75rem; font-size: 1.75rem; }
.hero p { color: var(--muted); }

/* ---------- Cards ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 1rem; }
.card h2 { margin-bottom: 0.75rem; }
.card-title { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; margin-bottom: 0.5rem; }
.card-link { display: block; text-decoration: none; color: inherit; }
.card-link:hover { border-color: var(--primary); }
.card-link:focus-visible { outline-offset: 0; }

.prefs-sub { margin: 1rem 0 0.4rem; font-size: 0.95rem; }   /* v7.0 My details → "App notifications" */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 1rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; }

.notice {
  border-radius: var(--radius-sm); padding: 0.75rem 0.9rem; margin-bottom: 1rem;
  background: var(--info-soft); color: var(--info); border: 1px solid color-mix(in srgb, var(--info) 25%, transparent);
}
.notice.warning { background: var(--warning-soft); color: var(--warning); border-color: color-mix(in srgb, var(--warning) 30%, transparent); }
.notice.danger { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.notice.success { background: var(--primary-soft); color: var(--primary-strong); border-color: color-mix(in srgb, var(--primary) 30%, transparent); }
.notice strong { display: block; margin-bottom: 0.15rem; }

.empty { text-align: center; padding: 2rem 1rem; color: var(--muted); }
.empty .big { font-size: 2.2rem; line-height: 1; margin-bottom: 0.5rem; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: var(--tap); padding: 0.7rem 1.2rem;
  border-radius: 12px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2;
  cursor: pointer; text-decoration: none; text-align: center;
  background: var(--surface-2); color: var(--text);
  transition: background-color 0.15s, border-color 0.15s, transform 0.05s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: color-mix(in srgb, var(--surface-2) 80%, var(--text) 8%); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--primary); color: var(--on-primary); }
.btn.primary:hover { background: var(--primary-strong); color: var(--on-primary); }
.btn.outline { background: transparent; border-color: var(--border); }
.btn.outline:hover { border-color: var(--primary); background: var(--primary-soft); }
.btn.danger { background: var(--danger-soft); color: var(--danger); }
.btn.danger:hover { background: var(--danger); color: #fff; }
.btn.ghost { background: transparent; padding-inline: 0.6rem; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.small { min-height: 36px; padding: 0.4rem 0.8rem; font-size: 0.9rem; border-radius: 10px; }
.btn.block { display: flex; width: 100%; }
.btn.big { min-height: 64px; font-size: 1.15rem; border-radius: 16px; }
.btn .spinner { width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--primary); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

.menu-buttons { display: grid; gap: 0.75rem; margin-top: 1.25rem; }
.menu-buttons .btn { justify-content: flex-start; padding-inline: 1.1rem; }
.menu-buttons .btn .icon { width: 28px; height: 28px; flex: none; }
.menu-buttons .btn small { display: block; font-weight: 400; font-size: 0.85rem; opacity: 0.85; }
.menu-buttons .btn .label { text-align: left; }

/* ---------- Forms ---------- */

.field { margin-bottom: 1rem; }
.field label, .field .label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.field .hint { font-size: 0.85rem; color: var(--muted); margin-top: 0.3rem; }
.field .req { color: var(--accent-strong); margin-left: 0.15rem; }
.field .opt { color: var(--muted); font-weight: 400; font-size: 0.85rem; margin-left: 0.3rem; }

input[type="text"], input[type="tel"], input[type="password"], input[type="email"], input[type="number"],
input[type="date"], input[type="time"], input[type="datetime-local"], input[type="search"], select, textarea {
  width: 100%; min-height: var(--tap);
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); color: var(--text);
  font: inherit; font-size: 1rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }
input[readonly] { background: var(--surface-2); color: var(--muted); }
.error-text { color: var(--danger); font-size: 0.875rem; margin-top: 0.3rem; }
.error-text:empty { display: none; }
.form-error { margin-bottom: 1rem; }

.check { display: flex; align-items: center; gap: 0.6rem; min-height: 40px; cursor: pointer; font-weight: 500; }
.check input { width: 20px; height: 20px; accent-color: var(--primary); flex: none; }

.pin-input { letter-spacing: 0.4em; font-size: 1.2rem; }

.form-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.25rem; }

/* ---------- Badges ---------- */

.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.18rem 0.6rem; border-radius: 999px;
  font-size: 0.8rem; font-weight: 600; line-height: 1.4; white-space: nowrap;
  background: var(--surface-2); color: var(--muted);
}
.badge.green { background: var(--primary-soft); color: var(--primary-strong); }
.badge.blue { background: var(--info-soft); color: var(--info); }
.badge.amber { background: var(--warning-soft); color: var(--warning); }
.badge.red { background: var(--danger-soft); color: var(--danger); }
.badge.orange { background: var(--accent-soft); color: var(--accent-strong); }

/* ---------- Order wizard ---------- */

.steps { display: flex; gap: 0.35rem; margin: 0.25rem 0 1rem; }
.steps span { flex: 1; height: 5px; border-radius: 999px; background: var(--border); }
.steps span.done { background: var(--primary); }
.step-label { font-size: 0.85rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }

.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 0.6rem; }
.choice-list { display: grid; gap: 0.6rem; }
.choice {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0.15rem;
  width: 100%; min-height: 64px; padding: 0.75rem 0.9rem;
  border: 1.5px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text);
  font: inherit; text-align: left; cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}
.choice:hover { border-color: var(--primary); }
.choice[aria-pressed="true"], .choice[aria-checked="true"] { border-color: var(--primary); background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }
.choice[disabled] { opacity: 0.55; cursor: not-allowed; background: var(--surface-2); }
.choice .title { font-weight: 700; font-size: 1.05rem; }
.choice .sub { font-size: 0.85rem; color: var(--muted); }
.choice.date { align-items: center; text-align: center; min-height: 76px; }
.choice.date .day { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; color: var(--muted); letter-spacing: 0.04em; }
.choice.date .num { font-size: 1.5rem; font-weight: 800; line-height: 1.1; }
.choice.date .mon { font-size: 0.8rem; color: var(--muted); }
.choice.date .tag { font-size: 0.7rem; font-weight: 700; color: var(--primary); }

.product {
  display: grid; grid-template-columns: 1fr auto; gap: 0.25rem 1rem; align-items: center;
  padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
}
.product + .product { margin-top: 0.75rem; }
.product.selected { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.product .name { font-weight: 700; font-size: 1.05rem; }
.product .desc { grid-column: 1 / -1; color: var(--muted); font-size: 0.9rem; margin: 0; }
.product .price { font-weight: 700; color: var(--primary-strong); }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; background: var(--surface); }
.stepper button {
  width: 44px; height: 44px; border: 0; background: transparent; color: var(--primary-strong);
  font-size: 1.4rem; font-weight: 700; cursor: pointer; line-height: 1;
}
.stepper button:hover:not([disabled]) { background: var(--primary-soft); }
.stepper button[disabled] { color: var(--border); cursor: not-allowed; }
.stepper output { min-width: 2.2rem; text-align: center; font-weight: 700; font-size: 1.05rem; }

.sticky-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--surface); border-top: 1px solid var(--border);
  box-shadow: 0 -6px 20px rgba(20, 35, 25, 0.08);
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
}
.sticky-bar .inner { max-width: 640px; margin: 0 auto; display: flex; align-items: center; gap: 1rem; }
.sticky-bar .summary { flex: 1; line-height: 1.25; }
.sticky-bar .summary strong { font-size: 1.15rem; display: block; }

.lines { width: 100%; border-collapse: collapse; }
.lines td { padding: 0.45rem 0; border-bottom: 1px dashed var(--border); vertical-align: top; }
.lines tr:last-child td { border-bottom: 0; }
.lines .qty { color: var(--muted); white-space: nowrap; padding-left: 0.5rem; }
.lines .amt { text-align: right; white-space: nowrap; font-weight: 600; padding-left: 0.75rem; }
.total-row { display: flex; justify-content: space-between; font-weight: 800; font-size: 1.15rem; padding-top: 0.75rem; margin-top: 0.5rem; border-top: 2px solid var(--border); }

.success-mark {
  width: 72px; height: 72px; border-radius: 50%; margin: 0.5rem auto 1rem;
  background: var(--primary); color: var(--on-primary);
  display: grid; place-items: center;
}
.success-mark svg { width: 38px; height: 38px; }

.order-card .top { display: flex; justify-content: space-between; gap: 0.5rem; align-items: flex-start; }
.order-card .when { font-weight: 700; }
.order-card .meta { color: var(--muted); font-size: 0.9rem; }
.order-card .badges { display: flex; gap: 0.35rem; flex-wrap: wrap; justify-content: flex-end; }
.order-card .bottom { display: flex; justify-content: space-between; margin-top: 0.5rem; font-size: 0.95rem; }

.identifiers { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.identifiers .chip { background: var(--surface-2); border-radius: 8px; padding: 0.15rem 0.55rem; font-size: 0.9rem; }
.identifiers .chip b { font-weight: 600; color: var(--muted); margin-right: 0.3rem; }

/* ---------- Toast & dialog ---------- */

.toast-host { position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%); z-index: 100; display: grid; gap: 0.5rem; width: min(92vw, 420px); pointer-events: none; }
.toast {
  background: var(--text); color: var(--bg); padding: 0.8rem 1rem; border-radius: 12px;
  box-shadow: var(--shadow); font-weight: 500; animation: toast-in 0.2s ease-out; pointer-events: auto;
}
.toast.error { background: var(--danger); color: #fff; }
.toast.success { background: var(--primary-strong); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

dialog {
  border: 0; border-radius: var(--radius); padding: 0; width: min(94vw, 520px);
  background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
dialog::backdrop { background: rgba(10, 20, 15, 0.45); }
dialog .dialog-body { padding: 1.25rem; max-height: 80vh; overflow: auto; }
dialog .dialog-actions { display: flex; gap: 0.6rem; justify-content: flex-end; padding: 0.9rem 1.25rem; border-top: 1px solid var(--border); flex-wrap: wrap; }

.loading { display: flex; align-items: center; justify-content: center; gap: 0.6rem; color: var(--muted); padding: 2rem 0; }
.loading::before { content: ""; width: 20px; height: 20px; border: 2.5px solid var(--primary); border-right-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; }

.footer-note { text-align: center; color: var(--muted); font-size: 0.85rem; margin-top: 2rem; }

@media (min-width: 560px) {
  .page { padding-top: 2rem; }
  .menu-buttons { grid-template-columns: 1fr 1fr; }
  .menu-buttons .btn.primary { grid-column: 1 / -1; }
}

@media print {
  .app-header, .sticky-bar, .toast-host, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; border-color: #ccc; }
}

.inline-badge { margin-left: 0.5rem; vertical-align: middle; }
.mt { margin-top: 0.9rem; }
.card .stack-sm + .stack-sm { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }

/* Icons inside buttons/links */
svg.icon { width: 1.25em; height: 1.25em; flex: none; }
.btn { white-space: nowrap; }
.menu-buttons .btn { white-space: normal; }

/* ---------- Book for a day | Subscribe tabs ---------- */
.mode-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem; padding: 0.3rem; background: var(--surface-2); border-radius: 14px; margin: 0.5rem 0 1rem; }
.mode-tabs.compact { display: flex; flex-wrap: wrap; margin-top: 1.25rem; }
.mode-tabs.compact .mode-tab { flex: 1 1 auto; }
.mode-tab {
  appearance: none; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font: inherit; font-weight: 700;
  padding: 0.6rem 0.75rem; min-height: var(--tap); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.2;
}
.mode-tab small { font-weight: 500; font-size: 0.78rem; }
.mode-tab[aria-selected="true"] { background: var(--surface); color: var(--primary-strong); box-shadow: var(--shadow); }

/* ---------- Plans, payment summary, delivery dates ---------- */
.plan-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; }
.plan-head h2 { margin: 0; }
.pay-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.35rem 0; }
.pay-row.strong { font-weight: 700; }
.pay-row.due { font-weight: 800; font-size: 1.2rem; border-top: 2px solid var(--border); margin-top: 0.35rem; padding-top: 0.6rem; color: var(--primary-strong); }
.pay-card .check { font-weight: 600; }
.date-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.date-table th { text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); padding: 0.35rem 0.3rem; border-bottom: 1px solid var(--border); }
.date-table td { padding: 0.45rem 0.3rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.date-table .num { text-align: right; white-space: nowrap; }
.date-table tr.skipped td { color: var(--muted); font-style: italic; }
.date-table tfoot td { font-weight: 800; border-bottom: 0; border-top: 2px solid var(--border); padding-top: 0.6rem; }
@media (max-width: 420px) { .date-table th:nth-child(2), .date-table td:nth-child(2) { display: none; } .date-table tr.skipped td:nth-child(2) { display: table-cell; } }
.big-amount { font-size: 1.8rem; font-weight: 800; margin: 0.5rem 0; }

/* ---------- Delivery Bell balance ---------- */
.balance-card .balance { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.02em; color: var(--primary-strong); }
.balance-card label { font-weight: 600; display: block; margin-bottom: 0.4rem; }
.amount-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.6rem; }
.balance-card .row input, .card form .row input { flex: 1 1 140px; width: auto; }
.credit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin-bottom: 0.5rem; }
.credit-grid strong { font-size: 1.15rem; }
.neg { color: var(--danger); }
.statement { display: grid; }
.statement .entry { display: flex; justify-content: space-between; gap: 1rem; padding: 0.65rem 0; border-bottom: 1px solid var(--border); }
.statement .entry:last-child { border-bottom: 0; }
.statement .amount { text-align: right; font-weight: 800; white-space: nowrap; }
.statement .amount.in { color: var(--primary-strong); }
.statement .amount.out { color: var(--text); }
.bill-order { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 0.6rem 0.75rem; border: 1px solid var(--border); border-radius: 12px; text-decoration: none; color: inherit; }
.bill-order:hover { border-color: var(--primary); }
.bill-order .when { font-weight: 700; }
.bill-order .badges { display: flex; flex-wrap: wrap; gap: 0.3rem; justify-content: flex-end; }
.balance-strip { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.balance-strip strong { font-size: 1.4rem; display: block; }
.link-like { color: var(--primary); font-weight: 700; }
.due-card { border-color: color-mix(in srgb, var(--warning) 45%, transparent); }

/* v1.5: payments list, small inline buttons, amount dialog */
.payments .entry.not-paid .amount { color: var(--muted); }
.fail-reason { color: var(--danger); font-weight: 600; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; word-break: break-all; }
.mini-btn {
  display: inline-flex; align-items: center; gap: 0.2rem; min-height: 32px; padding: 0.2rem 0.7rem;
  border: 1px solid var(--primary); border-radius: 999px; background: var(--surface, #fff); color: var(--primary-strong);
  font: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer; white-space: nowrap; vertical-align: middle;
}
.mini-btn:hover { background: var(--primary-soft); }
.mini-btn:focus-visible { outline: 3px solid var(--focus, var(--primary)); outline-offset: 2px; }
.mini-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.4rem; }
.amount-dialog input[type=number] { width: 100%; font-size: 1.2rem; }
.dialog-actions.wrap { flex-wrap: wrap; }
.install-tip { display: flex; gap: 0.6rem; align-items: flex-start; }
.install-tip .close { margin-left: auto; }
/* Uploaded pictures (Manage App Cosmetics) */
.hero img.custom { width: 100%; height: auto; max-height: 260px; object-fit: cover; border-radius: var(--radius); }
.brand img.custom { width: auto; max-width: 160px; height: 36px; object-fit: contain; }

/* ---------- v1.6: admin sign-in, set-up, joining, recovery codes ---------- */
.notice.info { background: var(--info-soft); color: var(--info); border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.page.narrow.wide-step { max-width: 720px; }
.auth-setup { display: grid; grid-template-columns: auto 1fr; gap: 1rem 1.25rem; align-items: start; margin-bottom: 0.75rem; }
.qr-box { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 0.4rem; line-height: 0; }
canvas.qr { width: 200px; height: 200px; image-rendering: pixelated; }
.steps-list { margin: 0; padding-left: 1.2rem; }
.steps-list li { margin-bottom: 0.4rem; }
.secret-key { display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.05rem; letter-spacing: 0.06em; background: var(--surface-2); padding: 0.35rem 0.6rem; border-radius: 8px; word-break: break-all; user-select: all; }
.code-input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.3rem; letter-spacing: 0.2em; max-width: 16rem; }
.pw-wrap { display: flex; gap: 0.4rem; align-items: center; }
.pw-wrap input { flex: 1; min-width: 0; }
fieldset.setup-part { border: 1px solid var(--border); border-radius: 12px; padding: 0.75rem 1rem 0.25rem; margin: 0 0 1rem; }
fieldset.setup-part legend { font-weight: 700; padding: 0 0.35rem; }
.codes-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem 1.5rem; padding-left: 1.6rem; margin: 1rem 0; }
.codes-grid code { font-size: 1.05rem; letter-spacing: 0.05em; }
.link-input { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85rem; }
@media (max-width: 560px) {
  .auth-setup { grid-template-columns: 1fr; justify-items: center; }
  .codes-grid { grid-template-columns: 1fr; }
}
@media print {
  .recovery-codes .notice { border: 1px solid #999; }
}
.send-code { margin-bottom: 0.9rem; }
.verify-box + .verify-box { margin-top: 1rem; }

/* v1.11: the customer's delivery answer */
.delivery-answer q { font-style: italic; font-weight: 600; }
.delivery-answer .notice { margin-bottom: 0.5rem; }

/* v1.12: simpler Home — tinted Service Location plate, two buttons under ORDER NOW */
.card.loc-plate {
  background: color-mix(in srgb, var(--primary) 8%, var(--surface));
  border-color: color-mix(in srgb, var(--primary) 28%, transparent);
  border-left: 5px solid var(--primary);
}
.card.loc-plate h2 { color: var(--primary-strong); }
.card.loc-plate .chip { background: color-mix(in srgb, var(--primary) 14%, var(--surface)); }
.menu-buttons.simple { grid-template-columns: 1fr 1fr; }
.menu-buttons.simple .btn.primary { grid-column: 1 / -1; }
.menu-buttons.simple .btn.outline { flex-direction: column; align-items: flex-start; gap: 0.35rem; }
@media (min-width: 560px) { .menu-buttons.simple .btn.outline { flex-direction: row; align-items: center; } }
/* My profile: Delivery Bell balance statements */
.money-section > h2 { margin-bottom: 0.5rem; }
.balance-line { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; }
.balance-line strong { font-size: 1.25rem; }
.money-section { scroll-margin-top: 80px; }

/* v1.13: floating labels — the field name sits inside the box, then shrinks to the top edge when typing */
.ff { position: relative; margin-bottom: 0.6rem; }
.ff > input, .ff > select, .ff > textarea { width: 100%; min-height: 54px; padding: 1.35rem 0.85rem 0.4rem; }
.ff > textarea { min-height: 96px; padding-top: 1.5rem; }
.ff > label {
  position: absolute; left: 0.9rem; top: 27px; transform: translateY(-50%); margin: 0;
  color: var(--muted); font-weight: 500; pointer-events: none; transition: top .15s, font-size .15s, color .15s;
  max-width: calc(100% - 1.8rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ff > input:focus ~ label, .ff > input:not(:placeholder-shown) ~ label,
.ff > textarea:focus ~ label, .ff > textarea:not(:placeholder-shown) ~ label,
.ff > select ~ label { top: 0.5rem; transform: none; font-size: 0.72rem; font-weight: 700; }
.ff > input:focus ~ label, .ff > textarea:focus ~ label, .ff > select:focus ~ label { color: var(--primary-strong); }
.ff .req { color: var(--accent-strong); margin-left: 0.15rem; }
.ff > .error-text:empty { display: none; }
.ff > .hint { font-size: 0.82rem; color: var(--muted); margin-top: 0.25rem; }

/* v1.13: Create Account steps + location search */
.reg-steps { display: flex; gap: 0.3rem; margin: 0.4rem 0 0.35rem; }
.reg-steps span { flex: 1; height: 6px; border-radius: 3px; background: var(--surface-2); }
.reg-steps span.on { background: var(--primary); }
.reg-steplbl { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--muted); margin-bottom: 0.9rem; }
.reg-steplbl b { color: var(--primary-strong); }
.reg-q { font-size: 1.05rem; margin: 0 0 0.6rem; }
.loc-pick { display: flex; gap: 0.5rem; align-items: flex-start; }
.loc-pick .grow { flex: 1; margin-bottom: 0; }
.search-btn { width: 54px; min-width: 54px; height: 54px; padding: 0; border-radius: 12px; background: var(--primary-soft); color: var(--primary-strong); border: 1.5px solid var(--primary); }
.form-actions.two { display: flex; gap: 0.6rem; }
.form-actions.two .btn { flex: 1; }
.mt-sm { margin-top: 0.5rem; }
dialog.sheet { width: min(520px, calc(100vw - 1.5rem)); }
.loc-results { display: flex; flex-direction: column; gap: 0.15rem; max-height: 55vh; overflow: auto; }
.loc-hit { display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 0.1rem; padding: 0.65rem 0.6rem; border: 0; border-bottom: 1px solid var(--border); background: none; font: inherit; color: inherit; cursor: pointer; border-radius: 10px; }
.loc-hit:hover, .loc-hit.top { background: var(--primary-soft); }
.loc-hit-name { font-weight: 600; }
.loc-hit mark { background: #fff2a8; color: inherit; border-radius: 3px; }
.loc-sorry { text-align: center; padding: 0.6rem 0.4rem; }
.loc-sorry-icon { font-size: 2.4rem; }
.loc-sorry h3 { margin: 0.3rem 0; }
.loc-sorry p { color: var(--muted); }

/* v1.13: Home spacing + complaint icon */
.menu-buttons.simple .btn.primary { margin-bottom: 1.25rem; }
.cmp-row { display: flex; justify-content: center; margin-top: 2rem; }
/* v3.1: an orange circle with a white icon (a shade deeper than the accent, so the white icon stays clear). */
.cmp-icon { position: relative; width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: #e8650f; background: color-mix(in srgb, var(--accent) 93%, #000); border: 0; color: #fff; box-shadow: var(--shadow); -webkit-touch-callout: none; }
.cmp-icon:hover { background: color-mix(in srgb, var(--accent) 82%, #000); }
.cmp-icon:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.cmp-count { position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 999px; background: var(--primary); color: var(--on-primary);
  border: 2px solid var(--surface); font-size: 0.75rem; font-weight: 700; display: flex; align-items: center; justify-content: center; line-height: 1; }
.cmp-tip { position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg);
  font-size: 0.8rem; line-height: 1.3; padding: 0.4rem 0.65rem; border-radius: 8px; white-space: nowrap; text-align: center;
  opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 5; }
.cmp-tip::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -6px; border: 6px solid transparent; border-top-color: var(--text); }
.cmp-icon:hover .cmp-tip, .cmp-icon:focus-visible .cmp-tip, .cmp-icon.show-tip .cmp-tip { opacity: 1; }
/* Complaints page */
.cmp-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.cmp-item { display: block; width: 100%; text-align: left; border: 0; border-top: 1px solid var(--border); background: none; padding: 0.7rem 0.85rem; font: inherit; color: inherit; cursor: pointer; }
.cmp-item:first-child { border-top: 0; }
.cmp-item:hover { background: var(--primary-soft); }
.cmp-item .top { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.cmp-new { display: inline-block; margin-left: 0.4rem; padding: 0.05rem 0.45rem; border-radius: 999px; background: #d92d20; color: #fff; font-size: 0.7rem; font-weight: 700; vertical-align: middle; }
.cmp-item.is-new { background: color-mix(in srgb, var(--danger) 6%, var(--surface)); }
.cmp-item .res { color: var(--muted); font-size: 0.85rem; margin-top: 0.2rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-box { background: var(--surface-2); border-radius: 10px; padding: 0.6rem 0.75rem; margin: 0.4rem 0 0.8rem; white-space: pre-line; }
.cmp-box.res { background: var(--primary-soft); }
.cmp-svg { width: 28px; height: 28px; stroke-width: 2.2; }

/* ---------- v3.0 Delivery Bell: companies ---------- */
.choice.company-choice { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 0.85rem; text-align: left; }
.company-text { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.company-logo { width: 56px; height: 40px; object-fit: contain; border-radius: 8px; background: #fff; border: 1px solid var(--border); flex: none; }
.company-dot { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; background: var(--primary); color: #fff; font-weight: 800; font-size: 1.1rem; }
.company-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.65rem; }
.company-tile { display: flex; align-items: center; gap: 0.6rem; padding: 0.7rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; min-height: 56px; }
.company-tile:hover { border-color: var(--primary); }
.company-tile .company-logo { width: 44px; height: 32px; }
.company-tile .company-dot { width: 32px; height: 32px; font-size: 0.95rem; }
.seller-block { border-top: 1px dashed var(--border); margin-top: 0.75rem; padding-top: 0.6rem; font-size: 0.9rem; }
.choice-list.compact { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin-bottom: 0.9rem; }
.choice-list.compact .choice { min-height: 0; padding: 0.6rem 0.75rem; }

/* ---------- v4.1: customer home, the ⚙ Settings ---------- */
.header-actions { display: flex; align-items: center; gap: 0.25rem; }
.gear-link { position: relative; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; color: var(--text); }
.gear-link:hover { background: var(--surface-2); }
.gear-link .icon { width: 24px; height: 24px; }
.gear-count, .set-count { min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 999px; background: var(--danger); color: #fff;
  font-size: 0.7rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.gear-count { position: absolute; top: 4px; right: 3px; }
.welcome { margin-bottom: 1rem; }
.welcome h1 { margin-bottom: 0.15rem; }
.place-line { display: inline-flex; align-items: center; gap: 0.3rem; max-width: 100%; color: var(--muted); font-size: 0.92rem; text-decoration: none; }
.place-line:hover { color: var(--text); }
.place-line .icon { width: 1em; height: 1em; }
.place-line span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.balance-compact { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.65rem 0.8rem; }
.balance-compact .fig { display: flex; flex-direction: column; min-width: 0; text-decoration: none; color: var(--text); line-height: 1.25; }
.balance-compact .fig small { color: var(--muted); font-size: 0.72rem; }
.balance-compact .fig strong { font-size: 1.15rem; }
.balance-compact .mini-actions { margin-top: 0; flex: none; flex-wrap: nowrap; }
.order-now { margin-top: 1rem; min-height: 60px; width: 100%; font-size: 1.15rem; letter-spacing: 0.02em; }
.order-now .icon { width: 26px; height: 26px; }
.home-orders { margin-top: 1.25rem; }
.home-orders h2 { font-size: 0.95rem; color: var(--muted); font-weight: 600; margin-bottom: 0.5rem; }
.ord-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.ord-item { border-top: 1px solid var(--surface-2); }
.ord-item:first-child { border-top: 0; }
.ord-row { display: flex; gap: 0.75rem; padding: 0.75rem 0.9rem; color: var(--text); text-decoration: none; }
.ord-row:hover { background: color-mix(in srgb, var(--surface-2) 45%, var(--surface)); }
.ord-row .what { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 0.2rem; }
.ord-row .when { font-weight: 700; }
.ord-row .meta { color: var(--muted); font-size: 0.85rem; overflow-wrap: anywhere; }
.ord-row .flag { align-self: flex-start; flex: none; }
.ord-row.cancelled .when, .ord-row.cancelled .meta { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.sub-tag { align-self: flex-start; display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.1rem 0.5rem; border-radius: 999px;
  background: var(--info-soft); color: var(--info); font-size: 0.75rem; font-weight: 600; }
.sub-tag .icon { width: 0.95em; height: 0.95em; }
.badge.delivered .icon { width: 1em; height: 1em; }
.answer-row { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem; padding: 0 0.9rem 0.75rem; font-size: 0.85rem; color: var(--warning); font-weight: 600; }
.answer-row .mini-btn { padding: 0.2rem 0.65rem; }
.see-more { margin-top: 0.75rem; width: 100%; }
.settings-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.settings-item { display: flex; align-items: center; gap: 0.9rem; width: 100%; min-height: 60px; padding: 0.6rem 0.9rem; border: 0; border-top: 1px solid var(--surface-2);
  background: transparent; color: var(--text); text-decoration: none; font: inherit; text-align: left; cursor: pointer; box-sizing: border-box; }
.settings-item:first-child { border-top: 0; }
.settings-item:hover { background: color-mix(in srgb, var(--surface-2) 45%, var(--surface)); }
.settings-item .ico { width: 38px; height: 38px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.settings-item .ico .icon { width: 20px; height: 20px; }
.settings-item .txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.settings-item .txt b { font-weight: 600; }
.settings-item .txt small { color: var(--muted); font-size: 0.82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-item .go { color: var(--muted); width: 18px; height: 18px; flex: none; }
.settings-item.danger { color: var(--danger); }
.settings-item.danger .ico { background: var(--danger-soft); color: var(--danger); }

/* v5.0 privacy policy text */
.legal { white-space: pre-line; line-height: 1.55; }

/* ---------- v6.0 Order now: the step line (small bold capitals, part of the progress, not a heading) ---------- */
.step-line { display: flex; flex-direction: column; gap: 0.45rem; margin: 0.25rem 0 0.9rem; }
.step-line .step-title { margin: 0; font-size: 0.8rem; line-height: 1.3; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--primary-strong, var(--primary)); }
.step-line .steps { margin: 0; }
.mode-tabs.two { margin: 0.25rem 0 0.9rem; }
.mode-tabs.two .mode-tab { min-height: 44px; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pack-note { margin: -0.35rem 0 0.8rem; }

/* ---------- v6.0 the notifications list (🔔) ---------- */
.inbox-list { display: grid; gap: 0.5rem; }
.inbox-item { display: flex; align-items: flex-start; gap: 0.7rem; padding: 0.8rem 0.9rem; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow);
  color: var(--text); text-decoration: none; }
.inbox-item .inbox-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 0.4rem; flex: none; background: transparent; }
.inbox-item.unread .inbox-dot { background: var(--accent, #f26f17); }
.inbox-item .inbox-text { flex: 1; display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.inbox-item .inbox-text b { font-weight: 700; }
.inbox-item:not(.unread) .inbox-text b { font-weight: 600; }
.inbox-item .icon.go { width: 18px; height: 18px; color: var(--muted); margin-top: 0.2rem; flex: none; }
.empty .big .icon { width: 44px; height: 44px; color: var(--muted); }

/* ---------- v6.1 Home and My orders in cards (website and app) ---------- */
.home-who { margin-bottom: 0.9rem; }
.home-name { margin: 0 0 0.15rem; font-size: 1.45rem; font-weight: 800; letter-spacing: -0.01em; }
.home-who .place-line .icon { color: #c2410c; }
.balance-card { display: flex; align-items: center; gap: 0.75rem; padding: 1rem 1rem 1rem 1.1rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; box-shadow: 0 6px 18px rgba(28, 42, 33, 0.08); }
.balance-card .fig { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; text-decoration: none; color: var(--text); line-height: 1.2; }
.balance-card .fig small { color: var(--muted); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; }
.balance-card .fig small.credit { font-weight: 500; letter-spacing: 0; margin-top: 0.15rem; }
.balance-card .fig strong { font-size: 1.5rem; font-weight: 800; }
.balance-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 0.35rem; flex: none; }
.balance-actions .mini-btn { border-radius: 999px; border: 0; background: var(--primary-soft); color: var(--primary-strong); font-weight: 800; padding: 0.55rem 0.95rem; }
a.order-now { display: flex; align-items: center; justify-content: center; gap: 0.75rem; min-height: 60px; margin-top: 1rem; border-radius: 999px;
  background: var(--primary); color: var(--on-primary, #fff); font-size: 1.05rem; font-weight: 800; letter-spacing: 0.18em; text-decoration: none;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 28%, transparent); }
a.order-now:hover { background: var(--primary-strong); color: var(--on-primary, #fff); }
a.order-now .icon { width: 24px; height: 24px; }
.answer-list { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 1rem; }
.answer-list .answer-row { padding: 0.55rem 0.75rem; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); }

.otabs { display: flex; gap: 1.2rem; border-bottom: 1px solid var(--border); margin: 1.25rem 0 0.9rem; overflow-x: auto; scrollbar-width: none; }
.otab { position: relative; appearance: none; border: 0; background: none; padding: 0.7rem 0; min-height: 44px; font: inherit; font-size: 0.95rem;
  font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 0.4rem; cursor: pointer; white-space: nowrap; flex: none; }
@media (max-width: 400px) { .otab { font-size: 0.88rem; } .otabs { gap: 1rem; } }
.otab[aria-selected="true"] { color: var(--text); font-weight: 800; }
.otab[aria-selected="true"]::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; border-radius: 3px; background: #c2410c; }
.otab-count { min-width: 20px; height: 20px; padding: 0 6px; box-sizing: border-box; border-radius: 10px; background: var(--surface-2); color: var(--muted);
  font-size: 0.7rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.otab[aria-selected="true"] .otab-count { background: #c2410c; color: #fff; }
.otab-empty { text-align: center; color: var(--muted); padding: 0.5rem 0; }

.oc-list { display: flex; flex-direction: column; gap: 0.6rem; }
.oc-group { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; color: var(--muted); margin-top: 0.35rem; }
.oc { display: flex; gap: 0.75rem; padding: 0.75rem; background: var(--surface); border: 1.5px solid transparent; border-radius: 16px;
  box-shadow: var(--shadow); color: var(--text); text-decoration: none; }
.oc:hover { border-color: var(--border); }
.oc-today { border-color: #f5c9a6; }
.oc-past { opacity: 0.85; }
.oc-date { width: 58px; flex: none; border-radius: 12px; background: var(--surface-2); color: var(--muted); display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 0.45rem 0; line-height: 1.1; }
.oc-date.today { background: #fde7d3; color: #9a3412; }
.oc-dow, .oc-mon { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em; }
.oc-num { font-size: 1.5rem; font-weight: 800; color: var(--text); }
.oc-date.today .oc-num { color: #9a3412; }
.oc-date.past .oc-num { color: var(--muted); }
.oc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.2rem; }
.oc-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.oc-time { font-weight: 800; white-space: nowrap; }
.oc-company { font-weight: 700; font-size: 0.9rem; }
.oc-meta { color: var(--muted); font-size: 0.82rem; overflow-wrap: anywhere; }
.oc-cancelled .oc-time, .oc-cancelled .oc-meta { text-decoration: line-through; text-decoration-thickness: 1px; }

.pill { display: inline-flex; align-items: center; gap: 0.2rem; flex: none; font-size: 0.7rem; font-weight: 800; border-radius: 999px; padding: 0.18rem 0.55rem; white-space: nowrap; }
.pill .icon { width: 0.85em; height: 0.85em; }
.pill-pending { background: #fde7d3; color: #9a3412; }
.pill-done { background: #e3efe6; color: #1b4c2f; }
.pill-warn { background: #fef3c7; color: #92400e; }
.pill-off { background: var(--surface-2); color: var(--muted); }

.pack { background: var(--surface); border-radius: 16px; padding: 0.9rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 0.6rem; }
.pack-done { opacity: 0.9; }
.pack-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.pack-tag { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.7rem; font-weight: 800; color: #9a3412; background: #fde7d3; border-radius: 999px; padding: 0.25rem 0.6rem; }
.pack-tag .icon { width: 0.9em; height: 0.9em; }
.pack-title { font-weight: 800; }
.pack-line { color: var(--muted); font-size: 0.82rem; margin-top: -0.45rem; }
.ps-list { display: flex; flex-direction: column; gap: 0.4rem; }
.ps { display: flex; align-items: center; gap: 0.6rem; }
.ps-dot { width: 22px; height: 22px; border-radius: 11px; flex: none; display: flex; align-items: center; justify-content: center; box-sizing: border-box; }
.ps-dot .icon { width: 12px; height: 12px; }
.ps-done .ps-dot { background: #e3efe6; color: #1b4c2f; }
.ps-next .ps-dot { background: #c2410c; }
.ps-next .ps-dot::after { content: ''; width: 8px; height: 8px; border-radius: 4px; background: #fff; }
.ps-then .ps-dot { border: 2px solid var(--border); }
.ps-off .ps-dot { border: 2px dashed var(--border); }
.ps-card { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.55rem 0.75rem; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; }
.ps-done .ps-card, .ps-off .ps-card { background: color-mix(in srgb, var(--surface-2) 40%, var(--surface)); }
.ps-next .ps-card { background: color-mix(in srgb, #c2410c 7%, var(--surface)); border: 1.5px solid #f5c9a6; }
.ps-text { display: flex; flex-direction: column; line-height: 1.2; }
.ps-label { font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em; color: var(--muted); }
.ps-done .ps-label { color: #1b4c2f; }
.ps-next .ps-label { color: #c2410c; }
.ps-date { font-weight: 800; }
.pack-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; border-top: 1px solid var(--surface-2);
  padding-top: 0.6rem; font-size: 0.82rem; color: var(--muted); }
.pack-more { appearance: none; border: 0; background: none; padding: 0.3rem 0; min-height: 32px; font: inherit; font-weight: 800; color: var(--primary); text-decoration: none; cursor: pointer; }
.pack-bill { font-size: 0.8rem; font-weight: 700; }
.view-more { display: flex; align-items: center; justify-content: center; gap: 0.35rem; width: 100%; min-height: 48px; margin-top: 0.4rem; border-radius: 999px;
  border: 1px solid var(--border); background: transparent; color: var(--primary); font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; }
.view-more .icon { width: 16px; height: 16px; }
.orders-head { align-items: center; gap: 0.5rem; }
.orders-head h1 { margin: 0; }

/* ---------- v7.1 (Update 5) the bottom bar: Home · My orders · Money · Profile ----------
   The app and the website under 900 px: a bar at the bottom; the website at 900 px or wider: the same four as links in
   the header. Home's order steps after the first, and a forced PIN change or verification, have no bar. */
.tab-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -2px 10px rgba(20, 35, 25, 0.05);
  padding-bottom: env(safe-area-inset-bottom); }
.tab-bar .tab { position: relative; min-height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--muted); text-decoration: none; font-size: 0.72rem; font-weight: 600; -webkit-tap-highlight-color: transparent; }
.tab-bar .tab .icon { width: 24px; height: 24px; }
.tab-bar .tab.on { color: #c2410c; }
.tab-bar .tab.on::before { content: ''; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: #c2410c; }
.tab-bar .tab:active { background: var(--surface-2); }
.tab-count { position: absolute; top: 5px; left: calc(50% + 5px); min-width: 18px; height: 18px; padding: 0 4px; box-sizing: border-box;
  border-radius: 9px; background: #c2410c; color: #fff; font-size: 0.68rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
body.has-tab-bar .page { padding-bottom: calc(6rem + env(safe-area-inset-bottom)); }
body.has-tab-bar .toast-host { bottom: calc(76px + env(safe-area-inset-bottom)); }
body.tab-bar-off .tab-bar { display: none; }
body.tab-bar-off .toast-host { bottom: 1.25rem; }
@media (prefers-color-scheme: dark) { .tab-bar .tab.on, .header-tab.on { color: #f0915f; } .tab-bar .tab.on::before { background: #f0915f; } }

/* The website on a computer: the four tabs in the header instead (with My orders' number in brackets style). */
.header-tabs { display: none; }
.app-header .inner.wide { max-width: 980px; }
@media (min-width: 900px) {
  html:not(.in-app) .tab-bar { display: none; }
  html:not(.in-app) body.has-tab-bar .toast-host { bottom: 1.25rem; }
  .header-tabs { display: flex; align-items: center; gap: 1.5rem; margin: 0 auto 0 2rem; }
  .header-tab { position: relative; padding: 0.5rem 0; color: var(--text); text-decoration: none; font-weight: 600; white-space: nowrap;
    border-bottom: 3px solid transparent; }
  .header-tab.on { color: #c2410c; border-bottom-color: #c2410c; }
  .header-tab .tab-count { position: static; margin-left: 0.3rem; vertical-align: 1px; }
}
@media print { .tab-bar { display: none !important; } }

/* Home (the first order step): the place and the balance in one small line on top. */
.home-top { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; margin: 0 0 1rem; }
.home-top .place-line .icon { color: #c2410c; }
.home-money { color: var(--text); text-decoration: none; font-size: 0.92rem; white-space: nowrap; padding: 0.3rem 0.7rem;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
.home-money strong { font-weight: 800; }
.home-money .neg { color: var(--danger); }
.app-ask-host, body.has-tab-bar .page.app-ask-host { padding-bottom: 0; }   /* v11.0: no tab-bar gap under the bar / card */
.app-ask-host:empty { display: none; }

/* Money: one summary on top. */
.money-summary { display: grid; gap: 0.9rem; margin-bottom: 0.5rem; }
.money-main { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.money-fig { display: flex; flex-direction: column; line-height: 1.2; }
.money-fig small { color: var(--muted); font-size: 0.75rem; font-weight: 600; }
.money-fig.big small { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; }
.money-fig.big strong { font-size: 1.6rem; font-weight: 800; }
.money-fig strong { font-size: 1.1rem; }
.money-fig .neg { color: var(--danger); }
.money-credit { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; padding-top: 0.8rem; border-top: 1px solid var(--border); }
.money-summary .balance-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }

/* Profile: who is signed in. */
.profile-who { display: flex; flex-direction: column; margin: -0.25rem 0 1rem; }

/* v7.2 (Update 7): the order steps — a thin orange-red progress line (the app bar's colour) and small pills of what is
   already chosen (company · 26 Nov · slot time). */
.steps.thin { gap: 0.25rem; }
.steps.thin span { height: 2px; }
.steps.thin span.done { background: #c2410c; }
.chosen-pills { list-style: none; margin: 0.15rem 0 0.6rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.chosen-pill { font-size: 0.78rem; font-weight: 600; line-height: 1.2; padding: 0.28rem 0.65rem; border-radius: 999px;
  background: #fff1e8; color: #9a3412; border: 1px solid #fed7c3; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media print { .chosen-pills { display: none; } }
@media (prefers-color-scheme: dark) {
  .steps.thin span.done { background: #f0915f; }
  .chosen-pill { background: rgba(240, 145, 95, 0.14); color: #f7b48f; border-color: rgba(240, 145, 95, 0.35); }
}

/* v7.3 (Update 9): ONE success pop-up for every payment — a green ✓, the title, the details, View … and a clear Close. */
dialog.success-dialog { width: min(400px, calc(100vw - 2rem)); }
.success-dialog .dialog-body { text-align: center; padding-top: 1.5rem; }
.success-mark { width: 60px; height: 60px; margin: 0 auto 0.75rem; border-radius: 50%; background: var(--primary, #1b4c2f); color: #fff;
  display: grid; place-items: center; }
.success-mark .icon { width: 30px; height: 30px; stroke-width: 2.6; }
.success-dialog h2 { margin: 0 0 0.35rem; font-size: 1.3rem; }
.success-note { margin: 0 0 0.6rem; color: var(--muted); font-size: 0.92rem; }
.success-lines { margin: 0.9rem 0 0; text-align: left; border-top: 1px solid var(--border); }
.success-lines > div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.success-lines dt { color: var(--muted); font-size: 0.9rem; }
.success-lines dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
/* v10.0: a long label (a Checkout all lists store · date · slot) wraps; the amount beside it stays on one line. */
.success-lines dt { flex: 1 1 auto; min-width: 0; }
.success-lines dd { flex: 0 0 auto; max-width: 62%; }
.success-dialog .dialog-actions { justify-content: stretch; }
.success-dialog .dialog-actions .btn { flex: 1 1 0; min-height: 48px; }

/* v10.0 (Update 14): the stores on Home — a square picture on its own (rounded, soft shadow, no card), two side by side;
   the name (bold, one line) and the count below it on the page's own background. Replaces 8.0's wide banner. */
.store-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (min-width: 600px) { .store-grid { grid-template-columns: repeat(3, 1fr); } }
.store-tile { display: flex; flex-direction: column; align-items: stretch; min-width: 0; padding: 0; border: 0; background: transparent;
  color: var(--text); font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.store-pic { position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1; border-radius: 16px; overflow: hidden;
  background: var(--primary); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12); }
.store-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.store-initials { color: #fff; font-weight: 800; font-size: 2.1rem; letter-spacing: 0.02em; }
.store-tile .title { display: block; padding: 8px 2px 1px; font-weight: 700; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.store-tile .sub { display: block; padding: 0 2px 4px; font-size: 0.78rem; color: var(--muted); }
.store-tile[aria-pressed="true"] .store-pic, .store-tile:focus-visible .store-pic { outline: 3px solid var(--primary); outline-offset: 2px; }
.store-tile:focus-visible { outline: none; }
.store-tile:active .store-pic { transform: scale(0.98); }
.store-tile[aria-busy="true"] { opacity: 0.7; cursor: progress; }
.store-tile[disabled]:not([aria-busy]) { opacity: 0.55; cursor: not-allowed; }

/* ---------- v10.0 (Update 13) the cart: 🛒 with its number, the cart page and the Review before Pay ---------- */
.cart-count { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; box-sizing: border-box; border-radius: 999px;
  background: #c2410c; color: #fff; font-size: 0.7rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.product-actions { display: flex; gap: 0.5rem; }
.product-actions .btn { white-space: nowrap; }
.cart-place { margin: -0.2rem 0 0.9rem; }
.cart-store { padding: 0.85rem 0.9rem; }
.cart-store + .cart-store { margin-top: 0.85rem; }
.cart-store-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; margin-bottom: 0.35rem; }
.cart-store-head h2 { margin: 0; font-size: 1.1rem; }
.cart-store-head .amt { font-weight: 800; }
.cart-delivery { border-top: 1px solid var(--border); padding: 0.7rem 0 0.4rem; }
.cart-delivery-head { display: flex; align-items: center; gap: 0.5rem; }
.cart-delivery-head .chosen-pills { margin: 0; flex: 1; min-width: 0; }
.cart-delivery-head .amt { font-weight: 700; white-space: nowrap; }
.cart-tick { width: 22px; height: 22px; flex: none; accent-color: var(--primary); margin: 0; }
.icon-btn { width: 40px; height: 40px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); cursor: pointer; padding: 0; }
.icon-btn:hover { background: var(--surface-2); color: var(--danger); }
.icon-btn .icon { width: 20px; height: 20px; }
.cart-line { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 0.25rem 0.6rem; padding: 0.4rem 0 0.4rem 1.9rem; }
.cart-line .name { font-weight: 600; font-size: 0.95rem; }
.cart-line .each { font-size: 0.82rem; color: var(--muted); }
.cart-line .amt { min-width: 3.4rem; text-align: right; font-weight: 600; }
.cart-line .stepper button { width: 32px; height: 34px; font-size: 1.15rem; }
.cart-line .stepper output { min-width: 1.5rem; font-size: 0.95rem; }
.cart-line .qty { color: var(--muted); }
.cart-off { opacity: 0.6; }
.struck { text-decoration: line-through; text-decoration-thickness: 1.5px; color: var(--muted); }
.old-price { text-decoration: line-through; color: var(--muted); margin-right: 0.3rem; }
.cart-why { display: inline-block; font-size: 0.74rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 999px; background: var(--danger-soft); color: var(--danger);
  text-decoration: none; white-space: nowrap; }
.cart-note { grid-column: 1 / -1; font-size: 0.8rem; color: var(--accent-strong, #9a3412); }
.cart-clear { display: block; margin: 1rem auto 0; }
.cart-booked-list { list-style: none; margin: 0.75rem 0 0; padding: 0; text-align: left; border-top: 1px solid var(--border); }
.cart-booked-list li { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.45rem 0; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.cart-booked-list .no { color: var(--danger); }

/* v11.0: the first screen's Install button (phone browser only) */
.install-btn { display: flex; align-items: center; justify-content: center; gap: 0.5rem; flex-wrap: wrap; background: var(--accent, #c2410c); color: #fff; border: 0; margin: 0 0 1rem; }
.install-btn small { flex-basis: 100%; font-weight: 400; opacity: 0.9; }
.install-btn .icon { width: 20px; height: 20px; }
.install-tip-link { display: flex; flex-direction: column; gap: 0.15rem; color: inherit; text-decoration: none; flex: 1; }

/* ---------- v11.0 (from app-mode.css): the notifications card, the Turn on banner, the in-page notification card, the 🔔 number —
   the store apps and the web app (web notifications) alike ---------- */
/* v7.0 "Your notifications": one card with its own colour (deep indigo to violet — clearly not the orange app bar or the
   green buttons), three ticks and one button. The same in light and dark: white text on the colour. */
.choices-card { margin: 0 0 1rem; padding: 1rem 1rem 1.1rem; border-radius: 18px; color: #fff;
  background: linear-gradient(135deg, #3730a3 0%, #6d28d9 100%); box-shadow: 0 8px 24px rgba(67, 56, 202, .28); }
.choices-head { display: flex; gap: 0.8rem; align-items: flex-start; }
.choices-bell { width: 44px; height: 44px; flex: none; border-radius: 50%; background: rgba(255,255,255,.18); display: grid; place-items: center; }
.choices-bell svg { width: 24px; height: 24px; }
.choices-card h2 { margin: 0.1rem 0 0.2rem; font-size: 1.2rem; color: #fff; }
.choices-card p { margin: 0; font-size: 0.88rem; line-height: 1.35; color: rgba(255,255,255,.9); }
.choices-list { display: grid; gap: 0.5rem; margin: 0.9rem 0 1rem; }
.choice-row { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.75rem 0.8rem; border-radius: 12px; cursor: pointer;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); min-height: var(--tap, 48px); }
.choice-row:has(input:checked) { background: rgba(255,255,255,.22); border-color: rgba(255,255,255,.45); }
.choice-row input { width: 24px; height: 24px; margin: 0.1rem 0 0; flex: none; accent-color: #fbbf24; }
.choice-text { display: grid; gap: 0.15rem; }
.choice-text b { font-size: 1rem; }
.choice-text span { font-size: 0.85rem; color: rgba(255,255,255,.88); }
.btn.choices-save { width: 100%; min-height: 48px; border: 0; border-radius: 999px; background: #fff; color: #3730a3; font-weight: 800; font-size: 1rem; }
.btn.choices-save:disabled { opacity: .7; }
/* Notification arriving while the app is open. */
.app-push-toast { position: fixed; left: 0.75rem; right: 0.75rem; top: calc(env(safe-area-inset-top) + 0.5rem); z-index: 70; background: #fff;
  border-radius: 14px; box-shadow: 0 6px 24px rgba(0,0,0,.18); padding: 0.7rem 0.9rem; display: block; color: inherit; text-decoration: none; }
.app-push-toast b { display: block; }
.app-bar-count, .app-bar-host .gear-count { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; box-sizing: border-box; border-radius: 999px;
  background: #fff; color: #c2410c; font-size: 0.7rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
/* ---------- v6.0 notifications: the "off" banner on Home ---------- */
.app-off-banner { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.5rem 0.5rem 0.8rem; margin-bottom: 0.9rem; border-radius: 12px;
  background: #fff4ec; color: #7c2d12; font-size: 0.9rem; }
.app-off-banner .icon { width: 20px; height: 20px; flex: none; }
.app-off-banner span { flex: 1; font-weight: 600; }
.app-off-x { width: 36px; height: 36px; border: 0; background: transparent; color: inherit; font-size: 1.3rem; line-height: 1; cursor: pointer; border-radius: 50%; }
.bell-link { position: relative; }
.header-actions .bell-link .app-bar-count { position: absolute; top: -2px; right: -4px; }
.web-push-state.on { color: var(--success, #1b7a3a); }
.web-push-state { margin: 0.25rem 0 0.75rem; }

/* 12.0 (Update 36): "Verify to continue" — one row per gate in force */
.verify-table { display: grid; gap: 0.75rem; }
.verify-row { background: var(--surface, #fff); border-radius: 16px; padding: 0.9rem 1rem; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.verify-head { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-bottom: 0.35rem; }
.verify-contact { font-size: 1.1rem; font-weight: 600; margin: 0.2rem 0 0.6rem; }
.verify-code { display: flex; gap: 0.5rem; align-items: flex-end; margin-top: 0.5rem; }
.verify-code .field { flex: 1; margin: 0; }
.v-status { font-size: 0.85rem; font-weight: 700; white-space: nowrap; }
.v-status.ok { color: #1b7a3a; }
.v-status.wait { color: #8a5a00; }
.v-status.no { color: #b3261e; }
.btn.is-grey:disabled { background: #d8d4c8; border-color: #d8d4c8; color: #6b6f68; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* 15.1: the log-in page, Option A — the full logo large and centred at the top; no header bar, no tagline, no welcome picture */
.login-a #app-header { display: none; }
.login-a main.page { padding-top: max(2.5rem, env(safe-area-inset-top)); }
.login-logo { display: flex; justify-content: center; padding: 0.5rem 0 1.75rem; }
.login-logo img { width: 264px; max-width: 80vw; height: auto; }
.login-a #login-form .btn.primary { border-radius: 999px; }
.login-a .card.center .btn.outline { border-radius: 999px; border-width: 2px; font-weight: 700; }
