:root {
  --yellow: #FFC400; --yellow-hi: #FFD233; --yellow-soft: #FFF7D6;
  --charcoal: #111827; --panel: #1F2937; --panel-line: #374151;
  --ink: #1F2937; --muted: #4B5563; --soft: #F4F5F7; --field: #F8F9FA;
  --cream: #FFFBEB; --cream-line: #FDE68A; --line: #E2E5E9; --divider: #EEF0F3;
  --on-dark: #D1D5DB; --on-dark-muted: #9CA3AF; --amber: #854D0E;
  --green: #16A34A; --green-soft: #DCFCE7; --green-text: #166534;
  --red: #DC2626; --red-soft: #FEE2E2; --red-text: #991B1B;
  --blue-soft: #DBEAFE; --blue-text: #1E40AF;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--soft); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--charcoal); font-weight: 600; }
a:hover { color: var(--amber); }
button, input, select, textarea { font: inherit; color: inherit; }
/* Two-tone focus ring: a charcoal ring (over 15:1 on white, cream and grey) with a yellow band
   inside it, so it shows on light surfaces and around yellow or charcoal controls. On charcoal
   surfaces the colours swap: a yellow ring (about 11:1) with a charcoal band. */
:focus-visible { outline: 3px solid var(--charcoal); outline-offset: 2px; box-shadow: 0 0 0 2px var(--yellow); border-radius: 6px; }
.top :focus-visible, .auth-side :focus-visible, .status-hero :focus-visible, .hero-card :focus-visible,
.co-summary :focus-visible, .batch-hero :focus-visible, .toast :focus-visible { outline-color: var(--yellow); box-shadow: 0 0 0 2px var(--charcoal); }
/* Headings get focus after a screen change (for keyboard and screen readers); they need no ring. */
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus, main[tabindex="-1"]:focus { outline: none; box-shadow: none; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.boot { min-height: 100vh; display: flex; gap: 14px; align-items: center; justify-content: center; color: var(--muted); font-weight: 600; }
.boot.fail { flex-direction: column; text-align: center; padding: 24px 16px; color: var(--charcoal); }
.boot.fail p { margin: 0; max-width: 420px; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--charcoal); animation: spin 0.8s linear infinite; display: inline-block; flex: none; }
.btn .spinner { width: 18px; height: 18px; border-color: rgba(17,24,39,0.25); border-top-color: var(--charcoal); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; min-height: 44px; }
.brand-mark { width: 42px; height: 42px; border-radius: 12px; background: var(--yellow); display: grid; place-items: center; color: var(--charcoal); flex: none; }
.brand-name { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name strong { font-size: 19px; font-weight: 800; letter-spacing: -0.2px; }
.brand-name strong span { font-weight: 500; }
.brand-name small { font-size: 10px; letter-spacing: 2.4px; color: var(--on-dark-muted); font-weight: 700; }

/* ---------- Buttons and fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 24px; border-radius: 999px; font-weight: 700; font-size: 16px; text-decoration: none; border: 0; cursor: pointer; transition: background 0.15s, border-color 0.15s, transform 0.15s; }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn-primary { background: var(--yellow); color: var(--charcoal); }
.btn-primary:hover:not(:disabled) { background: var(--yellow-hi); color: var(--charcoal); }
.btn-dark { background: var(--charcoal); color: #FFFFFF; }
.btn-dark:hover:not(:disabled) { background: var(--panel); color: #FFFFFF; }
.btn-outline { background: #FFFFFF; border: 1px solid var(--line); color: var(--charcoal); }
.btn-outline:hover:not(:disabled) { border-color: #9CA3AF; color: var(--charcoal); }
.btn-block { width: 100%; }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 15px; }
.link-btn { background: none; border: 0; padding: 8px 0; min-height: 44px; font-weight: 600; color: var(--charcoal); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field > label, .label { font-size: 14px; font-weight: 600; color: var(--charcoal); }
.field .opt { color: var(--muted); font-weight: 500; }
.input, select.input, textarea.input { width: 100%; min-height: 52px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--field); font-size: 16px; color: var(--charcoal); transition: border-color 0.15s, background 0.15s; }
textarea.input { padding: 14px 16px; min-height: 110px; resize: vertical; line-height: 1.5; }
.input:hover { border-color: #C9CED6; }
.input:focus { outline: none; border-color: var(--charcoal); background: #FFFFFF; box-shadow: 0 0 0 3px rgba(255,196,0,0.35); }
.input[aria-invalid="true"] { border-color: var(--red); background: #FFF8F8; }
.input:disabled { opacity: 0.75; }
.help { font-size: 13px; color: var(--muted); }
.err { font-size: 13px; color: var(--red-text); font-weight: 600; display: none; }
.err.on { display: block; }
.pw { position: relative; }
.pw .input { padding-right: 56px; }
.pw button { position: absolute; right: 4px; top: 4px; width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.pw button:hover { color: var(--charcoal); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--ink); cursor: pointer; padding: 4px 0; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--charcoal); flex: none; }
/* At least 44 px tall to tap (sign-in links and the remember-me box). */
.tap { display: inline-flex; align-items: center; min-height: 44px; }
.check.tap { display: flex; padding: 0; }
.check.tap input { margin: 0; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.banner { border-radius: 14px; padding: 14px 16px; font-size: 14px; font-weight: 600; display: none; }
.banner.on { display: block; }
.banner.error { background: var(--red-soft); color: var(--red-text); }
.banner.ok { background: var(--green-soft); color: var(--green-text); }
.banner.info { background: var(--yellow-soft); color: var(--amber); }

/* ---------- Auth (split screen) ---------- */
.auth { min-height: 100vh; display: flex; flex-wrap: wrap; background: #FFFFFF; }
.auth-side { flex: 1 1 460px; background: var(--charcoal); color: #FFFFFF; padding: 40px 48px; display: flex; flex-direction: column; gap: 40px; position: relative; overflow: hidden; }
.auth-side::after { content: ""; position: absolute; right: -200px; bottom: -220px; width: 560px; height: 560px; border-radius: 50%; border: 80px solid rgba(255,196,0,0.07); pointer-events: none; }
.auth-side .eyebrow { color: var(--yellow); font-size: 13px; letter-spacing: 2px; font-weight: 700; }
.auth-side h1 { margin: 14px 0 14px; font-size: clamp(34px, 4vw, 48px); line-height: 1.06; letter-spacing: -1.2px; font-weight: 900; }
.auth-side h1 em { font-style: normal; color: var(--yellow); }
.auth-side p { margin: 0; color: var(--on-dark); font-size: 17px; max-width: 460px; }
.auth-points { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; position: relative; z-index: 1; }
.auth-points li { display: flex; gap: 14px; align-items: center; color: #E5E7EB; font-size: 15px; }
.auth-points .ic { width: 40px; height: 40px; border-radius: 12px; background: rgba(255,196,0,0.14); color: var(--yellow); display: grid; place-items: center; flex: none; }
.auth-foot { margin-top: auto; font-size: 13px; color: var(--on-dark-muted); position: relative; z-index: 1; }
.auth-side .auth-foot a { color: var(--on-dark); }
.auth-foot-m { display: none; }
.auth-main { flex: 1 1 460px; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 20px; }
.auth-card h2 { margin: 0; font-size: 32px; letter-spacing: -0.6px; font-weight: 800; color: var(--charcoal); }
.auth-card .sub { margin: -10px 0 0; color: var(--muted); }
.auth-card .eyebrow { font-size: 12px; letter-spacing: 2px; font-weight: 700; color: var(--amber); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.divider::before, .divider::after { content: ""; height: 1px; background: var(--divider); flex: 1; }
.strength { font-size: 13px; font-weight: 600; }
.strength.s0 { color: var(--red-text); } .strength.s1 { color: var(--amber); } .strength.s2 { color: var(--green-text); }
.ea-pill { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; background: var(--yellow-soft); color: var(--amber); font-weight: 700; font-size: 13px; padding: 6px 12px; border-radius: 999px; }

/* ---------- Signed-in shell ---------- */
.top { background: var(--charcoal); color: #FFFFFF; }
.top-in { max-width: 1120px; margin: 0 auto; padding: 0 24px; min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.who { display: flex; align-items: center; gap: 12px; }
.who .avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--yellow); color: var(--charcoal); display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.who .meta { display: flex; flex-direction: column; line-height: 1.2; }
.who .meta b { font-size: 14px; }
.who .meta span { font-size: 12px; color: var(--on-dark-muted); }
.btn-ghost-dark { background: transparent; color: var(--on-dark); border: 1px solid #4B5563; }
.btn-ghost-dark:hover { color: #FFFFFF; border-color: #9CA3AF; }
.page { max-width: 1120px; margin: 0 auto; padding: 32px 24px 64px; }
.card { background: #FFFFFF; border: 1px solid var(--line); border-radius: 22px; padding: 28px; }
.eyebrow { font-size: 12px; letter-spacing: 2px; font-weight: 700; color: var(--amber); text-transform: uppercase; }
h1.title { margin: 8px 0 8px; font-size: clamp(28px, 3.4vw, 38px); letter-spacing: -0.8px; font-weight: 800; color: var(--charcoal); line-height: 1.12; }
.intro { margin: 0; color: var(--muted); font-size: 16px; max-width: 640px; }

/* ---------- Onboarding ---------- */
.ob { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; margin-top: 24px; }
.rail { flex: 1 1 240px; max-width: 100%; display: flex; flex-direction: column; gap: 6px; }
.rail-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: transparent; border: 0; text-align: left; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 15px; min-height: 52px; width: 100%; }
.rail-item:hover:not(:disabled) { background: #FFFFFF; }
.rail-item:disabled { cursor: default; opacity: 0.55; }
.rail-item .n { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #D1D5DB; display: grid; place-items: center; font-size: 13px; font-weight: 800; flex: none; color: var(--muted); }
.rail-item.done .n { background: var(--green); border-color: var(--green); color: #FFFFFF; }
.rail-item.cur { background: #FFFFFF; color: var(--charcoal); box-shadow: 0 1px 0 var(--line); }
.rail-item.cur .n { background: var(--yellow); border-color: var(--yellow); color: var(--charcoal); }
.ob-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.note { background: var(--cream); border: 1px solid var(--cream-line); border-radius: 16px; padding: 14px 16px; font-size: 14px; color: var(--amber); }
.section-title { margin: 6px 0 0; font-size: 17px; font-weight: 800; color: var(--charcoal); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: #FFFFFF; font-weight: 600; font-size: 15px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.chip:hover { border-color: #9CA3AF; }
.chip[aria-pressed="true"], .chip:has(input:checked) { background: var(--charcoal); border-color: var(--charcoal); color: #FFFFFF; }
.chip[aria-pressed="true"]::before, .chip:has(input:checked)::before { content: "✓"; color: var(--yellow); font-weight: 800; }
/* Controls drawn by a label around a visually hidden input (daily-order chips, document upload):
   the ring goes on the label, because the 1px input clips its own outline. */
.chip:has(input:focus-visible), .btn:has(> input[type="file"]:focus-visible) { outline: 3px solid var(--charcoal); outline-offset: 2px; box-shadow: 0 0 0 2px var(--yellow); }
.btn.is-busy { opacity: 0.6; cursor: default !important; }
.hours { display: grid; gap: 8px; }
.day { display: grid; grid-template-columns: 150px 1fr; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 14px; background: var(--field); border: 1px solid var(--divider); }
.day .times { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.day .times .input { min-height: 44px; width: 130px; padding: 0 10px; }
.day .closed, .day .next-day { color: var(--muted); font-size: 14px; font-weight: 600; }
.toggle { display: flex; align-items: center; gap: 10px; font-weight: 700; cursor: pointer; }
.toggle input { width: 20px; height: 20px; accent-color: var(--charcoal); }
.copy-row { display: flex; justify-content: flex-end; }
.radio-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.radio-card { border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; gap: 12px; cursor: pointer; background: #FFFFFF; }
.radio-card:has(input:checked) { border-color: var(--charcoal); box-shadow: 0 0 0 2px var(--charcoal) inset; }
.radio-card input { width: 20px; height: 20px; accent-color: var(--charcoal); margin: 2px 0 0; flex: none; }
.radio-card b { display: block; color: var(--charcoal); }
.radio-card span { font-size: 14px; color: var(--muted); }
.doc { border: 1px solid var(--line); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 12px; background: #FFFFFF; }
.doc-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.doc-head b { color: var(--charcoal); }
.badge { display: inline-flex; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--soft); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--green-soft); color: var(--green-text); }
.badge.req { background: var(--red-soft); color: var(--red-text); }
.doc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.doc-state { font-size: 14px; color: var(--muted); font-weight: 600; }
.doc-state.ok { color: var(--green-text); }
.bar { height: 8px; border-radius: 999px; background: var(--divider); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--yellow); width: 0; transition: width 0.2s; }
.actions { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.actions .right { display: flex; gap: 12px; margin-left: auto; flex-wrap: wrap; }
.review { display: grid; gap: 16px; }
.review-group { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.review-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; background: var(--field); border-bottom: 1px solid var(--divider); }
.review-head b { color: var(--charcoal); }
.review dl { margin: 0; padding: 6px 18px 12px; display: grid; grid-template-columns: 220px 1fr; gap: 10px 18px; }
.review dt { color: var(--muted); font-size: 14px; }
.review dd { margin: 0; color: var(--charcoal); font-size: 15px; white-space: pre-line; word-break: break-word; }

/* ---------- Status / early access ---------- */
.status { max-width: 760px; margin: 24px auto 0; display: flex; flex-direction: column; gap: 20px; }
.status-hero { background: var(--charcoal); color: #FFFFFF; border-radius: 26px; padding: 36px; display: flex; flex-direction: column; gap: 12px; position: relative; overflow: hidden; }
.status-hero::after { content: ""; position: absolute; right: -120px; top: -140px; width: 360px; height: 360px; border-radius: 50%; border: 60px solid rgba(255,196,0,0.08); }
.status-hero .eyebrow { color: var(--yellow); }
.status-hero h1 { margin: 0; font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -0.8px; line-height: 1.1; position: relative; }
.status-hero p { margin: 0; color: var(--on-dark); font-size: 16px; max-width: 560px; position: relative; }
.pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: 13px; position: relative; }
.pill.wait { background: rgba(255,196,0,0.16); color: var(--yellow); }
.pill.good { background: rgba(22,163,74,0.2); color: #86EFAC; }
.pill.bad { background: rgba(220,38,38,0.2); color: #FCA5A5; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.next { display: grid; gap: 16px; }
.next-item { display: flex; gap: 14px; }
.next-item .n { width: 34px; height: 34px; border-radius: 12px; background: var(--charcoal); color: var(--yellow); display: grid; place-items: center; font-weight: 800; flex: none; }
.next-item b { display: block; color: var(--charcoal); }
.next-item span { color: var(--muted); font-size: 15px; }
.next-item .verify { display: block; margin-top: 6px; }
.next-item .verify .link-btn { min-height: 24px; padding: 2px 0; }
.timer { display: flex; gap: 10px; position: relative; }
.unit { background: rgba(255,255,255,0.06); border: 1px solid var(--panel-line); border-radius: 16px; min-width: 84px; padding: 12px 8px 10px; text-align: center; }
.unit .num { display: block; font-size: 30px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.unit .lbl { display: block; margin-top: 6px; font-size: 11px; letter-spacing: 1.4px; font-weight: 700; color: var(--on-dark-muted); }
.unit.y .num { color: var(--yellow); }
.message { background: var(--cream); border: 1px solid var(--cream-line); border-radius: 16px; padding: 16px 18px; white-space: pre-line; color: var(--ink); }

/* ---------- Dashboard ---------- */
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.hero-card { margin-top: 24px; background: var(--charcoal); color: #FFFFFF; border-radius: 26px; padding: 30px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.hero-card .eyebrow { color: var(--on-dark); }
.hero-card h2 { margin: 8px 0 6px; font-size: 30px; letter-spacing: -0.5px; }
.hero-card p { margin: 0; color: var(--on-dark); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.stat { background: #FFFFFF; border: 1px solid var(--line); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.stat .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; }
.stat b { font-size: 32px; font-weight: 900; color: var(--charcoal); line-height: 1.1; }
.stat span { color: var(--muted); font-size: 14px; font-weight: 600; }
.dash-grid { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 20px; align-items: flex-start; }
.dash-grid > .main { flex: 999 1 520px; min-width: 0; }
.dash-grid > .side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 520px; }
th { text-align: left; font-size: 12px; letter-spacing: 0.8px; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--divider); text-transform: uppercase; }
td { padding: 14px 12px; border-bottom: 1px solid var(--divider); color: var(--ink); }
tr:last-child td { border-bottom: 0; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; }
.st { display: inline-flex; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.st.pub { background: #FEF3C7; color: var(--amber); }
.st.del { background: #FFEDD5; color: #9A3412; }
.empty { text-align: center; padding: 28px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); }
.empty .ic { width: 56px; height: 56px; border-radius: 16px; background: var(--yellow-soft); display: grid; place-items: center; color: var(--charcoal); }
.empty b { color: var(--charcoal); font-size: 17px; }
.kv { display: grid; gap: 10px; margin: 0; }
.kv div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--charcoal); font-weight: 600; text-align: right; }

/* ---------- Create orders ---------- */
.co-grid { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; margin-top: 24px; }
.co-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.co-side { flex: 1 1 300px; min-width: 0; position: sticky; top: 16px; }
.co-summary { background: var(--charcoal); color: #FFFFFF; border-radius: 22px; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.co-sum-row { display: flex; justify-content: space-between; gap: 16px; font-size: 15px; border-bottom: 1px solid var(--panel-line); padding-bottom: 12px; }
.co-sum-row span { color: var(--on-dark); flex: none; }
.co-sum-row b { text-align: right; overflow-wrap: anywhere; }
.order-card { background: var(--cream); border: 1px solid var(--cream-line); border-radius: 22px; padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.order-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--cream-line); }
.order-head h2 { margin: 0; font-size: 22px; font-weight: 800; color: var(--charcoal); }
.order-n { width: 34px; height: 34px; border-radius: 50%; background: var(--charcoal); color: var(--yellow); display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; }
.sub-title { margin: 4px 0 0; font-size: 16px; font-weight: 800; color: var(--charcoal); }
.order-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.order-grid.addr { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.order-grid .span2 { grid-column: span 2; }
.order-card .input { background: #FFFFFF; }
.order-card textarea.input { min-height: 72px; }
.ok-text { color: var(--green-text); font-weight: 600; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { background: #FFFFFF; color: var(--red-text); }
.add-order { min-height: 64px; border-radius: 20px; border: 2px dashed #C9CED6; background: transparent; font-weight: 700; font-size: 16px; color: var(--charcoal); display: flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; }
.add-order:hover:not(:disabled) { border-color: var(--charcoal); background: #FFFFFF; }
.add-order:disabled { opacity: 0.5; cursor: default; }

/* ---------- Dialogs and toast ---------- */
dialog.dlg { border: 0; border-radius: 24px; padding: 28px; width: min(520px, calc(100% - 32px)); box-shadow: 0 30px 90px rgba(0,0,0,0.35); color: var(--ink); }
dialog.dlg::backdrop { background: rgba(11, 18, 32, 0.6); }
dialog.dlg h2 { margin: 0 0 12px; font-size: 22px; color: var(--charcoal); letter-spacing: -0.3px; }
dialog.dlg p { margin: 0 0 12px; color: var(--muted); }
dialog.dlg .cols { color: var(--charcoal); font-size: 14px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.addr-box { background: var(--field); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; color: var(--charcoal) !important; font-weight: 600; }
.addr-box.found { background: var(--green-soft); border-color: #BBF7D0; }
.choices { display: grid; gap: 8px; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--charcoal); box-shadow: 0 0 0 2px var(--charcoal) inset; }
.choice input { width: 18px; height: 18px; accent-color: var(--charcoal); margin-top: 2px; flex: none; }
.stages { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; gap: 10px; }
.stages li { display: flex; align-items: center; gap: 12px; color: var(--muted); font-weight: 600; }
.stages .st-ic { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #D1D5DB; flex: none; box-sizing: border-box; }
.stages li.cur { color: var(--charcoal); }
.stages li.cur .st-ic { border-color: var(--line); border-top-color: var(--charcoal); animation: spin 0.8s linear infinite; }
.stages li.done { color: var(--green-text); }
.stages li.done .st-ic { background: var(--green); border-color: var(--green); position: relative; }
.stages li.done .st-ic::after { content: "✓"; color: #FFFFFF; font-size: 12px; font-weight: 800; position: absolute; inset: 0; display: grid; place-items: center; }
.stage-detail { color: var(--charcoal) !important; font-weight: 600; min-height: 1.5em; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); background: var(--charcoal); color: #FFFFFF; padding: 14px 20px; border-radius: 14px; font-weight: 600; box-shadow: 0 16px 40px rgba(0,0,0,0.3); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 100; max-width: calc(100% - 32px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
/* Connection notice: in the page flow under the header, never over it (Sign out and the focused
   control stay visible). On the sign-in screens it sits at the top of the card. */
.conn-notice { background: var(--yellow-soft); color: var(--amber); border-bottom: 1px solid var(--cream-line); font-size: 14px; font-weight: 600; }
.conn-in { max-width: 1120px; margin: 0 auto; padding: 0 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 0 14px; }
.conn-in > span { padding: 10px 0; }
.auth-card .conn-notice { border: 1px solid var(--cream-line); border-radius: 14px; }
.auth-card .conn-in { padding: 0 16px; }

/* ---------- Published batch ---------- */
.batch-hero { margin-top: 12px; background: var(--charcoal); color: #FFFFFF; border-radius: 26px; padding: 30px; display: flex; flex-direction: column; gap: 10px; }
.batch-hero h1 { margin: 0; font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -0.6px; }
.batch-hero p { margin: 0; color: var(--on-dark); }
.batch-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 10px; }
.batch-facts div { background: rgba(255,255,255,0.06); border: 1px solid var(--panel-line); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.batch-facts span { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--on-dark-muted); font-weight: 700; }
.batch-facts b { font-size: 17px; }
.pdf-ok { color: #86EFAC; } .pdf-warn { color: var(--yellow); } .pdf-bad { color: #FCA5A5; }
.stops { list-style: none; margin: 0; padding: 0; display: grid; }
.stops li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--divider); align-items: flex-start; }
.stops li:last-child { border-bottom: 0; }
.stop-n { width: 32px; height: 32px; border-radius: 50%; background: var(--charcoal); color: var(--yellow); display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.stop-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.stop-main b { color: var(--charcoal); }
.stop-main span { color: var(--muted); font-size: 14px; }
.stop-note { background: var(--field); border-left: 3px solid var(--yellow); padding: 4px 8px; border-radius: 6px; margin-top: 4px; }
.stop-side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; font-size: 13px; color: var(--muted); flex: none; }
.stop-side .code { color: var(--charcoal); font-size: 15px; }
.row-link { cursor: pointer; }
.row-link:hover td, .row-link:focus-within td { background: var(--field); }
.st.ok { background: var(--green-soft); color: var(--green-text); }

@media (max-width: 860px) {
  .order-grid, .order-grid.addr { grid-template-columns: minmax(0, 1fr); }
  .order-grid .span2 { grid-column: auto; }
  .co-side { position: static; }
  .batch-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .auth-side { padding: 32px 24px; min-height: auto; gap: 28px; }
  /* Phones: no feature list; the contact, Terms and Privacy line moves under the form. */
  .auth-points, .auth-side .auth-foot { display: none; }
  .auth-foot-m { display: block; flex: 1 1 100%; margin: 0; padding: 0 24px 24px; text-align: center; color: var(--muted); }
  .auth-foot-m a { display: inline-flex; align-items: center; min-height: 44px; }
  .grid2, .grid3, .radio-cards { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: minmax(0, 1fr); }
  .rail { flex-direction: row; overflow-x: auto; gap: 8px; padding-bottom: 4px; }
  .rail-item { width: auto; flex: none; }
  .rail-item .t { display: none; }
  .rail-item.cur .t { display: inline; }
  .day { grid-template-columns: minmax(0, 1fr); }
  .review dl { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .review dd { margin-bottom: 10px; }
  .card { padding: 20px; }
  .page { padding: 24px 16px 56px; }
  .top-in, .conn-in { padding: 0 16px; }
  .who .meta { display: none; }
  .status-hero { padding: 26px 22px; }
  .unit { min-width: 0; flex: 1; }
}
/* ---------- Partner menu (approved partners): a side column, a row of tabs on phones ---------- */
.top-in.wide { max-width: 1360px; }
.app-body { max-width: 1360px; margin: 0 auto; display: flex; align-items: flex-start; }
.app-body > .page { flex: 1; min-width: 0; max-width: 1120px; margin: 0; }
.side-nav { width: 236px; flex: none; position: sticky; top: 0; display: flex; flex-direction: column; gap: 4px; padding: 28px 8px 24px 24px; max-height: 100vh; overflow-y: auto; }
.nav-item { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 14px; border-radius: 14px; color: var(--muted); font-weight: 600; font-size: 15px; text-decoration: none; }
.nav-item:hover { background: #FFFFFF; color: var(--charcoal); }
.nav-item.cur { background: var(--charcoal); color: #FFFFFF; }
.nav-item.cur svg { color: var(--yellow); }
.nav-sec { font-size: 11px; letter-spacing: 1.8px; font-weight: 700; color: var(--muted); padding: 18px 14px 6px; }
.nav-biz { margin-top: 18px; padding: 14px; border-radius: 16px; background: #FFFFFF; border: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.nav-biz .avatar { width: 36px; height: 36px; border-radius: 10px; background: var(--yellow); color: var(--charcoal); display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.nav-biz > span:last-child { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.nav-biz b { font-size: 14px; color: var(--charcoal); overflow-wrap: anywhere; }
.nav-biz .ok-text { font-size: 12px; }

/* ---------- Test-mode sample data ---------- */
mark.tag-sample { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; background: var(--blue-soft); color: var(--blue-text); font-size: 11px; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase; vertical-align: middle; white-space: nowrap; line-height: 1.6; }
.sample-note { margin: 0 0 16px; background: var(--blue-soft); color: var(--blue-text); border-radius: 14px; padding: 10px 14px; font-size: 14px; font-weight: 600; }
.sample-note mark.tag-sample { background: #FFFFFF; }

/* ---------- Dashboard ---------- */
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.next-card { margin-top: 20px; background: var(--panel); color: #FFFFFF; border-radius: 24px; padding: 24px 26px; display: flex; flex-direction: column; gap: 20px; }
.next-card :focus-visible { outline-color: var(--yellow); box-shadow: 0 0 0 2px var(--charcoal); }
.next-top { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.next-top .eyebrow { color: var(--yellow); }
.next-title { display: block; font-size: 22px; font-weight: 800; margin: 6px 0 4px; letter-spacing: -0.3px; }
.next-top p { margin: 0; color: var(--on-dark); }
.tracker { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tracker li { display: flex; align-items: center; gap: 10px; color: var(--on-dark-muted); font-weight: 600; font-size: 14px; }
.tracker .dot { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--panel-line); display: grid; place-items: center; font-size: 13px; font-weight: 800; flex: none; }
.tracker li.done { color: #FFFFFF; }
.tracker li.done .dot { background: var(--green); border-color: var(--green); color: #FFFFFF; }
.tracker li.cur { color: var(--yellow); }
.tracker li.cur .dot { border-color: var(--yellow); color: var(--yellow); }
.stats.stats4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat small { font-size: 12px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head .section-title { margin: 0; }
.card-head a { font-size: 14px; }
.pk-addr { margin: 0; color: var(--charcoal); font-weight: 600; line-height: 1.5; }
.pk-note { display: block; margin: 10px 0 0; font-size: 14px; color: var(--ink); }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.feed li { display: flex; gap: 12px; align-items: flex-start; }
.feed .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--yellow); margin-top: 6px; flex: none; }
.feed li > div { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.feed b { font-size: 14px; color: var(--charcoal); }
.feed li > div > span { font-size: 13px; color: var(--muted); }
.st.draft { background: var(--soft); color: var(--muted); border: 1px dashed #C9CED6; }
.st.next { background: var(--yellow-soft); color: var(--amber); }

/* ---------- Create orders extras ---------- */
.import-box { background: #FFFFFF; border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.import-box b { color: var(--charcoal); }
.import-box > span { color: var(--muted); font-size: 14px; }
.import-box .link-btn { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; }
.order-tools { display: flex; align-items: center; gap: 4px; }
.collapse-btn { padding: 8px 10px; font-size: 14px; }
.order-sum { margin: 0; display: flex; flex-direction: column; gap: 2px; }
.order-sum b { color: var(--charcoal); }
.order-sum span { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.order-body { display: flex; flex-direction: column; gap: 14px; }
.co-sum-row.col { flex-direction: column; gap: 8px; }
.co-sum-row.col label { color: var(--on-dark); font-size: 15px; }
.co-summary select.input { background: var(--panel); color: #FFFFFF; border-color: var(--panel-line); min-height: 46px; }
.sum-note { font-size: 12px; color: var(--on-dark-muted); }
.link-btn.on-dark { color: var(--on-dark); align-self: center; font-size: 14px; }
/* "Copy tracking link" (2026-10-28): under the order code on the batch page and in the Deliveries table. */
.track-btn { font-size: 13px; white-space: nowrap; }
td .track-btn { display: block; min-height: 32px; padding: 4px 0; }

/* ---------- Batch page extras ---------- */
.hero-status { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--on-dark); font-size: 14px; }
.progress { height: 8px; border-radius: 999px; background: var(--divider); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--green); border-radius: 999px; }
.prog-text { font-size: 14px; font-weight: 700; color: var(--green-text); }
.stop-n.done { background: var(--green); color: #FFFFFF; }
.stops li.is-next { background: var(--cream); border-radius: 14px; padding: 14px 12px; margin: 0 -12px; }
.stop-st { font-weight: 700; font-size: 13px; color: var(--muted); }
.stop-st.ok { color: var(--green-text); }
.stop-st.next { color: var(--amber); }
/* Courier v2 order and batch states (status.js): couldn't deliver, returned, not found at pickup. */
.st.warn { background: var(--red-soft); color: var(--red-text); }
.stop-st.warn { color: var(--red-text); }
.stop-st.del { color: #9A3412; }
.stop-st .link-btn { padding: 0; min-height: 24px; font-size: inherit; font-weight: inherit; color: inherit; }
.cr-code { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 16px; background: var(--panel); }
.cr-code span { color: var(--on-dark); font-size: 14px; }
.cr-code b { font-size: 34px; font-weight: 800; letter-spacing: 8px; color: var(--yellow); font-variant-numeric: tabular-nums; }
.proof-box { min-height: 160px; display: flex; gap: 12px; align-items: center; justify-content: center; color: var(--muted); font-weight: 600; text-align: center; }
.proof-box img { display: block; max-width: 100%; max-height: 70vh; border-radius: 14px; }
.courier-card { background: var(--charcoal); color: #FFFFFF; border-radius: 22px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.courier-card .eyebrow { color: var(--on-dark); }
.courier-card :focus-visible { outline-color: var(--yellow); box-shadow: 0 0 0 2px var(--charcoal); }
.cr-who { display: flex; align-items: center; gap: 14px; }
.cr-who .avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--yellow); color: var(--charcoal); display: grid; place-items: center; font-weight: 800; font-size: 18px; flex: none; }
.cr-who img.avatar { object-fit: cover; background: #E5E7EB; border: 2px solid var(--yellow); }
.cr-who div { display: flex; flex-direction: column; gap: 2px; }
.cr-who div span { color: var(--on-dark); font-size: 14px; }
.cr-actions { display: flex; gap: 10px; }
.cr-actions .btn { flex: 1; }
.cr-wait { font-size: 17px; }
.cr-note { color: var(--on-dark); font-size: 14px; }
.code-card .pickup-code { font-size: 36px; font-weight: 800; letter-spacing: 6px; color: var(--charcoal); }
.label-prev { border: 1px solid #9CA3AF; border-radius: 14px; overflow: hidden; background: #FFFFFF; }
.lp-top { display: flex; justify-content: space-between; gap: 8px; padding: 10px 14px; border-top: 5px solid var(--yellow); border-bottom: 1px dashed var(--line); font-size: 11px; font-weight: 800; letter-spacing: 1px; color: var(--charcoal); }
.lp-body { display: flex; justify-content: space-between; gap: 12px; padding: 14px; align-items: flex-start; }
.lp-to { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lp-k { font-size: 10px; letter-spacing: 1.4px; color: var(--muted); font-weight: 700; }
.lp-to b { font-size: 16px; color: var(--charcoal); }
.lp-to span:not(.lp-k) { font-size: 13px; color: var(--ink); }
.lp-qr { width: 96px; height: 96px; flex: none; }
.lp-qr svg { width: 96px; height: 96px; display: block; }
.lp-foot { display: flex; justify-content: space-between; gap: 8px; padding: 8px 14px; border-top: 1px solid var(--divider); font-size: 11px; color: var(--muted); letter-spacing: 0.6px; text-transform: uppercase; }
.lp-foot .mono { color: var(--charcoal); }
.batch-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.bh-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bh-title h1 { margin: 0; font-size: clamp(28px, 3.4vw, 36px); font-weight: 800; color: var(--charcoal); letter-spacing: -0.6px; }

/* ---------- Batches, Deliveries, Billing, Business settings, Help ---------- */
.page-card { margin-top: 20px; }
.page-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 24px; align-items: start; }
.more { margin-top: 14px; }
.toolbar { margin-bottom: 14px; }
.input.search { max-width: 420px; min-height: 46px; }
.plan-card { display: flex; flex-direction: column; gap: 8px; }
.plan-card .big-price { font-size: 56px; font-weight: 900; color: var(--charcoal); line-height: 1; letter-spacing: -2px; margin-top: 6px; }
.plan-card .big-price .cur { font-size: 28px; vertical-align: top; margin-right: 2px; }
.plan-card .big-price .cents { font-size: 30px; }
.ticks { list-style: none; margin: 6px 0; padding: 0; display: grid; gap: 8px; font-size: 14px; color: var(--ink); }
.ticks li { display: flex; gap: 8px; align-items: center; }
.ticks svg { color: var(--green); flex: none; }
.verified-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.faq { display: grid; }
.faq details { border-bottom: 1px solid var(--divider); }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 700; color: var(--charcoal); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--muted); flex: none; }
.faq details[open] summary::after { content: "–"; }
.faq p { margin: 0 0 16px; color: var(--muted); font-size: 15px; }

@media (max-width: 1100px) {
  .stats.stats4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .app-body { display: block; }
  .side-nav { position: static; width: auto; max-height: none; flex-direction: row; overflow-x: auto; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .side-nav::-webkit-scrollbar { display: none; }
  .nav-item { flex: none; min-height: 40px; padding: 0 14px; font-size: 14px; background: #FFFFFF; border: 1px solid var(--line); border-radius: 999px; }
  .nav-item.cur { border-color: var(--charcoal); }
  .nav-sec, .nav-biz { display: none; }
  .app-body > .page { max-width: none; }
}
@media (max-width: 860px) {
  .stats.stats4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tracker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .next-card { padding: 20px; }
}
@media (max-width: 400px) {
  .stats.stats4 { grid-template-columns: minmax(0, 1fr); }
}

/* Reduced motion: slower spinners (they show that something is happening), no slides. Script
   scrolling checks the same setting (scrollBehavior() in app.js). */
@media (prefers-reduced-motion: reduce) { .spinner, .stages li.cur .st-ic { animation-duration: 2s; } .btn, .bar i, .toast { transition: none; } }

/* ---------- Back to website (the public site, corsio.ca) ---------- */
/* Signed in: a button in the header before the account; an icon button on phones (the label stays for screen readers). */
.top-site { gap: 8px; white-space: nowrap; }
@media (max-width: 640px) {
  .top-site { width: 44px; padding: 0; }
  .top-site-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* Sign-in screens: a link beside the brand, in the dark side panel. */
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; position: relative; z-index: 1; }
.auth-site { gap: 8px; color: var(--on-dark); font-size: 15px; font-weight: 600; text-decoration: none; }
.auth-site:hover { color: #FFFFFF; text-decoration: underline; }
/* Phone header: brand, Back to website, Sign out on one line (the business name is already hidden here). */
.top .brand, .who .btn { white-space: nowrap; }
@media (max-width: 480px) {
  .who .avatar { display: none; }
}
@media (max-width: 360px) {
  .who { gap: 8px; }
  .who .btn-sm { padding: 0 14px; }
}

/* ---------- Address suggestions (/maps.js) on the business address step ---------- */
.addr-host { position: relative; }
.addr-list { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40; background: #FFFFFF; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 44px rgba(17, 24, 39, 0.18); overflow: hidden; }
.addr-list ul { list-style: none; margin: 0; padding: 6px; }
.addr-opt { display: flex; flex-direction: column; gap: 2px; min-height: 48px; justify-content: center; padding: 8px 12px; border-radius: 10px; cursor: pointer; color: var(--charcoal); }
.addr-opt b { font-size: 15px; font-weight: 700; }
.addr-opt span { font-size: 13px; color: var(--muted); }
.addr-opt:hover, .addr-opt[aria-selected="true"] { background: var(--yellow-soft); box-shadow: inset 3px 0 0 var(--yellow); }
.addr-attr { display: flex; justify-content: flex-end; padding: 6px 12px 8px; border-top: 1px solid var(--divider); }
.addr-attr img { display: block; width: 144px; height: 18px; }
