/* Tokens live in theme.css (loaded first). This file only uses them. */

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  min-height: 100dvh;
}
body.no-scroll { overflow: hidden; }

.hidden { display: none !important; }
.muted { color: var(--ink-soft); }
.small { font-size: 13px; }

/* ---------- login ---------- */
.login-wrap {
  min-height: 100dvh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 24px; max-width: 420px; margin: 0 auto;
}
.brand { text-align: center; margin-bottom: 28px; }
.brand-mark {
  width: 72px; height: 72px; margin: 0 auto 14px;
  background: var(--leaf); color: #fff;
  border-radius: 20px; display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700; letter-spacing: 1px;
}
.brand h1 { font-size: 24px; font-weight: 700; }
.brand p { margin-top: 4px; }

/* ---------- cards & forms ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.card h2 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }

label { display: block; font-size: 13px; color: var(--ink-soft); margin: 12px 0 0; }
input, select[data-kind="choice"] {
  display: block; width: 100%; margin-top: 6px;
  padding: 12px 14px; font-size: 16px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--ink);
}
input:focus, select[data-kind="choice"]:focus {
  outline: 2px solid var(--berry); outline-offset: 0; border-color: var(--berry);
}

.btn {
  display: inline-block; margin-top: 14px;
  padding: 12px 18px; font-size: 15px; font-weight: 600;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--ink); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn.primary { background: var(--leaf); border-color: var(--leaf); color: #fff; width: 100%; }
.btn.primary:active { background: var(--leaf-deep); }
.btn:disabled { opacity: .55; }
.btn.danger-outline { color: var(--danger); border-color: var(--danger); background: var(--card); width: auto; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; width: 100%; }
.btnrow { display: flex; gap: 10px; }
.btnrow .btn { flex: 1; width: auto; }

.linkbtn {
  background: none; border: none; padding: 4px 2px;
  font-family: inherit; font-size: 14px; font-weight: 600;
  color: var(--berry); cursor: pointer;
}
.linkbtn.light { color: #fff; }

.error { color: var(--danger); font-size: 14px; margin-top: 10px; }
.status { font-size: 14px; margin-top: 10px; }
.status.ok { color: var(--ok); }
.status.bad { color: var(--danger); }

/* ---------- app shell ---------- */
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 10px;
  background: var(--leaf); color: #fff;
  padding: calc(env(safe-area-inset-top) + 12px) 16px 12px;
  font-size: 17px; font-weight: 600;
}
/* The title takes the free width, so ↻ stays at the right edge whether or
   not the archive button is showing. */
#topbar-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-mark {
  background: rgba(255,255,255,.16);
  border-radius: 8px; padding: 2px 7px;
  font-size: 13px; font-weight: 700; letter-spacing: 1px;
}
.iconbtn {
  margin-left: auto; background: none; border: none; color: #fff;
  font-size: 22px; line-height: 1; cursor: pointer; padding: 4px 6px;
}
.iconbtn.tight { margin-left: 0; }
.iconbtn.dark { margin-left: auto; color: var(--ink); font-size: 26px; }

.page { padding: 14px 14px calc(env(safe-area-inset-bottom) + 84px); max-width: 560px; margin: 0 auto; }

/* ---------- money ---------- */
.tab-num { font-variant-numeric: tabular-nums; white-space: nowrap; }

.money-card { background: var(--leaf); border-color: var(--leaf); color: #fff; }
.money-label { font-size: 13px; opacity: .85; }
.money-big {
  font-size: 34px; font-weight: 700; letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums; margin-top: 4px;
}
.money-sub { font-size: 12px; opacity: .7; margin-top: 6px; }

.row-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px; color: var(--ink-soft); font-weight: 600;
  text-transform: uppercase; letter-spacing: .4px;
  padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.row-head .tab-num { color: var(--ink); font-size: 15px; }
.rows { padding-top: 4px; }
.rows .row { border-bottom: 1px dashed var(--line); }
.rows .row:last-child { border-bottom: none; }
.row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 10px 0; font-size: 15px; gap: 12px;
}
.row span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strong { font-weight: 700; }
.empty { color: var(--ink-soft); font-size: 14px; padding: 10px 0; }

.total-card { background: var(--fill); }

.banner {
  border-radius: var(--radius); padding: 12px 14px;
  font-size: 14px; margin-bottom: 12px; line-height: 1.45;
}
.banner.danger { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-line); }

/* ---------- bottom nav ---------- */
.bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 5;
  display: flex; background: var(--card); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.navbtn {
  flex: 1; padding: 10px 0 8px;
  background: none; border: none; cursor: pointer;
  font-size: 12px; color: var(--ink-soft);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.navbtn .navicon { font-size: 20px; line-height: 1; }
.navbtn.active { color: var(--berry); font-weight: 600; }

/* A card leaving the list fades where it was, over the others (listMotion). */
#orders-list, #delivered-body { position: relative; }

@media (prefers-reduced-motion: no-preference) {
  .view, .page { animation: fade .18s ease; }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
}

/* ---------- advanced config ---------- */
.disclosure {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  background: none; border: none; padding: 0; cursor: pointer;
  font-size: 16px; font-weight: 600; color: var(--ink); font-family: inherit;
  text-align: left; gap: 12px;
}
.disclosure .chev { color: var(--ink-soft); font-size: 14px; }
.cfg-group {
  font-size: 12px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase;
  color: var(--berry); margin: 18px 0 2px; padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.hint { display: block; font-size: 12px; color: var(--ink-soft); margin-top: 4px; }

/* A real switch for on/off settings — the ERP-writing one is not a field you
   want to read as text and wonder whether "1" meant on. */
.cfg-switch {
  display: grid; grid-template-columns: 1fr auto; align-items: center;
  column-gap: 12px; margin: 14px 0 0;
}
.cfg-switch-text { font-size: 13px; color: var(--ink-soft); }
.cfg-switch .hint { grid-column: 1 / -1; }
.cfg-switch input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 46px; height: 28px; margin: 0; padding: 0;
  border: 1px solid var(--line); border-radius: 999px; background: var(--switch-off);
  position: relative; cursor: pointer; transition: background .15s ease;
}
.cfg-switch input[type="checkbox"]::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 22px; height: 22px; border-radius: 50%; background: var(--card);
  box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s ease;
}
.cfg-switch input[type="checkbox"]:checked { background: var(--leaf); border-color: var(--leaf); }
.cfg-switch input[type="checkbox"]:checked::after { transform: translateX(18px); }

/* ---------- orders ---------- */
.tabs { display: flex; gap: 5px; margin-bottom: 10px; }
.tab {
  flex: 1; padding: 9px 2px; font-size: 12px; font-weight: 600;
  min-width: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  color: var(--ink-soft); cursor: pointer; font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  line-height: 1.2; text-align: center;
}
.tab.active { background: var(--leaf); border-color: var(--leaf); color: #fff; }
.badge {
  background: rgba(0,0,0,.10); border-radius: 9px; padding: 1px 6px;
  font-size: 12px; font-variant-numeric: tabular-nums;
}
.tab.active .badge { background: rgba(255,255,255,.22); }

/* The line between the tabs and the list: when the next drain happens, and
   the way into multi-select. Both belong to the list, not to a card. */
.listbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin: 0 2px 8px;
}

.order { padding: 14px; }
.order-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.order-main { min-width: 0; }
.order-client { font-size: 15px; font-weight: 600; line-height: 1.3; }
/* Registered name: tight under the trade name so the two read as one block,
   with the order details set apart below. */
.order-legal { font-size: 12px; color: var(--ink-soft); line-height: 1.35; margin-top: 2px; }
.order-meta { font-size: 12px; color: var(--ink-soft); margin-top: 7px; }
/* Number above amount, right-aligned so both stay on the paper-matching edge
   of the card. The number is a shade smaller than the sum: it identifies the
   order, the sum is what the eye should land on first. */
.order-side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
/* Larger than the sum, deliberately: the order number is what staff quote to
   each other on the phone, so it is the first thing to find on a card. */
.order-num { font-size: 18px; font-weight: 700; line-height: 1.25; white-space: nowrap; }
.order-sum { font-size: 15px; font-weight: 700; white-space: nowrap; }
.order-pills { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }

/* Примечание from Smartup — the staff's own words. Kept quiet and set apart
   from the app's amber/green warning boxes by a small "Izoh" label rather than
   colour, so it never reads as an alert the app is raising. */
