/* Anka Sales: the "Combined" look Said chose (November 29, 2026): the website's charcoal header with the white logo and
   Archivo headings, the B2B shop's white cards, deep green and light-green bars, the logo's lime for actions, Geist for
   text, the dark floating dock. iPad first, iPhone and desktop too. */
:root {
  --surface: #F4F5F0; --card: #FFFFFF; --recess: #EEF3E4; --ink: #292724; --muted: #5A5F55; --tertiary: #5A5F55;
  --on-ink: #FFFFFF; --border-soft: rgba(41, 39, 36, 0.06); --border: #E1E6D8; --border-input: #C2C9B8;
  --brand: #9BC31C; --brand-dark: #86AB12; --brand-tint: #F3F8EC; --brand-ring: rgba(155, 195, 28, 0.35); --on-brand: #292724;
  --accent: #3F6B17; --header: #292724; --on-header: #FFFFFF;
  --dock: #292724; --on-dock: #FFFFFF;
  --urgent: #A32D2D; --urgent-bg: #FCEBEB; --watch: #BA7517; --watch-bg: #FAEEDA; --watch-text: #8F5810;
  --ok: #639922; --ok-bg: #EAF3DE; --ok-text: #2F6B12; --idle: #6F6A5E;
  --shadow-card: 0 1px 2px rgba(41, 39, 36, 0.05), 0 2px 8px rgba(41, 39, 36, 0.05);
  --shadow-3d: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 1px 2px rgba(40, 39, 35, 0.08), 0 3px 6px rgba(40, 39, 35, 0.08), 0 8px 16px rgba(40, 39, 35, 0.06);
  --r-control: 8px; --r-tile: 12px; --r-card: 12px; --r-hero: 20px;
  --font: Geist, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: Archivo, Geist, system-ui, sans-serif;
  --dockh: 64px; --clear: calc(var(--dockh) + 20px + env(safe-area-inset-bottom));
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --surface: #1A1814; --card: #22201C; --recess: #3A3631; --ink: #F2F0EA; --muted: rgba(242, 240, 234, 0.82); --tertiary: rgba(242, 240, 234, 0.68);
  --on-ink: #22201C; --border-soft: rgba(242, 240, 234, 0.06); --border: rgba(242, 240, 234, 0.2); --border-input: rgba(242, 240, 234, 0.38);
  --brand-tint: rgba(155, 195, 28, 0.1); --brand-ring: rgba(155, 195, 28, 0.45); --dock: #36332D; --on-dock: #F2F0EA;
  --accent: #9CC265; --header: #141310; --on-header: #F2F0EA;
  --urgent: #F07070; --urgent-bg: rgba(163, 45, 45, 0.18); --watch: #E6A23C; --watch-bg: rgba(186, 117, 23, 0.18); --watch-text: #E6A23C;
  --ok: #9CC265; --ok-bg: rgba(99, 153, 34, 0.18); --ok-text: #9CC265; --idle: #A39E90;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 14px rgba(0, 0, 0, 0.25); --shadow-3d: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 16px rgba(0, 0, 0, 0.35);
  color-scheme: dark; } }
:root[data-theme="dark"] {
  --surface: #1A1814; --card: #22201C; --recess: #3A3631; --ink: #F2F0EA; --muted: rgba(242, 240, 234, 0.82); --tertiary: rgba(242, 240, 234, 0.68);
  --on-ink: #22201C; --border-soft: rgba(242, 240, 234, 0.06); --border: rgba(242, 240, 234, 0.2); --border-input: rgba(242, 240, 234, 0.38);
  --brand-tint: rgba(155, 195, 28, 0.1); --brand-ring: rgba(155, 195, 28, 0.45); --dock: #36332D; --on-dock: #F2F0EA;
  --accent: #9CC265; --header: #141310; --on-header: #F2F0EA;
  --urgent: #F07070; --urgent-bg: rgba(163, 45, 45, 0.18); --watch: #E6A23C; --watch-bg: rgba(186, 117, 23, 0.18); --watch-text: #E6A23C;
  --ok: #9CC265; --ok-bg: rgba(99, 153, 34, 0.18); --ok-text: #9CC265; --idle: #A39E90;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 14px rgba(0, 0, 0, 0.25); --shadow-3d: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 16px rgba(0, 0, 0, 0.35);
  color-scheme: dark; }

