:root {
  color-scheme: light;
  --bg: #f4f3f0;
  --surface-1: #fcfcfb;
  --surface-2: #f0efec;
  --border: #e2e1dc;
  --grid: #ebeae6;
  --text-primary: #0b0b0b;
  --text-secondary: #52514e;
  --text-muted: #77766f;
  --accent: #2a78d6;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --series-5: #e87ba4;
  --series-6: #008300;
  --series-7: #6250d6;
  --series-8: #e34948;
  --seq: #2a78d6;
  --good: #0ca30c;
  --good-text: #006300;
  --critical: #d03b3b;
  --critical-bg: #fbeceb;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04);
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --bg: #121211;
    --surface-1: #1a1a19;
    --surface-2: #232321;
    --border: #2f2f2c;
    --grid: #2a2a28;
    --text-primary: #f0efec;
    --text-secondary: #c3c2b7;
    --text-muted: #8f8e86;
    --accent: #3987e5;
    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --series-4: #c98500;
    --series-5: #d55181;
    --series-6: #008300;
    --series-7: #9085e9;
    --series-8: #e66767;
    --seq: #3987e5;
    --good-text: #4cc54c;
    --critical-bg: #3a1f1e;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121211;
  --surface-1: #1a1a19;
  --surface-2: #232321;
  --border: #2f2f2c;
  --grid: #2a2a28;
  --text-primary: #f0efec;
  --text-secondary: #c3c2b7;
  --text-muted: #8f8e86;
  --accent: #3987e5;
  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --series-4: #c98500;
  --series-5: #d55181;
  --series-6: #008300;
  --series-7: #9085e9;
  --series-8: #e66767;
  --seq: #3987e5;
  --good-text: #4cc54c;
  --critical-bg: #3a1f1e;
  --shadow: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text-primary);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.muted { color: var(--text-muted); }
.hidden { display: none !important; }

/* --- Yon menyu va sahifa tuzilishi --- */
.layout { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px;
  padding: 18px 12px; background: var(--surface-1); border-right: 1px solid var(--border);
}
.sidebar-brand { font-weight: 680; font-size: 16px; letter-spacing: -.01em; color: var(--text-primary);
  text-decoration: none; padding: 2px 10px; }
.sidebar-brand span { display: block; color: var(--text-muted); font-weight: 500; font-size: 12.5px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
  color: var(--text-secondary); text-decoration: none; white-space: nowrap; }
.nav-link svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; }
.nav-link:hover { background: var(--surface-2); color: var(--text-primary); }
.nav-link[aria-current="page"] { background: var(--surface-2); color: var(--text-primary); font-weight: 600; }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding: 0 4px; font-size: 13px; }
.sidebar-foot-qator { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 0 6px; }
.content { min-width: 0; }

/* --- Sarlavha --- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 24px; background: var(--surface-1); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 5; min-height: 61px;
}
.page-title { font-size: 17px; font-weight: 650; margin: 0; letter-spacing: -.01em; }
.page-sub { color: var(--text-muted); font-size: 12.5px; }
.topbar-right { display: flex; align-items: center; gap: 12px; color: var(--text-secondary); font-size: 13px; }
.link { color: var(--text-secondary); text-decoration: none; }
.link:hover { color: var(--text-primary); }

.wrap { max-width: 1280px; margin: 0 auto; padding: 20px 24px 48px; }

/* --- Filtrlar --- */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; background: var(--surface-1); border: 1px solid var(--border);
  border-radius: 10px; padding: 3px; }
.chip { border: 0; background: transparent; padding: 6px 12px; border-radius: 7px; cursor: pointer;
  color: var(--text-secondary); white-space: nowrap; }
.chip:hover { color: var(--text-primary); background: var(--surface-2); }
.chip[aria-pressed="true"] { background: var(--text-primary); color: var(--surface-1); }
.field { display: flex; align-items: center; gap: 6px; color: var(--text-secondary); }
.field input, .field select, .input {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; min-height: 34px;
}
.btn { border: 1px solid var(--border); background: var(--surface-1); border-radius: 8px; padding: 6px 12px;
  cursor: pointer; min-height: 34px; }
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .55; cursor: progress; }
.spacer { flex: 1; }
input[type="search"].input { min-width: 230px; }

.banner { padding: 10px 14px; border-radius: 10px; margin-bottom: 16px; background: var(--critical-bg);
  color: var(--text-primary); border: 1px solid var(--critical); }
.note { color: var(--text-muted); font-size: 12.5px; margin: -8px 0 16px; }

/* --- Kartalar --- */
.grid { display: grid; gap: 16px; }
.kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; }
.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-bottom: 16px; }
.card { background: var(--surface-1); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px;
  box-shadow: var(--shadow); min-width: 0; }
.card h2 { font-size: 15px; font-weight: 620; margin: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin-bottom: 12px; }
.card-sub { color: var(--text-muted); font-size: 12.5px; }

.kpi-label { color: var(--text-secondary); font-size: 13px; }
.kpi-value { font-size: 26px; font-weight: 650; letter-spacing: -.02em; margin: 4px 0 2px;
  font-variant-numeric: tabular-nums; }
.kpi-unit { font-size: 14px; font-weight: 500; color: var(--text-muted); margin-left: 4px; }
.delta { font-size: 12.5px; color: var(--text-muted); }
.delta b { font-weight: 600; }
.delta.up b { color: var(--good-text); }
.delta.down b { color: var(--critical); }

