/* Dizayn tizimi – prototip/crm.html dan ko‘chirilgan (CLAUDE.md, 7-bo‘lim). Pastda – haqiqiy ilovaga qo‘shimchalar. */
:root {
  /* Yorug': neytral sovuq kulrang fon, to‘q firuza aksent */
  --bg: #F6F7F9;
  --surface: #FFFFFF;
  --surface-2: #F1F3F5;
  --ink: #111827;
  --ink-2: #4B5563;
  --ink-3: #6B7380;
  --line: #E5E7EB;
  --accent: #0F766E;
  --accent-hover: #0C625B;
  --accent-ink: #FFFFFF;
  --accent-soft: #E3F3F0;
  --accent-text: #0E6B64;
  --good: #137A3A;  --good-soft: #E7F6EC;
  --warn: #B45309;  --warn-soft: #FDF1E2;
  --bad: #C8321F;   --bad-soft: #FDECEA;
  --ig: #C72A6E;    --ig-soft: #FCE8F0;
  --tg: #1A84BD;    --tg-soft: #E3F1FA;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  --bubble-in: #F1F3F5;
  --bubble-out: #0F766E; --bubble-out-ink: #FFFFFF;
  --shadow: 0 1px 2px rgba(17,24,39,.04), 0 2px 8px rgba(17,24,39,.05);
  --overlay: rgba(17,24,39,.4);
  --font: "Golos Text", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --display: var(--font);
  --r: 20px; /* sayt bilan bir xil (site.css --s-r) */
  --r-sm: 10px;
}
/* Qorong‘i: neytral grafit (yashil tussiz), yorqin firuza aksent ustida to‘q matn */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1115; --surface: #171A20; --surface-2: #1F232A; --ink: #ECEEF1; --ink-2: #A9B0BA; --ink-3: #7C8490; --line: #272B33;
    --accent: #2DBBA8; --accent-hover: #4CCBB9; --accent-ink: #062320; --accent-soft: #15302D; --accent-text: #5ED6C5;
    --good: #5BCB8A; --good-soft: #16291F; --warn: #EDB15A; --warn-soft: #2D2416; --bad: #F2837A; --bad-soft: #33201E;
    --ig: #F07AA8; --ig-soft: #361B27; --tg: #62B8E6; --tg-soft: #142838;
    --s1: #5B9BEA; --s2: #EE8A5E; --s3: #3DC493; --s4: #E9B53F;
    --bubble-in: #1F232A; --bubble-out: #2DBBA8; --bubble-out-ink: #062320;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.25); --overlay: rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0F1115; --surface: #171A20; --surface-2: #1F232A; --ink: #ECEEF1; --ink-2: #A9B0BA; --ink-3: #7C8490; --line: #272B33;
  --accent: #2DBBA8; --accent-hover: #4CCBB9; --accent-ink: #062320; --accent-soft: #15302D; --accent-text: #5ED6C5;
  --good: #5BCB8A; --good-soft: #16291F; --warn: #EDB15A; --warn-soft: #2D2416; --bad: #F2837A; --bad-soft: #33201E;
  --ig: #F07AA8; --ig-soft: #361B27; --tg: #62B8E6; --tg-soft: #142838;
  --s1: #5B9BEA; --s2: #EE8A5E; --s3: #3DC493; --s4: #E9B53F;
  --bubble-in: #1F232A; --bubble-out: #2DBBA8; --bubble-out-ink: #062320;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.25); --overlay: rgba(0,0,0,.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.num { font-variant-numeric: tabular-nums; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
svg.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------- Karkas ---------- */
.app { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100%; }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: 16px 12px 12px; display: flex; flex-direction: column; gap: 8px; position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: none; }
.side::-webkit-scrollbar { display: none; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 6px; }
.logo { width: 32px; height: 32px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 600; font-size: 14px; letter-spacing: -.02em; }
.brand b { font-weight: 600; font-size: 16px; letter-spacing: -.02em; display: block; line-height: 1.2; }
.brand b span { color: var(--accent-text); }
.brand small { color: var(--accent-text); font-size: 12px; font-weight: 500; }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding: 10px 10px 4px; font-weight: 500; }
.nav-label:first-child { padding-top: 4px; }
.nav button { display: flex; align-items: center; gap: 11px; padding: 7px 10px; border-radius: 8px; color: var(--ink-2); background: none; border: 0; text-align: left; font-weight: 400; font-size: 13.5px; width: 100%; }
.nav button:hover { background: var(--surface-2); color: var(--ink); }
.nav button[aria-current="page"] { background: var(--accent); color: var(--accent-ink); font-weight: 500; }
.nav button svg.i { width: 17px; height: 17px; }
.nav .count { margin-left: auto; background: var(--bad-soft); color: var(--bad); font-size: 11px; font-weight: 600; border-radius: 99px; padding: 0 7px; line-height: 18px; }
.nav button[aria-current="page"] .count { background: color-mix(in srgb, var(--accent-ink) 16%, transparent); color: var(--accent-ink); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 10px; position: relative; }
.me-row { display: flex; align-items: center; gap: 10px; padding: 2px 6px; font-size: 13.5px; }
.me-row .grow { flex: 1; min-width: 0; }
.me-row small { display: block; color: var(--ink-3); font-size: 12px; }
.foot-tools { display: flex; align-items: center; gap: 8px; }
.foot-tools .seg { flex: 1; }