/* `hidden` means hidden, whatever display a rule below gives the element: without this the dock and the bell showed,
   dead, on the sign-in and invitation pages (audit of November 29, 2026, L4). */
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--surface); color: var(--ink); font: 15px/1.45 var(--font); font-variant-numeric: tabular-nums;
       -webkit-font-smoothing: antialiased; padding-bottom: var(--clear); }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 5px var(--brand-ring); }
.display { font-family: var(--display); font-weight: 750; font-stretch: 92%; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .92em; }

/* header: the logo, the page's title, the language and sync words */
header#bar { position: sticky; top: 0; z-index: 6; background: var(--header); color: var(--on-header); border-bottom: 4px solid var(--brand); display: flex; align-items: center; gap: 12px;
  padding: max(8px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left)); }
header#bar .brand { display: flex; align-items: center; flex: none; }
header#bar .brand img { height: 34px; width: auto; display: block; }
.logo-dark { display: none !important; }
header#bar .logo-light { display: none !important; } header#bar .logo-dark { display: block !important; }   /* the header is dark: the white logo */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-light { display: none !important; } :root:not([data-theme="light"]) .logo-dark { display: block !important; } }
:root[data-theme="dark"] .logo-light { display: none !important; } :root[data-theme="dark"] .logo-dark { display: block !important; }
.htext { flex: 1; min-width: 0; border-left: 1px solid rgba(255, 255, 255, 0.25); padding-left: 12px; }
#title { font-family: var(--display); font-weight: 750; font-stretch: 92%; font-size: 19px; line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#sub { font-size: 12px; color: color-mix(in srgb, var(--on-header) 70%, transparent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#lang { background: var(--card); color: var(--ink); border: 0.5px solid var(--border-input); border-radius: 999px; padding: 6px 12px; font: 600 12px var(--font); min-height: 32px; }
#net { background: var(--watch-bg); color: var(--watch-text); padding: 8px 16px; font-size: 13px; font-weight: 600; text-align: center; }
main { max-width: 1100px; margin: 0 auto; padding: 14px max(16px, env(safe-area-inset-right)) 14px max(16px, env(safe-area-inset-left)); }

/* the dock: a dark capsule floating over the bottom; the current page is a lime pill */
nav#nav { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 7;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; padding: 6px; width: min(560px, calc(100vw - 24px)); height: var(--dockh);
  background: var(--dock); border-radius: 999px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); }
nav#nav a, nav#nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 26px;
  color: color-mix(in srgb, var(--on-dock) 78%, transparent); text-decoration: none; font: 600 11px var(--font); line-height: 1; background: none; border: 0; cursor: pointer; }
nav#nav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
nav#nav .on { background: var(--brand); color: var(--on-brand); } nav#nav .on svg { stroke-width: 2; }