/* --- Jadvallar --- */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 8px 6px; border-bottom: 1px solid var(--grid); vertical-align: middle; }
th { text-align: left; font-weight: 550; font-size: 12.5px; color: var(--text-muted); white-space: nowrap; }
th.num { text-align: right; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-2); }
tfoot td { font-weight: 620; border-top: 1px solid var(--border); border-bottom: 0; }
.sortable { cursor: pointer; user-select: none; }
.sortable[aria-sort="descending"]::after { content: " ↓"; }

.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px;
  vertical-align: -1px; }
.name-cell { min-width: 140px; }
.name-sub { display: block; color: var(--text-muted); font-size: 12px; }
.bar-cell { width: 24%; min-width: 60px; }
.bar { height: 10px; border-radius: 0 4px 4px 0; min-width: 2px; }
.bar-track { position: relative; }

.minus-tag { display: inline-flex; align-items: center; gap: 4px; color: var(--critical); font-size: 12px;
  font-weight: 600; margin-left: 6px; white-space: nowrap; }
tr.minus td.qty { color: var(--critical); font-weight: 600; }

.chart-box { position: relative; height: 300px; }
.empty { color: var(--text-muted); padding: 36px 0; text-align: center; }

.stores { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 14px; gap: 10px; }
.store { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; cursor: pointer;
  background: var(--surface-1); text-align: left; }
.store:hover { background: var(--surface-2); }
.store[aria-pressed="true"] { border-color: var(--text-primary); box-shadow: inset 0 0 0 1px var(--text-primary); }
.store-name { font-weight: 600; font-size: 13px; }
.store-meta { color: var(--text-secondary); font-size: 12.5px; margin-top: 2px; }
.more { margin-top: 10px; text-align: center; }

.loading { opacity: .5; transition: opacity .15s; }

@media (max-width: 1180px) {
  .two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; flex-wrap: wrap;
    gap: 6px 12px; padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--border); }
  .sidebar-brand span { display: none; }
  .nav { flex-direction: row; gap: 4px; }
  .sidebar-foot { margin-left: auto; padding: 0; flex-direction: row; align-items: center; }
  .mavzu button span { display: none; }
  .sidebar-foot #rol { display: none; }
}
@media (max-width: 560px) {
  .topbar { padding: 12px 16px; }
  .wrap { padding: 14px 16px 40px; }
  .card { padding: 14px 12px; }
  .kpi-value { font-size: 21px; }
  .bar-cell { display: none; }
  .hide-sm { display: none; }
  table { font-size: 13px; }
  th, td { padding: 7px 4px; }
  .name-cell { min-width: 0; }
  .card-head .input { width: 100%; min-width: 0; }
  .card-head > .filters { width: 100%; }
}

/* --- Kirish sahifasi --- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login form { width: 100%; max-width: 360px; }
.login h1 { font-size: 18px; margin: 0 0 4px; }
.login p { margin: 0 0 16px; color: var(--text-secondary); }
.login .input { width: 100%; margin-bottom: 12px; }
.login .btn { width: 100%; background: var(--text-primary); color: var(--surface-1); border-color: var(--text-primary); }
.login .err { color: var(--critical); margin-bottom: 12px; font-size: 13px; }

/* --- Mahsulotlar jadvali --- */
.wrap.wide { max-width: none; }
.grid-card { padding: 0; overflow: hidden; }
.grid-wrap { overflow: auto; max-height: calc(100vh - 190px); margin: 0; }
.grid-table { font-size: 13.5px; }
.grid-table thead { position: sticky; top: 0; z-index: 2; background: var(--surface-1); }
.grid-table thead th { background: var(--surface-1); }
.grid-table th, .grid-table td { padding: 7px 10px; }
.grid-table .head-row th { border-bottom: 0; padding-top: 10px; }
.grid-table .head-row th[data-sort] { cursor: pointer; user-select: none; }
.grid-table .head-row th[aria-sort="ascending"]::after { content: " ↑"; }
.grid-table .head-row th[aria-sort="descending"]::after { content: " ↓"; }
.filter-row th { padding-top: 2px; padding-bottom: 8px; border-bottom: 1px solid var(--border); font-weight: 400; }
.filter-row input, .filter-row select {
  width: 100%; min-width: 70px; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 6px; padding: 4px 7px; font-size: 12.5px; color: var(--text-primary); min-height: 28px;
}
.filter-row input:focus, .filter-row select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.col-name { min-width: 220px; }
.col-narx { min-width: 118px; text-align: right; }
.price-cell { position: relative; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.price-cell.editable { cursor: pointer; }
.price-cell.editable:hover { box-shadow: inset 0 0 0 1px var(--border); border-radius: 6px; }
.price-cell .src { display: block; font-size: 11px; color: var(--text-muted); }
.price-cell.off { color: var(--text-muted); }
.price-cell.changed { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.price-cell.changed .new { font-weight: 650; color: var(--text-primary); }
.price-cell .old { display: block; font-size: 11.5px; color: var(--text-muted); text-decoration: line-through; }
.price-cell .plan { display: block; font-size: 11px; color: var(--accent); }
.tag { display: inline-block; font-size: 11.5px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2);
  color: var(--text-secondary); white-space: nowrap; }
.table-foot { padding: 10px 14px; color: var(--text-muted); font-size: 12.5px; border-top: 1px solid var(--border); }

.editor { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); z-index: 3; width: 210px;
  background: var(--surface-1); border: 1px solid var(--border); border-radius: 10px; padding: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18); text-align: left; cursor: default; white-space: normal; }
.editor input[type="text"] { width: 100%; font-size: 15px; text-align: right; padding: 6px 8px; border-radius: 7px;
  border: 1px solid var(--accent); background: var(--surface-1); font-variant-numeric: tabular-nums; }
