/* IQ PoS — interfeys uslublari */
[hidden] { display: none !important; }
:root {
  --bg: #f4f3ef;
  --panel: #ffffff;
  --panel-2: #faf9f6;
  --ink: #1b2230;
  --ink-2: #4a5263;
  --muted: #8a909c;
  --line: #e6e3dc;
  --line-2: #efede8;
  --brand: #24406b;
  --brand-2: #2f5590;
  --brand-soft: #e7edf6;
  --accent: #e0a12f;
  --accent-soft: #fbf1dc;
  --ok: #217a4b;
  --ok-soft: #e3f3ea;
  --warn: #a3620a;
  --warn-soft: #fdf0d9;
  --bad: #b3261e;
  --bad-soft: #fbe6e4;
  --side: #17243a;
  --side-ink: #c6cfdd;
  --side-hover: #22324d;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(20, 28, 45, .05), 0 1px 1px rgba(20, 28, 45, .03);
  --shadow-lg: 0 18px 50px rgba(20, 28, 45, .22);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand-2); }
.ic { flex: none; display: block; }
.num, td.n, th.n { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.grow { flex: 1; }
.lead { font-size: 15px; color: var(--ink-2); margin: 0; }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; }

/* ---------- Kirish ekrani ---------- */
.auth { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 480px); }
.auth-art { background: var(--side); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; border: 60px solid rgba(224, 161, 47, .13); }
.auth-art h1 { font-size: 40px; line-height: 1.1; margin: 0 0 14px; letter-spacing: -.02em; max-width: 12ch; }
.auth-art p { color: var(--side-ink); max-width: 40ch; margin: 0; font-size: 15px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.logo-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: var(--side); display: grid; place-items: center; font-weight: 900; font-size: 14px; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 32px; background: var(--panel); }
.auth-form form { width: 100%; max-width: 360px; }
.auth-form h2 { margin: 0 0 6px; font-size: 24px; letter-spacing: -.01em; }
.auth-form .lead { margin-bottom: 24px; }
.auth-form .btn { width: 100%; justify-content: center; height: 44px; margin-top: 8px; }
@media (max-width: 820px) { .auth { grid-template-columns: 1fr; } .auth-art { display: none; } }

/* ---------- Asosiy tuzilma ---------- */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100%; }
.side { background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .logo { color: #fff; padding: 18px 18px 14px; }
.nav { padding: 4px 10px 16px; flex: 1; }
.nav-group { margin-top: 14px; }
.nav-title { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #7d8aa1; padding: 0 10px 6px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 8px; color: var(--side-ink); text-decoration: none; font-size: 13.5px; }
.nav a:hover { background: var(--side-hover); color: #fff; }
.nav a.on { background: var(--brand-2); color: #fff; }
.nav a .badge { margin-left: auto; }
.side-foot { padding: 12px; border-top: 1px solid rgba(255, 255, 255, .07); }
.me { display: flex; align-items: center; gap: 8px; padding: 6px 4px 6px 6px; border-radius: 8px; }
.me-info { flex: 1; min-width: 0; }
.me-acts { display: flex; gap: 2px; flex: none; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--side); display: grid; place-items: center; font-weight: 800; flex: none; }
.me-name { color: #fff; font-weight: 600; font-size: 13px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-role { font-size: 11.5px; color: #8796ae; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .icon-btn { color: var(--side-ink); width: 30px; height: 30px; flex: none; }
.me .icon-btn:hover { background: var(--side-hover); color: #fff; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 60px; display: flex; align-items: center; gap: 14px; padding: 0 24px; background: var(--bg); position: sticky; top: 0; z-index: 5; border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 19px; margin: 0; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .menu-btn { display: none; }
.branch-pick { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 0 6px 0 12px; height: 36px; }
.branch-pick select { border: 0; background: transparent; outline: none; padding: 0 4px; font-weight: 600; max-width: 220px; }
.view { padding: 22px 24px 40px; min-width: 0; }
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 30; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: var(--shadow-lg); }
  .topbar .menu-btn { display: inline-grid; }
  .topbar { padding: 0 14px; }
  .view { padding: 16px 14px 40px; }
  .branch-pick select { max-width: 130px; }
  .topbar h1 { font-size: 16px; }
  .filters .field, .filters .field.wide { width: calc(50% - 5px); }
  .search-box { flex: 1 1 100%; }
  .scrim { position: fixed; inset: 0; background: rgba(10, 16, 28, .4); z-index: 25; }
}
/* Telefonda prixod tovarlari — kartochka ko‘rinishida */
@media (max-width: 600px) {
  .pitems thead { display: none; }
  .pitems, .pitems tbody, .pitems tfoot { display: block; width: 100%; }
  .pitems tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 36px; gap: 8px 10px; padding: 10px 2px; border-bottom: 1px solid var(--line-2); align-items: end; }
  .pitems td { padding: 0; border: 0 !important; min-width: 0; }
  .pitems td:first-child { grid-column: 1 / 3; }
  .pitems td.actions { grid-column: 3; grid-row: 1; width: auto; }
  .pitems tbody td:nth-child(2), .pitems tbody td:nth-child(4) { grid-column: 1; }
  .pitems tbody td:nth-child(3), .pitems tbody td:nth-child(5)[data-l] { grid-column: 2 / 4; }
  .pitems td[data-l]::before { content: attr(data-l); display: block; font-size: 12px; color: var(--muted); margin-bottom: 3px; }
  .pitems td .cell { width: 100% !important; max-width: none; }
  .pitems tbody td.n { grid-column: 1 / -1; text-align: right; }
  .pitems td[colspan] { grid-column: 1 / -1; }
  .pitems tfoot td:empty { display: none; }
  .pitems tfoot tr { display: flex; justify-content: space-between; font-weight: 700; }
}
/* Telefonda mijozlar jadvali: nomi, telefon, qarz */
@media (max-width: 600px) { .ctab th:nth-child(3), .ctab td:nth-child(3), .ctab th:nth-child(4), .ctab td:nth-child(4), .ctab th:nth-child(5), .ctab td:nth-child(5) { display: none; } }
/* Telefon: sarlavha sig‘ishi uchun til va ombor tanlovi ixcham */
@media (max-width: 560px) {
  .topbar { gap: 8px; padding: 0 10px; }
  .topbar h1 { flex: 1 1 auto; min-width: 0; }
  .topbar .grow { display: none; }
  .topbar .lang-sel { width: 54px; padding: 0 4px; flex: none; }
  .branch-pick { padding: 0 2px 0 8px; gap: 2px; flex: none; }
  .branch-pick select { max-width: 96px; }
}

/* ---------- Komponentlar ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; font-size: 15px; }
.card-body { padding: 16px; }
.toolbar { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .grow { min-width: 10px; }

.btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--panel); cursor: pointer; font-weight: 600; white-space: nowrap; text-decoration: none; color: var(--ink); }
.btn:hover { background: var(--panel-2); border-color: #d6d2c8; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #1d1606; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: rgba(0, 0, 0, .04); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.lg { height: 48px; padding: 0 22px; font-size: 16px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.busy { position: relative; color: transparent !important; }
.btn.busy::after { content: ""; position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .6); border-top-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn:not(.primary):not(.danger).busy::after { border-color: var(--brand); border-top-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 0; background: transparent; cursor: pointer; color: var(--ink-2); }
.icon-btn:hover { background: rgba(0, 0, 0, .05); color: var(--ink); }
.icon-btn.danger:hover { background: var(--bad-soft); color: var(--bad); }

.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span, .label { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.field > span b { color: var(--bad); }
.input, .field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea, select.input {
  height: 38px; width: 100%; border: 1px solid #d9d5cc; border-radius: var(--radius-sm); background: #fff; padding: 0 11px; outline: none; transition: border-color .12s, box-shadow .12s;
}
.field textarea { height: auto; min-height: 72px; padding: 9px 11px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(47, 85, 144, .15); }
.field input[readonly] { background: var(--panel-2); color: var(--ink-2); }
.field .hint { font-size: 11.5px; color: var(--muted); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.filters .field { width: 170px; }
.filters .field.wide { width: 260px; }
.search-box { position: relative; min-width: 220px; flex: 0 1 300px; }
.search-box .ic { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-box input { padding-left: 34px !important; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.span-all { grid-column: 1 / -1; }
@media (max-width: 720px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } .span2 { grid-column: auto; } }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }
.seg { display: inline-flex; background: var(--line-2); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 7px; cursor: pointer; font-weight: 600; color: var(--ink-2); }
.seg button.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 10px; font-weight: 700; }

/* Jadvallar */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; }
.t th { text-align: left; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--panel-2); position: sticky; top: 0; }
.t td { padding: 10px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.t tbody tr:last-child td { border-bottom: 0; }
.t tbody tr.click { cursor: pointer; }
.t tbody tr.click:hover td { background: #fbfaf7; }
.t tfoot td { font-weight: 700; border-top: 1px solid var(--line); background: var(--panel-2); }
.t .name { font-weight: 600; }
.sub { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.t td.actions { white-space: nowrap; text-align: right; width: 1%; }
.t input.cell { height: 32px; width: 110px; border: 1px solid #d9d5cc; border-radius: 6px; padding: 0 8px; text-align: right; }
.t select.cell { height: 32px; border: 1px solid #d9d5cc; border-radius: 6px; padding: 0 6px; max-width: 220px; }
.empty { text-align: center; color: var(--muted); padding: 36px 12px; }
.empty-row td { border: 0 !important; }
.pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line-2); }
.pager .muted { font-size: 12.5px; }
.pg-nums { display: inline-flex; align-items: center; gap: 4px; justify-self: center; flex-wrap: wrap; justify-content: center; }
@media (max-width: 600px) { .pager { grid-template-columns: 1fr; justify-items: center; } .pager > span:last-child { display: none; } }
.pg { min-width: 32px; height: 32px; border: 1px solid var(--line); background: var(--panel); border-radius: 7px; cursor: pointer; display: inline-grid; place-items: center; }
.pg.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.pg:disabled { opacity: .4; cursor: default; }
.pg.flip .ic { transform: rotate(180deg); }
.pg-gap { padding: 0 4px; color: var(--muted); }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--brand-soft); color: var(--brand-2); }
.pos-num { color: var(--ok); }
.neg-num { color: var(--bad); }

/* Statistik plitkalar */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); text-align: left; }
button.stat { cursor: pointer; font: inherit; color: inherit; }
button.stat.on { border-color: var(--brand-2); box-shadow: 0 0 0 2px rgba(47, 85, 144, .18); }
.stat-label { font-size: 12px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.stat-value { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 12px; margin-top: 2px; }
.stat.alert { border-color: #f0c9c5; background: #fffafa; }
.stat.alert .stat-value { color: var(--bad); }

/* Grafik */
.chart { width: 100%; height: auto; display: block; max-height: 300px; }
.chart .bar { fill: var(--brand-2); }
.chart .bar:hover { fill: var(--accent); }
.chart .grid-l { stroke: var(--line-2); }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.dash { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 1100px) { .dash { grid-template-columns: 1fr; } }
.list-row { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line-2); }
.list-row:last-child { border-bottom: 0; }
.rank { width: 22px; height: 22px; border-radius: 6px; background: var(--line-2); display: grid; place-items: center; font-size: 11px; font-weight: 800; color: var(--ink-2); flex: none; }
.alert-line { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); text-decoration: none; color: var(--ink); }
.alert-line:hover { background: var(--panel-2); }
.alert-line:last-child { border-bottom: 0; }

