/* =========================================================================
   Design system — one product, every screen. RTL, Heebo, desktop + phone.
   ========================================================================= */
@font-face {
  font-family: 'Heebo'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/vendor/fonts/heebo-hebrew-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
  font-family: 'Heebo'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/vendor/fonts/heebo-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* surfaces */
  --bg: #f6f7fb; --surface: #ffffff; --surface-2: #f9fafc; --surface-3: #f1f3f8;
  --line: #e6e8ef; --line-2: #eff1f6;
  /* text */
  --text: #0e1525; --text-2: #3b4458; --muted: #6b7489; --faint: #9aa2b4;
  /* brand. The UI colours are shared with the customers' pages (shop, tracking) and stay as they are; the PICKBON
     colours (docs/BRAND.md) are used only where the product shows itself: logos, icons, the sign-in screen */
  --navy: #0B1220; --cyan: #27C5FF;
  --primary: #4353e8; --primary-2: #3443cf; --primary-ink: #fff; --primary-soft: #eef0fe; --primary-softer: #f6f7ff;
  --accent: #6a3de8;
  /* status */
  --ok: #0a8f5a; --ok-soft: #e6f6ee; --warn: #b8690a; --warn-soft: #fdf3e2; --bad: #d42a2a; --bad-soft: #fdecec; --info: #2563eb; --info-soft: #eaf1fe;
  --star: #e0a400;
  /* shape & depth */
  --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 20px;
  --sh-1: 0 1px 2px rgba(14,21,37,.05);
  --sh-2: 0 1px 2px rgba(14,21,37,.04), 0 4px 16px rgba(14,21,37,.06);
  --sh-3: 0 12px 40px rgba(14,21,37,.14);
  --focus: 0 0 0 3px rgba(67,83,232,.28);
  --hero: linear-gradient(135deg, #4353e8 0%, #6a3de8 100%);
  /* layout */
  --side-w: 256px; --top-h: 64px; --nav-h: 66px;
  --gutter: 16px;
  color-scheme: light;
}
@media (min-width: 1024px) { :root { --gutter: 28px; } }
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0f1c; --surface: #121a2b; --surface-2: #0f1726; --surface-3: #18223a;
    --line: #232d45; --line-2: #1a2338;
    --text: #e8ecf5; --text-2: #c3cadb; --muted: #8d97ad; --faint: #687189;
    --primary: #7083ff; --primary-2: #8b9bff; --primary-soft: #1c2450; --primary-softer: #151c3a; --accent: #9a7bff;
    --ok: #35c98a; --ok-soft: #0f2e22; --warn: #f2a33a; --warn-soft: #34260e; --bad: #f37171; --bad-soft: #3a1618; --info: #6ea0ff; --info-soft: #172443;
    --sh-1: none; --sh-2: none; --sh-3: 0 12px 40px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 'Heebo', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { min-height: 100dvh; overscroll-behavior-y: none; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; top: -60px; inset-inline-start: 12px; z-index: 100; background: var(--primary); color: #fff; padding: 10px 16px; border-radius: var(--r); }
.skip:focus { top: 12px; }

/* ---------- icons ---------- */
.ic { display: inline-block; width: 1.15em; height: 1.15em; flex-shrink: 0; background: currentColor; vertical-align: -.2em;
  -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }

/* =========================================================================
   Shell: sidebar (desktop) · top bar · content · bottom nav (phone)
   ========================================================================= */
.shell { min-height: 100dvh; }
.side { display: none; }
.main { min-width: 0; display: flex; flex-direction: column; min-height: 100dvh; }
.top { position: sticky; top: 0; z-index: 30; height: calc(var(--top-h) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 8px 0;
  display: flex; align-items: center; gap: 4px; background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); }
.top .t-title { flex: 1; min-width: 0; padding: 0 6px; }
.top .t-title h1 { font-size: 1.08rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .t-title small { display: block; font-size: .74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .t-meta { display: none; }
.iconbtn { width: 42px; height: 42px; border-radius: 12px; border: 0; background: transparent; display: grid; place-items: center; position: relative; color: var(--text-2); cursor: pointer; font-size: 1.2rem; flex-shrink: 0; }
.iconbtn:hover { background: var(--surface-3); }
.badge-dot { position: absolute; top: 4px; inset-inline-end: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 99px; background: var(--bad); color: #fff; font-size: .66rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }
.view { flex: 1; width: 100%; max-width: 1440px; margin: 0 auto; padding: 16px var(--gutter) calc(var(--nav-h) + 32px + env(safe-area-inset-bottom)); outline: none; }
.view.narrow { max-width: 760px; }
.nav { position: fixed; bottom: 0; inset-inline: 0; z-index: 30; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 94%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--line); display: flex; }
.nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: .7rem; font-weight: 500; color: var(--muted); text-decoration: none; }
.nav a .i { width: 48px; height: 28px; border-radius: 99px; display: grid; place-items: center; font-size: 1.25rem; transition: background .15s; }
.nav a[aria-current="page"] { color: var(--primary); font-weight: 700; }
.nav a[aria-current="page"] .i { background: var(--primary-soft); }
.nav a.plus .i { width: 52px; height: 52px; border-radius: 18px; margin-top: -20px; background: var(--hero); color: #fff; box-shadow: 0 8px 22px rgba(67,83,232,.36); font-size: 1.45rem; }

@media (min-width: 1024px) {
  .shell { display: grid; grid-template-columns: var(--side-w) 1fr; }
  .side { display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; background: var(--surface); border-inline-end: 1px solid var(--line); overflow-y: auto; }
  .nav { display: none; }
  .view { padding-bottom: 48px; }
  .top { background: color-mix(in srgb, var(--surface) 88%, transparent); padding: 0 var(--gutter); }
  .top .t-title h1 { font-size: 1.15rem; }
  .top .t-meta { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .85rem; margin-inline-end: 8px; }
  .top .menu-toggle { display: none; }
}
.side .brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; font-weight: 800; font-size: 1.05rem; }
.side .brand .logo { width: 36px; height: 36px; border-radius: 11px; background: var(--navy); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 16px rgba(11,18,32,.28); }
.side .brand .logo img { display: block; }
.side .brand small { display: block; font-weight: 500; font-size: .74rem; color: var(--muted); }
.side .grp { padding: 6px 10px; }
.side .grp-t { padding: 10px 10px 6px; font-size: .7rem; font-weight: 700; letter-spacing: .06em; color: var(--faint); }
.side a.lnk { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: var(--text-2); font-weight: 500; font-size: .92rem; text-decoration: none; position: relative; }
.side a.lnk .ic { color: var(--muted); font-size: 1.1rem; }
.side a.lnk:hover { background: var(--surface-3); }
.side a.lnk[aria-current="page"] { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.side a.lnk[aria-current="page"] .ic { color: var(--primary); }
.side a.lnk .cnt { margin-inline-start: auto; background: var(--warn); color: #fff; border-radius: 99px; font-size: .7rem; font-weight: 700; padding: 1px 7px; }
.side .side-foot { margin-top: auto; padding: 14px; border-top: 1px solid var(--line); }
.side .me { display: flex; align-items: center; gap: 10px; }
.side .me b { display: block; font-size: .9rem; }
.side .me small { color: var(--muted); font-size: .76rem; }
.side .newbtn { margin: 4px 16px 6px; }

/* =========================================================================
   Page header, sections, layout helpers
   ========================================================================= */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 4px 0 18px; }
.page-head h2 { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; }
.page-head p { color: var(--muted); margin-top: 2px; font-size: .92rem; }
.page-head .acts { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 1023px) { .page-head { display: none; } .page-head.always { display: flex; } }
.mobile-acts { display: flex; gap: 8px; margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.mobile-acts::-webkit-scrollbar { display: none; }
@media (min-width: 1024px) { .mobile-acts { display: none; } }
.grid { display: grid; gap: 16px; }
.grid.g2 { grid-template-columns: 1fr; }
.grid.g3 { grid-template-columns: 1fr; }
@media (min-width: 760px) { .grid.g2 { grid-template-columns: 1fr 1fr; } .grid.g3 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1200px) { .grid.g3 { grid-template-columns: 1fr 1fr 1fr; } }
.split { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .split { grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); align-items: start; } .split.even { grid-template-columns: 1fr 1fr; } .split.side-left { grid-template-columns: minmax(320px, 1fr) minmax(0, 1.6fr); } }
.sticky { position: sticky; top: calc(var(--top-h) + 16px); }
/* new order on a phone / tablet: the step's buttons stay on screen at the bottom while a long list scrolls */
@media (max-width: 1023px) {
  /* above the fixed bottom navigation (.nav) */
  .step-nav { position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); z-index: 20; margin-inline: calc(-1 * var(--gutter, 16px)); padding: 10px var(--gutter, 16px);
    background: color-mix(in srgb, var(--bg) 94%, transparent); border-top: 1px solid var(--line); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
}
.stack > * + * { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.top { align-items: flex-start; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.small { font-size: .86rem; } .tiny { font-size: .75rem; }
.bold { font-weight: 700; } .x-bold { font-weight: 800; }
.num { font-variant-numeric: tabular-nums; }
.ltr { direction: ltr; unicode-bidi: embed; }
.nowrap { white-space: nowrap; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pre { white-space: pre-wrap; }
.ok-t { color: var(--ok); } .bad-t { color: var(--bad); } .warn-t { color: var(--warn); }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.gap-8 { height: 8px; } .gap-16 { height: 16px; }

/* =========================================================================
   Cards
   ========================================================================= */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.card + .card { margin-top: 16px; }
.grid > .card + .card, .split > .card + .card { margin-top: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); min-height: 56px; }
.card-h h3 { font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-h h3 .ic { color: var(--muted); }
.card-h small { color: var(--muted); font-size: .8rem; font-weight: 500; }
.card-b { padding: 16px 18px; }
.card-b.flush { padding: 0; }
.card-f { padding: 12px 18px; border-top: 1px solid var(--line-2); display: flex; gap: 8px; flex-wrap: wrap; }
.card.hero { background: var(--hero); color: #fff; border: 0; box-shadow: 0 14px 34px rgba(67,83,232,.24); position: relative; overflow: hidden; }
.card.hero::after { content: ''; position: absolute; inset-inline-start: -60px; top: -80px; width: 240px; height: 240px; border-radius: 50%; background: rgba(255,255,255,.08); pointer-events: none; }
.card.hero .card-b { position: relative; z-index: 1; }

/* key-value */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: .92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; text-align: end; }

/* =========================================================================
   Stats
   ========================================================================= */
.stats { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .stats.s4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .stats.s6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; box-shadow: var(--sh-1); min-width: 0; text-align: start; }
button.stat, a.stat { cursor: pointer; font: inherit; color: inherit; text-decoration: none; display: block; width: 100%; }
button.stat:hover, a.stat:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); }
.stat .s-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: .8rem; font-weight: 600; }
.stat .s-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.stat .s-v { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .s-h { font-size: .78rem; color: var(--muted); margin-top: 2px; }
.stat.ok .s-ic { background: var(--ok-soft); color: var(--ok); } .stat.ok .s-v { color: var(--ok); }
.stat.warn .s-ic { background: var(--warn-soft); color: var(--warn); } .stat.warn .s-v { color: var(--warn); }
.stat.bad .s-ic { background: var(--bad-soft); color: var(--bad); } .stat.bad .s-v { color: var(--bad); }

/* money flow (P&L ladder) */
.flow { display: grid; grid-template-columns: 1fr auto; gap: 9px 16px; font-size: .95rem; }
.flow .v { font-weight: 600; font-variant-numeric: tabular-nums; text-align: end; }
.flow .minus { color: var(--bad); }
.flow .sub { font-weight: 700; padding-top: 8px; border-top: 1px dashed var(--line); }
.flow .total { font-weight: 800; font-size: 1.12rem; padding-top: 10px; border-top: 1px solid var(--line); }

/* =========================================================================
   Buttons, chips, segmented, menus
   ========================================================================= */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 0 15px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 600; font-size: .92rem; cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s, transform .06s, box-shadow .12s; text-decoration: none; }
.btn:hover { background: var(--surface-3); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); box-shadow: 0 2px 8px rgba(67,83,232,.25); }
.btn.primary:hover { background: var(--primary-2); }
.btn.success { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger-ghost { color: var(--bad); }
.btn.danger-ghost:hover { background: var(--bad-soft); }
.btn.warn { background: var(--warn); border-color: var(--warn); color: #fff; }
.btn.soft { background: var(--primary-soft); border-color: transparent; color: var(--primary); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-3); }
.btn.link { background: none; border: 0; color: var(--primary); padding: 0 4px; min-height: 0; }
.btn.block { width: 100%; }
.btn.sm { min-height: 32px; padding: 0 11px; font-size: .84rem; border-radius: 9px; gap: 5px; }
.btn.lg { min-height: 52px; padding: 0 20px; font-size: 1.02rem; border-radius: 13px; }
.btn.xl { min-height: 60px; padding: 0 22px; font-size: 1.1rem; border-radius: 15px; font-weight: 800; }
.btn.icon { width: 40px; padding: 0; } .btn.sm.icon { width: 32px; }
@media (max-width: 1023px) { .btn { min-height: 44px; } .btn.sm { min-height: 36px; } }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.btns.fill > * { flex: 1; }
.btn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 13px; cursor: pointer; font-size: .9rem; font-weight: 500; }
.chip[aria-pressed="true"], .chip.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.seg { display: inline-flex; background: var(--surface-3); border-radius: 11px; padding: 3px; gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 9px; font-weight: 600; font-size: .86rem; color: var(--muted); cursor: pointer; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--sh-1); }
.seg button .n { margin-inline-start: 6px; font-size: .74rem; padding: 0 6px; border-radius: 99px; background: var(--line); color: var(--text-2); }

.menu-wrap { position: relative; display: inline-block; }
.menu { position: absolute; z-index: 60; top: calc(100% + 6px); inset-inline-end: 0; min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--sh-3); padding: 6px; animation: pop .12s ease-out; }
.menu button, .menu a { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 10px; border: 0; background: none; border-radius: 8px; font-size: .9rem; color: var(--text); cursor: pointer; text-align: start; text-decoration: none; }
.menu button:hover, .menu button:focus-visible, .menu a:hover { background: var(--surface-3); outline: none; }
.menu .ic { color: var(--muted); }
.menu .danger { color: var(--bad); } .menu .danger .ic { color: var(--bad); }
.menu .sep { height: 1px; background: var(--line); margin: 6px 4px; }
.menu .mh { padding: 8px 10px 4px; font-size: .72rem; font-weight: 700; color: var(--faint); letter-spacing: .04em; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }

/* =========================================================================
   Badges / status
   ========================================================================= */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; font-size: .74rem; font-weight: 700; background: var(--surface-3); color: var(--text-2); white-space: nowrap; line-height: 1.4; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--ok-soft); color: var(--ok); } .badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); } .badge.info { background: var(--info-soft); color: var(--info); }