.order-erpnote {
  margin-top: 10px; padding: 8px 10px; font-size: 13px; line-height: 1.4;
  color: var(--ink); background: var(--fill); border-radius: 8px;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.order-erpnote::before {
  content: "Izoh"; display: block;
  font-size: 11px; font-weight: 600; letter-spacing: .4px;
  text-transform: uppercase; color: var(--ink-soft); margin-bottom: 2px;
}

/* ---- receipt photos ----------------------------------------------------
   Full card width and scrolling with the list, so a document is read in
   place. The badge sits ABOVE the photo, never over it: a pill floating on
   a delivery note covers exactly the numbers it is commenting on. */
.order-photos { margin-top: 10px; display: flex; flex-direction: column; gap: 12px; }
.receipt-badge {
  font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 8px;
  margin-bottom: 6px;
}
.receipt-badge.ok    { background: var(--ok-bg); color: var(--ok); }
.receipt-badge.warn  { background: var(--flag-bg); color: var(--amber-ink); }
.receipt-badge.muted { background: var(--fill); color: var(--ink-soft); }
/* max-width, not just width: if the stylesheet ever loads late or fails, a
   1600px photo must still not blow the card open. */
.receipt-img {
  width: 100%; max-width: 100%; height: auto; display: block;
  border-radius: 8px; border: 1px solid var(--line); background: var(--fill);
  /* Fallback shape; the real one is set per photo from its pixel size, so the
     card is already the right height before the image arrives. */
  aspect-ratio: 3 / 4;
  /* contain, never cover: a cropped delivery note is a document with numbers
     missing off the edge. Where the ratio is known this fits exactly anyway. */
  object-fit: contain;
  content-visibility: auto;      /* skip rendering work for off-screen cards */
}
/* The suggested edit. Sits between the badge and the photo, so the numbers and
   the document they came from are read together without scrolling. */
.correction {
  margin: 0 0 8px; padding: 10px; border-radius: 8px;
  background: var(--flag-bg); border: 1px solid var(--flag-line);
}
.correction-title { font-size: 12px; color: var(--ink-soft); margin-bottom: 4px; }
.correction-row {
  font-size: 14px; font-weight: 600; line-height: 1.35;
  overflow-wrap: anywhere;
}
.correction-warn { font-size: 12px; color: var(--amber-ink); margin-top: 6px; }
/* Decided. Amber is the colour of a question; a settled correction is a
   record, so it drops to the same quiet green as a matched document. */
.correction.done { background: var(--ok-bg); border-color: var(--ok-line); }
.correction-done { font-size: 12px; color: var(--ok); margin-top: 6px; }
/* Written but unproven — not a question and not a record. Red, because the one
   thing that must not happen is this being read as finished. */
.correction.unsure { background: var(--danger-bg); border-color: var(--danger-line); }
.correction.unsure .correction-warn { color: var(--danger); }
.correction-actions { display: flex; gap: 8px; margin-top: 10px; }
.correction-actions .btn { flex: 1; }

.receipt-failed {
  padding: 12px; border-radius: 8px; background: var(--fill);
  color: var(--ink-soft); font-size: 13px; text-align: center;
}

/* ---- pending summary (per driver, on home) ----------------------------- */
.summary-row {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 2px; background: none; border: 0;
  border-bottom: 1px dashed var(--line); cursor: pointer;
  font-family: inherit; text-align: left;
}
.summary-row:last-child { border-bottom: 0; }
.summary-name { font-size: 15px; font-weight: 600; color: var(--ink); }
.summary-right { display: flex; align-items: center; gap: 10px; }
.summary-count {
  font-size: 12px; color: var(--ink-soft);
  background: var(--fill); border-radius: 9px; padding: 1px 8px;
}
.summary-sum { font-size: 15px; font-weight: 700; }
.summary-chev { color: var(--ink-soft); font-size: 20px; line-height: 1; }

/* ---- confirm detail page (tabbed, per driver) -------------------------- */
.fullpage {
  position: fixed; inset: 0; z-index: 40;
  background: var(--paper); display: flex; flex-direction: column;
}
.fullpage .topbar { flex: 0 0 auto; }
.fullpage .tabs {
  flex: 0 0 auto; margin: 0; padding: 10px 12px 0;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.fullpage .tab { flex: 0 0 auto; min-width: max-content; padding-inline: 12px; }
.confirm-body { flex: 1 1 auto; overflow-y: auto; padding: 4px 14px; min-height: 0; }
.confirm-body .pending-row:first-child { border-top: 0; }
.confirm-foot {
  flex: 0 0 auto; display: flex; align-items: center; gap: 12px;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  background: var(--card); border-top: 1px solid var(--line);
}
#confirm-driver-total { font-size: 17px; font-weight: 700; }
#confirm-accept-all { margin-top: 0; flex: 1; }

/* ---- cash prompt (after Yetkazdim, cash orders only) -------------------- */
.cashp-back {
  position: fixed; inset: 0; z-index: 80;
  background: var(--scrim);
  display: flex; flex-direction: column; justify-content: flex-end;
}
.cashp-sheet {
  background: var(--card); border-radius: 18px 18px 0 0;
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 10px;
}
.cashp-client { font-size: 18px; font-weight: 700; }
.cashp-sub { font-size: 13px; color: var(--ink-soft); margin-bottom: 6px; }
/* The full-payment button is the tall, obvious one — it carries the amount and
   is what a clean delivery taps. The other two are ordinary height. */
.cashp-sheet .cashp-full { font-size: 17px; padding: 16px; }
.cashp-sheet .btn { width: 100%; margin-top: 0; }
/* Karta | QR under the cash button (14.11.2026): two halves, one when QR is off. */
.cashp-alt { display: grid; grid-template-columns: 1fr; gap: 8px; }
.cashp-alt.two { grid-template-columns: 1fr 1fr; }
.cashp-alt .btn { min-width: 0; line-height: 1.25; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px; }
.cashp-alt .cashp-amt { max-width: 100%; font-size: 13px; font-weight: 500; opacity: .8;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- the driver's sheet after the photo (09.11.2026) ------------------- */
.dsh-ask { font-size: 14px; color: var(--ink-soft); margin-bottom: 12px; }
.dsh-lines { display: flex; flex-direction: column; gap: 8px; }
.dsh-row {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px;
}
.dsh-row.changed { border-color: var(--brand); }
.dsh-name { font-size: 15px; font-weight: 600; line-height: 1.3; }
.dsh-sub {
  display: flex; align-items: center; gap: 10px; margin-top: 8px;
  font-variant-numeric: tabular-nums;
}
/* Greyed: the order's number, not yet anything he typed. Tall enough to hit
   with a thumb in a van. */
.dsh-qty {
  min-width: 84px; min-height: 44px; padding: 6px 12px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--paper);
  color: var(--ink-faint); font-size: 18px; font-weight: 600; text-align: center;
  cursor: pointer; font-variant-numeric: tabular-nums;
}
.dsh-qty.changed { color: var(--ink); border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--accent-ring); }
.dsh-price { color: var(--ink-soft); font-size: 13px; }
.dsh-sum { margin-left: auto; font-weight: 600; font-size: 15px; }
.dsh-foot {
  flex: 0 0 auto; padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  background: var(--card); border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 10px;
}
.dsh-total { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dsh-actions { display: flex; gap: 10px; }
.dsh-actions .btn { margin-top: 0; }
.dsh-go { flex: 1 1 auto; font-size: 17px; padding: 16px; }
.dsh-reset { flex: 0 0 56px; font-size: 20px; }
.dsh-reset[hidden] { display: none; }
.rk-note { margin: -4px 0 4px; }

/* ---- cash collection --------------------------------------------------- */
.btn.wide { width: 100%; margin-bottom: 12px; }
.banner.warn { background: var(--flag-bg); color: var(--amber-ink); }

.coll-back {
  position: fixed; inset: 0; z-index: 70; background: var(--paper);
  display: flex; flex-direction: column;
}
.coll-head {
  flex: 0 0 auto; display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; background: var(--brand); color: #fff;
  padding-top: calc(12px + env(safe-area-inset-top));
}
.coll-title { font-size: 16px; font-weight: 600; }
.coll-close {
  background: none; border: 0; color: #fff; font-size: 26px; line-height: 1;
  padding: 0 4px; cursor: pointer;
}
.coll-body { flex: 1 1 auto; overflow-y: auto; padding: 14px; min-height: 0; }
.coll-label { display: block; font-size: 12px; color: var(--ink-soft); margin-bottom: 4px; }
.coll-name {
  width: 100%; font-size: 17px; padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--card);
}
.coll-legal { font-size: 12px; color: var(--ink-soft); margin-top: 4px; }
/* The debt line is information, not a warning — an agent reads it against the
   cash in hand, and a client in credit is normal. */
.coll-debt { font-size: 13px; font-weight: 600; color: var(--amber-ink); margin-top: 4px; }
.coll-suggest { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.coll-hit {
  display: flex; justify-content: space-between; gap: 10px; align-items: center;
  padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--card); font-size: 15px; text-align: left; cursor: pointer;
}
.hit-code { font-variant-numeric: tabular-nums; color: var(--ink-soft); font-size: 13px; }
.coll-row { display: flex; gap: 10px; margin-top: 14px; }
.coll-cell { flex: 1; min-width: 0; }
.coll-cell.narrow { flex: 0 0 30%; }
.coll-field {
  min-height: 46px; display: flex; align-items: center; padding: 8px 12px;
  border-radius: 8px; border: 1px solid var(--line); background: var(--card);
  font-variant-numeric: tabular-nums; font-size: 18px; font-weight: 600;
  overflow-x: auto; white-space: nowrap;
}
.coll-field.big { font-size: 22px; }
.coll-field.active { border-color: var(--brand); box-shadow: 0 0 0 2px var(--accent-ring); }
.coll-field.empty::after { content: "0"; color: var(--ink-faint); }

/* Big targets: this is tapped forty times a day, often one-handed in a van. */
.coll-pad {
  flex: 0 0 auto; display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--line); padding-top: 1px;
}
.coll-pad button {
  background: var(--card); border: 0; font-size: 24px; padding: 14px 0;
  font-variant-numeric: tabular-nums; cursor: pointer;
}
.coll-pad button:active { background: var(--pressed); }
.pad-del { font-size: 20px; }
.coll-actions {
  flex: 0 0 auto; padding: 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  background: var(--card); border-top: 1px solid var(--line);
}
.coll-actions .btn { width: 100%; font-size: 16px; padding: 14px; }
/* Cash and Karta sit side by side, cash wider: it is the overwhelmingly
   common tap and the one a thumb should find without looking. */
.coll-actions-2 { display: flex; gap: 10px; }
.coll-actions-2 .btn { margin-top: 0; }
.coll-actions-2 .coll-save { flex: 2 1 0; }
.coll-actions-2 .coll-card, .coll-actions-2 .coll-qr { flex: 1 1 0; white-space: nowrap; padding: 14px 8px; }
/* With QR on (12.11.2026) three buttons do not fit one row of a 360px phone:
   the cash button keeps the whole first row, Karta and QR share the second. */
.coll-actions-2.with-qr { flex-wrap: wrap; }
.coll-actions-2.with-qr .coll-save { flex: 1 1 100%; }

/* ---- client sync report ------------------------------------------------ */
#sync-clients-report { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.sync-bad {
  font-size: 13px; font-weight: 600; padding: 8px 10px; border-radius: 8px;
  background: var(--danger-bg); color: var(--danger);
}
.sync-warn {
  font-size: 13px; padding: 8px 10px; border-radius: 8px;
  background: var(--flag-bg); color: var(--amber-ink);
}
.sync-line {
  font-size: 13px; color: var(--ink-soft); line-height: 1.4;
  overflow-wrap: anywhere;
}

/* ---- the delivery photo: camera and crop on one screen (10.11.2026) ---- */
.shot {
  position: fixed; inset: 0; z-index: 60; background: #000; color: #fff;
  display: flex; flex-direction: column; user-select: none; -webkit-user-select: none;
}
.shot-top {
  flex: 0 0 auto; display: flex; align-items: center; gap: 8px;
  padding: calc(8px + env(safe-area-inset-top)) 8px 8px;
}
.shot-x, .shot-x-pad { flex: 0 0 44px; height: 44px; }
.shot-x {
  border: 0; background: transparent; color: #fff; font-size: 20px;
  border-radius: 22px; -webkit-tap-highlight-color: transparent;
}
.shot-x:active { background: rgba(255,255,255,.14); }
.shot-title { flex: 1; text-align: center; font-size: 16px; font-weight: 600; }
.shot-stage {
  flex: 1 1 auto; min-height: 0; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; touch-action: none;
}
.shot-video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.shot-msg { position: absolute; font-size: 15px; color: rgba(255,255,255,.75); }
.shot-wrap { position: relative; overflow: hidden; }
.shot-photo { width: 100%; height: 100%; display: block; }
.shot-box {
  position: absolute; left: 0; top: 0; will-change: transform, width, height;
  box-shadow: 0 0 0 9999px rgba(0,0,0,.58); outline: 1px solid rgba(255,255,255,.9);
}
/* Corner brackets: thick, white, sitting on the frame's line. */
.shot-box .c { position: absolute; width: 24px; height: 24px; border: 0 solid #fff; }
.shot-box .c.nw { left: -3px; top: -3px; border-left-width: 3px; border-top-width: 3px; }
.shot-box .c.ne { right: -3px; top: -3px; border-right-width: 3px; border-top-width: 3px; }
.shot-box .c.sw { left: -3px; bottom: -3px; border-left-width: 3px; border-bottom-width: 3px; }
.shot-box .c.se { right: -3px; bottom: -3px; border-right-width: 3px; border-bottom-width: 3px; }
/* A short bar mid-edge says the whole edge can be pulled. */
.shot-box .m { position: absolute; background: #fff; border-radius: 2px; }
.shot-box .m.n, .shot-box .m.s { width: 28px; height: 3px; left: calc(50% - 14px); }
.shot-box .m.n { top: -2px; } .shot-box .m.s { bottom: -2px; }
.shot-box .m.w, .shot-box .m.e { width: 3px; height: 28px; top: calc(50% - 14px); }
.shot-box .m.w { left: -2px; } .shot-box .m.e { right: -2px; }
/* Thirds while a finger is down. */
.shot-box .g { position: absolute; background: rgba(255,255,255,.45); opacity: 0;
  transition: opacity .15s; }
.shot-box.active .g { opacity: 1; }
.shot-box .g.v1, .shot-box .g.v2 { top: 0; bottom: 0; width: 1px; }
.shot-box .g.v1 { left: 33.333%; } .shot-box .g.v2 { left: 66.666%; }
.shot-box .g.h1, .shot-box .g.h2 { left: 0; right: 0; height: 1px; }
.shot-box .g.h1 { top: 33.333%; } .shot-box .g.h2 { top: 66.666%; }
.shot-bar {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
}
.shot-bar[hidden] { display: none; }
.shot-txt, .shot-icon, .shot-send {
  border: 0; min-height: 44px; border-radius: 22px; font: inherit;
  -webkit-tap-highlight-color: transparent;
}
.shot-txt, .shot-icon { background: transparent; color: #fff; font-size: 16px;
  font-weight: 600; padding: 0 12px; }
.shot-icon { font-size: 24px; min-width: 44px; padding: 0; }
.shot-txt:active, .shot-icon:active { background: rgba(255,255,255,.14); }
.shot-txt-pad { flex: 0 0 auto; min-width: 84px; }
.shot-bar.live .shot-txt { min-width: 84px; text-align: left; }
.shot-send { background: var(--leaf); color: #fff; font-size: 16px; font-weight: 700;
  padding: 0 22px; }
.shot-send:active { filter: brightness(.9); }
.shot-shutter {
  width: 74px; height: 74px; border-radius: 50%; border: 4px solid #fff;
  background: transparent; padding: 4px; -webkit-tap-highlight-color: transparent;
}
.shot-shutter span { display: block; width: 100%; height: 100%; border-radius: 50%;
  background: #fff; transition: transform .08s; }
.shot-shutter:active span { transform: scale(.9); }
.pill {
  font-size: 11px; padding: 3px 9px; border-radius: 20px;
  background: var(--fill); color: var(--ink-soft); font-weight: 600;
}
.pill.cash { background: var(--ok-bg); color: var(--ok); }
.pill.bank { background: var(--berry-bg); color: var(--berry); }
.pill.mine { background: var(--flag-bg); color: var(--flag); font-weight: 600; }

/* One-tap claim of all this driver's clients, above the Yangi list. */
.claim-mine { margin: 0 0 12px; }
.order-note {
  font-size: 12px; color: var(--flag); background: var(--flag-bg);
  border-radius: 8px; padding: 7px 9px; margin-top: 9px; line-height: 1.4;
}
.order-actions { margin-top: 10px; display: flex; gap: 8px; }
.btn.sm { margin-top: 0; padding: 8px 14px; font-size: 14px; width: auto; }
.order-actions .btn { flex: 1; }

/* A card mid-request. Visible enough to answer "did my tap register?", quiet
   enough not to look like an error. */
.order.working { opacity: .5; }

/* ---------- multi-select ---------- */
.order.selectable { cursor: pointer; }
.order.picked {
  border-color: var(--leaf);
  box-shadow: inset 3px 0 0 var(--leaf);
  background: var(--ok-bg);
}

.selectbar {
  position: fixed; left: 0; right: 0; z-index: 6;
  bottom: calc(env(safe-area-inset-bottom) + 58px);
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--leaf); color: #fff;
  box-shadow: 0 -2px 12px rgba(0,0,0,.14);
}
.selectbar #select-count { font-size: 14px; font-weight: 600; flex: 1; }
.selectbar .btn.primary {
  width: auto; background: var(--card); color: var(--leaf); border-color: var(--card);
}

/* ---------- archive drawer ---------- */
.drawer { position: fixed; inset: 0; z-index: 20; }
.drawer-backdrop { position: absolute; inset: 0; background: var(--scrim); }
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(92vw, 460px);
  background: var(--paper);
  display: flex; flex-direction: column;
  box-shadow: -4px 0 20px rgba(0,0,0,.18);
}
.drawer-head {
  display: flex; align-items: center; gap: 10px;
  padding: calc(env(safe-area-inset-top) + 14px) 16px 14px;
  background: var(--card); border-bottom: 1px solid var(--line);
  font-size: 17px; font-weight: 600;
}
.drawer-body {
  flex: 1; overflow-y: auto;
  padding: 14px 14px calc(env(safe-area-inset-bottom) + 20px);
  -webkit-overflow-scrolling: touch;
}

@media (prefers-reduced-motion: no-preference) {
  .drawer-panel { animation: slide-in .2s ease; }
  @keyframes slide-in { from { transform: translateX(100%); } to { transform: none; } }
}

/* ---- staff linking ------------------------------------------------------ */
.staff-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.staff-row:last-child { border-bottom: 0; }
.staff-who { flex: 1; min-width: 0; }
.staff-name { display: block; font-size: 15px; font-weight: 600; }
.staff-role { font-size: 12px; color: var(--ink-soft); }
.staff-pick {
  flex: 0 0 52%; font-size: 14px; padding: 8px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--card); max-width: 52%;
}
/* An unlinked account cannot take money — that has to be visible, not implied. */
.staff-row.unlinked .staff-pick { border-color: var(--danger); background: var(--danger-bg); }

