/* ==========================================================================
   Juicy Garden — the computer layout (27.10.2026)
   --------------------------------------------------------------------------
   index.html loads this file 980px wide and either 600px tall or with a
   mouse (28.10.2026 — until then a mouse was always required, and an iPad
   or a phone's "Desktop site" got the phone app): a computer, an iPad on
   its side, "Desktop site" held upright. A phone on its side is never 600px
   tall, so a phone never applies a line of it by itself and the phone app
   is exactly what it was. desktop.js uses the same query for behaviour. A finger on that screen gets the
   bigger controls at the end of this file.

   What changes on a computer, and why:
   - Navigation is a sidebar, always there; the bottom tab bar is a thumb's
     tool. The page header is a plain title with the page's own buttons,
     labelled, not icons to be guessed at.
   - Buyurtmalar is a list of short rows with the open order beside it,
     photos large — a document is checked against its order, not scrolled
     past. Archive one, the next is already open.
   - Bosh sahifa is the ledger (what is held, by whom) beside the queue
     (what waits for a confirmation).
   - Sheets that rose from the bottom are dialogs in the middle; full-screen
     pages are panels from the right with the page still visible beside
     them; action menus open where the click was.
   - Type, controls and spacing at desktop size: 14px text, 36px controls
     (a mouse is precise; a thumb is not), more air between groups.

   One scale for everything (Refactoring UI): text 12 13 14 16 18 22 28 40,
   space 4 8 12 16 24 32 48, corners 6 8 12 16. A size not on the scale is a
   size someone made up — add it to the scale or do not use it.

   Looks only. Every colour still comes from theme.css, so dark mode works
   unchanged; nothing here decides what is shown or hidden — except the few
   computer-only parts marked .dt-only in index.html.
   ========================================================================== */

/* The emoji on buttons (✏️ 💾 ➕ 📄 💳 …) as line icons, the sidebar's own
   kind (Lucide), from a 6 KB font built by make_icon_font.py. The text stays
   the emoji, so nothing that reads or restores a button's label changes;
   the browser just draws these code points from this font. Status signs
   (⚠️ ✅ ❌ ⭐) are left out on purpose: their colour is the message. */
@font-face {
  font-family: "JG Icons";
  src: url("icons.woff2?v=1") format("woff2");
  font-display: block;
  unicode-range: U+23F3, U+2699, U+270F, U+2795, U+1F319, U+1F37D, U+1F441, U+1F464,
                 U+1F465, U+1F4B3, U+1F4BE, U+1F4C4, U+1F4CA, U+1F4CB, U+1F4DE,
                 U+1F4E4, U+1F4E6, U+1F4F1, U+1F50C, U+1F511, U+1F514, U+1F5D1,
                 U+1F6D2, U+1F7E3, U+1F9FE, U+FE0F;
}

:root {
  --font: "JG Icons", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;

  /* the scales */
  --text-xs: 12px;  --text-sm: 13px;  --text-base: 14px; --text-lg: 16px;
  --text-xl: 18px;  --text-2xl: 22px; --text-3xl: 28px;  --text-4xl: 40px;
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-6: 24px; --sp-8: 32px; --sp-12: 48px;
  --r-sm: 6px;  --r-md: 8px;  --r-lg: 12px; --r-xl: 16px;

  --sb: 240px;              /* sidebar */
  --hdr: 64px;              /* page header */
  --gutter: var(--sp-8);
  --frame: 1240px;          /* a page's width; wider for Buyurtmalar and 1C */

  /* theme.css's iOS text styles, mapped onto the scale */
  --fs-large-title: var(--text-3xl);
  --fs-title: var(--text-xl);
  --fs-title-1: var(--text-3xl);
  --fs-headline: var(--text-lg);
  --fs-body: var(--text-base);
  --fs-callout: var(--text-base);
  --fs-subhead: var(--text-sm);
  --fs-footnote: var(--text-xs);
  --fs-caption: var(--text-xs);
  --tap: 36px;

  --paper: #F5F5F7;
  --sidebar: #FBFBFD;
  --hair: rgba(0, 0, 0, .08);
  --row-hover: rgba(0, 0, 0, .04);
  --hover-tint: rgba(0, 0, 0, .05);
  --accent-soft: rgba(36, 138, 61, .11);
  --toast: #1D1D1F;
  --shadow-card: 0 0 0 1px rgba(0, 0, 0, .045), 0 1px 3px rgba(0, 0, 0, .05);
  --shadow-panel: -16px 0 48px rgba(0, 0, 0, .16);
  --shadow-dialog: 0 24px 64px rgba(0, 0, 0, .22), 0 2px 8px rgba(0, 0, 0, .08);
}
:root[data-theme="dark"] {
  --sidebar: #0E0E10;
  --hair: rgba(255, 255, 255, .09);
  --row-hover: rgba(255, 255, 255, .055);
  --hover-tint: rgba(255, 255, 255, .07);
  --accent-soft: rgba(48, 209, 88, .14);
  --toast: #3A3A3C;
  --shadow-card: 0 0 0 1px rgba(255, 255, 255, .06);
  --shadow-panel: -16px 0 48px rgba(0, 0, 0, .6);
  --shadow-dialog: 0 24px 64px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .08);
}