.seg { display: flex; background: var(--surface-2); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { flex: 1; border: 0; background: none; padding: 5px 8px; border-radius: 7px; color: var(--ink-3); font-size: 12.5px; font-weight: 500; display: flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg svg.i { width: 15px; height: 15px; }
.tabs { display: inline-flex; gap: 2px; border: 1px solid var(--line); border-radius: 10px; padding: 3px; background: var(--surface); }
.tabs button { border: 0; background: none; padding: 5px 12px; border-radius: 7px; color: var(--ink-3); font-size: 13px; font-weight: 500; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-pressed="true"] { background: var(--surface-2); color: var(--ink); }

.role-card { display: flex; flex-direction: column; gap: 6px; padding: 0 2px; }
.role-card span { font-size: 11px; color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase; padding-left: 4px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bg); display: flex; align-items: center; gap: 10px; padding-block: 30px 18px; padding-left: max(40px, env(safe-area-inset-left, 0px)); padding-right: max(40px, env(safe-area-inset-right, 0px)); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
.top h1 { font-size: 21px; font-weight: 600; letter-spacing: -.015em; }
.top .sub { color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.top .grow { flex: 1; min-width: 0; }
.show-m { display: none !important; }
.search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 7px 12px; color: var(--ink-3); }
.search input { border: 0; outline: 0; background: none; width: 100%; color: var(--ink); font-size: 13.5px; }
.icon-btn { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; color: var(--ink-2); position: relative; flex: none; }
.icon-btn:hover { color: var(--ink); }
.icon-btn.plain { border-color: transparent; background: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 10px; padding: 8px 14px; font-weight: 500; font-size: 13.5px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost { border-color: transparent; background: none; color: var(--accent-text); padding-inline: 8px; }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn svg.i { width: 16px; height: 16px; }

.view { padding-block: 0 48px; padding-left: max(40px, env(safe-area-inset-left, 0px)); padding-right: max(40px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 22px; width: 100%; }

/* ---------- Umumiy bloklar ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 24px; min-width: 0; }
.card-h { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 2px; align-items: start; margin-bottom: 18px; }
.card-h > * { grid-column: 1; }
.card-h h2 { font-size: 15.5px; font-weight: 600; letter-spacing: -.005em; }
.card-h .hint { color: var(--ink-3); font-size: 13px; }
.card-h .end { grid-column: 2; grid-row: 1 / span 2; justify-self: end; }
.grid { display: grid; gap: 22px; }
.g-2 { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); font-size: 13px; }
.row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 5px 12px; font-size: 13px; font-weight: 500; color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; }
.chip:hover { color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent-text); }
.chip b { font-weight: 500; opacity: .7; }

.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 99px; padding: 2px 9px 2px 8px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-new { background: var(--accent-soft); color: var(--accent-text); }
.st-shipped { background: var(--warn-soft); color: var(--warn); }
.st-delivered { background: var(--good-soft); color: var(--good); }
.st-cancelled, .st-returned { background: var(--bad-soft); color: var(--bad); }

.ch { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; font-size: 10px; font-weight: 600; flex: none; letter-spacing: .02em; }
.ch-ig { background: var(--ig-soft); color: var(--ig); }
.ch-tg { background: var(--tg-soft); color: var(--tg); }

.av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 12.5px; flex: none; color: #fff; }
.av.sm { width: 24px; height: 24px; font-size: 10.5px; }
.av.lg { width: 44px; height: 44px; font-size: 16px; }

.bar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.bar.good > i { background: var(--good); }
.bar.warn > i { background: var(--warn); }

.tbl-wrap { overflow-x: auto; margin: 0 -24px -22px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-weight: 500; color: var(--ink-3); font-size: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
th:first-child, td:first-child { padding-left: 24px; }
th:last-child, td:last-child { padding-right: 24px; }
td.r, th.r { text-align: right; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover td { background: var(--surface-2); }

.empty-note { display: flex; gap: 10px; align-items: flex-start; background: var(--surface-2); color: var(--ink-2); border-radius: 10px; padding: 11px 13px; font-size: 13px; }
.empty-note svg.i { color: var(--accent-text); width: 16px; height: 16px; margin-top: 1px; }

/* ---------- Bosh sahifa ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; min-height: 160px; min-width: 0; }
.kpi .h { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; color: var(--ink-2); font-size: 13.5px; }
.kpi .ico { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; flex: none; }
.kpi .ico svg.i { width: 16px; height: 16px; }
.kpi .v { font-size: 25px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.kpi .v small { font-size: 13px; color: var(--ink-3); font-weight: 400; letter-spacing: 0; }
.kpi .f { margin-top: auto; font-size: 12.5px; color: var(--ink-3); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.kpi .up { color: var(--good); font-weight: 500; }
.kpi .warn-t { color: var(--warn); font-weight: 500; }
.kpi .bar { height: 3px; margin-top: auto; }
.page-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: -6px; }

.stat-list { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.stat-list > div { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 44px; gap: 10px; align-items: center; font-size: 13.5px; }
.stat-list i { width: 8px; height: 8px; border-radius: 50%; }
.stat-list b { font-weight: 600; text-align: right; }
.stat-list span.p { color: var(--ink-3); font-size: 12.5px; text-align: right; }
.big-n { display: flex; align-items: baseline; gap: 8px; }
.big-n b { font-size: 25px; font-weight: 600; letter-spacing: -.02em; }
.big-n span { color: var(--ink-2); }

.todo { display: flex; flex-direction: column; }
.todo button { display: flex; align-items: center; gap: 12px; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; width: 100%; }
.todo button:last-child { border-bottom: 0; padding-bottom: 0; }
.todo button:first-child { padding-top: 0; }
.todo .ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.todo .ic svg.i { width: 16px; height: 16px; }
.todo .t { flex: 1; min-width: 0; }
.todo .t b { display: block; font-weight: 500; font-size: 13.5px; }
.todo .t span { color: var(--ink-3); font-size: 12.5px; }
.todo .go { color: var(--ink-3); }
.ic-bad { background: var(--bad-soft); color: var(--bad); }
.ic-warn { background: var(--warn-soft); color: var(--warn); }
.ic-acc { background: var(--accent-soft); color: var(--accent-text); }
.ic-good { background: var(--good-soft); color: var(--good); }

.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--bg); padding: 6px 10px; border-radius: 8px; font-size: 12.5px; white-space: nowrap; transform: translate(-50%, -100%); opacity: 0; transition: opacity .12s; }
.chart .tip.on { opacity: 1; }

.seller-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.seller-row:last-child { border-bottom: 0; }
.seller-row .nm { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; font-size: 14px; }
.seller-row .nm b { font-weight: 600; }
.rank { font-weight: 600; color: var(--ink-3); text-align: center; }

.hbars { display: flex; flex-direction: column; gap: 10px; }
.hb { display: grid; grid-template-columns: 120px minmax(0, 1fr) 64px; gap: 10px; align-items: center; font-size: 13.5px; }
.hb .bar { height: 10px; }
.hb .v { text-align: right; font-weight: 600; }

.stackbar { display: flex; height: 14px; border-radius: 99px; overflow: hidden; gap: 2px; background: var(--surface); }
.legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin-top: 14px; font-size: 13.5px; }
.legend div { display: flex; align-items: center; gap: 8px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend b { margin-left: auto; font-weight: 600; }

.prod-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.prod-row:last-child { border-bottom: 0; }
.thumb { width: 40px; height: 40px; border-radius: 10px; flex: none; display: grid; place-items: center; }
.thumb svg { width: 28px; height: 28px; }

/* ---------- Suhbatlar ---------- */
.inbox { display: grid; grid-template-columns: 320px minmax(0, 1fr) 300px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; height: calc(100vh - 160px); }
.conv-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.conv-tools { padding: 12px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.conv-tools .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.conv-tools .chips::-webkit-scrollbar, .quick::-webkit-scrollbar { display: none; }
.convs, .msgs, .cust-panel { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.conv-tools .chip { padding: 4px 10px; font-size: 13px; flex: none; }
.convs { overflow-y: auto; flex: 1; }
.conv { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; padding: 12px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; width: 100%; align-items: start; }
.conv:hover { background: var(--surface-2); }
.conv[aria-current="true"] { background: var(--accent-soft); }
.conv .who { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; min-width: 0; }
.conv .who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv .last { color: var(--ink-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.conv .meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 12px; color: var(--ink-3); }
.conv .wait { color: var(--bad); font-weight: 600; }
.conv .unread { background: var(--accent); color: var(--accent-ink); border-radius: 99px; font-size: 11px; font-weight: 600; padding: 1px 7px; }
.conv .tags { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.tag { font-size: 11.5px; font-weight: 600; border-radius: 6px; padding: 2px 7px; background: var(--surface-2); color: var(--ink-2); }
.tag.acc { background: var(--accent-soft); color: var(--accent-text); }
.tag.good { background: var(--good-soft); color: var(--good); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }

.thread { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.thread-h { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.thread-h .grow { flex: 1; min-width: 0; }
.thread-h b { font-weight: 600; }
.assign { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 5px 10px 5px 6px; background: var(--surface); font-size: 13.5px; }
.msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.day-sep { align-self: center; font-size: 12px; color: var(--ink-3); background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 2px 10px; margin: 6px 0; }
.msg { max-width: 72%; padding: 9px 12px; border-radius: 14px; font-size: 14px; line-height: 1.4; }
.msg small { display: block; font-size: 11px; margin-top: 4px; opacity: .7; }
.msg.in { background: var(--surface); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.out { background: var(--bubble-out); color: var(--bubble-out-ink); align-self: flex-end; border-bottom-right-radius: 4px; }
.msg.photo { padding: 6px; }
.msg.photo .ph { width: 180px; max-width: 100%; aspect-ratio: 1; border-radius: 10px; display: grid; place-items: center; }
.msg.photo .ph svg { width: 90px; height: 90px; }
.msg.auto { background: var(--surface); border: 1px dashed var(--accent); color: var(--ink); align-self: flex-end; border-bottom-right-radius: 4px; }
.msg.auto .by { color: var(--accent-text); font-weight: 600; font-size: 11.5px; display: flex; gap: 4px; align-items: center; margin-bottom: 2px; }
.msg.auto .by svg.i { width: 14px; height: 14px; }
.composer { border-top: 1px solid var(--line); padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.suggest { display: flex; gap: 10px; align-items: flex-start; background: var(--accent-soft); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; }
.suggest .t { flex: 1; min-width: 0; }
.suggest .t b { color: var(--accent-text); font-size: 12px; display: block; margin-bottom: 2px; }
.quick { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.quick button { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 4px 10px; font-size: 13px; color: var(--ink-2); }
.quick button:hover { border-color: var(--accent); color: var(--accent-text); }
.input-row { display: flex; gap: 8px; align-items: center; }
.input-row input { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 10px 14px; outline: 0; }
.input-row input:focus { border-color: var(--accent); }
.sign { font-size: 12px; color: var(--ink-3); }

.cust-panel { border-left: 1px solid var(--line); overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.cust-top { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 12px; font-size: 13.5px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; text-align: right; font-weight: 500; }
.ai-box { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.ai-box .h { display: flex; gap: 6px; align-items: center; font-weight: 600; font-size: 13.5px; color: var(--accent-text); }
.ai-field { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; }
.ai-field span { color: var(--ink-3); }
.ai-field b { font-weight: 600; text-align: right; }
.ai-field.miss b { color: var(--warn); }
.back-btn { display: none; }

/* ---------- Buyurtmalar ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toolbar .end { margin-left: auto; display: flex; gap: 8px; }
.payline { display: flex; flex-direction: column; gap: 4px; min-width: 110px; }
.payline .bar { height: 6px; }
.payline span { font-size: 12px; color: var(--ink-3); }
.board { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.col { background: var(--surface-2); border-radius: var(--r); padding: 10px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.col-h { display: flex; align-items: center; gap: 8px; padding: 4px 4px 2px; font-weight: 600; font-size: 14px; }
.col-h .n { color: var(--ink-3); font-weight: 500; }
.col-h .sum { margin-left: auto; font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.ocard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; text-align: left; width: 100%; }
.ocard:hover { border-color: var(--accent); }
.ocard .top-r { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-3); }
.ocard .p { font-weight: 600; font-size: 14px; }
.ocard .bot { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.ocard .bot .sum { margin-left: auto; font-weight: 600; }
.ocard .late { color: var(--bad); font-weight: 600; font-size: 12px; }

/* ---------- Katalog ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; }
.pcard .img { aspect-ratio: 4/3; display: grid; place-items: center; position: relative; max-width: 100%; }
.pcard .img svg { width: 46%; height: auto; }
.pcard .img .tag { position: absolute; top: 10px; left: 10px; }
.pcard .body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pcard .body .row { justify-content: space-between; }
.pcard .price { font-weight: 600; font-size: 16px; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.sw { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-2); border: 1px solid var(--line); border-radius: 99px; padding: 2px 8px 2px 3px; }
.sw i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--line); }
.sw.low { border-color: var(--bad); color: var(--bad); }

/* ---------- Sotuvchilar ---------- */
/* Sotuvchilar: keng ekranda 4, o‘rtachada 3, planshetda 2, telefonda 1 ustun – raqamlar sig‘ishi uchun kartochka 300px dan torayimaydi */
.sel-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1640px) { .sel-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Aynan 4 ta sotuvchi bo‘lsa – o‘rta ekranda 3+1 emas, 2×2 */
@media (max-width: 1640px) { .sel-grid:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1280px) { .sel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .sel-grid { grid-template-columns: minmax(0, 1fr); } }
.sel-card { display: flex; flex-direction: column; gap: 14px; }
.sel-card .head { display: flex; gap: 12px; align-items: center; }
.sel-card .head b { display: block; font-size: 16px; font-weight: 600; }
.mini-kpi { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.2fr) minmax(0, 1.1fr); gap: 8px; }
.mini-kpi div { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; }
.mini-kpi span { font-size: 12px; color: var(--ink-3); display: block; white-space: nowrap; }
.mini-kpi b { font-size: 15px; font-weight: 600; white-space: nowrap; display: block; overflow: hidden; text-overflow: ellipsis; }
.owed { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; flex-wrap: wrap; }
.owed b { font-size: 18px; font-weight: 600; display: block; white-space: nowrap; }
.rules { display: flex; flex-direction: column; }
.rule { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rule:last-child { border-bottom: 0; }
.rule b { font-weight: 600; display: block; }
.rule span { color: var(--ink-3); font-size: 13px; }

/* ---------- Avtomatlashtirish ---------- */
.flows { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.flow { display: flex; flex-direction: column; gap: 12px; }
.flow .fh { display: flex; align-items: center; gap: 10px; }
.flow .fh b { flex: 1; font-weight: 600; }
.step { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; align-items: start; font-size: 14px; }
.step .k { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding-top: 3px; }
.step .k.if { color: var(--warn); }
.step .k.then { color: var(--accent-text); }
.step .v { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; }
.flow .stats { display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-3); border-top: 1px solid var(--line); padding-top: 10px; }
.switch { position: relative; width: 42px; height: 24px; border-radius: 99px; background: var(--line); border: 0; padding: 0; flex: none; transition: background .15s; }
.switch::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[aria-checked="true"] { background: var(--good); }
.switch[aria-checked="true"]::after { transform: translateX(18px); }

/* ---------- Mening hisobim (sotuvchi) ---------- */
.ring-wrap { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.ring { width: 150px; height: 150px; position: relative; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .c { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .c b { font-size: 30px; font-weight: 600; display: block; line-height: 1; letter-spacing: -.02em; }
.ring .c span { font-size: 12px; color: var(--ink-3); }
.steps-b { display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 200px; }
.steps-b div { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.steps-b .ok { color: var(--good); }

/* ---------- Sozlamalar ---------- */
.set-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.set-nav { display: flex; flex-direction: column; gap: 2px; }
.set-nav button { border: 0; background: none; text-align: left; padding: 9px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 500; }
.set-nav button[aria-current="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
.channel { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.channel:last-child { border-bottom: 0; }
.channel .ch { width: 40px; height: 40px; border-radius: 12px; font-size: 14px; }
.channel .t { flex: 1; min-width: 0; }
.channel .t b { display: block; font-weight: 600; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field .label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field input, .field select, .field textarea, .txt-row input, .txt-row textarea, input.inp { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 12px; outline: 0; width: 100%; min-width: 0; }
.field input:focus, .field select:focus, .txt-row input:focus, .txt-row textarea:focus, input.inp:focus { border-color: var(--accent); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

/* ---------- Yangi buyurtma oynasi va kartochka ---------- */
.overlay { position: fixed; inset: 0; background: var(--overlay); z-index: 50; display: flex; justify-content: flex-end; }
.sheet { background: var(--surface); width: min(560px, 100%); height: 100%; display: flex; flex-direction: column; box-shadow: var(--shadow); animation: slide .2s ease-out; }
@keyframes slide { from { transform: translateX(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet-h { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); padding-top: max(16px, env(safe-area-inset-top, 0px)); }
.sheet-h h2 { font-size: 18px; font-weight: 600; flex: 1; }
.sheet-b { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 18px; }
.sheet-f { border-top: 1px solid var(--line); padding: 14px 20px; padding-bottom: max(14px, env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 10px; }
.sec-t { font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pick button { border: 1.5px solid var(--line); background: var(--surface); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12.5px; text-align: center; }
.pick button .thumb { width: 100%; height: 56px; }
.pick button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.pick button b { font-weight: 600; font-size: 13px; }
.colors { display: flex; gap: 8px; flex-wrap: wrap; }
.colors button { border: 1.5px solid var(--line); background: var(--surface); border-radius: 99px; padding: 5px 12px 5px 6px; display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; }
.colors button i { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line); }
.colors button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.colors button:disabled { opacity: .45; cursor: not-allowed; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.qty button { width: 40px; height: 40px; border: 0; background: var(--surface-2); font-size: 18px; }
.qty b { width: 44px; text-align: center; font-weight: 600; }
.sum-box { background: var(--surface-2); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.sum-box .row { justify-content: space-between; }
.sum-box .tot { font-size: 17px; font-weight: 600; border-top: 1px solid var(--line); padding-top: 8px; }
.earn { display: flex; gap: 10px; align-items: center; background: var(--good-soft); color: var(--good); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; font-weight: 500; }
.timeline { display: flex; flex-direction: column; gap: 0; }
.tl { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; position: relative; padding-bottom: 14px; }
.tl::before { content: ""; position: absolute; left: 10px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.tl:last-child::before { display: none; }
.tl i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-3); }
.tl i svg.i { width: 13px; height: 13px; stroke-width: 2.4; }
.tl.done i { background: var(--good-soft); color: var(--good); }
.tl b { font-weight: 600; font-size: 14px; display: block; }
.tl span { font-size: 12.5px; color: var(--ink-3); }

.toast { position: fixed; left: 50%; bottom: max(24px, calc(env(safe-area-inset-bottom, 0px) + 84px)); transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 500; font-size: 14px; opacity: 0; pointer-events: none; transition: all .2s; z-index: 80; display: flex; gap: 8px; align-items: center; max-width: calc(100% - 32px); }
.toast.on { opacity: 1; transform: translateX(-50%); }

/* ---------- Pastki menyu (telefon) ---------- */
.tabbar { display: none; }

@media (max-width: 1240px) {
  .inbox { grid-template-columns: 300px minmax(0, 1fr); }
  .cust-panel { display: none; }
}
@media (max-width: 1080px) {
  .g-2, .g-3 { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search { display: none; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .top { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 12px; }
  .top h1 { font-size: 19px; }
  .top .hide-m { display: none; }
  .view { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); gap: 16px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--line); padding-top: 6px; padding-bottom: max(8px, env(safe-area-inset-bottom, 0px)); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
  .tabbar button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--ink-3); padding: 4px 0; position: relative; }
  .tabbar button[aria-current="page"] { color: var(--accent-text); font-weight: 600; }
  .tabbar .plus { width: 52px; height: 52px; border-radius: 16px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; margin-top: -22px; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 45%, transparent); }
  .tabbar .plus svg.i { width: 26px; height: 26px; }
  .tabbar .count { position: absolute; top: 0; left: calc(50% + 6px); background: var(--bad); color: var(--surface); font-size: 10px; font-weight: 600; border-radius: 99px; padding: 0 5px; }
  .kpis { gap: 12px; }
  .kpi { padding: 16px; min-height: 0; gap: 10px; }
  .kpi .v { font-size: 21px; }
  .kpi .ico { width: 30px; height: 30px; }
  .card { padding: 18px; }
  .tbl-wrap { margin: 0 -18px -18px; }
  th:first-child, td:first-child { padding-left: 18px; }
  th:last-child, td:last-child { padding-right: 18px; }
  .show-m { display: grid !important; }
  .inbox { grid-template-columns: minmax(0, 1fr); height: calc(100vh - 170px); border-radius: 12px; }
  .inbox.open .conv-list { display: none; }
  .inbox:not(.open) .thread { display: none; }
  .back-btn { display: grid; }
  .msg { max-width: 85%; }
  .set-layout { grid-template-columns: minmax(0, 1fr); }
  .set-nav { flex-direction: row; overflow-x: auto; }
  .set-nav button { flex: none; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .flows { grid-template-columns: minmax(0, 1fr); }
  .hb { grid-template-columns: 96px minmax(0, 1fr) 56px; }
  .toolbar .end { margin-left: 0; }
}

/* ================= Ilova qo‘shimchalari ================= */
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
a.btn, .nav a, .tabbar a { text-decoration: none; }
form.inline { display: inline; margin: 0; }
.nav a, .nav .soon { display: flex; align-items: center; gap: 11px; padding: 7px 10px; border-radius: 8px; color: var(--ink-2); font-size: 13.5px; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); font-weight: 500; }
.nav .soon { color: var(--ink-3); cursor: default; }
.nav .soon em { margin-left: auto; font-style: normal; font-size: 11px; color: var(--ink-3); }
.nav svg.i { width: 17px; height: 17px; }
.side-foot .logout { text-decoration: none; display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 7px 10px; border-radius: 8px; color: var(--ink-2); font-size: 13.5px; }
.side-foot .logout:hover { background: var(--surface-2); color: var(--ink); }
.av.acc { background: var(--accent); color: var(--accent-ink); }

.flash { display: flex; gap: 10px; align-items: center; border-radius: 12px; padding: 11px 14px; font-size: 13.5px; font-weight: 500; }
.flash.good { background: var(--good-soft); color: var(--good); }
.flash.bad { background: var(--bad-soft); color: var(--bad); }
.flash.warn { background: var(--warn-soft); color: var(--warn); }
.flash svg.i { width: 16px; height: 16px; }

.err { color: var(--bad); font-size: 12.5px; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--bad); }
.field .help { color: var(--ink-3); font-size: 12.5px; }
.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.form-card { max-width: none; }

.secret { display: flex; flex-direction: column; gap: 10px; background: var(--accent-soft); border-radius: var(--r); padding: 18px 22px; }
.secret b.pw { font-size: 22px; font-weight: 600; letter-spacing: .06em; font-variant-numeric: tabular-nums; color: var(--ink); user-select: all; }
.secret .faint { color: var(--ink-2); }

.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); }
.actions { display: flex; gap: 6px; justify-content: flex-end; }
td .who { display: flex; align-items: center; gap: 10px; }
td .who b { font-weight: 500; display: block; }
td .who small { color: var(--ink-3); font-size: 12px; }
.pill.off { background: var(--surface-2); color: var(--ink-3); }
.pill.on { background: var(--good-soft); color: var(--good); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }

/* Kirish sahifasi */
.auth { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: min(400px, 100%); display: flex; flex-direction: column; gap: 18px; }
.auth-card .brand { padding: 0; }
.auth-card h1 { font-size: 21px; font-weight: 600; letter-spacing: -.015em; }
.auth-card form { display: flex; flex-direction: column; gap: 14px; }
.auth-card .btn.primary { width: 100%; padding: 11px 14px; }
.auth-theme { position: fixed; top: 16px; right: 16px; }

.welcome { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.welcome .card { display: flex; flex-direction: column; gap: 10px; }
.welcome .ico { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; }
.welcome .ico svg.i { width: 16px; height: 16px; }
.welcome b { font-weight: 600; font-size: 15px; }

/* Pastki menyu havolalar va forma bilan */
@media (max-width: 860px) {
  .tabbar { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .tabbar a, .tabbar form button { border: 0; background: none; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--ink-3); padding: 4px 0; text-decoration: none; }
  .tabbar a[aria-current="page"] { color: var(--accent-text); font-weight: 600; }
  .tabbar form { margin: 0; }
}
.card-h.mt { margin-top: 26px; }

/* ================= 2-hafta: katalog va buyurtmalar ================= */
.mt-s { margin-top: 14px; }
.grow { flex: 1; min-width: 0; }
.wrap { white-space: normal; }
.stack-l { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.bad-t { color: var(--bad); }
.good-t { color: var(--good); font-weight: 500; }
.warn-t { color: var(--warn); font-weight: 600; }
.muted-row td { color: var(--ink-3); }
svg.dot { width: 14px; height: 14px; flex: none; }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.btn.big { width: 100%; padding: 13px 16px; font-size: 15px; }
.btn.ghost.danger { color: var(--bad); }

/* SVG chiziq (CSP: inline style yo‘q) */
.bar-svg { display: block; width: 100%; height: 6px; }
.bar-svg rect { rx: 3px; ry: 3px; }
.bar-svg .bg { fill: var(--surface-2); }
.bar-svg .fg { fill: var(--accent); }
.bar-svg.good .fg { fill: var(--good); }
.bar-svg.warn .fg { fill: var(--warn); }

/* Tovar rasmi o‘rnidagi chizma */
svg.art { width: 46%; height: auto; }
.art-line { fill: none; stroke: var(--ink-3); stroke-width: 1.2; stroke-linejoin: round; }
.thumb { background: var(--surface-2); }
.thumb svg.art { width: 30px; }

/* Katalog kartochkasi havola bo‘lib */
a.pcard { color: inherit; text-decoration: none; }
a.pcard:hover { border-color: var(--accent); text-decoration: none; }
.pcard .img { background: var(--surface-2); }
.pcard.off { opacity: .6; }
.pcard .body b { font-weight: 600; }
.sw svg.dot { width: 13px; height: 13px; }

/* Belgilash katakchasi va variant tanlash */
label.check { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
label.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.colors label.opt { border: 1.5px solid var(--line); background: var(--surface); border-radius: 99px; padding: 5px 12px 5px 8px; display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; cursor: pointer; }
.colors label.opt input { position: absolute; opacity: 0; pointer-events: none; }
.colors label.opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.colors label.opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.colors button svg.dot { width: 16px; height: 16px; }

/* Radio tugmalar segment ko‘rinishida */
.seg-radio { display: flex; flex-wrap: wrap; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; }
.seg-radio label { flex: 1; position: relative; cursor: pointer; }
.seg-radio input { position: absolute; opacity: 0; pointer-events: none; }
.seg-radio span { display: block; text-align: center; padding: 7px 10px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--ink-3); white-space: nowrap; }
.seg-radio label:hover span { color: var(--ink); }
.seg-radio input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg-radio input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Jadval ichidagi ochiladigan oyna (<details>) */
details.pop { position: relative; display: inline-block; text-align: left; }
details.pop > summary { list-style: none; cursor: pointer; }
details.pop > summary::-webkit-details-marker { display: none; }
.pop-b { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 280px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 14px; display: flex; flex-direction: column; gap: 16px; white-space: normal; }
.add-variant { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 20px; border-top: 1px solid var(--line); padding-top: 16px; }
.add-variant .field { min-width: 120px; flex: 1; }

/* Buyurtmalar ro‘yxati */
.filters { padding: 0; }
.filters > summary { list-style: none; cursor: pointer; padding: 14px 20px; display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--ink-2); }
.filters > summary::-webkit-details-marker { display: none; }
.filters > summary svg.i { width: 16px; height: 16px; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; padding: 0 20px 18px; align-items: end; }
.filter-grid .form-actions { margin: 0; }
.list-card > .tbl-wrap:first-child { margin-top: -18px; }
/* Hisobotlar: oy natijasi – savdo − tannarx = yalpi foyda − sotuvchilar haqi = sof foyda */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr) 22px minmax(0, 1fr) 22px minmax(0, 1fr) 22px minmax(0, 1.1fr); align-items: stretch; gap: 6px; }
.calc-box { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); min-width: 0; }
.calc-box > span { font-size: 12.5px; color: var(--ink-3); }
.calc-box b { font-size: 20px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calc-box small { font-size: 12px; color: var(--ink-3); line-height: 1.35; }
.calc-box.warn { background: var(--warn-soft); }
.calc-box.warn b { color: var(--warn); font-size: 16px; padding: 3px 0; }
.calc-box.result { background: var(--accent-soft); }
.calc-box.result b { color: var(--accent-text); }
.calc-box.result.neg { background: var(--bad-soft); }
.calc-box.result.neg b { color: var(--bad); }
.calc-op { display: grid; place-items: center; font-size: 20px; color: var(--ink-3); }
.share-cell { display: flex; align-items: center; gap: 10px; min-width: 140px; }
.share-cell .bar-svg { flex: 1; max-width: 180px; }
tr.future td, tr.empty-row td { color: var(--ink-3); }
tr.future td { opacity: .6; }
.report-table td.r[colspan] { text-align: left; font-size: 13px; }
.export-list.export-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.export-3 .export-row { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: start; gap: 10px 12px; padding: 14px; }
.export-3 .export-row > .btn { grid-column: 2; justify-self: start; align-self: end; }
.export-3 .export-row .row { flex-wrap: wrap; gap: 8px; }
.export-3 .export-row .dp { flex: 1; min-width: 118px; }
@media (max-width: 1240px) { .export-list.export-3 { grid-template-columns: minmax(0, 1fr); } }
.export-list { display: flex; flex-direction: column; gap: 10px; }
.export-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.export-row .ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.export-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.export-row .grow b { font-weight: 600; font-size: 13.5px; }
.export-row input { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 5px 8px; font-size: 13px; min-width: 0; }
@media (max-width: 1240px) { .calc { grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr) 22px minmax(0, 1fr); } .calc > :nth-child(6) { display: none; } }
@media (max-width: 760px) { .calc { grid-template-columns: minmax(0, 1fr); } .calc-op { display: none; } .export-row { flex-wrap: wrap; } } /* sarlavhasiz jadval – kartochka tepasiga yaqin */
/* Jadval kartochka oxirida bo‘lsa – pastki chetga yopishadi; ostida matn bo‘lsa – matnga joy qoladi */
.tbl-wrap:not(:last-child) { margin-bottom: 0; }
a.row-link { color: var(--ink); }
.payline .bar-svg { width: 110px; }
.pager { display: flex; gap: 8px; justify-content: center; }
.search input[type="search"]::-webkit-search-cancel-button { display: none; }
.toolbar form.search { display: flex; }

/* Buyurtma kartochkasi */
.prod-row .thumb { width: 44px; height: 44px; }
.prod-row b { font-weight: 600; }
.pay-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pay-row:last-of-type { border-bottom: 0; }
.pay-row .ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.pay-row .ic svg.i { width: 16px; height: 16px; }
.pay-row b { font-weight: 600; }
.pay-form { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.status-actions { display: flex; flex-direction: column; gap: 10px; }
.status-actions form { display: flex; gap: 8px; flex-wrap: wrap; }
.status-actions input[name="reason"] { flex: 1; min-width: 140px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 12px; }
.status-actions .btn.primary { flex: 1; padding: 11px 14px; }
.tl.bad i { background: var(--bad-soft); color: var(--bad); }

/* Yangi buyurtma formasi */
.picker { display: flex; flex-direction: column; gap: 14px; }
.pick { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.pick button { align-items: flex-start; text-align: left; padding: 10px 12px; gap: 2px; }
.pick button:hover { border-color: var(--accent); }
.pick-search { display: flex !important; }
.cart { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cart-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.cart-row:last-child { border-bottom: 0; }
.cart-row b { font-weight: 600; }
.cart-row .faint { display: flex; align-items: center; gap: 6px; }
.cart-row .line-sum { min-width: 84px; text-align: right; }
.cart-empty { padding: 4px 0; }
.qty { background: var(--surface); }
.qty button { width: 34px; height: 34px; display: grid; place-items: center; }
.qty button svg.i { width: 16px; height: 16px; }
.qty b { width: 36px; }
textarea { font: inherit; resize: vertical; }

@media (max-width: 860px) {
  .pay-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .pay-form .btn { grid-column: 1 / -1; }
  .cart-row { flex-wrap: wrap; }
  .cart-row .grow { flex-basis: 100%; }
  .cart-row .line-sum { margin-left: auto; }
  .pop-b { position: fixed; left: 16px; right: 16px; top: auto; bottom: 90px; width: auto; }
  table.orders th:nth-child(3), table.orders td:nth-child(3), table.orders th:nth-child(5), table.orders td:nth-child(5) { display: none; }
}
a.link-card { color: inherit; text-decoration: none; } a.link-card:hover { border-color: var(--accent); text-decoration: none; }
[hidden] { display: none !important; }
svg.dot circle { stroke: var(--ink-3); stroke-opacity: .45; }
details.refund > summary { list-style: none; cursor: pointer; margin-top: 12px; display: inline-flex; }
details.refund > summary::-webkit-details-marker { display: none; }

/* ---------- 3-hafta: sotuvchilar haqi ---------- */
.tabs a { padding: 5px 12px; border-radius: 7px; color: var(--ink-3); font-size: 13px; font-weight: 500; text-decoration: none; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a[aria-current="page"] { background: var(--surface-2); color: var(--ink); }
nav.tabs { align-self: flex-start; }
.month-nav { display: flex; align-items: center; gap: 8px; }
.month-nav b { font-weight: 600; min-width: 116px; text-align: center; }
.icon-btn.off { opacity: .35; pointer-events: none; }
.row-between { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; margin-bottom: 6px; }
.sel-card .head a { color: inherit; }
.sel-card .head .faint { display: block; }
.sel-card .bar-svg { margin-bottom: 4px; }
.rule .ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; }
.rule .ic svg.i { width: 18px; height: 18px; }
.nowrap { white-space: nowrap; }
small.block { display: block; font-size: 12px; margin-top: 2px; white-space: normal; }
tfoot th { border-top: 1px solid var(--line); border-bottom: 0; color: var(--ink); font-weight: 600; font-size: 13px; }
.ring .ring-bg { stroke: var(--surface-2); }
.ring .ring-fg { stroke: var(--accent); }
.steps-b .faint svg.i { width: 16px; height: 16px; }
.empty-note.warn { background: var(--warn-soft); color: var(--warn); }
.empty-note.warn svg.i { color: var(--warn); }
.empty-note a { color: inherit; font-weight: 600; text-decoration: underline; }
.rule-pick { display: flex; flex-direction: column; gap: 10px; }
.rule-opt { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.rule-opt:has(input[type="radio"]:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface)); }
.rule-opt label.check b { font-weight: 600; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field.narrow { max-width: 220px; }
.seg-radio.narrow { max-width: 420px; }
.mb-s { margin-bottom: 12px; }
.help { color: var(--ink-3); font-size: 12.5px; }
.tier-rows { display: flex; flex-direction: column; gap: 10px; max-width: 520px; }
.tier-row { display: grid; grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr); gap: 10px; align-items: end; }
.tier-row .arrow { color: var(--ink-3); text-align: center; padding-bottom: 11px; }
@media (max-width: 860px) {
  .form-grid.three { grid-template-columns: minmax(0, 1fr); }
  .field.narrow { max-width: none; }
  .month-nav b { min-width: 0; }
}

/* ---------- 4-hafta: dashboard ---------- */
.row-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.range-pop { position: relative; }
.range-pop > summary { list-style: none; cursor: pointer; }
.range-pop > summary::-webkit-details-marker { display: none; }
.range-pop > summary.on { border-color: var(--accent); color: var(--accent-text); }
.range-form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 15; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 14px; display: flex; flex-direction: column; gap: 10px; width: 240px; }
.kpi .down { color: var(--bad); font-weight: 500; }
.small { font-size: 12px; }
.sdot { width: 10px; height: 10px; flex: none; display: block; }
.stat-list > div > .sdot { width: 8px; height: 8px; }
.f-acc { fill: var(--accent); } .f-warn { fill: var(--warn); } .f-good { fill: var(--good); } .f-bad { fill: var(--bad); }
.f-s1 { fill: var(--s1); } .f-s2 { fill: var(--s2); } .f-s3 { fill: var(--s3); } .f-s4 { fill: var(--s4); } .f-mute { fill: var(--ink-3); }
.stack-svg { display: block; width: 100%; height: 8px; border-radius: 4px; overflow: hidden; }
.stack-svg .bg { fill: var(--surface-2); }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .ch-grid { stroke: var(--line); stroke-width: 1; }
.chart .ch-tick { fill: var(--ink-3); font-size: 13px; font-family: var(--font); }
.chart .ch-tick.strong { fill: var(--ink); font-weight: 600; }
.chart .ch-area { fill: var(--accent); fill-opacity: .08; }
.chart .ch-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .ch-line.dashed { stroke-dasharray: 4 4; }
.chart .ch-peak-dot { fill: var(--accent); }
.chart .ch-peak { fill: var(--ink); font-size: 13px; font-weight: 600; font-family: var(--font); }
.chart .ch-end { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.chart .ch-guide { stroke: var(--ink-3); stroke-dasharray: 3 3; opacity: 0; }
.chart .ch-hdot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; opacity: 0; }
.chart.hover .ch-guide, .chart.hover .ch-hdot { opacity: 1; }
.chart .ch-hit { fill: transparent; cursor: crosshair; }
.chart .tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--bg); padding: 6px 10px; border-radius: 8px; font-size: 12.5px; white-space: nowrap; transform: translate(-50%, -100%); opacity: 0; transition: opacity .12s; z-index: 2; }
.chart .tip.on { opacity: 1; }
.todo > a { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.todo > a:last-child { border-bottom: 0; padding-bottom: 0; }
.todo > a:first-child { padding-top: 0; }
.todo > a:hover b { color: var(--accent-text); }
.hb .bar-svg { height: 8px; }
.hb .bar-svg rect { rx: 4px; ry: 4px; }
.prod-row .grow .bar-svg { margin-top: 6px; }
a.link-row { color: inherit; text-decoration: none; }
a.link-row:hover b { color: var(--accent-text); }
.prod-row .r { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.seller-row .row { gap: 8px; }
.export-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.export-box { border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.export-box .ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; }
.export-box .ic svg.i { width: 16px; height: 16px; }
.export-box b { font-weight: 600; }
.export-box .btn { align-self: flex-start; margin-top: auto; }
td.strong { font-weight: 600; }
@media (max-width: 1080px) { .export-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Telegram ---------- */
.steps-list { margin: 0 0 14px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--ink-2); }
.plain-list { margin: 6px 0 16px; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; color: var(--ink-2); }
.cmd-list dt { font-family: ui-monospace, Consolas, monospace; color: var(--accent-text); }
.cmd-list dd { text-align: left; font-weight: 400; color: var(--ink-2); }
.logout[aria-current="page"] { color: var(--accent-text); }

/* ---------- Kirim ---------- */
.cell-input { width: 72px; text-align: right; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 7px 9px; }
.cell-input.wide { width: 120px; }
.cell-input:focus { border-color: var(--accent); outline: 0; }
.purchase-table tr.picked td { background: color-mix(in srgb, var(--accent-soft) 55%, transparent); }
.purchase-total { max-width: 420px; margin-left: auto; }
.list-card > .pick-search { margin: 0 0 12px; }

/* ---------- Qo‘llanmalar ---------- */
.guide-group { display: flex; flex-direction: column; }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
a.guide-card { display: flex; flex-direction: column; gap: 6px; color: inherit; text-decoration: none; }
a.guide-card:hover { border-color: var(--accent); text-decoration: none; }
a.guide-card:hover b { color: var(--accent-text); }
.guide-card .ico { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; margin-bottom: 4px; }
.guide-card .ico svg.i { width: 17px; height: 17px; }
.guide-card b { font-weight: 600; font-size: 14.5px; }
.guide-card .muted { font-size: 13px; }
.guide-card .small { margin-top: auto; padding-top: 4px; }
.doc { max-width: 820px; font-size: 15px; line-height: 1.65; display: flex; flex-direction: column; gap: 14px; }
.doc p { margin: 0; }
.doc .lead { font-size: 16px; color: var(--ink); }
.doc h2 { font-size: 17px; font-weight: 600; margin-top: 10px; }
.doc ul, .doc ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.doc li::marker { color: var(--accent-text); }
.doc b { font-weight: 600; }
.doc a { color: var(--accent-text); }
.doc code { font-family: ui-monospace, Consolas, monospace; font-size: 13px; background: var(--surface-2); border-radius: 6px; padding: 1px 6px; }
.doc figure { margin: 4px 0; display: flex; flex-direction: column; gap: 8px; }
.doc figure img { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px; max-width: 100%; height: auto; }
.doc figcaption { font-size: 13px; color: var(--ink-3); }
.doc .tbl-wrap { margin: 0; border: 1px solid var(--line); border-radius: 12px; }
.doc table { font-size: 14px; }
.doc td { white-space: normal; vertical-align: top; }
.doc th:first-child, .doc td:first-child { padding-left: 14px; }
.doc .note, .doc .example { border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.doc .note { background: var(--accent-soft); color: var(--ink); }
.doc .note.warn { background: var(--warn-soft); }
.doc-fallback { margin: 0 0 14px; border-radius: 12px; padding: 10px 14px; font-size: 13px; background: var(--warn-soft); color: var(--ink); }
.doc .example { border-left: 3px solid var(--accent); background: var(--surface-2); }
.doc ol.steps li { padding-left: 4px; }
.doc .checklist { list-style: none; padding-left: 0; }
.doc .checklist li { display: flex; gap: 10px; align-items: flex-start; }
.doc .checklist li::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: 4px; border: 1.5px solid var(--ink-3); border-radius: 4px; }
.doc-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 820px; }
.doc-nav a { display: flex; flex-direction: column; gap: 4px; color: inherit; text-decoration: none; }
.doc-nav a:hover { border-color: var(--accent); text-decoration: none; }
.doc-nav a.r { text-align: right; grid-column: 2; }
.doc-nav b { font-weight: 600; }
@media (max-width: 860px) { .doc { font-size: 14.5px; } .doc-nav { grid-template-columns: minmax(0, 1fr); } .doc-nav a.r { grid-column: 1; } }

/* ---------- Mijozlar ---------- */
.inline-search { width: 280px; max-width: 100%; margin-left: auto; }
th a { color: inherit; text-decoration: none; }
th a:hover { color: var(--accent-text); }
@media (max-width: 860px) { .inline-search { width: 100%; margin-left: 0; } }

/* ---------- Ommaviy sayt: asosiy stillar css/site.css da; bu yerda admin ko‘rib chiqishi uchun umumiylari ---------- */
.eyebrow { display: inline-block; font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 12px; }
.lead { font-size: 17px; line-height: 1.6; color: var(--ink-2); }
.legal { max-width: 860px; margin: 0 auto; }
.legal h1 { font-size: 28px; font-weight: 600; letter-spacing: -.02em; }

/* ---------- Obuna ---------- */
.sub-banner { display: flex; gap: 10px; align-items: center; border-radius: 12px; padding: 10px 14px; font-size: 13.5px; }
.sub-banner svg.i { width: 16px; height: 16px; flex: none; }
.sub-banner a { color: inherit; font-weight: 600; text-decoration: underline; }
.sub-banner.acc { background: var(--accent-soft); color: var(--accent-text); }
.sub-banner.warn { background: var(--warn-soft); color: var(--warn); }
.sub-banner.bad { background: var(--bad-soft); color: var(--bad); }
.plan-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.plan-opt { position: relative; cursor: pointer; }
.plan-opt input { position: absolute; opacity: 0; pointer-events: none; }
.plan-opt > span { display: flex; flex-direction: column; gap: 4px; border: 1.5px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.plan-opt b { font-weight: 600; font-size: 15px; }
.plan-opt input:checked + span { border-color: var(--accent); background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface)); }
.plan-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 860px) { .plan-pick { grid-template-columns: minmax(0, 1fr); } }

.kpis-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1240px) { .kpis-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .kpis-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Platforma admini: CRM bilan bir xil yorug‘ dizayn, aksent – amber (CRM firuzasidan darhol ajraladi) ---------- */
.area-admin {
  --accent: #B45309; --accent-hover: #9A4508; --accent-ink: #FFFFFF; --accent-soft: #FDF1E3; --accent-text: #9A4508;
  --warn: #C2410C; --warn-soft: #FDECE3;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .area-admin { --accent: #F0A23B; --accent-hover: #F5B35C; --accent-ink: #1F1300; --accent-soft: #33240F; --accent-text: #F5B35C; --warn: #F2836A; --warn-soft: #3A1E16; }
}
:root[data-theme="dark"] .area-admin { --accent: #F0A23B; --accent-hover: #F5B35C; --accent-ink: #1F1300; --accent-soft: #33240F; --accent-text: #F5B35C; --warn: #F2836A; --warn-soft: #3A1E16; }
.admin-badge { display: inline-block; vertical-align: 2px; margin-left: 6px; padding: 1px 7px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); font-style: normal; font-size: 10.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.area-admin .brand small { color: var(--ink-3); }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-style: normal; font-size: 11.5px; font-weight: 600; display: inline-grid; place-items: center; }
.nav a[aria-current="page"] .nav-badge { background: var(--accent-ink); color: var(--accent); }
/* Bo‘lim ichidagi tablar (partials/admin-tabs.ejs) */
.admin-tabs { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.admin-tabs .goods-tabs { max-width: 100%; overflow-x: auto; }
.admin-tabs .goods-tabs a { white-space: nowrap; }
/* Bosh sahifa: “Diqqat” ro‘yxati */
.admin-todo-list { display: flex; flex-direction: column; }
.admin-todo { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.admin-todo:first-child { border-top: 0; padding-top: 0; }
.admin-todo:hover { text-decoration: none; }
.admin-todo:hover b { color: var(--accent-text); }
.admin-todo .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent-text); }
.admin-todo .ic.bad { background: var(--bad-soft); color: var(--bad); }
.admin-todo .ic svg.i { width: 17px; height: 17px; }
.admin-todo .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-todo small { color: var(--ink-3); font-size: 12.5px; }
.admin-todo > svg.i { width: 16px; height: 16px; color: var(--ink-3); }
.area-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-text); background: var(--accent-soft); border-radius: 99px; padding: 3px 10px 3px 8px; margin-bottom: 8px; }
.area-tag svg.i { width: 13px; height: 13px; }

/* ---------- Sidebar pasti: Qo‘llanmalar (Instagram uslubi) va profil menyusi ---------- */
:root { --ig-grad: linear-gradient(135deg, #F9A43A 0%, #EE2A7B 45%, #8A3AB9 75%, #515BD4 100%); }
.ig-link { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 12px; color: var(--ink); text-decoration: none; border: 1px solid var(--line); background: var(--surface); }
.ig-link:hover { text-decoration: none; border-color: #EE2A7B; }
.ig-link[aria-current="page"] { border-color: transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--ig-grad) border-box; border: 1.5px solid transparent; }
.ig-link .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.ig-link b { font-weight: 600; font-size: 13.5px; }
.ig-link small { color: var(--ink-3); font-size: 11.5px; }
.ig-tile { width: 32px; height: 32px; flex: none; border-radius: 9px; background: var(--ig-grad); color: #fff; display: grid; place-items: center; }
.ig-tile svg.i { width: 18px; height: 18px; stroke-width: 1.8; }
.ig-link.card { padding: 14px 16px; }

.me-menu { position: relative; border-top: 1px solid var(--line); padding-top: 10px; }
.me-btn { list-style: none; display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; cursor: pointer; user-select: none; }
.me-btn::-webkit-details-marker { display: none; }
.me-btn:hover, .me-menu[open] .me-btn { background: var(--surface-2); }
.me-btn .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.me-btn b { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-btn small { color: var(--ink-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-btn > svg.i { width: 16px; height: 16px; color: var(--ink-3); }
.me-pop { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 30; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 30px rgba(17,24,39,.14); padding: 6px; display: flex; flex-direction: column; gap: 1px; color: var(--ink); }
.me-pop-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; display: flex; flex-direction: column; }
.me-pop-head b { font-weight: 600; font-size: 13.5px; }
.me-pop-head small { color: var(--ink-3); font-size: 12px; }
.me-pop a, .me-pop button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 8px; border: 0; background: none; color: var(--ink-2); font-size: 13.5px; text-decoration: none; text-align: left; }
.me-pop a:hover, .me-pop button:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.me-pop a[aria-current="page"] { color: var(--accent-text); }
.me-pop svg.i { width: 16px; height: 16px; }
.me-pop form { margin: 0; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.me-pop .danger-t { color: var(--bad); }
.me-pop .danger-t:hover { background: var(--bad-soft); color: var(--bad); }
.me-pop-theme { display: flex; align-items: center; gap: 10px; padding: 4px; font-size: 13px; color: var(--ink-3); }
.me-pop-theme .seg { flex: 1; }
.me-pop-theme .seg button { padding: 4px 6px; justify-content: center; }
.me-pop-theme .seg button[aria-pressed="true"] { background: var(--surface); }

/* ---------- Qo‘llanmalar: Instagram uslubi ---------- */
.ig-hero { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; border-radius: 20px; padding: 28px 30px; color: #fff; background: linear-gradient(120deg, #5B2BA6 0%, #A62E92 42%, #D9306A 72%, #EE6A36 100%); }
.ig-hero::after { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; border: 34px solid rgba(255,255,255,.08); pointer-events: none; }
.ig-hero-text { max-width: 620px; display: flex; flex-direction: column; gap: 8px; position: relative; z-index: 1; }
.ig-hero-tag { display: inline-flex; align-items: center; gap: 7px; align-self: flex-start; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; background: rgba(255,255,255,.16); border-radius: 99px; padding: 4px 11px 4px 8px; }
.ig-hero-tag svg.i { width: 15px; height: 15px; }
.ig-hero h2 { font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.ig-hero p { color: rgba(255,255,255,.88); font-size: 14.5px; line-height: 1.55; }
.ig-hero-stats { display: flex; gap: 10px; position: relative; z-index: 1; }
.ig-hero-stats div { display: flex; flex-direction: column; align-items: flex-start; min-width: 92px; padding: 12px 16px; border-radius: 14px; background: rgba(20,10,40,.22); backdrop-filter: blur(4px); }
.ig-hero-stats b { font-size: 24px; font-weight: 600; line-height: 1.1; }
.ig-hero-stats span { font-size: 12px; color: rgba(255,255,255,.85); }
.guide-jump { margin-bottom: -6px; }
.guide-jump .chip { text-decoration: none; }
.guide-jump .chip:hover { border-color: #D9306A; color: var(--ink); }
.guide-group { scroll-margin-top: 110px; }
a.guide-card { gap: 8px; transition: border-color .15s, box-shadow .15s, transform .15s; }
a.guide-card:hover { border-color: transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--ig-grad) border-box; box-shadow: 0 8px 24px rgba(214,41,118,.10); transform: translateY(-1px); }
a.guide-card:hover b { color: var(--ink); }
.guide-card .ig-tile { margin-bottom: 4px; }
.guide-meta { margin-top: auto; padding-top: 6px; display: flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: 12.5px; }
.guide-meta svg.i { width: 14px; height: 14px; }
.guide-meta .go { margin-left: auto; color: #D9306A; opacity: 0; transition: opacity .15s; display: grid; }
a.guide-card:hover .guide-meta .go { opacity: 1; }
.ig-tile.sm { width: 28px; height: 28px; border-radius: 8px; }
.ig-tile.sm svg.i { width: 15px; height: 15px; }

.doc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.doc-card { position: relative; overflow: hidden; padding: 30px 34px; }
.doc-band { position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--ig-grad); }
.doc-card .doc { max-width: 880px; margin: 0 auto; }
.doc-layout .doc-nav { max-width: none; }
.doc-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 100px; }
.doc-side .card { padding: 18px 18px 14px; }
.doc-side .card-h { margin-bottom: 10px; }
.doc-toc { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; counter-reset: toc; }
.doc-toc li { counter-increment: toc; }
.doc-toc a { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 7px 8px; border-radius: 8px; color: var(--ink-2); font-size: 13px; text-decoration: none; }
.doc-toc a::before { content: counter(toc); color: var(--ink-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.doc-toc a:hover { background: var(--surface-2); color: var(--ink); }
.doc-toc a[aria-current="page"] { background: color-mix(in srgb, #D9306A 9%, var(--surface)); color: var(--ink); font-weight: 600; }
.doc-toc a[aria-current="page"]::before { color: #D9306A; }
.doc-toc small { color: var(--ink-3); font-size: 11.5px; font-weight: 400; white-space: nowrap; }
.doc-groups { display: flex; flex-direction: column; gap: 4px; }
.doc-groups a { display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.doc-groups a:hover { background: var(--surface-2); text-decoration: none; }
.doc-groups .grow { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.doc-groups b { font-weight: 500; font-size: 13px; }
.doc-groups small { color: var(--ink-3); font-size: 11.5px; }
@media (max-width: 1180px) { .doc-layout { grid-template-columns: minmax(0, 1fr); } .doc-side { position: static; } }
@media (max-width: 860px) { .ig-hero { padding: 22px 20px; } .ig-hero h2 { font-size: 20px; } .ig-hero-stats div { min-width: 0; padding: 10px 12px; } .doc-card { padding: 22px 18px; } }

/* ---------- Sahifa kengligi: forma + yon izoh, ikki ustun ---------- */
.kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 22px; align-items: stretch; }
.split-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: stretch; }
/* yonma-yon ustunlar bo‘yi teng: har ustunning oxirgi kartochkasi cho‘ziladi */
:is(.grid, .split, .split-2) > :is(.stack, .stack-l, aside, form.stack) > .card:last-child { flex: 1; }
:is(.grid, .split, .split-2) > :is(aside, form.stack) { display: flex; flex-direction: column; }
.split > .stack, .split-2 > .stack { gap: 22px; }
.aside-card { display: flex; flex-direction: column; gap: 12px; }
.aside-card .card-h { margin-bottom: 4px; }
.tips { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 13.5px; color: var(--ink-2); }
.tips li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: start; }
.tips .ic { width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; }
.tips .ic svg.i { width: 15px; height: 15px; }
.tips b { color: var(--ink); font-weight: 600; display: block; }
.role-table { width: 100%; font-size: 13px; border-collapse: collapse; }
.role-table th, .role-table td { padding: 7px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.role-table th { color: var(--ink-3); font-weight: 500; font-size: 12px; }
.role-table td:not(:first-child), .role-table th:not(:first-child) { text-align: center; }
.save-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: space-between; }
@media (max-width: 1080px) { .split, .split-2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) { .kpis-3 { grid-template-columns: minmax(0, 1fr); } }

/* Admin do‘kon ichida (rahbar nomidan) – har sahifa tepasida ko‘rinib turadi */
.acting-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-radius: 12px; padding: 10px 12px 10px 14px; font-size: 13.5px; background: #4F46E5; color: #fff; }
.acting-bar svg.i { width: 16px; height: 16px; flex: none; }
.acting-bar b { font-weight: 600; }
.acting-bar .grow { flex: 1; min-width: 220px; }
.acting-bar .btn { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.3); color: #fff; }
.acting-bar .btn:hover { background: rgba(255,255,255,.24); }

/* ---------- Kontent tahrirlash (admin) ---------- */
.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.editor-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 100px; }
.field textarea.md { min-height: 460px; font-family: ui-monospace, Consolas, monospace; font-size: 13px; line-height: 1.6; }
.field textarea.short { min-height: 84px; }
.md-help { display: flex; flex-direction: column; gap: 9px; font-size: 13px; }
.md-help div { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 10px; align-items: baseline; }
.md-help code, .img-tile code { font-family: ui-monospace, Consolas, monospace; font-size: 12px; background: var(--surface-2); border-radius: 6px; padding: 2px 6px; overflow-wrap: anywhere; color: var(--ink-2); }
.preview-card { border-style: dashed; }
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.img-grid.small { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.img-tile { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--surface); min-width: 0; }
.img-tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: var(--surface-2); border-radius: 8px; }
.img-tile .row { justify-content: space-between; }
.rows-edit { display: flex; flex-direction: column; gap: 10px; }
.row-edit { display: grid; grid-template-columns: 22px minmax(0, 1fr) minmax(0, 1.6fr); gap: 10px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.row-edit.with-icon { grid-template-columns: 22px 130px minmax(0, 1fr) minmax(0, 1.6fr); }
.row-edit.triple { grid-template-columns: 22px minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1.2fr); }
.row-n { font-size: 12px; color: var(--ink-3); padding-top: 9px; text-align: center; font-variant-numeric: tabular-nums; }
.row-edit.empty { background: none; border-style: dashed; }
.row-edit textarea, .row-edit input, .row-edit select { border: 1px solid var(--line); background: var(--surface); border-radius: 9px; padding: 8px 10px; width: 100%; min-width: 0; }
.row-edit textarea { min-height: 62px; }
.save-bar { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(6px); padding: 12px 0; border-top: 1px solid var(--line); }
.groups-edit { display: flex; flex-direction: column; gap: 8px; }
.groups-edit form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) 190px 76px auto; gap: 8px; align-items: center; }
.groups-edit input { border: 1px solid var(--line); background: var(--surface); border-radius: 9px; padding: 7px 10px; width: 100%; min-width: 0; }
.plan-edit { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.plan-edit .card { display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 1100px) { .editor-grid { grid-template-columns: minmax(0, 1fr); } .editor-side { position: static; } .plan-edit { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .row-edit, .row-edit.with-icon { grid-template-columns: minmax(0, 1fr); }
  .groups-edit form { grid-template-columns: minmax(0, 1fr) 70px; }
  .groups-edit form .hint-in { grid-column: 1 / -1; }
}

/* ---------- "Nima sotasiz" tanlovi va xususiyatlar ---------- */
.niche-hint { font-size: 12.5px; color: var(--ink-3); }
.niche-hint b { color: var(--ink-2); font-weight: 600; }
.preset-list { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-new { margin-top: 10px; max-width: 460px; }

/* ---------- Sana tanlagich (datepicker.js) – brauzer kalendari o‘rniga ---------- */
.dp { position: relative; display: block; min-width: 0; }
.row > .dp, .export-row .dp { display: inline-block; }
.dp-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 10px; padding: 10px 12px; text-align: left; font-size: 14px; white-space: nowrap; }
.dp-btn:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.dp-btn[aria-expanded="true"] { border-color: var(--accent); }
.dp-btn[aria-invalid="true"] { border-color: var(--bad); }
.dp-btn .ph { color: var(--ink-3); }
.dp-btn svg.i { width: 16px; height: 16px; color: var(--ink-3); }
.export-row .dp-btn { padding: 7px 10px; font-size: 13px; border-radius: 8px; }
.dp-pop { position: absolute; left: 0; top: calc(100% + 6px); z-index: 60; width: 284px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(17,24,39,.16); padding: 12px; }
.dp-pop.right { left: auto; right: 0; }
.dp-pop.up { top: auto; bottom: calc(100% + 6px); }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dp-head b { font-weight: 600; font-size: 14px; }
.dp-nav { width: 30px; height: 30px; border-radius: 8px; border: 0; background: none; color: var(--ink-2); display: grid; place-items: center; }
.dp-nav:hover:not(:disabled) { background: var(--surface-2); color: var(--ink); }
.dp-nav:disabled { opacity: .3; cursor: default; }
.dp-nav svg.i { width: 16px; height: 16px; }
.dp-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.dp-wd { text-align: center; font-size: 11.5px; color: var(--ink-3); padding: 4px 0 6px; }
.dp-months { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.dp-cell { height: 34px; border: 0; border-radius: 8px; background: none; color: var(--ink); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.dp-months .dp-cell { height: 40px; }
.dp-cell:hover:not(:disabled) { background: var(--surface-2); }
.dp-cell.now { box-shadow: inset 0 0 0 1.5px var(--accent); }
.dp-cell.sel { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.dp-cell:disabled { color: var(--ink-3); opacity: .4; cursor: default; }
.dp-foot { display: flex; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; }
.dp-link { border: 0; background: none; color: var(--accent-text); font-size: 13px; font-weight: 500; padding: 4px 6px; border-radius: 6px; }
.dp-link:hover { background: var(--accent-soft); }
.dp-link.muted { color: var(--ink-3); }

/* ---------- Hisobotlar: yil, oy kartochkalari, bo‘limlar, gorizontal jadval ---------- */
.year-pick { display: flex; align-items: center; gap: 10px; }
.year-pick .tabs a { font-variant-numeric: tabular-nums; }
.year-pick .tabs a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }
.report-tabs { align-self: flex-start; flex-wrap: wrap; }
.report-tabs a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }
.mcards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.mcards.mcards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mcards > div { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); min-width: 0; }
.mcards span { font-size: 12.5px; color: var(--ink-3); }
.mcards b { font-size: 19px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mcards small { font-size: 12px; color: var(--ink-3); line-height: 1.35; }
.mcards .res { background: var(--accent-soft); }
.mcards .res b { color: var(--accent-text); }
.mcards .res.neg { background: var(--bad-soft); }
.mcards .res.neg b { color: var(--bad); }
.mcards .warnbox { background: var(--warn-soft); }
.mcards .warnbox b { color: var(--warn); }
@media (max-width: 1400px) { .mcards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .mcards, .mcards.mcards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.htable { font-size: 13px; }
.htable th, .htable td { white-space: nowrap; padding-left: 7px; padding-right: 7px; }
.htable .hcol { position: sticky; left: 0; z-index: 1; background: var(--surface); min-width: 150px; padding-left: 24px; white-space: normal; }
.htable thead .hcol, .htable tfoot .hcol { background: var(--surface); }
.htable th a { color: inherit; text-decoration: none; border-bottom: 1px dashed var(--line); }
.htable th a:hover { color: var(--accent-text); border-bottom-color: var(--accent); }
.htable .selm { background: color-mix(in srgb, var(--accent-soft) 70%, transparent); }
.htable th.selm a { color: var(--accent-text); font-weight: 600; border-bottom-color: var(--accent); }
.htable .future { color: var(--ink-3); opacity: .5; }
.htable .tcol { border-left: 1px solid var(--line); }
.htable th:last-child, .htable td:last-child { padding-right: 24px; }
@media (max-width: 860px) { .htable th:last-child, .htable td:last-child { padding-right: 18px; } }
.htable tr.strong-row td { font-weight: 600; }
.htable small.block { font-weight: 400; }
@media (max-width: 860px) { .htable .hcol { padding-left: 18px; min-width: 130px; } }

/* ---------- Ochiladigan ro‘yxat (select.js) – brauzer oynasi o‘rniga ---------- */
.sx { position: relative; display: block; min-width: 0; }
.row > .sx, .toolbar .sx, .inline .sx { display: inline-block; }
.sx-native { position: absolute !important; inset: 0; opacity: 0; pointer-events: none; width: 100%; height: 100%; }
.sx-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 10px; padding: 10px 12px; text-align: left; font-size: 14px; min-height: 42px; }
.sx-btn > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-btn .ph { color: var(--ink-3); }
.sx-btn svg.i { width: 16px; height: 16px; color: var(--ink-3); flex: none; transition: transform .15s; }
.sx-btn:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.sx-btn[aria-expanded="true"] { border-color: var(--accent); }
.sx-btn[aria-expanded="true"] svg.i { transform: rotate(180deg); }
.sx-btn[aria-invalid="true"] { border-color: var(--bad); }
.sx-btn:disabled { opacity: .55; cursor: not-allowed; }
.sx.sm .sx-btn, .row-edit .sx-btn, .groups-edit .sx-btn { padding: 7px 10px; min-height: 0; font-size: 13.5px; border-radius: 9px; }
.sx-list { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 180px; max-height: 300px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(17,24,39,.16); padding: 5px; }
.sx-list.up { top: auto; bottom: calc(100% + 6px); }
.sx-opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 13.5px; color: var(--ink); cursor: pointer; }
.sx-opt.act { background: var(--surface-2); }
.sx-opt.sel { font-weight: 600; color: var(--accent-text); }
.sx-opt.sel svg.i { width: 16px; height: 16px; color: var(--accent-text); flex: none; }
.sx-opt.off { color: var(--ink-3); cursor: default; }

/* ---------- Checkbox va radio – umumiy dizayn ---------- */
input[type="checkbox"], input[type="radio"] { appearance: none; -webkit-appearance: none; margin: 0; flex: none; width: 18px; height: 18px; border: 1.5px solid color-mix(in srgb, var(--ink-3) 70%, var(--line)); background: var(--surface); display: inline-grid; place-content: center; cursor: pointer; transition: background .12s, border-color .12s; vertical-align: middle; }
input[type="checkbox"] { border-radius: 5px; }
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"]::before { content: ""; width: 10px; height: 10px; background: var(--accent-ink); clip-path: polygon(14% 44%, 0 59%, 40% 100%, 100% 22%, 86% 8%, 39% 70%); transform: scale(0); transition: transform .12s; }
input[type="radio"]::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-ink); transform: scale(0); transition: transform .12s; }
input[type="checkbox"]:checked, input[type="radio"]:checked { background: var(--accent); border-color: var(--accent); }
input[type="checkbox"]:checked::before, input[type="radio"]:checked::before { transform: scale(1); }
input[type="checkbox"]:hover:not(:checked), input[type="radio"]:hover:not(:checked) { border-color: var(--accent); }
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type="checkbox"]:disabled, input[type="radio"]:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Admin: bosh sahifa bo‘limlari muharriri, hujjatlar ---------- */
.sec-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 22px; align-items: start; }
.sec-nav { display: flex; flex-direction: column; gap: 2px; padding: 18px 12px; position: sticky; top: 110px; }
.sec-nav .card-h { padding: 0 10px; margin-bottom: 8px; }
.sec-nav a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.sec-nav a:hover { background: var(--surface-2); text-decoration: none; }
.sec-nav a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }
.sec-nav a[aria-current="page"] small, .sec-nav a[aria-current="page"] .n { color: inherit; opacity: .75; }
.sec-nav .n { width: 22px; height: 22px; border-radius: 7px; background: var(--surface-2); display: grid; place-items: center; font-size: 12px; color: var(--ink-3); flex: none; font-variant-numeric: tabular-nums; }
.sec-nav a[aria-current="page"] .n { background: rgba(255,255,255,.16); }
.sec-nav .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.sec-nav b { font-weight: 500; font-size: 13.5px; }
.sec-nav small { color: var(--ink-3); font-size: 12px; }
.sec-nav > a > svg.i { width: 15px; height: 15px; opacity: .5; }
.sec-reset { border-top: 1px solid var(--line); margin-top: 8px; padding: 10px 4px 0; }
.sec-reset .btn { color: var(--ink-3); }
.sec-edit { display: flex; flex-direction: column; gap: 14px; min-height: 100%; }
.sec-edit .card-h { margin-bottom: 4px; }
.sec-actions { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.sub-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px; gap: 12px; }
.sub-h { font-weight: 600; font-size: 13.5px; }
.doc-tile { display: flex; flex-direction: column; gap: 14px; }
.doc-tile .kv { margin: 0; }
.doc-actions { margin-top: auto; }
@media (max-width: 1100px) { .sec-layout { grid-template-columns: minmax(0, 1fr); } .sec-nav { position: static; } }

/* ---------- Admin: do‘konlar va do‘kon sahifasi ---------- */
.kpis-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.kpis-6 .kpi .v { font-size: 24px; }
@media (max-width: 1500px) { .kpis-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .kpis-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mcards.mcards-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.mcards b .pill, .mcards small .pill { vertical-align: middle; }
@media (max-width: 1240px) { .mcards.mcards-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .mcards.mcards-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.owner-list { display: flex; flex-direction: column; gap: 10px; }
.owner-row { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.owner-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.owner-row b { font-weight: 600; }
.owner-row small { color: var(--ink-3); font-size: 12.5px; }
.owner-row form { margin: 0; }
.danger-zone { display: flex; align-items: center; gap: 14px; margin-top: auto; padding: 14px; border: 1px solid color-mix(in srgb, var(--bad) 30%, var(--line)); border-radius: 12px; }
.danger-zone .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.danger-zone b { font-weight: 600; }
.danger-zone small { color: var(--ink-3); font-size: 12.5px; }
.danger-zone form { margin: 0; }
.split-2 > section.card:has(.danger-zone) { display: flex; flex-direction: column; gap: 18px; }
.split-2 > section.card:has(.danger-zone) .card-h { margin-bottom: 0; }

/* sahifa fonida turgan kichik raqam kartochkalari – oq kartochka ko‘rinishida */
.view > .mcards > div { background: var(--surface); border: 1px solid var(--line); }
.view > .mcards > div.warnbox { background: var(--warn-soft); border-color: transparent; }
.mcards b:not(.num) { white-space: normal; font-size: 16px; line-height: 1.3; }
.sec-reset .btn { white-space: normal; text-align: left; justify-content: flex-start; height: auto; }
.rows-edit textarea { min-height: 78px; }
.empty-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 48px 24px; }
.empty-card h2 { font-size: 17px; font-weight: 600; }
.empty-card p { max-width: 520px; }
.empty-card .form-actions { justify-content: center; margin-top: 6px; }
.big-tile { width: 48px; height: 48px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; }
.big-tile svg.i { width: 22px; height: 22px; }
.field textarea.md { min-height: 600px; }

/* ---------- Ko‘rinadigan matn muharriri (editor.js) ---------- */
.rte { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.rte:focus-within { border-color: var(--accent); }
.rte.invalid { border-color: var(--bad); }
.rte-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); background: var(--surface-2); position: sticky; top: 0; z-index: 2; }
.rte-bar button { display: inline-flex; align-items: center; gap: 5px; height: 32px; min-width: 32px; padding: 0 8px; border: 0; border-radius: 8px; background: none; color: var(--ink-2); font-size: 13px; font-weight: 500; justify-content: center; }
.rte-bar button:hover:not(:disabled) { background: var(--surface); color: var(--ink); }
.rte-bar button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.rte-bar button:disabled { opacity: .35; cursor: default; }
.rte-bar button svg.i { width: 17px; height: 17px; }
.rte-sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.rte-area { min-height: 540px; max-height: 72vh; overflow-y: auto; padding: 22px 26px; outline: none; max-width: none; }
.rte-area > :first-child { margin-top: 0; }
.rte-area table { border-collapse: collapse; width: 100%; }
.rte-area th, .rte-area td { border: 1px solid var(--line); padding: 8px 10px; }
.rte-area figure { outline: 1px dashed transparent; }
.rte-area figure:hover { outline-color: var(--line); }
.rte-area figcaption:empty::before { content: 'Rasm osti yozuvi'; color: var(--ink-3); }
button.img-pick { cursor: pointer; text-align: center; color: inherit; font: inherit; }
button.img-pick:hover { border-color: var(--accent); }
button.img-pick span { display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
button.img-pick svg.i { width: 13px; height: 13px; }
/* muharrir ichida – saytdagi (CRM) ranglar, admin grafit rangi emas: izoh bloki yashil ko‘rinadi */
.area-admin .rte-area, .area-admin .preview-card .doc { --accent: #0F766E; --accent-soft: #E3F3F0; --accent-text: #0E6B64; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .area-admin .rte-area, :root:not([data-theme="light"]) .area-admin .preview-card .doc { --accent: #2DBBA8; --accent-soft: #15302D; --accent-text: #5ED6C5; } }
:root[data-theme="dark"] .area-admin .rte-area, :root[data-theme="dark"] .area-admin .preview-card .doc { --accent: #2DBBA8; --accent-soft: #15302D; --accent-text: #5ED6C5; }

/* ================= Instagram ================= */
.ig-connect { display: flex; flex-direction: column; gap: 14px; }
.ig-connect h2 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.ig-tile.big { width: 48px; height: 48px; border-radius: 14px; }
.ig-tile.big svg.i { width: 24px; height: 24px; }
.ig-connect .checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; color: var(--ink-2); font-size: 13.5px; }
.ig-connect .checklist li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; }
.ig-connect .checklist li::before { content: ""; width: 16px; height: 16px; margin-top: 2px; border-radius: 50%; background: var(--ig-grad); }
.ig-connect .checklist b { color: var(--ink); font-weight: 600; }
.btn.ig-btn { background: var(--ig-grad); color: #fff; border: 0; padding: 11px 18px; }
.btn.ig-btn:hover { filter: brightness(1.05); background: var(--ig-grad); text-decoration: none; }
.ig-alert a { font-weight: 600; }

.ig-profile { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.ig-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; padding: 3px; background: var(--ig-grad); }
.ig-avatar.ph { display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 20px; }
.ig-who { display: flex; flex-direction: column; gap: 2px; min-width: 180px; flex: 1; }
.ig-who b { font-size: 16px; font-weight: 600; }
.ig-counts { display: flex; gap: 22px; margin: 0; }
.ig-counts div { text-align: center; }
.ig-counts dt { font-size: 12px; color: var(--ink-3); }
.ig-counts dd { margin: 0; font-size: 17px; font-weight: 600; }
.ig-actions { display: flex; gap: 6px; align-items: center; }
.ig-actions form { margin: 0; }
.ig-vs .up { color: var(--good); font-weight: 500; }
.ig-vs .down { color: var(--bad); font-weight: 500; }

.ig-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
a.ig-post { display: flex; flex-direction: column; gap: 6px; color: inherit; text-decoration: none; border: 1px solid var(--line); border-radius: 14px; padding: 8px; background: var(--surface); }
a.ig-post:hover { border-color: var(--ink-3); text-decoration: none; }
a.ig-post.best { border-color: transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--ig-grad) border-box; border: 1.5px solid transparent; }
.ig-thumb { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; color: var(--ink-3); }
.ig-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ig-thumb svg.i { width: 28px; height: 28px; }
.ig-thumb .tag { position: absolute; top: 6px; left: 6px; }
.ig-thumb .tag.kind { left: auto; right: 6px; background: rgba(0,0,0,.55); color: #fff; }
.ig-cap { font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.ig-stats { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12.5px; color: var(--ink-2); }
.card-h .end.tag { display: inline-flex; align-items: center; gap: 4px; }
.card-h .end.tag svg.i { width: 13px; height: 13px; }
@media (max-width: 860px) {
  .ig-counts { width: 100%; justify-content: space-around; }
  .ig-posts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

/* Raqobatchilar */
table.cmp td, table.cmp th { white-space: nowrap; }
table.cmp .up { color: var(--good); font-weight: 500; }
table.cmp .down { color: var(--bad); font-weight: 500; }
table.cmp tr.me-row-t td { background: var(--accent-soft); }
.insights li span:last-child { color: var(--ink); }
.cmp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }
.cmp-cards .bio { font-size: 13px; }
a.top-post { display: flex; gap: 10px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; font-size: 13px; }
a.top-post:last-child { border-bottom: 0; }
a.top-post:hover .grow { color: var(--accent-text); }
a.top-post .kind { flex: none; font-size: 11px; font-weight: 600; color: var(--ink-3); width: 46px; }
a.top-post .num { flex: none; }
code { font-size: 12px; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; word-break: break-all; }
table.cmp .av:not(.acc) { background: var(--surface-2); color: var(--ink-2); }

/* Bir qatordagi belgilash katakchalari (Sozlamalar → Savdo kanallari) */
.check-row { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.ch-list { margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }

/* ================= Telegram kanal statistikasi ================= */
.tg-hero { display: flex; flex-direction: column; gap: 14px; }
.tg-hero h2 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.tg-tile { width: 32px; height: 32px; flex: none; border-radius: 9px; background: var(--tg); color: #fff; display: grid; place-items: center; }
.tg-tile.big { width: 48px; height: 48px; border-radius: 14px; }
.tg-tile.big svg.i { width: 24px; height: 24px; }
.tg-steps { list-style: none; margin: 0; padding: 0; counter-reset: tgs; display: flex; flex-direction: column; gap: 10px; color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }
.tg-steps li { counter-increment: tgs; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; }
.tg-steps li::before { content: counter(tgs); width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: var(--tg-soft); color: var(--tg); font-weight: 600; font-size: 12.5px; }
.tg-steps b { color: var(--ink); font-weight: 600; }
.tg-link-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; padding-top: 6px; border-top: 1px solid var(--line); }
.tg-link-form .field { flex: 1; min-width: 220px; }
.tg-avatar { width: 64px; height: 64px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--tg); color: #fff; font-weight: 600; font-size: 20px; }
.tg-posts { display: flex; flex-direction: column; }
.tg-post { display: grid; grid-template-columns: 128px 76px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; font-size: 13.5px; }
.tg-post:last-child { border-bottom: 0; }
a.tg-post:hover { background: var(--surface-2); text-decoration: none; }
.tg-post.best { background: color-mix(in srgb, var(--good-soft) 60%, transparent); }
.tg-post-date { color: var(--ink-3); font-size: 12.5px; }
.tg-post .tag { justify-self: start; }
.tg-post-main { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tg-post-main .tag { flex: none; }
.tg-post-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-post-r { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); font-weight: 600; }
.tg-post-r svg.i { width: 15px; height: 15px; color: var(--tg); }
@media (max-width: 860px) {
  .tg-post { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; }
  .tg-post-date { grid-column: 1; }
  .tg-post-main { grid-column: 1 / -1; flex-wrap: wrap; }
  .tg-post-text { white-space: normal; }
}

/* ================= Qo‘llanmalar: SotuvON tepada, Instagram | Telegram ustunlari ================= */
.crm-tile { width: 32px; height: 32px; flex: none; border-radius: 9px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.crm-tile svg.i, .tg-tile svg.i { width: 18px; height: 18px; stroke-width: 1.8; }
.crm-tile.sm, .tg-tile.sm { width: 28px; height: 28px; border-radius: 8px; }
.crm-tile.sm svg.i, .tg-tile.sm svg.i, .ig-tile.sm svg.i { width: 15px; height: 15px; }
.gd-hero { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; border-radius: 20px; padding: 28px 30px; color: #fff;
  background:
    radial-gradient(520px 260px at 92% 0%, rgba(238,42,123,.42), transparent 70%),
    radial-gradient(520px 280px at 70% 120%, rgba(42,171,238,.45), transparent 70%),
    #14171E; }
.gd-hero-text { max-width: 640px; display: flex; flex-direction: column; gap: 8px; position: relative; z-index: 1; }
.gd-hero-tag { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; background: rgba(255,255,255,.1); border-radius: 99px; padding: 4px 12px 4px 5px; }
.gd-hero-tag .ig-tile.sm, .gd-hero-tag .tg-tile.sm { width: 22px; height: 22px; border-radius: 7px; }
.gd-hero-tag svg.i { width: 13px !important; height: 13px !important; }
.gd-hero h2 { font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.gd-hero p { color: rgba(255,255,255,.82); font-size: 14.5px; line-height: 1.55; }
.gd-hero-stats { display: flex; gap: 10px; position: relative; z-index: 1; flex-wrap: wrap; }
.gd-hero-stats div { display: flex; flex-direction: column; min-width: 92px; padding: 12px 16px; border-radius: 14px; background: rgba(255,255,255,.08); border-bottom: 3px solid rgba(255,255,255,.18); }
.gd-hero-stats div.instagram { border-bottom-color: #E1306C; }
.gd-hero-stats div.telegram { border-bottom-color: #2AABEE; }
.gd-hero-stats b { font-size: 24px; font-weight: 600; line-height: 1.1; }
.gd-hero-stats span { font-size: 12px; color: rgba(255,255,255,.8); }
a.guide-card.crm:hover { background: var(--surface); border: 1px solid var(--accent); box-shadow: 0 8px 24px -10px rgba(15,118,110,.35); }
a.guide-card.crm .guide-meta .go { color: var(--accent-text); }
.gd-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.gd-cols.one { grid-template-columns: minmax(0, 1fr); }
.gd-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.gd-col-h { display: flex; align-items: center; gap: 12px; padding: 4px 2px; }
.gd-col-h .ig-tile, .gd-col-h .tg-tile { width: 40px; height: 40px; border-radius: 12px; }
.gd-col-h h2 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.gd-group { position: relative; overflow: hidden; scroll-margin-top: 110px; }
.gd-group::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--ig-grad); }
.gd-col.telegram .gd-group::before { background: var(--tg); }
.gd-group .card-h h3 { font-size: 15.5px; font-weight: 600; }
.gd-list { display: flex; flex-direction: column; margin: 0 -8px; }
a.gd-item { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 12px; color: var(--ink); text-decoration: none; }
a.gd-item + a.gd-item { border-top: 1px solid var(--line); border-radius: 0; }
a.gd-item:hover { text-decoration: none; background: color-mix(in srgb, #E1306C 6%, var(--surface)); border-radius: 12px; }
.gd-col.telegram a.gd-item:hover { background: var(--tg-soft); }
a.gd-item .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
a.gd-item b { font-weight: 600; font-size: 14px; }
a.gd-item small { color: var(--ink-3); font-size: 12.5px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.gd-item > svg.i { width: 16px; height: 16px; color: var(--ink-3); flex: none; }
.gd-min { color: var(--ink-3); font-size: 12px; white-space: nowrap; }
/* Maqola sahifasi – bo‘lim platformasi rangida */
.pf-telegram .doc-band { background: var(--tg); }
.pf-crm .doc-band { background: var(--accent); }
.pf-telegram .doc-toc a[aria-current="page"] { background: var(--tg-soft); }
.pf-telegram .doc-toc a[aria-current="page"]::before { color: var(--tg); }
.pf-crm .doc-toc a[aria-current="page"] { background: var(--accent-soft); }
.pf-crm .doc-toc a[aria-current="page"]::before { color: var(--accent-text); }
@media (max-width: 1100px) { .gd-cols { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .gd-hero { padding: 22px 20px; } .gd-hero h2 { font-size: 20px; } .gd-min { display: none; } }
.guide-grid.crm-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
a.gd-promo { display: flex; align-items: center; gap: 14px; color: var(--ink); text-decoration: none; background: linear-gradient(135deg, var(--tg-soft), var(--surface) 70%); border-color: color-mix(in srgb, var(--tg) 30%, var(--line)); }
a.gd-promo:hover { text-decoration: none; border-color: var(--tg); }
a.gd-promo .tg-tile { width: 40px; height: 40px; border-radius: 12px; }
a.gd-promo .grow { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
a.gd-promo b { font-weight: 600; font-size: 14.5px; }
a.gd-promo small { color: var(--ink-2); font-size: 13px; line-height: 1.45; }
a.gd-promo > svg.i { width: 16px; height: 16px; color: var(--tg); flex: none; }
/* Admin: sayt matnlari – sahifa guruhlari va til tugmalari */
.sec-nav .sec-group { padding: 12px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.sec-nav .card-h + .sec-group { padding-top: 0; }
.tabs .tab-link { padding: 5px 12px; border-radius: 7px; color: var(--ink-3); font-size: 13px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.tabs .tab-link:hover { color: var(--ink); text-decoration: none; }
.tabs .tab-link[aria-current="true"] { background: var(--surface-2); color: var(--ink); }
.sec-edit > .card-h.row-between { align-items: flex-start; flex-wrap: wrap; font-size: inherit; }
.plan-top { align-items: center; gap: 16px; flex-wrap: wrap; margin: 0; font-size: inherit; }
.plan-top .empty-note { margin: 0; }
/* Admin: umumiy matnlar */
.txt-list { display: flex; flex-direction: column; gap: 4px; }
.txt-row { display: grid; grid-template-columns: minmax(180px, 280px) minmax(0, 1fr); gap: 6px 16px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.txt-row:last-child { border-bottom: 0; }
.txt-row > label { font-size: 13px; color: var(--ink-2); padding-top: 8px; overflow-wrap: anywhere; }
.txt-row > label code { font-size: 12px; }
.txt-row .help { grid-column: 2; }
.txt-row.changed > label code { color: var(--ink); }
@media (max-width: 720px) { .txt-row { grid-template-columns: minmax(0, 1fr); } .txt-row .help { grid-column: 1; } .txt-row > label { padding-top: 0; } }
/* "Nima sotasiz" va "Qayerda sotasiz" (sayt formalari, admin) */
.pick-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.pick-2:not(:has(> .field:not([hidden]))) { display: none; }
.field[hidden] { display: none; }
.sx-opt > span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sx-opt small { font-size: 12px; font-weight: 400; color: var(--ink-3); line-height: 1.35; }
.ch-pick { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.ch-pick legend { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; padding: 0; }
.ch-pick legend .faint { font-weight: 400; }
.ch-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.ch-opt { position: relative; cursor: pointer; }
.ch-opt input { position: absolute; opacity: 0; pointer-events: none; }
.ch-opt > span { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 14px; font-weight: 500; transition: border-color .12s, background .12s; }
.ch-opt > span svg.i { width: 17px; height: 17px; color: var(--ink-3); }
.ch-opt:hover > span { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.ch-opt input:checked + span { border-color: var(--accent); background: color-mix(in srgb, var(--accent-soft) 60%, var(--surface)); }
.ch-opt input:checked + span svg.i { color: var(--accent-text); }
.ch-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.ch-pick.invalid .ch-opt > span { border-color: var(--bad); }
@media (max-width: 560px) { .pick-2 { grid-template-columns: minmax(0, 1fr); } }
/* Obuna: sig‘maydigan tarif; ro‘yxatdan o‘tish: sotuvchilar soni yonidagi izoh */
.plan-opt.off { cursor: not-allowed; }
.plan-opt.off > span { opacity: .55; }
.s-sellers-row { align-items: end; }
.s-sellers-help { display: flex; gap: 8px; font-size: 12.5px; line-height: 1.45; color: var(--ink-3); margin: 0 0 4px; }
.s-sellers-help svg.i { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--accent-text); }

/* CRM – sayt uslubiga yaqin: sahifa tepasida yumshoq firuza nur (faqat do‘kon CRM'ida, admin panelda emas) */
body .main { background-image: radial-gradient(900px 260px at 20% -80px, color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%); background-repeat: no-repeat; }

/* “Boshlash” kartochkasi (rahbar bosh sahifasi) */
.onb { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); background: linear-gradient(180deg, color-mix(in srgb, var(--accent-soft) 55%, var(--surface)), var(--surface) 70%); }
.onb-head { display: flex; align-items: center; gap: 14px; }
.onb-head h2 { font-size: 17px; }
.onb-mark { width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.onb-mark svg.i { width: 20px; height: 20px; }
.onb-bar .bar-svg { width: 100%; height: 8px; display: block; }
.onb-bar .bar-svg rect { rx: 4px; ry: 4px; }
.onb-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.onb-steps li { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); min-width: 0; }
.onb-steps li .grow { display: flex; flex-direction: column; gap: 3px; }
.onb-steps li b { font-size: 14px; font-weight: 600; }
.onb-steps li small { color: var(--ink-3); font-size: 12.5px; line-height: 1.45; }
.onb-steps li .btn { align-self: flex-start; margin-top: auto; }
.onb-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); flex: none; }
.onb-steps li.next { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent); }
.onb-steps li.next .onb-n { background: var(--accent); color: var(--accent-ink); }
.onb-steps li.done { background: transparent; }
.onb-steps li.done b { color: var(--ink-3); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ink-3) 50%, transparent); }
.onb-steps li.done .onb-n { background: color-mix(in srgb, var(--good) 15%, transparent); color: var(--good); }
.onb-steps li.done .onb-n svg.i { width: 14px; height: 14px; }
@media (max-width: 1200px) { .onb-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .onb-steps { grid-template-columns: minmax(0, 1fr); }
  .onb-steps li { flex-direction: row; align-items: center; }
  .onb-steps li .btn { margin-top: 0; align-self: center; }
  .onb-steps li.done { display: none; } /* telefonda – faqat qolgan qadamlar, bajarilgani chiziqda ko‘rinadi */
}

/* Telefonda buyurtmalar – jadval o‘rniga kartochkalar (kompyuterda jadval o‘zgarmaydi) */
@media (max-width: 640px) {
  table.orders thead { display: none; }
  table.orders, table.orders tbody { display: block; }
  table.orders tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "num st" "cust sum" "item item" "pay pay"; gap: 6px 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  table.orders td { display: block; padding: 0; border: 0; min-width: 0; }
  table.orders td.o-num { grid-area: num; display: flex; align-items: baseline; gap: 8px; }
  table.orders td.o-num .faint { font-size: 12.5px; }
  table.orders td.o-st { grid-area: st; justify-self: end; }
  table.orders td.o-cust { grid-area: cust; }
  table.orders td.o-cust > .faint { display: none; }
  table.orders td.o-sum { grid-area: sum; align-self: center; font-size: 15px; }
  table.orders td.o-item { grid-area: item; display: block !important; color: var(--ink-2); font-size: 13px; }
  table.orders td.o-item > span { color: var(--ink); }
  table.orders td.o-item .faint { display: inline; }
  table.orders td.o-item .faint::before { content: ' · '; }
  table.orders td.o-pay { grid-area: pay; }
  table.orders td.o-seller, table.orders td.o-reg { display: none !important; }
}

/* Oddiy kartochka ichida ketma-ket bloklar orasida oraliq (tugma, matn, havola qutisi bir-biriga yopishmasin).
   Bitta “card” klassli (blok) kartochkalar va blok ko‘rinishidagi list-card, attr-card, delete-card, variants-card; jadval (salbiy chetli) va yashirin maydonlar istisno; o‘z chetlari kattaroq bo‘lsa – o‘shasi qoladi */
.card:is(:not([class*=" "]), .list-card, .attr-card, .delete-card, .variants-card):not(.welcome .card):not(.plan-edit .card) > :not(input[type="hidden"], [hidden]) + :not(.tbl-wrap, input[type="hidden"], script, [hidden]) { margin-top: 14px; }
.card > .tbl-wrap:last-child { margin-bottom: -22px; }

/* Tasdiqlash oynasi (brauzerning confirm() o‘rniga) */
.cf-back { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, #0B1F1D 45%, transparent); backdrop-filter: blur(3px); animation: cf-in .14s ease-out; }
.cf-box { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px; box-shadow: 0 24px 60px rgba(11, 31, 29, .28); display: flex; flex-direction: column; gap: 18px; }
.cf-head { display: flex; gap: 14px; align-items: flex-start; }
.cf-ic { width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.cf-ic svg { width: 20px; height: 20px; }
.cf-box.danger .cf-ic { background: var(--bad-soft); color: var(--bad); }
.cf-msg { font-size: 14.5px; line-height: 1.55; color: var(--ink); padding-top: 9px; }
.cf-actions { display: flex; justify-content: flex-end; gap: 8px; }
.cf-box.danger .cf-ok { background: var(--bad); border-color: var(--bad); color: #fff; }
@keyframes cf-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cf-back { animation: none; } }

/* Havola / kod qutisi (Telegram ulash) */
.link-box { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border: 1px dashed color-mix(in srgb, var(--accent) 40%, var(--line)); border-radius: 14px; background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface)); }
.link-code { font-size: 13px; color: var(--ink); word-break: break-all; user-select: all; background: none; padding: 0; }

.cf-fields { display: flex; flex-direction: column; gap: 12px; }
.cf-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.cf-field input { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 12px; outline: 0; width: 100%; font: inherit; font-weight: 400; color: var(--ink); }
.cf-field input:focus { border-color: var(--accent); }

.mcards.mcards-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mcards small a { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--ink-3) 40%, transparent); }
@media (max-width: 1500px) { .mcards.mcards-7 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 720px) { .mcards.mcards-7 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* “Qarzi bor” ro‘yxatida tez to‘lov oynachasi */
.qp { position: relative; display: inline-block; }
.qp > summary { list-style: none; cursor: pointer; }
.qp > summary::-webkit-details-marker { display: none; }
.qp-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 280px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 14px 36px rgba(17,24,39,.16); padding: 16px; text-align: left; white-space: normal; }
.qp-h { font-size: 13.5px; font-weight: 600; }
@media (max-width: 640px) {
  table.orders tr:has(.o-qp) { grid-template-areas: "num st" "cust sum" "item item" "pay pay" "qp qp"; }
  table.orders td.o-qp { grid-area: qp; text-align: left; }
  .qp-pop { position: fixed; left: 16px; right: 16px; top: auto; bottom: 90px; width: auto; }
}

/* Tovar rasmi */
img.pimg { display: block; width: 100%; height: 100%; object-fit: cover; }
.thumb:has(img.pimg) { overflow: hidden; background: var(--surface-2); }
.pcard .img:has(img.pimg) { overflow: hidden; }
.pcard .img img.pimg { position: absolute; inset: 0; }
.pimg-box { aspect-ratio: 1 / 1; max-height: 360px; margin: 0 auto; width: 100%; border-radius: 14px; background: var(--surface-2); overflow: hidden; display: grid; place-items: center; }
.pimg-box img.pimg { object-fit: contain; }
.pimg-box.empty svg { width: 34%; height: auto; }
.pimg-actions { margin-top: 14px; gap: 8px; flex-wrap: wrap; }
.pimg-up label.btn { cursor: pointer; }
.pimg-up label.btn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.pick button.has-img { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 10px; align-items: center; text-align: left; }
.pick button.has-img img.pimg { grid-row: span 2; width: 40px; height: 40px; border-radius: 8px; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; min-width: 0 !important; padding: 0 !important; margin: -1px !important; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0 !important; } /* .field input kabi qoidalar kengaytirib yubormasin */
.btn.danger-t { color: var(--bad); }

.field .img-drop { font-size: 14px; font-weight: 400; color: var(--ink); }
.img-drop { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px dashed var(--line); border-radius: 14px; cursor: pointer; background: var(--surface); }
.img-drop:hover, .img-drop:focus-within { border-color: var(--accent); }
.img-drop .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.img-drop .grow b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.img-prev { width: 64px; height: 64px; flex: none; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; color: var(--ink-3); }
.img-prev svg { width: 24px; height: 24px; }

/* Hisobotlar: o‘tgan yil bilan solishtirish va Excel */
.mcards em.cmp { display: block; font-style: normal; font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }
.mcards em.cmp .up, .htable .up { color: var(--good); font-weight: 500; }
.mcards em.cmp .down, .htable .down { color: var(--bad); font-weight: 500; }
.report-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.export-list.export-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.export-4 .export-row { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: start; gap: 10px 12px; padding: 14px; }
.export-4 .export-row > .btn { grid-column: 2; justify-self: start; align-self: end; }
.export-4 .export-row .row { flex-wrap: wrap; gap: 8px; }
.export-4 .export-row .dp { flex: 1; min-width: 118px; }
a.export-row { color: inherit; text-decoration: none; }
a.export-row:hover { text-decoration: none; border-color: var(--accent); }
@media (max-width: 1240px) { .export-list.export-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .export-list.export-4 { grid-template-columns: minmax(0, 1fr); } }

/* ================= Tovar sahifasi (ixcham) ================= */
.prod-head { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 24px; align-items: start; }
.pimg-col { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.pimg-col form { margin: 0; }
.pimg-col .btn { width: 100%; justify-content: center; }
.pimg-col .small { text-align: center; }
.pimg-pick { position: relative; display: grid; place-items: center; width: 168px; aspect-ratio: 1 / 1; border-radius: 16px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
label.pimg-pick { cursor: pointer; }
.pimg-pick img.pimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pimg-pick svg.art { width: 58%; height: auto; }
.pimg-pick .ov { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 8px 8px; font-size: 12.5px; font-weight: 500; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .6)); opacity: 0; transition: opacity .15s; }
.pimg-pick .ov svg.i { width: 14px; height: 14px; }
label.pimg-pick:hover .ov, label.pimg-pick:focus-within .ov, .pimg-pick.empty .ov { opacity: 1; }
.pimg-pick.empty .ov { background: none; color: var(--accent-text); top: auto; }
label.pimg-pick:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
label.pimg-pick.empty:hover { border-color: var(--accent); }

.prod-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 16px; align-content: start; margin: 0; }
.prod-form .wide { grid-column: span 2; }
.prod-stat { display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; padding: 0 2px 10px; }
.prod-stat span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.prod-stat b { font-size: 17px; font-weight: 600; }
.prod-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 14px; }
.prod-actions label.check small { margin-left: 4px; }
.prod-info { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-content: center; height: 100%; }

.variants-card .add-variant { align-items: flex-end; margin-top: 4px; padding: 16px 24px 18px; border-top: 1px solid var(--line); background: var(--surface-2); margin-left: -24px; margin-right: -24px; margin-bottom: -22px; border-radius: 0 0 var(--r) var(--r); }
.variants-card .add-variant .field { flex: 0 1 260px; min-width: 130px; }
.variants-card .add-variant .field input { background: var(--surface); }
.add-variant-t { flex: 1 0 100%; display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.add-variant-t svg.i { width: 15px; height: 15px; }
.variants-card td .tag { margin-left: 4px; vertical-align: middle; }

@media (max-width: 1080px) {
  .prod-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .prod-head { grid-template-columns: 112px minmax(0, 1fr); gap: 16px; }
  .pimg-pick { width: 112px; }
  .prod-form { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .prod-form .wide { grid-column: 1 / -1; }
  .variants-card .add-variant { margin-left: -18px; margin-right: -18px; margin-bottom: -18px; padding: 14px 18px 16px; }
  .prod-info { grid-template-columns: minmax(0, 1fr); }
}

/* Sozlamalar → Ma'lumotlar */
.data-counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.data-counts > div { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); display: flex; flex-direction: column; gap: 2px; }
.data-counts b { font-size: 20px; font-weight: 600; }
.data-counts span { color: var(--ink-3); font-size: 12.5px; }
.delete-card { border-color: color-mix(in srgb, var(--bad) 30%, var(--line)); }
.delete-card .card-h h2 { color: var(--bad); }
.del-steps { margin: 0 0 18px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--ink-2); }
.btn.danger-fill { background: var(--bad); border-color: var(--bad); color: var(--surface); }
.btn.danger-fill:hover { filter: brightness(.95); }
@media (max-width: 640px) { .data-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.danger-zone + .danger-zone { margin-top: 10px; }
.danger-zone input { width: 170px; }
@media (max-width: 640px) { .danger-zone { flex-wrap: wrap; } .danger-zone input { width: 100%; } }

/* Telegram Mini App */
.tg-entry { min-height: 100vh; display: grid; place-items: center; background: var(--bg); }
.tg-entry-box { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px 16px; max-width: 420px; text-align: center; color: var(--ink); }
.tg-entry-box > b { font-size: 18px; font-weight: 600; }
.tg-entry-box > b span { color: var(--accent-text); }
.tg-entry-box .logo { width: 48px; height: 48px; font-size: 20px; border-radius: 14px; }
.tg-msg { display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--ink-2); }
.tg-msg p { margin: 0; }
/* Ilova ichida mavzu Telegram'dan olinadi – o‘zimizning almashtirgichlar kerak emas */
.tg-app [data-theme-cycle], .tg-app .me-pop-theme:has([data-theme-set]) { display: none; }

/* Tovarlar bo‘limi tablari: Tovarlar | Kirim | Ombor */
.goods-tabs { align-self: flex-start; padding: 4px; border-radius: 12px; }
.goods-tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; font-size: 14px; border-radius: 9px; }
.goods-tabs a svg { width: 16px; height: 16px; }
.goods-tabs a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }
@media (max-width: 640px) { .goods-tabs { display: flex; width: 100%; } .goods-tabs a { flex: 1; justify-content: center; padding: 8px 6px; } }

/* Jadval ichidagi oynacha – ekranga nisbatan joylashadi (app.js), jadval chegarasida kesilmaydi */
.pop-b.floating, .qp-pop.floating { position: fixed; right: auto; bottom: auto; max-height: calc(100vh - 16px); overflow-y: auto; }

/* Tovarlar → Sozlash: xususiyat qiymatlari chiplarda, tayyor ranglar, kategoriyalar */
.sec-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.sec-head p { margin: 4px 0 0; font-size: 13.5px; }
.attr-card .card-h .end { gap: 6px; align-items: center; }
.vchips { display: flex; flex-wrap: wrap; gap: 8px; }
.vchip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 5px 6px 5px 10px; font-size: 13.5px; line-height: 1.2; }
.vchip svg.dot { width: 14px; height: 14px; }
.vchip > button { border: 0; background: none; padding: 2px; border-radius: 50%; color: var(--ink-3); display: grid; place-items: center; cursor: pointer; }
.vchip > button:hover { background: var(--bad-soft, #FDECEA); color: var(--bad); }
.vchip > button svg { width: 13px; height: 13px; }
button.vchip.add { cursor: pointer; padding: 5px 10px; border-style: dashed; color: var(--ink-2); }
button.vchip.add:hover { border-color: var(--accent); color: var(--ink); background: var(--accent-soft); }
button.vchip.add svg.i { width: 13px; height: 13px; color: var(--accent-text); }
.vadd { display: flex; gap: 8px; }
.vadd input { flex: 1; min-width: 0; }
.palette { border-top: 1px dashed var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.palette .row { gap: 8px; align-items: center; }
.cat-list { display: flex; flex-direction: column; }
.cat-row { display: flex; align-items: center; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cat-row:last-child { border-bottom: 0; }
.cat-row a.grow { color: var(--ink); text-decoration: none; min-width: 0; }
.cat-row a.grow:hover b { text-decoration: underline; }
@media (max-width: 640px) { .vadd { flex-direction: column; } }

/* Tovar sahifasi (3-tahrir): forma + raqamlar, variantlar jadvalida narx va “Sotuvda” shu yerda */
.prod-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.prod-head .prod-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.prod-head .prod-form .full { grid-column: 1 / -1; }
.hint-s { font-size: 12px; color: var(--ink-3); }
.hint-s a { color: inherit; text-decoration: underline; text-decoration-color: var(--line); }
.prod-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.prod-stats > div { background: var(--surface-2); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; }
.prod-stats span { font-size: 12.5px; color: var(--ink-3); }
.prod-stats b { font-size: 17px; font-weight: 600; }
.prod-stats small { font-size: 12px; font-weight: 500; color: var(--ink-3); }
.var-table .var-name { font-weight: 500; }
.var-table td { vertical-align: middle; }
.var-table td.nowrap { white-space: nowrap; }
.var-table td.nowrap > * { vertical-align: middle; }
.var-table .row-save { opacity: .45; }
.var-table .row-save.dirty { opacity: 1; background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
label.tgl { position: relative; display: inline-block; width: 38px; height: 22px; cursor: pointer; vertical-align: middle; }
label.tgl input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
label.tgl span { position: absolute; inset: 0; border-radius: 99px; background: var(--line); transition: background .15s; pointer-events: none; }
label.tgl span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
label.tgl input:checked + span { background: var(--good); }
label.tgl input:checked + span::after { transform: translateX(16px); }
label.tgl input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 900px) { .prod-head .prod-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 640px) { .prod-head .prod-form { grid-template-columns: minmax(0, 1fr); } }

/* Instagram'ni ulash kartochkasi – Telegram kanal kartochkasidek: raqamli qadamlar */
.ig-steps { list-style: none; margin: 0; padding: 0; counter-reset: igs; display: flex; flex-direction: column; gap: 10px; color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }
.ig-steps li { counter-increment: igs; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; }
.ig-steps li::before { content: counter(igs); width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: var(--ig-grad); color: #fff; font-weight: 600; font-size: 12.5px; }
.ig-steps b { color: var(--ink); font-weight: 600; }
.ig-connect .ig-btn { align-self: flex-start; }
.setup-grid > * > .card:last-child { flex: none; } /* Sozlash: xususiyat kartochkalari cho‘zilmaydi */
.setup-grid { align-items: start; }

/* Xodimlar → Huquqlar jadvali */
.perm-table td:first-child { min-width: 260px; }
.perm-table td b { display: block; font-weight: 500; }
.perm-table td small { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }
.perm-table .c { text-align: center; width: 110px; }
.perm-table td.c svg.i { width: 16px; height: 16px; color: var(--good); }
.perm-table tr.fixed td { background: var(--surface-2); }
.perm-table tr.fixed td:first-child b { color: var(--ink-2); }
.perm-cb { display: inline-grid; place-items: center; padding: 6px; cursor: pointer; }
.perm-actions { padding: 16px 24px 4px; }
@media (max-width: 640px) { .perm-table td:first-child { min-width: 180px; } .perm-table .c { width: 70px; } }
.perm-table { table-layout: fixed; width: 100%; }
.perm-table td:first-child, .perm-table th:first-child { white-space: normal; min-width: 0; width: auto; }
.perm-table th.c, .perm-table td.c { width: 96px; padding-left: 4px; padding-right: 4px; }
@media (max-width: 640px) { .perm-table th.c, .perm-table td.c { width: 64px; } .perm-table th.c { font-size: 11.5px; } }

/* Telegram ichida: kompyuterbop bo‘lim haqida */
.tg-desktop { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 36px 24px; }
.tg-desktop .ic { width: 52px; height: 52px; border-radius: 16px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; }
.tg-desktop .ic svg.i { width: 26px; height: 26px; }
.tg-desktop h2 { font-size: 18px; font-weight: 600; }
.tg-desktop p { margin: 0; max-width: 420px; }

/* Telegram Mini App: mavzu Telegram'dan, “Yangi buyurtma” – pastdagi “+” */
.tg-app [data-theme-cycle] { display: none !important; } /* .show-m (!important) dan ustun – Telegram ichida mavzu Telegram’dan olinadi */

/* Yon menyudagi “Qo‘llanmalar”: Instagram va Telegram – ikki belgi ustma-ust, hoshiya pushtidan ko‘kka */
.guide-link { --gl-grad: linear-gradient(120deg, #F58529 0%, #DD2A7B 38%, #8134AF 62%, #2AABEE 100%);
  display: flex; align-items: center; gap: 12px; padding: 9px 10px 9px 9px; border-radius: 12px; color: var(--ink); text-decoration: none;
  border: 1.5px solid var(--line); background: var(--surface); transition: border-color .15s; }
.guide-link:hover { text-decoration: none; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--gl-grad) border-box; border-color: transparent; }
.guide-link[aria-current="page"] { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--gl-grad) border-box; border-color: transparent; }
.guide-link .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.guide-link b { font-weight: 600; font-size: 13.5px; }
.guide-link small { color: var(--ink-3); font-size: 11.5px; }
.guide-link > svg.i { width: 15px; height: 15px; color: var(--ink-3); flex: none; }
.brand-pair { position: relative; width: 36px; height: 32px; flex: none; }
.brand-pair .ig-tile, .brand-pair .tg-tile { position: absolute; width: 22px; height: 22px; border-radius: 7px; box-shadow: 0 0 0 2px var(--surface); }
.brand-pair .ig-tile { left: 0; top: 0; }
.brand-pair .tg-tile { right: 0; bottom: 0; }
.brand-pair svg.i { width: 13px; height: 13px; stroke-width: 1.9; }
.guide-link.card { padding: 14px 16px; }
.guide-link.card .brand-pair { width: 46px; height: 40px; }
.guide-link.card .brand-pair .ig-tile, .guide-link.card .brand-pair .tg-tile { width: 29px; height: 29px; }

/* Admin: bo‘limlar tarjimasi jadvali */
.group-tr td.stack-sm { display: grid; gap: 6px; min-width: 200px; }
.group-tr td { vertical-align: top; }

/* Parol maydoni: ko‘z tugmasi */
.pw-wrap { position: relative; display: block; width: 100%; }
.pw-wrap input { padding-right: 44px !important; }
.pw-eye { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--ink-3); cursor: pointer; padding: 0; }
.pw-eye:hover { color: var(--ink); background: var(--surface-2); }
.pw-eye:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pw-eye svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---- Telefon (≤640px) ---- */
@media (max-width: 640px) {
  /* Kirim: jadval o‘rniga har tovar – kartochka; “Soni” va “Tannarx” to‘liq kenglikda */
  .purchase-table, .purchase-table tbody { display: block; width: 100%; min-width: 0; }
  .purchase-table thead { display: none; }
  .purchase-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
  .purchase-table tr[hidden] { display: none; }
  .purchase-table td { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 0; border: 0; text-align: left; }
  .purchase-table td:first-child { grid-column: 1 / -1; }
  .purchase-table td[data-th]::before { content: attr(data-th); font-size: 11.5px; color: var(--ink-3); font-weight: 500; }
  .purchase-table td.pt-in .cell-input { width: 100%; max-width: none; }
  .purchase-table td[data-line-sum] { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; width: 100%; }
  .purchase-table tr.picked td { background: none; }
  .purchase-table tr.picked { background: color-mix(in srgb, var(--accent-soft) 55%, transparent); }
  /* Tovar sahifasi: rasm tepada, forma ostida */
  .prod-head { grid-template-columns: minmax(0, 1fr); }
  .prod-head .pimg-col { max-width: 200px; }
}

/* Telefon (≤480px): sahifa sarlavhasi – birinchi qatorda nom va tugmalar, izoh ostida to‘liq kenglikda (tugmalar izohni siqmasin) */
@media (max-width: 480px) {
  .top { flex-wrap: wrap; row-gap: 4px; }
  .top .grow { display: contents; }
  .top h1 { flex: 1 1 0; min-width: 0; }
  .top .sub { order: 9; flex: 1 1 100%; margin-top: 0; }
  .top .area-tag { flex: 1 1 100%; }
}

/* ---- Telefon (≤640px): jadval → kartochkalar (table.m-cards) ---- */
@media (max-width: 640px) {
  table.m-cards, table.m-cards tbody, table.m-cards tfoot { display: block; width: 100%; min-width: 0; }
  table.m-cards thead { display: none; }
  table.m-cards tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
  table.m-cards tr[hidden] { display: none; }
  table.m-cards td, table.m-cards th { display: block; padding: 0; border: 0; text-align: left; white-space: normal; min-width: 0; overflow-wrap: anywhere; }
  table.m-cards td[data-th]::before, table.m-cards tfoot th[data-th]::before { content: attr(data-th); display: block; margin-bottom: 2px; font-size: 12.5px; font-weight: 500; color: var(--ink-3); }
  /* birinchi katak – kartochka sarlavhasi: to‘liq qator, yozuvsiz */
  table.m-cards tr > :first-child { grid-column: 1 / -1; font-size: 15.5px; }
  table.m-cards tr > :first-child::before { display: none; }
  table.m-cards td:empty { display: none; }
  /* oxirgi katakda faqat tugmalar bo‘lsa – to‘liq qator */
  table.m-cards td:last-child:not([data-th]) { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
  table.m-cards tfoot tr { background: var(--surface-2); }
  table.m-cards td .cell-input, table.m-cards td input:not([type="checkbox"]) { width: 100%; max-width: none; }
  table.m-cards tr.click:active { background: var(--surface-2); }
}

/* ---- Telefon (≤640px): yozuvlar kattaroq; maydonlar 16px – iPhone bosilganda sahifani kattalashtirmaydi ---- */
@media (max-width: 640px) {
  body { font-size: 15px; }
  table { font-size: 14.5px; }
  th { font-size: 12.5px; }
  .faint, .card-h .hint, .top .sub { font-size: 13.5px; }
  .small, small.block { font-size: 13px; }
  .kpi .h { font-size: 14px; }
  .kpi .f { font-size: 13px; }
  .field label { font-size: 14px; }
  .field input, .field select, .field textarea, .txt-row input, .txt-row textarea, input.inp, .cell-input, .sel-btn { font-size: 16px; }
  .btn { font-size: 14.5px; }
  .tabbar a { font-size: 11.5px; }
}

/* Huquqlar: har huquq Telegram'da nimani ochadi; Telegram sahifasi: sizga keladigan xabarlar */
.perm-table td small.perm-tg { display: flex; align-items: flex-start; gap: 5px; color: var(--accent-text, var(--accent)); margin-top: 4px; }
.perm-table td small.perm-tg svg.i { width: 13px; height: 13px; flex: none; margin-top: 2px; color: inherit; }
.tg-gets { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.tg-gets .plain-list { margin-top: 6px; }

/* ---- Sotuvchining shaxsiy havolasi ---- */
.ref-own > * + * { margin-top: 14px; }
.ref-own > .card-h + * { margin-top: 0; }
.ref-copy { display: flex; gap: 8px; align-items: center; }
.ref-copy .inp { flex: 1; min-width: 0; font-size: 13.5px; }
.ref-funnel { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ref-funnel > div { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.ref-funnel b { font-size: 20px; font-weight: 600; }
.ref-funnel span { font-size: 12.5px; color: var(--ink-3); }
.sel-card .ref-mini { font-size: 12.5px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sel-card .ref-mini svg.i { width: 13px; height: 13px; }
/* Mijoz ko‘radigan sahifa (/s/<kod>) */
body.ref-body { background: var(--bg); min-height: 100vh; }
.ref-page { max-width: 440px; margin: 0 auto; padding: 40px 16px 32px; display: flex; flex-direction: column; gap: 14px; }
.ref-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.ref-head { display: flex; gap: 14px; align-items: center; }
.ref-head h1 { font-size: 20px; font-weight: 600; margin: 0; }
.ref-head p { margin: 2px 0 0; }
.ref-actions { display: flex; flex-direction: column; gap: 10px; }
.ref-btn { justify-content: center; min-height: 46px; font-size: 15px; width: 100%; }
.ref-or { text-align: center; color: var(--ink-3); font-size: 13px; margin: 0; display: flex; align-items: center; gap: 10px; }
.ref-or::before, .ref-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.ref-foot { text-align: center; font-size: 12.5px; margin: 0; }
@media (max-width: 640px) { .ref-funnel { grid-template-columns: repeat(2, 1fr); } }
.page-chips { margin-bottom: 16px; }

/* Admin Bosh sahifa – bitta ekranga sig‘adi: chapda Diqqat + Eng faol, o‘ngda sayt statistikasi */
.kpis-compact .kpi { min-height: 0; padding: 14px 18px; gap: 8px; }
.kpis-compact .kpi .ico { width: 30px; height: 30px; }
.kpis-compact .kpi .v { font-size: 22px; }
.admin-home { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 18px; align-items: stretch; }
/* ikki ustun bo‘yi teng: chapda “Diqqat” bo‘sh joyni oladi, o‘ngda ro‘yxatlar pastga yopishadi */
.admin-home-left > .card:first-child { flex: 1 1 auto; }
.admin-home .site-stats { display: flex; flex-direction: column; }
.admin-home .site-stats .lists { margin-top: auto; padding-top: 10px; }
.admin-home .card { margin: 0; }
.admin-home-left { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.admin-home .card { padding: 18px 20px; }
.admin-home .card-h { margin-bottom: 12px; }
.admin-home .admin-todo-list { max-height: 300px; overflow-y: auto; }
.admin-home .admin-todo { padding: 9px 0; }
.admin-home .admin-todo .ic { width: 30px; height: 30px; }
.top-shops { display: flex; flex-direction: column; }
.top-shop { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 13.5px; }
.top-shop:first-child { border-top: 0; padding-top: 0; }
.top-shop:hover { text-decoration: none; }
.top-shop:hover b:first-child { color: var(--accent-text); }
.top-shop .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top-shop small { color: var(--ink-3); font-size: 12px; }
.site-stats .mini-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.site-stats .mini-nums > div { background: var(--surface-2); border-radius: 10px; padding: 8px 12px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.site-stats .mini-nums span { flex: 1 1 100%; font-size: 12px; color: var(--ink-3); }
.site-stats .mini-nums b { font-size: 19px; font-weight: 600; }
.site-stats .mini-nums small { font-size: 12px; color: var(--ink-3); }
.site-stats .mini-nums small.up { color: var(--good); }
.site-stats .mini-nums small.down { color: var(--bad); }
.site-stats .lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 6px; }
.site-stats .lists h3 { font-size: 13px; font-weight: 600; margin: 0 0 4px; }
.site-stats .bar-row { display: grid; grid-template-columns: minmax(0, 1fr) 70px 30px; gap: 8px; align-items: center; padding: 4px 0; font-size: 13px; }
.site-stats .bar-row > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-stats .bar-row .num { text-align: right; }
@media (max-width: 1100px) { .admin-home { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .site-stats .mini-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); } .site-stats .lists { grid-template-columns: minmax(0, 1fr); } }

/* Fayl tanlash maydoni (brauzerning “Выберите файл” tugmasi o‘rniga) */
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; padding: 26px 16px; border: 1.5px dashed var(--line); border-radius: 14px; background: var(--surface-2); cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over, .drop:focus-within { border-color: var(--accent); background: var(--accent-soft); }
.drop b { font-weight: 600; font-size: 14.5px; color: var(--ink); }
.drop .faint { font-size: 13px; }
.drop-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); color: var(--accent-text); margin-bottom: 4px; }
.drop-ic svg.i { width: 20px; height: 20px; }
.drop.busy { opacity: .6; pointer-events: none; }
.drop.sm { padding: 16px 12px; margin-bottom: 10px; }
.drop.sm .drop-ic { width: 32px; height: 32px; }

/* Media kutubxona */
.media-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-used { display: inline-flex; align-items: center; gap: 5px; color: var(--good); min-width: 0; }
.media-used svg.i { width: 14px; height: 14px; flex: none; }
.media-used a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.img-tile .row { justify-content: space-between; gap: 8px; }
.media-dialog { width: min(920px, calc(100vw - 32px)); max-height: calc(100vh - 64px); border: 1px solid var(--line); border-radius: 20px; padding: 22px; background: var(--surface); color: var(--ink); }
.media-dialog::backdrop { background: rgba(10, 12, 16, .45); }
.media-dialog .img-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

/* SotuvON logotipi (partials/logo.ejs): yorug‘ mavzuda to‘q “Sotuv”, qorong‘ida oq; .white – faqat oq (to‘q fon) */
.logo-pair { display: inline-flex; align-items: center; line-height: 0; }
.logo-pair img { height: var(--logo-h, 18px); width: auto; display: block; }
.logo-pair .d { display: none; }
.logo-pair.white .d { display: block; }
:root[data-theme="dark"] .logo-pair .l { display: none; }
:root[data-theme="dark"] .logo-pair .d { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-pair .l { display: none; }
  :root:not([data-theme="light"]) .logo-pair .d { display: block; }
}
.brand-row { display: flex; align-items: center; gap: 8px; --logo-h: 17px; }
.brand-row .admin-badge { margin-left: 0; vertical-align: 0; }
.brand small { display: block; margin-top: 4px; }
.tg-entry-ic { width: 56px; height: 56px; }