/* ---- unconfirmed collections -------------------------------------------- */
.pending-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px dashed var(--line);
}
.pending-row:last-child { border-bottom: 0; }
.pending-main { flex: 1; min-width: 0; }
.pending-client {
  font-size: 15px; font-weight: 600; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pending-meta { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.pending-right { flex: 0 0 auto; text-align: right; }
.pending-amount { font-size: 15px; font-weight: 700; }
.pending-ok { margin-top: 6px; width: auto; padding: 8px 14px; font-size: 14px; }
/* Confirm and the three-dot share the row's right edge. The dot button is
   deliberately narrow but keeps a 44px tap target, so a thumb aiming at
   Tasdiqlash cannot land on "cancel" by accident. */
.pending-buttons { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.pending-more {
  margin-top: 6px; width: auto; min-width: 34px; min-height: 36px;
  padding: 8px 6px; font-size: 16px; line-height: 1; color: var(--ink-soft);
}

/* The row menu is a bottom sheet: it belongs to a row, but a thumb reaches the
   bottom of the screen and not the middle of a list. */
.rowmenu-back {
  position: fixed; inset: 0; z-index: 60;
  background: var(--scrim);
  display: flex; align-items: flex-end; justify-content: center;
}
.rowmenu {
  width: 100%; max-width: 560px; background: var(--card);
  border-radius: 14px 14px 0 0; padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
}
.rowmenu-head {
  font-size: 13px; color: var(--ink-soft); padding: 10px 12px 8px;
  border-bottom: 1px solid var(--line);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rowmenu-item {
  display: block; width: 100%; text-align: left;
  background: none; border: 0; border-bottom: 1px solid var(--line);
  font-family: inherit; font-size: 16px; color: var(--ink);
  padding: 15px 12px; cursor: pointer;
}
.rowmenu-item:last-child { border-bottom: 0; }
.rowmenu-item:active { background: var(--pressed); }
.rowmenu-item.danger { color: var(--danger); }
.rowmenu-item.muted { color: var(--ink-soft); }
.ask-text { margin-top: 2px; }

/* Handover row has two actions stacked on the right. */
.handover-btns { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; align-items: flex-end; }
.handover-btns .btn { margin-top: 0; width: auto; padding: 8px 14px; font-size: 14px; white-space: nowrap; }

/* Topshirish button lives inside the agent's balance card, so it sits on the
   dark background with a light outline rather than the default light chrome. */
#handover-btn {
  margin-top: 14px; background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.5); color: #fff;
}
#handover-btn:active { background: rgba(255,255,255,.24); }

.ask-hint { font-size: 13px; color: var(--ink-soft); margin-bottom: 10px; }

/* Why the app did not write this one by itself. Quieter than a warning — it is
   an explanation, not a problem: the card below it still works. */
.correction-skip {
  margin: 6px 0 8px;
  padding: var(--s-2) var(--s-3);
  background: var(--fill);
  border-radius: var(--radius-btn);
  font-size: 13px;
  line-height: 1.35;
  color: var(--ink-soft);
}

/* ---- HoReCa groups page ------------------------------------------------ */
/* Every list on the page is the same tappable row: a title, a quiet second
   line, and a chevron. Restaurants, clients, products and prices all read
   alike, so the page teaches itself once. */
.hz-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 11px 2px; border: 0; border-bottom: 1px solid var(--line);
  background: none; font-family: inherit; text-align: left; cursor: pointer;
  color: var(--ink); -webkit-tap-highlight-color: transparent;
}
.hz-row:last-child { border-bottom: 0; }
.hz-row:not(.static):active { background: var(--pressed); }
.hz-row.off .hz-title { color: var(--ink-soft); }
.hz-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hz-title { font-size: 15px; font-weight: 600; line-height: 1.3; }
.hz-title .hit-code { font-weight: 400; margin-left: 4px; }
.hz-sub { font-size: 12.5px; color: var(--ink-soft); line-height: 1.35; }
.hz-pills { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.hz-pills .pill { font-size: 11px; }
.hz-pill-bad { background: var(--danger-bg); color: var(--danger); font-weight: 600; }
.hz-pill-ok { background: var(--ok-bg); color: var(--ok); }
/* One colour per job the bot does in a group, so a glance down the list says
   which groups do what. Green was on both the order and the nakladnoy pill,
   which made them read as the same thing. */
.hz-pill-nak { background: var(--berry-bg); color: var(--berry); }
.hz-pill-akt { background: var(--flag-bg); color: var(--flag); }
.hz-pill-buh { background: var(--teal-bg); color: var(--teal); }
.hz-pill-omb { background: var(--brown-bg); color: var(--brown); }
.hz-chev { color: var(--ink-soft); font-size: 20px; flex: 0 0 auto; }
.hz-price { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.hz-warn { color: var(--flag); font-weight: 600; }
.hz-ok { color: var(--ok); }
.hz-bot { font-size: 14px; line-height: 1.4; margin-bottom: 10px; }

/* A segmented choice for two-or-three-way settings — the unit, the invoice
   timing. Reads as one control, not three buttons. */
.seg { display: flex; gap: 0; margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button {
  flex: 1; padding: 10px 4px; font-size: 14px; font-weight: 600; font-family: inherit;
  background: var(--card); border: 0; border-right: 1px solid var(--line); color: var(--ink-soft); cursor: pointer;
}
.seg button:last-child { border-right: 0; }
.seg button.active { background: var(--leaf); color: #fff; }
.hz-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* A picker looks like an input, because it fills the same slot: tap it and a
   list opens instead of a keyboard. */
.hz-pick {
  display: block; width: 100%; margin-top: 6px; padding: 12px 14px; font-size: 16px;
  text-align: left; font-family: inherit; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--ink); cursor: pointer;
}
.hz-select {
  display: block; width: 100%; margin-top: 10px; padding: 12px 14px; font-size: 16px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font-family: inherit;
}
#hz-detail .confirm-body { padding: 12px 14px calc(env(safe-area-inset-bottom) + 24px); }
#hz-detail .card:last-child { margin-bottom: 0; }
#hz-price-tabs { margin-top: 6px; }
#hz-price-tabs .tab { font-size: 13px; padding-inline: 8px; }
.hz-subhead { margin-top: 16px; }
.row-head .btn.sm { padding: 6px 12px; font-size: 13px; }
.hz-item { border-bottom: 1px solid var(--line); }
.hz-item:last-child { border-bottom: 0; }
.hz-item .hz-row { border-bottom: 0; }
.hz-variants { margin: 0 2px 10px; }
.hz-variants button { padding: 8px 4px; font-size: 13px; }
.hz-variants button:disabled { opacity: .55; }

/* -------------------------------------------------- Сурум product map */
.surum-map { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.surum-map-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card);
}
.surum-map-info { flex: 1; min-width: 0; }
.surum-map-name { font-weight: 600; overflow-wrap: anywhere; }
.surum-map-meta { font-size: 12px; color: var(--ink-soft); }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--ink-soft); }

/* The product-picker sheet — a bottom sheet, thumb-reachable on a phone. */
.sheet-overlay {
  position: fixed; inset: 0; z-index: 50;
  background: var(--scrim);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  width: 100%; max-width: 520px; max-height: 88vh;
  background: var(--paper); border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.25);
}
.sheet-title { font-size: 17px; font-weight: 700; }
.sheet-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-soft); }
.sheet-field input, .sheet-search {
  width: 100%; box-sizing: border-box;
  padding: 10px 12px; font-size: 16px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card);
}
.sheet-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; min-height: 120px; }
.sheet-item {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  width: 100%; text-align: left; padding: 11px 12px;
  border: none; border-bottom: 1px solid var(--line); background: var(--card);
  font-size: 15px; cursor: pointer;
}
.sheet-item:active { background: var(--pressed); }
.sheet-item span:first-child { overflow-wrap: anywhere; }
.sheet-cancel { align-self: stretch; }

/* HoReCa page: a labelled control on its own line (the Счёт-фактура card). */
.hz-inline { display: block; margin-top: 12px; font-weight: 600; }
.hz-time {
  display: block; margin-top: 6px; width: 8.5em;
  font-size: 1.05rem; padding: 8px 10px;
}

/* ---- Settings menu ------------------------------------------------------ */
/* Sozlamalar opens on a list of categories; each is its own short screen.
   The rows are the HoReCa page's rows with an icon in front. */
.set-menu { padding-top: 4px; padding-bottom: 4px; }
.set-icon { flex: 0 0 auto; width: 28px; font-size: 20px; text-align: center; }
.disclosure.cfg-fold { margin-top: 18px; font-size: 14px; color: var(--ink-soft); }

