/* IQ PoS — interfeys uslublari */
: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: 10px; padding: 6px; border-radius: 8px; }
.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; }
.me-role { font-size: 11.5px; color: #8796ae; }
.me .icon-btn { color: var(--side-ink); margin-left: auto; }
.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; }
}

/* ---------- 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: flex; align-items: center; justify-content: flex-end; gap: 4px; padding: 10px 14px; border-top: 1px solid var(--line-2); }
.pager .muted { margin-right: auto; font-size: 12.5px; }
.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 { display: flex; 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; }
@media (max-width: 600px) {
  .cart th:nth-child(2), .cart td:nth-child(2), .cart th:nth-child(3), .cart td:nth-child(3), .cart th:nth-child(6), .cart td:nth-child(6) { display: none; }
  .total-box .big { font-size: 28px; }
}
.cart td:first-child { min-width: 200px; }
@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; }