h2 { font: 750 22px/1.2 var(--display); font-stretch: 92%; margin: 6px 0 12px; }
h3 { font: 750 16px/1.3 var(--display); font-stretch: 92%; margin: 18px 0 8px; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.muted { color: var(--muted); } .small { font-size: 13px; } .center { text-align: center; } .pad { padding: 30px 0; }
input[type=search], input[type=text], input[type=email], input[type=password], input[type=date], input[type=datetime-local], input[type=number], textarea, select {
  width: 100%; padding: 11px 12px; border: 0.5px solid var(--border-input); border-radius: var(--r-control); font: inherit; font-size: 16px;
  background: var(--card); color: var(--ink); min-height: 44px; }
textarea { min-height: 84px; resize: vertical; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 14px 0 6px; }
button, .btn { font: inherit; cursor: pointer; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-align: center; background: var(--brand); color: var(--on-brand);
  border: 0.5px solid var(--brand); border-radius: var(--r-control); padding: 11px 16px; font-weight: 700; font-size: 15px; text-decoration: none; min-height: 44px;
  transition: background .15s, transform .08s; }
.btn:hover { background: var(--brand-dark); } .btn:active { transform: scale(0.98); }
.btn.block { display: flex; width: 100%; margin-top: 12px; }
.btn.ghost { background: var(--card); color: var(--ink); border-color: var(--border-input); box-shadow: 0 1px 2px rgba(40, 39, 35, 0.05); }
.btn.ghost:hover { border-color: var(--brand-dark); }
.btn.dark { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.btn.small { padding: 7px 12px; font-size: 13px; min-height: 36px; }
.btn[disabled] { opacity: .55; cursor: default; transform: none; }
.chips { display: flex; gap: 6px; overflow-x: auto; margin: 10px 0; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 0.5px solid var(--border); background: var(--card); color: var(--muted); border-radius: 999px;
  padding: 7px 13px; font-size: 13px; font-weight: 600; white-space: nowrap; min-height: 34px; }
.chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.card { background: var(--card); border: 0.5px solid var(--border); border-radius: var(--r-card); padding: 13px 15px; margin-bottom: 10px; display: block;
  color: inherit; text-decoration: none; box-shadow: var(--shadow-card); }
a.card:hover, button.card:hover { background: linear-gradient(to right, var(--brand-tint), var(--card)); }
.card .top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.card .t { font-weight: 700; }
.section { background: var(--card); border: 0.5px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow-3d); padding: 14px 16px; margin-bottom: 14px; }
.badge { font-size: 11px; border-radius: 999px; padding: 3px 10px; font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; line-height: 1.4; }
.b-green { background: var(--ok-bg); color: var(--ok-text); } .b-amber { background: var(--watch-bg); color: var(--watch-text); }
.b-red { background: var(--urgent-bg); color: var(--urgent); } .b-gray { background: var(--border-soft); color: var(--ink); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.tabs { display: flex; gap: 4px; margin: 10px 0 12px; overflow-x: auto; background: var(--recess); padding: 4px; border-radius: 999px; width: max-content; max-width: 100%; }
.tabs a { padding: 8px 16px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; white-space: nowrap; border-radius: 999px; }
.tabs a.on { color: var(--ink); background: var(--card); box-shadow: var(--shadow-card); }
.item { display: flex; gap: 10px; align-items: center; border-bottom: 0.5px solid var(--border); padding: 10px 0; }
.item img { width: 54px; height: 54px; object-fit: contain; border-radius: var(--r-control); background: color-mix(in srgb, var(--recess) 55%, transparent); mix-blend-mode: multiply; flex: none; }
.item .grow { flex: 1; min-width: 0; }
.item .n { font-size: 15px; font-weight: 600; } .item .s { color: var(--muted); font-size: 13px; }
.qty { display: flex; align-items: center; gap: 6px; flex: none; }
.qty button { width: 38px; height: 38px; border: 0.5px solid var(--border-input); background: var(--card); color: var(--ink); border-radius: var(--r-control); font-size: 20px; }
.qty input { width: 56px; text-align: center; padding: 6px 2px; min-height: 38px; font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; }
/* the browser's own up/down arrows took the right side of the box and pushed the number left (Said, November 30, 2026) */
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { -webkit-appearance: none; appearance: none; margin: 0; }
.w-low { color: var(--watch-text); font-weight: 600; } .w-in { color: var(--ok-text); font-weight: 600; } .w-out { color: var(--urgent); font-weight: 600; } .w-soon { color: var(--ink); }
.cartbar { position: fixed; left: 50%; transform: translateX(-50%); width: min(560px, calc(100vw - 24px)); bottom: calc(var(--dockh) + 18px + env(safe-area-inset-bottom));
  z-index: 5; padding: 8px 8px 8px 16px; background: var(--card); border: 0.5px solid var(--border); border-radius: 999px; box-shadow: var(--shadow-3d);
  display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tot { display: flex; justify-content: space-between; font-weight: 700; padding: 10px 0; font-size: 17px; }
.reward { color: var(--ok-text); }
.note { font-size: 13px; color: var(--ink); background: var(--ok-bg); border-radius: 12px; padding: 10px 12px; margin: 10px 0; }
.warn { background: var(--watch-bg); color: var(--watch-text); } .err { background: var(--urgent-bg); color: var(--urgent); }
.alertbar { display: flex; gap: 10px; align-items: flex-start; background: var(--watch-bg); color: var(--watch-text); border-radius: 12px; padding: 11px 13px;
  margin: 8px 0 10px; font-size: 14px; font-weight: 600; }   /* amber: a caution (a low price); red stays for overdue and holds */
.alertbar .ic { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--watch-text); color: var(--on-ink); display: grid; place-items: center; font-weight: 800; }
.lowmark { display: inline-flex; align-items: center; gap: 4px; color: var(--urgent); font-weight: 700; font-size: 12px; }
.lowmark::before { content: "!"; width: 16px; height: 16px; border-radius: 50%; background: var(--urgent); color: #fff; display: grid; place-items: center; font-size: 11px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kv { display: flex; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
#toast { position: fixed; left: 50%; transform: translateX(-50%); width: min(520px, calc(100vw - 32px)); bottom: calc(var(--dockh) + 76px + env(safe-area-inset-bottom));
  background: var(--ink); color: var(--on-ink); border-radius: 14px; padding: 12px 16px; z-index: 40; text-align: center; font-weight: 600; box-shadow: var(--shadow-3d); }
.login { max-width: 400px; margin: 40px auto; background: var(--card); border-radius: var(--r-hero); padding: 28px 24px; box-shadow: var(--shadow-3d); border: 0.5px solid var(--border); }
.login .logo { display: block; margin: 0 auto 6px; width: 170px; height: auto; }
.login .eyebrow { text-align: center; margin-bottom: 8px; }
.mb10 { margin: 0 0 10px; } .mb6 { margin-bottom: 6px; } .mt4 { margin-top: 4px; } .mt8 { margin-top: 8px; }
.spacer { height: 70px; } .flexgap { display: flex; gap: 6px; flex-wrap: wrap; }
.bal { margin: 6px 0 4px; font-size: 14px; } .bal summary { cursor: pointer; } .bal .kv { margin: 4px 0 0 12px; }
.searchrow { display: flex; gap: 8px; align-items: center; } .searchrow input { flex: 1; }
.filters { flex-wrap: wrap; gap: 6px; } .filters select { width: auto; max-width: 48%; min-height: 36px; padding: 6px 12px; border-radius: 999px; font-size: 14px; }
#scanbox video { width: 100%; max-height: 260px; background: #000; border-radius: var(--r-card); }
.sheet { position: fixed; inset: 0; background: rgba(20, 18, 14, 0.42); display: flex; align-items: flex-end; justify-content: center; z-index: 30; }
.sheetin { background: var(--card); width: 100%; max-width: 620px; border-radius: var(--r-hero) var(--r-hero) 0 0; padding: 20px 18px calc(18px + env(safe-area-inset-bottom));
  max-height: 88vh; overflow: auto; box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.2); }
.opt { display: flex; gap: 10px; align-items: center; padding: 9px 0; font-size: 16px; color: var(--ink); font-weight: 500; margin: 0; }
.bar { display: grid; grid-template-columns: 110px 1fr 100px; align-items: center; gap: 8px; font-size: 14px; margin: 6px 0; }
.bar meter { width: 100%; height: 10px; } .bar b { text-align: right; }

/* the dashboard */
.period { margin-top: 0; }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 700px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { display: block; padding: 13px 15px; border-radius: var(--r-tile); background: var(--card); border: 0.5px solid var(--border); box-shadow: var(--shadow-card);
  color: inherit; text-decoration: none; min-width: 0; }
a.kpi:hover { background: var(--brand-tint); }
.kpi .lbl { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .num { font-family: var(--display); font-stretch: 92%; font-size: 28px; font-weight: 800; line-height: 1.15; margin-top: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kpi.lead { grid-column: span 2; background: var(--dock); color: var(--on-dock); border-color: var(--dock); }
.kpi.lead .lbl, .kpi.lead .sub { color: color-mix(in srgb, var(--on-dock) 80%, transparent); } .kpi.lead .num { color: var(--brand); font-size: 36px; }
.kpi.alert { box-shadow: inset 3px 0 0 var(--urgent), var(--shadow-card); }
.reps { width: 100%; border-collapse: collapse; font-size: 14px; }
.reps th, .reps td { padding: 9px 10px; border-bottom: 0.5px solid var(--border); text-align: right; white-space: nowrap; }
.reps th { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tertiary); font-weight: 600; }
.reps th:first-child, .reps td:first-child { text-align: left; }
.tablewrap { overflow-x: auto; }
.hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin: 4px 0 6px; }
.hello h2 { margin: 0; }

/* the customer page header */
.chead { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.chead .grow { flex: 1; min-width: 200px; }
.chead h2 { margin: 0 0 2px; }
.headrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.visitbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: var(--card); border: 0.5px solid var(--border); border-radius: var(--r-card);
  padding: 10px 12px; margin: 10px 0; box-shadow: var(--shadow-card); }
.visitbar input { width: auto; flex: 1; min-width: 190px; }
.visitbar.done { background: var(--ok-bg); border-color: transparent; color: var(--ok-text); font-weight: 600; }
.visitbar.done .btn { margin-left: auto; }

/* an order's steps */
.steps { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 0; }
.steps li { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: start; padding: 0 0 14px; position: relative; }
.steps li::before { content: ""; position: absolute; left: 12px; top: 22px; bottom: -2px; width: 2px; background: var(--border); }
.steps li:last-child::before { display: none; }
.steps .mk { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border-input); background: var(--card); display: grid; place-items: center; font-size: 13px; font-weight: 800; z-index: 1; }
.steps li.done .mk { background: var(--ok); border-color: var(--ok); color: #fff; }
.steps li.done::before { background: var(--ok); }
.steps li.now .mk { border-color: var(--watch); color: var(--watch); }
.steps .w { font-weight: 600; padding-top: 2px; } .steps .d { color: var(--muted); font-size: 13px; padding-top: 3px; }

/* the map */
.mapwrap { position: relative; height: calc(100vh - 210px); min-height: 380px; border-radius: var(--r-card); overflow: hidden; border: 0.5px solid var(--border); box-shadow: var(--shadow-3d); }
#map { position: absolute; inset: 0; }
.maptools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.maptools select, .maptools input { width: auto; min-width: 150px; }
.pin { width: 16px; height: 16px; border-radius: 50%; background: var(--ok); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35); cursor: pointer; }
.pin.approx { background: transparent; border: 3px solid var(--ok); }
.stopnum { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; font: 800 13px var(--font); border: 2px solid var(--brand); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); }
.arrow { width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 13px solid var(--urgent); }
.maplibregl-popup-content { font: 14px var(--font); border-radius: 12px !important; color: #282723; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 8px; }

/* settings and More */
.setrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 0.5px solid var(--border); }
.setrow:last-child { border-bottom: 0; } .setrow .grow { flex: 1; min-width: 0; } .setrow select { width: auto; min-width: 150px; }
.menu a { display: flex; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: 0.5px solid var(--border); text-decoration: none; font-weight: 600; font-size: 16px; }
.menu a:last-child { border-bottom: 0; } .menu svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); }
.toggle { position: relative; width: 46px; height: 28px; border-radius: 999px; background: var(--border-input); border: 0; padding: 0; flex: none; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); transition: transform .18s; }
.toggle[aria-checked="true"] { background: var(--brand); } .toggle[aria-checked="true"]::after { transform: translateX(18px); }