/* ---- foundations ----------------------------------------------------------- */
body { font-size: var(--text-base); line-height: 1.4; }
* { scrollbar-width: thin; scrollbar-color: var(--ink-faint) transparent; }
::selection { background: var(--accent-soft); }
kbd {
  display: inline-block; min-width: 20px; padding: 1px var(--sp-1); margin: 0 1px;
  font: 600 var(--text-xs)/1.3 var(--font); text-align: center; color: var(--ink-soft);
  background: var(--card); border-radius: var(--r-sm);
  box-shadow: inset 0 0 0 1px var(--hair), inset 0 -1px 0 var(--hair);
}
@keyframes dt-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes dt-rise { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes dt-slide { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes dt-spin { to { transform: rotate(360deg); } }
@keyframes dt-bar { from { background-position: -40% 0; } to { background-position: 140% 0; } }
@keyframes dt-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ---- the sidebar (the phone's tab bar) ------------------------------------- */
#view-app { padding-left: var(--sb); }
.bottomnav {
  top: 0; bottom: 0; left: 0; right: auto; width: var(--sb); z-index: 30;
  flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 2px;
  padding: var(--sp-4) var(--sp-3); overflow-y: auto;
  background: var(--sidebar); box-shadow: 1px 0 0 var(--hair);
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.navbtn {
  position: relative; flex: 0 0 auto; max-width: none; min-height: 36px;
  flex-direction: row; justify-content: flex-start; align-items: center; gap: var(--sp-3);
  padding: 0 var(--sp-3); border-radius: var(--r-md);
  font-size: var(--text-base); font-weight: 500; letter-spacing: 0; color: var(--ink);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.navbtn .navicon { position: static; color: var(--ink-soft); }
.navbtn .navicon .ico { width: 18px; height: 18px; stroke-width: 1.9; }
.navbtn:hover { background: var(--row-hover); }
.navbtn:active { opacity: 1; background: var(--hover-tint); }
.navbtn.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.navbtn.active .navicon { color: var(--accent); }
.navbtn.active .ico { stroke-width: 2.1; }
.navbtn .nav-badge { top: 50%; right: var(--sp-3); transform: translateY(-50%); }
.sb-count {
  display: inline-block; margin-left: auto; min-width: 20px; padding: 0 var(--sp-2);
  border-radius: 10px; background: var(--fill); color: var(--ink-soft);
  font-size: var(--text-xs); font-weight: 600; line-height: 20px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.navbtn.active .sb-count { background: var(--accent-fill); color: var(--on-accent); }

.sb-brand {
  order: -1; display: flex; align-items: center; gap: var(--sp-3);
  padding: 0 var(--sp-2) var(--sp-6);
}
.sb-mark {
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: var(--r-md);
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--hero-2), var(--hero)); color: #fff;
  font-size: var(--text-sm); font-weight: 700; letter-spacing: .5px;
  box-shadow: 0 2px 6px rgba(20, 83, 45, .25);
}
.sb-name { display: flex; flex-direction: column; font-size: var(--text-base); font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.sb-name small { font-size: var(--text-xs); font-weight: 400; color: var(--ink-soft); letter-spacing: 0; }

.sb-keys {
  order: 98; margin-top: auto; display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: var(--sp-2) var(--sp-3); border: 0; border-radius: var(--r-md);
  background: none; color: var(--ink-soft); font: inherit; font-size: var(--text-sm);
  cursor: pointer; text-align: left;
}
.sb-keys:hover { background: var(--row-hover); color: var(--ink); }
.sb-user {
  order: 99; display: flex; align-items: center; gap: var(--sp-3);
  width: 100%; padding: var(--sp-2); border: 0; border-radius: var(--r-lg); background: none;
  color: var(--ink); text-align: left; cursor: pointer; font: inherit;
}
.sb-user:hover { background: var(--row-hover); }
.sb-avatar {
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent); font-size: var(--text-xs); font-weight: 700;
}
.sb-who { display: flex; flex-direction: column; min-width: 0; font-size: var(--text-sm); font-weight: 600; line-height: 1.3; }
.sb-who > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-who small { font-size: var(--text-xs); font-weight: 400; color: var(--ink-soft); }

/* ---- the page header -------------------------------------------------------- */
/* A plain title, left, at the page's own edge; the page's buttons right,
   each with its name. The phone's large title that shrinks into the bar is
   a scrolling gesture a computer does not need. */
.large-title { display: none; }
#view-app > .topbar, #view-app > .topbar:not(.condensed) {
  min-height: var(--hdr); z-index: 20;
  padding: 0 max(var(--gutter), calc((100% - var(--frame)) / 2 + var(--gutter)));
  gap: var(--sp-2);
  background: var(--paper); box-shadow: 0 1px 0 var(--hair);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  #view-app > .topbar, #view-app > .topbar:not(.condensed) {
    background: color-mix(in srgb, var(--paper) 82%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    backdrop-filter: saturate(180%) blur(16px);
  }
}
#view-app > .topbar #topbar-title, #view-app > .topbar.condensed #topbar-title {
  opacity: 1; text-align: left; font-size: var(--text-2xl); font-weight: 700; letter-spacing: -0.015em;
}
.iconbtn { min-width: 36px; min-height: 36px; }
.iconbtn:hover { background: var(--row-hover); }
#back-btn { margin-left: calc(var(--sp-2) * -1); }
.viewas-banner { margin: 0 0 var(--sp-3); }
/* Архив and Yangilash: an icon AND its name. */
#archive-btn, #refresh-btn { gap: var(--sp-2); padding: 0 var(--sp-3); }
.dt-btn-label { display: inline; font-size: var(--text-base); font-weight: 500; color: var(--ink); }
#archive-btn .ico, #refresh-btn .ico { width: 18px; height: 18px; }
/* Reading Smartup: ↻ turns and a thin line runs under the header. */
.dt-reading #refresh-btn .ico { animation: dt-spin .9s linear infinite; }
.dt-reading #view-app > .topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent) no-repeat;
  background-size: 40% 100%; animation: dt-bar 1.1s linear infinite;
}

/* Each page's width. The header follows it, so the title always sits on
   the content's own left edge. */
#view-app:has(#page-orders:not(.hidden)) { --frame: 1760px; }
#view-app:has(#page-onec:not(.hidden)) { --frame: 1440px; }

.page {
  max-width: var(--frame); margin: 0 auto;
  padding: var(--sp-6) var(--gutter) var(--sp-12);
}

/* ---- cards, rows, type ------------------------------------------------------ */
.card { padding: var(--sp-6); margin-bottom: var(--sp-4); box-shadow: var(--shadow-card); }
.card h2 { font-size: var(--text-lg); margin-bottom: var(--sp-2); }
.row-head { font-size: var(--text-xs); font-weight: 600; letter-spacing: .05em; padding-bottom: var(--sp-3); }
.row-head .tab-num { font-size: var(--text-base); letter-spacing: 0; }
.row { min-height: 0; padding: var(--sp-2) 0; }
.rows .row span:first-child { color: var(--ink); }
.muted.small, .hint { line-height: 1.5; }

/* Rows in a card: the hover runs edge to edge of the card, like a table's. */
.card .hz-row:hover:not(.static), .card .summary-row:hover {
  background: var(--row-hover);
  margin-inline: calc(var(--sp-6) * -1); padding-inline: var(--sp-6); width: calc(100% + var(--sp-6) * 2);
}
.summary-row:active, .hz-row:not(.static):active {
  margin-inline: calc(var(--sp-6) * -1); padding-inline: var(--sp-6); width: calc(100% + var(--sp-6) * 2);
}
.hz-row, .summary-row { min-height: 0; padding-block: var(--sp-3); }
.hz-title, .summary-name { font-size: var(--text-base); }
.hz-chev, .summary-chev { font-size: var(--text-xl); }

/* ---- controls --------------------------------------------------------------- */
.btn {
  min-height: 36px; padding: 0 var(--sp-4); font-size: var(--text-base); border-radius: var(--r-md);
}
.btn:hover:not(:disabled) { box-shadow: inset 0 0 0 999px var(--hover-tint); }
.btn.primary:hover:not(:disabled) { box-shadow: inset 0 0 0 999px rgba(0, 0, 0, .08); }
.btn.sm { min-height: 32px; padding: 0 var(--sp-3); font-size: var(--text-sm); }
.btn.primary.wide, form > .btn.primary, .cashp-sheet .btn, .coll-actions .btn,
.confirm-foot .btn, .no-foot .btn {
  min-height: 40px; border-radius: var(--r-md);
}
.linkbtn { min-height: 32px; font-size: var(--text-base); }
.linkbtn:hover { text-decoration: underline; text-underline-offset: 3px; }

label { font-size: var(--text-xs); font-weight: 500; margin-top: var(--sp-4); }
input, select[data-kind="choice"], .hz-pick, .hz-select, #sn-form select,
.coll-name, .staff-pick, .sheet-field input, .sheet-search {
  min-height: 36px; padding: var(--sp-2) var(--sp-3); font-size: var(--text-base); border-radius: var(--r-md);
}
input[type="checkbox"], input[type="radio"] { min-height: 0; padding: 0; }
.ed-in { min-height: 36px; font-size: var(--text-base); }

.cfg-switch input[type="checkbox"] { width: 40px; height: 24px; }
.cfg-switch input[type="checkbox"]::after { width: 20px; height: 20px; }
.cfg-switch input[type="checkbox"]:checked::after { transform: translateX(16px); }
.cfg-switch-text { font-size: var(--text-base); }

.tabs, .seg { border-radius: var(--r-md); }
.tab, .seg button {
  min-height: 32px; padding-inline: var(--sp-2); font-size: var(--text-sm);
  border-radius: var(--r-sm); cursor: pointer;
}
.tab:hover:not(.active), .seg button:hover:not(.active) { background: var(--hover-tint); }
.badge { font-size: var(--text-xs); }
.pill { font-size: var(--text-xs); }

/* ---- Bosh sahifa: the ledger beside the queue ----------------------------- */
.home-grid {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(340px, 1fr);
  gap: var(--sp-6); align-items: start;
}
#owner-balance {
  grid-column: 1; grid-row: 1;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-4);
}
#owner-balance > .card { margin: 0; }
#owner-balance > .money-card, #advances-card, #owner-balance > .total-card, #card-card { grid-column: 1 / -1; }
.home-main { grid-column: 2; grid-row: 1; }
.home-grid:has(> #owner-balance.hidden) .home-main { grid-column: 1 / -1; width: 100%; max-width: 560px; }
.home-main #collect-btn { margin: 0 0 var(--sp-4); }
.handover-btns { flex-direction: row; }
.home-calm {
  display: none; padding: var(--sp-8) var(--sp-6); border-radius: var(--r-lg);
  text-align: center; color: var(--ink-soft); font-size: var(--text-sm);
  box-shadow: inset 0 0 0 1px var(--hair);
}
.home-main:not(:has(#pending-card:not(.hidden), #handover-card:not(.hidden), #my-custody-card:not(.hidden))) .home-calm {
  display: block;
}

/* The hero: what is in the kassa. One number the eye lands on first. */
.money-card { padding: var(--sp-6) var(--sp-8); }
.money-label { font-size: var(--text-sm); }
.money-big { font-size: var(--text-4xl); letter-spacing: -0.025em; margin-top: var(--sp-2); }
.money-sub { font-size: var(--text-xs); margin-top: var(--sp-2); }
.cl-debt .money-big { font-size: var(--text-3xl); }

/* The two totals as two figures side by side, not two lines of a list. */
.total-card { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--sp-6); }
.total-card .row {
  flex-direction: column; align-items: flex-start; gap: var(--sp-1); padding: 0;
  font-size: var(--text-xs); color: var(--ink-soft);
}
.total-card .row + .row { padding-left: var(--sp-6); box-shadow: -1px 0 0 var(--hair); }
.total-card .row .tab-num { font-size: var(--text-2xl); color: var(--ink); letter-spacing: -0.01em; }

.pending-row { padding: var(--sp-3) 0; }
.pending-client { font-size: var(--text-base); }
.pending-amount { font-size: var(--text-base); }

/* ---- Buyurtmalar: the list and the open order ----------------------------- */
/* The «… da arxivga o'tadi» line belongs to the list, so it sits under the
   list's tabs; the list's buttons sit over the open order (Norman: a thing
   beside what it is about). */
#page-orders {
  display: grid;
  grid-template-columns: minmax(340px, 360px) minmax(0, 1fr);
  grid-template-rows: auto auto auto auto auto auto 1fr auto;
  grid-template-areas:
    "err   err"
    "info  info"
    "tabs  bar"
    "zones detail"
    "note  detail"
    "q     detail"
    "list  detail"
    "deliv detail";
  column-gap: var(--sp-6); align-items: start;
}
#orders-error { grid-area: err; }
#orders-info { grid-area: info; }
#order-tabs { grid-area: tabs; margin: 0 0 var(--sp-2); }
#order-tabs .tab { flex: 1 1 auto; white-space: nowrap; }
#order-zones { grid-area: zones; margin: 0 0 var(--sp-2); }
#page-orders > .listbar { display: contents; }
#drain-note { grid-area: note; margin: 0 var(--sp-1) var(--sp-3); font-size: var(--text-xs); }
#page-orders .listbar-end { grid-area: bar; justify-self: end; align-self: start; min-height: 32px; margin-bottom: var(--sp-3); }
#delivered-card { grid-area: deliv; margin-top: var(--sp-3); }