/* ---- HoReCa page: tabs, one group list, the group page ------------------ */
#hz-tabs .tab { font-size: 13px; }
.hz-bucket {
  font-size: 12px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase;
  color: var(--berry); margin: 14px 0 0; padding-bottom: 2px;
  display: flex; justify-content: space-between;
}
.hz-bucket .tab-num { color: var(--ink-soft); }
.hz-foot { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.hz-row.static { cursor: default; }
.hz-danger { color: var(--danger); font-size: 13px; flex: 0 0 auto; }
#hz-leave { margin-top: 10px; }
.btn.sm.hz-suggest { margin: 8px 8px 0 0; }
.hz-inline .hint { font-weight: 400; }

/* ---- agents: orders ----------------------------------------------------- */
.listbar-end { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.listbar-end { flex-shrink: 0; }
.listbar-end .btn.sm, .listbar-end .linkbtn { padding: 6px 10px; font-size: 13px; white-space: nowrap; }
/* The secondary action on a card: present, but not competing with the main one. */
.btn.quiet { color: var(--ink-soft); background: var(--card); font-weight: 500; }
.order-actions .btn.quiet { flex: 0 0 auto; }
.cancel-req {
  margin: 10px 0 0; padding: 10px; border-radius: 8px;
  background: var(--danger-bg); border: 1px solid var(--danger-line);
}
.cancel-req-text { font-size: 13px; color: var(--danger); line-height: 1.4; font-weight: 600; }
.cancel-req-wait { font-size: 12px; color: var(--ink-soft); margin-top: 4px; }
.cancel-req .correction-actions { margin-top: 8px; }
.banner.info { background: var(--berry-bg); color: var(--berry); }
.staff-row { flex-wrap: wrap; }
.staff-meta {
  flex: 1 0 100%; display: flex; justify-content: space-between; align-items: center;
  gap: 8px; font-size: 12px; color: var(--ink-soft);
}
.staff-row.off .staff-name { color: var(--ink-soft); text-decoration: line-through; }

/* ---- pinch to zoom -------------------------------------------------------
   One finger scrolls the list as before; two fingers that start on a photo
   are ours (app.js), not the browser's page zoom. */
.receipt-img { touch-action: pan-x pan-y; }
.pinch-back {
  position: fixed; inset: 0; z-index: 90; background: #000; opacity: 0;
  pointer-events: none;
}
.pinch-clone {
  position: fixed; z-index: 91; object-fit: contain; border-radius: 8px;
  background: var(--fill); will-change: transform; pointer-events: none;
  transform: translate3d(0, 0, 0);
}

/* ---- Mijozlar ----------------------------------------------------------- */
.cl-bar { display: flex; gap: 8px; align-items: center; }
.cl-bar input { margin-top: 0; flex: 1; min-width: 0; }
.cl-bar .btn.sm { flex: 0 0 auto; white-space: nowrap; }
.cl-zones { margin: 10px 0 0; }
.cl-meta { margin: 8px 2px; }
.cl-list { padding-top: 4px; padding-bottom: 4px; }
.cl-last { font-size: 12px; color: var(--ink-soft); font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.cl-name { font-size: 18px; font-weight: 700; line-height: 1.3; }
.cl-addr { margin: 8px 0 4px; color: var(--ink-soft); }
#cl-detail .confirm-body, #no-page .confirm-body { padding: 12px 14px calc(env(safe-area-inset-bottom) + 24px); }
#cl-detail .btn.primary.wide { margin: 0 0 12px; }
.cl-debt { background: var(--card); border-color: var(--line); color: var(--ink); }
.cl-debt .money-big { font-size: 26px; }
.cl-debt.owes .money-big { color: var(--danger); }
.cl-order { border-bottom: 1px solid var(--line); }
.cl-order:last-of-type { border-bottom: 0; }
.cl-order summary {
  display: flex; align-items: center; gap: 8px; padding: 11px 2px;
  list-style: none; cursor: pointer; font-size: 14px;
}
.cl-order summary::-webkit-details-marker { display: none; }
.cl-o-num { font-weight: 700; }
.cl-o-date { color: var(--ink-soft); }
.cl-o-sum { margin-left: auto; font-weight: 600; }
.cl-o-lines { padding: 0 2px 10px; }
.cl-o-line { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 3px 0; }

/* ---- new order ---------------------------------------------------------- */
#no-page input[type=date] { margin-top: 8px; }
#no-search { margin: 8px 0 4px; }
/* Two lines: the name across the whole row (wrapping only if it must),
   then quantity × price = amount. */
.no-row { padding: 10px 0; border-bottom: 1px solid var(--line); }
.no-row:last-child { border-bottom: 0; }
.no-row.on { background: var(--ok-bg); box-shadow: inset 3px 0 0 var(--leaf); padding-left: 8px; }
.no-top { display: flex; align-items: flex-start; }
.no-name { flex: 1; min-width: 0; font-size: 14.5px; line-height: 1.35; }
.no-tags { font-size: 12.5px; color: var(--ink-soft); }
.no-tags s { font-size: 11.5px; }
.no-line { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.no-op { flex: 0 0 auto; color: var(--ink-soft); font-size: 14px; }
.no-p { flex: 0 0 auto; font-size: 13px; color: var(--ink-soft); }
/* The amount never shrinks; the price box gives way first. */
.no-amt { flex: 1 0 auto; text-align: right; font-weight: 600; font-size: 14px; }
.no-sum {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  margin-top: 6px; padding: 12px var(--s-2, 8px) 4px; border-top: 2px solid var(--ink);
  font-weight: 700; font-size: 16px; white-space: nowrap;
}
.no-sum .tab-num { font-size: 18px; }
#no-total { cursor: pointer; }
.no-qty { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.no-qty .btn.sm { padding: 8px 11px; min-width: 38px; }
.no-qty input { width: 64px; margin: 0; padding: 9px 6px; text-align: center; font-size: 16px; }
#no-total { font-size: 16px; font-weight: 700; flex: 1; }
#no-submit { width: auto; margin: 0; }
#no-body.working { opacity: .55; pointer-events: none; }
.no-row .no-star {
  /* A marker beside the name; the swipe changes it, not a tap. */
  flex: 0 0 auto; border: 0; background: none;
  padding: 0 6px 0 0; margin: 0;
  font-size: 20px; line-height: 1; color: var(--ink-faint); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.no-row .no-star.on { color: var(--star); }
.no-tag {
  display: inline-block; font-size: 11px; padding: 0 5px; border-radius: 6px;
  background: var(--flag-bg); color: var(--flag); font-weight: 600;
}
/* The price box gives way before the amount does at 360 px. */
.no-line .no-pr {
  flex: 0 1 92px; width: 92px; min-width: 50px; margin: 0; padding: 0 6px;
  min-height: var(--tap); font-size: 16px; text-align: right;
}
.no-filter { margin-bottom: 4px; }
/* Three tabs on one line at 360 px: each as wide as its label. */
.no-filter button { flex: 1 1 auto; white-space: nowrap; padding-left: 6px; padding-right: 6px; }
.no-tabs { margin: 0 0 12px; }
.no-fill-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.no-fill-btns .btn.sm { margin: 0; text-align: left; }
.no-btn-sub { display: block; font-size: 11.5px; font-weight: 400; color: var(--ink-soft); }
.no-chip {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
  padding: 8px 10px; border-radius: 10px; background: var(--ok-bg); font-weight: 600; font-size: 14px;
}
.no-chip .linkbtn { margin-left: auto; font-size: 16px; }
#no-tmpl-pick { margin-top: 8px; border-top: 1px solid var(--line); }
.no-tmpl { display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.no-tmpl:last-child { border-bottom: 0; }
.no-tmpl .no-tmpl-main { border-bottom: 0; }
.no-tmpl-edit { flex: 0 0 auto; font-size: 18px; color: var(--ink-soft); }
#no-tmpl-new { margin: 0 0 6px; }
.no-warn { color: var(--danger); }
#no-tdel { margin-top: 10px; }
/* Total, Saqlash and Yaratish on one line at 360 px: the buttons never
   wrap, the total gives way first. */
#no-foot #no-save { width: auto; margin: 0 8px 0 0; }
#no-foot .btn { white-space: nowrap; padding-left: 14px; padding-right: 14px; }
#no-foot #no-total { min-width: 0; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#drafts-btn { background: var(--flag-bg); color: var(--flag); border-color: var(--flag-line); }
.no-count {
  display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--flag); color: #fff; font-size: 11.5px; line-height: 18px;
}
.no-tabs button { font-size: 13px; padding-left: 2px; padding-right: 2px; white-space: nowrap; }
.no-flash { margin: 0 0 12px; padding: 0 2px; }
#no-sync { margin: 4px 0 8px; }
.no-pick {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 0;
  border-bottom: 1px solid var(--line); cursor: pointer;
}
.no-pick input { width: 20px; height: 20px; margin: 2px 0 0; flex: 0 0 auto; }
.no-pick-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.no-bad { font-weight: 600; color: var(--danger); margin: 12px 0 4px; }
#no-sync-res .btnrow { margin-top: 10px; }
.no-result { text-align: center; }
.no-ok { font-size: 16px; font-weight: 600; color: var(--ok); margin-bottom: 6px; }
.no-result .btnrow { margin-top: 6px; }
#sn-form select {
  display: block; width: 100%; margin-top: 6px; padding: 12px 14px; font-size: 16px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink);
}
/* A value someone else sets (the agent's Odoo login): visibly not editable. */
input:disabled { background: var(--fill); color: var(--ink-soft); border-color: var(--line); opacity: 1; }
/* Xodimlar's access switch: the app and the cash bot, one line per person. */
.staff-row .staff-access { flex: 1 0 100%; margin: 4px 0 0; }
.staff-row.off .staff-access .cfg-switch-text { color: var(--danger); }

/* ---- edit an order ------------------------------------------------------ */
/* One row per line: name (amount under it) | qty | price | ×. Fixed columns
   for the inputs, so a 360px phone still fits a 7-digit price, and the name
   takes what is left. Inputs at 16px: smaller and iOS zooms the page. */
.ed-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 58px 92px 34px;
  gap: 6px; align-items: center;
}
.ed-labels { font-size: 12px; color: var(--ink-soft); margin: 12px 0 4px; }
.ed-row { padding: 8px 0; border-bottom: 1px solid var(--line); }
.ed-name { min-width: 0; }
/* The product's whole name, wrapped where it must (Said, 28.10.2026). */
.ed-short { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
/* The line's sum has its own column on the computer only (desktop.css), as
   do the dots that drag a line. */
.ed-sum-label, .ed-grip-label, .ed-grip { display: none; }
.ed-amount { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.ed-in {
  width: 100%; min-width: 0; font-size: 16px; padding: 8px 6px; text-align: right;
  border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink);
}
.ed-in.changed { border-color: var(--flag); background: var(--flag-bg); }
.ed-in.bad { border-color: var(--danger); background: var(--danger-bg); }
.ed-x {
  width: 34px; height: 38px; border: 0; border-radius: 8px; background: transparent;
  font-size: 22px; line-height: 1; color: var(--danger); cursor: pointer;
}
.ed-row.removed .ed-short { text-decoration: line-through; color: var(--ink-soft); }
.ed-row.removed .ed-amount { color: var(--danger); }
.ed-row.removed .ed-in { opacity: .45; }
.ed-row.removed .ed-x { color: var(--ink-soft); }
.ed-note { margin-top: 14px; }
.ed-total {
  font-size: 15px; font-weight: 600; margin-bottom: 10px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.edit-req {
  margin: 10px 0 0; padding: 10px; border-radius: 8px;
  background: var(--flag-bg); border: 1px solid var(--flag-line);
}
.edit-req-text { font-size: 13px; color: var(--amber-ink); font-weight: 600; margin-bottom: 4px; }
.edit-req-line { font-size: 13px; line-height: 1.45; font-variant-numeric: tabular-nums; }
.edit-req .correction-actions { margin-top: 8px; }

/* ==========================================================================
   iOS layer
   --------------------------------------------------------------------------
   Everything below re-dresses the rules above in Apple's idiom (HIG): grouped
   inset lists, translucent bars, a large title, a tab bar, sheets from the
   bottom. Looks only — no selector here changes what is shown or hidden.
   Colours and sizes come from theme.css.
   ========================================================================== */

/* ---- foundations --------------------------------------------------------- */
body {
  font-size: var(--fs-body); line-height: 1.3;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font-family: inherit; }
.small { font-size: var(--fs-footnote); }
.ico { width: 24px; height: 24px; display: block; flex: 0 0 auto; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- navigation bar ------------------------------------------------------
   Translucent, blurred, ink on chrome — not a green slab. Two blurred
   surfaces in the whole app (this bar and the tab bar), both short strips:
   that is the budget for a mid-range Android GPU. */
.topbar {
  min-height: calc(env(safe-area-inset-top) + 44px);
  padding: env(safe-area-inset-top) max(var(--s-2), env(safe-area-inset-right)) 0 max(var(--s-2), env(safe-area-inset-left));
  gap: var(--s-1);
  background: var(--bar-solid); color: var(--ink);
  font-size: var(--fs-headline); font-weight: 600;
  box-shadow: 0 var(--hairline) 0 var(--line);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .topbar, .bottomnav {
    background: var(--bar);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
  }
}
@media (prefers-reduced-transparency: reduce) {
  .topbar, .bottomnav { background: var(--bar-solid); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
#topbar-title, .topbar > span:not(.topbar-mark) {
  flex: 1; min-width: 0; text-align: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Overlay pages keep a back button on the left only; a mirror-width spacer
   keeps their title optically centred. */
.fullpage .topbar::after { content: ""; flex: 0 0 44px; }
.topbar-mark { display: none; }
.iconbtn {
  min-width: var(--tap); min-height: var(--tap);
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: 0; padding: 0; color: var(--accent);
  border-radius: var(--radius-btn);
  transition: opacity var(--t-fast) var(--ease);
}
.iconbtn:active { opacity: .45; transition: none; }
.iconbtn.dark { margin-left: auto; color: var(--ink-soft); }
.iconbtn .ico { width: 22px; height: 22px; }
#back-btn .ico, .fullpage .topbar .iconbtn .ico { width: 26px; height: 26px; stroke-width: 2.4; }

/* The main bar: big title on top of the page, small title only once it has
   scrolled under the bar (ios.js sets .condensed). */
#view-app > .topbar:not(.condensed) { box-shadow: none; }
#view-app > .topbar #topbar-title { opacity: 0; transition: opacity var(--t-fast) var(--ease); }
#view-app > .topbar.condensed #topbar-title { opacity: 1; }
#view-app > .topbar #back-btn ~ #topbar-title { margin-right: 0; }
.large-title {
  max-width: 600px; margin: 0 auto;
  padding: var(--s-1) max(var(--s-4), env(safe-area-inset-right)) var(--s-2) max(var(--s-4), env(safe-area-inset-left));
  font-size: var(--fs-large-title); font-weight: 700; line-height: 1.12;
  letter-spacing: -0.02em; color: var(--ink);
  overflow-wrap: anywhere;
}
#view-app > .topbar:not(.condensed) { background: var(--paper); -webkit-backdrop-filter: none; backdrop-filter: none; }

/* ---- page ---------------------------------------------------------------- */
.page {
  max-width: 600px;
  padding: var(--s-2) max(var(--s-4), env(safe-area-inset-right))
           calc(env(safe-area-inset-bottom) + 50px + var(--s-6))
           max(var(--s-4), env(safe-area-inset-left));
}
@media (prefers-reduced-motion: no-preference) {
  .page { animation: fade var(--t-fast) var(--ease); }
}

/* ---- tab bar ------------------------------------------------------------- */
.bottomnav {
  z-index: 6; border-top: 0; box-shadow: 0 calc(var(--hairline) * -1) 0 var(--line);
  padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  justify-content: center;
}
.navbtn {
  max-width: 120px; min-height: 50px; padding: 6px 0 4px;
  font-size: var(--fs-tab); font-weight: 500; letter-spacing: .1px;
  color: var(--ink-soft); gap: 3px;
  transition: color var(--t-fast) var(--ease);
}
.navbtn .navicon { display: block; }
.navbtn .navicon .ico { width: 25px; height: 25px; stroke-width: 1.8; }
.navbtn.active { color: var(--accent); font-weight: 600; }
.navbtn.active .ico { stroke-width: 2.2; }
.navbtn:active { opacity: .6; }

/* ---- grouped inset cards (Settings-app lists) ---------------------------- */
.card {
  border: 0; border-radius: var(--radius);
  padding: var(--s-4); margin-bottom: var(--s-4);
}
.card h2 { font-size: var(--fs-headline); font-weight: 600; letter-spacing: -0.01em; margin-bottom: var(--s-2); }
/* Section header inside a card: iOS footnote caps, a hairline under it. */
.row-head {
  font-size: var(--fs-footnote); font-weight: 400; letter-spacing: 0;
  text-transform: uppercase; color: var(--ink-soft);
  border-bottom: var(--hairline) solid var(--line); padding-bottom: var(--s-2);
}
.row-head .tab-num { font-size: var(--fs-subhead); font-weight: 600; text-transform: none; }
/* Rows: hairline separators, never dashes. */
.rows .row, .summary-row, .pending-row, .hz-row, .staff-row, .no-row, .no-pick,
.cl-order, .hz-item, .no-tmpl, .ed-row, .sheet-item, .rowmenu-item {
  border-bottom-style: solid; border-bottom-width: var(--hairline); border-bottom-color: var(--line);
}
.row { font-size: var(--fs-body); padding: 11px 0; min-height: var(--tap); align-items: center; }
.empty { font-size: var(--fs-subhead); }
.total-card { background: var(--card); }
/* Tappable rows: 44px minimum, the whole row presses edge to edge. */
.summary-row, .hz-row {
  min-height: var(--tap); padding: 11px 0; color: var(--ink);
  transition: background var(--t-slow) var(--ease);
}
.summary-row:active, .hz-row:not(.static):active {
  background: var(--pressed); transition: none;
  margin-inline: calc(var(--s-4) * -1); padding-inline: var(--s-4);
  width: calc(100% + var(--s-4) * 2);
}
.summary-name, .hz-title { font-size: var(--fs-body); font-weight: 400; }
.summary-sum, .pending-amount { font-size: var(--fs-body); font-weight: 600; }
.summary-count { background: var(--fill); font-size: var(--fs-footnote); }
.summary-chev, .hz-chev { color: var(--ink-faint); font-size: 24px; font-weight: 600; }
.hz-sub { font-size: var(--fs-footnote); }
.pending-client { font-size: var(--fs-body); font-weight: 400; }
.pending-meta, .staff-role, .order-meta, .order-legal { font-size: var(--fs-footnote); }

/* ---- the balance: one hero, the brand forest ---------------------------- */
.money-card {
  background: linear-gradient(160deg, var(--hero-2), var(--hero));
  color: #fff; border-radius: var(--radius-lg); padding: var(--s-5) var(--s-4);
}
.money-label { font-size: var(--fs-subhead); opacity: .8; }
.money-big { font-size: var(--fs-large-title); letter-spacing: -0.02em; }
.money-sub { font-size: var(--fs-footnote); opacity: .7; }
.cl-debt { background: var(--card); color: var(--ink); }
.cl-debt .money-big { font-size: var(--fs-title-1); }
#handover-btn { border: 0; background: rgba(255,255,255,.18); color: #fff; }

/* ---- banners ------------------------------------------------------------- */
.banner { border: 0; border-radius: var(--radius); padding: var(--s-3) var(--s-4); font-size: var(--fs-subhead); }
.banner.danger { border: 0; }
.banner.warn { background: var(--flag-bg); color: var(--amber-ink); }

/* ---- buttons -------------------------------------------------------------
   Filled accent for the one main action, tinted grey for the rest, plain
   text for links. 44px minimum; pressed = dimmed, as on iOS. */
.btn {
  min-height: var(--tap); padding: 11px var(--s-4);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: var(--radius-btn);
  background: var(--fill); color: var(--accent);
  font-size: var(--fs-body); font-weight: 600; line-height: 1.2;
  transition: opacity var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.btn:active:not(:disabled) { opacity: .6; transition: none; }
.btn:disabled { opacity: .4; }
.btn.primary { background: var(--accent-fill); color: var(--on-accent); }
.btn.primary:active:not(:disabled) { background: var(--accent-press); opacity: 1; }
/* Full-width primary buttons are the big ones: taller, rounder, like iOS. */
.btn.primary.wide, form > .btn.primary, .cashp-sheet .btn, .coll-actions .btn {
  min-height: 50px; border-radius: var(--radius);
}
.btn.wide { margin-bottom: var(--s-4); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.danger-outline { background: var(--danger-bg); color: var(--danger); border: 0; }
.btn.quiet, .btn.ghost { background: var(--fill); color: var(--ink); border: 0; font-weight: 500; }
.btn.sm { min-height: 36px; padding: 7px 14px; font-size: var(--fs-subhead); }
.linkbtn {
  min-height: var(--tap); padding: 0 var(--s-1);
  font-size: var(--fs-body); font-weight: 400; color: var(--accent);
}
.linkbtn:active { opacity: .45; }
.btnrow { gap: var(--s-2); }
#drafts-btn { background: var(--flag-bg); color: var(--flag); }

/* ---- inputs: grey filled fields, no borders, accent ring on focus ------- */
label { font-size: var(--fs-footnote); color: var(--ink-soft); margin-top: var(--s-4); }
input, select[data-kind="choice"], .hz-pick, .hz-select, #sn-form select,
.coll-name, .staff-pick, .sheet-field input, .sheet-search, .ed-in {
  min-height: var(--tap); border: 1px solid transparent; border-radius: var(--radius-field);
  background: var(--field); color: var(--ink); font-size: var(--fs-body);
  transition: box-shadow var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
input::placeholder { color: var(--ink-soft); opacity: .8; }
input:focus, select[data-kind="choice"]:focus, .hz-select:focus, #sn-form select:focus,
.staff-pick:focus, .sheet-search:focus, .ed-in:focus, .coll-name:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring);
}
input:disabled { background: var(--fill); color: var(--ink-soft); border-color: transparent; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); min-height: 0; }
.hint { font-size: var(--fs-caption); line-height: 1.35; }
.error, .status { font-size: var(--fs-subhead); }

/* ---- switches: the iOS toggle, 51 x 31 ---------------------------------- */
.cfg-switch { min-height: var(--tap); margin-top: var(--s-2); }
.cfg-switch-text { font-size: var(--fs-body); color: var(--ink); }
.cfg-switch input[type="checkbox"] {
  width: 51px; height: 31px; min-height: 0; border: 0; border-radius: 999px;
  background: var(--switch-off); box-shadow: none;
  transition: background var(--t-fast) var(--ease);
}
.cfg-switch input[type="checkbox"]::after {
  width: 27px; height: 27px; top: 2px; left: 2px;
  box-shadow: 0 3px 8px rgba(0,0,0,.15), 0 3px 1px rgba(0,0,0,.06);
  transition: transform var(--t-slow) var(--ease-sheet);
}
.cfg-switch input[type="checkbox"]:checked { background: var(--switch-on); }
.cfg-switch input[type="checkbox"]:checked::after { transform: translateX(20px); }
.cfg-switch input[type="checkbox"]:focus { box-shadow: 0 0 0 3px var(--accent-ring); border: 0; }

/* ---- segmented controls: tabs and .seg read as one control -------------- */
.tabs, .seg {
  gap: 2px; padding: 2px; border: 0; border-radius: 9px;
  background: var(--seg-bg); overflow: hidden;
}
.tabs { margin-bottom: var(--s-3); }
.tab, .seg button {
  min-height: 32px; padding: 6px 4px; border: 0; border-radius: 7px;
  background: transparent; color: var(--ink);
  font-size: var(--fs-footnote); font-weight: 500;
  transition: background var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.seg button { border-right: 0; }
.tab.active, .seg button.active {
  background: var(--seg-on); color: var(--ink); font-weight: 600;
  box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 3px 1px rgba(0,0,0,.04);
}
.badge { background: var(--fill); color: inherit; border-radius: 9px; font-size: var(--fs-caption); }
.tab.active .badge { background: var(--accent-fill); color: var(--on-accent); }
.fullpage .tabs { margin: var(--s-2) var(--s-4) 0; padding: 2px; overflow-x: auto; scrollbar-width: none; }
.fullpage .tabs::-webkit-scrollbar { display: none; }

/* ---- pills: tinted capsules --------------------------------------------- */
.pill { background: var(--fill); font-size: var(--fs-caption); padding: 3px 9px; border-radius: 999px; }

/* ---- login --------------------------------------------------------------- */
.login-wrap { padding: max(var(--s-6), env(safe-area-inset-top)) var(--s-4) var(--s-6); }
.brand { margin-bottom: var(--s-8); }
.brand-mark {
  width: 76px; height: 76px; border-radius: 18px; margin-bottom: var(--s-4);
  background: linear-gradient(160deg, var(--hero-2), var(--hero));
  box-shadow: 0 6px 16px rgba(20, 83, 45, .28);
}
.brand h1 { font-size: var(--fs-title-1); letter-spacing: -0.02em; }
.brand p { font-size: var(--fs-subhead); }

/* ---- orders -------------------------------------------------------------- */
.listbar { margin: 0 0 var(--s-2); min-height: var(--tap); font-size: var(--fs-footnote); }
.order { padding: var(--s-4); transition: opacity var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.order-client { font-size: var(--fs-headline); font-weight: 600; letter-spacing: -0.01em; }
.order-num { font-size: var(--fs-title); letter-spacing: -0.01em; }
.order-sum { font-size: var(--fs-subhead); font-weight: 600; color: var(--ink-soft); }
.order-pills { gap: var(--s-1); margin-top: var(--s-3); }
.order-erpnote, .order-note, .correction, .cancel-req, .edit-req, .receipt-badge, .receipt-failed {
  border-radius: var(--radius-field);
}
.order-erpnote { background: var(--fill); }
.order-actions { gap: var(--s-2); margin-top: var(--s-3); }
.receipt-img { border: 0; border-radius: var(--radius-field); background: var(--fill); }
/* A picked card: a green ring and tint, no side stripe. */
.order.picked { border: 0; box-shadow: 0 0 0 2px var(--accent); background: var(--ok-bg); }
.no-row.on { box-shadow: none; padding-left: var(--s-2); border-radius: var(--radius-btn); background: var(--ok-bg); }

/* Bulk bar: a floating capsule above the tab bar. */
.selectbar {
  left: max(var(--s-2), env(safe-area-inset-left)); right: max(var(--s-2), env(safe-area-inset-right));
  bottom: calc(env(safe-area-inset-bottom) + 50px + var(--s-2));
  max-width: 584px; margin: 0 auto; padding: var(--s-2) var(--s-2) var(--s-2) var(--s-4);
  border-radius: var(--radius-lg); background: var(--accent-fill); box-shadow: var(--shadow-float);
}
.selectbar .btn.primary { background: #fff; color: var(--accent-fill); }
.selectbar .linkbtn.light { color: #fff; font-weight: 600; }

/* ---- sheets: everything that pops up rises from the bottom --------------- */
.sheet-overlay, .rowmenu-back, .cashp-back, .drawer-backdrop { background: var(--scrim); }
.sheet, .rowmenu, .cashp-sheet {
  background: var(--sheet); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-sheet); position: relative;
}
.sheet { padding-top: var(--s-6); }
.rowmenu, .cashp-sheet { padding-top: var(--s-5); }
/* the grabber */
.sheet::before, .rowmenu::before, .cashp-sheet::before, .drawer-panel::before {
  content: ""; position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
  width: 36px; height: 5px; border-radius: 3px; background: var(--ink-faint);
}
.sheet-title, .cashp-client { font-size: var(--fs-headline); font-weight: 600; }
.sheet-item { min-height: var(--tap); background: transparent; color: var(--ink); font-size: var(--fs-body); }
.sheet-item:active, .rowmenu-item:active { background: var(--pressed); }
/* The row menu is an iOS action sheet: centred, accent, one line each. */
.rowmenu-head { text-align: center; font-size: var(--fs-footnote); border-bottom: var(--hairline) solid var(--line); }
.rowmenu-item {
  min-height: 56px; text-align: center; font-size: 20px; color: var(--accent);
  border-radius: 0;
}
.rowmenu-item.danger { color: var(--danger); }
.rowmenu-item.muted { color: var(--accent); font-weight: 600; }

/* Archive: was a side drawer, now a tall bottom sheet. */
.drawer-panel {
  top: calc(env(safe-area-inset-top) + var(--s-3)); left: 0; right: 0; bottom: 0;
  width: auto; max-width: 600px; margin: 0 auto;
  background: var(--paper); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-sheet); overflow: hidden;
}
.drawer-head {
  padding: var(--s-5) var(--s-2) var(--s-2) var(--s-4);
  background: var(--paper); border-bottom: 0; font-size: var(--fs-title); font-weight: 700;
}
.drawer-body { padding: 0 var(--s-4) calc(env(safe-area-inset-bottom) + var(--s-5)); }

@media (prefers-reduced-motion: no-preference) {
  .sheet, .rowmenu, .cashp-sheet, .drawer-panel { animation: sheet-up var(--t-slow) var(--ease-sheet); }
  .sheet-overlay, .rowmenu-back, .cashp-back, .drawer-backdrop { animation: fade var(--t-fast) var(--ease); }
  @keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
  /* Full pages push in from the right, like a navigation stack. */
  .fullpage { animation: push-in var(--t-slow) var(--ease-sheet); }
  @keyframes push-in { from { transform: translateX(32%); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* ---- full pages (driver tabs, group, client, new order) ----------------- */
.fullpage { background: var(--paper); }
.confirm-body { padding: var(--s-2) var(--s-4); }
.confirm-foot, .coll-actions {
  gap: var(--s-3); padding: var(--s-3) var(--s-4) calc(var(--s-3) + env(safe-area-inset-bottom));
  background: var(--bar-solid); border-top: 0; box-shadow: 0 calc(var(--hairline) * -1) 0 var(--line);
}
.confirm-foot .btn, .no-foot .btn { min-height: 50px; border-radius: var(--radius); }

/* ---- cash collection: nav-bar header, iOS number pad --------------------- */
.coll-head {
  min-height: calc(env(safe-area-inset-top) + 52px);
  background: var(--bar-solid); color: var(--ink);
  box-shadow: 0 var(--hairline) 0 var(--line);
}
.coll-title { font-size: var(--fs-headline); font-weight: 600; }
/* Close: the iOS grey circle. 30px drawn, 44px to the thumb (the ::after). */
.coll-close {
  position: relative; width: 30px; height: 30px; margin: 7px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--fill); color: var(--ink-soft);
  font-size: 22px; font-weight: 600; line-height: 1;
}
.coll-close::after { content: ""; position: absolute; inset: -7px; }
.coll-close:active { opacity: .5; }
.coll-body { padding: var(--s-4); }
.coll-label { font-size: var(--fs-footnote); }
.coll-hit { min-height: var(--tap); border: 0; border-radius: var(--radius-field); background: var(--card); color: var(--ink); }
.coll-hit:active { background: var(--pressed); }
.coll-field {
  min-height: 52px; border: 1px solid transparent; border-radius: var(--radius-field);
  background: var(--card); font-size: var(--fs-title); color: var(--ink);
}
.coll-field.big { font-size: var(--fs-title-1); }
.coll-field.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.coll-debt { color: var(--amber-ink); }
.coll-pad {
  gap: 6px; padding: 6px; background: var(--keypad-bg);
}
.coll-pad button {
  min-height: 48px; border-radius: 6px; background: var(--card); color: var(--ink);
  font-size: 25px; box-shadow: var(--shadow-key);
}
.coll-pad button:active { background: var(--pressed); }
/* Under the number pad the footer is part of the keyboard; elsewhere (the
   edit sheet) it is an ordinary bar. */
.coll-pad + .coll-actions { background: var(--keypad-bg); box-shadow: none; }
.coll-body .coll-name { background: var(--card); }
.coll-actions-2 { gap: var(--s-2); }
.cashp-sheet .cashp-full { font-size: var(--fs-body); }

/* ---- settings, HoReCa, staff, clients ----------------------------------- */
/* Settings rows get the iOS icon tile. */
.set-icon {
  width: 30px; height: 30px; border-radius: 7px; background: var(--fill);
  display: inline-flex; align-items: center; justify-content: center; font-size: 17px;
}
.cfg-group, .hz-bucket {
  color: var(--ink-soft); font-weight: 400; font-size: var(--fs-footnote); letter-spacing: 0;
  border-bottom: 0; margin: var(--s-5) 0 var(--s-1); padding-bottom: 0;
}
.disclosure { min-height: var(--tap); font-size: var(--fs-body); }
.disclosure .chev { color: var(--ink-faint); }
.staff-row, .pending-row, .no-row, .no-pick { min-height: var(--tap); }
.staff-name { font-weight: 400; font-size: var(--fs-body); }
.staff-row.unlinked .staff-pick { border-color: var(--danger); background: var(--danger-bg); }
.surum-map-row { border: 0; background: var(--fill); }
.hz-foot { border-top: var(--hairline) solid var(--line); }
.cl-name { font-size: var(--fs-title); letter-spacing: -0.01em; }
.cl-order summary { min-height: var(--tap); font-size: var(--fs-subhead); }
.no-chip { background: var(--ok-bg); border-radius: var(--radius-field); }
/* Stepper: 44px tall for the thumb, a little narrower so the product name
   keeps its room at 360-390px. */
.no-qty { gap: 2px; }
.no-qty .btn.sm { min-width: 40px; min-height: var(--tap); padding: 0; font-size: 20px; }
.no-qty input { width: 54px; min-height: var(--tap); }
.no-row .no-star { min-width: 28px; }
.ed-x { width: var(--tap); height: var(--tap); }
.ed-grid { grid-template-columns: minmax(0, 1fr) 58px 116px var(--tap); }
.ed-in.changed { border-color: var(--flag); background: var(--flag-bg); }
.ed-in.bad { border-color: var(--danger); background: var(--danger-bg); }
/* An empty star must still be findable on a dark card. */
.no-row .no-star { color: var(--ink-soft); }
.no-row .no-star.on { color: var(--star); }
/* The ✏️ hand-edit box sits above the photo, outside its receipt block. */
.correction.hand-edit { margin: var(--s-3) 0 0; }


/* ---- Belgilanganlar: line colours and ⇅ Tartib va rang (18.10.2026) ---- */
.no-row.no-c-red    { --c: var(--c-red);    --cb: var(--c-red-bg); }
.no-row.no-c-orange { --c: var(--c-orange); --cb: var(--c-orange-bg); }
.no-row.no-c-yellow { --c: var(--c-yellow); --cb: var(--c-yellow-bg); }
.no-row.no-c-green  { --c: var(--c-green);  --cb: var(--c-green-bg); }
.no-row.no-c-blue   { --c: var(--c-blue);   --cb: var(--c-blue-bg); }
.no-row.no-c-purple { --c: var(--c-purple); --cb: var(--c-purple-bg); }
/* Every row keeps the same inset, coloured or not, chosen or not, so
   names line up down the list and nothing shifts when a colour is set. */
#no-items .no-row { padding-left: var(--s-2); border-radius: var(--radius-btn); }
.no-row[class*="no-c-"] { box-shadow: inset 4px 0 0 var(--c); background: var(--cb); }
/* Chosen stays chosen-green; the colour keeps its stripe. */
.no-row[class*="no-c-"].on { background: var(--ok-bg); box-shadow: inset 4px 0 0 var(--c); }
.no-arr-bar { display: flex; gap: 8px; justify-content: flex-end; margin: 4px 0 8px; }
.no-arr-bar .btn { width: auto; margin: 0; }
.no-arr-row {
  padding: 8px 8px 8px 12px; margin-bottom: 6px; border-radius: var(--radius-btn, 10px);
  border: 1px solid var(--line);
}
.no-arr-row.no-c-red    { box-shadow: inset 4px 0 0 var(--c-red);    background: var(--c-red-bg); }
.no-arr-row.no-c-orange { box-shadow: inset 4px 0 0 var(--c-orange); background: var(--c-orange-bg); }
.no-arr-row.no-c-yellow { box-shadow: inset 4px 0 0 var(--c-yellow); background: var(--c-yellow-bg); }
.no-arr-row.no-c-green  { box-shadow: inset 4px 0 0 var(--c-green);  background: var(--c-green-bg); }
.no-arr-row.no-c-blue   { box-shadow: inset 4px 0 0 var(--c-blue);   background: var(--c-blue-bg); }
.no-arr-row.no-c-purple { box-shadow: inset 4px 0 0 var(--c-purple); background: var(--c-purple-bg); }
.no-arr-top { display: flex; align-items: center; gap: 6px; }
.no-arr-name { flex: 1; min-width: 0; font-size: 14px; line-height: 1.35; }
.no-arr-top .btn.sm { width: auto; margin: 0; min-width: 40px; min-height: 40px; padding: 6px 10px; }
.no-swatches { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.no-sw {
  width: 32px; height: 32px; border-radius: 50%; border: 2px solid transparent; padding: 0; margin: 0;
  cursor: pointer; -webkit-tap-highlight-color: transparent; font-size: 13px; color: var(--ink-soft);
}
.no-sw.on { border-color: var(--ink); }
.no-sw-none { background: var(--fill); }
.no-sw-red { background: var(--c-red); }
.no-sw-orange { background: var(--c-orange); }
.no-sw-yellow { background: var(--c-yellow); }
.no-sw-green { background: var(--c-green); }
.no-sw-blue { background: var(--c-blue); }
.no-sw-purple { background: var(--c-purple); }

/* ---- Swipe right to star (18.10.2026) ----------------------------------
   The row slides over a label saying what letting go will do. The row is
   opaque (its tints are layered over the card colour), so the label only
   shows where the row has moved off it. Only `transform` animates. */
.no-swipe {
  position: relative; overflow: hidden; touch-action: pan-y;
  border-radius: var(--radius-btn);
}
.no-swipe-bg {
  position: absolute; inset: 0; display: flex; align-items: center;
  padding-left: 16px; font-weight: 600; font-size: 15px;
  color: var(--ink-soft); background: var(--fill);
}
.no-swipe.armed .no-swipe-bg { background: var(--star); color: #fff; }
.no-swipe.armed .no-swipe-bg.off { background: var(--ink-soft); color: var(--card); }
.no-swipe > .no-row { position: relative; background-color: var(--card); }
.no-swipe > .no-row.dragging { will-change: transform; }
.no-swipe > .no-row.settling { transition: transform .17s ease-out; }
.no-swipe > .no-row.on { background: linear-gradient(var(--ok-bg), var(--ok-bg)), var(--card); }
.no-swipe > .no-row[class*="no-c-"] { background: linear-gradient(var(--cb), var(--cb)), var(--card); }
.no-swipe > .no-row[class*="no-c-"].on { background: linear-gradient(var(--ok-bg), var(--ok-bg)), var(--card); }
.no-swipe .no-star { pointer-events: none; display: inline-flex; align-items: center; justify-content: center; }
.no-swipe .no-name { -webkit-user-select: none; user-select: none; }
.no-swipe-hint { margin: 2px 0 6px; }
/* Olib tashlash in ⇅ Tartib va rang. */
.no-arr-rm { margin-left: auto; font-size: 13px; color: var(--danger); }
.no-arr-row.removed { opacity: .6; }
.no-arr-row.removed .btn.sm { min-width: 0; }

/* ---- New-order rows as separate tiles (22.10.2026) ------------------------
   Said: chosen lines ran into each other and the amount sat on the green
   edge. Every line is its own rounded tile with a gap under it and the same
   inner margin on both sides; a chosen one is tinted and loses its outline. */
#no-items .no-swipe, #no-items > .no-row { margin-bottom: 6px; }
#no-items .no-row {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-btn);
}
#no-items .no-row.on { border-color: transparent; }
#no-items .no-row[class*="no-c-"] { border-color: transparent; }
/* Four zones on one line at 360 px: each button as wide as its label. */
.no-zones button, .cl-zones button { flex: 1 1 auto; white-space: nowrap; padding-left: 6px; padding-right: 6px; }

/* ---------- 1C: the accountant's page (onec.js) ---------- */
.oc-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.oc-bar input { margin-top: 0; flex: 1; min-width: 0; }
.oc-bar .btn.sm { flex: 0 0 auto; font-size: 20px; line-height: 1; padding: 8px 14px; }
.oc-bar .btn.sm.oc-difflink { font-size: 14px; padding: 8px 12px; }
.navbtn.ph-hide { display: none; }
.bottomnav.crowded .navbtn { flex: 1 1 auto; min-width: 44px; }
.oc-meta { margin: 4px 2px 10px; }
.oc-hint { margin: 8px 0 0; }
#oc-list.loading { opacity: .5; pointer-events: none; }
.oc-group .disclosure { width: 100%; }
.oc-row { padding: 12px 0; border-bottom: 1px solid var(--line); }
.oc-row:last-child { border-bottom: 0; }
.oc-row.working { opacity: .6; }
.oc-top { display: flex; gap: 8px; align-items: baseline; }
.oc-num { font-weight: 700; font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.oc-client { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.oc-sum { flex: 0 0 auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.oc-smartup { margin-top: 2px; }
.oc-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.oc-lines { margin-top: 6px; }
.oc-line { display: flex; gap: 8px; align-items: baseline; font-size: 13px; padding: 2px 0; }
.oc-line .oc-qty { flex: 0 0 3.5em; text-align: right; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.oc-line .oc-lname { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.oc-line.bad .oc-lname { color: var(--danger); }
.oc-line .linkbtn { flex: 0 0 auto; font-size: 13px; }
.oc-note {
  font-size: 12px; color: var(--flag); background: var(--flag-bg);
  border-radius: 8px; padding: 7px 9px; margin-top: 8px; line-height: 1.4;
}
.oc-row .btn.sm { margin-top: 8px; }
.oc-switch {
  background: var(--flag-bg); border-radius: 8px; padding: 9px; margin-top: 8px;
}
.oc-switch-q { font-size: 12px; color: var(--flag); margin: 0 0 2px; line-height: 1.4; }
.oc-row .oc-switch .btn.sm {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  width: 100%; text-align: left; font-weight: 500;
  background: var(--card); color: var(--ink);
}
.oc-switch-label { font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.oc-foot { margin: 4px 2px 16px; }
/* The 1C pick list: the name across the row, its code and last sale under it. */
.oc-sheet .sheet-item { flex-direction: column; align-items: flex-start; gap: 2px; }
/* Tayyor: a tap anywhere on an order ticks it. */
.oc-row.pickable { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.oc-check {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--line); align-self: center; position: relative;
}
.oc-row.on .oc-check { background: var(--leaf); border-color: var(--leaf); }
.oc-row.on .oc-check::after {
  content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.oc-empty { margin: 12px 2px; }
/* Smena hisoboti (production.js): products made, their materials, the
   day's reports, the ведомость folded below. */
.op-reload { font-size: 18px; }
.op-action { margin: 0 0 10px; }
.op-action .btn { width: 100%; }
#op-list.loading { opacity: .5; pointer-events: none; }
.op-h { margin: 0 0 4px; font-size: 15px; display: flex; gap: 8px; align-items: center; }
.op-row { padding: 10px 0; border-bottom: 1px solid var(--line); }
.op-row:last-child { border-bottom: 0; }
.op-row p { margin: 2px 0 0; }
.op-row .btn.sm { margin-top: 8px; }
.op-top { display: flex; gap: 8px; align-items: baseline; }
.op-name { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.op-qty { flex: 0 0 auto; font-size: 17px; }
.op-mats { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 6px; }
.op-mat { font-size: 12px; background: var(--fill); border-radius: 999px; padding: 3px 9px; }
.op-osv { margin-top: 10px; }
.op-osv-row {
  display: grid; grid-template-columns: minmax(0, 1fr) repeat(4, 52px); gap: 4px;
  padding: 6px 0; border-bottom: 1px solid var(--line); align-items: baseline;
}
.op-osv-row > span:not(:first-child) { text-align: right; }
.op-osv-name { overflow-wrap: anywhere; }
.op-osv-head { border-bottom-width: 2px; }
.op-neg { color: var(--danger); }
/* The write's progress: how many of the ticked orders have landed. */
.oc-progress { margin: -4px 0 12px; }
.oc-progress-track { height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; }
.oc-progress-track span {
  display: block; height: 100%; width: 0; background: var(--leaf);
  transition: width .25s ease;
}
.oc-progress p { margin-top: 6px; font-variant-numeric: tabular-nums; }
/* ---- 1C page layout (27.10.2026, Said: "crammed") ---------------------
   The job switch (1C ga yozish | Faktura), then that job's four lists as
   tiles — the count large, the name small under it — which fit four to a
   row down to a 320 px phone whatever the counts. The ticks' count and the
   action ride in a capsule above the tab bar, like the orders page's. */
.oc-mode { display: flex; margin: 2px 0 10px; }
.oc-mode button { flex: 1 1 0; min-height: 38px; font-size: var(--fs-subhead, 15px); }
.oc-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0 0 12px; }
.oc-tiles.five { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.oc-tiles.five .oc-tile { padding: 8px 0; }
/* Didox's login line on the Faktura side (E-IMZO key, 30.10.2026). */
.oc-didox {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; margin: 0 0 12px; border-radius: 12px;
  background: var(--card); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 13px; color: var(--ink-soft);
}
.oc-didox .btn, .oc-didox .linkbtn { flex: 0 0 auto; }
.oc-didox.need { color: var(--ink); box-shadow: inset 0 0 0 1px var(--flag); }
.oc-tiles.five .oc-tile span { font-size: 11px; letter-spacing: -0.2px; }
.oc-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 60px; padding: 8px 2px; border: 0; border-radius: 12px;
  background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background var(--t-fast, .15s) ease, box-shadow var(--t-fast, .15s) ease;
}
.oc-tile b { font-size: 21px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.oc-tile span {
  max-width: 100%; font-size: 12px; color: var(--ink-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.oc-tile.zero b { color: var(--ink-soft); font-weight: 600; }
.oc-tile.flag b { color: var(--flag); }
.oc-tile.go b { color: var(--leaf); }
.oc-tile.active { background: var(--accent-fill); box-shadow: none; }
.oc-tile.active b, .oc-tile.active span { color: var(--on-accent); }
.oc-tile:disabled { cursor: default; }
/* The capsule: count + Hammasi on the left, the action on the right; while
   the orders go, the progress takes the whole capsule. */
.oc-selectbar { gap: 10px; }
.oc-selinfo { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; }
.oc-selinfo .tab-num { font-size: 15px; font-weight: 600; white-space: nowrap; }
.oc-selectbar .btn.primary:disabled { opacity: .6; }
.oc-selectbar .oc-progress { flex: 1; margin: 2px 4px 2px 0; }
.oc-selectbar.busy .oc-selinfo, .oc-selectbar.busy #oc-write-all { display: none; }
.oc-selectbar .oc-progress-track { background: rgba(255, 255, 255, .3); }
.oc-selectbar .oc-progress-track span { background: #fff; }
.oc-selectbar .oc-progress p { margin-top: 4px; color: #fff; font-weight: 600; }
/* Room under the list for the capsule, so the last order is never under it. */
#page-onec.has-bar { padding-bottom: calc(env(safe-area-inset-bottom) + 50px + 84px); }
/* Farqlar: the order's day opens the 1C page there. */
.oc-head .oc-day.linkbtn { padding: 0; min-height: 0; font-size: 13px; font-weight: 600; }

/* ---- 1C page: photos, ✏️, Farqlar (22.10.2026) -------------------------- */
/* The header: the client on its own line, the number and the amount under
   it (Said, 22.10.2026). The tick sits beside both. */
.oc-head { display: flex; gap: 8px; align-items: flex-start; }
.oc-head .oc-check { margin-top: 2px; flex: 0 0 auto; }
.oc-head-main { flex: 1; min-width: 0; }
.oc-head .oc-client { display: block; font-weight: 600; overflow-wrap: anywhere; }
.oc-head .oc-top { margin-top: 2px; }
.oc-head .oc-top .oc-num { flex: 1; }
.oc-day { flex: 0 0 auto; color: var(--ink-soft); font-size: 13px; }
/* Photos folded: 56px squares, centred, ▾ under them — the row's height is
   known before any image arrives. Unfolded: full width, as on Said's cards,
   ▴ under them. */
.oc-pics { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 10px; }
.oc-pics.open { align-items: stretch; gap: 10px; }
.oc-pic-strip { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.oc-thumb {
  width: 56px; height: 56px; padding: 0; border: 0; border-radius: 8px;
  background: var(--fill); overflow: hidden; cursor: pointer; flex: 0 0 auto;
}
.oc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.oc-thumb img:not([src]) { visibility: hidden; }
.oc-pic-toggle {
  align-self: center; width: 56px; height: 30px; border: 0; border-radius: 15px;
  background: var(--fill); color: var(--ink-soft); font-size: 16px; line-height: 1;
  cursor: pointer;
}
.oc-pic-toggle:active { background: var(--pressed); }
.oc-bot { font-size: 12px; color: var(--flag); flex: 0 0 auto; }
.oc-row .btn.sm.oc-edit { margin-top: 10px; }
.oc-ed-pics { display: flex; flex-direction: column; gap: 8px; margin: -14px -14px 12px; }
.oc-ed-pics:empty { display: none; }
.oc-ed-src { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.oc-ed-src .oc-bot { display: block; }
.navbtn .navicon { position: relative; }
.nav-badge {
  position: absolute; top: -4px; right: -10px; min-width: 18px; height: 18px;
  padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.od-head { display: flex; flex-direction: column; gap: 8px; }
.od-bar { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.od-bar .btn.sm { flex: 0 0 auto; }
.od-filter { margin-top: 0; }
/* Four tabs once E'tiborsiz has entries: the count under the label, so all
   four fit a 360px phone without touching. */
#od-tabs.four .tab { flex-direction: column; gap: 2px; padding: 5px 2px; }
#od-tabs.four .tab span:first-child { white-space: normal; overflow-wrap: anywhere; }
.od-reason { margin: 8px 0 0; line-height: 1.4; }
.od-tg { display: flex; gap: 8px; align-items: center; justify-content: space-between;
         font-size: 13px; }
.od-tg .btn.sm { margin-top: 0; }
.od-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.od-item:last-child { border-bottom: 0; }
.od-item .oc-note { color: var(--ink); }
.od-item .btn.sm { margin-top: 8px; }

/* Search + sort on the 1C page (23.10.2026). */
.oc-filter { display: flex; gap: 8px; margin: 0 0 10px; }
.oc-filter input, .oc-filter select {
  margin-top: 0; min-width: 0; font-size: 16px; padding: 9px 10px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink);
}
.oc-filter input { flex: 1 1 auto; }
.oc-filter select { flex: 0 0 auto; max-width: 40%; }

/* ---- view as (👁 in Xodimlar) --------------------------------------------
   A strip under the bar's own row, inside the sticky bar so it never
   scrolls away: while it shows, whatever is on screen is somebody else's. */
.topbar.viewing { flex-wrap: wrap; }
.viewas-banner {
  order: 99; flex: 1 0 100%;
  display: flex; align-items: center; gap: 8px;
  margin: 4px 0 6px; padding: 6px 10px; border-radius: 10px;
  background: var(--flag-bg); color: var(--amber-ink);
  font-size: 13px; font-weight: 600; line-height: 1.3;
}
.viewas-banner span { flex: 1; min-width: 0; }
.viewas-back {
  flex: 0 0 auto; border: 0; border-radius: 8px; padding: 6px 12px;
  background: var(--amber-ink); color: #fff; font: inherit; cursor: pointer;
}
.staff-btns { display: flex; gap: 12px; flex: 0 0 auto; }
/* One difference: Smartup, 1C and the gap on their own lines, readable
   (Said, 26.10.2026). Also the ✏️ sheet's total. */
.oc-diff {
  margin-top: 10px; padding: 10px 12px; border-radius: 10px;
  background: var(--flag-bg); color: var(--ink);
}
.oc-diff-what { font-size: 15px; font-weight: 600; margin-bottom: 4px; overflow-wrap: anywhere; }
.oc-diff-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  font-size: 16px; line-height: 1.5;
}
.oc-diff-row span { color: var(--ink-soft); }
.oc-diff-row b { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.oc-diff-row.gap b { color: var(--flag); }
.ed-total .oc-diff { margin-top: 0; }
#od-tabs { margin-top: 4px; }
#od-tabs .tab { white-space: nowrap; gap: 4px; padding-left: 2px; padding-right: 2px; }
/* A Farqlar row's two fixes side by side: ✏️ by hand, ⇄ to Smartup's. */
.oc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.oc-row .oc-actions .btn.sm { margin-top: 0; }
/* A menu's heading says what the tap will do; cut off with "…" it hid the
   part that mattered (the 1C re-posting, 26.10.2026). Wraps instead. */
.rowmenu-head { white-space: normal; overflow: visible; line-height: 1.4; }

/* ---- Suhbatlar (inbox.js): the bots' private chats ---------------------- */
.ib-bar { display: flex; flex-direction: column; gap: var(--s-2); margin-bottom: var(--s-3); }
.ib-bar input[type="search"] { width: 100%; }
.ib-filter { margin-top: 0; }
.ib-filter button { flex: 1; }
.ib-list { padding: 0; overflow: hidden; }
.ib-empty { padding: var(--s-4); margin: 0; text-align: center; }
.ib-note { margin: 0 var(--s-1) var(--s-6); line-height: 1.45; }
.ib-row {
  display: flex; align-items: center; gap: var(--s-3); width: 100%;
  padding: 10px var(--s-4); border: 0; background: none; text-align: left;
  color: var(--ink); font: inherit; cursor: pointer; min-height: 64px;
  box-shadow: inset 0 calc(var(--hairline) * -1) 0 var(--line);
}
.ib-row:last-child { box-shadow: none; }
.ib-row:active { background: var(--pressed); }
.ib-avatar {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%;
  background: var(--fill); color: var(--ink-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600;
}
.ib-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ib-top { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.ib-name { font-size: var(--fs-callout); font-weight: 600; white-space: nowrap;
           overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ib-bot { flex: 0 0 auto; font-size: 11px; padding: 1px 6px; border-radius: 999px;
          background: var(--teal-bg); color: var(--teal); font-weight: 600; }
.ib-bot-nak { background: var(--berry-bg); color: var(--berry); }
.ib-blocked { flex: 0 0 auto; font-size: 11px; padding: 1px 6px; border-radius: 999px;
              background: var(--danger-bg); color: var(--danger); font-weight: 600; }
.ib-time { margin-left: auto; flex: 0 0 auto; font-size: var(--fs-caption);
           color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.ib-meta { font-size: var(--fs-caption); color: var(--ink-soft); white-space: nowrap;
           overflow: hidden; text-overflow: ellipsis; }
.ib-last { font-size: var(--fs-subhead); color: var(--ink-soft); white-space: nowrap;
           overflow: hidden; text-overflow: ellipsis; }
.ib-row.unread .ib-last { color: var(--ink); font-weight: 500; }
.ib-unread {
  flex: 0 0 auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px;
  background: var(--accent-fill); color: var(--on-accent);
  font-size: 12px; font-weight: 700; line-height: 22px; text-align: center;
  font-variant-numeric: tabular-nums;
}

#ib-chat .topbar > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-sub { flex: 0 0 auto; padding: 2px var(--s-4) 6px; text-align: center;
          font-size: var(--fs-caption); color: var(--ink-soft); }
.ib-sub:empty { display: none; }
.ib-warn { flex: 0 0 auto; margin: 0 var(--s-4) var(--s-2); padding: 8px 12px;
           border-radius: var(--radius-btn); background: var(--danger-bg); color: var(--danger);
           font-size: var(--fs-footnote); line-height: 1.4; }
.ib-thread {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: var(--s-2) var(--s-3) var(--s-3); overscroll-behavior: contain;
}
.ib-older { display: block; margin: 4px auto 8px; }
.ib-day { text-align: center; margin: 10px 0 6px; font-size: var(--fs-caption);
          color: var(--ink-soft); font-weight: 600; }
.ib-msg { display: flex; margin: 3px 0; }
.ib-msg.out { justify-content: flex-end; }
.ib-bubble {
  max-width: min(82%, 520px); padding: 7px 11px 5px; border-radius: 16px;
  background: var(--card); color: var(--ink);
  box-shadow: 0 1px 1px rgba(0,0,0,.06);
}
.ib-msg.in .ib-bubble { border-bottom-left-radius: 5px; }
.ib-msg.out .ib-bubble { border-bottom-right-radius: 5px; }
/* The bot's own messages: quiet tint, so they read as the bot talking. */
.ib-msg.o-bot .ib-bubble { background: var(--fill); }
/* What Said sent (from here or with /message): the app's own colour. */
.ib-msg.o-app .ib-bubble, .ib-msg.o-broadcast .ib-bubble {
  background: var(--accent-fill); color: var(--on-accent);
}
.ib-msg.deleted .ib-text { opacity: .55; text-decoration: line-through; }
.ib-origin { display: block; font-size: 11px; font-weight: 600; letter-spacing: .2px;
             color: var(--ink-soft); margin-bottom: 1px; }
.ib-msg.o-app .ib-origin, .ib-msg.o-broadcast .ib-origin { color: inherit; opacity: .8; }
.ib-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--fs-subhead); line-height: 1.38; }
.ib-stamp { display: block; text-align: right; font-size: 11px; opacity: .6; margin-top: 2px;
            font-variant-numeric: tabular-nums; }
.ib-photo-btn { margin-top: 6px; padding: 6px 10px; border: 0; border-radius: var(--radius-btn);
                background: var(--seg-on); color: var(--accent); font: inherit;
                font-size: var(--fs-footnote); font-weight: 600; cursor: pointer; }
.ib-send-error { flex: 0 0 auto; margin: 0; padding: 8px var(--s-4); font-size: var(--fs-footnote);
                 color: var(--danger); background: var(--danger-bg); line-height: 1.4; }
.ib-compose {
  flex: 0 0 auto; display: flex; align-items: flex-end; gap: var(--s-2);
  padding: 8px var(--s-3) calc(8px + env(safe-area-inset-bottom));
  background: var(--bar-solid); box-shadow: 0 calc(var(--hairline) * -1) 0 var(--line);
}
#ib-form textarea {
  flex: 1 1 auto; width: auto; min-width: 0; height: 40px; min-height: 40px; max-height: 140px;
  resize: none; margin: 0; padding: 9px 14px; border: 0; border-radius: 20px;
  background: var(--field); color: var(--ink); outline: none;
  font: inherit; font-size: 16px; line-height: 1.35;
}
#ib-form textarea:focus { box-shadow: 0 0 0 3px var(--accent-ring); }
#ib-form textarea::placeholder { color: var(--ink-soft); opacity: .8; }
#ib-form .btn.primary {
  flex: 0 0 auto; width: auto; min-height: 40px; margin: 0; border-radius: 20px; padding: 0 16px;
}
.ib-compose.working textarea { opacity: .6; }
.ib-photo {
  position: absolute; inset: 0; z-index: 2; background: rgba(0,0,0,.88);
  display: flex; align-items: center; justify-content: center; cursor: zoom-out;
}
.ib-photo img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* Parts of the page only the computer layout shows (desktop.css, which a
   phone never applies): the sidebar's top and bottom, the orders search and
   the open order beside the list. */
.dt-only { display: none; }

/* Zone chips (orders page, owner) and the archive's search / sort / zone
   (04.11.2026). The same segmented look as Mijozlar's zones. */
.zone-chips { margin: 8px 0 0; }
.zone-chips button { flex: 1 1 auto; white-space: nowrap; padding-left: 4px; padding-right: 4px;
                     font-size: 13px; min-width: 0; }
.arch-tools { padding: 0 var(--s-4, 16px) var(--s-3, 12px); }
.arch-row { display: flex; gap: 8px; align-items: center; }
.arch-row input { margin-top: 0; flex: 1; min-width: 0; }
.arch-row select {
  margin-top: 0; flex: 0 0 auto; width: auto; max-width: 42%; padding: 0 10px;
  min-height: var(--tap); border: 1px solid transparent; border-radius: var(--radius-field);
  background: var(--field); color: var(--ink); font-size: 16px;
}
.arch-row select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }

/* Sozlamalar → Odoo → Smartup bilan tenglashtirish: two days side by side. */
.osync-days { display: flex; gap: 10px; }
.osync-days label { flex: 1; min-width: 0; }
.osync-go { margin-top: 14px; }
.osync-report { margin: 10px 0 0; max-height: 60vh; overflow: auto; white-space: pre-wrap;
  word-break: break-word; font-size: 12px; line-height: 1.45; background: var(--fill);
  border-radius: 10px; padding: 10px 12px; }

/* ↻ Yangilash while the whole-reach order read runs (seconds). */
@keyframes refresh-spin { to { transform: rotate(360deg); } }
#refresh-btn.spinning svg { animation: refresh-spin .9s linear infinite; }
#refresh-btn.spinning { opacity: .7; }

/* ---- a driver's / agent's balance, day by day (10.11.2026) -------------- */
.bd-day {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 12px 0 4px; border-top: 1px solid var(--line);
  font-size: var(--fs-footnote); font-weight: 600; color: var(--ink-soft);
}
#my-breakdown > .bd-day:first-child { border-top: 0; padding-top: 4px; }
.bd-day .tab-num { color: var(--ink); font-size: 15px; }
#my-breakdown .pending-row { padding: 8px 0; }
.bd-held { font-size: var(--fs-footnote); color: var(--ink-soft); padding: 8px 0 0; }

/* ---- what the phone still holds for the server (driverq.js, 10.11.2026) -- */
.dq-dot .dq-dot-c { width: 10px; height: 10px; border-radius: 50%;
  border: 1.5px solid currentColor; opacity: .35; box-sizing: border-box;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
              opacity var(--t-fast) var(--ease); }
.dq-dot.wait .dq-dot-c { background: #f2b705; border-color: #f2b705; opacity: 1; }
.dq-dot.bad .dq-dot-c { background: var(--danger); border-color: var(--danger); opacity: 1; }
.pill.wait { background: var(--fill); color: var(--ink-soft); }
.dq-head { font-size: var(--fs-footnote); font-weight: 600; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: .03em; padding: 16px 0 6px; }
.dq-head.bad { color: var(--danger); }
.dq-row { display: flex; gap: 12px; align-items: center; padding: 12px 0;
  border-bottom: 1px solid var(--line); }
.dq-main { flex: 1; min-width: 0; }
.dq-title { font-size: var(--fs-body); font-weight: 600; overflow-wrap: anywhere; }
.dq-sub { font-size: var(--fs-footnote); color: var(--ink-soft); margin-top: 2px;
  overflow-wrap: anywhere; }
.dq-row.bad .dq-sub { color: var(--danger); }
.dq-head.warn { color: var(--flag); }
.dq-row.warn .dq-sub { color: var(--ink); }
.dq-acts { display: flex; flex-direction: column; gap: 6px; flex: 0 0 auto; }
#dq-body > .btn.wide { margin-top: 16px; }
