/* Barakali POS — © 2026 Barakali Kanstovar. Barcha huquqlar himoyalangan. */
/* POS Kassa — dizayn tizimi
   Tartib: tepada sarlavha (do'kon nomi + amallar) va tugmali menyu, ostida 1200px ish maydoni.
   Brend: logotip ko'ki #0744B6 va oq #F6F6F6. Shriftlar: Montserrat — nom, sarlavha, katta summalar;
   Onest — matn va jadvallar (raqamlar tekis). Ikkalasida o'zbek lotin/kirill to'liq.
   Shkala: bo'shliq 4/8/12/16/24/32 · radius 8 (boshqaruv) / 12 (karta) / 999 (belgi) */

@font-face {
  font-family: "Montserrat";
  src: url("/fonts/Montserrat.ttf") format("truetype");
  font-weight: 600 800;
  font-display: swap;
}
@font-face {
  font-family: "Onest";
  src: url("/fonts/Onest.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* tungi rejim — chuqur ko'k fon, logotip ko'kidan yorqinroq urg'u */
  --brand: #0744b6; --brand-ink: #f6f6f6; --brand-hi: #1a5fd6; --brand-lo: #05358f;
  --bg-1: #0d1526;
  --bg-2: #111b30;
  --head: #0b1322;
  --head-line: #1d2a44;
  --rail-bg: #0744b6; --rail-ink: rgba(246, 246, 246, .78); --rail-hover: rgba(255, 255, 255, .12); --rail-on: #f6f6f6; --rail-on-ink: #0744b6;
  --panel: #16223a;
  --panel-2: #1d2b47;
  --input: #111c31;
  --line: #2b3b5c;
  --ink: #eef2f9;
  --ink-2: #c8d2e4;
  --muted: #8d9bb5;
  --green: #3d82f5;          /* asosiy urg'u (nomi tarixiy) — tugmalar, faol holat */
  --green-2: #2a6fe0;
  --green-soft: rgba(61, 130, 245, .18);
  --success: #3fb950;
  --blue: #5aa7ff;
  --cyan: #1fb6cf;
  --orange: #f29e0c;
  --red: #ec5b52;
  --paper: #fdfbf6;
  --paper-ink: #2a2f3a;
  --hair: rgba(255, 255, 255, .07);
  --hover: rgba(255, 255, 255, .05);
  --nav-bg: transparent;
  --ok-bg: rgba(63, 185, 80, .16);   --ok-ink: #7ddc8a;
  --warn-bg: rgba(242, 158, 12, .16); --warn-ink: #ffc35c;
  --bad-bg: rgba(236, 91, 82, .18);  --bad-ink: #ff9089;
  --info-bg: rgba(61, 130, 245, .16); --info-ink: #8db8ff;
  --price-ink: #8db8ff;
  --card-1: #182540; --card-2: #142037;
  --overlay: rgba(4, 8, 18, .7);
  --shadow: rgba(0, 0, 0, .32);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .25);
  --scan-line: #c9a35a;
  --focus: 0 0 0 3px rgba(61, 130, 245, .38);
  --accent-shadow: rgba(7, 68, 182, .55);

  --r: 8px;
  --r-lg: 12px;
  --font: "Onest", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --display: "Montserrat", "Onest", "Segoe UI", system-ui, sans-serif;
  --mono: "Consolas", "Courier New", monospace;
  font-size: 15px;
  color-scheme: dark;
}

/* ---------- kunduzgi rejim ---------- */
:root[data-theme="light"] {
  --bg-1: #f6f6f6; --bg-2: #eef1f6;
  --head: #ffffff; --head-line: #e1e6ef;
  --rail-bg: #0744b6; --rail-ink: rgba(246, 246, 246, .8); --rail-hover: rgba(255, 255, 255, .14); --rail-on: #f6f6f6; --rail-on-ink: #0744b6;
  --panel: #ffffff; --panel-2: #f2f5fa; --input: #ffffff; --line: #d5dce8;
  --ink: #111a2e; --ink-2: #2e3b55; --muted: #5d6a82;
  --green: #0744b6; --green-2: #05358f; --green-soft: #e3ebfa;
  --success: #23833a;
  --blue: #1e78d8; --cyan: #0e93aa; --orange: #df8200; --red: #d4413a;
  --hair: rgba(7, 30, 80, .08); --hover: rgba(7, 30, 80, .045); --nav-bg: #ffffff;
  --ok-bg: #e4f4e7; --ok-ink: #1f7431;
  --warn-bg: #fdf1dc; --warn-ink: #925600;
  --bad-bg: #fde8e6; --bad-ink: #ad261f;
  --info-bg: #e3ebfa; --info-ink: #0744b6;
  --price-ink: #0744b6;
  --card-1: #ffffff; --card-2: #fafbfd;
  --overlay: rgba(10, 22, 50, .42);
  --shadow: rgba(7, 30, 80, .1);
  --shadow-sm: 0 1px 2px rgba(7, 30, 80, .07);
  --scan-line: #c99a3e;
  --focus: 0 0 0 3px rgba(7, 68, 182, .22);
  --accent-shadow: rgba(7, 68, 182, .45);
  color-scheme: light;
}

/* ---------- asos ---------- */
* { box-sizing: border-box; }
html { background: var(--bg-2); }
html, body { margin: 0; }
body {
  min-height: 100vh; font-family: var(--font); color: var(--ink); line-height: 1.45;
  background: linear-gradient(180deg, var(--bg-1) 0, var(--bg-2) 720px);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--green-soft); }
:focus-visible { outline: none; box-shadow: var(--focus); }
.num, table.t td, .stat .v, .bigcard .v, .totalbar .v { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.right { text-align: right; }
.hidden { display: none !important; }
svg.i { width: 1.07em; height: 1.07em; flex-shrink: 0; vertical-align: -3px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }

/* ---------- sarlavha ---------- */
.top {
  background: var(--head); border-bottom: 1px solid var(--head-line);
  padding: 12px 16px; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  box-shadow: 0 6px 20px -8px var(--shadow);
}
.top-in { max-width: var(--page-max); margin: 0 auto; }
.brand-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.brand {
  display: inline-flex; align-items: center; gap: 10px; margin-right: 6px;
  font-family: var(--display); font-weight: 800; font-size: 1.28rem; color: var(--green); text-transform: uppercase; letter-spacing: .01em; text-decoration: none; line-height: 1;
}
.brand::before {
  content: ""; width: 10px; height: 26px; border-radius: 3px; flex-shrink: 0;
  background: var(--green); display: none;
}
.sq {
  width: 36px; height: 36px; border-radius: var(--r); border: 1px solid var(--line);
  background: transparent; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.sq:hover { background: var(--hover); color: var(--ink); }
.sq.g { background: var(--green); border-color: var(--green); color: #fff; }
.sq.g:hover { background: var(--green-2); }
.who { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.who b { font-weight: 600; color: var(--ink-2); }
.pill { font-size: .68rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--green-soft); color: var(--green); text-transform: uppercase; letter-spacing: .06em; }
.pill.k { background: var(--info-bg); color: var(--info-ink); }
/* chap menyu: faqat ikonkalar, nomi kursor ustiga borganda chiqadi */
/* yon menyu: shrift bilan birga kattalashadi, lekin balandlikka sig'adi */
:root { --nav-i: min(3.07rem, calc((100dvh - 90px) / 18 - 6px)); --rail: max(56px, calc(var(--nav-i) + 1.5rem)); }
nav.side {
  position: fixed; left: 0; top: 0; bottom: 0; width: var(--rail); z-index: 60;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 0 14px;
  background: var(--rail-bg); border-right: 0;
  overflow-y: auto; overflow-x: hidden; scrollbar-width: none;
}
nav.side::-webkit-scrollbar { display: none; }
nav.side a {
  flex: 0 0 auto; width: var(--nav-i); height: var(--nav-i); min-width: 36px; min-height: 36px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--rail-ink); text-decoration: none; position: relative; border: 1px solid transparent;
}
nav.side a svg.i { width: 48%; height: 48%; stroke-width: 1.8; }
nav.side a:hover { background: var(--rail-hover); color: #fff; }
nav.side a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
nav.side a.active { background: var(--rail-on); color: var(--rail-on-ink); box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .35); }
nav.side a[data-v="sotish"]:not(.active) { color: #fff; border-color: rgba(255, 255, 255, .45); }
nav.side .logo { flex: 0 0 auto; width: var(--nav-i); height: var(--nav-i); min-width: 36px; min-height: 36px; border-radius: 12px; overflow: hidden; margin-bottom: 8px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); }
nav.side .logo img { width: 100%; height: 100%; display: block; }
nav.side a[data-v="sotish"] { margin: 4px 0; }
.navtip {
  position: fixed; z-index: 200; transform: translate(-4px, -50%); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--bg-1); font-weight: 600; font-size: .85rem; white-space: nowrap;
  padding: 7px 11px; border-radius: 8px; box-shadow: 0 8px 22px -8px var(--shadow); transition: opacity .12s, transform .12s;
}
.navtip::before { content: ""; position: absolute; left: -5px; top: 50%; margin-top: -5px; border: 5px solid transparent; border-left: 0; border-right-color: var(--ink); }
.navtip.on { opacity: 1; transform: translate(0, -50%); }
body:has(nav.side) { padding-left: var(--rail); }
.sec-name { color: var(--muted); font-weight: 600; font-size: .95rem; padding-left: 12px; border-left: 1px solid var(--line); }
.tog svg { transition: transform .2s; }

/* kompyuter ekraniga moslashish: oddiy sahifalar keng (o'qishga qulay chegarada), sotuv/ombor — butun ekran */
:root { --page-max: 1200px; --page-pad: 16px; }
main { max-width: var(--page-max); margin: 0 auto; padding: 24px var(--page-pad) 64px; }
main.wide { max-width: calc(var(--page-max) + 80px); }
@media (min-width: 1280px) {
  :root { font-size: clamp(15px, calc(7px + 0.6vw), 20px); --page-max: 108rem; --page-pad: clamp(16px, 2vw, 40px); }
  main.wide { max-width: none; }
  .top-in { max-width: none; }
}
.page-head { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.015em; margin: 0; margin-right: auto; line-height: 1.15; text-wrap: balance; }

/* ---------- kartalar ---------- */
.card {
  background: var(--panel); border: 1px solid var(--hair); border-radius: var(--r-lg);
  padding: 16px 18px; box-shadow: var(--shadow-sm);
}
.card h3 { margin: 0 0 12px; font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card h3 svg { color: var(--green); }

/* ---------- tugmalar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--panel-2); color: var(--ink); cursor: pointer; white-space: nowrap;
  font-weight: 600; font-size: .92rem; line-height: 1.2; text-align: center; text-decoration: none;
}
.btn:hover { background: var(--hover); border-color: var(--muted); }
.btn:active { transform: translateY(1px); }
.btn.green, .btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn.green:hover, .btn.primary:hover { background: var(--green-2); border-color: var(--green-2); }
.btn.blue, .btn.cyan { background: var(--green-soft); border-color: transparent; color: var(--green); }
:root:not([data-theme="light"]) .btn.blue, :root:not([data-theme="light"]) .btn.cyan { color: #b9d2ff; }
.btn.blue:hover, .btn.cyan:hover { border-color: var(--green); }
.btn.orange { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn.red, .btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.orange:hover, .btn.red:hover { filter: brightness(1.08); }
.btn.light { background: var(--warn-bg); border-color: transparent; color: var(--warn-ink); }
.btn.ghost { background: transparent; }
.btn.sm { min-height: 30px; padding: 0 10px; font-size: .84rem; border-radius: 7px; }
.btn.lg { min-height: 48px; padding: 0 20px; font-size: 1.05rem; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; transform: none; }
.btn.wrap { white-space: normal; }

/* ---------- maydonlar ---------- */
input, select, textarea {
  min-height: 40px; border: 1px solid var(--line); border-radius: var(--r);
  padding: 8px 12px; background: var(--input); color: var(--ink); outline: none; width: 100%;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .75; }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: var(--focus); }
input[type=checkbox] { width: 16px; height: 16px; min-height: 0; accent-color: var(--green); }
input[type=range] { min-height: 0; padding: 0; accent-color: var(--green); }
input:disabled { opacity: .6; }
textarea { font-family: var(--mono); font-size: .88rem; resize: vertical; min-height: 60px; }
label.f, div.f { display: block; margin-bottom: 12px; }
label.f > span, div.f > span { display: block; font-size: .8rem; color: var(--muted); margin-bottom: 5px; font-weight: 600; }
.lbl-b { font-weight: 700; font-size: .9rem; margin-bottom: 8px; display: flex; align-items: center; gap: 7px; }
.lbl-b svg { color: var(--green); }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; min-width: 0; }
.chk { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; font-weight: 600; font-size: .9rem; }