/* iPad first: the search always at the top, the cart beside the products from 1000px */
main.wide { max-width: 1400px; }
.stick { position: sticky; top: 58px; z-index: 3; background: var(--surface); padding: 8px 0 2px; }
#ps { font-size: 18px; padding: 13px 14px; border-width: 1.5px; border-color: var(--ink); }
.scanbtn { padding: 12px 18px; font-size: 16px; white-space: nowrap; min-height: 50px; }
.rhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.rhead h3 { margin: 12px 0 8px; }
.grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.pcard { background: var(--card); border: 0.5px solid var(--border); border-radius: var(--r-tile); padding: 10px; align-items: center; box-shadow: var(--shadow-card); }
.pcard.incart { box-shadow: inset 4px 0 0 var(--brand), var(--shadow-card); background: linear-gradient(to right, var(--brand-tint), var(--card)); }
.pcard img, .pcard .noimg { width: 64px; height: 64px; border-radius: var(--r-control); object-fit: contain; background: color-mix(in srgb, var(--recess) 55%, transparent); }
.pcard .n { font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .s { margin-top: 2px; }
.cartpanel { display: none; }
.cline { padding: 10px 0; } .cline .n { font-size: 14px; } .cart-h { margin-top: 4px; }
.tot.sub { font-weight: 400; color: var(--muted); padding: 4px 0; font-size: 14px; }
#scanbox { margin: 6px 0; } .scanfoot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 6px; }
@media (pointer: coarse), (min-width: 600px) {
  .qty button { width: 46px; height: 46px; font-size: 24px; } .qty input { width: 58px; height: 46px; font-size: 18px; }
}
#results, #scanhit { container-type: inline-size; }
@container (min-width: 880px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) {
  .order { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 18px; align-items: start; }
  .cartpanel { display: block; position: sticky; top: 66px; max-height: calc(100vh - 66px - var(--clear)); overflow: auto;
    background: var(--card); border: 0.5px solid var(--border); border-radius: var(--r-card); padding: 6px 16px 16px; box-shadow: var(--shadow-3d); }
  .cartpanel .qty button { width: 40px; height: 40px; font-size: 20px; } .cartpanel .qty input { width: 50px; height: 40px; }
  main.wide .cartbar, main.wide ~ .cartbar { display: none; }
  .order + .spacer { height: 0; }
}
.pcard { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-areas: "img text qty"; gap: 12px; }
.pcard > img, .pcard > .noimg { grid-area: img; } .pcard > .grow { grid-area: text; } .pcard > .qty { grid-area: qty; }
@media (max-width: 599px) {
  .pcard { grid-template-columns: 56px minmax(0, 1fr); grid-template-areas: "img text" "img qty"; row-gap: 6px; }
  .pcard > .qty { justify-self: end; } .pcard img, .pcard .noimg { width: 56px; height: 56px; }
  header#bar .brand img { height: 28px; } #title { font-size: 17px; }
  nav#nav a, nav#nav button { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; } }

/* the scan sheet: quantity for the scanned product, its own number pad, the camera above stays open */
.qsheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: center; pointer-events: none; }
.qsheetin { pointer-events: auto; width: 100%; max-width: 520px; background: var(--card); border: 1px solid var(--border); border-radius: 16px 16px 0 0;
            box-shadow: 0 -6px 24px rgba(0,0,0,.18); padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); }