.dt-oq-wrap { grid-area: q; display: block; position: relative; margin: 0 0 var(--sp-2); }
#dt-oq { margin: 0; padding-right: var(--sp-8); background: var(--card); box-shadow: inset 0 0 0 1px var(--hair); }
#dt-oq:focus { box-shadow: 0 0 0 3px var(--accent-ring); }
.dt-kbd {
  position: absolute; right: var(--sp-3); top: 18px; transform: translateY(-50%);
  min-width: 20px; padding: 0 var(--sp-1); border-radius: var(--r-sm); text-align: center;
  font-size: var(--text-xs); font-weight: 600; color: var(--ink-soft);
  box-shadow: inset 0 0 0 1px var(--hair); pointer-events: none;
}
#dt-oq:focus + .dt-kbd, #dt-oq:not(:placeholder-shown) + .dt-kbd { display: none; }
.dt-oq-info { margin: var(--sp-2) var(--sp-1) 0; font-size: var(--text-xs); color: var(--ink-soft); }
.dt-oq-hit { min-height: 0; padding: 0; font-size: var(--text-xs); }
.dt-oq-hit.on { font-weight: 700; }

#orders-list { grid-area: list; display: flex; flex-direction: column; gap: 2px; padding-bottom: var(--sp-6); }
#orders-list > .claim-mine { margin: 0 0 var(--sp-2); }
#view-app:has(#select-bar:not(.hidden)) #orders-list { padding-bottom: 96px; }
.dt-row {
  position: relative; display: flex; align-items: center; gap: var(--sp-3);
  width: 100%; padding: var(--sp-3) var(--sp-3) var(--sp-3) var(--sp-4); border: 0; border-radius: var(--r-lg);
  background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer;
  scroll-margin: calc(var(--hdr) + 60px) 0 var(--sp-6);
  transition: background var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
}
.dt-row:hover { background: var(--row-hover); }
.dt-row.current { background: var(--card); box-shadow: var(--shadow-card); }
.dt-row.current::before {
  content: ""; position: absolute; left: var(--sp-1); top: var(--sp-3); bottom: var(--sp-3); width: 3px;
  border-radius: 2px; background: var(--accent);
}
/* While Smartup answers for the open order, its row shows it too. */
#view-app:has(#order-detail .order.working) .dt-row.current { opacity: .55; }
.dt-row:focus-visible { outline-offset: -2px; }
.dt-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--sp-1); }
.dt-l1 { display: flex; align-items: baseline; gap: var(--sp-2); min-width: 0; }
.dt-num { flex: 0 0 auto; font-weight: 700; font-size: var(--text-base); }
.dt-client { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.dt-l2 { font-size: var(--text-xs); color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dt-l2.warn { color: var(--amber-ink); }
.dt-l2.bad { color: var(--danger); font-weight: 600; }
.dt-side { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: var(--sp-1); }
.dt-sum { font-size: var(--text-sm); font-weight: 600; }
.dt-doc { font-size: var(--text-xs); color: var(--ink-soft); white-space: nowrap; }
.dt-doc.ok { color: var(--ok); }
.dt-doc.warn { color: var(--amber-ink); font-weight: 600; }
.dt-check {
  flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--ink-faint); position: relative;
}
.dt-row.picked { background: var(--ok-bg); }
.dt-row.picked .dt-check { background: var(--accent-fill); box-shadow: none; }
.dt-row.picked .dt-check::after {
  content: ""; position: absolute; left: 6px; top: 3px; width: 4px; height: 8px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.dt-empty { padding: var(--sp-8) var(--sp-3); color: var(--ink-soft); font-size: var(--text-sm); text-align: center; }
/* The first read: the list's shape at once, not a blank page. */
.dt-skel {
  height: 60px; border-radius: var(--r-lg);
  background: linear-gradient(90deg, var(--fill) 30%, var(--row-hover) 50%, var(--fill) 70%);
  background-size: 200% 100%; animation: dt-shimmer 1.3s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .dt-skel, .dt-reading #refresh-btn .ico, .dt-reading #view-app > .topbar::after { animation: none; }
}

/* The open order: its own scroll, held under the header while the list
   scrolls. The card inside splits once there is room for the photo. */
#order-detail {
  grid-area: detail; display: block; position: sticky; top: calc(var(--hdr) + var(--sp-4));
  max-height: calc(100vh - var(--hdr) - var(--sp-8)); overflow-y: auto; overscroll-behavior: contain;
  background: var(--card); border-radius: var(--r-xl); box-shadow: var(--shadow-card);
  container-type: inline-size;
}
.dt-pos {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-6); font-size: var(--text-xs); color: var(--ink-soft);
  box-shadow: 0 1px 0 var(--hair);
}
.dt-hint { white-space: nowrap; }
.dt-card {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-6); align-items: start;
  margin: 0; padding: var(--sp-6); border-radius: 0; box-shadow: none; background: transparent;
}
@container (min-width: 680px) {
  .dt-card { grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: var(--sp-8); }
  .dt-card.no-photos { grid-template-columns: minmax(0, 560px); }
  .dt-info { position: sticky; top: var(--sp-6); }
}
.dt-card .order-client { font-size: var(--text-xl); line-height: 1.25; }
.dt-card .order-num { font-size: var(--text-3xl); }
.dt-card .order-sum { font-size: var(--text-lg); color: var(--ink); }
.dt-card .order-meta { margin-top: var(--sp-2); }
.dt-card .order-actions { flex-wrap: wrap; margin-top: var(--sp-4); }
.dt-card .order-actions .btn { min-height: 36px; }
.dt-card .order-actions .btn.primary { flex: 1 1 100%; min-height: 40px; }
/* ✏️ says what it does: «Tahrirlash», or the agent's «Tahrir so'rash». */
.dt-card .order-actions .btn[aria-label]::after { content: attr(aria-label); }
/* What the phone keeps behind ⋯, set apart under the everyday buttons,
   each its own row; the destructive one last and red. */