.badge.primary { background: var(--primary-soft); color: var(--primary); }
.badge.outline { background: transparent; border: 1px solid var(--line); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; display: inline-block; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }

/* =========================================================================
   Forms
   ========================================================================= */
.field { display: block; margin-bottom: 14px; }
.field > .lbl { display: flex; justify-content: space-between; gap: 8px; font-size: .84rem; color: var(--text-2); margin-bottom: 6px; font-weight: 600; }
.field > .lbl .opt { color: var(--faint); font-weight: 500; }
.input, select.input, textarea.input { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 9px 12px; outline: none; transition: border-color .12s, box-shadow .12s; }
.input:hover { border-color: color-mix(in srgb, var(--text) 18%, var(--line)); }
.input:focus { border-color: var(--primary); box-shadow: var(--focus); }
.input::placeholder { color: var(--faint); }
.input[aria-invalid="true"] { border-color: var(--bad); }
textarea.input { min-height: 88px; resize: vertical; }
.input.lg { min-height: 54px; font-size: 1.06rem; font-weight: 600; }
.hint { font-size: .78rem; color: var(--muted); margin-top: 5px; }
.err-t { font-size: .8rem; color: var(--bad); margin-top: 5px; }
.check { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; cursor: pointer; font-weight: 500; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--primary); flex-shrink: 0; }
.switch { position: relative; width: 44px; height: 26px; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--line); transition: background .15s; pointer-events: none; }
.switch span::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: inset-inline-start .15s; }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { inset-inline-start: 21px; }
.switch input:focus-visible + span { box-shadow: var(--focus); }
.search { position: relative; }
.search .ic { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search .input { padding-inline-start: 38px; }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper .btn { width: 44px; padding: 0; font-size: 1.2rem; }
.stepper .input { width: 92px; text-align: center; font-weight: 700; }
.form-grid { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .form-grid.c2 { grid-template-columns: 1fr 1fr; } }

/* =========================================================================
   Data table (desktop) → cards (phone)
   ========================================================================= */
.dt-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.dt-bar .search { flex: 1; min-width: 200px; }
.dt-bar select.input { width: auto; min-height: 40px; }
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9rem; font-variant-numeric: tabular-nums; }
.tbl th { text-align: start; font-size: .76rem; font-weight: 700; color: var(--muted); padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.tbl th button { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.tbl th button:focus-visible { box-shadow: var(--focus); border-radius: 4px; }
.tbl th .ar { opacity: .35; font-size: .8em; }
.tbl th[aria-sort="ascending"] .ar, .tbl th[aria-sort="descending"] .ar { opacity: 1; color: var(--primary); }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr:hover td { background: var(--primary-softer); }
.tbl .r { text-align: end; } .tbl .c { text-align: center; }
.tbl tfoot td { font-weight: 800; background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 0; }
.tbl .sub { display: block; font-size: .78rem; color: var(--muted); font-weight: 400; }
.dt-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line-2); font-size: .84rem; color: var(--muted); flex-wrap: wrap; }
@media (max-width: 759px) {
  .tbl.cards thead { display: none; }
  .tbl.cards, .tbl.cards tbody, .tbl.cards tr, .tbl.cards td, .tbl.cards tfoot { display: block; width: 100%; }
  .tbl.cards tr { padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
  .tbl.cards td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 12px; text-align: end; }
  .tbl.cards td::before { content: attr(data-label); color: var(--muted); font-size: .8rem; font-weight: 600; text-align: start; flex-shrink: 0; }
  .tbl.cards td.primary { font-weight: 700; font-size: .98rem; text-align: start; justify-content: flex-start; }
  .tbl.cards td.primary::before { display: none; }
  .tbl.cards td.hide-m { display: none; }
  .tbl.cards tfoot tr { background: var(--surface-2); }
}