.editor label { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--text-secondary); margin: 8px 0; }
.editor .row { display: flex; gap: 6px; justify-content: flex-end; }
.editor .btn { min-height: 28px; padding: 3px 10px; font-size: 13px; }
.btn.primary { background: var(--text-primary); color: var(--surface-1); border-color: var(--text-primary); }
.btn.primary:hover { opacity: .9; background: var(--text-primary); }

.savebar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 20;
  display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border-radius: 12px;
  background: var(--text-primary); color: var(--surface-1); box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  max-width: calc(100vw - 32px); flex-wrap: wrap; }
.savebar .btn { background: transparent; color: var(--surface-1);
  border-color: color-mix(in srgb, var(--surface-1) 35%, transparent); }
.savebar .btn.primary { background: var(--surface-1); color: var(--text-primary); border-color: var(--surface-1); }

dialog { border: 1px solid var(--border); border-radius: 14px; padding: 0; background: var(--surface-1);
  color: var(--text-primary); width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px); }
dialog::backdrop { background: rgba(0, 0, 0, .45); }
.dlg-head, .dlg-foot { padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dlg-head { border-bottom: 1px solid var(--border); }
.dlg-head h2 { margin: 0; font-size: 16px; }
.dlg-body { padding: 14px 18px; overflow: auto; max-height: calc(100vh - 260px); }
.dlg-foot { border-top: 1px solid var(--border); flex-wrap: wrap; }
.dlg-fields { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0 4px; }
.dlg-fields label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--text-secondary); }
.dlg-fields .grow { flex: 1; min-width: 200px; }
.warn { color: var(--critical); font-weight: 600; font-size: 12px; }
.ok-msg { color: var(--good-text); font-weight: 600; }
.notice { padding: 10px 14px; border-radius: 10px; background: var(--surface-2); color: var(--text-secondary);
  margin-bottom: 14px; font-size: 13px; }
.history-item { border-bottom: 1px solid var(--grid); padding: 10px 0; }
.history-item:last-child { border-bottom: 0; }
.filter-row select { min-width: 118px; }
/* Yonga surganda mahsulot nomi ko'rinib tursin */
.grid-table td.col-name, .grid-table thead th:first-child { position: sticky; left: 0; background: var(--surface-1); z-index: 1; }
.grid-table thead th:first-child { z-index: 3; }
.grid-table tbody tr:hover td.col-name { background: var(--surface-2); }
@media (max-width: 560px) {
  .col-name { min-width: 150px; max-width: 170px; }
  .grid-wrap { max-height: calc(100vh - 150px); }
}