.dt-more {
  display: flex; flex-wrap: wrap; gap: var(--sp-2); justify-content: space-between;
  margin-top: var(--sp-4); padding-top: var(--sp-4); box-shadow: 0 -1px 0 var(--hair);
}
.dt-more .btn { flex: 1 1 100%; }
.dt-card .order-photos { margin-top: 0; gap: var(--sp-4); }
.dt-card .receipt-img {
  max-height: calc(100vh - var(--hdr) - 160px);
  background: transparent; content-visibility: visible;
}
.receipt-img[src] { cursor: zoom-in; }
.order.selectable .receipt-img { cursor: pointer; }
.dt-detail-empty {
  min-height: 320px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--sp-3); padding: var(--sp-12) var(--sp-6); color: var(--ink-soft); text-align: center;
}
.dt-detail-empty span {
  width: 48px; height: 48px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--ok-bg); color: var(--ok); font-size: var(--text-2xl); font-weight: 700;
}
.dt-detail-empty p { max-width: 320px; font-size: var(--text-base); }

/* The bulk bar: under the list, in the middle of the page, not the window. */
.selectbar {
  left: calc(var(--sb) + var(--sp-6)); right: var(--sp-6); bottom: var(--sp-6);
  max-width: 560px; margin: 0 auto;
}