.qhead { display: flex; gap: 12px; align-items: center; }
.qhead img, .qhead .noimg { width: 64px; height: 64px; object-fit: contain; border-radius: 8px; flex: none; }
.qhead .n { font-weight: 700; } .qhead .s { color: var(--muted); font-size: 13px; }
.qrow { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 12px 0 8px; }
.qrow output { min-width: 110px; text-align: center; font-size: 40px; font-weight: 800; font-variant-numeric: tabular-nums; }
.qstep { width: 64px; height: 56px; border-radius: 12px; border: 1px solid var(--border); background: var(--ok-bg); color: var(--ink); font-size: 28px; }
.qpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.qpad button { height: 54px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); color: var(--ink); font-size: 22px; font-weight: 600; }
.qpad button:active, .qstep:active { background: var(--ok-bg); }
.qsheetin .row2 .btn { flex: 1; min-height: 52px; font-size: 17px; }
@media (min-width: 1000px) { .qsheet { justify-content: flex-start; padding-left: max(16px, calc((100vw - 1400px) / 2 + 16px)); } }
@media (max-height: 700px) { .qpad button { height: 44px; } .qrow output { font-size: 32px; } }

/* complaints */
.card.pick { width: 100%; text-align: left; font: inherit; cursor: pointer; }
.reasons { flex-wrap: wrap; }
.reasons .chip { margin: 0; display: inline-flex; gap: 6px; align-items: center; font-size: 15px; padding: 8px 12px; }
.photos { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.photos .ph { position: relative; }
.photos img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }
.photos button { position: absolute; top: -6px; right: -6px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--urgent); color: #fff; }
.cline label.opt { display: flex; gap: 10px; align-items: flex-start; margin: 0; color: var(--ink); font-size: 15px; }
.cline label.opt .s { display: block; }
.chips.flat { margin: 0; } .dot.exact { background: var(--ok); } .dot.approx { border: 2px solid var(--ok); }
.steps li.stop .mk { background: var(--urgent); border-color: var(--urgent); color: #fff; }

/* notifications */
#bell { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: inherit; flex: none; }
#bell svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#bellnum { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--urgent); color: #fff;
  font: 700 11px/18px var(--font); text-align: center; }