/* ============ Saytning o'z komponentlari (CLAUDE.md, 1-qoida) ============ */
:root { --border-strong: #c9c8c2; --scroll: #cfcec8; --hover: #ecebe7; }
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) { --border-strong: #4a4a46; --scroll: #3d3d3a; --hover: #2c2c2a; }
}
:root[data-theme="dark"] { --border-strong: #4a4a46; --scroll: #3d3d3a; --hover: #2c2c2a; }

.ui-native { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0 !important;
  pointer-events: none !important; overflow: hidden; clip-path: inset(50%); margin: 0 !important; }
.ui-ikon { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round; }

.ui-select, .ui-date {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px;
  padding: 6px 10px; background: var(--surface-1); color: var(--text-primary); border: 1px solid var(--border);
  border-radius: 8px; cursor: pointer; text-align: left; max-width: 100%; font: inherit;
}
.ui-select:hover, .ui-date:hover { border-color: var(--border-strong); }
.ui-select[aria-expanded="true"], .ui-date[aria-expanded="true"] { border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.ui-select .ui-matn, .ui-date .ui-matn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-select .ui-ikon { color: var(--text-muted); transition: transform .15s; }
.ui-select[aria-expanded="true"] .ui-ikon { transform: rotate(180deg); }
/* Sana: qo'lda yoziladigan matn + kalendar belgisi (ui.js sanaBezat) */
.ui-date { justify-content: flex-start; gap: 2px; padding: 0 10px 0 3px; cursor: text; font-variant-numeric: tabular-nums; }
.ui-date:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.ui-date.xato { border-color: var(--critical); box-shadow: 0 0 0 3px color-mix(in srgb, var(--critical) 16%, transparent); }
.ui-date .ui-date-matn { flex: 1 1 auto; width: 10.6ch; min-width: 0; min-height: 0; padding: 6px 0; border-radius: 0; border: 0; background: transparent; color: var(--text-primary);
  font: inherit; font-variant-numeric: tabular-nums; outline: none; }
.ui-date.vaqtli .ui-date-matn { width: 16.4ch; }
.ui-date .ui-date-matn:focus-visible { outline: none; }
.ui-date .ui-date-matn:disabled { color: var(--text-muted); cursor: not-allowed; }
.ui-date-ikon { order: -1; flex: none; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0;
  border-radius: 6px; background: transparent; color: var(--text-muted); cursor: pointer; }
.ui-date-ikon:hover, .ui-date[aria-expanded="true"] .ui-date-ikon { background: var(--hover); color: var(--text-primary); }
.ui-date-ikon .ui-ikon { width: 15px; height: 15px; }
.ui-select:disabled { opacity: .55; cursor: not-allowed; }
.ui-select.kichik, .filter-row .ui-select { width: 100%; min-width: 110px; min-height: 28px; padding: 4px 8px;
  font-size: 12.5px; background: var(--surface-2); border-radius: 6px; }
.filter-row .ui-select.tanlangan { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.dlg-fields .ui-date, .dlg-fields .ui-select { min-width: 170px; }

.ui-pop { position: fixed; z-index: 1000; background: var(--surface-1); color: var(--text-primary);
  border: 1px solid var(--border); border-radius: 10px; padding: 4px; max-width: min(360px, calc(100vw - 16px));
  box-shadow: 0 12px 32px rgba(0, 0, 0, .18), 0 2px 6px rgba(0, 0, 0, .08); }
.ui-royxat { max-height: 300px; overflow: auto; outline: none; }
.ui-qidiruv { width: 100%; margin: 2px 0 4px; padding: 6px 9px; border: 1px solid var(--border); border-radius: 7px;
  background: var(--surface-2); color: var(--text-primary); font: inherit; font-size: 13px; outline: none; }
.ui-qidiruv:focus { border-color: var(--accent); }
.ui-opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 10px;
  border-radius: 6px; cursor: pointer; font-size: 13.5px; white-space: nowrap; }
.ui-opt.faol { background: var(--hover); }
.ui-opt[aria-selected="true"] { font-weight: 600; }
.ui-opt[aria-selected="true"] .ui-ikon { color: var(--accent); }
.ui-opt[data-faol="0"] { opacity: .45; cursor: default; }

.ui-kalendar { padding: 6px; width: 260px; }
.ui-kal-bosh { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.ui-kal-bosh b { font-size: 14px; font-weight: 620; }
.ui-kal-oq { border: 0; background: transparent; color: var(--text-secondary); width: 30px; height: 30px;
  border-radius: 7px; display: grid; place-items: center; cursor: pointer; }
.ui-kal-oq:hover { background: var(--hover); color: var(--text-primary); }
.ui-kal-hafta, .ui-kal-kunlar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.ui-kal-hafta span { text-align: center; font-size: 11.5px; color: var(--text-muted); padding: 4px 0; }
.ui-kun { border: 0; background: transparent; color: var(--text-primary); height: 32px; border-radius: 7px;
  cursor: pointer; font: inherit; font-size: 13px; font-variant-numeric: tabular-nums; }
.ui-kun:hover:not(:disabled) { background: var(--hover); }
.ui-kun.bugun { box-shadow: inset 0 0 0 1px var(--border-strong); font-weight: 600; }
.ui-kun.tanlangan { background: var(--accent); color: #fff; font-weight: 650; }
.ui-kun:disabled { color: var(--text-muted); opacity: .4; cursor: default; }
.ui-kal-oyoq { display: flex; justify-content: flex-end; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--grid); }
.ui-kal-bugun { border: 0; background: transparent; color: var(--accent); font: inherit; font-size: 13px;
  font-weight: 600; padding: 4px 8px; border-radius: 6px; cursor: pointer; }
.ui-kal-bugun:hover { background: var(--hover); }

.ui-tip { position: fixed; z-index: 1100; max-width: 300px; padding: 6px 9px; border-radius: 7px; font-size: 12.5px;
  line-height: 1.4; background: var(--text-primary); color: var(--surface-1); pointer-events: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .2); white-space: pre-line; }

/* Checkbox va radio - saytning o'z belgisi */
input[type="checkbox"], input[type="radio"] {
  appearance: none; -webkit-appearance: none; width: 17px; height: 17px; margin: 0; flex: none; cursor: pointer;
  border: 1.5px solid var(--border-strong); background: var(--surface-1); border-radius: 5px;
  display: inline-grid; place-content: center; vertical-align: -3px; transition: background .12s, border-color .12s;
}
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"]::before { content: ""; width: 10px; height: 10px; background: #fff; transform: scale(0);
  transition: transform .12s; clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); }
input[type="radio"]::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; transform: scale(0); }
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) { border-color: var(--accent); }

/* Qidiruv "x", raqam strelkalari, autofill, fokus, belgilash */
input::-ms-reveal, input::-ms-clear { display: none; }  /* Edge parol "ko'z"i va "x" - o'rniga saytning o'z tugmasi */
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--surface-1) inset; -webkit-text-fill-color: var(--text-primary);
  caret-color: var(--text-primary); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.input:focus, .filter-row input:focus, .editor input:focus { border-color: var(--accent); outline: none; }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }
::placeholder { color: var(--text-muted); opacity: 1; }

/* Aylantirish chizig'i */
* { scrollbar-width: thin; scrollbar-color: var(--scroll) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scroll); border-radius: 10px; border: 2px solid transparent;
  background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--border-strong); }
::-webkit-scrollbar-corner { background: transparent; }

.btn.xavfli { background: var(--critical); border-color: var(--critical); color: #fff; }

/* Yon menyu: ichki guruh */
.nav-guruh-bosh { width: 100%; border: 0; background: transparent; font: inherit; cursor: pointer; text-align: left; }
.nav-guruh-bosh > span:first-of-type { flex: 1; }
.nav-strelka { display: inline-flex; }
.nav-strelka svg { width: 14px; height: 14px; transition: transform .15s; }
.nav-guruh.ochiq .nav-strelka svg { transform: rotate(90deg); }
.nav-ichki { display: none; flex-direction: column; gap: 1px; margin: 2px 0 4px 18px; padding-left: 10px;
  border-left: 1px solid var(--border); }
.nav-guruh.ochiq .nav-ichki { display: flex; }
.nav-sub { padding: 6px 10px; font-size: 13px; white-space: normal; line-height: 1.3; }
.sidebar { overflow-y: auto; overflow-x: hidden; }
@media (max-width: 860px) {
  .nav { flex-wrap: wrap; }
  .nav-guruh { position: relative; }
  .nav-guruh.ochiq .nav-ichki { position: absolute; top: 100%; left: 0; z-index: 30; margin: 4px 0 0; padding: 6px;
    background: var(--surface-1); border: 1px solid var(--border); border-radius: 10px; min-width: 240px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .18); }
}
.ui-izoh { color: var(--text-muted); font-size: 11.5px; font-weight: 400; }
.ui-royxat .ui-opt { white-space: normal; }
.price-cell .cost { display: block; font-size: 11.5px; color: var(--text-muted); font-weight: 400; margin-top: 1px; }
.price-cell .cost.taxmin { color: var(--text-muted); font-style: italic; }
.th-sub { display: block; font-size: 10.5px; font-weight: 400; color: var(--text-muted); letter-spacing: 0; }
.grid-table .head-row th[aria-sort] .th-sub::after { content: none; }