/* list rows (phone-first lists) */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-1); }
.list.bare { border: 0; box-shadow: none; border-radius: 0; }
.li { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line-2); color: inherit; text-decoration: none; min-height: 60px; }
.li:last-child { border-bottom: 0; }
a.li:hover, button.li:hover, .li.click:hover { background: var(--primary-softer); text-decoration: none; cursor: pointer; }
button.li { width: 100%; border: 0; background: none; text-align: start; font: inherit; }
.li .m { flex: 1; min-width: 0; }
.li .t { font-weight: 600; display: flex; align-items: center; gap: 6px; min-width: 0; }
.li .t > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .s { font-size: .82rem; color: var(--muted); margin-top: 2px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.li .e { text-align: end; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.li .lead { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; background: var(--primary-soft); color: var(--primary); font-weight: 800; font-size: .92rem; }
.li .lead.star { background: #fff4cc; color: #9a6b00; }
.li.st-pending { box-shadow: inset -4px 0 0 var(--warn); } .li.st-failed { box-shadow: inset -4px 0 0 var(--bad); }
.li.st-on_way { box-shadow: inset -4px 0 0 var(--primary); } .li.st-delivered { box-shadow: inset -4px 0 0 var(--ok); }
[dir="ltr"] .li.st-pending { box-shadow: inset 4px 0 0 var(--warn); }

/* =========================================================================
   Avatars, thumbs, misc media
   ========================================================================= */
.avatar { width: 38px; height: 38px; border-radius: 12px; color: #fff; display: grid; place-items: center; font-weight: 800; flex-shrink: 0; position: relative; font-size: .95rem; }
.avatar.lg { width: 56px; height: 56px; border-radius: 17px; font-size: 1.35rem; }
.avatar i { position: absolute; bottom: -2px; inset-inline-end: -2px; width: 12px; height: 12px; border-radius: 50%; background: #cbd5e1; border: 2.5px solid var(--surface); }
.avatar i.on { background: #22c55e; }
.thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: var(--surface-3); display: grid; place-items: center; color: var(--faint); }
.thumb.lg { width: 100%; height: auto; max-height: 280px; border-radius: 14px; }

/* =========================================================================
   Alerts, empty states, skeletons
   ========================================================================= */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); font-size: .9rem; border: 1px solid transparent; }
.alert > .ic { margin-top: 2px; font-size: 1.1rem; }
.alert .grow > b { display: block; margin-bottom: 1px; }
.alert + .alert, .alert + .card, .card + .alert { margin-top: 12px; }
.alert.info { background: var(--info-soft); color: var(--info); } .alert.ok { background: var(--ok-soft); color: var(--ok); }
.alert.warn { background: var(--warn-soft); color: var(--warn); } .alert.bad { background: var(--bad-soft); color: var(--bad); }
.alert .grow { color: var(--text); }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .e-ic { width: 56px; height: 56px; border-radius: 18px; margin: 0 auto 12px; display: grid; place-items: center; background: var(--surface-3); color: var(--faint); font-size: 1.6rem; }
.empty b { display: block; color: var(--text); font-size: 1rem; margin-bottom: 4px; }
.empty .btn { margin-top: 14px; }
.skel { background: linear-gradient(90deg, var(--surface-3) 25%, var(--line-2) 37%, var(--surface-3) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: 10px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.skel-line { height: 12px; margin: 10px 0; } .skel-h { height: 26px; width: 40%; margin-bottom: 18px; }
.skel-card { height: 96px; border-radius: var(--r-lg); }
.skel-row { height: 56px; margin-bottom: 1px; border-radius: 0; }

/* =========================================================================
   Dialogs, sheets, toasts
   ========================================================================= */
.backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(8,12,24,.48); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.dialog { background: var(--surface); width: 100%; max-width: 560px; max-height: 92dvh; border-radius: 22px 22px 0 0; display: flex; flex-direction: column;
  box-shadow: var(--sh-3); animation: up .22s cubic-bezier(.2,.8,.2,1); padding-bottom: env(safe-area-inset-bottom); outline: none; }
.dialog.wide { max-width: 760px; }
.dialog::before { content: ''; width: 40px; height: 5px; border-radius: 9px; background: var(--line); margin: 8px auto 0; flex-shrink: 0; }
.dialog .d-h { display: flex; align-items: center; gap: 10px; padding: 12px 18px 8px; }
.dialog .d-h h2 { flex: 1; font-size: 1.12rem; font-weight: 800; }
.dialog .d-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex-shrink: 0; font-size: 1.2rem; }
.dialog .d-ic.danger { background: var(--bad-soft); color: var(--bad); }
.dialog .d-b { overflow-y: auto; padding: 6px 18px 18px; }
.dialog .d-f { padding: 12px 18px 16px; border-top: 1px solid var(--line-2); display: flex; gap: 8px; }
.dialog .d-f > * { flex: 1; }
@media (min-width: 760px) {
  .backdrop { align-items: center; padding: 24px; }
  .dialog { border-radius: 20px; padding-bottom: 0; }
  .dialog::before { display: none; }
  .dialog .d-h { padding-top: 18px; }
  .dialog .d-f { justify-content: flex-start; flex-direction: row-reverse; }
  .dialog .d-f > * { flex: 0 0 auto; min-width: 110px; }
}
@keyframes up { from { transform: translateY(30px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } }
.toasts { position: fixed; z-index: 90; top: calc(env(safe-area-inset-top) + 72px); inset-inline: 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
@media (min-width: 1024px) { .toasts { top: auto; bottom: 24px; inset-inline-start: auto; inset-inline-end: 24px; align-items: flex-end; } }
.toast { display: flex; align-items: center; gap: 10px; background: #101727; color: #fff; padding: 11px 16px; border-radius: 12px; font-size: .9rem; font-weight: 500; box-shadow: var(--sh-3); max-width: 460px; pointer-events: auto; animation: up .2s; }
.toast .ic { font-size: 1.1rem; }
.toast.ok .ic { color: #4ade80; } .toast.bad { background: #7f1d1d; } .toast.warn .ic { color: #fbbf24; }
.toast.note { background: var(--surface); color: var(--text); border: 1px solid var(--line); cursor: pointer; width: 100%; border-inline-start: 4px solid var(--primary); }
.toast.note b { display: block; }

/* =========================================================================
   Maps, charts, timeline
   ========================================================================= */
.map { height: 340px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: var(--surface-3); }
.map.tall { height: min(68dvh, 720px); }
.map.sm { height: 220px; }
.card .map { border: 0; border-radius: 0; }
.mk { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; font-weight: 800; background: #fff; color: #111; border: 3px solid var(--primary); box-shadow: 0 3px 8px rgba(0,0,0,.3); font-family: 'Heebo', sans-serif; }
.mk.stale { border-color: #9aa2b4; filter: grayscale(.7); opacity: .8; border-style: dashed; }
.mk.dest { border-color: var(--ok); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .78rem; color: var(--muted); padding: 10px 16px; border-top: 1px solid var(--line-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.chart { width: 100%; height: auto; display: block; }
.chart text { font-family: 'Heebo', sans-serif; font-size: 11px; fill: var(--muted); }
.chart .bar { fill: var(--primary); } .chart .bar.alt { fill: var(--accent); opacity: .5; } .chart .bar.neg { fill: var(--bad); }
.chart .grid-l { stroke: var(--line-2); }
.chart .line { fill: none; stroke: var(--ok); stroke-width: 2.5; }
.hbar { display: grid; grid-template-columns: minmax(80px, 30%) 1fr auto; gap: 8px 10px; align-items: center; font-size: .86rem; }
.hbar .track { height: 10px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.hbar .track i { display: block; height: 100%; background: var(--primary); border-radius: 99px; }
.timeline { position: relative; padding-inline-start: 20px; }
.timeline::before { content: ''; position: absolute; inset-inline-start: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-i { position: relative; padding: 4px 0 12px; font-size: .88rem; }
.tl-i::before { content: ''; position: absolute; inset-inline-start: -19px; top: 9px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--primary); }
.tl-i .tl-t { color: var(--muted); font-size: .76rem; }

/* =========================================================================
   Order wizard, courier home, receipts
   ========================================================================= */
.steps { display: flex; justify-content: space-between; position: relative; margin-bottom: 18px; }
.steps::before { content: ''; position: absolute; top: 15px; inset-inline: 8%; height: 2px; background: var(--line); }
.steps > div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; position: relative; color: var(--muted); font-size: .72rem; font-weight: 600; }
.steps span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--line); font-weight: 800; font-size: .82rem; }
.steps .done { color: var(--ok); } .steps .done span { background: var(--ok); border-color: var(--ok); color: #fff; }
.steps .cur { color: var(--primary); } .steps .cur span { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 0 0 5px var(--primary-soft); }
.receipt-lines { display: grid; gap: 7px; padding: 12px 0; margin: 12px 0; border-block: 1px dashed var(--line); font-size: .93rem; }
.big-total { font-size: 1.3rem; font-weight: 800; }
.pay-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pay-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 20px 10px; border-radius: var(--r-lg); border: 0; cursor: pointer; color: #fff; font: inherit; font-size: 1.1rem; font-weight: 800; transition: transform .08s; }
.pay-tile .ic { font-size: 1.7rem; }
.pay-tile small { font-weight: 500; opacity: .85; font-size: .8rem; }
.pay-tile.cash { background: var(--hero); box-shadow: 0 10px 24px rgba(67,83,232,.3); }
.pay-tile.credit { background: linear-gradient(135deg, #1f2937, #475569); }
.pay-tile:active { transform: scale(.98); }
.pay-tile[disabled] { opacity: .6; pointer-events: none; }
.cta-paste { width: 100%; display: flex; align-items: center; gap: 12px; padding: 16px; border: 0; border-radius: var(--r-lg); cursor: pointer; color: #fff; text-align: start; font: inherit;
  background: linear-gradient(135deg, #0e9f6e, #0b8b8f); box-shadow: 0 10px 24px rgba(14,159,110,.25); }
.cta-paste .c-ic { width: 46px; height: 46px; border-radius: 14px; background: rgba(255,255,255,.2); display: grid; place-items: center; font-size: 1.3rem; }
.gift { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: var(--r); background: linear-gradient(90deg, #fff3cd, #ffe4ef); color: #7a4300; font-weight: 800; }
@media (prefers-color-scheme: dark) { .gift { background: linear-gradient(90deg, #4a3a10, #4a1f33); color: #ffe7a6; } }
.collect { border-radius: var(--r-lg); padding: 16px; text-align: center; font-size: 1.3rem; font-weight: 800; }
.collect.cash { background: var(--warn-soft); color: var(--warn); } .collect.credit { background: var(--info-soft); color: var(--info); } .collect.paid { background: var(--ok-soft); color: var(--ok); }
.statusbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.next-card { border: 2px solid var(--primary); }
.loc-strip { margin: -16px calc(var(--gutter) * -1) 14px; padding: 10px var(--gutter); display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .88rem; }
.loc-strip.ok { background: var(--ok-soft); color: var(--ok); } .loc-strip.bad { background: var(--bad); color: #fff; cursor: pointer; } .loc-strip.warn { background: var(--warn-soft); color: var(--warn); cursor: pointer; }
.loc-strip .grow { color: inherit; }
.offline { background: var(--warn); color: #fff; text-align: center; font-size: .82rem; font-weight: 600; padding: 6px; }
.shop-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .shop-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* =========================================================================
   Auth & public pages
   ========================================================================= */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 28px 16px; background:
  radial-gradient(1200px 520px at 100% -10%, rgba(39,197,255,.16), transparent 60%), radial-gradient(900px 520px at -10% 110%, rgba(66,99,235,.16), transparent 60%), var(--bg); }
.auth-box { width: 100%; max-width: 420px; }
.auth-brand { text-align: center; margin: 0 auto 22px; }
.auth-brand img { display: block; width: 240px; max-width: 78%; height: auto; margin: 0 auto; }
.auth-tag { margin-top: 10px; color: var(--muted); font-weight: 600; font-size: .95rem; }
.auth-logo { width: 68px; height: 68px; border-radius: 20px; background: var(--hero); color: #fff; display: grid; place-items: center; margin: 0 auto 16px; box-shadow: 0 12px 30px rgba(67,83,232,.35); font-size: 1.9rem; }
.auth h1 { text-align: center; font-size: 1.6rem; font-weight: 800; }
.auth .sub { text-align: center; color: var(--muted); margin: 6px 0 22px; }
.auth .card .card-b { padding: 22px; }
.auth-foot { text-align: center; color: var(--muted); font-size: .84rem; margin-top: 16px; }
.code-in { letter-spacing: .5em; text-align: center; font-size: 1.4rem; font-weight: 800; }

/* =========================================================================
   Motion
   ========================================================================= */
.view > * { animation: viewIn .26s cubic-bezier(.2,.8,.2,1); }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition: none !important; } }

/* print: reports and receipts */
@media print {
  .side, .top, .nav, .mobile-acts, .page-head .acts, .dt-bar, .btn { display: none !important; }
  .shell { display: block; } .view { padding: 0; max-width: none; }
  .card { box-shadow: none; break-inside: avoid; }
}

/* phone drawer: the desktop sidebar slides in from the right */
@media (max-width: 1023px) {
  .side.open { display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; inset-inline-start: 0; width: min(300px, 86vw); z-index: 60;
    background: var(--surface); box-shadow: var(--sh-3); overflow-y: auto; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); animation: drawerIn .22s ease-out; }
  .scrim { position: fixed; inset: 0; background: rgba(8,12,24,.45); z-index: 55; }
}
@keyframes drawerIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .side.open { animation: none; } }
body.is-courier .menu-toggle { display: none; }
/* courier: phone-first app even on a wide screen — no sidebar, bottom nav stays */
@media (min-width: 1024px) {
  body.is-courier .shell { display: block; }
  body.is-courier .nav { display: flex; max-width: 760px; margin: 0 auto; border-inline: 1px solid var(--line); border-radius: 18px 18px 0 0; }
  body.is-courier .view { max-width: 760px; padding-bottom: calc(var(--nav-h) + 32px); }
}
.mk.courier { background: var(--c, var(--primary)); color: #fff; border-color: #fff; outline: 3px solid var(--ok); }
.mk.courier.delayed { outline-color: var(--warn); }
.mk.courier.stale { outline: 3px dashed #9aa2b4; filter: grayscale(.6); opacity: .75; }
.mk.dest { background: var(--ok); color: #fff; border-color: #fff; }
.mk.stop { width: 28px; height: 28px; font-size: 13px; border-color: var(--primary); }
.legend .lg-live { background: var(--ok); } .legend .lg-delayed { background: var(--warn); }
.legend .lg-stale { background: #9aa2b4; } .legend .lg-dest { background: var(--ok); border: 2px solid #fff; outline: 2px solid var(--ok); }
.leaflet-container { font-family: 'Heebo', sans-serif; }
@media (min-width: 760px) { .stats.s3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .stats.s4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.form-grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.thumb.lg { max-width: 260px; min-height: 120px; }
.thumb .ic { font-size: 1.2rem; }
.thumb.lg .ic { font-size: 2.4rem; }
tr.muted td { opacity: .6; }

/* download page */
.dl-icon { width: 88px; height: 88px; border-radius: 24px; display: block; margin: 0 auto 16px; box-shadow: 0 12px 30px rgba(67,83,232,.35); }
.dl-card { margin-top: 16px; }
.dl-card h3 { margin-bottom: 10px; }
.dl-steps { margin: 0; padding-inline-start: 20px; line-height: 1.9; font-size: .95rem; }

/* customer order page */
.shop-body { background: var(--bg); }
.shop-main { padding-bottom: 120px; }
.shop-hero { background: var(--hero); color: #fff; border-radius: var(--r-xl); padding: 22px 20px; box-shadow: 0 14px 34px rgba(67,83,232,.24); }
.shop-hero h1 { font-size: 1.5rem; font-weight: 800; }
.shop-hero p { margin-top: 6px; opacity: .95; }
.shop-hero .auth-logo { width: 52px; height: 52px; border-radius: 16px; background: rgba(255,255,255,.18); box-shadow: none; font-size: 1.5rem; }
.shop-card { position: relative; overflow: hidden; display: flex; flex-direction: column; }
.shop-card .card-b { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.shop-card.on { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.shop-img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--surface-3); display: grid; place-items: center; color: var(--faint); }
.shop-img.ph .ic { font-size: 2.6rem; }
.promo-badge { position: absolute; top: 10px; inset-inline-start: 10px; z-index: 1; background: var(--warn); color: #fff; font-size: .74rem; font-weight: 800; padding: 3px 9px; border-radius: 99px; }
.shop-bar { position: fixed; bottom: 0; inset-inline: 0; padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 92%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--line); z-index: 20; }
.shop-bar .btn { max-width: 728px; margin: 0 auto; }
.steps .step-btn { background: none; border: 0; padding: 0; cursor: pointer; border-radius: 50%; }
.steps .step-btn:focus-visible { box-shadow: var(--focus); }
.side .newbtn { width: auto; display: flex; }
.side { overflow-x: hidden; }

/* ===== responsive hardening (iPhone 320–430, iPad 768) ===== */
/* iOS Safari/WKWebView zoom into any field under 16px and never zoom back: fields are 16px on touch devices */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* a fast second tap is a second tap, not "zoom in": no double-tap zoom on iOS (pinch-zoom stays - the viewport never
   blocks zoom), and no 300ms click delay. Leaflet maps set their own touch-action inside. */
html { touch-action: manipulation; }
@media (pointer: coarse), (max-width: 1023px) {
  input:not([type=checkbox]):not([type=radio]), select, textarea, .input { font-size: 16px; }
}
/* the page itself never scrolls sideways; wide content (tables, maps, charts) scrolls inside its own box */
html, body { max-width: 100%; overflow-x: hidden; }
@supports (overflow-x: clip) { html, body { overflow-x: clip; } }
.main, .view, .card, .card-b, .stack, .split > *, .grid > * { min-width: 0; }
img, svg, video, canvas { max-width: 100%; }
/* bottom navigation: items may shrink, labels never push the bar wider than the screen */
.nav a { min-width: 0; padding: 0 2px; }
.nav a > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 360px) {
  :root { --gutter: 12px; }
  .nav a .i { width: 40px; }
  .nav a.plus .i { width: 46px; height: 46px; }
  .nav a { font-size: .66rem; }
  .stats { gap: 8px; }
  .stat { padding: 12px; }
  .stat .s-v { font-size: 1.25rem; }
  .page-head h2 { font-size: 1.3rem; }
  .btn.lg { padding-inline: 14px; }
}
/* long Hebrew/English words, phone numbers and addresses wrap instead of cutting */
.li .t, .card-h h3, .kv dd, .alert, .toast { overflow-wrap: anywhere; }
/* safe areas (notch / Dynamic Island / home indicator) in Safari and in the app */
.view { padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); }
@media (max-width: 640px) { .dialog { max-height: calc(100dvh - env(safe-area-inset-top) - 12px); padding-bottom: env(safe-area-inset-bottom); } }
@media (pointer: coarse), (max-width: 1023px) {
  table.tbl th button { min-height: 40px; padding-block: 8px; }
  .btn.sm { min-height: 38px; }
  .chip, .seg button { min-height: 38px; }
}
@media (min-width: 1024px) { .top { padding-top: env(safe-area-inset-top); height: calc(var(--top-h) + env(safe-area-inset-top)); } .side { padding-top: env(safe-area-inset-top); } }

/* control center */
.quick-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.quick-row .quick-main { min-width: 220px; box-shadow: 0 10px 26px rgba(67,83,232,.28); }
@media (max-width: 640px) { .quick-row { display: grid; grid-template-columns: 1fr 1fr; } .quick-row .quick-main { grid-column: 1 / -1; min-width: 0; } .quick-row .btn { width: 100%; } }
table.tbl tr.row-issue td { background: color-mix(in srgb, var(--bad-soft) 55%, transparent); }
table.tbl tr.row-issue td:first-child { box-shadow: inset -3px 0 0 var(--bad); }
.progress { height: 10px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--ok), #34d399); transition: width .4s; }
@media (prefers-reduced-motion: reduce) { .progress i { transition: none; } }
.check-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.check-row:last-child { border-bottom: 0; }
.check-row .ci { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.check-row.ok .ci { background: var(--ok-soft); color: var(--ok); }
.check-row.bad .ci { background: var(--bad-soft); color: var(--bad); }
.check-row.warn .ci { background: var(--warn-soft); color: var(--warn); }
.check-row.wait .ci { background: var(--surface-3); color: var(--muted); }
@media (max-width: 640px) {
  .quick-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-row .btn { min-width: 0; white-space: normal; text-align: center; line-height: 1.25; padding-inline: 10px; }
}
.card-h { flex-wrap: wrap; row-gap: 8px; }
.card-h > .row { flex-wrap: wrap; min-width: 0; }
.privacy h1 { font-size: 1.6rem; margin: 12px 0 4px; }
.privacy h2 { font-size: 1.15rem; margin: 22px 0 8px; }
.privacy p, .privacy li { line-height: 1.75; }
.privacy ul { padding-inline-start: 20px; }

/* ===== driver mode (courier): one delivery fills the screen, colour = step ===== */
.drive-screen { --go: #4353e8; --way: #ea7a0c; --here: #0a8f5a; }
.drive-strip { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.loc-dot { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 700; color: var(--muted); }
.loc-dot i { width: 10px; height: 10px; border-radius: 50%; background: var(--faint); }
.loc-dot.ok i { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.loc-dot.bad { color: var(--bad); } .loc-dot.bad i { background: var(--bad); box-shadow: 0 0 0 4px var(--bad-soft); }
.strip-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font: inherit; font-weight: 700; cursor: pointer; color: var(--text); }
.drive { border-radius: 22px; overflow: hidden; background: var(--surface); box-shadow: var(--sh-2); border: 1px solid var(--line); --c: var(--go); }
.drive.way { --c: var(--way); } .drive.here { --c: var(--here); } .drive.bad { --c: var(--bad); }
.drive-top { background: var(--c); color: #fff; display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; font-weight: 800; font-size: 1.02rem; }
.drive-top .dt-step { display: inline-flex; align-items: center; gap: 6px; }
.drive-top .dt-count { background: rgba(255,255,255,.22); border-radius: 99px; padding: 3px 12px; font-size: .86rem; }
.drive-body { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.drive-addr { font-size: 1.6rem; font-weight: 800; line-height: 1.25; letter-spacing: -.01em; overflow-wrap: anywhere; }
.drive-who { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; font-weight: 600; }
.round-btn { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); font-size: 1.35rem; flex-shrink: 0; }
.drive-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-big { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px; font-weight: 800; font-size: 1.05rem; }
.chip-big.cash { background: var(--warn-soft); color: var(--warn); font-size: 1.2rem; }
.chip-big.credit { background: var(--info-soft); color: var(--info); }
.chip-big.paid { background: var(--ok-soft); color: var(--ok); }
.chip-big.plain { background: var(--surface-3); color: var(--text-2); font-weight: 600; }
.drive-note { display: flex; gap: 10px; align-items: flex-start; background: #fff8db; color: #6b4e00; border-radius: 14px; padding: 12px 14px; font-weight: 600; }
@media (prefers-color-scheme: dark) { .drive-note { background: #3a3110; color: #ffe7a6; } }
.drive-items summary { cursor: pointer; font-weight: 700; color: var(--text-2); min-height: 40px; display: flex; align-items: center; }
.drive-nav { display: flex; gap: 10px; }
.drive-nav .nav-waze { flex: 1; background: #33ccff; color: #05264c; border: 0; font-weight: 800; }
.drive-nav .nav-g { width: 64px; flex-shrink: 0; }
.link-btn { background: none; border: 0; color: var(--muted); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; min-height: 40px; display: inline-flex; align-items: center; gap: 6px; align-self: center; }
/* time banner: a set delivery time can't be missed */
.time-banner { display: flex; align-items: center; gap: 12px; border-radius: 16px; padding: 12px 16px; background: #fff1e0; color: #8a4500; border: 2px solid #f6a54a; }
.time-banner .tb-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #f6a54a; color: #fff; font-size: 1.4rem; flex-shrink: 0; }
.time-banner .tb-t { font-size: 1.45rem; font-weight: 900; line-height: 1.1; }
.time-banner .tb-s { font-weight: 700; font-size: .92rem; }
.time-banner.soon { background: #ffe9d6; border-color: #ea7a0c; } .time-banner.soon .tb-ic { background: #ea7a0c; }
.time-banner.late { background: var(--bad-soft); color: var(--bad); border-color: var(--bad); } .time-banner.late .tb-ic { background: var(--bad); }
.time-banner.compact { padding: 4px 10px; gap: 6px; border-width: 1px; border-radius: 10px; flex-shrink: 0; }
.time-banner.compact .tb-ic { display: none; } .time-banner.compact .tb-t { font-size: .95rem; } .time-banner.compact .tb-s { font-size: .72rem; }
@media (prefers-color-scheme: dark) { .time-banner { background: #3b2608; color: #ffd29a; } .time-banner.soon { background: #4a2a06; } }
/* slide to confirm */
.slide { position: relative; width: 100%; height: 68px; border-radius: 99px; border: 0; background: var(--c, var(--primary)); color: #fff; font: inherit; font-weight: 800; font-size: 1.12rem; overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab; --p: 0; }
.slide.go { --c: #4353e8; } .slide.way { --c: #ea7a0c; } .slide.here { --c: #0a8f5a; }
.slide .sl-fill { position: absolute; inset: 0; background: rgba(255,255,255,.18); transform-origin: right; transform: scaleX(var(--p)); }
.slide .sl-knob { position: absolute; top: 6px; right: 6px; width: 56px; height: 56px; border-radius: 50%; background: #fff; color: var(--c); display: grid; place-items: center; font-size: 1.6rem; box-shadow: 0 4px 12px rgba(0,0,0,.2); transition: transform .25s; z-index: 1; }
.slide .sl-text { position: relative; padding-inline-start: 70px; padding-inline-end: 16px; display: block; text-align: center; }
.slide.done .sl-text { opacity: .4; }
.slide:focus-visible { box-shadow: 0 0 0 4px var(--primary-soft); outline: 2px solid #fff; outline-offset: -6px; }
@media (prefers-reduced-motion: reduce) { .slide .sl-knob { transition: none; } }
/* route sheet */
.route-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.route-stop { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font: inherit; text-align: start; cursor: pointer; color: inherit; }
.route-stop.current { border: 2px solid var(--primary); background: var(--primary-softer); }
.route-stop .rs-n { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; font-weight: 800; flex-shrink: 0; }
.route-stop.current .rs-n { background: var(--primary); color: #fff; }
.route-stop .rs-a { display: block; font-weight: 700; }
.route-stop .rs-s { display: block; font-size: .82rem; color: var(--muted); }

/* ===== platform owner (CRM of all businesses) ===== */
.biz-card { text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
.biz-card:hover, .biz-card:focus-visible { border-color: var(--primary); box-shadow: var(--sh-2); }
.biz-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-size: 1.3rem; flex-shrink: 0; }
.biz-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .84rem; color: var(--text-2); }
.biz-stats span { display: inline-flex; align-items: center; gap: 4px; }
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.type-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 10px; min-height: 96px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); font: inherit; color: inherit; cursor: pointer; text-align: center; }
.type-card[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.type-card .tc-ic { font-size: 1.6rem; }
.switch-row { cursor: pointer; gap: 14px; }
.switch-row.dim { opacity: .55; cursor: not-allowed; }
.code-big { font-size: 1.3rem; letter-spacing: 2px; font-weight: 800; }
.invite-text { padding: 14px; white-space: pre-wrap; }
.narrow-form { max-width: 860px; }
.warn-t { color: var(--warn); }
.support-bar { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: #5b21b6; color: #fff; font-weight: 700; font-size: .9rem; }
.support-bar .btn { background: #fff; color: #5b21b6; border: 0; }
@media (max-width: 520px) { .support-bar { flex-wrap: wrap; } .support-bar .btn { width: 100%; justify-content: center; } }

/* ===== customer tracking page: no map — the stage, and a road with the courier riding on it ===== */
.trk-body { background: radial-gradient(1200px 500px at 50% -120px, var(--primary-soft), transparent 70%), var(--bg); min-height: 100vh; --trk-accent: var(--primary); }
.trk { max-width: 520px; margin: 0 auto; padding: 22px 16px 40px; display: flex; flex-direction: column; gap: 16px; }
.trk-brand { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; }
.trk-brand img { max-height: 52px; max-width: 180px; object-fit: contain; border-radius: 10px; }
.trk-brand b { font-size: 1.15rem; }
.trk-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--sh-2); padding: 22px 18px 18px; display: flex; flex-direction: column; gap: 18px; }
.trk-title { text-align: center; }
.trk-title h1 { margin: 0; font-size: 1.6rem; font-weight: 900; letter-spacing: -.01em; }
.trk-sub { margin: 6px 0 0; color: var(--text-2); font-weight: 600; font-size: 1.02rem; }
.trk-road { position: relative; width: 100%; aspect-ratio: 320 / 120; }
.trk-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.trk-road-bg { fill: none; stroke: var(--surface-3); stroke-width: 14; stroke-linecap: round; }
.trk-road-rest { fill: none; stroke: var(--faint); stroke-width: 3; stroke-linecap: round; }
.trk-road-done { fill: none; stroke: var(--trk-accent); stroke-width: 7; stroke-linecap: round; filter: drop-shadow(0 2px 6px color-mix(in srgb, var(--trk-accent) 45%, transparent)); }
.trk-end { position: absolute; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--line); color: var(--text-2); font-size: 1.1rem; transform: translate(-50%, -50%); }
.trk-end.shop { left: 92.5%; top: 76.7%; }
.trk-end.home { left: 7.5%; top: 26.7%; }
.trk-road.delivered .trk-end.home, .trk-road.arrived .trk-end.home { border-color: var(--ok); color: var(--ok); }
.trk-road.arrived .trk-end.home::after { content: ''; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid var(--ok); animation: trk-ping 1.6s ease-out infinite; }
.trk-rider { position: absolute; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--trk-accent); color: #fff; font-size: 1.45rem; transform: translate(-50%, -50%); box-shadow: 0 8px 20px color-mix(in srgb, var(--trk-accent) 40%, transparent), 0 0 0 5px var(--surface); z-index: 2; }
.trk-road.on_way .trk-rider .ic { animation: trk-bob .9s ease-in-out infinite alternate; }
.trk-road.busy .trk-rider { background: var(--surface); color: var(--trk-accent); border: 2px solid var(--trk-accent); }
.trk-road.delivered .trk-rider { background: var(--ok); }
.trk-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; position: relative; }
.trk-steps li { display: flex; align-items: center; gap: 12px; padding: 7px 4px; color: var(--muted); font-weight: 600; position: relative; }
.trk-steps li:not(:last-child)::before { content: ''; position: absolute; right: 21px; top: 38px; height: calc(100% - 22px); width: 2px; background: var(--line); }
.trk-steps li.done::before { background: var(--trk-accent); }
.trk-dot { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); flex-shrink: 0; font-size: 1rem; position: relative; z-index: 1; }
.trk-steps li.done { color: var(--text-2); }
.trk-steps li.done .trk-dot { background: color-mix(in srgb, var(--trk-accent) 16%, var(--surface)); color: var(--trk-accent); }
.trk-steps li.now { color: var(--text); font-weight: 800; font-size: 1.05rem; }
.trk-steps li.now .trk-dot { background: var(--trk-accent); color: #fff; box-shadow: 0 0 0 6px color-mix(in srgb, var(--trk-accent) 18%, transparent); }
.trk-alert { display: flex; gap: 10px; align-items: center; justify-content: center; padding: 14px; border-radius: 16px; background: var(--warn-soft); color: var(--warn); font-weight: 700; }
.trk-card.cancelled .trk-alert { background: var(--bad-soft); color: var(--bad); }
.trk-foot { text-align: center; color: var(--muted); font-size: .85rem; line-height: 1.6; margin: 0; }
@keyframes trk-bob { from { transform: translateY(-2px) rotate(-3deg); } to { transform: translateY(2px) rotate(3deg); } }
@keyframes trk-ping { from { transform: scale(.7); opacity: .9; } to { transform: scale(1.5); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .trk-road .trk-rider .ic, .trk-road.arrived .trk-end.home::after { animation: none; } }

/* courier: what to hand over — always open, a coloured frame per product */
.goods { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.good { --g: var(--primary); display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 2px solid var(--g); border-inline-start-width: 8px;
  background: color-mix(in srgb, var(--g) 9%, var(--surface)); }
.good .g-qty { min-width: 52px; padding: 4px 10px; border-radius: 10px; background: var(--g); color: #fff; font-weight: 900; font-size: 1.15rem; text-align: center; flex-shrink: 0; }
.good .g-name { font-weight: 800; font-size: 1.08rem; line-height: 1.3; overflow-wrap: anywhere; }
/* customers */
.cust-av { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-weight: 800; flex-shrink: 0; }
.cust-av.lg { width: 60px; height: 60px; font-size: 1.5rem; }
.cust-row { text-decoration: none; color: inherit; }
.cust-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.cust-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.vip { color: #d4a106; margin-inline-start: 6px; display: inline-flex; vertical-align: middle; }
.cust-known { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; background: var(--surface-2, var(--surface-3)); border: 1px solid var(--line); }
.pay-tile.direct { border-color: var(--info); }
.ob-step { text-decoration: none; color: inherit; }
.ob-step.done { opacity: .6; }
.ob-step.done .lead { color: var(--ok); }
.brand-preview { padding: 16px; border-radius: 16px; background: var(--surface-3); }
.decide-card { border: 2px solid var(--bad); }
.decide-btns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 520px) { .decide-btns { grid-template-columns: 1fr; } }
.plain-list { margin: 0; padding-inline-start: 18px; }
/* many items: tiles side by side, nothing to scroll; more than 6 → "all items" */
.goods-h { font-size: .9rem; color: var(--text-2); margin-bottom: 6px; }
.goods.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 360px) { .goods.grid.dense { grid-template-columns: repeat(3, minmax(0, 1fr)); } .goods.grid.dense .good.tile { min-height: 70px; } }
.good.tile { flex-direction: column; align-items: flex-start; gap: 6px; padding: 8px 10px; border-width: 2px; border-inline-start-width: 2px; border-top-width: 6px; min-height: 78px; }
.good.tile .g-qty { min-width: 0; font-size: 1.05rem; padding: 2px 9px; }
.good.tile .g-name { font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.good.tile.more { --g: var(--text-2); padding: 0; background: var(--surface-3); border-style: dashed; }
.good.tile.more button { all: unset; box-sizing: border-box; width: 100%; height: 100%; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; }
.good.tile.more button:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 12px; }
.age-check { padding: 12px; border-radius: 12px; background: var(--warn-soft); }