/* ---- the notice after an action (desktop.js) ------------------------------ */
.dt-toast {
  position: fixed; z-index: 90; bottom: var(--sp-6);
  left: calc(var(--sb) + var(--sp-6)); right: var(--sp-6); width: max-content; max-width: 560px; margin: 0 auto;
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-4); border-radius: var(--r-lg);
  background: var(--toast); color: #fff; font-size: var(--text-sm); box-shadow: var(--shadow-dialog);
  animation: dt-rise var(--t-slow) var(--ease-sheet);
}
#view-app:has(#select-bar:not(.hidden)) ~ .dt-toast { bottom: 96px; }
.dt-toast-btn, .dt-toast-x {
  border: 0; border-radius: var(--r-md); background: transparent; color: #fff;
  font: 600 var(--text-sm) var(--font); cursor: pointer; min-height: 32px; padding: 0 var(--sp-3);
}
.dt-toast-btn { color: #30D158; }
.dt-toast-btn:hover, .dt-toast-x:hover { background: rgba(255, 255, 255, .12); }
.dt-toast-btn:disabled { opacity: .6; cursor: default; }
.dt-toast-x { padding: 0 var(--sp-2); opacity: .7; }

/* ---- the app's own dialog (in place of the browser's pop-ups) ------------ */
.dt-dialog-back {
  position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center;
  padding: var(--sp-6); background: var(--scrim); animation: dt-fade var(--t-fast) var(--ease);
}
.dt-dialog {
  width: min(440px, 100%); max-height: 86vh; overflow-y: auto;
  padding: var(--sp-6); border-radius: var(--r-xl);
  background: var(--sheet); color: var(--ink); box-shadow: var(--shadow-dialog);
  animation: dt-rise var(--t-slow) var(--ease-sheet);
}
.dt-dialog:has(.dt-key-line) { width: min(520px, 100%); }
.dt-dialog-title { font-size: var(--text-lg); font-weight: 600; margin-bottom: var(--sp-2); }
.dt-dialog-text { font-size: var(--text-base); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
/* Never a scroll inside: a bulk list is cut to ten rows and «…va yana N»
   by desktop.js, so the total under it is always in sight. */
.dt-dialog-lines {
  margin-top: var(--sp-4);
  border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--hair);
}
.dt-dialog-line {
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-4);
  padding: var(--sp-2) var(--sp-3); font-size: var(--text-sm); box-shadow: 0 1px 0 var(--hair);
}
.dt-dialog-line span { min-width: 0; overflow-wrap: anywhere; }
.dt-dialog-line b { font-weight: 500; white-space: nowrap; }
.dt-dialog-line:not(.dt-key-line):last-child { font-weight: 700; box-shadow: none; }
.dt-dialog-line:not(.dt-key-line):last-child b { font-weight: 700; }
.dt-key-line { justify-content: flex-start; }
.dt-key-line > span:first-child { flex: 0 0 120px; }
.dt-key-line:last-child { box-shadow: none; }
.dt-dialog-btns { display: flex; justify-content: flex-end; gap: var(--sp-2); margin-top: var(--sp-6); }
.dt-dialog-btns .btn { width: auto; min-width: 96px; margin: 0; }

/* ---- Mijozlar ----------------------------------------------------------- */
#page-clients {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--sp-4);
  grid-template-areas: "banner banner" "bar zones" "meta meta" "list list";
  align-items: center;
}
#cl-banner { grid-area: banner; }
#page-clients > .cl-bar { grid-area: bar; }
#cl-zones { grid-area: zones; margin: 0; }
#cl-meta { grid-area: meta; margin: var(--sp-4) var(--sp-1) var(--sp-2); }
#cl-list { grid-area: list; padding: var(--sp-1) var(--sp-6); }
#cl-search { max-width: 520px; background: var(--card); box-shadow: inset 0 0 0 1px var(--hair); }
.cl-zones button { padding-inline: var(--sp-4); }
/* A row reads across: name and code | the registered name | last order. */
.cl-row .hz-main {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: var(--sp-6); align-items: baseline;
}
.cl-row .hz-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-last { min-width: 80px; text-align: right; }

/* ---- Sozlamalar: the menu beside the open screen ---------------------------- */
#page-settings {
  display: grid; grid-template-columns: 248px minmax(0, 720px);
  column-gap: var(--sp-8); align-items: start;
}
#page-settings > #set-menu, #page-settings > #set-menu.hidden {
  display: block !important; grid-column: 1; grid-row: 1;
  position: sticky; top: calc(var(--hdr) + var(--sp-6)); padding: var(--sp-2);
}
#page-settings > .set-sec { grid-column: 2; grid-row: 1; }
#set-menu .hz-row {
  gap: var(--sp-3); padding: var(--sp-2); margin: 0; width: 100%;
  border: 0; border-radius: var(--r-md);
}
#set-menu .hz-row:hover, #set-menu .hz-row:active { margin: 0; padding: var(--sp-2); width: 100%; }
#set-menu .hz-row:hover { background: var(--row-hover); }
#set-menu .hz-row.active { background: var(--accent-soft); }
#set-menu .hz-row.active .hz-title { color: var(--accent); font-weight: 600; }
#set-menu .hz-chev { display: none; }
#set-menu .hz-sub { display: none; }
.set-icon { width: 28px; height: 28px; font-size: var(--text-lg); color: var(--ink-soft); }
#set-menu .hz-row.active .set-icon { color: var(--accent); }
.set-sec .btn.primary { width: auto; min-width: 140px; }
.set-sec .btnrow .btn { flex: 0 0 auto; }