/* --- Nakladnoylar va hujjatlar --- */
.two-wide { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); align-items: start; }
@media (max-width: 1180px) { .two-wide { grid-template-columns: minmax(0, 1fr); } }
.card-head.pad { padding: 14px 16px 0; margin-bottom: 8px; }
.grid-card .table-wrap { margin: 0; padding: 0 8px 8px; }
.nowrap { white-space: nowrap; }
tr.bosiladi { cursor: pointer; }
tr.bosiladi:focus-visible td { background: var(--surface-2); }
tr.ochirilgan td { opacity: .5; text-decoration: line-through; }
.izoh-cell { max-width: 320px; color: var(--text-secondary); font-size: 12.5px; }
.tag.holat-processed { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good-text); }
.tag.holat-new { background: color-mix(in srgb, var(--series-4) 20%, transparent); color: var(--text-primary); }
.tag.holat-deleted { background: var(--critical-bg); color: var(--critical); }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 16px; margin-bottom: 14px; }
.info-grid > div { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; }
.info-grid .muted { font-size: 12px; }
dialog.keng { width: min(1080px, calc(100vw - 32px)); }
.form-jadval td { padding: 5px 4px; vertical-align: middle; }
.form-jadval tbody tr:hover td { background: transparent; }
.input.w100, .w100 { width: 100%; min-width: 0; }
.input.num { text-align: right; font-variant-numeric: tabular-nums; }
.ikon-btn { min-height: 32px; width: 32px; padding: 0; font-size: 18px; line-height: 1; color: var(--text-muted); }
.ikon-btn:hover { color: var(--critical); }
.check-qator { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; font-size: 13.5px; cursor: pointer; }
.check-qator .muted { font-size: 12.5px; }
.dlg-fields .input { min-height: 34px; }
#n-jami { font-weight: 700; font-size: 15px; }
.ui-vaqt { display: flex; align-items: center; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--grid); font-size: 13px; color: var(--text-secondary); }
.ui-vaqt > span { margin-right: auto; }
.ui-vaqt-son { width: 42px; text-align: center; padding: 5px 4px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-2); color: var(--text-primary); font: inherit; font-size: 14px; font-variant-numeric: tabular-nums; outline: none; }
.ui-vaqt-son:focus { border-color: var(--accent); }
.ui-date.vaqtli { min-width: 170px; }
.nav-bolim { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); padding: 10px 10px 3px; font-weight: 600; }
.nav-ichki .nav-bolim:first-child { padding-top: 4px; }

/* --- Moliya --- */
.manfiy { color: var(--critical); }
.hisobot .jami-qator td { background: var(--surface-2); }
.hisobot .jami-qator.asosiy td { background: color-mix(in srgb, var(--accent) 9%, var(--surface-1)); }
tr.kechikkan td { color: var(--critical); }
tr.kun-tafsilot > td { padding: 0 8px 10px 24px; background: var(--surface-2); }
.ichki-jadval { font-size: 12.5px; }
.ichki-jadval td { padding: 5px 6px; border-bottom: 1px dashed var(--grid); }
.matn-karta { max-width: 760px; font-size: 14.5px; line-height: 1.6; }
.matn-karta p { margin: 0; }
.notice a, .matn-karta a { color: var(--accent); }
#boshqaruv .olap-g + .ui-select { min-width: 150px; }
@media (max-width: 860px) { .nav-guruh.ochiq .nav-ichki { max-height: 70vh; overflow-y: auto; } }

/* --- Kunduzgi / tungi mavzu almashtirgichi --- */
.mavzu { display: flex; gap: 2px; padding: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; }
.mavzu button { flex: 1 1 auto; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  border: 0; background: transparent; color: var(--text-secondary); padding: 5px 4px; border-radius: 7px; font: inherit;
  font-size: 11.5px; cursor: pointer; white-space: nowrap; }
.mavzu button:hover { color: var(--text-primary); }
.mavzu button[aria-pressed="true"] { background: var(--surface-1); color: var(--text-primary); font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .14); }
.mavzu svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; }
html.mavzu-otish, html.mavzu-otish * { transition: background-color .25s, color .25s, border-color .25s !important; }

