/* ═══════════════════════════════════════════════════════════════════
   JELEGUM — ilova (Telegram Mini App)
   Dizayn: «D:\web sayt» tizimi — neytral palitra, nozik chegaralar,
   qat'iy tipografiya, bitta urg'u rangi. Telefon uchun moslangan.
   ═══════════════════════════════════════════════════════════════════ */
:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --surface-3: #f4f4f5;
  --hover: #f4f4f5;
  --border: #e4e4e7;
  --border-2: #d4d4d8;
  --text: #09090b;
  --text-2: #52525b;
  --text-3: #a1a1aa;
  --primary: #18181b;
  --primary-text: #fafafa;
  --accent: #2563eb;
  --accent-soft: #eff6ff;
  --accent-text: #1d4ed8;
  --success: #15803d;
  --success-soft: #f0fdf4;
  --success-line: #bbf7d0;
  --warning: #b45309;
  --warning-soft: #fffbeb;
  --warning-line: #fde68a;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --danger-line: #fecaca;
  --info-line: #bfdbfe;
  --xl-head: #18181b;
  --xl-head-text: #fafafa;
  --xl-sub: #f4f4f5;
  --xl-sub-text: #3f3f46;
  --xl-total: #fefce8;
  --xl-total-line: #fde68a;
  --xl-grid: #e4e4e7;
  /* grafik: sotuv / to'lov (tekshirilgan juftlik) */
  --s1: #2563eb;
  --s2: #0d9488;
  --r-sm: 6px;
  --r: 8px;
  --r-lg: 10px;
  --shadow-sm: 0 1px 2px rgba(9, 9, 11, 0.04);
  --shadow-lg: 0 16px 40px -8px rgba(9, 9, 11, 0.18), 0 2px 6px rgba(9, 9, 11, 0.06);
  --ring: 0 0 0 3px rgba(37, 99, 235, 0.16);
  --tabbar-h: 58px;
  color-scheme: light;
}
[data-theme='dark'] {
  --bg: #09090b;
  --surface: #0f0f12;
  --surface-2: #131316;
  --surface-3: #18181b;
  --hover: #1c1c20;
  --border: #27272a;
  --border-2: #3f3f46;
  --text: #fafafa;
  --text-2: #a1a1aa;
  --text-3: #71717a;
  --primary: #fafafa;
  --primary-text: #09090b;
  --accent: #60a5fa;
  --accent-soft: #172554;
  --accent-text: #93c5fd;
  --success: #4ade80;
  --success-soft: #052e16;
  --success-line: #14532d;
  --warning: #fbbf24;
  --warning-soft: #2b1d05;
  --warning-line: #713f12;
  --danger: #f87171;
  --danger-soft: #2a0a0a;
  --danger-line: #7f1d1d;
  --info-line: #1e3a8a;
  --xl-head: #27272a;
  --xl-head-text: #fafafa;
  --xl-sub: #18181b;
  --xl-sub-text: #d4d4d8;
  --xl-total: #1f1a07;
  --xl-total-line: #713f12;
  --xl-grid: #27272a;
  --s1: #3b82f6;
  --s2: #0d9488;
  --shadow-lg: 0 16px 40px -8px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: -0.006em;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01';
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; letter-spacing: inherit; color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
svg { flex-shrink: 0; }

/* ── Karkas ─────────────────────────────────────────────── */
.topbar {
  height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 16px;
  background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30;
}
.logo { width: 28px; height: 28px; border-radius: 7px; background: var(--primary); color: var(--primary-text); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.top-title { font-weight: 600; font-size: 14.5px; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-sub { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.content { padding: 16px 16px 28px; max-width: 760px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.page-head .kicker { font-size: 12px; color: var(--text-3); font-weight: 500; margin-bottom: 3px; }
.page-head h1 { font-size: 20px; font-weight: 600; }
.page-head .right { margin-left: auto; display: flex; gap: 8px; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(180%) blur(10px);
  border-top: 1px solid var(--border);
}
.tabbar .brand { display: none; }
.tabbar a { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--text-3); font-size: 10.5px; font-weight: 500; white-space: nowrap; }
.tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.active { color: var(--text); }
.tabbar a.active svg { stroke-width: 2.1; }

/* ── Segmentli tanlov ───────────────────────────────────── */
.subtabs { display: flex; gap: 2px; padding: 2px; background: var(--surface-3); border: 1px solid var(--border); border-radius: var(--r); }
.subtabs.inline { display: inline-flex; }
.chip { flex: 1; border: none; background: transparent; color: var(--text-2); padding: 6px 10px; border-radius: var(--r-sm); cursor: pointer; font-size: 13px; font-weight: 500; white-space: nowrap; transition: background 0.12s, color 0.12s; }
.chip.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 0 0 1px var(--border); }

/* ── Kartochka, statistik ───────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.card + .card, .stats + .card, .card + .stats { margin-top: 14px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--border); min-height: 46px; }
.card-head h3 { font-size: 14px; font-weight: 600; }
.card-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-body { padding: 14px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 12px 14px; box-shadow: var(--shadow-sm); min-width: 0; }
.stat.click { cursor: pointer; }
.stats.three { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats.three .stat { padding: 11px 12px; }
.stats.three .value { font-size: 16px; }
.stat .label { font-size: 12px; color: var(--text-2); font-weight: 500; display: flex; align-items: center; gap: 7px; }
.stat .label::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--border-2); flex-shrink: 0; }
.stat.danger .label::before { background: var(--danger); }
.stat.success .label::before { background: var(--success); }
.stat.warning .label::before { background: #f59e0b; }
.stat.info .label::before { background: var(--accent); }
.stat .value { font-size: 19px; font-weight: 600; margin-top: 5px; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; line-height: 1.2; overflow-wrap: anywhere; }
.stat .sub { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }

/* ── Ro'yxat ────────────────────────────────────────────── */
.list { display: flex; flex-direction: column; }
.item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--border); cursor: pointer; min-height: 54px; }
.item:last-child { border-bottom: none; }
.item:active { background: var(--hover); }
.item .main { flex: 1; min-width: 0; }
.item .name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .meta { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .end { text-align: right; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.item .end .meta { text-align: right; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-3); color: var(--text-2); display: grid; place-items: center; font-size: 12px; font-weight: 600; flex-shrink: 0; border: 1px solid var(--border); }

/* ── Jadval (Excel ko'rinishi) ──────────────────────────── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.xl { border-collapse: separate; border-spacing: 0; font-size: 12.5px; width: 100%; }
table.xl th, table.xl td { border-right: 1px solid var(--xl-grid); border-bottom: 1px solid var(--xl-grid); padding: 7px 10px; white-space: nowrap; }
table.xl th:last-child, table.xl td:last-child { border-right: none; }
table.xl tbody tr:last-child td { border-bottom: none; }
table.xl thead th { background: var(--xl-sub); color: var(--xl-sub-text); font-weight: 500; font-size: 12px; text-align: left; }
table.xl td.name { font-weight: 500; white-space: normal; min-width: 130px; }
table.xl tr.total td { background: var(--xl-total); font-weight: 600; border-bottom-color: var(--xl-total-line); }
table.xl td.debt { color: var(--danger); font-weight: 600; }
table.xl td.adv { color: var(--success); font-weight: 500; }
table.xl .sticky { position: sticky; left: 0; background: var(--surface); z-index: 2; }
table.xl thead .sticky { background: var(--xl-sub); }
.num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ── Forma ──────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field + .field { margin-top: 14px; }
.field > label { font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--text-3); }
.input, textarea.input {
  width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--r-sm);
  background: var(--surface); color: var(--text); font: inherit; font-size: 16px; outline: none; box-shadow: var(--shadow-sm);
  transition: border-color 0.12s, box-shadow 0.12s;
}
textarea.input { height: auto; min-height: 64px; padding: 9px 12px; resize: vertical; }
.input::placeholder { color: var(--text-3); }
.input:focus { border-color: var(--accent); box-shadow: var(--ring); }
.input.big { height: 48px; font-size: 22px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.search { position: relative; }
.search svg { position: absolute; left: 11px; top: 12px; color: var(--text-3); }
.search .input { padding-left: 34px; }
.toolbar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }

/* ── Tugma ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 13px; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 500; cursor: pointer; white-space: nowrap;
  box-shadow: var(--shadow-sm); transition: background 0.12s, border-color 0.12s, opacity 0.12s;
}
.btn:active { background: var(--hover); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.btn.primary:active { opacity: 0.85; }
.btn.danger { color: var(--danger); }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; color: var(--text-2); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn.icon { width: 34px; padding: 0; }
.btn.block { width: 100%; height: 44px; font-size: 15px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }

/* ── Belgi ──────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 500; border: 1px solid var(--border); color: var(--text-2); background: var(--surface); white-space: nowrap; line-height: 20px; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); }
.badge.success { color: var(--success); border-color: var(--success-line); background: var(--success-soft); }
.badge.success::before { background: var(--success); }
.badge.warning { color: var(--warning); border-color: var(--warning-line); background: var(--warning-soft); }
.badge.warning::before { background: #f59e0b; }
.badge.danger { color: var(--danger); border-color: var(--danger-line); background: var(--danger-soft); }
.badge.danger::before { background: var(--danger); }
.badge.info { color: var(--accent-text); border-color: var(--info-line); background: var(--accent-soft); }
.badge.info::before { background: var(--accent); }
.pos { color: var(--success); }
.neg { color: var(--danger); }
.dim { color: var(--text-3); }
.muted { color: var(--text-2); }
.small { font-size: 12.5px; }
.strong { font-weight: 600; }
.mono { font-family: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 0.92em; }
.row { display: flex; align-items: center; gap: 8px; }
.mt { margin-top: 14px; }
.mb { margin-bottom: 14px; }
.grow { flex: 1; min-width: 0; }

/* ── Grafik ─────────────────────────────────────────────── */
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.chart .axis { fill: var(--text-3); font-size: 10px; font-variant-numeric: tabular-nums; }
.chart .hit { fill: transparent; cursor: pointer; }
.chart .hit.on { fill: var(--hover); }
.tip {
  position: absolute; top: -6px; pointer-events: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
  box-shadow: var(--shadow-lg); padding: 8px 10px; font-size: 12px; min-width: 150px; transform: translate(-50%, -100%); z-index: 5;
}
.tip .d { font-weight: 600; margin-bottom: 4px; }
.tip .r { display: flex; justify-content: space-between; gap: 12px; color: var(--text-2); }
.tip .r b { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 600; }

/* ── Bo'sh, yuklanmoqda ─────────────────────────────────── */
.empty { text-align: center; padding: 36px 16px; color: var(--text-3); }
.empty .t { font-weight: 500; color: var(--text-2); margin-bottom: 4px; }
.loading { padding: 48px 16px; text-align: center; color: var(--text-3); }
.skeleton { height: 76px; border-radius: var(--r-lg); background: linear-gradient(90deg, var(--surface-3), var(--hover), var(--surface-3)); background-size: 200% 100%; animation: sk 1.2s infinite linear; }
@keyframes sk { to { background-position: -200% 0; } }

/* ── Pastdan chiqadigan oyna ────────────────────────────── */
.overlay { position: fixed; inset: 0; background: rgba(9, 9, 11, 0.42); backdrop-filter: blur(2px); z-index: 100; display: flex; align-items: flex-end; justify-content: center; animation: fade 0.14s ease-out; }
.sheet {
  background: var(--surface); border: 1px solid var(--border); border-bottom: none; border-radius: 14px 14px 0 0; box-shadow: var(--shadow-lg);
  width: 100%; max-width: 760px; max-height: 90vh; display: flex; flex-direction: column; animation: up 0.18s ease-out;
  padding-bottom: env(safe-area-inset-bottom);
}
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.sheet-head h3 { font-size: 15px; font-weight: 600; flex: 1; }
.sheet-body { padding: 16px; overflow-y: auto; }
.sheet-foot { padding: 12px 16px 16px; border-top: 1px solid var(--border); background: var(--surface-2); }
.calc { border: 1px solid var(--border); border-radius: var(--r); background: var(--surface-2); padding: 10px 12px; font-size: 13px; margin-top: 14px; }
.calc .r { display: flex; justify-content: space-between; padding: 2px 0; font-variant-numeric: tabular-nums; }
.calc .r.total { border-top: 1px dashed var(--border-2); margin-top: 5px; padding-top: 7px; font-weight: 600; }
.pick-list { max-height: 46vh; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--r); margin-top: 10px; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(24px); opacity: 0.6; } }