/* ---- HoReCa, Farqlar: a comfortable reading width ----------------------- */
#page-horeca > *, #page-onecdiff > *, #page-onecprod > * { max-width: 880px; }
#hz-tabs { max-width: 480px; }
#od-tabs { max-width: 560px; }

/* ---- 1C (the accountant's page) ------------------------------------------- */
#oc-main {
  display: grid; grid-template-columns: auto minmax(220px, 300px) minmax(0, 1fr);
  grid-template-areas:
    "bar   mode  filter"
    "err   err   err"
    "meta  meta  meta"
    "tiles tiles tiles"
    "stat  stat  stat"
    "list  list  list"
    "foot  foot  foot";
  column-gap: var(--sp-4); align-items: center;
}
#oc-main > .oc-bar { grid-area: bar; margin: 0; }
/* The owner's Farqlar is a sidebar tab here, so the 1C page's button goes. */
.navbtn.ph-hide { display: flex; }
.bottomnav.crowded .navbtn { flex: 0 0 auto; }
.oc-bar .oc-difflink { display: none; }
#oc-main > .oc-bar input { width: 170px; flex: 0 0 auto; }
#oc-main > .oc-mode { grid-area: mode; margin: 0; }
#oc-main > .oc-filter { grid-area: filter; margin: 0; justify-self: end; width: 100%; max-width: 520px; }
.oc-filter input, .oc-filter select {
  min-height: 36px; padding: var(--sp-2) var(--sp-3); font-size: var(--text-base); border: 0; border-radius: var(--r-md);
  background: var(--card); box-shadow: inset 0 0 0 1px var(--hair);
}
#oc-error { grid-area: err; margin-top: var(--sp-3); }
#oc-meta { grid-area: meta; margin: var(--sp-4) var(--sp-1) var(--sp-3); }
#oc-tabs { grid-area: tiles; }
#oc-status { grid-area: stat; }
#oc-list { grid-area: list; }
#oc-main > .oc-foot { grid-area: foot; }
.oc-tile {
  flex-direction: row; justify-content: flex-start; align-items: baseline; gap: var(--sp-3);
  min-height: 64px; padding: var(--sp-3) var(--sp-4); box-shadow: var(--shadow-card);
}
.oc-tile b { font-size: var(--text-3xl); }
.oc-tile span { font-size: var(--text-sm); }
.oc-tile:hover:not(.active):not(:disabled) { box-shadow: var(--shadow-card), inset 0 0 0 999px var(--hover-tint); }
/* The orders as cards in columns: a day's 40–60 orders in two or three
   screens instead of ten. */
#oc-list > .oc-group { padding: 0; background: none; box-shadow: none; }
#oc-list .oc-hint { margin: 0 var(--sp-1) var(--sp-3); }
.oc-rows {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: var(--sp-3); align-items: start;
}
.oc-rows > .oc-row, .od-item {
  padding: var(--sp-4); border-bottom: 0; border-radius: var(--r-lg);
  background: var(--card); box-shadow: var(--shadow-card);
}
.oc-row.pickable:hover { box-shadow: var(--shadow-card), 0 0 0 1.5px var(--accent-ring); }
.oc-row.on { box-shadow: 0 0 0 2px var(--accent); }
.od-item { margin-bottom: var(--sp-3); }
#page-onec.has-bar { padding-bottom: 120px; }

/* ---- panels from the right (the phone's full-screen pages) ---------------- */
/* The page stays in view, dimmed, on the left; a click there is the panel's
   own ← (desktop.js). */
.fullpage {
  --panel: 760px;
  padding-left: max(var(--sb), calc(100vw - var(--panel)));
  background: var(--scrim);
}
.fullpage::before {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0;
  width: min(var(--panel), calc(100vw - var(--sb)));
  background: var(--paper); box-shadow: var(--shadow-panel); z-index: -1;
}
#confirm-page { --panel: 640px; }
#no-page { --panel: 900px; }
#cl-detail { --panel: 720px; }
#ib-chat { --panel: 680px; }
.fullpage .topbar {
  min-height: 60px; padding: 0 var(--sp-6) 0 var(--sp-3); background: var(--paper);
  box-shadow: 0 1px 0 var(--hair); -webkit-backdrop-filter: none; backdrop-filter: none;
}
.fullpage .topbar > span:not(.topbar-mark) { text-align: left; font-size: var(--text-xl); font-weight: 700; }
.fullpage .topbar::after { display: none; }
.fullpage .tabs { margin: var(--sp-3) var(--sp-6) 0; }
.fullpage .confirm-body, #cl-detail .confirm-body, #no-page .confirm-body, #hz-detail .confirm-body {
  padding: var(--sp-6) var(--sp-6) var(--sp-8);
}
.confirm-foot, .coll-actions { padding: var(--sp-3) var(--sp-6); }
@media (prefers-reduced-motion: no-preference) {
  .fullpage { animation: dt-fade var(--t-fast) var(--ease); }
  .fullpage::before { animation: dt-slide var(--t-slow) var(--ease-sheet); }
}

/* ---- dialogs in the middle (the phone's bottom sheets) -------------------- */
/* A form over the page: the scrim around it takes clicks so nothing behind
   can be pressed, and does nothing else — typed money is never thrown away
   by a stray click (Esc and × close it, as the form's own button does). */
.coll-back {
  --dlg: 520px;
  justify-content: center; background: var(--scrim);
  padding: 6vh max(var(--sp-6), calc((100vw - var(--dlg)) / 2));
}
.coll-back:has(.ed-rows) { --dlg: 720px; }
.coll-back.oc-ed { --dlg: 1180px; }
.coll-back.oc-ed:has(.oc-ed-pics:empty) { --dlg: 760px; }
.coll-back > * { flex-shrink: 0; }
.coll-back > .coll-body { flex: 0 1 auto; min-height: 0; background: var(--paper); }
.coll-back > :first-child { border-radius: var(--r-xl) var(--r-xl) 0 0; }
.coll-back > :last-child { border-radius: 0 0 var(--r-xl) var(--r-xl); }
.coll-head { min-height: 56px; padding: 0 var(--sp-3) 0 var(--sp-4); }
.coll-title { order: 1; flex: 1; }
.coll-close { order: 2; }
.coll-close:hover { background: var(--hover-tint); }
.coll-pad button { min-height: 48px; font-size: var(--text-2xl); cursor: pointer; }
.coll-pad button:hover { background: var(--pressed); }
.coll-hit { cursor: pointer; }
.coll-hit:hover { background: var(--row-hover); }
@media (prefers-reduced-motion: no-preference) {
  .coll-back { animation: dt-fade var(--t-fast) var(--ease); }
  .coll-back > * { animation: dt-rise var(--t-slow) var(--ease-sheet); }
}