/* --- Hisobotlar --- */
.hisobot-kartalar { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.hisobot-karta { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--text-primary); transition: border-color .15s, transform .15s; }
.hisobot-karta:hover { border-color: var(--accent); transform: translateY(-1px); }
.hisobot-karta span { color: var(--text-secondary); font-size: 13px; line-height: 1.45; }
td.yaxshi { color: var(--good-text); font-weight: 650; }
td.yomon, .yomon { color: var(--critical); font-weight: 650; }
b.yaxshi { color: var(--good-text); }
tr.xira td { opacity: .45; }
.solishtir td:first-child { color: var(--text-secondary); }
.sinf { display: inline-grid; place-items: center; width: 24px; height: 22px; border-radius: 6px; font-weight: 700; font-size: 12px; }
.sinf-A { background: color-mix(in srgb, var(--good) 18%, transparent); color: var(--good-text); }
.sinf-B { background: color-mix(in srgb, var(--series-4) 22%, transparent); color: var(--text-primary); }
.sinf-C { background: var(--critical-bg); color: var(--critical); }
.issiqlik { display: grid; gap: 3px; min-width: 760px; padding: 2px 2px 6px; font-size: 11px; }
.iss-bosh { text-align: center; color: var(--text-muted); font-size: 11px; padding-bottom: 2px; }
.iss-kun { color: var(--text-secondary); font-size: 12px; display: flex; align-items: center; }
.iss-katak { height: 30px; border-radius: 5px; display: grid; place-items: center; font-variant-numeric: tabular-nums; cursor: default;
  background: color-mix(in srgb, var(--seq) calc(var(--k) * 100%), var(--surface-2));
  color: var(--text-primary); font-size: 11px; white-space: nowrap; overflow: hidden; }
.iss-katak[style*="--k:0.6"], .iss-katak[style*="--k:0.7"], .iss-katak[style*="--k:0.8"], .iss-katak[style*="--k:0.9"], .iss-katak[style*="--k:1"] { color: #fff; }
tr.kat-ichki td { background: var(--surface-2); font-size: 13px; }

/* Yangi versiya xabari (common.js): sahifa o'zi qayta yuklanmaydi, foydalanuvchi tanlaydi */
.versiya-xabar { position: fixed; right: 18px; bottom: 18px; z-index: 900; display: flex; align-items: center; gap: 12px;
  max-width: 560px; padding: 12px 14px; border-radius: 12px; background: var(--surface-1); color: var(--text-primary);
  border: 1px solid var(--border); box-shadow: 0 8px 28px rgba(0, 0, 0, .14); animation: versiya-kir .25s ease-out; }
.versiya-ikon { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.versiya-ikon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.versiya-matn { display: grid; gap: 2px; font-size: 13.5px; min-width: 0; }
.versiya-matn span { color: var(--text-secondary); font-size: 12.5px; }
.versiya-tugmalar { display: flex; gap: 6px; flex: none; }
@keyframes versiya-kir { from { opacity: 0; transform: translateY(8px); } }
@media (max-width: 860px) {
  .versiya-xabar { left: 16px; right: 16px; bottom: 16px; max-width: none; flex-wrap: wrap; }
  .versiya-tugmalar { width: 100%; justify-content: flex-end; }
}
@media (prefers-reduced-motion: reduce) { .versiya-xabar { animation: none; } }

/* --- Instagram bo'limi (instagram.js) --- */
.ig-kpis { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin-bottom: 16px; }
.ig-kpis .kpi-value { font-size: 22px; }
.ig-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.ig-post { display: flex; flex-direction: column; padding: 0; overflow: hidden; text-align: left; cursor: pointer; font: inherit; color: inherit;
  transition: border-color .15s, transform .15s; }
.ig-post:hover { border-color: var(--accent); transform: translateY(-1px); }
.ig-post:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ig-rasm { position: relative; display: block; aspect-ratio: 1 / 1; background: var(--surface-2); overflow: hidden; }
.ig-rasm img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ig-rasm-yoq { display: grid; place-items: center; width: 100%; height: 100%; color: var(--text-muted); }
.ig-rasm-yoq svg, .ig-bosh-holat > svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ig-rasm-yoq.kichik { width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); flex: none; }
.ig-rasm-yoq.kichik svg { width: 20px; height: 20px; }
.ig-play { position: absolute; right: 8px; top: 8px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-size: 11px; color: var(--surface-1); background: color-mix(in srgb, var(--text-primary) 70%, transparent); }
.ig-post-ichi { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 12px; }
.ig-post-bosh { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; }
.ig-post-sarlavha { font-size: 13.5px; line-height: 1.35; overflow-wrap: break-word; }
.ig-stat { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; font-size: 11px; color: var(--text-muted); }
.ig-stat span { display: flex; flex-direction: column; }
.ig-stat b { font-size: 13px; color: var(--text-primary); font-weight: 600; font-variant-numeric: tabular-nums; }
.ig-post-taom { font-size: 12px; color: var(--text-secondary); overflow-wrap: break-word; }
.tag.musbat-tag { background: color-mix(in srgb, var(--good) 16%, transparent); color: var(--good-text); }
.tag.manfiy-tag { background: var(--critical-bg); color: var(--critical); }
.musbat { color: var(--good-text); }
.manfiy { color: var(--critical); }
.ig-ulushlar { display: flex; flex-direction: column; gap: 7px; }
.ig-ulush { display: grid; grid-template-columns: minmax(90px, 38%) minmax(40px, 1fr) auto 52px; gap: 8px; align-items: center; font-size: 13px; }
.ig-ulush .bar-track { display: block; height: 10px; background: var(--surface-2); border-radius: 5px; overflow: hidden; }
.ig-ulush .bar { display: block; height: 100%; border-radius: 5px; }
.ig-ulush-nom { overflow-wrap: break-word; }
.ig-ulush .num { text-align: right; font-variant-numeric: tabular-nums; }
.fold { padding: 0; }
.fold-bosh { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border: 0;
  background: transparent; color: inherit; font: inherit; cursor: pointer; text-align: left; border-radius: 14px; }
.fold-bosh:hover { background: var(--surface-2); }
.fold-bosh b { font-size: 15px; font-weight: 620; }
.fold-strelka svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .15s; display: block; }
.fold.ochiq .fold-strelka svg { transform: rotate(90deg); }
.fold-ichi { display: none; padding: 0 18px 16px; }
.fold.ochiq .fold-ichi { display: block; }
.ig-bosh-holat { text-align: center; padding: 36px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ig-bosh-holat h2 { margin: 4px 0 0; font-size: 18px; }
.ig-bosh-holat p { max-width: 560px; margin: 0 0 6px; line-height: 1.5; }
.ig-akk { display: flex; align-items: center; gap: 8px; }
.ig-akk img, .ig-ulanish-bosh img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.ig-akk svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.ig-akk span { display: flex; flex-direction: column; line-height: 1.2; }
.ig-akk small { color: var(--text-muted); font-size: 12px; }
.ig-tavsiyalar { display: flex; flex-direction: column; gap: 10px; }
.ig-tavsiya { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.ig-tavsiya p { margin: 2px 0 0; color: var(--text-secondary); font-size: 13.5px; line-height: 1.45; }
.ig-ton { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--surface-1);
  background: var(--accent); }
.ig-tavsiya.good .ig-ton { background: var(--good); }
.ig-tavsiya.warn .ig-ton { background: var(--series-4); }
.ig-xulosa { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; color: var(--text-secondary); line-height: 1.5; }
.ig-xulosa b { color: var(--text-primary); }
.ig-taomlar { display: flex; flex-wrap: wrap; gap: 6px; }
.ig-taom { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--border); font: inherit; font-size: 13px; color: var(--text-primary); }
.ig-taom:has(.ig-taom-x) { padding-right: 4px; }
button.ig-taom.taklif { cursor: pointer; border-style: dashed; }
button.ig-taom.taklif:hover { border-color: var(--accent); color: var(--accent); }
.ig-taom-x { border: 0; background: transparent; color: var(--text-muted); cursor: pointer; font-size: 16px; line-height: 1; width: 20px; height: 20px;
  border-radius: 50%; padding: 0; }