/* ── Bildirishnoma ──────────────────────────────────────── */
.toasts { position: fixed; left: 16px; right: 16px; top: 62px; display: flex; flex-direction: column; gap: 8px; z-index: 200; pointer-events: none; align-items: center; }
.toast { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-left: 3px solid var(--success); padding: 10px 14px; border-radius: var(--r); box-shadow: var(--shadow-lg); max-width: 420px; width: 100%; font-weight: 500; animation: rise 0.16s ease-out; }
.toast.error { border-left-color: var(--danger); }
@keyframes rise { from { opacity: 0; transform: translateY(-6px); } }

.gate { min-height: 70vh; display: grid; place-items: center; text-align: center; }
.gate .box { max-width: 320px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 24px; box-shadow: var(--shadow-lg); }
.gate h2 { font-size: 17px; margin: 12px 0 6px; }
.gate p { color: var(--text-2); margin: 0; }
body.gated .tabbar { display: none; }
body.gated { padding-left: 0 !important; }

/* ── Ikonka, qo'shimcha ─────────────────────────────────── */
.ic { flex-shrink: 0; }
.btn .ic { margin-left: -2px; }
.ink { color: var(--text); }
.sw { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.legend .sw { width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; }
.dotg, .dotd, .dotw { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; flex-shrink: 0; }
.dotg { background: var(--success); }
.dotd { background: var(--danger); }
.dotw { background: #f59e0b; }
.meta-lines div { display: flex; align-items: center; gap: 6px; }
.meta-lines div + div { margin-top: 3px; }
.avatar.star { background: var(--accent-soft); color: var(--accent-text); border-color: var(--info-line); }
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 14px 0; }
.split > div > .card + .card { margin-top: 14px; }
.split > .card + .card, .split > div + div { margin-top: 14px; }
table.xl tr.click { cursor: pointer; }
.subtabs.wrap { flex-wrap: wrap; }
.subtabs.wrap .chip { flex: 0 0 auto; }
.daybar .input { text-align: center; }
.gate-ic { width: 52px; height: 52px; margin: 0 auto; border-radius: 14px; background: var(--surface-3); border: 1px solid var(--border); display: grid; place-items: center; color: var(--text-2); }
.warn { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--warning-line); background: var(--warning-soft); color: var(--warning); border-radius: var(--r); padding: 10px 12px; font-size: 13px; margin-bottom: 14px; }
.warn.click { cursor: pointer; }
.warn .ic { margin-top: 2px; }
.narrow { max-width: 720px; }
.lang { font-weight: 600; font-size: 12px; letter-spacing: 0.02em; }