/* The ✏️ sheets (the 1C page's and Said's own): the paper on the left, the
   lines on the right — read one against the other without scrolling
   between them. */
.oc-ed .coll-body {
  display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  grid-template-rows: auto auto auto auto 1fr; column-gap: var(--sp-8); align-content: start;
}
.oc-ed .coll-body > * { grid-column: 2; }
.oc-ed .coll-body > .oc-ed-pics { grid-column: 1; grid-row: 1 / -1; margin: 0; align-self: start; gap: var(--sp-4); }
.oc-ed .coll-body:has(> .oc-ed-pics:empty) { grid-template-columns: minmax(0, 1fr); }
.oc-ed .coll-body:has(> .oc-ed-pics:empty) > * { grid-column: 1; }

/* The paper's frame (app.js paperZoom): the photo's own shape, as tall as
   the sheet's body with the slider under it — the body fills the dialog and
   is the size container, so a footer that grows (Hozir / Yangi / Farq)
   shrinks the photo instead of pushing the slider out of sight. Zoomed, the
   photo moves inside its frame and nothing spills over the lines. */
.coll-back.oc-ed:has(.ed-zoom) > .coll-body { flex: 1 1 0; container-type: size; }
/* The paper stays put while a long order's lines scroll past it (Said,
   28.10.2026); a second photo scrolls inside the photo column itself. */
.oc-ed:has(.ed-zoom) .coll-body > .oc-ed-pics { position: sticky; top: 0; }
.oc-ed .coll-body > .oc-ed-pics:has(.ed-zoom ~ .ed-zoom) {
  max-height: 100cqh; overflow: hidden auto; overscroll-behavior: contain;
}
.oc-ed-pics > .ed-zoom, .oc-ed-pics > .ed-zoom-bar { flex-shrink: 0; }
.ed-zoom {
  position: relative; overflow: hidden; margin: 0 auto;
  width: min(100%, calc((100cqh - 56px) * var(--ar)));
  aspect-ratio: var(--ar); border-radius: var(--r-md);
}
.ed-zoom .receipt-img {
  width: 100%; height: 100%; max-height: none; border-radius: 0;
  background: transparent; transform-origin: 0 0; cursor: default;
  user-select: none; -webkit-user-select: none;
}
.ed-zoom.zoomed { touch-action: none; }
.ed-zoom.zoomed .receipt-img { cursor: grab; will-change: transform; }
.ed-zoom.zoomed.dragging .receipt-img { cursor: grabbing; }
.ed-zoom-bar {
  display: flex; align-items: center; gap: var(--sp-2);
  width: min(100%, 360px); height: 32px; margin: 0 auto;
}
.ed-zoom-range { flex: 1; min-width: 0; margin: 0; accent-color: var(--accent); cursor: pointer; }
.ed-zoom-btn, .ed-zoom-val {
  min-width: 32px; height: 32px; padding: 0 var(--sp-2); border: 0; border-radius: var(--r-sm);
  background: var(--fill); color: var(--ink); font: inherit; cursor: pointer;
}
.ed-zoom-btn { font-size: var(--text-lg); line-height: 1; }
.ed-zoom-val { min-width: 56px; font-size: var(--text-sm); color: var(--ink-soft); }
.ed-zoom-btn:hover, .ed-zoom-val:hover { background: var(--hover-tint); }

/* A line: ⠿ | name | Miqdor | Narx | Summa | ×. The sum sits in its own
   column beside the price (Said, 28.10.2026); the phone keeps it under the
   name. The dots drag the line (app.js edRowDrag) — on screen only. */
.ed-grid {
  grid-template-columns: 16px minmax(0, 1fr) 76px 132px 132px 36px;
  column-gap: var(--sp-3); row-gap: 0;
}
.ed-labels .ed-sum-label { display: block; text-align: right; }
.ed-labels .ed-grip-label { display: block; }
.ed-row .ed-grip {
  display: flex; align-items: center; justify-content: center;
  grid-column: 1; grid-row: 1 / span 2; align-self: stretch; min-height: 36px;
  cursor: grab; touch-action: none; border-radius: var(--r-sm);
}
/* Six dots, drawn — two across, three down. */
.ed-row .ed-grip::before {
  content: ""; width: 10px; height: 16px;
  background: radial-gradient(circle, var(--ink-soft) 1.4px, transparent 1.9px) 0 0 / 5px 33.34%;
}
.ed-row .ed-grip:hover { background-color: var(--hover-tint); }
.ed-row .ed-name { display: contents; }
.ed-row .ed-short { grid-column: 2; grid-row: 1; }
.ed-row .oc-ed-src { grid-column: 2; grid-row: 2; }
.ed-row .ed-qty { grid-column: 3; grid-row: 1 / span 2; }
.ed-row .ed-price { grid-column: 4; grid-row: 1 / span 2; }
.ed-row .ed-amount {
  grid-column: 5; grid-row: 1 / span 2; margin: 0; text-align: right;
  font-size: var(--text-base); font-weight: 600; color: var(--ink); white-space: nowrap;
}
.ed-row .ed-x { grid-column: 6; grid-row: 1 / span 2; }
/* The line in hand: above its neighbours, lifted off the sheet. */
.ed-row.ed-dragging {
  position: relative; z-index: 2; background: var(--paper);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .28); border-radius: var(--r-md);
}
.ed-row.ed-dragging .ed-grip { cursor: grabbing; }

.sheet-overlay { align-items: center; padding: var(--sp-6); }
.sheet {
  max-width: 540px; max-height: min(760px, 86vh);
  border-radius: var(--r-xl); padding: var(--sp-6); box-shadow: var(--shadow-dialog);
}
.sheet::before, .rowmenu::before, .cashp-sheet::before, .drawer-panel::before { display: none; }
.sheet-item { cursor: pointer; border-radius: var(--r-sm); }
.sheet-item:hover { background: var(--row-hover); }