.ig-taom-x:hover { background: var(--critical-bg); color: var(--critical); }
.ig-taom-qidir { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.ig-taom-qidir .input { flex: 1; min-width: 200px; }
.ig-h3 { font-size: 14px; font-weight: 620; margin: 18px 0 8px; }
.ig-mini { width: 100%; font-size: 13.5px; }
.ig-mini td { padding: 5px 0; border-bottom: 1px solid var(--border); }
.ig-mini-kpi { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.ig-mini-kpi > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.ig-mini-kpi span { font-size: 12px; color: var(--text-secondary); }
.ig-mini-kpi b { font-size: 14.5px; font-variant-numeric: tabular-nums; }
.ig-mini-kpi small { font-size: 12px; color: var(--text-muted); }
dialog.ig-drawer { margin: 0 0 0 auto; height: 100vh; max-height: 100vh; width: min(720px, 100vw); border-radius: 14px 0 0 14px; border-right: 0; }
dialog.ig-drawer[open] { display: flex; flex-direction: column; }
dialog.ig-drawer .dlg-body { max-height: none; flex: 1; }
.ig-drawer-yuqori { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px; }
.ig-drawer-rasm { aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.ig-drawer-rasm img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ig-drawer-izoh { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.ig-izoh-matn { white-space: pre-wrap; overflow-wrap: break-word; font-size: 13.5px; line-height: 1.5; color: var(--text-secondary); }
.ig-izohlar { display: flex; flex-direction: column; gap: 8px; }
.ig-izoh { font-size: 13.5px; line-height: 1.45; overflow-wrap: break-word; }
.ig-izoh.javob { margin-left: 22px; padding-left: 10px; border-left: 2px solid var(--border); }
.ig-izoh .muted { display: block; font-size: 12px; }
.ig-qator-post { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.ig-qator-post img, .ig-qator-post .ig-rasm-yoq { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: none; background: var(--surface-2); }
.ig-qator-post .ig-rasm-yoq svg { width: 18px; height: 18px; }
.ig-qator-post > span { display: flex; flex-direction: column; gap: 2px; overflow-wrap: break-word; }
tr.bosiladi { cursor: pointer; }
tr.bosiladi:hover td { background: var(--surface-2); }
.ig-ulanish { margin-bottom: 16px; display: flex; flex-direction: column; gap: 12px; }
.ig-ulanish-bosh { display: flex; align-items: center; gap: 12px; }
.ig-ulanish-bosh > div { flex: 1; min-width: 0; }
.ig-holat.ok { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good-text); }
.ig-holat.jarayon { background: color-mix(in srgb, var(--series-4) 20%, transparent); color: var(--text-primary); }
.ig-holat.xato { background: var(--critical-bg); color: var(--critical); }
.ig-nusxa { display: grid; grid-template-columns: minmax(150px, 230px) minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 0;
  border-bottom: 1px solid var(--border); font-size: 13px; }
.ig-nusxa code { overflow-wrap: anywhere; font-size: 12.5px; background: var(--surface-2); padding: 4px 6px; border-radius: 6px; }
.ig-radio-royxat { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.ig-radio-royxat .check-qator { margin-top: 0; }
.bolim-sarlavha { font-size: 16px; font-weight: 620; margin: 26px 0 12px; }
@media (max-width: 860px) {
  .ig-drawer-yuqori { grid-template-columns: 1fr; }
  .ig-drawer-rasm { max-width: 280px; }
  dialog.ig-drawer { border-radius: 0; }
  .ig-nusxa { grid-template-columns: 1fr; }
  .ig-ulush { grid-template-columns: minmax(80px, 34%) minmax(30px, 1fr) auto; }
  .ig-ulush > .muted { display: none; }
}
a.btn { display: inline-flex; align-items: center; text-decoration: none; color: var(--text-primary); }
a.btn.primary { color: var(--surface-1); }
.ig-ulush.korr { grid-template-columns: minmax(130px, 34%) minmax(40px, 1fr) 44px minmax(110px, auto); }
@media (max-width: 860px) { .ig-ulush.korr { grid-template-columns: minmax(100px, 40%) minmax(30px, 1fr) 40px; } .ig-ulush.korr > .muted { display: none; } }
.smena-amal { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 12px 14px; margin: 4px 0 10px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.smena-amal .card-sub { margin-top: 2px; max-width: 560px; }

/* Ma'lumot kelguncha skelet: birinchi yuklashda sahifa bo'sh turmasin (main.loading va #asosiy hali bo'sh bo'lsa) */
main.loading:has(> #asosiy:empty) { opacity: 1; }
main.loading #asosiy:empty::before { content: ""; display: block; height: 440px; border-radius: 14px; border: 1px solid var(--border);
  background-color: var(--surface-1); background-origin: content-box; background-clip: content-box; padding: 22px 20px;
  background-image:
    linear-gradient(100deg, transparent 0, color-mix(in srgb, var(--surface-1) 65%, transparent) 50%, transparent 100%),
    linear-gradient(var(--surface-2), var(--surface-2)),
    repeating-linear-gradient(to bottom, var(--surface-2) 0 14px, transparent 14px 38px);
  background-size: 35% 100%, 30% 18px, 100% calc(100% - 46px);
  background-position: -60% 0, 0 0, 0 46px;
  background-repeat: no-repeat;
  animation: skelet 1.3s ease-in-out infinite; }
@keyframes skelet { to { background-position: 160% 0, 0 0, 0 46px; } }
@media (prefers-reduced-motion: reduce) { main.loading #asosiy:empty::before { animation: none; } }

/* Telefon ilovasi va bildirishnomalar (yon menyu pastida) */
.ilova-tugma { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface-1); color: var(--text-secondary); font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.ilova-tugma:hover { background: var(--hover); color: var(--text-primary); }
.ilova-tugma svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#ilova-oyna { width: min(520px, calc(100vw - 32px)); }
#ilova-oyna p { margin: 0 0 10px; line-height: 1.5; }
.ilova-tugmalar { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 860px) {
  .ilova-tugma { width: auto; padding: 6px 8px; }
  .ilova-tugma span { display: none; }
}

/* Yangi nakladnoy oynasi: tur tanlovi (kirim / chiqim, chiqimda - filialga yoki kontragentga) */
.nakl-turi { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; margin-bottom: 4px; }
.nakl-turi .muted { font-size: 12.5px; flex: 1 1 260px; }

/* Oyna ichidagi skelet (common.js OYNA_SKELET): ma'lumot kelguncha */
.oyna-skelet { display: grid; gap: 10px; padding: 4px 0 8px; }
.oyna-skelet i { display: block; height: 16px; border-radius: 6px; background: linear-gradient(100deg, var(--surface-2) 30%,
  color-mix(in srgb, var(--surface-2) 40%, var(--surface-1)) 50%, var(--surface-2) 70%) 0 0 / 300% 100%; animation: oyna-skelet 1.2s linear infinite; }
.oyna-skelet i:nth-child(1) { width: 60%; height: 22px; }
.oyna-skelet i:nth-child(2) { height: 64px; }
.oyna-skelet i:nth-child(3) { width: 85%; }
@keyframes oyna-skelet { to { background-position: -150% 0; } }
@media (prefers-reduced-motion: reduce) { .oyna-skelet i { animation: none; } }

/* Kassa topshirish (kassa_topshirish.js) */
.kt-jadval tr.kt-kun td, tr.kt-kun td { border-top: 2px solid var(--border); }
td.kt-takror { color: var(--text-muted); font-size: 12px; }
.kt-katta { font-weight: 700; }
.kt-tezkor { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.kt-xulosa { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--text-secondary); }
.kt-xulosa b { color: var(--text-primary); font-variant-numeric: tabular-nums; }
.kt-xulosa b.manfiy { color: var(--critical); }
.kt-xulosa b.musbat { color: var(--good-text); }

/* Kassa smenasi oynasi (kassa.js smenaChiz) */
.dlg-head-amal { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.dlg-head h2 .tag { vertical-align: 2px; margin-left: 4px; cursor: help; }
.smena-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 16px; margin-bottom: 12px; }
.smena-meta > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.smena-meta span { color: var(--text-muted); font-size: 12px; }
.smena-meta b { font-weight: 550; font-size: 13.5px; overflow-wrap: anywhere; }
.smena-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.smena-kpi > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); min-width: 0; }
.smena-kpi span { font-size: 12px; color: var(--text-secondary); }
.smena-kpi b { font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.smena-kpi small { font-size: 12px; color: var(--text-muted); }
.smena-bolim { margin-top: 16px; min-width: 0; }
.smena-bolim h3 { display: flex; align-items: baseline; gap: 8px; margin: 0 0 6px; font-size: 13.5px; font-weight: 620; }
.smena-bolim h3 .muted { font-size: 12px; font-weight: 400; }
.smena-jadval { font-size: 13px; }
.smena-jadval th, .smena-jadval td { padding: 6px 8px; }
.smena-jadval.ixcham td { padding: 5px 8px; }
.smena-jadval .name-sub { font-size: 11.5px; }
.smena-ikki { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 0 24px; align-items: start; }
@media (max-width: 760px) { .smena-ikki { grid-template-columns: minmax(0, 1fr); } }