/* jadval ichidagi kiritish katagi */
.input.cell { height: 34px; width: 96px; text-align: right; font-size: 15px; padding: 0 8px; font-variant-numeric: tabular-nums; box-shadow: none; }
.input.cell.bad { border-color: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 18%, transparent); }
table.xl td:has(> .input.cell) { padding: 4px 6px; }
table.xl tr.unsure td { background: var(--warning-soft); }

/* ── Sotuv ──────────────────────────────────────────────── */
.sale-side { margin-top: 14px; }
.scan-drop { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px dashed var(--border-2); border-radius: var(--r-lg); background: var(--surface); cursor: pointer; margin-bottom: 14px; transition: border-color 0.12s, background 0.12s; }
.scan-drop:active { background: var(--hover); }
.scan-drop .scan-ic { width: 42px; height: 42px; border-radius: 10px; background: var(--surface-3); border: 1px solid var(--border); display: grid; place-items: center; color: var(--text-2); flex-shrink: 0; }
.scan-drop.done { border-style: solid; border-color: var(--success-line); background: var(--success-soft); }
.scan-drop.done .scan-ic { color: var(--success); background: var(--surface); border-color: var(--success-line); }
.scan-drop.busy { pointer-events: none; }
.scan-drop.busy .scan-ic { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.4; } }
.picker-btn { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 50px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); text-align: left; cursor: pointer; box-shadow: var(--shadow-sm); }
.picker-btn:active { background: var(--hover); }
.picker-btn .ic { color: var(--text-3); }
table.sale-t td.name { min-width: 120px; }