.notice h3 { margin: 10px 0 6px; } .notice .top { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-start; }
.nbody { white-space: pre-line; margin: 0 0 8px; } .nimg { display: block; max-width: 100%; max-height: 420px; border-radius: var(--r-control); margin-top: 6px; }
.newsbar { display: flex; gap: 8px; align-items: center; background: var(--card); border: 0.5px solid var(--border); border-radius: var(--r-card); padding: 10px 14px;
  margin-bottom: 12px; text-decoration: none; box-shadow: var(--shadow-card); }
.newdot { background: var(--urgent); }
.setup { border-left: 4px solid var(--brand); } .setup p { margin: 6px 0 10px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .item img { mix-blend-mode: normal; } }
:root[data-theme="dark"] .item img { mix-blend-mode: normal; }

/* view only (SALES_VIEW_ONLY=1): the app on live Odoo for looking, nothing written */
.viewonly { background: #FFF1DB; color: #8A4B00; font-size: 13px; font-weight: 600; text-align: center; padding: 6px 16px; }
:root[data-theme="dark"] .viewonly { background: #3A2A10; color: #FFD9A0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .viewonly { background: #3A2A10; color: #FFD9A0; } }

/* the customer's details (read only; changes go to the office) */
.details .kvrow { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 0.5px solid var(--border); }
.details .kvrow:last-child { border-bottom: 0; }
.details .kvrow > span:last-child { text-align: right; }

/* the rep's price room (Said, November 30, 2026): red beyond 5%, the order's share, the request to management */
.redtext { color: var(--urgent); font-weight: 600; }
.linebtns { display: flex; gap: 6px; margin-top: 6px; }
.btn.tiny { min-height: 30px; padding: 4px 10px; font-size: 13px; }
.roombar { display: flex; flex-direction: column; gap: 2px; background: var(--recess, #EEF3E4); border-radius: 10px; padding: 8px 12px; margin: 8px 0; font-size: 14px; }
.roombar.over { background: var(--urgent-bg); color: var(--urgent); }
.askwait { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.qty.big { justify-content: center; margin: 10px 0; }
.asktable { width: 100%; border-collapse: collapse; font-size: 14px; margin: 8px 0; }
.asktable th, .asktable td { text-align: left; padding: 6px 4px; border-bottom: 0.5px solid var(--border); }
.asktable td.num, .asktable th.num { text-align: right; font-variant-numeric: tabular-nums; }
.asktable input { width: 90px; min-height: 34px; text-align: right; }