/* Modal */
.modal-back { position: fixed; inset: 0; background: rgba(12, 18, 30, .45); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; overflow-y: auto; animation: fade .12s; }
.modal { background: var(--panel); border-radius: 14px; box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; animation: pop .14s; }
.modal.sm { max-width: 420px; } .modal.lg { max-width: 860px; } .modal.xl { max-width: 1180px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.modal-head h2 { margin: 0; font-size: 17px; flex: 1; }
.modal-body { padding: 18px 20px; }
.modal-foot { z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line-2); background: var(--panel-2); border-radius: 0 0 14px 14px; position: sticky; bottom: 0; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(8px) scale(.99); opacity: 0; } }

/* Xabarlar */
#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; align-items: center; gap: 9px; background: var(--ink); color: #fff; padding: 11px 14px; border-radius: 10px; box-shadow: var(--shadow-lg); max-width: 420px; animation: pop .15s; transition: opacity .3s, transform .3s; }
.toast.ok .ic { color: #7ee2a8; }
.toast.err { background: var(--bad); }
.toast.out { opacity: 0; transform: translateY(6px); }

/* Avtoto‘ldirish */
.picker { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); z-index: 20; max-height: 340px; overflow-y: auto; display: none; }
.picker.open { display: block; }
.pick { display: flex; flex-direction: column; align-items: flex-start; width: 100%; text-align: left; border: 0; background: transparent; padding: 9px 12px; cursor: pointer; border-bottom: 1px solid var(--line-2); }
.pick:last-child { border-bottom: 0; }
.pick.on, .pick:hover { background: var(--brand-soft); }
.pick-name { font-weight: 600; }
.pick-meta { font-size: 12px; color: var(--muted); }