/* ── Sanoq ──────────────────────────────────────────────── */
.net { display: flex; align-items: center; border-radius: var(--r); padding: 9px 12px; font-size: 12.5px; margin-bottom: 14px; border: 1px solid; }
.net.on { color: var(--success); background: var(--success-soft); border-color: var(--success-line); }
.net.off { color: var(--danger); background: var(--danger-soft); border-color: var(--danger-line); }
table.tally td.name { white-space: normal; }
.sticky-foot {
  position: sticky; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 8px); margin-top: 14px; z-index: 20;
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(8px); box-shadow: var(--shadow-lg);
}

@media (max-width: 380px) {
  .hide-xs { display: none; }
  .tabbar a { font-size: 9.5px; }
}

/* ── Planshet ───────────────────────────────────────────── */
@media (min-width: 640px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .stat .value { font-size: 21px; }
  .overlay { align-items: center; padding: 24px; }
  .sheet { border-radius: 14px; border-bottom: 1px solid var(--border); max-width: 560px; max-height: 86vh; }
  .content { padding: 20px 24px 32px; max-width: 1100px; }
  .list.cols { display: grid; grid-template-columns: 1fr 1fr; }
  .list.cols .item { border-right: 1px solid var(--border); }
  .list.cols .item:nth-child(2n) { border-right: none; }
  .list.cols .item:nth-last-child(2):nth-child(odd) { border-bottom: none; }
  .toasts { left: auto; right: 20px; top: auto; bottom: calc(var(--tabbar-h) + 20px); align-items: flex-end; }
}