/* ---------- belgilar ---------- */
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .74rem; font-weight: 700; background: var(--panel-2); color: var(--ink-2); white-space: nowrap; line-height: 1.5; }
.tag.ok { background: var(--ok-bg); color: var(--ok-ink); }
.tag.warn { background: var(--warn-bg); color: var(--warn-ink); }
.tag.bad { background: var(--bad-bg); color: var(--bad-ink); }
.tag.info { background: var(--info-bg); color: var(--info-ink); }
.warnbar {
  background: var(--warn-bg); color: var(--warn-ink); border: 1px solid rgba(242, 158, 12, .3);
  border-radius: var(--r); padding: 10px 14px; display: flex; gap: 8px; align-items: center; margin-bottom: 16px; font-size: .92rem;
}
.warnbar a { margin-left: auto; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- jadvallar ---------- */
table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-weight: 700; font-size: .72rem; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
table.t td { padding: 10px 12px; border-bottom: 1px solid var(--hair); vertical-align: middle; }
table.t tr:last-child td { border-bottom: none; }
table.t td.num, table.t td.right { white-space: nowrap; }
table.t th.right { text-align: right; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td, table.t tbody tr:hover td { background: var(--hover); }
.table-wrap { overflow-x: auto; }
.empty { padding: 40px 16px; text-align: center; color: var(--muted); }

/* ---------- ko'rsatkichlar ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--panel); border-radius: var(--r-lg); padding: 14px 16px; border: 1px solid var(--hair); box-shadow: var(--shadow-sm); }
.stat .l { font-size: .72rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.stat .v { font-size: 1.45rem; font-weight: 800; margin-top: 6px; letter-spacing: -.01em; line-height: 1.15; }
.stat .s { font-size: .78rem; color: var(--muted); margin-top: 3px; }
.stat.green { background: linear-gradient(135deg, var(--green), var(--green-2)); border-color: transparent; color: #fff; }
.stat.green .l, .stat.green .s { color: rgba(255, 255, 255, .85); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.big2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.bigcard { border-radius: var(--r-lg); padding: 18px 22px; color: #fff; box-shadow: 0 8px 22px -10px var(--shadow); position: relative; overflow: hidden; }
.bigcard::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.bigcard .l { font-weight: 700; font-size: 1rem; }
.bigcard .s { font-size: .78rem; opacity: .85; margin-top: 2px; }
.bigcard .v { font-size: 1.9rem; font-weight: 800; margin-top: 14px; letter-spacing: -.02em; }
.bigcard.orange { background: linear-gradient(135deg, #f5a623, #e7860a); }
.bigcard.blue { background: linear-gradient(135deg, var(--brand-hi), var(--brand)); }

/* ---------- bosh sahifa ---------- */
.hero {
  position: relative; overflow: hidden; text-align: center; padding: 48px 24px 52px; margin-bottom: 20px;
  border-radius: 16px; background: var(--brand) radial-gradient(120% 140% at 85% 0%, var(--brand-hi) 0%, var(--brand) 45%, var(--brand-lo) 100%);
  box-shadow: 0 12px 30px -14px var(--shadow);
}
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.hero::before { width: 320px; height: 320px; left: -120px; bottom: -180px; }
.hero::after { width: 220px; height: 220px; right: -60px; top: -110px; }
.hero > * { position: relative; }
.hero h2 { margin: 0; font-size: 2.4rem; color: #fff; font-weight: 800; letter-spacing: -.02em; text-wrap: balance; line-height: 1.1; }
.hero p { color: rgba(255, 255, 255, .92); margin: 12px auto 24px; font-size: 1.05rem; max-width: 46ch; }
.hero .btn.green { background: #f6f6f6; color: var(--brand); border-color: #fff; min-height: 44px; padding: 0 22px; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .35); }
.hero .btn.green:hover { background: #fff; }

/* ---------- sotish ---------- */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .96fr); gap: 16px; align-items: start; }
.pos-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.searchbox { position: relative; }
.searchbox .in { display: flex; gap: 8px; }
.searchbox .in input { border: 2px solid var(--scan-line); min-height: 46px; font-size: 1rem; }
.searchbox .in input:focus { border-color: var(--green); }
.searchbox .in .btn { min-height: 46px; width: 50px; padding: 0; }
.searchbox .hint { font-size: .8rem; color: var(--muted); margin-top: 7px; }
.suggest {
  position: absolute; top: 100%; left: 0; right: 0; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: 0 16px 36px -8px var(--shadow); z-index: 30; max-height: 360px; overflow: auto; margin-top: 6px; padding: 4px;
}
.suggest div { padding: 9px 12px; display: flex; gap: 10px; cursor: pointer; border-radius: var(--r); align-items: center; }
.suggest div.sel, .suggest div:hover { background: var(--ok-bg); }
.suggest .n { flex: 1; min-width: 0; }
.cartbox { border: 2px solid var(--green); min-height: 170px; }
.cart-items { max-height: 46vh; overflow: auto; margin: 0 -8px; }
.ci { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 10px 8px; border-bottom: 1px solid var(--hair); border-radius: var(--r); }
.ci:last-child { border-bottom: none; }
.ci.flash { animation: flash .7s; }
@keyframes flash { from { background: var(--ok-bg); } to { background: transparent; } }
.ci .n { font-weight: 700; font-size: .95rem; }
.ci .sum { font-weight: 800; text-align: right; font-size: 1.02rem; font-variant-numeric: tabular-nums; }
.ci .ctl { display: flex; align-items: center; gap: 6px; grid-column: 1 / -1; }
.ci .ctl button { width: 32px; height: 32px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; font-size: 1rem; line-height: 1; color: var(--ink); }
.ci .ctl button:hover { border-color: var(--muted); }
.ci .ctl input { width: 72px; min-height: 32px; text-align: center; padding: 4px; font-weight: 700; }
.ci .ctl .pr { margin-left: auto; color: var(--muted); font-size: .85rem; }
/* savatdan olib tashlash — qizil savat (✕ «yopish» deb tushunilardi) */
.ci .ctl .x { color: var(--bad-ink); border: 1px solid transparent; background: var(--bad-bg); width: 2.4rem; height: 2.4rem; display: inline-flex; align-items: center; justify-content: center; }
.ci .ctl .x svg.i { width: 1.15rem; height: 1.15rem; }
.ci .ctl .x:hover { background: var(--red); color: #fff; }
.ci .ctl .x:active { transform: scale(.94); }
@media (pointer: coarse) { .ci .ctl .x { width: 44px; height: 44px; } }
.totalbar { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; }
.totalbar b { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.totalbar .v { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; }
.finish { font-size: 1.12rem; min-height: 58px; border-radius: var(--r-lg); box-shadow: 0 10px 24px -10px var(--accent-shadow); }
.paybox .change { display: flex; justify-content: space-between; padding: 11px 14px; border-radius: var(--r); background: var(--ok-bg); color: var(--ok-ink); font-weight: 800; margin-top: 10px; font-size: 1.02rem; }
.paybox .change.debt { background: var(--warn-bg); color: var(--warn-ink); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { border: 1px solid var(--line); background: var(--panel-2); height: 32px; padding: 0 12px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: .86rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.chips button:hover { border-color: var(--muted); }
.chips button.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 8px; max-height: 300px; overflow: auto; }
.tile { background: var(--panel-2); border-radius: var(--r); padding: 9px 11px; cursor: pointer; border: 1px solid transparent; font-size: .84rem; user-select: none; line-height: 1.3; }
.tile:hover { border-color: var(--green); }
.tile b { display: block; color: var(--price-ink); margin-top: 4px; font-variant-numeric: tabular-nums; }
.held { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.cb-info { display: flex; justify-content: space-between; align-items: center; background: var(--info-bg); color: var(--ink); border-radius: var(--r); padding: 9px 12px; margin: 8px 0; font-size: .9rem; }

/* ---------- mahsulot kartochkalari ---------- */
.ptools { display: grid; grid-template-columns: repeat(5, minmax(0, 132px)); gap: 8px; }
.ptools .btn { flex-direction: column; gap: 4px; font-size: .8rem; padding: 10px; min-height: 76px; white-space: normal; line-height: 1.25; border-radius: var(--r-lg); }
.ptools .btn svg { width: 18px; height: 18px; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.pcard {
  background: linear-gradient(180deg, var(--card-1), var(--card-2)); border-radius: var(--r-lg);
  padding: 16px; border: 1px solid var(--hair); display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow-sm);
  transition: border-color .15s, transform .15s;
}
.pcard:hover { border-color: var(--line); }
.pcard h4 { margin: 0 0 6px; font-size: .98rem; text-transform: uppercase; font-weight: 800; letter-spacing: .02em; line-height: 1.25; word-break: break-word; }
.pcard .kv { font-size: .86rem; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.pcard .kv > b:first-child { font-weight: 500; color: var(--muted); white-space: nowrap; }
.pcard .kv > span:last-child { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.pcard .kv small { display: block; font-size: .76rem; font-weight: 500; }
.pcard .z-ok > span:last-child { color: var(--ok-ink); } .pcard .z-low > span:last-child { color: var(--warn-ink); } .pcard .z-out > span:last-child { color: var(--bad-ink); }
.sumbox { border-radius: 6px; padding: 7px 10px; font-size: .82rem; margin-top: 6px; color: var(--paper-ink); background: var(--paper); border-left: 4px solid var(--orange); }
.sumbox b { color: #c87a06; font-weight: 800; }
.sumbox.c { border-left-color: var(--cyan); }
.sumbox.c b { color: #10869e; }
.sumbox small { color: #767c87; }
.bcbox { background: var(--paper); border-radius: var(--r); padding: 10px 10px 12px; margin: 10px 0 4px; text-align: center; color: #555; font-size: .8rem; }
.bcbox > svg { display: block; margin: 4px auto 6px; max-width: 100%; height: 46px; }
.bcbox .none { padding: 12px 0; color: #999; }
.pcard .acts { display: flex; gap: 8px; margin-top: 8px; }
.pcard .acts .btn { flex: 1; }
.markup { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .88rem; }
.markup input { width: 84px; }

/* ---------- qadoq va ulgurji ---------- */
.uchips { grid-column: 1 / -1; display: flex; gap: 5px; flex-wrap: wrap; }
.uchips button { border: 1px solid var(--line); background: var(--panel-2); color: var(--ink-2); border-radius: 7px; height: 28px; padding: 0 10px; font-size: .8rem; font-weight: 700; cursor: pointer; }
.uchips button:hover { border-color: var(--muted); color: var(--ink); }
.uchips button small { color: var(--muted); font-weight: 600; }
.uchips button.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.uchips button.on small { color: rgba(255, 255, 255, .8); }
.uchips button.ws { margin-left: auto; border-color: var(--orange); color: var(--warn-ink); background: transparent; }
.uchips button.ws.on { background: var(--orange); border-color: var(--orange); color: #fff; }
details.packbox { border: 1px dashed var(--line); border-radius: var(--r-lg); padding: 12px 14px; }
details.packbox summary { cursor: pointer; font-weight: 700; display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }

/* ---------- katalog ---------- */
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.citem { background: var(--panel); border: 1px solid var(--hair); border-radius: var(--r-lg); padding: 14px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow-sm); }
.citem:hover { border-color: var(--line); }
.citem .cat { font-size: .7rem; font-weight: 700; color: var(--info-ink); text-transform: uppercase; letter-spacing: .07em; }
.citem h4 { margin: 0; font-size: .98rem; line-height: 1.3; flex: 1; word-break: break-word; }
.citem .pr { font-size: 1.35rem; font-weight: 800; color: var(--price-ink); letter-spacing: -.01em; }
.citem .pr small { font-size: .78rem; font-weight: 600; color: var(--muted); }
.citem .ft { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }

/* ---------- modal ---------- */
.overlay { position: fixed; inset: 0; background: var(--overlay); display: flex; align-items: flex-start; justify-content: center; z-index: 100; padding: 6vh 16px; overflow: auto; backdrop-filter: blur(2px); animation: fade .15s; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; width: 100%; max-width: 540px; box-shadow: 0 24px 60px -12px var(--shadow); animation: pop .18s; }
.modal.wide { max-width: 900px; }
.modal-h { padding: 16px 20px; border-bottom: 1px solid var(--hair); display: flex; align-items: center; }
.modal-h h2 { margin: 0; font-size: 1.12rem; font-weight: 800; flex: 1; }
.modal-h .close { width: 32px; height: 32px; border: none; border-radius: var(--r); background: none; font-size: 1.4rem; cursor: pointer; color: var(--muted); }
.modal-h .close:hover { background: var(--hover); color: var(--ink); }
.modal-b { padding: 18px 20px; }
.modal-f { padding: 4px 20px 18px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }

/* ---------- kirish ---------- */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login .card { width: 100%; max-width: 380px; padding: 28px; border-radius: 16px; box-shadow: 0 20px 50px -20px var(--shadow); }
.login h1 { margin: 0 0 4px; font-family: var(--display); font-size: 1.4rem; font-weight: 800; color: var(--green); text-transform: uppercase; letter-spacing: .01em; }
.login .logo { width: 84px; height: 84px; border-radius: 20px; display: block; margin: 0 0 16px; box-shadow: 0 10px 24px -10px var(--accent-shadow); }
.login { background: radial-gradient(90% 70% at 50% 0%, var(--green-soft), transparent 70%); }

/* ---------- xabarlar ---------- */
#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100% - 32px); }
#toast div { background: var(--green-2); color: #fff; padding: 11px 18px; border-radius: 10px; box-shadow: 0 10px 26px -8px rgba(0, 0, 0, .45); animation: up .2s; font-weight: 600; }
#toast div.err { background: var(--red); }
@keyframes up { from { opacity: 0; transform: translateY(8px); } }

/* ---------- grafiklar ---------- */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 190px; padding-top: 10px; border-bottom: 1px solid var(--hair); }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.bars .b i { display: block; width: 100%; max-width: 40px; background: linear-gradient(180deg, var(--green), var(--green-2)); border-radius: 5px 5px 0 0; min-height: 2px; }
.bars .b:hover i { filter: brightness(1.15); }
.bars .b span { font-size: .68rem; color: var(--muted); margin-top: 5px; white-space: nowrap; }
.hbar { height: 6px; background: var(--hair); border-radius: 999px; overflow: hidden; margin-top: 5px; }
.hbar i { display: block; height: 100%; background: var(--green); border-radius: 999px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs button { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--panel-2); height: 38px; padding: 0 14px; border-radius: var(--r); cursor: pointer; font-weight: 600; color: var(--ink-2); }
.tabs button:hover { color: var(--ink); border-color: var(--muted); }
.tabs button.on { background: var(--green); border-color: var(--green); color: #fff; }

/* ---------- chek logotipi ---------- */
.logo-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: start; }
.logo-prev { background: var(--panel-2); border-radius: var(--r-lg); padding: 14px; display: flex; justify-content: center; }
.logo-prev .paper { width: 196px; background: #fff; color: #000; font-family: 'Courier New', monospace; font-size: 11px; padding: 10px 8px 14px; box-shadow: 0 4px 12px var(--shadow); }
.logo-prev .paper img { image-rendering: pixelated; }
.logo-prev .pc { text-align: center; } .logo-prev .pb { font-weight: bold; } .logo-prev .pbig { font-size: 1.3em; }
.logo-prev .pdash { border-top: 1px dashed #000; margin: 6px 0; }

.sq.theme svg { transition: transform .3s; }
.sq.theme:hover svg { transform: rotate(20deg); }
body, .top, .card, .pcard, .stat, input, select, textarea, .btn, nav.side, nav.side a { transition: background-color .2s, border-color .2s, color .2s, box-shadow .2s; }

/* ---------- moslashuvchan ---------- */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (max-width: 1100px) {
  .ptools { grid-template-columns: repeat(5, minmax(0, 1fr)); width: 100%; }
}
@media (max-width: 900px) {
  .pos, .grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  :root { font-size: 14px; }
  .top { padding: 10px 12px; }
  .brand { font-size: 1.1rem; }
  .brand::before { height: 20px; width: 8px; }
  .who b { display: none; }
  :root { --rail: 54px; }
  nav.side { gap: 4px; }
  nav.side a { width: 40px; height: 40px; border-radius: 10px; }
  nav.side a svg.i { width: 20px; height: 20px; }
  .sec-name { display: none; }
  main { padding-top: 18px; }
  .page-head h1 { width: 100%; font-size: 1.4rem; }
  .big2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat .v { font-size: 1.15rem; }
  .bigcard .v { font-size: 1.4rem; }
  .hero { padding: 32px 16px 36px; border-radius: 14px; }
  .hero h2 { font-size: 1.75rem; }
  .ptools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ptools .btn:last-child { grid-column: 1 / -1; }
  .row.st { flex-direction: column; gap: 0; }
  .logo-grid { grid-template-columns: 1fr; }
  .totalbar .v { font-size: 1.6rem; }
}

/* ---------- tekislash tuzatishlari ---------- */
.pcard .bcbox { margin-top: auto; }
.pcard .bcbox ~ .acts { margin-top: 8px; }
.pcard > .kv:last-of-type { margin-bottom: 8px; }
.sumbox b { display: block; }
.sumbox small { display: block; margin-top: 1px; }
.page-head input[type=date] { width: 172px !important; padding: 0 10px; }
.page-head .row .btn.sm { min-height: 40px; padding: 0 14px; font-size: .88rem; }
.ci .ctl .pr { white-space: nowrap; }
.ci .ctl > .muted { min-width: 0; }
@media (max-width: 600px) { .page-head input[type=date] { width: calc(50% - 16px) !important; } }
.page-head .row > * { flex: 0 0 auto; }

/* ---------- aksiyalar ---------- */
s.old { color: var(--muted); font-weight: 500; font-size: .85em; }
.promo { color: var(--price-ink); font-weight: 800; }
.tile.has-promo { border-color: var(--green-soft); }
.promobar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 20px; border-radius: var(--r-lg);
  background: var(--ok-bg); border: 1px solid var(--ok-ink); color: var(--ink); }
.promobar > svg { width: 28px; height: 28px; color: var(--ok-ink); }
.promobar > div { flex: 1; min-width: 0; }
.promo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.promo-card.off { opacity: .6; }
.daychips { display: flex; gap: 4px; margin: 12px 0 10px; }
.daychips span, .daychips button { width: 34px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px;
  font-size: .78rem; font-weight: 700; background: var(--panel-2); color: var(--muted); border: 1px solid transparent; }
.daychips .on { background: var(--green); color: #fff; }
.daychips.pick button { cursor: pointer; border-color: var(--line); width: 42px; height: 36px; font-size: .85rem; }
.daychips.pick button.on { border-color: var(--green); }
.flabel { display: block; font-size: .8rem; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.chips button small { opacity: .7; font-weight: 500; }
.promo-sum { display: flex; flex-wrap: wrap; gap: 6px 24px; align-items: baseline; padding: 12px 14px; border-radius: var(--r); background: var(--ok-bg); }
table.t tr.dim td { opacity: .55; }
@media (max-width: 600px) { .promo-grid { grid-template-columns: 1fr; } }
.modal div.f { margin-bottom: 14px; }
.promo-card .btn.red { margin-left: auto; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); padding: 3px; gap: 3px; background: var(--input); flex-wrap: wrap; }
.seg button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-2); font-weight: 600; cursor: pointer; }
.seg button.on { background: var(--green); color: #fff; }
.pick-tools { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.pick-tools input { flex: 1; min-width: 200px; }
table.t.pick tr.on td { background: var(--ok-bg); }
table.t.pick input[type=checkbox] { width: 18px; height: 18px; cursor: pointer; }

/* ---------- tugagan / kam qolgan ---------- */
.tabs button .cnt b { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--warn-bg); color: var(--warn-ink); font-size: .74rem; line-height: 18px; text-align: center; }
.tabs button .cnt b.bad { background: var(--bad-bg); color: var(--bad-ink); }
.tabs button.on .cnt b { background: rgba(255,255,255,.25); color: #fff; }
.stat.bad-stat .v { color: var(--bad-ink); }
.stat.warn-stat .v { color: var(--warn-ink); }
.alert-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
table.t.alerts input.oq { width: 76px; min-height: 32px; padding: 4px 8px; text-align: right; font-weight: 700; }
table.t.alerts input[type=checkbox] { width: 18px; height: 18px; cursor: pointer; }
.seg button svg { width: 14px; height: 14px; }

/* ---------- telegram bot kartasi ---------- */
.tg-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.tg-help { background: var(--panel-2); border-radius: var(--r-lg); padding: 14px 16px; font-size: .88rem; line-height: 1.55; }
.tg-help ol { margin: 6px 0 12px; padding-left: 20px; }
.tg-help li { margin-bottom: 4px; }
.tg-help code { background: var(--input); border-radius: 4px; padding: 1px 5px; font-size: .85em; }
@media (max-width: 900px) { .tg-grid { grid-template-columns: 1fr; } }
.tg-link { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 14px; border-radius: var(--r-lg); background: var(--ok-bg); border: 1px solid var(--green); }
.tg-link > div:first-child { flex: 1; min-width: 200px; }
.tg-link .code { font-size: 1.6rem; font-weight: 800; letter-spacing: .18em; color: var(--green); }
.tg-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin-bottom: 14px; border-radius: var(--r-lg); background: var(--warn-bg); color: var(--ink); }
.tg-note svg { color: var(--warn-ink); margin-top: 2px; }
.checks { display: flex; flex-direction: column; gap: 10px; }
.ck { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r); background: var(--panel-2); }
.ck .ico { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; }
.ck.ok .ico { background: var(--ok-bg); color: var(--ok-ink); }
.ck.bad { background: var(--bad-bg); }
.ck.bad .ico { background: var(--red); color: #fff; }

/* ---------- qaytarish ---------- */
.ret-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: var(--r); background: var(--bad-bg); margin-bottom: 6px; }
.ret-sum { margin-top: 14px; padding: 12px 14px; border-radius: var(--r); background: var(--panel-2); display: flex; flex-direction: column; gap: 4px; }
input.rq { width: 64px; min-height: 30px; padding: 3px 6px; text-align: center; font-weight: 700; }

/* ---------- smena ---------- */
.shiftbar { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--panel); flex-wrap: wrap; }
.shiftbar .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.shiftbar.on .dot { background: var(--success); box-shadow: 0 0 0 4px var(--ok-bg); }
.shiftbar.off { border-color: var(--orange); background: var(--warn-bg); }
.shiftbar.off .dot { background: var(--orange); }
.shiftbar > div { min-width: 0; line-height: 1.3; }
.zlist { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--r); background: var(--panel-2); }
.zl { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: .92rem; }
.zl.tot { border-top: 1px dashed var(--line); margin-top: 4px; padding-top: 8px; font-size: 1.02rem; }
.diff { padding: 10px 12px; border-radius: var(--r); font-weight: 600; display: flex; gap: 8px; align-items: center; }
.diff.ok { background: var(--ok-bg); color: var(--ok-ink); } .diff.bad { background: var(--bad-bg); color: var(--bad-ink); } .diff.warn { background: var(--warn-bg); color: var(--warn-ink); }
input.big-in { font-size: 1.25rem; font-weight: 700; min-height: 48px; }
@media (max-width: 600px) { #shiftbar { width: 100%; } .shiftbar { width: 100%; } }

/* ---------- zaxira nusxa ---------- */
.bk-status { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r); margin-bottom: 12px; }
.bk-status svg { flex-shrink: 0; margin-top: 2px; }
.bk-status.ok { background: var(--ok-bg); color: var(--ok-ink); } .bk-status.warn { background: var(--warn-bg); color: var(--warn-ink); } .bk-status.bad { background: var(--bad-bg); color: var(--bad-ink); }
.bk-list { margin-top: 14px; } .bk-list summary { cursor: pointer; font-weight: 600; color: var(--ink-2); padding: 6px 0; }
.bk-list .t { margin-top: 6px; } .bk-list .t td { padding-top: 6px; padding-bottom: 6px; }
.note { padding: 10px 12px; border-radius: var(--r); font-size: .9rem; } .note.warn { background: var(--warn-bg); color: var(--warn-ink); }

/* ---------- to'plamlar ---------- */
.bnd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.bnd-card { text-align: left; font: inherit; color: inherit; display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; transition: border-color .15s, transform .15s; }
.bnd-card:hover { border-color: var(--green); transform: translateY(-1px); }
.bnd-card.na { opacity: .7; }
.bnd-card .h, .bnd-admin .h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .bnd-card .h b, .bnd-admin .h b { margin-right: auto; font-size: 1rem; }
.bnd-card .its { font-size: .86rem; line-height: 1.5; flex: 1; }
.bnd-card .pr { font-size: 1.05rem; }
.bnd-admin { cursor: pointer; display: flex; flex-direction: column; gap: 10px; transition: border-color .15s; } .bnd-admin:hover { border-color: var(--green); }
.bnd-admin.off { opacity: .6; }
.bnd-admin .t td { padding-top: 5px; padding-bottom: 5px; font-size: .88rem; }
.bnd-admin .sumrow { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: center; }
.bnd-sum { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.bnd-hit { margin-top: 8px; padding: 8px 10px; border-radius: var(--r); background: var(--ok-bg); color: var(--ok-ink); display: flex; flex-direction: column; gap: 4px; font-size: .9rem; }
.bnd-hit > div { display: flex; justify-content: space-between; gap: 8px; align-items: center; } .bnd-hit svg { width: 15px; height: 15px; vertical-align: -2px; }
.qtybox { display: inline-flex; align-items: center; gap: 4px; }
.qtybox button { width: 36px; height: 36px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); font-size: 1.1rem; cursor: pointer; }
.qtybox input { width: 64px; text-align: center; min-height: 36px; }

/* ---------- chekni topish (Tarix) ---------- */
.find-rc { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px; margin-bottom: 14px; border-color: var(--green); }
.find-rc .ico { color: var(--green); display: inline-flex; } .find-rc .ico svg { width: 22px; height: 22px; }
.find-rc input { flex: 1; min-width: 0; font-size: 1.05rem; min-height: 46px; }
.find-rc .btn { flex: 0 0 auto; min-height: 46px; }
@media (max-width: 600px) { .find-rc .btn { padding: 0 12px; } .find-rc input { font-size: .95rem; } }

/* ---------- etiketka oynasi ---------- */
.lbl-dlg { display: grid; grid-template-columns: minmax(240px, 300px) 1fr; gap: 22px; align-items: start; }
.lbl-l { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.lbl-sizes { display: grid; grid-template-columns: repeat(4, 1fr); }
.lbl-sizes button { font-variant-numeric: tabular-nums; }
.lbl-items { max-height: 220px; overflow: auto; }
.lbl-prev { background: repeating-conic-gradient(var(--panel-2) 0 25%, transparent 0 50%) 0 0 / 16px 16px; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; display: flex; justify-content: center; align-items: center; min-height: 240px; overflow: auto; }
@media (max-width: 760px) { .lbl-dlg { grid-template-columns: 1fr; } }
#toast, #toast div { pointer-events: none; }
.lbl-dlg > div { min-width: 0; }

/* ---------- brend tipografiyasi: Montserrat — sarlavha va katta raqamlar ---------- */
.page-head h1, .hero h2, .card h3, .modal-h h2, .totalbar .v, .stat .v, .bigcard .v, .sumbox b, .pcard h4, .tg-link .code, .sec-name { font-family: var(--display); }
.page-head h1 { font-weight: 800; letter-spacing: -.01em; }
.card h3 { font-weight: 700; letter-spacing: 0; }
.totalbar .v, .stat .v, .bigcard .v { font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums lining-nums; }
.pcard h4 { font-weight: 700; letter-spacing: .01em; }
.sec-name { font-weight: 700; font-size: .92rem; }

/* ---------- xavfsizlik: qulf ekrani, jurnal ---------- */
.lockscreen { background: radial-gradient(90% 70% at 50% 0%, var(--accent-shadow), rgba(5, 18, 48, .92) 70%); backdrop-filter: blur(10px); z-index: 300; }
.lockcard { width: 100%; max-width: 380px; padding: 28px; border-radius: 18px; text-align: left; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .5); }
.lockcard .logo { width: 64px; height: 64px; border-radius: 16px; display: block; margin-bottom: 14px; }
.lockcard h2 { font-family: var(--display); font-weight: 800; margin: 0 0 4px; font-size: 1.3rem; }
.lockcard .lock-ic { position: absolute; margin: -40px 0 0 48px; width: 28px; height: 28px; border-radius: 50%; background: var(--panel); display: grid; place-items: center; color: var(--green); box-shadow: 0 2px 6px var(--shadow); }
.lockcard .lock-ic svg { width: 15px; height: 15px; }
.lockcard input { width: 100%; }
.err-line { color: var(--bad-ink); font-weight: 600; font-size: .88rem; min-height: 1.3em; margin-top: 6px; }
.audit-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.audit-bar #adb { margin-right: auto; }
.atag { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .86rem; padding: 3px 9px; border-radius: 999px; background: var(--panel-2); }
.atag svg { width: 14px; height: 14px; }
.atag.warn { background: var(--warn-bg); color: var(--warn-ink); } .atag.alert { background: var(--bad-bg); color: var(--bad-ink); }
table.audit tr.lv-alert td { background: color-mix(in srgb, var(--bad-bg) 45%, transparent); }
table.audit .adet { max-width: 520px; font-size: .9rem; }

/* ---------- telefondan ulanish ---------- */
.phone-grid { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: start; }
.qr-list { display: flex; flex-direction: column; gap: 14px; }
.qr-box { background: #fff; color: #111; border-radius: var(--r-lg); padding: 10px; text-align: center; border: 1px solid var(--line); }
.qr-box svg { display: block; width: 210px; height: 210px; margin: 0 auto; }
.qr-box .num { font-size: .82rem; font-weight: 600; margin-top: 4px; }
.phone-addr { margin-top: 8px; font: 700 1.35rem/1.2 var(--display, inherit); letter-spacing: .01em; word-break: break-all; color: #0b1b3a; }
.phone-addr .pa-pre { color: #6b7385; font-weight: 600; font-size: .8em; }
.phone-addr .pa-colon { color: var(--brand); font-size: 1.25em; padding: 0 1px; }
.phone-addr .pa-port { color: var(--brand); }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; line-height: 1.5; }
@media (max-width: 700px) { .phone-grid { grid-template-columns: 1fr; } .qr-box svg { width: 180px; height: 180px; } }

/* ---------- kamera skaneri ---------- */
.cam-btn { flex: 0 0 auto; min-width: 46px; padding: 0 12px; background: var(--green-soft); color: var(--green); border-color: transparent; }
.cam-btn svg { width: 20px; height: 20px; }
:root:not([data-theme="light"]) .cam-btn { color: #b9d2ff; }
.scanner { position: fixed; inset: 0; z-index: 400; background: #000; color: #fff; overflow: hidden; touch-action: none; }
html.scanning, html.scanning body { overflow: hidden; }
.scanner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scanner.flash::after { content: ""; position: absolute; inset: 0; background: rgba(255, 255, 255, .28); pointer-events: none; }
.sc-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 12px; padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 28px;
  background: linear-gradient(rgba(0, 0, 0, .65), transparent); font-family: var(--display); font-size: 1rem; }
.sc-top b { flex: 1; font-weight: 700; }
.sc-x { width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .16); color: #fff; font-size: 1.15rem; cursor: pointer; }
/* ramka: kadr markazidagi keng tasma (dekoder shu joyni o'qiydi) */
.sc-frame { position: absolute; left: 7%; right: 7%; top: 50%; height: min(30vh, 52vw); transform: translateY(-50%); border-radius: 18px;
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .45); }
.sc-frame i { position: absolute; width: 34px; height: 34px; border: 4px solid #fff; }
.sc-frame i:nth-child(1) { left: -2px; top: -2px; border-right: 0; border-bottom: 0; border-radius: 16px 0 0 0; }
.sc-frame i:nth-child(2) { right: -2px; top: -2px; border-left: 0; border-bottom: 0; border-radius: 0 16px 0 0; }
.sc-frame i:nth-child(3) { left: -2px; bottom: -2px; border-right: 0; border-top: 0; border-radius: 0 0 0 16px; }
.sc-frame i:nth-child(4) { right: -2px; bottom: -2px; border-left: 0; border-top: 0; border-radius: 0 0 16px 0; }
.sc-laser { position: absolute; left: 6%; right: 6%; top: 50%; height: 2px; background: #ff3b30; box-shadow: 0 0 10px 2px rgba(255, 59, 48, .7); animation: laser 1.6s ease-in-out infinite; }
@keyframes laser { 0%, 100% { transform: translateY(-38px); opacity: .7; } 50% { transform: translateY(38px); opacity: 1; } }
.sc-hint { position: absolute; left: 0; right: 0; top: calc(50% + min(15vh, 26vw) + 14px); text-align: center; font-size: .9rem; color: rgba(255, 255, 255, .85); padding: 0 20px; }
.sc-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 16px calc(18px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(transparent, rgba(0, 0, 0, .75)); display: flex; flex-direction: column; gap: 14px; align-items: center; }
.sc-res { min-height: 0; max-width: 560px; width: 100%; padding: 0; border-radius: 14px; font-weight: 600; display: flex; align-items: center; gap: 10px; opacity: 0; transition: opacity .15s; }
.sc-res.show { opacity: 1; padding: 12px 14px; background: rgba(255, 255, 255, .95); color: #111a2e; }
.sc-res.ok svg { color: #23833a; } .sc-res.err { background: #fde8e6; color: #ad261f; }
.sc-res svg { width: 22px; height: 22px; flex-shrink: 0; }
.sc-res .sc-n { margin-left: auto; background: var(--brand); color: #fff; border-radius: 999px; padding: 2px 10px; font-size: .85rem; }
.sc-btns { display: flex; gap: 12px; }
.sc-b { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 76px; padding: 10px 12px; border-radius: 16px; border: 0; background: rgba(255, 255, 255, .16); color: #fff; font: inherit; font-size: .8rem; cursor: pointer; }
.sc-b svg { width: 24px; height: 24px; }
.sc-b.on { background: #ffd60a; color: #111; }
.sc-b.done { background: var(--brand); }
.sc-res small { display: block; font-weight: 500; font-size: .76rem; opacity: .65; margin-top: 2px; }

/* ---------- telefon: pastki to'lov paneli ---------- */
.mbar { display: none; }
@media (max-width: 900px) {
  .mbar { display: flex; align-items: center; gap: 8px; position: fixed; left: var(--rail); right: 0; bottom: 0; z-index: 55; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background: var(--panel); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -12px var(--shadow); }
  .mbar .mt { flex: 1; min-width: 0; line-height: 1.1; } .mbar .mt span { display: block; font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
  .mbar .mt b { font-family: var(--display); font-size: 1.25rem; font-weight: 800; white-space: nowrap; }
  .mbar .btn { min-height: 48px; padding: 0 14px; }
  .mbar .mcam { background: var(--green-soft); color: var(--green); border-color: transparent; }
  main.wide:has(.mbar) { padding-bottom: 96px; }
  .searchbox .hint { display: none; }
}
.promobar.lblbar { background: var(--warn-bg); border-color: var(--warn-ink); margin-top: 10px; } .promobar.lblbar > svg { color: var(--warn-ink); }

/* ---------- ko'chirish ustasi ---------- */
.imp-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0 12px; }
.imp-map .f { margin-bottom: 8px; } .imp-map select { min-height: 36px; }
.imp-sum { padding: 10px 12px; border-radius: var(--r); background: var(--green-soft); margin-bottom: 10px; }
.mig-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mig-steps .btn { height: auto; flex-direction: column; align-items: flex-start; padding: 10px 12px; gap: 2px; text-align: left; white-space: normal; }
.mig-steps .btn b { font-family: var(--display); color: var(--green); font-size: 1.1rem; }
.mig-steps .btn small { color: var(--muted); font-weight: 500; font-size: .76rem; }
@media (max-width: 600px) { .mig-steps { grid-template-columns: 1fr; } }

/* ---------- uskunalarni tekshirish ---------- */
.chk-prog { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.chk-prog .bar { flex: 1; height: 10px; border-radius: 999px; background: var(--panel-2); overflow: hidden; }
.chk-prog .bar i { display: block; height: 100%; background: var(--green); border-radius: 999px; transition: width .3s; }
.chk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.ckc { display: flex; flex-direction: column; gap: 8px; border-left: 4px solid var(--line); text-align: left; }
.ckc.ok { border-left-color: var(--success); } .ckc.bad { border-left-color: var(--red); }
.chk-h { display: flex; align-items: center; gap: 10px; } .chk-h b { flex: 1; font-family: var(--display); }
.chk-h .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green); font-weight: 800; font-size: .85rem; flex-shrink: 0; }
.chk-b p { margin: 0 0 8px; }
.chk-ask { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); flex-wrap: wrap; } .chk-ask span { flex: 1; min-width: 180px; font-size: .9rem; font-weight: 600; }
.chk-note { font-size: .86rem; padding: 8px 10px; border-radius: var(--r); background: var(--ok-bg); color: var(--ok-ink); } .chk-note.bad { background: var(--bad-bg); color: var(--bad-ink); }
.chk-lines { font-size: .86rem; display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border-radius: var(--r); background: var(--panel-2); }
.chk-ol { margin: 0; padding-left: 20px; font-size: .9rem; line-height: 1.6; }
.chk-note { display: block; } .ckc > .muted { text-align: right; }

/* ---------- telefon: menyu yashirin, ☰ bilan ochiladi; kompyuter: doim ko'rinadigan ikonkalar ---------- */
.menu-btn, .nav-dim, nav.side .nl { display: none; }
@media (max-width: 700px) {
  body:has(nav.side) { padding-left: 0; }
  .menu-btn { display: inline-flex; margin-right: 2px; }
  nav.side { width: min(270px, 80vw); align-items: stretch; padding-left: 12px; padding-right: 12px; transform: translateX(-105%); transition: transform .22s ease; box-shadow: 8px 0 30px rgba(0, 0, 0, .25); }
  body.nav-open nav.side { transform: none; }
  nav.side a { width: auto; height: 46px; justify-content: flex-start; gap: 14px; padding: 0 12px; }
  nav.side a svg.i { width: 22px; height: 22px; }
  nav.side .logo { width: 46px; height: 46px; padding: 0; }
  nav.side .nl { display: inline; font-weight: 600; font-size: .98rem; }
  .navtip { display: none; }
  body.nav-open .nav-dim { display: block; position: fixed; inset: 0; background: rgba(5, 15, 40, .45); z-index: 59; }
}
@media (max-width: 700px) { .mbar { left: 0 !important; } }

/* ---------- kartochkalar: aniq chegaralar, kattaroq yozuv (2026.10.11-20) ---------- */
.cgrid { grid-template-columns: repeat(auto-fill, minmax(14.5rem, 1fr)); gap: 1.1rem; }
.citem { border: 1.5px solid var(--line); box-shadow: 0 2px 6px var(--shadow); padding: 1rem 1.1rem; gap: .45rem; }
.citem:hover { border-color: var(--green); }
.citem .cat { font-size: .74rem; }
.citem h4 { font-size: 1.06rem; font-weight: 700; }
.citem .pr { font-size: 1.5rem; padding-top: .35rem; border-top: 1px dashed var(--line); }
.citem .ft { padding-top: .2rem; }
.citem .ft .tag { font-size: .8rem; }
.citem .ft .btn { min-width: 2.9rem; min-height: 2.5rem; }

.pgrid { grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: 1.4rem; }
.pcard { border: 1.5px solid var(--line); box-shadow: 0 2px 8px var(--shadow); padding: 1.1rem 1.2rem; gap: 0; }
.pcard:hover { border-color: var(--green); }
.pcard h4 { font-size: 1.12rem; margin: 0 0 .5rem; padding-bottom: .5rem; border-bottom: 2px solid var(--green); }
.pcard .kv { font-size: .95rem; padding: .32rem 0; border-bottom: 1px dashed var(--line); }
.pcard .kv > b:first-child { color: var(--ink-2); }
.pcard > .kv:last-of-type { margin-bottom: .6rem; }
.sumbox { font-size: .9rem; margin-top: .55rem; padding: .5rem .7rem; }
.bcbox { font-size: .85rem; }
.pcard .acts .btn, .pcard .bcbox .btn { min-height: 2.6rem; font-size: .9rem; }
/* savat: oxirgi qo'shilgan mahsulot tepada, ajralib turadi */
.ci.last { background: var(--green-soft); box-shadow: inset 4px 0 0 var(--green); }
.ci.last .ctl input { border-color: var(--green); }

/* ==========================================================================
   RANG MAVZULARI (5 ta): ko'k (standart), zumrad, binafsha, firuza, grafit.
   html[data-accent] — tugma, menyu, narx, grafik va urg'ular avtomatik shu rangga o'tadi;
   kunduzgi va tungi rejimning ikkalasida ham ishlaydi. Ogohlantirish ranglari (yashil/sariq/qizil) o'zgarmaydi.
   ========================================================================== */
:root[data-accent="zumrad"] {
  --brand: #047857; --brand-hi: #0a9c70; --brand-lo: #035c43;
  --rail-bg: #047857; --rail-on-ink: #047857;
  --green: #12936a; --green-2: #0f805c; --green-soft: rgba(22, 162, 115, .18);
  --blue: #12936a; --info-bg: rgba(22, 162, 115, .16); --info-ink: #6fdcb0; --price-ink: #6fdcb0;
  --focus: 0 0 0 3px rgba(22, 162, 115, .38); --accent-shadow: rgba(4, 120, 87, .55);
}
:root[data-theme="light"][data-accent="zumrad"] {
  --rail-bg: #047857; --rail-on-ink: #047857;
  --green: #047857; --green-2: #035c43; --green-soft: #dcf3ea;
  --blue: #0a9c70; --info-bg: #dcf3ea; --info-ink: #047857; --price-ink: #047857;
  --focus: 0 0 0 3px rgba(4, 120, 87, .22); --accent-shadow: rgba(4, 120, 87, .45);
}
:root[data-accent="binafsha"] {
  --brand: #5b3cc4; --brand-hi: #7456e0; --brand-lo: #432c96;
  --rail-bg: #5b3cc4; --rail-on-ink: #5b3cc4;
  --green: #7c5cf0; --green-2: #6845e0; --green-soft: rgba(124, 92, 240, .18);
  --blue: #7c5cf0; --info-bg: rgba(124, 92, 240, .16); --info-ink: #b9a6ff; --price-ink: #b9a6ff;
  --focus: 0 0 0 3px rgba(124, 92, 240, .38); --accent-shadow: rgba(91, 60, 196, .55);
}
:root[data-theme="light"][data-accent="binafsha"] {
  --rail-bg: #5b3cc4; --rail-on-ink: #5b3cc4;
  --green: #5b3cc4; --green-2: #432c96; --green-soft: #ebe5fb;
  --blue: #7456e0; --info-bg: #ebe5fb; --info-ink: #5b3cc4; --price-ink: #5b3cc4;
  --focus: 0 0 0 3px rgba(91, 60, 196, .22); --accent-shadow: rgba(91, 60, 196, .45);
}
:root[data-accent="firuza"] {
  --brand: #0e7490; --brand-hi: #1592b3; --brand-lo: #0a5870;
  --rail-bg: #0e7490; --rail-on-ink: #0e7490;
  --green: #1789a8; --green-2: #137692; --green-soft: rgba(26, 156, 192, .18);
  --blue: #1789a8; --info-bg: rgba(26, 156, 192, .16); --info-ink: #7fd3ea; --price-ink: #7fd3ea;
  --focus: 0 0 0 3px rgba(26, 156, 192, .38); --accent-shadow: rgba(14, 116, 144, .55);
}
:root[data-theme="light"][data-accent="firuza"] {
  --rail-bg: #0e7490; --rail-on-ink: #0e7490;
  --green: #0e7490; --green-2: #0a5870; --green-soft: #dcf0f6;
  --blue: #1592b3; --info-bg: #dcf0f6; --info-ink: #0e7490; --price-ink: #0e7490;
  --focus: 0 0 0 3px rgba(14, 116, 144, .22); --accent-shadow: rgba(14, 116, 144, .45);
}
:root[data-accent="grafit"] {
  --brand: #334155; --brand-hi: #4a5b73; --brand-lo: #1f2937;
  --rail-bg: #334155; --rail-on-ink: #334155;
  --green: #5b7190; --green-2: #4b607d; --green-soft: rgba(91, 113, 144, .18);
  --blue: #5b7190; --info-bg: rgba(91, 113, 144, .16); --info-ink: #b6c4d8; --price-ink: #b6c4d8;
  --focus: 0 0 0 3px rgba(91, 113, 144, .38); --accent-shadow: rgba(51, 65, 85, .55);
}
:root[data-theme="light"][data-accent="grafit"] {
  --rail-bg: #334155; --rail-on-ink: #334155;
  --green: #334155; --green-2: #1f2937; --green-soft: #e5e9f0;
  --blue: #4a5b73; --info-bg: #e5e9f0; --info-ink: #334155; --price-ink: #334155;
  --focus: 0 0 0 3px rgba(51, 65, 85, .22); --accent-shadow: rgba(51, 65, 85, .45);
}
/* rang tanlash oynasi */
.accents { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: .8rem; }
.acc { border: 2px solid var(--line); border-radius: var(--r-lg); background: var(--panel); padding: .7rem; cursor: pointer; text-align: left; color: var(--ink); font: inherit; display: flex; flex-direction: column; gap: .5rem; }
.acc:hover { border-color: var(--muted); }
.acc.on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--ink); }
.acc .pv { display: flex; height: 3.2rem; border-radius: 8px; overflow: hidden; border: 1px solid var(--hair); }
.acc .pv i { display: block; }
.acc .pv .r { width: 22%; } .acc .pv .m { flex: 1; background: var(--bg-1); display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 0 8px; }
.acc .pv .m b { display: block; height: 9px; border-radius: 3px; width: 70%; } .acc .pv .m em { display: block; height: 6px; border-radius: 3px; width: 45%; background: var(--line); }
.acc .nm { font-weight: 700; display: flex; align-items: center; gap: .4rem; } .acc .nm small { font-weight: 500; color: var(--muted); }
.modes { display: flex; gap: .6rem; margin-bottom: 1rem; } .modes .btn { flex: 1; }
.modes .btn.on { background: var(--green); color: #fff; border-color: var(--green); }

/* ---------- telefon: o'z-o'zidan kattalashib ketmasin (2026.10.13-26) ---------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; touch-action: manipulation; } /* tez bosishda (+ −) ikki marta bosish = kattalashtirish bo'lmasin */
/* iPhone Safari 16px dan kichik maydonchaga bosganda sahifani kattalashtiradi — sensorli ekranlarda 16px */
@media (pointer: coarse) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { font-size: 16px !important; }
}
/* chap tomonda forma, o'ngda ro'yxat — faqat keng ekranda; telefonda bitta ustun */
@media (min-width: 901px) { .grid2.side { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); } }

/* ---------- qidiriladigan tanlov (kategoriya) ---------- */
.combo { position: relative; flex: 1; min-width: 0; }
.combo-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; max-height: min(42vh, 320px); overflow: auto; overscroll-behavior: contain;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 10px 28px -8px var(--shadow); padding: 4px; }
.combo-it { padding: 10px 12px; border-radius: 6px; cursor: pointer; display: flex; align-items: center; gap: 6px; min-height: 40px; }
.combo-it.hi { background: var(--hover); }
.combo-it.on { font-weight: 700; color: var(--green); }
.combo-it svg.i { color: var(--green); }
/* qo'shimcha shtrix-kodlar ro'yxati */
.codes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.codes:empty { display: none; }
.code-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 4px 3px 12px; font-weight: 600; font-size: .92rem; }
.code-chip button { border: 0; background: transparent; color: var(--bad-ink); width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: .85rem; }
.code-chip button:hover { background: var(--bad-bg); }
/* ombor: Mavjud / Kam qolgan / Qolmagan */
.stock-tabs button { height: 44px; padding: 0 16px; font-size: .95rem; }
.stock-tabs button b { background: var(--hover); border-radius: 999px; padding: 1px 9px; font-size: .85rem; min-width: 1.6em; text-align: center; }
.stock-tabs button.on b { background: rgba(255, 255, 255, .22); }
.stock-tabs .st-low { color: var(--warn-ink); }
.stock-tabs .st-out { color: var(--bad-ink); }
.stock-tabs .st-low.on { background: var(--orange); border-color: var(--orange); color: #fff; }
.stock-tabs .st-out.on { background: var(--red); border-color: var(--red); color: #fff; }
@media (max-width: 600px) { .stock-tabs { display: grid; grid-template-columns: repeat(3, 1fr); } .stock-tabs button { padding: 0 6px; gap: 4px; font-size: .85rem; justify-content: center; } .stock-tabs button svg.i { display: none; } }
.st-badge { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; font-weight: 700; font-size: .85rem; padding: 4px 10px; border-radius: 999px; margin: -2px 0 8px; }
.st-badge.low { background: var(--warn-bg); color: var(--warn-ink); }
.st-badge.out { background: var(--bad-bg); color: var(--bad-ink); }
.pcard.z-low { border-color: var(--orange); }
.warnbar.out { background: var(--bad-bg); border-color: var(--bad-ink); color: var(--bad-ink); }
.warnbar.out a { color: var(--bad-ink); }
@media (max-width: 600px) { .warnbar { flex-wrap: wrap; } .warnbar > span { flex: 1 1 calc(100% - 2rem); } .warnbar a { margin-left: 0 !important; } }
.tabs button[hidden] { display: none; }
.kirim-after { font-size: .82rem; margin-top: 4px; color: var(--ok-ink); }

/* ---- to'lov usuli tugmalari (sotish) ---- */
.paym { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
.paym button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 3.6rem; padding: 6px 2px;
  border: 1.5px solid var(--line); border-radius: 10px; background: var(--panel-2); color: var(--ink); font: 600 .82rem/1.1 var(--font); cursor: pointer; touch-action: manipulation; }
.paym button svg { width: 1.35rem; height: 1.35rem; }
.paym button:hover { border-color: var(--green); }
.paym button.on { background: var(--green); border-color: var(--green); color: #fff; box-shadow: 0 2px 8px color-mix(in srgb, var(--green) 35%, transparent); }
.paym button.debt { color: var(--warn-ink); }
.paym button.debt.on { background: var(--orange); border-color: var(--orange); color: #fff; box-shadow: none; }
.mixrow .f { min-width: 0; }
@media (max-width: 420px) { .paym button { font-size: .74rem; min-height: 3.3rem; } .mixrow { flex-wrap: wrap; } }
@media (pointer: coarse) { .paym button { min-height: 48px; } }

/* ---- xodim: lavozim, ruxsatlar, maosh tartibi ---- */
.perm-box { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 12px; margin: 12px 0 0; min-width: 0; }
.perm-box legend { display: inline-flex; align-items: center; gap: 6px; padding: 0 6px; font: 700 .92rem var(--display); }
.perm-box legend svg { width: 1.05rem; height: 1.05rem; color: var(--green); }
.perm-g { margin-top: 8px; }
.perm-g > b { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 4px; }
.perm-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: 2px 14px; }
.perm-list .chk { margin: 0; padding: 5px 0; font-weight: 500; align-items: flex-start; line-height: 1.3; }
.perm-list .chk input { margin-top: 2px; flex: 0 0 auto; }
.uform [hidden] { display: none !important; }
/* maosh jadvali */
.sal-sub { display: block; font-size: .76rem; color: var(--muted); font-weight: 400; white-space: nowrap; }
.sal-plan { height: 5px; border-radius: 3px; background: var(--line); margin-top: 4px; overflow: hidden; min-width: 70px; }
.sal-plan i { display: block; height: 100%; background: var(--green); }
.sal-plan.done i { background: var(--ok-ink, var(--green)); }
.sal-acts { display: flex; gap: 4px; justify-content: flex-end; flex-wrap: wrap; }
.sal-me { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 12px; }
.sal-me table.t td { padding: 6px 4px; }
/* ulgurji narx: foiz bilan qo'yish */
.ws-row { display: flex; gap: 6px; align-items: stretch; }
.ws-row > input { flex: 1; min-width: 0; }
.ws-pct { display: inline-flex; align-items: center; gap: 2px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--r, 8px); background: var(--panel-2); font-weight: 700; color: var(--muted); }
.ws-pct input { width: 2.8rem; border: 0; background: transparent; padding: 0; text-align: center; font-weight: 700; color: var(--ink); box-shadow: none; }
.ws-pct input:focus { outline: none; }
.ws-pct:focus-within { border-color: var(--green); }
.ws-row .btn { flex: 0 0 auto; }
.bad-txt { color: var(--bad-ink) !important; font-weight: 600; }

/* ---- qurilmalar ---- */
tr.dev-pend td { background: var(--warn-bg); }
.dev-wait { text-align: center; max-width: 26rem; }
.dev-wait .dev-ico { width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green); }
.dev-wait .dev-ico svg { width: 30px; height: 30px; }
.dev-wait h1 { margin: 0 0 8px; }
.dev-spin { width: 28px; height: 28px; margin: 14px auto 6px; border: 3px solid var(--line); border-top-color: var(--green); border-radius: 50%; animation: devspin 1s linear infinite; }
@keyframes devspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .dev-spin { animation-duration: 3s; } }
.home-alert { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---- ilova: internet uzilganda, kirish oynasi qo'shimchalari ---- */
#netbar { position: fixed; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top, 0px) + 8px); z-index: 9999; display: flex; align-items: center; gap: 8px;
  max-width: min(92vw, 40rem); padding: 10px 14px; border-radius: 12px; background: var(--red, #d4413a); color: #fff; font-weight: 600; font-size: .9rem; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
#netbar svg { width: 1.1rem; height: 1.1rem; flex: 0 0 auto; }
.login-extra { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }

/* ---- bulut ---- */
.sync-pill { display: inline-flex; align-items: center; gap: 5px; height: 2.1rem; padding: 0 10px; border-radius: 999px; font: 700 .78rem var(--font); text-decoration: none; white-space: nowrap; }
.sync-pill svg { width: .95rem; height: .95rem; }
.sync-pill.ok { background: var(--ok-bg); color: var(--ok-ink); }
.sync-pill.off { background: var(--warn-bg); color: var(--warn-ink); animation: pillpulse 2s ease-in-out infinite; }
.sync-pill[hidden] { display: none; }
@keyframes pillpulse { 50% { opacity: .65; } }
@media (prefers-reduced-motion: reduce) { .sync-pill.off { animation: none; } }
.pair-code { margin-top: 10px; padding: 12px; border: 2px dashed var(--green); border-radius: 12px; text-align: center; }
.pair-code b { display: block; font: 800 1.8rem/1.3 var(--display); letter-spacing: .12em; color: var(--green); margin: 4px 0; }
.bk-enc { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin: 0 0 10px; border: 1px solid var(--line); border-radius: 10px; flex-wrap: wrap; }
.bk-enc > svg { width: 1.3rem; height: 1.3rem; color: var(--green); flex: 0 0 auto; }
.bk-enc > div { flex: 1; min-width: 200px; }
.audit-seal { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-weight: 700; font-size: .82rem; }
.audit-seal svg { width: 1rem; height: 1rem; }
.audit-seal.ok { background: var(--ok-bg); color: var(--ok-ink); }
.audit-seal.bad { background: var(--bad-bg); color: var(--bad-ink); }

/* ---------- Aqlli tahlil ---------- */
.ins-note { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; }
.ins-note svg { width: 14px; height: 14px; }
.ins-how { font-size: .82rem; margin: 12px 2px 0; line-height: 1.5; }
.ins-how svg, .ai-warn svg { width: 13px; height: 13px; vertical-align: -2px; }
.ins-mini { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; color: var(--muted); white-space: nowrap; }
.ins-mini input { width: 58px; height: 34px; padding: 4px 8px; text-align: center; }
.ins-t td { vertical-align: top; }
.abc-stats .abc-c { text-align: left; cursor: pointer; font: inherit; color: inherit; }
.abc-c.on { outline: 2px solid var(--green); outline-offset: -2px; }
.abc-c .v small { font-size: .8rem; font-weight: 600; color: var(--muted); }
.abc-a .l, .abc-tag.abc-a { color: var(--ok-ink); } .abc-tag.abc-a { background: var(--ok-bg); }
.abc-b .l, .abc-tag.abc-b { color: var(--info-ink); } .abc-tag.abc-b { background: var(--info-bg); }
.abc-c .l, .abc-tag.abc-c { color: var(--warn-ink); } .abc-tag.abc-c { background: var(--warn-bg); }
.abc-d .l { color: var(--bad-ink); }
.heat { display: grid; grid-template-columns: 44px repeat(var(--cols), minmax(34px, 1fr)); gap: 3px; min-width: calc(44px + var(--cols) * 37px); }
.heat .hh { font-size: .72rem; color: var(--muted); text-align: center; }
.heat .hd { font-size: .78rem; font-weight: 700; color: var(--ink-2); display: flex; align-items: center; }
.heat .hc { height: 34px; border-radius: 6px; background: color-mix(in srgb, var(--green) var(--p), var(--panel-2)); font-size: .68rem; font-weight: 700; color: #fff; display: flex; align-items: center; justify-content: center; }
.risk-list { display: flex; flex-direction: column; gap: 8px; }
.risk-it { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--r); background: var(--panel-2); }
.risk-it > div { flex: 1; min-width: 0; }
.risk-it .dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; background: var(--orange); }
.risk-it.high .dot { background: var(--red); }
.promobar.aibar > svg { color: var(--green); }
/* ---------- Nakladnoy (AI) ---------- */
.ai-btn { white-space: nowrap; }
.ai-wait { text-align: center; padding: 10px 0; }
.ai-wait .dev-spin { margin: 0 auto 12px; }
.ai-thumbs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.ai-thumbs img { width: 72px; height: 96px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.ai-head { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 10px; }
.ai-head .f { flex: 1 1 260px; margin: 0; }
.ai-doc { display: flex; gap: 16px; flex-wrap: wrap; font-size: .9rem; flex: 2 1 320px; padding-bottom: 8px; }
.ai-stats { gap: 6px; align-items: center; margin-bottom: 10px; }
.ai-t td { vertical-align: top; }
.ai-t tr.ai-guess td { background: var(--warn-bg); }
.ai-warn { margin-top: 6px; font-size: .78rem; color: var(--warn-ink); line-height: 1.45; }
.ai-steps { margin: 8px 0 0; padding-left: 20px; line-height: 1.7; }
.tg-note.bad-note { background: var(--bad-bg); }
.tg-note.bad-note svg { color: var(--bad-ink); }
.pp-list { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; max-height: 55vh; overflow: auto; }
.pp-it { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel-2); color: var(--ink); cursor: pointer; text-align: left; font: inherit; }
.pp-it:hover, .pp-it:focus-visible { border-color: var(--green); }
.pp-it .muted { font-size: .8rem; }
@media (max-width: 760px) {
  .ai-btn span { display: none; }
  .ins-mini input { width: 52px; }
  .ai-t th:nth-child(2), .ai-t td:nth-child(2) { min-width: 150px; }
}
.ins-ctl { align-items: center; flex-wrap: wrap; gap: 10px; }
@media (max-width: 760px) {
  .ins-ctl > .seg { width: 100%; flex-wrap: nowrap; overflow-x: auto; }
  .ins-ctl > .seg button { flex: 1 0 auto; justify-content: center; }
  .ins-ctl > select, .ins-ctl > input { flex: 1 1 100% !important; min-width: 0 !important; }
  .ins-ctl .ins-mini { flex: 1 1 40%; white-space: normal; }
}
.ins-ctl > .seg { flex-wrap: nowrap; flex: 0 0 auto; }
table.t.ai-t tr.dim td:nth-child(3) { opacity: 1; }
/* ---------- telefon ulanishi holati ---------- */
.conn-health { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.conn-health h3 { display: flex; gap: 8px; align-items: center; margin: 0 0 10px; }
.ch-row { display: flex; gap: 10px; align-items: center; padding: 8px 0; }
.ch-row > div { flex: 1; min-width: 0; }
.qr-box.qr-main { outline: 2px solid var(--green); outline-offset: 4px; border-radius: 8px; }

/* ==========================================================================
   GRADIENT MAVZULAR (6 ta, 2026.10.19-40): ikki rang bir-biriga o'tadi — menyu, asosiy tugmalar, faol tab,
   to'lov tugmalari, grafiklar va bosh sahifa bannerida. Oddiy matn, jadval va ogohlantirish ranglari o'zgarmaydi.
   Oldingi 5 ta mavzu avvalgidek (bir rangli) qoladi: ularda --grad = asosiy rang.
   ========================================================================== */
:root { --grad: var(--green); --grad-2: var(--green-2); --grad-v: linear-gradient(180deg, var(--green), var(--green-2)); --rail-grad: var(--rail-bg); --hero-grad: none; }
nav.side { background: var(--rail-grad); }
.btn.green, .btn.primary, .tabs button.on, .seg button.on, .paym button.on, .sq.g, .modes .btn.on, .daychips .on, #toast div:not(.err) { background: var(--grad); background-origin: border-box; }
.btn.green:hover, .btn.primary:hover, .sq.g:hover { background: var(--grad-2); background-origin: border-box; }
.stat.green { background: var(--grad); }
.bars .b i, .rp-bars .b i { background: var(--grad-v); }
.hbar i { background: var(--grad); }
:root[data-grad] .hero { background: var(--hero-grad); }
:root[data-grad] .btn.green, :root[data-grad] .btn.primary, :root[data-grad] .tabs button.on, :root[data-grad] .seg button.on, :root[data-grad] .paym button.on, :root[data-grad] .sq.g, :root[data-grad] .modes .btn.on { border-color: transparent; }
:root[data-grad] .hero .btn.green { background: #f6f6f6; color: var(--green); }

:root[data-accent="okean"] {
  --brand: #3b82f6; --brand-hi: #0891b2; --brand-lo: #1e51c0;
  --rail-bg: #1d4ed8; --rail-on-ink: #1d4ed8; --rail-grad: linear-gradient(185deg, #2563eb 0%, #0891b2 100%);
  --green: #3b82f6; --green-2: #1d4ed8; --green-soft: rgba(59,130,246, .18);
  --grad: linear-gradient(135deg, #2563eb, #0891b2); --grad-2: linear-gradient(135deg, #2057ce, #077f9c); --grad-v: linear-gradient(180deg, #0891b2, #2563eb);
  --hero-grad: radial-gradient(120% 140% at 85% 0%, #0891b2 0%, #2563eb 55%, #1945a4 100%);
  --blue: #3b82f6; --info-bg: rgba(59,130,246, .16); --info-ink: #8cc8ff; --price-ink: #8cc8ff;
  --focus: 0 0 0 3px rgba(59,130,246, .38); --accent-shadow: rgba(59,130,246, .5);
}
:root[data-theme="light"][data-accent="okean"] {
  --rail-bg: #1d4ed8; --rail-on-ink: #1d4ed8;
  --green: #1d4ed8; --green-2: #173fb1; --green-soft: #e0efff;
  --blue: #1d4ed8; --info-bg: #e0efff; --info-ink: #1d4ed8; --price-ink: #1d4ed8;
  --focus: 0 0 0 3px rgba(59,130,246, .24); --accent-shadow: rgba(59,130,246, .4);
}

:root[data-accent="aurora"] {
  --brand: #8b5cf6; --brand-hi: #0891b2; --brand-lo: #652fc2;
  --rail-bg: #6d28d9; --rail-on-ink: #6d28d9; --rail-grad: linear-gradient(185deg, #7c3aed 0%, #0891b2 100%);
  --green: #8b5cf6; --green-2: #6d28d9; --green-soft: rgba(139,92,246, .18);
  --grad: linear-gradient(135deg, #7c3aed, #0891b2); --grad-2: linear-gradient(135deg, #6d33d0, #077f9c); --grad-v: linear-gradient(180deg, #0891b2, #7c3aed);
  --hero-grad: radial-gradient(120% 140% at 85% 0%, #0891b2 0%, #7c3aed 55%, #5628a5 100%);
  --blue: #8b5cf6; --info-bg: rgba(139,92,246, .16); --info-ink: #c4b5fd; --price-ink: #c4b5fd;
  --focus: 0 0 0 3px rgba(139,92,246, .38); --accent-shadow: rgba(139,92,246, .5);
}
:root[data-theme="light"][data-accent="aurora"] {
  --rail-bg: #6d28d9; --rail-on-ink: #6d28d9;
  --green: #6d28d9; --green-2: #5920b1; --green-soft: #efe9fe;
  --blue: #6d28d9; --info-bg: #efe9fe; --info-ink: #6d28d9; --price-ink: #6d28d9;
  --focus: 0 0 0 3px rgba(139,92,246, .24); --accent-shadow: rgba(139,92,246, .4);
}

:root[data-accent="shafaq"] {
  --brand: #f97316; --brand-hi: #db2777; --brand-lo: #bf4809;
  --rail-bg: #c2410c; --rail-on-ink: #c2410c; --rail-grad: linear-gradient(185deg, #ea580c 0%, #db2777 100%);
  --green: #f97316; --green-2: #c2410c; --green-soft: rgba(249,115,22, .18);
  --grad: linear-gradient(135deg, #ea580c, #db2777); --grad-2: linear-gradient(135deg, #cd4d0a, #c02268); --grad-v: linear-gradient(180deg, #db2777, #ea580c);
  --hero-grad: radial-gradient(120% 140% at 85% 0%, #db2777 0%, #ea580c 55%, #a33d08 100%);
  --blue: #f97316; --info-bg: rgba(249,115,22, .16); --info-ink: #fdba74; --price-ink: #fdba74;
  --focus: 0 0 0 3px rgba(249,115,22, .38); --accent-shadow: rgba(249,115,22, .5);
}
:root[data-theme="light"][data-accent="shafaq"] {
  --rail-bg: #c2410c; --rail-on-ink: #c2410c;
  --green: #c2410c; --green-2: #9f3509; --green-soft: #ffedd5;
  --blue: #c2410c; --info-bg: #ffedd5; --info-ink: #c2410c; --price-ink: #c2410c;
  --focus: 0 0 0 3px rgba(249,115,22, .24); --accent-shadow: rgba(249,115,22, .4);
}

:root[data-accent="malina"] {
  --brand: #f43f5e; --brand-hi: #7c3aed; --brand-lo: #b8173b;
  --rail-bg: #be123c; --rail-on-ink: #be123c; --rail-grad: linear-gradient(185deg, #e11d48 0%, #7c3aed 100%);
  --green: #f43f5e; --green-2: #be123c; --green-soft: rgba(244,63,94, .18);
  --grad: linear-gradient(135deg, #e11d48, #7c3aed); --grad-2: linear-gradient(135deg, #c6193f, #6d33d0); --grad-v: linear-gradient(180deg, #7c3aed, #e11d48);
  --hero-grad: radial-gradient(120% 140% at 85% 0%, #7c3aed 0%, #e11d48 55%, #9d1432 100%);
  --blue: #f43f5e; --info-bg: rgba(244,63,94, .16); --info-ink: #fda4b4; --price-ink: #fda4b4;
  --focus: 0 0 0 3px rgba(244,63,94, .38); --accent-shadow: rgba(244,63,94, .5);
}
:root[data-theme="light"][data-accent="malina"] {
  --rail-bg: #be123c; --rail-on-ink: #be123c;
  --green: #be123c; --green-2: #9b0e31; --green-soft: #ffe4ea;
  --blue: #be123c; --info-bg: #ffe4ea; --info-ink: #be123c; --price-ink: #be123c;
  --focus: 0 0 0 3px rgba(244,63,94, .24); --accent-shadow: rgba(244,63,94, .4);
}

:root[data-accent="bahor"] {
  --brand: #10b981; --brand-hi: #0891b2; --brand-lo: #047a56;
  --rail-bg: #047857; --rail-on-ink: #047857; --rail-grad: linear-gradient(185deg, #059669 0%, #0891b2 100%);
  --green: #10b981; --green-2: #047857; --green-soft: rgba(16,185,129, .18);
  --grad: linear-gradient(135deg, #059669, #0891b2); --grad-2: linear-gradient(135deg, #04845c, #077f9c); --grad-v: linear-gradient(180deg, #0891b2, #059669);
  --hero-grad: radial-gradient(120% 140% at 85% 0%, #0891b2 0%, #059669 55%, #036949 100%);
  --blue: #10b981; --info-bg: rgba(16,185,129, .16); --info-ink: #6ee7b7; --price-ink: #6ee7b7;
  --focus: 0 0 0 3px rgba(16,185,129, .38); --accent-shadow: rgba(16,185,129, .5);
}
:root[data-theme="light"][data-accent="bahor"] {
  --rail-bg: #047857; --rail-on-ink: #047857;
  --green: #047857; --green-2: #036247; --green-soft: #d8f6ea;
  --blue: #047857; --info-bg: #d8f6ea; --info-ink: #047857; --price-ink: #047857;
  --focus: 0 0 0 3px rgba(16,185,129, .24); --accent-shadow: rgba(16,185,129, .4);
}

:root[data-accent="kosmos"] {
  --brand: #818cf8; --brand-hi: #c026d3; --brand-lo: #362da5;
  --rail-bg: #4338ca; --rail-on-ink: #4338ca; --rail-grad: linear-gradient(185deg, #4338ca 0%, #c026d3 100%);
  --green: #818cf8; --green-2: #4338ca; --green-soft: rgba(129,140,248, .18);
  --grad: linear-gradient(135deg, #4338ca, #c026d3); --grad-2: linear-gradient(135deg, #3a31b1, #a821b9); --grad-v: linear-gradient(180deg, #c026d3, #4338ca);
  --hero-grad: radial-gradient(120% 140% at 85% 0%, #c026d3 0%, #4338ca 55%, #2e278d 100%);
  --blue: #818cf8; --info-bg: rgba(129,140,248, .16); --info-ink: #c7d2fe; --price-ink: #c7d2fe;
  --focus: 0 0 0 3px rgba(129,140,248, .38); --accent-shadow: rgba(129,140,248, .5);
}
:root[data-theme="light"][data-accent="kosmos"] {
  --rail-bg: #4338ca; --rail-on-ink: #4338ca;
  --green: #4338ca; --green-2: #362da5; --green-soft: #e8e7fd;
  --blue: #4338ca; --info-bg: #e8e7fd; --info-ink: #4338ca; --price-ink: #4338ca;
  --focus: 0 0 0 3px rgba(129,140,248, .24); --accent-shadow: rgba(129,140,248, .4);
}
.acc-h { margin: 14px 0 8px; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

/* ---------- Hisobotlar (2026.10.19-40) ---------- */
:root { --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; }
:root[data-theme="light"] { --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; }
.rp-head { flex-wrap: wrap; gap: 10px; }
.rp-head .rp-act { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.rp-cmp { font-size: .84rem; margin: -6px 0 12px; display: flex; align-items: center; gap: 6px; }
.rp-cmp svg { width: 14px; height: 14px; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.kpi .v { font-size: 1.7rem; }
.dl { display: inline-flex; gap: 3px; align-items: center; font-weight: 700; font-size: .78rem; border-radius: 999px; padding: 1px 8px; }
.dl.up { background: var(--ok-bg); color: var(--ok-ink); }
.dl.down { background: var(--bad-bg); color: var(--bad-ink); }
.dl.eq { background: var(--panel-2); color: var(--muted); }
.stat.green .dl { background: rgba(255, 255, 255, .22); color: #fff; }
.rp-notes { margin-bottom: 16px; }
.rp-notes h3 svg { color: var(--green); }
.rp-notes ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 6px; line-height: 1.5; }
.rp-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; align-items: start; }
.rp-grid2 { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.rp-grid3 { grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }
.rp-ch { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.rp-ch h3 { margin: 0; }
.rp-legend { display: flex; gap: 14px; font-size: .8rem; color: var(--ink-2); }
.rp-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ln { display: inline-block; width: 18px; height: 0; border-top: 2.5px solid var(--green); }
.ln.old { border-top: 2px dashed var(--muted); }
.rp-chart { position: relative; }
.rp-svg { width: 100%; height: auto; display: block; overflow: visible; touch-action: pan-y; }
.rp-svg .gl { stroke: var(--hair); stroke-width: 1; }
.rp-svg .ax { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.rp-svg .ar { fill: var(--green-soft); }
.rp-svg .cur { fill: none; stroke: var(--green); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.rp-svg .old { fill: none; stroke: var(--muted); stroke-width: 2; stroke-dasharray: 5 5; opacity: .8; }
.rp-svg .xh { stroke: var(--line); stroke-width: 1; }
.rp-svg .dot { fill: var(--green); stroke: var(--panel); stroke-width: 2; }
.rp-svg .dot.o { fill: var(--muted); }
.rp-svg .hit { fill: transparent; cursor: crosshair; }
.rp-tip { position: absolute; top: 0; pointer-events: none; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; box-shadow: 0 8px 22px -8px var(--shadow); font-size: .82rem; white-space: nowrap; z-index: 2; }
.rp-tip .sw { display: inline-block; width: 10px; height: 3px; margin-right: 6px; vertical-align: middle; background: var(--green); }
.rp-tip .sw.old { background: var(--muted); }
.rp-stack { display: flex; gap: 2px; height: 14px; border-radius: 999px; overflow: hidden; margin: 6px 0 12px; }
.rp-stack i { display: block; min-width: 4px; }
.s1 { background: var(--s1); } .s2 { background: var(--s2); } .s3 { background: var(--s3); } .s4 { background: var(--s4); }
.rp-pt .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; }
.rp-mini { margin-top: 10px; font-size: .86rem; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rp-mini svg { width: 14px; height: 14px; }
.rp-extra { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: 10px; margin-top: 12px; }
.rp-extra:empty { display: none; }
.rp-extra > div { background: var(--panel-2); border-radius: var(--r); padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; font-size: .8rem; }
.rp-extra b { font-size: 1rem; }
.rp-top { display: flex; flex-direction: column; gap: 10px; }
.rp-ti { display: grid; grid-template-columns: 1.8rem minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.rp-ti .rk { width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--panel-2); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .8rem; color: var(--ink-2); }
.rp-ti:nth-child(-n+3) .rk { background: var(--grad); color: #fff; }
.rp-ti .nm b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.rp-ti .right small, .rp-cl small { display: block; font-size: .74rem; }
.rp-cats { display: flex; flex-direction: column; gap: 10px; }
.rp-cl { display: grid; grid-template-columns: minmax(0, 1fr) auto 3rem; gap: 8px; align-items: baseline; }
.rp-cl span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-cl small { text-align: right; }
.rp-wd { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 18px; }
.rp-wd .b { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; position: relative; }
.rp-wd .b i { display: block; width: 100%; max-width: 38px; border-radius: 4px 4px 0 0; background: color-mix(in srgb, var(--green) 45%, var(--panel-2)); min-height: 2px; }
.rp-wd .b.best i { background: var(--grad-v); }
.rp-wd .b span { font-size: .7rem; color: var(--muted); white-space: nowrap; }
.rp-wd .b em { font-style: normal; font-size: .75rem; color: var(--ink-2); font-weight: 600; }
@media (max-width: 1100px) { .rp-grid, .rp-grid2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) {
  .rp-head .rp-act { margin-left: 0; width: 100%; } .rp-head .rp-act .btn { flex: 1; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpi .v { font-size: 1.2rem; } .dl { font-size: .7rem; white-space: normal; }
  .rp-svg .ax { font-size: 13px; }
}
.dlt { font-size: .74rem; color: var(--muted); }
.stat.green .dlt { color: rgba(255, 255, 255, .8); }
/* ---------- Telegram buyurtmalar ---------- */
.tgo-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 26rem), 1fr)); gap: 14px; }
.tgo.new { box-shadow: inset 4px 0 0 var(--orange); }
.tgo.ready { box-shadow: inset 4px 0 0 var(--green); }
.tgo-h { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tgo-sum { margin-left: auto; font-size: 1.15rem; }
.tgo-c { margin: 8px 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tgo-c svg { width: 15px; height: 15px; }
.tgo-t td { padding: 6px 4px; }
.tgo-bar { display: flex; gap: 10px; align-items: center; padding: 10px 14px; margin-bottom: 10px; background: var(--info-bg); }
.tgo-bar span { flex: 1; }
.nv-badge { position: absolute; top: 0; right: 0; min-width: 16px; height: 16px; box-shadow: 0 0 0 2px var(--rail-bg); border-radius: 999px; background: var(--red); color: #fff; font-size: .7rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
nav.side a { position: relative; }
.cbot { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel-2); }
.cbot-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cbot-h svg { width: 16px; height: 16px; vertical-align: -3px; }
/* ---------- do'kon / sklad ---------- */
.loc-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.loc-bar .muted { font-size: .84rem; }
.loc-seg button { height: 38px; padding: 0 16px; font-size: .95rem; }
.loc-seg button svg { width: 16px; height: 16px; }
.loc-note { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; border-radius: var(--r); margin-bottom: 10px; background: var(--info-bg); color: var(--ink); }
.loc-note.sklad { background: var(--warn-bg); }
.loc-note svg { width: 16px; height: 16px; }
.loc-note .muted { font-size: .8rem; }
.tag.loc.sklad { background: var(--warn-bg); color: var(--warn-ink); }
.kv.other span, .kv.other b { color: var(--muted); }
.kv.other svg { width: 13px; height: 13px; vertical-align: -2px; }
tr.tr-bad td { background: var(--bad-bg); }
.sk-auto { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.sk-auto svg { width: 14px; height: 14px; vertical-align: -2px; }
.sk-t input.oq { width: 78px; text-align: right; padding: 6px 8px; display: inline-block; }
.sk-t td:last-child { white-space: nowrap; }
.sk-t .sk-m { display: none; }
@media (max-width: 640px) {
  .sk-t .sk-h { display: none; }
  .sk-t .sk-m { display: block; font-size: .76rem; margin-top: 2px; }
  .sk-t .sk-m svg { width: 12px; height: 12px; vertical-align: -1px; }
  .sk-t input.oq { width: 58px; }
  .sk-t td, .sk-t th { padding-left: 5px; padding-right: 5px; }
  .sk-t th:first-child { width: 26px !important; }
}
/* ---- mahsulot rasmlari ---- */
img.pth { display: block; object-fit: contain; background: #fff; border-radius: 10px; border: 1px solid var(--line); cursor: zoom-in; }
img.pth.fl { float: left; margin: 0 10px 0 0; }
img.pth.xs { width: 30px; height: 30px; border-radius: 7px; margin-right: 8px; cursor: default; }
img.pth.sm { width: 38px; height: 38px; border-radius: 8px; flex: none; }
img.pth.md { width: 52px; height: 52px; }
img.pth.pc { width: 100%; height: 150px; margin-bottom: 10px; }
.suggest > div:has(img.pth) { display: flex; align-items: center; gap: 10px; }
.ci .n img.pth.xs { display: inline-block; vertical-align: middle; float: none; }
.citem .cimg { margin: -2px -2px 10px; }
.citem .cimg img.pth { width: 100%; height: 160px; }
.pzoom { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto; border-radius: 12px; background: #fff; }
.pimg-ed { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.pimg-box { flex: none; width: 112px; height: 112px; border-radius: 14px; border: 1px dashed var(--line); background: var(--soft, #f4f6fa); display: grid; place-items: center; overflow: hidden; }
.pimg-box img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.pimg-box span { display: grid; justify-items: center; gap: 4px; color: var(--muted); font-size: .76rem; }
.pimg-box svg { width: 28px; height: 28px; }
.pimg-tools { flex: 1; min-width: 0; }
@media (max-width: 640px) { .pimg-ed { flex-direction: column; } .pimg-box { width: 100%; height: 160px; } img.pth.pc { height: 120px; } }
.tile .tl-img { display: block; width: 100%; height: 64px; object-fit: contain; background: #fff; border-radius: 8px; margin-bottom: 6px; }
.btn .dev-spin.sm { display: inline-block; width: 16px; height: 16px; margin: 0 6px 0 0; vertical-align: -3px; border-width: 2px; border-color: rgba(255,255,255,.4); border-top-color: #fff; }