/* ---------- Kassa ---------- */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .pos { grid-template-columns: minmax(0, 1fr); } .pay { position: static; } }
.pos > * { min-width: 0; }
.scan { position: relative; }
.scan input { height: 54px !important; font-size: 17px; padding-left: 48px !important; border-radius: 12px !important; border-width: 2px !important; }
.scan > .ic { position: absolute; left: 16px; top: 18px; color: var(--brand-2); }
.scan-hint { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: 8px 2px 14px; }
kbd { font: 600 11px var(--font); background: var(--panel); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px; color: var(--ink-2); }
.cart td { padding: 8px 10px; }
.cart .qty { display: inline-flex; align-items: center; border: 1px solid #d9d5cc; border-radius: 8px; overflow: hidden; }
.cart .qty button { border: 0; background: var(--panel-2); width: 30px; height: 32px; cursor: pointer; display: grid; place-items: center; }
.cart .qty input { width: 64px; height: 32px; border: 0; text-align: center; outline: none; font-weight: 700; }
.cart .line-total { font-weight: 700; }
.cart-empty { padding: 60px 20px; text-align: center; color: var(--muted); }
.cart-empty .ic { margin: 0 auto 12px; color: #c9c4b8; }
.pay { position: sticky; top: 76px; }
.pay .card-body { display: flex; flex-direction: column; gap: 12px; }
.total-box { background: var(--side); color: #fff; border-radius: 12px; padding: 16px 18px; }
.total-box .label { color: #9aa8bf; }
.total-box .big { font-size: 34px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; margin-top: 2px; }
.total-lines { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.total-lines div { display: flex; justify-content: space-between; }
.pay-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pay-methods button { height: 54px; border: 1px solid var(--line); background: var(--panel); border-radius: 10px; cursor: pointer; font-weight: 700; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 13px; }
.pay-methods button.on { border-color: var(--brand-2); background: var(--brand-soft); color: var(--brand); box-shadow: 0 0 0 2px rgba(47, 85, 144, .15); }
.pay-row { display: grid; grid-template-columns: 70px minmax(0, 1fr); align-items: center; gap: 8px; }
.pay-row input { text-align: right; font-weight: 700; }
.change { display: flex; justify-content: space-between; align-items: center; background: var(--ok-soft); color: var(--ok); border-radius: 8px; padding: 9px 12px; font-weight: 700; }
.change.short { background: var(--bad-soft); color: var(--bad); }
.cust-chip { display: flex; align-items: center; gap: 10px; border: 1px dashed #cfc9bd; border-radius: 10px; padding: 9px 12px; }
.cust-chip.set { border-style: solid; background: var(--panel-2); }
.held { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.held button { border: 1px solid var(--line); background: var(--accent-soft); border-radius: 999px; padding: 5px 12px; cursor: pointer; font-size: 12.5px; font-weight: 600; }

/* Chek (ekranda) */
.receipt { font: 13px/1.4 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; max-width: 320px; margin: 0 auto; color: #111; }
.receipt h3 { text-align: center; margin: 0 0 2px; font-size: 15px; }
.receipt .c { text-align: center; }
.receipt hr { border: 0; border-top: 1px dashed #999; margin: 8px 0; }
.receipt .row { display: flex; justify-content: space-between; gap: 8px; }
.receipt .big { font-size: 18px; font-weight: 800; }
.receipt .it { margin: 4px 0; }

/* Chop etish: faqat #print-area */
#print-area { display: none; }
@media print {
  @page { margin: 4mm; }
  body * { visibility: hidden; }
  #print-area, #print-area * { visibility: visible; }
  #print-area { display: block; position: absolute; left: 0; top: 0; width: 72mm; }
  #print-area.a4 { width: 100%; }
  .receipt { max-width: none; font-size: 11.5px; }
  #print-area.a4 .doc-print { font-size: 12px; }
  #print-area.a4 .doc-print th, #print-area.a4 .doc-print td { font-size: 12px; }
  .doc-print th, .doc-print td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.doc-print { font: 14px/1.45 Arial, sans-serif; color: #111; }
.doc-print h2 { font-size: 24px; margin: 0 0 4px; letter-spacing: -.01em; }
.doc-print table { width: 100%; border-collapse: collapse; margin-top: 4px; }
.doc-print th, .doc-print td { border: 1px solid #ccc; padding: 6px 8px; text-align: left; font-size: 13px; }
.doc-print td:nth-last-child(-n+4), .doc-print th:nth-last-child(-n+4) { white-space: nowrap; }
.doc-print th { font-weight: 700; }
.doc-print tfoot td { font-weight: 700; }

/* Yorliqlar */
.labels-sheet { display: flex; flex-wrap: wrap; gap: 2mm; }
.label-card { width: 58mm; height: 40mm; border: 1px solid #bbb; padding: 3mm; display: flex; flex-direction: column; justify-content: space-between; font: 10px Arial, sans-serif; color: #000; page-break-inside: avoid; overflow: hidden; }
.label-card .ln { font-weight: 700; font-size: 11px; line-height: 1.2; max-height: 2.4em; overflow: hidden; }
.label-card .lp { font-size: 20px; font-weight: 900; }
.label-card svg { width: 100%; height: 12mm; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--ink-2); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.on { color: var(--brand); border-bottom-color: var(--brand); }
.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 6px 14px; font-size: 13.5px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 600; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--line-2); border-radius: 999px; padding: 3px 4px 3px 10px; font-size: 12.5px; font-weight: 600; }
.chip button { border: 0; background: transparent; cursor: pointer; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); }
.chip button:hover { background: rgba(0, 0, 0, .08); }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.perm-grid .check { border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; }
.loading { padding: 60px; text-align: center; color: var(--muted); }
.note { background: var(--accent-soft); border: 1px solid #f0dcae; border-radius: 9px; padding: 10px 12px; font-size: 13px; color: #6a4a0c; }
.note.info { background: var(--brand-soft); border-color: #cfdcee; color: var(--brand); }

a .ic, .btn .ic { display: inline-block; }
a > .ic { vertical-align: -3px; margin-right: 3px; }
.cart td:nth-child(5) { white-space: nowrap; }
.cart td:first-child { min-width: 200px; }
@media (max-width: 600px) {
  .cart th:nth-child(2), .cart td:nth-child(2), .cart th:nth-child(3), .cart td:nth-child(3) { display: none; }
  .total-box .big { font-size: 28px; }
  /* Telefonda chek qatori — kartochka: nomi / narx + miqdor / summa */
  .cart thead { display: none; }
  .cart, .cart tbody { display: block; width: 100%; }
  .cart tr { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
  .cart td { padding: 0; border: 0 !important; }
  .cart td:first-child { min-width: 0; grid-column: 1 / 3; grid-row: 1; }
  .cart td.actions { grid-column: 3; grid-row: 1; justify-self: end; width: auto; }
  .cart td:nth-child(4) { grid-column: 1; grid-row: 2; text-align: left; }
  .cart td:nth-child(4) .cell { width: 100%; max-width: 120px; }
  .cart td:nth-child(5) { grid-column: 2 / 4; grid-row: 2; justify-self: end; }
  .cart td:nth-child(6) { grid-column: 1 / 3; grid-row: 3; text-align: left; }
  .cart td.line-total { grid-column: 3; grid-row: 3; text-align: right; font-size: 15px; }
  .cart td[colspan] { grid-column: 1 / -1; grid-row: auto; }
}
@media (min-width: 1101px) { .pos { grid-template-columns: minmax(0, 1fr) 340px; } }

/* ---------- Sozlamalar ---------- */
.set-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; align-items: start; max-width: 1180px; }
.set-nav { position: sticky; top: 76px; padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.set-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 13.5px; }
.set-nav a:hover { background: var(--panel-2); color: var(--ink); }
.set-nav a.on { background: var(--brand-soft); color: var(--brand); }
.set-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.set-card { scroll-margin-top: 76px; }
.card + .card.set-card, .set-card + .set-card { margin-top: 0; }
.set-head { padding: 18px 22px 0; }
.set-head h2 { margin: 0; font-size: 17px; letter-spacing: -.01em; }
.set-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.set-body { padding: 16px 22px 20px; }
.set-foot { display: flex; padding: 12px 22px; border-top: 1px solid var(--line-2); background: var(--panel-2); border-radius: 0 0 var(--radius) var(--radius); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.switch-row + .switch-row { margin-top: 8px; }
.switch-row > span:first-child { display: flex; flex-direction: column; gap: 2px; }
.switch-row small, .set-line small { color: var(--muted); font-size: 12.5px; font-weight: 400; }
.switch { position: relative; flex: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch i { display: block; width: 42px; height: 24px; border-radius: 99px; background: #cfcac0; transition: background .15s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + i { background: var(--brand-2); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 2px solid var(--brand-2); outline-offset: 2px; }
.set-line { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.set-line:first-child { padding-top: 0; } .set-line:last-child { border-bottom: 0; padding-bottom: 0; }
.set-line > div { display: flex; flex-direction: column; gap: 2px; }
.rules { margin-top: 16px; display: grid; gap: 8px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px; font-size: 13.5px; }
.rules div { display: flex; align-items: center; gap: 8px; } .rules .ic { color: var(--ok); }
.about-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.about-grid div { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; }
.about-grid span { font-size: 12px; color: var(--muted); } .about-grid b { font-size: 20px; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .set-layout { grid-template-columns: 1fr; } .set-nav { position: static; flex-direction: row; overflow-x: auto; } .set-nav a span { white-space: nowrap; } .set-line { flex-direction: column; align-items: flex-start; } }
.inv-req { font-size: 12px; color: #444; line-height: 1.5; }

.lang-sel { height: 36px; border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 0 10px; font-weight: 600; cursor: pointer; }
.auth-lang { position: absolute; top: 18px; right: 22px; }
.auth-form { position: relative; }
@media (max-width: 960px) { .topbar .lang-sel { max-width: 92px; padding: 0 6px; } }

/* ---------- Telegram orqali tasdiqlash ---------- */
.tg-badge { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 14px; }
.tg-steps, .tg-howto { margin: 0 0 16px; padding-left: 20px; color: var(--ink-2); display: grid; gap: 6px; font-size: 14px; }
.tg-howto { margin: 8px 0 4px; font-size: 13.5px; }
.tg-howto code, .note code { background: var(--line-2); padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
.btn.tg-btn { background: #229ed9; border-color: #229ed9; color: #fff; }
.btn.tg-btn:hover { background: #1b8cc2; border-color: #1b8cc2; }
.auth-form .btn.tg-btn { width: 100%; justify-content: center; }
.code-input { font-size: 26px !important; letter-spacing: .45em; text-align: center; font-variant-numeric: tabular-nums; padding: 10px 12px !important; }
.code-input::placeholder { color: var(--line); }
.code-links { display: flex; justify-content: space-between; margin-top: 12px; }
.link-btn { background: none; border: 0; padding: 4px 0; color: var(--brand-2); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.link-btn:hover { text-decoration: underline; }
.tg-step { display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.tg-step:first-child { padding-top: 0; }
.tg-num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--line-2); color: var(--ink-2); }
.tg-step.done .tg-num { background: var(--ok-soft); color: var(--ok); }
.tg-step-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tg-step-body small { color: var(--muted); font-size: 12.5px; }
.tg-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.tg-row input { flex: 1 1 260px; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.seg button[disabled] { opacity: .45; cursor: not-allowed; }
.ok-text { color: var(--ok); font-weight: 600; } .bad-text { color: var(--bad); font-weight: 600; }
.tg-step-body .seg { align-self: flex-start; flex-wrap: wrap; }

/* ---------- Tovar rasmi ---------- */
.pimg-row { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line-2); }
.pimg { width: 96px; height: 96px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); overflow: hidden; flex: none; }
.pimg img { width: 100%; height: 100%; object-fit: cover; }
.pimg-row label.btn { cursor: pointer; }
.pimg-row > div:last-child { min-width: 0; flex: 1; }
.pimg-row .btn { margin: 0 6px 6px 0; }
fieldset { min-width: 0; }
.pcell { display: flex; align-items: center; gap: 10px; }
.pthumb { width: 34px; height: 34px; border-radius: 7px; object-fit: cover; background: var(--line-2); flex: none; display: inline-block; }
.nav-badge { margin-left: auto; background: var(--accent); color: var(--side); font-size: 11.5px; font-weight: 800; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; }
.seg .cnt { font-weight: 800; color: var(--accent); }
.order-banner { display: flex; align-items: center; gap: 10px; background: var(--brand-soft); color: var(--brand); border: 1px solid #cfdcee; border-radius: 10px; padding: 9px 12px; margin-bottom: 10px; font-size: 13.5px; }
.shopbot { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); margin-bottom: 14px; }
.shopbot > div:first-child { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.shopbot small { color: var(--muted); font-size: 12.5px; }

/* ---------- Kamera bilan skanerlash ---------- */
.cam-btn { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 36px; height: 32px; border: 0; border-radius: 8px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; cursor: pointer; z-index: 2; }
.cam-btn:active { transform: translateY(-50%) scale(.94); }
.cam { position: fixed; inset: 0; z-index: 1000; background: #000; color: #fff; display: flex; flex-direction: column; }
.cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam-top { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 12px 10px; background: linear-gradient(rgba(0,0,0,.6), transparent); }
.cam-title { flex: 1; font-weight: 600; font-size: 15px; }
.cam-x, .cam-torch { width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(255,255,255,.18); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.cam-torch { font-size: 18px; } .cam-torch.on { background: #f5c542; }
.cam-frame { position: relative; z-index: 1; flex: 1; display: grid; place-items: center; pointer-events: none; }
.cam-frame i { width: min(80vw, 420px); height: min(34vw, 180px); border-radius: 14px; box-shadow: 0 0 0 100vmax rgba(0,0,0,.45); border: 2px solid rgba(255,255,255,.85); transition: border-color .15s; }
.cam.flash-ok .cam-frame i { border-color: #3ddc84; } .cam.flash-bad .cam-frame i { border-color: #ff5a52; }
.cam-bottom { position: relative; z-index: 2; padding: 12px 14px calc(16px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0,0,0,.75)); min-height: 120px; }
.cam-hint { text-align: center; color: #ddd; font-size: 14px; margin-bottom: 8px; }
.cam-log { display: grid; gap: 6px; }
.cam-row { background: rgba(255,255,255,.14); border-radius: 10px; padding: 9px 12px; font-size: 14.5px; font-weight: 600; animation: fade .25s; }
.cam-row.ok { background: rgba(61,220,132,.25); } .cam-row.bad { background: rgba(255,90,82,.3); }
#toasts { z-index: 1100 !important; }

/* ---------- Qo‘llanma videolari ---------- */
.hv-grid { display: grid; gap: 16px; align-items: start; }
#hsec button { display: inline-flex; align-items: center; gap: 6px; }
.hv-grid.pc { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
.hv-grid.phone { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.hv { overflow: hidden; display: flex; flex-direction: column; }
.hv video { width: 100%; display: block; background: #0f172a; aspect-ratio: 16 / 9; }
.hv-grid.phone video { aspect-ratio: 9 / 18; max-height: 72vh; }
.hv-foot { display: flex; align-items: center; gap: 8px; padding: 12px 14px; }
.hv-title { flex: 1; min-width: 0; font-weight: 600; line-height: 1.35; }
.hv-act { display: flex; gap: 2px; }
.hv-up { padding: 10px 14px; margin-bottom: 14px; display: grid; gap: 8px; }
.hv-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 120px 110px; gap: 10px; align-items: center; font-size: 14px; }
.hv-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hv-bar { height: 6px; background: var(--line-2); border-radius: 9px; overflow: hidden; }
.hv-bar i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s; }
.hv-st { text-align: right; }
@media (max-width: 600px) {
  .hv-grid.pc, .hv-grid.phone { grid-template-columns: 1fr; }
  .hv-row { grid-template-columns: minmax(0, 1fr) 80px; }
  .hv-row .hv-bar { grid-column: 1 / -1; grid-row: 2; }
}

/* Telegram do‘kon: kategoriyalarni belgilash */
.shopcats { border: 1px solid var(--line); border-radius: 10px; max-height: 360px; overflow: auto; padding: 4px 0; background: var(--panel); }
.shopcat { display: flex; align-items: center; gap: 10px; padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--line-2); }
.shopcat:last-child { border-bottom: 0; }
.shopcat input { width: 18px; height: 18px; flex: none; accent-color: var(--brand); }
.shopcat-name { flex: 1; min-width: 0; font-weight: 600; }
.shopcat.off .shopcat-name { color: var(--muted); text-decoration: line-through; }
.shopcat-note { padding: 8px 12px; }

/* ---------- ABC / XYZ ---------- */
.abc-help { margin-bottom: 14px; }
.abc-help summary { cursor: pointer; padding: 12px 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; list-style: none; }
.abc-help summary::-webkit-details-marker { display: none; }
.abc-help-body { padding: 0 16px 14px; color: var(--ink-2, inherit); }
.abc-help-body p { margin: 6px 0; line-height: 1.5; }
.abc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 420px); gap: 14px; align-items: start; margin-bottom: 14px; }
.abc-classes { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.abc-classes .stat { text-align: left; cursor: pointer; font: inherit; }
.abc-classes .stat.on { outline: 2px solid var(--brand); }
.abc-badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 6px; font-size: 12px; font-weight: 800; margin-right: 3px; color: #fff; }
.abc-badge.A { background: #1f7a4d; } .abc-badge.B { background: #c58a12; } .abc-badge.C { background: #9aa1ab; }
.abc-badge.X { background: #2b5ea7; } .abc-badge.Y { background: #7b5cc4; } .abc-badge.Z { background: #c2455c; }
.abc-matrix { padding: 12px; margin: 0; }
.abc-matrix table { width: 100%; border-collapse: separate; border-spacing: 6px; }
.abc-matrix th { font-weight: 600; text-align: center; }
.abc-cell { width: 100%; border: 0; border-radius: 10px; padding: 10px 4px; cursor: pointer; display: grid; gap: 2px; font: inherit; color: #1b2433; }
.abc-cell b { font-size: 20px; } .abc-cell span { font-size: 12px; opacity: .8; }
.abc-cell.on { outline: 3px solid var(--brand); outline-offset: 1px; }
.c-AX { background: #bfe6cf; } .c-AY { background: #d6eedf; } .c-AZ { background: #f3e1c4; }
.c-BX { background: #d6eedf; } .c-BY { background: #eef3e6; } .c-BZ { background: #f6e8d4; }
.c-CX { background: #eef0f2; } .c-CY { background: #f4ece4; } .c-CZ { background: #f6d9dc; }
@media (max-width: 900px) { .abc-grid { grid-template-columns: 1fr; } }

/* Qator chegirmasi (so‘m / %) va "Hamma tovarga N%" */
.cart .ldisc { display: inline-flex; align-items: stretch; border: 1px solid #d9d5cc; border-radius: 8px; overflow: hidden; background: var(--panel); }
.cart .ldisc .cell { width: 54px; border: 0; border-radius: 0; text-align: right; }
.cart .ldisc .dm { border: 0; border-left: 1px solid #d9d5cc; background: var(--panel-2); min-width: 34px; padding: 0 6px; font-weight: 700; font-size: 12px; cursor: pointer; color: var(--ink-2); }
.cart .ldisc .dm.pct { background: #fdecd8; color: #a5520d; }
.cart td .sub { display: block; }
.cart td.n .sub { font-size: 12px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.cart .line-total s.old { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.cart td.line-total .sub s { color: var(--muted); }
.allpct { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px dashed var(--line); border-radius: 10px; }
.allpct .lbl { flex: 1; font-weight: 600; font-size: 13.5px; }
.allpct .input { width: 64px; text-align: right; font-weight: 700; padding: 6px 8px; }
.allpct .pc { font-weight: 700; color: var(--ink-2); }
.allpct.on { border: 1px solid #f0a35c; background: #fff4e8; }
.allpct.on .lbl { color: #a5520d; }
/* Chek va nakladnoyda eski narx */
.receipt s, .doc-print s { color: #666; }
.doc-print .np { display: block; font-weight: 700; }
.cart input.cell[data-f="price"] { width: 86px; }
@media (min-width: 761px) { .cart td { padding: 8px 7px; } .cart td:first-child { padding-left: 12px; } }
/* Nakladnoy imzolari */
.doc-print table.sign-block { width: 100%; margin-top: 34px; border: 0; border-collapse: collapse; }
.doc-print table.sign-block td { border: 0 !important; padding: 0 0 18px; width: 50%; vertical-align: bottom; background: none !important; font-size: 13px; }
.doc-print table.sign-block .line { display: inline-block; width: 190px; border-bottom: 1px solid #000; margin-left: 4px; }
.drv-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.drv-row { display: flex; align-items: center; gap: 10px; }
.drv-row .num { width: 78px; font-weight: 600; color: var(--ink-2); font-size: 13.5px; }
.drv-row input[type=text] { flex: 1; }
.doc-print table.sign-block .line.short { width: 140px; }
/* Zakaz rejasi */
.chk-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.ro-t td, .ro-t th { padding: 7px 8px; }
.ro-t th.mo, .ro-t td.mo { font-size: 12.5px; color: var(--ink-2); padding-left: 4px; padding-right: 4px; }
.ro-t td:nth-child(2) { min-width: 220px; }
.ro-t .cell { height: 30px; }
.ro-t .ro-bx { font-weight: 800; border-color: #9fb5d6; }
.ro-t tr.ro-ovr .ro-bx { background: #fff4e8; border-color: #f0a35c; }
.ro-star .icon-btn { font-size: 17px; color: #b9b3a7; width: 28px; height: 28px; }
.ro-star .icon-btn.on { color: #e3a008; }
.ro-st { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.ro-st.st-urgent { background: #fde2e0; color: #b42318; }
.ro-st.st-soon { background: #fff1d6; color: #9a5b00; }
.ro-st.st-ok { background: #e3f4e8; color: #1d7a3e; }
.ro-st.st-none { background: var(--line-2); color: var(--muted); }
.ro-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.ro-dot.st-urgent { background: #d92d20; } .ro-dot.st-soon { background: #f0a020; } .ro-dot.st-ok { background: #2e9e57; } .ro-dot.st-none { background: #b9b3a7; }
.stats .ro-sum { border-color: #cfdcee; background: var(--brand-soft); }
.ro-cats .shopcat span:nth-child(2) { flex: 1; }
.ro-inc input { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; }
.ro-t td.ro-inc { width: 34px; text-align: center; }
.disk-bar { height: 8px; border-radius: 99px; background: var(--line-2); overflow: hidden; margin: 4px 0 6px; max-width: 320px; }
.disk-bar i { display: block; height: 100%; background: var(--brand-2); border-radius: 99px; }
.disk-bar.low i { background: #d92d20; }
.ro-imp-stats { margin: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ro-imp-stats .stat { padding: 10px 12px; } .ro-imp-stats .stat-value { font-size: 18px; }
.ro-fz, .ro-unk { max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; margin-top: 6px; }
.ro-fz-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 12px; border-bottom: 1px solid var(--line-2); cursor: pointer; font-size: 13.5px; }
.ro-fz-row input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--brand); }
.ro-unk div { padding: 6px 12px; border-bottom: 1px solid var(--line-2); font-size: 13px; }
@media (max-width: 760px) { .ro-imp-stats { grid-template-columns: 1fr; } }
/* Tovarlar: tez tahrirlash va tartib raqami */
.t td.rn { width: 44px; font-size: 12.5px; }
.t td.qe { cursor: text; position: relative; }
.t td.qe:hover { background: #f3f6fb; box-shadow: inset 0 0 0 1px #c9d6ea; border-radius: 6px; }
.t td.qe .qe-in { width: 100%; min-width: 96px; }
.t td.qe select.qe-in { min-width: 150px; }
.t tr.qe-ok td { background: #eaf7ee !important; transition: background .3s; }

/* ---------- Chiroyli select, kalendar va til tanlash (ui.js) ---------- */
.uisel-native { display: none !important; }
.uisel-btn { display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; height: 38px; padding: 0 9px 0 11px; border: 1px solid #d9d5cc; border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); font: inherit; font-weight: 500; cursor: pointer; text-align: left; transition: border-color .12s, box-shadow .12s; }
.uisel-btn.as-input { width: 100%; }
.uisel-btn:hover { border-color: #b9c6db; }
.uisel-btn:focus-visible, .uisel-btn.open { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(47, 85, 144, .15); }
.uisel-btn:disabled { opacity: .55; cursor: not-allowed; }
.uisel-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uisel-chev { flex: none; color: var(--muted); transition: transform .15s; }
.uisel-btn.open .uisel-chev { transform: rotate(180deg); }
.branch-pick .uisel-btn { border: 0; background: transparent; height: 32px; padding: 0 2px 0 4px; font-weight: 600; box-shadow: none; max-width: 220px; }
.uisel-lang { height: 36px; border-radius: 999px; padding: 0 8px 0 6px; gap: 6px; font-weight: 700; letter-spacing: .02em; }
.uisel-lang .flag, .uisel-pop .flag { width: 22px; height: 15px; border-radius: 3px; overflow: hidden; flex: none; box-shadow: 0 0 0 1px rgba(0,0,0,.12); display: inline-flex; }
.uisel-lang .flag svg, .uisel-pop .flag svg { width: 100%; height: 100%; display: block; }
.uisel-pop { position: fixed; z-index: 1000; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(23, 36, 58, .18), 0 2px 6px rgba(23, 36, 58, .08);
  padding: 6px; max-width: min(420px, calc(100vw - 16px)); animation: uipop .12s ease-out; outline: none; }
@keyframes uipop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.uisel-search { padding: 2px 2px 6px; }
.uisel-search input { width: 100%; height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; outline: none; }
.uisel-search input:focus { border-color: var(--brand-2); }
.uisel-list { max-height: 300px; overflow: auto; }
.uisel-opt { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.uisel-opt > span:first-child:not(.flag) { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.uisel-opt.act { background: #eef3fa; }
.uisel-opt.sel { color: var(--brand); font-weight: 700; }
.uisel-opt.dis { opacity: .45; cursor: not-allowed; }
.uisel-check { margin-left: auto; flex: none; color: var(--brand-2); }
.uisel-pop-lang .uisel-opt b { width: 26px; }
.uisel-pop-lang .uisel-opt .muted { font-weight: 500; font-size: 13px; }
.uisel-empty { padding: 12px; color: var(--muted); text-align: center; }
/* Kalendar */
/* Brauzerning o‘z kalendari tugmasi yashiriladi — o‘rniga bizning kalendar ochiladi */
input.uidate { cursor: pointer; padding-right: 34px !important; background-repeat: no-repeat !important; background-position: right 10px center !important; background-size: 16px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='15' rx='2'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3C/svg%3E") !important; }
input.uidate::-webkit-calendar-picker-indicator { display: none; -webkit-appearance: none; }
input.uidate::-webkit-inner-spin-button, input.uidate::-webkit-clear-button { display: none; }
.uical { position: fixed; z-index: 1000; width: 288px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px;
  box-shadow: 0 12px 32px rgba(23, 36, 58, .18), 0 2px 6px rgba(23, 36, 58, .08); animation: uipop .12s ease-out; user-select: none; }
.uical button { font: inherit; border: 0; background: transparent; cursor: pointer; color: inherit; }
.uical-head { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.uical-head [data-nav] { width: 32px; height: 32px; border-radius: 8px; font-size: 20px; line-height: 1; color: var(--ink-2); }
.uical-head [data-nav]:hover { background: var(--line-2); }
.uical-title { flex: 1; height: 32px; border-radius: 8px; font-weight: 700; font-size: 15px; }
.uical-title:hover { background: var(--line-2); }
.uical-wd, .uical-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.uical-wd span { text-align: center; font-size: 11.5px; font-weight: 700; color: var(--muted); padding: 4px 0; text-transform: uppercase; }
.uical-wd .we, .uical-grid .we:not(.sel):not(.out) { color: #c2410c; }
.uical-grid button { height: 34px; border-radius: 9px; font-size: 14px; font-variant-numeric: tabular-nums; }
.uical-grid button:hover:not(:disabled) { background: #eef3fa; }
.uical-grid .out { color: #b9b3a7; }
.uical-grid .today { box-shadow: inset 0 0 0 1.5px var(--brand-2); font-weight: 700; }
.uical-grid .sel { background: var(--brand-2) !important; color: #fff; font-weight: 700; }
.uical-grid button:disabled { opacity: .3; cursor: not-allowed; }
.uical-months { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.uical-months button { height: 40px; border-radius: 9px; font-weight: 600; }
.uical-months button:hover { background: #eef3fa; }
.uical-months .sel { background: var(--brand-2); color: #fff; }
.uical-foot { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.uical-foot button { padding: 6px 10px; border-radius: 8px; color: var(--brand-2); font-weight: 700; font-size: 13.5px; }
.uical-foot button:hover { background: #eef3fa; }
.uical-foot [data-clear] { color: var(--muted); }
.ai-users { margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; }
.ai-users td { vertical-align: middle; }
.ai-btn { border-color: #c9b6f0; color: #5b3fb0; }
.ai-btn:hover { background: #f5f0ff; }
.ai-note .ai-sec { margin-top: 12px; padding-top: 10px; border-top: 1px dashed rgba(0,0,0,.12); }
.ai-pair, .ai-un { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 5px 0; }
.ai-un-name { flex: 1 1 260px; min-width: 0; }
.ai-un-pick { flex: 1 1 280px; margin: 0; position: relative; }
.ai-un-pick .input { height: 34px; background: #fff; }

/* AI yordamchi */
.aic { display: flex; flex-direction: column; height: calc(100vh - 120px); max-width: 920px; margin: 0 auto; }
.aic-log { flex: 1; overflow: auto; padding: 8px 4px 16px; display: flex; flex-direction: column; gap: 14px; }
.aic-msg { display: flex; gap: 10px; align-items: flex-start; }
.aic-msg.user { justify-content: flex-end; }
.aic-av { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #6d4fd0, #2f5590); color: #fff; display: grid; place-items: center; flex: none; }
.aic-bubble { max-width: min(680px, 86%); padding: 11px 14px; border-radius: 14px; line-height: 1.5; font-size: 14.5px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); overflow-wrap: anywhere; }
.aic-msg.user .aic-bubble { background: var(--brand); color: #fff; border-color: var(--brand); border-bottom-right-radius: 4px; }
.aic-msg.assistant .aic-bubble { border-top-left-radius: 4px; }
.aic-files { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.aic-file { display: flex; align-items: center; gap: 10px; text-align: left; border: 1px solid #cfe0cf; background: #f2faf2; color: #1d5f30; border-radius: 10px; padding: 8px 12px; cursor: pointer; font: inherit; }
.aic-file span { display: flex; flex-direction: column; } .aic-file small { color: var(--muted); font-size: 12px; }
.aic-file:hover { background: #e6f5e6; } .aic-file.gone { opacity: .55; }
.aic-form { display: flex; gap: 8px; align-items: flex-end; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 8px; box-shadow: var(--shadow); }
.aic-form textarea { flex: 1; border: 0; outline: none; resize: none; font: inherit; font-size: 15px; padding: 8px 6px; max-height: 160px; background: transparent; }
.aic-form .btn { height: 42px; width: 46px; justify-content: center; border-radius: 12px; }
.aic-foot { text-align: center; padding: 8px 0 0; }
.aic-hello { margin: auto; text-align: center; max-width: 620px; padding: 20px; }
.aic-hello-ic { width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 20px; background: linear-gradient(135deg, #6d4fd0, #2f5590); color: #fff; display: grid; place-items: center; }
.aic-hello h2 { margin: 6px 0; } .aic-hello p { color: var(--ink-2); }
.aic-ex { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 16px 0; }
.aic-chip { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 8px 14px; cursor: pointer; font: inherit; font-size: 13.5px; }
.aic-chip:hover { border-color: #b9a6ee; background: #f7f3ff; }
.aic-typing { display: flex; gap: 5px; padding: 15px 16px; }
.aic-typing i { width: 7px; height: 7px; border-radius: 50%; background: #9a8fc7; animation: aicdot 1s infinite ease-in-out; }
.aic-typing i:nth-child(2) { animation-delay: .15s; } .aic-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes aicdot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (max-width: 760px) { .aic { height: calc(100vh - 100px); } .aic-bubble { max-width: 92%; } }
.dr-users { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 8px 0 4px; }
/* Sklad joylari */
.loc-chip { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: #eef3fa; color: var(--brand); margin: 1px 3px 1px 0; letter-spacing: .02em; white-space: nowrap; }
.loc-chip.sm { font-size: 11px; padding: 0 5px; }
.t td.loc-td { min-width: 70px; }
.loc-pick-h { font-weight: 700; font-size: 13px; color: var(--ink-2); margin: 12px 0 6px; }
.loc-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.loc-opt { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; cursor: pointer; font-weight: 600; font-size: 13px; }
.loc-opt:has(input:checked) { border-color: var(--brand-2); background: #eef3fa; color: var(--brand); }
.loc-opt input { accent-color: var(--brand); }
.wh-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.wh-side { position: sticky; top: 76px; padding: 14px; max-height: calc(100vh - 100px); overflow: auto; }
.wh-side-h { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 12px; }
.wh-side-h h3 { margin: 0; font-size: 20px; letter-spacing: .02em; }
.wh-list { display: flex; flex-direction: column; }
.wh-item { display: flex; align-items: center; gap: 8px; padding: 8px 2px; border-bottom: 1px solid var(--line-2); }
.wh-item > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wh-qty { font-weight: 700; white-space: nowrap; font-size: 13px; }
.wh { display: flex; flex-direction: column; gap: 14px; }
.wh-room { display: grid; grid-template-columns: 1fr 70px 1fr; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.wh-col { display: flex; flex-direction: column; gap: 8px; }
.wh-col-h { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 0 2px 2px; }
.wh-shelf { display: grid; grid-template-columns: 42px repeat(4, 1fr); gap: 4px; align-items: stretch; }
.wh-shelf-h { display: grid; place-items: center; font-weight: 800; font-size: 13px; color: var(--ink-2); background: var(--line-2); border-radius: 8px; }
.wh-cell { border: 1px solid var(--line); background: #fbfaf7; border-radius: 8px; padding: 6px 4px; cursor: pointer; font: inherit; display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0; }
.wh-cell b { font-size: 12px; } .wh-cell span { font-size: 11px; color: var(--muted); }
.wh-cell.has { background: #eef6ee; border-color: #c7e3c7; } .wh-cell.has span { color: #1d6b34; font-weight: 700; }
.wh-cell:hover { border-color: var(--brand-2); }
.wh-cell.on { background: var(--brand-2); border-color: var(--brand-2); } .wh-cell.on b, .wh-cell.on span { color: #fff; }
.wh-corr { display: flex; }
.wh-corr-cell { flex: 1; justify-content: center; background: repeating-linear-gradient(180deg, #f6f3ec 0 12px, #efeadf 12px 24px); }
.wh-row { display: flex; gap: 12px; flex-wrap: wrap; }
.wh-block { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px; flex: 1 1 260px; }
.wh-cold { background: #f2f8fd; border-color: #cfe3f3; }
.wh-flex { display: flex; gap: 8px; flex-wrap: wrap; align-items: stretch; }
.wh-flex .wh-shelf { flex: 1 1 260px; }
.wh-area { flex: 1 1 110px; display: flex; } .wh-area .wh-cell { flex: 1; padding: 12px 6px; }
@media (max-width: 1100px) { .wh-wrap { grid-template-columns: 1fr; } .wh-side { position: static; max-height: none; } }
@media (max-width: 640px) { .wh-room { grid-template-columns: 1fr; } .wh-corr { min-height: 48px; } .wh-shelf { grid-template-columns: 36px repeat(4, 1fr); } }
/* Stelaj yorliqlari (A4 ga 3×8) va yig‘ish varag‘i */
.loc-labels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6mm; }
.loc-label { border: 1.5px solid #000; border-radius: 3mm; padding: 3mm; text-align: center; break-inside: avoid; }
.loc-code { font-size: 30pt; font-weight: 800; letter-spacing: 1px; line-height: 1.1; }
.loc-title { font-size: 9pt; margin: 1mm 0 2mm; }
.loc-bc svg { max-width: 100%; height: 12mm; }
.pick .pick-loc { font-size: 15px; letter-spacing: .03em; }
.wh-shelf-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 12px; padding: 0 0 12px; border-bottom: 1px dashed var(--line); }
.danger-text { color: var(--danger, #b42318); }
.inst { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-direction: column; gap: 10px; }
.inst li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.45; }
.inst-n { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--brand-2); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 12px; }
.side-install { display: flex; align-items: center; gap: 8px; width: 100%; margin: 0 0 10px; padding: 9px 12px; border: 1px dashed rgba(255,255,255,.22); border-radius: 10px; background: rgba(255,255,255,.04); color: #dfe6f2; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-align: left; }
.side-install:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.4); }
.side-install span { white-space: nowrap; }
.inst-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 12px; }
.inst-qr { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--panel); }
.inst-qr-h { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-bottom: 8px; } .inst-qr-h b { font-size: 17px; }
.inst-qr-img { display: grid; place-items: center; padding: 4px 0 6px; } .inst-qr-img svg { border-radius: 8px; }
.inst-qr .inst { font-size: 13px; }
.inst-print .inst-grid { gap: 24px; } .inst-print .inst-qr { break-inside: avoid; }
@media (max-width: 720px) { .inst-grid { grid-template-columns: 1fr; } }
/* E’lonlar */
.ann-bar { display: flex; flex-direction: column; gap: 8px; padding: 14px 24px 0; }
.ann { display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px 11px 14px; border-radius: 12px; border: 1px solid; font-size: 14px; line-height: 1.45; }
.ann-ic { font-size: 18px; line-height: 1.2; }
.ann-txt { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.ann-body { white-space: pre-wrap; }
.ann-form .check input { flex: none; }
.ann-meta { display: block; font-weight: 400; font-size: 12px; opacity: .7; margin-top: 3px; white-space: normal; }
.ann-info { background: #eef4fd; border-color: #c8dbf5; color: #183b6b; }
.ann-warn { background: #fff6e0; border-color: #f2d48a; color: #6b4a00; }
.ann-urgent { background: #fdeceb; border-color: #f2b8b3; color: #8a1c13; }
.ann-urgent .ann-ic { animation: annPulse 1.6s ease-in-out infinite; }
@keyframes annPulse { 50% { transform: scale(1.18); } }
.ann .icon-btn { color: inherit; flex: none; }
.ann-page { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 16px; align-items: start; }
.ann-form, .ann-list { padding: 18px; } .ann-form h3, .ann-list h3 { margin: 0 0 4px; }
.ann-list { display: flex; flex-direction: column; gap: 8px; } .ann-list h3 { margin-bottom: 6px; }
.ann-levels { display: flex; gap: 8px; flex-wrap: wrap; }
.ann-lv { display: flex; align-items: center; gap: 6px; border: 1px solid; border-radius: 9px; padding: 7px 11px; cursor: pointer; font-size: 13px; font-weight: 600; }
.ann-lv input { accent-color: currentColor; }
.ann-users { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; max-height: 220px; overflow: auto; }
.ann-form textarea { width: 100%; resize: vertical; }
@media (max-width: 900px) { .ann-page { grid-template-columns: 1fr; } .ann-bar { padding: 12px 14px 0; } }
@media print { .ann-bar { display: none !important; } }
.ann-form .field { margin-bottom: 12px; }
.ann-ok { background: #ecf7ef; border-color: #b9e0c4; color: #17572b; }
.ann-off { background: #f4f3f0; border-color: var(--line); color: var(--muted); }
.ann-mine { border-style: dashed; }
.ann-tag { display: inline-block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 1px 7px; border-radius: 6px; background: rgba(0,0,0,.08); vertical-align: 1px; }
.ann-prog { font-weight: 600; }
.ann-done { flex: none; background: #fff; border-color: currentColor; color: inherit; font-weight: 700; }
.ann .btn.sm { flex: none; align-self: center; }
.ann .badge { margin-right: 4px; vertical-align: 1px; }
.ann-tabs { margin-bottom: 8px; }
.ann-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 9px 12px; font: inherit; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.ann-tabs button.on { color: var(--brand); border-bottom-color: var(--brand); }
.ann-tabs b { font-weight: 700; color: var(--muted); margin-left: 4px; }
.ann-taskbox { background: var(--line-2); border-radius: 10px; padding: 10px 12px; }
.ann-taskopt { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 0 24px; }
.ann-quick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: -4px; }
.ann-quick .chip { border: 0; cursor: pointer; padding: 4px 10px; font: inherit; font-size: 12px; font-weight: 600; }
.ann-quick .chip:hover { background: var(--brand-soft); color: var(--brand-2); }
.ann-form .field small { display: block; margin-top: 3px; font-size: 11.5px; }
.tg-cell { white-space: nowrap; } .tg-cell .badge { max-width: 140px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.web-link { display: flex; gap: 18px; align-items: center; margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.web-qr svg { display: block; border-radius: 8px; }
@media (max-width: 640px) { .web-link { flex-direction: column; align-items: stretch; } .web-qr { align-self: center; } }
/* Reklama bannerlari (boshqaruv) */
.bn-admin { display: flex; flex-direction: column; gap: 10px; }
.bn-row { display: flex; gap: 14px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.bn-thumb { flex: none; width: 168px; aspect-ratio: 12 / 5; border-radius: 9px; overflow: hidden; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; text-align: center; padding: 0; }
.bn-thumb img { width: 100%; height: 100%; object-fit: cover; }
.bn-thumb span { padding: 6px; }
.bn-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.bn-acts { display: flex; gap: 6px; align-items: center; flex: none; }
.bn-prev { position: relative; aspect-ratio: 12 / 5; border-radius: 12px; overflow: hidden; display: flex; align-items: flex-end; color: #fff; }
.bn-prev img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bn-prev-txt { position: relative; width: 100%; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; background: linear-gradient(transparent, rgba(0,0,0,.55)); }
.bn-prev-txt b { font-size: 20px; } .bn-prev-txt span { font-size: 13.5px; opacity: .92; }
.c-blue { background: linear-gradient(135deg, #2b6cb0, #1e3a8a); } .c-orange { background: linear-gradient(135deg, #f59e0b, #c2410c); }
.c-green { background: linear-gradient(135deg, #16a34a, #065f46); } .c-red { background: linear-gradient(135deg, #e11d48, #9f1239); } .c-dark { background: linear-gradient(135deg, #334155, #0f172a); }
@media (max-width: 640px) { .bn-row { flex-wrap: wrap; } .bn-thumb { width: 100%; } }
.promo-chip { display: inline-block; margin-top: 3px; font-size: 12px; color: #be123c; background: #fdecef; border-radius: 6px; padding: 1px 7px; }
.t td.actions .switch { display: inline-block; vertical-align: middle; margin-right: 4px; }
.seg button { white-space: nowrap; }
.bn-thumb { position: relative; } .bn-thumb video { width: 100%; height: 100%; object-fit: cover; }
.bn-vtag { position: absolute; left: 6px; bottom: 6px; font-style: normal; font-size: 11px; background: rgba(0,0,0,.6); color: #fff; padding: 1px 6px; border-radius: 6px; }
.bn-prev video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.upbar { height: 6px; background: var(--line-2); border-radius: 3px; overflow: hidden; margin: 0 0 12px; } .upbar i { display: block; height: 100%; width: 0; background: var(--brand-2); transition: width .2s; }
.rm-prev { margin: 4px 0 12px; } .rm-prev pre { white-space: pre-wrap; font: inherit; font-size: 13px; background: var(--line-2); border-radius: 10px; padding: 10px 12px; margin: 4px 0 0; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } @media (max-width: 720px) { .g4 { grid-template-columns: 1fr 1fr; } }
.bc-page { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 16px; align-items: start; }
.bc-form, .bc-hist { padding: 18px; } .bc-form h3, .bc-hist h3 { margin: 0 0 6px; }
.bc-form .field { margin-bottom: 12px; } .bc-form textarea { width: 100%; resize: vertical; }
.bc-prev { height: 64px; border-radius: 8px; object-fit: cover; }
.bc-list { max-height: 240px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.bc-item { padding: 10px 0; border-bottom: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 4px; }
.bc-txt { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
@media (max-width: 900px) { .bc-page { grid-template-columns: 1fr; } }

/* Xarid: valyuta va qo‘shimcha xarajatlar */
.cur-box{margin-top:14px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--line-2)}
.cur-row{display:block}
.cur-ex{min-width:0}
.ex-row{display:grid;max-width:560px;grid-template-columns:1fr 160px 32px;gap:6px;margin-bottom:6px}
.cur-sum{display:flex;flex-wrap:wrap;gap:6px 18px;margin-top:10px;padding:10px 12px;border-radius:10px;background:var(--info-bg,rgba(37,99,235,.07));font-size:13.5px}
@media (max-width:760px){.ex-row{grid-template-columns:1fr 120px 32px}}
/* Sof foyda */
.pf-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(260px,1fr);gap:16px;align-items:start}
.pf-cats{display:flex;flex-direction:column;gap:12px;padding:4px 2px}
.pf-cat-h{display:flex;justify-content:space-between;gap:10px;font-size:14px;margin-bottom:5px}
.pf-bar{height:8px;border-radius:6px;background:var(--line);overflow:hidden}.pf-bar i{display:block;height:100%;background:var(--bad,#dc2626);border-radius:6px;opacity:.75}
.t tr.total td{border-top:2px solid var(--line);background:var(--line-2)}
@media (max-width:900px){.pf-grid{grid-template-columns:1fr}}
.perm-group{margin-bottom:12px}.perm-gh{display:flex;align-items:center;gap:10px;margin-bottom:4px;font-size:13.5px}.perm-gh .btn{height:24px;font-size:12px}

/* Foydalanish qo‘llanmasi */
.guide-btn{flex:none;width:26px;height:26px;margin-left:8px;border-radius:50%;border:1.5px solid var(--line);background:var(--panel);color:var(--ink-2);font:700 14px/1 inherit;cursor:pointer;display:inline-grid;place-items:center}
.guide-btn:hover{border-color:var(--accent);color:var(--accent)}
.gd{font-size:14.5px;line-height:1.55}.gd-intro{margin:0 0 12px;font-size:15px}
.gd h4{display:flex;align-items:center;gap:6px;margin:16px 0 8px;font-size:14px;text-transform:none}
.gd-steps,.gd-tips{margin:0;padding-left:22px}.gd-steps li,.gd-tips li{margin:4px 0}
.gd-ex{border-left:3px solid var(--accent);background:var(--line-2);border-radius:0 10px 10px 0;padding:9px 12px;margin:8px 0}.gd-ex b{display:block;margin-bottom:2px}.gd-ex p{margin:0}
.gd-grid > .card{margin:0}
.gd-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px}
.gd-card{display:flex;gap:12px;align-items:flex-start;text-align:left;padding:14px 16px;cursor:pointer;font:inherit;color:inherit;border:1px solid var(--line)}
.gd-card:hover{border-color:var(--accent)}.gd-card .gd-ic{flex:none;width:34px;height:34px;border-radius:9px;background:var(--line-2);display:grid;place-items:center}
.gd-card b{display:block;margin-bottom:3px}.gd-card span{font-size:13px;color:var(--ink-2);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.gd-group{margin:18px 0 8px;font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-3,#8a8f98)}
.bc-err{margin-top:6px;padding:6px 9px;border-radius:8px;background:#fff4f2;color:var(--bad);line-height:1.4}
.mark-chip{display:inline-flex;align-items:center;gap:4px;margin-top:4px;padding:2px 8px;border-radius:999px;border:1px solid var(--line);background:var(--panel);font:600 12px/1.6 inherit;color:var(--ink-2);cursor:pointer}
.mark-chip.ok{border-color:#9bd3ad;background:#eefaf1;color:#1c7a3c}.mark-chip.warn{border-color:#f0c9a0;background:#fff7ee;color:#a45a12}
.mx-bulk{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:8px 12px;margin-bottom:10px;border-radius:10px;background:var(--line-2)}
.mx-t td{vertical-align:middle}.mx-t .sub{display:block}