.rowmenu-back { align-items: center; }
.rowmenu {
  max-width: 380px; padding: var(--sp-1); border-radius: var(--r-lg); box-shadow: var(--shadow-dialog);
}
.rowmenu-head { text-align: left; padding: var(--sp-2) var(--sp-3); font-size: var(--text-xs); }
.rowmenu-item {
  min-height: 36px; padding: var(--sp-2) var(--sp-3); border-bottom: 0; border-radius: var(--r-md);
  text-align: left; font-size: var(--text-base); color: var(--ink);
}
.rowmenu-item:hover { background: var(--row-hover); }
.rowmenu-item.danger { color: var(--danger); }
.rowmenu-item.muted { color: var(--ink-soft); font-weight: 400; }
/* …opened where the click was (desktop.js places it). */
.rowmenu-back.dt-pop { display: block; background: transparent; animation: none; }
.rowmenu-back.dt-pop .rowmenu { position: fixed; width: 300px; animation: dt-rise .14s var(--ease); }

.cashp-back { justify-content: center; align-items: center; }
.cashp-sheet { width: 440px; border-radius: var(--r-xl); padding: var(--sp-6); box-shadow: var(--shadow-dialog); }

/* The archive: a panel from the right, as it was first drawn. */
.drawer-panel {
  top: 0; right: 0; bottom: 0; left: auto; width: 560px; max-width: none; margin: 0;
  border-radius: 0; box-shadow: var(--shadow-panel);
}
.drawer-head { padding: var(--sp-4) var(--sp-4) var(--sp-3) var(--sp-6); }
.drawer-body { padding: 0 var(--sp-6) var(--sp-8); }
.arch-tools { padding: 0 var(--sp-6) var(--sp-3); }
@media (prefers-reduced-motion: no-preference) {
  .drawer-panel { animation: dt-slide var(--t-slow) var(--ease-sheet); }
}

/* ---- the photo viewer (desktop.js) ---------------------------------------- */
.dt-viewer {
  position: fixed; inset: 0; z-index: 100; overflow: hidden;
  background: rgba(12, 12, 14, .93); cursor: zoom-out;
  animation: dt-fade var(--t-fast) var(--ease);
}
.dt-v-img {
  position: absolute; left: 0; top: 0; transform-origin: 0 0;
  object-fit: contain; border-radius: var(--r-sm); background: rgba(255, 255, 255, .04);
  cursor: zoom-in; user-select: none; -webkit-user-drag: none; will-change: transform;
}
.dt-viewer.zoomed .dt-v-img { cursor: grab; }
.dt-viewer.zoomed .dt-v-img:active { cursor: grabbing; }
.dt-v-bar {
  position: absolute; top: 0; left: 0; right: 0; height: 56px; z-index: 1;
  display: flex; align-items: center; gap: var(--sp-2); padding: 0 var(--sp-4); color: #fff; cursor: default;
  background: linear-gradient(rgba(0, 0, 0, .45), transparent);
}
.dt-v-hint { flex: 1; font-size: var(--text-xs); opacity: .6; }
.dt-v-zoom { min-width: 48px; text-align: right; font-size: var(--text-sm); opacity: .8; margin-right: var(--sp-2); }
.dt-v-btn {
  min-width: 36px; height: 32px; padding: 0 var(--sp-3); border: 0; border-radius: var(--r-md);
  background: rgba(255, 255, 255, .12); color: #fff; font: 500 var(--text-base) var(--font); cursor: pointer;
}
.dt-v-btn:hover { background: rgba(255, 255, 255, .22); }

/* ---- login ---------------------------------------------------------------- */
.login-wrap { max-width: 400px; }
.login-wrap .card { padding: var(--sp-8); box-shadow: var(--shadow-dialog); }
.login-wrap .btn.primary { min-height: 40px; }

/* ---- Suhbatlar ---------------------------------------------------------- */
#page-inbox .ib-bar { flex-direction: row; align-items: center; }
#page-inbox .ib-bar input[type="search"] { flex: 1 1 auto; max-width: 420px; }
#page-inbox .ib-filter { flex: 0 0 auto; }
#page-inbox .ib-filter button { padding-inline: var(--sp-4); }
#page-inbox .ib-row:hover { background: var(--fill); }
#ib-chat .ib-thread { padding: var(--sp-3) var(--sp-6); }
#ib-chat .ib-sub, #ib-chat .ib-warn, #ib-chat .ib-send-error { margin-inline: var(--sp-6); }
#ib-chat .ib-sub { text-align: left; padding-inline: 0; }
#ib-chat .ib-compose { padding: var(--sp-3) var(--sp-6); }

/* ---- a finger instead of a mouse (an iPad on its side) ------------------- */
/* The same layout; only what a fingertip needs differs. Controls at least
   44px (Apple's own minimum for a tap); text in a box at 16px, because iOS
   zooms the whole page into any box whose text is smaller and stays zoomed;
   no keyboard hints where there is usually no keyboard; and the sidebar's
   bottom clear of the iPad's home bar. A computer's mouse never matches. */
@media (pointer: coarse) {
  .navbtn, .btn, .btn.sm, .btn.primary.wide, form > .btn.primary, .cashp-sheet .btn,
  .coll-actions .btn, .confirm-foot .btn, .no-foot .btn, .linkbtn,
  .tab, .seg button, .sb-user, .dt-v-btn, .rowmenu-item, .dt-toast-btn, .dt-toast-x,
  .dt-card .order-actions .btn, .dt-card .order-actions .btn.primary,
  #page-orders .listbar-end { min-height: 44px; }
  .iconbtn { min-width: 44px; min-height: 44px; }
  .dt-row { min-height: 56px; }
  input:not([type="checkbox"]):not([type="radio"]), select, textarea, #sn-form select,
  .oc-filter select, .ed-in, .hz-pick, .hz-select, .coll-name, .staff-pick, .sheet-search {
    min-height: 44px; font-size: 16px;
  }
  .dt-kbd, .dt-hint, .sb-keys { display: none; }
  .bottomnav { padding-bottom: calc(var(--sp-4) + env(safe-area-inset-bottom)); }
}