/* ── Kompyuter: chapda menyu (saytdagidek) ───────────────── */
@media (min-width: 960px) {
  body { padding-bottom: 0; padding-left: 232px; font-size: 13.5px; }
  .tabbar {
    top: 0; bottom: 0; right: auto; width: 232px; height: 100vh; padding: 0 0 16px; flex-direction: column; justify-content: flex-start;
    border-top: none; border-right: 1px solid var(--border); background: var(--surface-2); backdrop-filter: none;
  }
  .tabbar .brand { display: flex; align-items: center; gap: 10px; padding: 14px 16px 18px; font-weight: 600; font-size: 14px; color: var(--text); }
  .tabbar a {
    flex: none; flex-direction: row; justify-content: flex-start; gap: 9px; margin: 1px 8px; padding: 7px 9px; border-radius: var(--r-sm);
    font-size: 13.5px; color: var(--text-2); transition: background 0.12s, color 0.12s;
  }
  .tabbar a:hover { background: var(--hover); color: var(--text); }
  .tabbar a.active { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--border), var(--shadow-sm); }
  .tabbar svg { width: 17px; height: 17px; }
  .topbar { padding: 0 32px; }
  .topbar > .logo { display: none; }
  .content { padding: 26px 32px 48px; max-width: 1320px; margin: 0; }
  .split { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; align-items: start; }
  .split > .card + .card, .split > div + div { margin-top: 0; }
  .quick { grid-template-columns: repeat(3, minmax(0, 220px)); }
  .sale { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
  .sale-side { margin-top: 0; position: sticky; top: 68px; }
  .sticky-foot { bottom: 16px; }
  .toasts { bottom: 20px; }
  .item:hover, table.xl tbody tr.click:hover td { background: var(--surface-2); }
  .btn:hover { background: var(--hover); }
  .btn.primary:hover { opacity: 0.88; background: var(--primary); }
  .chip:hover { color: var(--text); }
}
@media (min-width: 1280px) {
  .list.cols { grid-template-columns: 1fr 1fr 1fr; }
  .list.cols .item:nth-child(2n) { border-right: 1px solid var(--border); }
  .list.cols .item:nth-child(3n) { border-right: none; }
}
