/* ============================================================
   DELCOM Учет — design system
   Tokens → base → layout → components → pages → responsive
   ============================================================ */
:root {
  --bg:#F6F7F9; --surface:#FFFFFF; --surface2:#F9FAFB; --text:#17212B; --text2:#3F4A56; --muted:#6B7683; --faint:#9AA4AF;
  --line:#E3E7EC; --line2:#EDF0F3;
  --accent:#087F6D; --accent-h:#066A5B; --accent-soft:#E3F3F0; --accent-text:#0B6B5C;
  --pos:#15803D; --pos-soft:#E5F5EA; --neg:#C62828; --neg-soft:#FCE9E8; --warn:#B45309; --warn-soft:#FEF3E2; --info:#1D4ED8; --info-soft:#E8EEFC;
  --r:10px; --r-sm:8px; --r-xs:6px;
  --sh:0 1px 2px rgba(23,33,43,.05); --sh-md:0 6px 20px rgba(23,33,43,.10);
  --sb:230px; --sb-mini:64px; --top:52px;
  --brand:var(--accent);
}
*, *::before, *::after { box-sizing:border-box; }
html { -webkit-text-size-adjust:100%; }
body { margin:0; font:400 14px/1.45 Inter, -apple-system, "Segoe UI", Roboto, sans-serif; color:var(--text); background:var(--bg); -webkit-font-smoothing:antialiased; }
a { color:var(--accent-text); text-decoration:none; } a:hover { text-decoration:underline; }
h1 { font-size:20px; font-weight:600; line-height:1.25; margin:0; letter-spacing:-.01em; } h1 small { font-size:13px; font-weight:400; color:var(--muted); }
h2 { font-size:15px; font-weight:600; margin:0 0 12px; } h3 { font-size:13px; font-weight:600; color:var(--muted); margin:14px 0 8px; text-transform:none; }
b, strong { font-weight:600; } small { font-size:12px; } .small { font-size:12px; } .muted { color:var(--muted); }
.pos { color:var(--pos); } .neg { color:var(--neg); }
[hidden] { display:none !important; }
:focus-visible { outline:2px solid var(--accent); outline-offset:2px; border-radius:4px; }
svg { flex-shrink:0; }

/* ---------- layout ---------- */
.sb { position:fixed; left:0; top:0; bottom:0; width:var(--sb); background:var(--surface); border-right:1px solid var(--line); display:flex; flex-direction:column; z-index:300; transition:width .15s ease, transform .2s ease; }
.app { margin-left:var(--sb); min-height:100vh; display:flex; flex-direction:column; transition:margin .15s ease; }
main { padding:20px 24px 48px; max-width:1480px; width:100%; }
body.sb-mini .sb { width:var(--sb-mini); } body.sb-mini .app { margin-left:var(--sb-mini); }
/* brand */
.sb-brand { display:flex; align-items:center; gap:10px; height:var(--top); padding:0 14px; border-bottom:1px solid var(--line2); }
.sb-brand img { width:30px; height:30px; border-radius:8px; flex:none; }
.sb-brand b { font-size:15px; font-weight:700; letter-spacing:.02em; white-space:nowrap; } .sb-brand small { display:block; font-size:11px; color:var(--muted); font-weight:400; white-space:nowrap; letter-spacing:0; }
/* nav */
.sb-nav { flex:1; overflow-y:auto; padding:10px 10px 8px; scrollbar-width:thin; }
.sb-group { font-size:11px; font-weight:600; color:var(--faint); letter-spacing:.06em; text-transform:uppercase; padding:14px 10px 6px; white-space:nowrap; }
.sb-group:first-child { padding-top:4px; }
.sb-link { display:flex; align-items:center; gap:10px; height:36px; padding:0 10px; border-radius:var(--r-sm); color:var(--text2); font-size:14px; white-space:nowrap; position:relative; }
.sb-link svg { width:18px; height:18px; color:var(--muted); } .sb-link:hover { background:var(--surface2); color:var(--text); text-decoration:none; }
.sb-link.on { background:var(--accent-soft); color:var(--accent-text); font-weight:500; } .sb-link.on svg { color:var(--accent); }
.sb-link .cnt { margin-left:auto; font-size:11px; color:var(--muted); background:var(--line2); border-radius:99px; padding:1px 7px; }
.sb-foot { border-top:1px solid var(--line2); padding:8px 10px; }
.sb-mini-btn { display:flex; align-items:center; gap:10px; width:100%; height:34px; padding:0 10px; border:0; background:none; color:var(--muted); border-radius:var(--r-sm); font-size:13px; cursor:pointer; }
.sb-mini-btn:hover { background:var(--surface2); color:var(--text); } .sb-mini-btn svg { width:18px; height:18px; }
body.sb-mini .sb-brand { justify-content:center; padding:0; } body.sb-mini .sb-brand div { display:none; }
body.sb-mini .sb-group { font-size:0; padding:8px 0 4px; border-top:1px solid var(--line2); margin:6px 4px 0; } body.sb-mini .sb-group:first-child { border:0; margin:0; padding:0; }
body.sb-mini .sb-link { justify-content:center; padding:0; } body.sb-mini .sb-link span, body.sb-mini .sb-mini-btn span { display:none; } body.sb-mini .sb-mini-btn { justify-content:center; }
body.sb-mini .sb-mini-btn svg { transform:rotate(180deg); }
/* top bar */
.top { position:sticky; top:0; z-index:200; height:var(--top); background:var(--surface); border-bottom:1px solid var(--line); display:flex; align-items:center; gap:12px; padding:0 24px; }
.top .burger { display:none; }
.crumb { display:flex; align-items:center; gap:8px; font-size:14px; color:var(--muted); min-width:0; } .crumb b { color:var(--text); font-weight:600; white-space:nowrap; } .crumb svg { width:14px; height:14px; color:var(--faint); }
.top-right { margin-left:auto; display:flex; align-items:center; gap:8px; }
.chip { display:inline-flex; align-items:center; gap:6px; height:30px; padding:0 10px; border:1px solid var(--line); border-radius:var(--r-sm); background:var(--surface); color:var(--text2); font-size:13px; white-space:nowrap; }
.chip svg { width:15px; height:15px; color:var(--muted); } .chip b { font-weight:600; color:var(--text); } a.chip:hover { background:var(--surface2); text-decoration:none; }
.pm { position:relative; } .pm-btn { display:inline-flex; align-items:center; gap:8px; height:32px; padding:0 8px 0 4px; border:1px solid var(--line); border-radius:99px; background:var(--surface); cursor:pointer; color:var(--text); font-size:13px; }
.pm-btn .av { width:24px; height:24px; border-radius:50%; background:var(--accent-soft); color:var(--accent-text); display:inline-flex; align-items:center; justify-content:center; font-size:12px; font-weight:600; }
.pm-btn svg { width:14px; height:14px; color:var(--muted); }
.pm-dd { position:absolute; right:0; top:40px; min-width:220px; background:var(--surface); border:1px solid var(--line); border-radius:var(--r); box-shadow:var(--sh-md); padding:6px 0; z-index:400; }
.pm-dd .pm-head { padding:8px 14px 10px; border-bottom:1px solid var(--line2); margin-bottom:4px; } .pm-dd .pm-head b { display:block; } .pm-dd .pm-head small { color:var(--muted); }
.pm-dd a, .pm-dd button { display:flex; align-items:center; gap:10px; width:100%; padding:9px 14px; background:none; border:0; color:var(--text); font-size:14px; text-align:left; cursor:pointer; border-radius:0; height:auto; font-weight:400; }
.pm-dd a:hover, .pm-dd button:hover { background:var(--surface2); text-decoration:none; } .pm-dd svg { width:16px; height:16px; color:var(--muted); }
.pm-dd form { margin:0; }

/* ---------- flash / feedback ---------- */
.flash { display:flex; align-items:flex-start; gap:10px; padding:10px 14px; border-radius:var(--r-sm); margin-bottom:14px; font-size:14px; border:1px solid transparent; }
.flash.ok { background:var(--pos-soft); color:var(--pos); border-color:#c9e8d3; } .flash.error { background:var(--neg-soft); color:var(--neg); border-color:#f3cccc; }
.flash::before { content:""; width:8px; height:8px; border-radius:50%; background:currentColor; margin-top:6px; flex:none; }
.empty { text-align:center; padding:36px 16px; color:var(--muted); } .empty svg { color:var(--faint); } .empty p { margin:8px 0 0; } .empty b { color:var(--text); }

/* ---------- page header ---------- */
.ph { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:14px; }
.ph h1, .ph h2 { margin:0; } .actions { display:flex; gap:8px; align-items:center; flex-wrap:wrap; } .actions form { margin:0; }
.back { color:var(--muted); font-size:13px; display:inline-flex; align-items:center; gap:4px; }

/* ---------- buttons ---------- */
button, .btn { display:inline-flex; align-items:center; justify-content:center; gap:7px; height:36px; padding:0 14px; border:1px solid var(--accent); border-radius:var(--r-sm); background:var(--accent); color:#fff; font:inherit; font-size:14px; font-weight:500; line-height:1; cursor:pointer; white-space:nowrap; transition:background .12s, border-color .12s; }
button:hover, .btn:hover { background:var(--accent-h); border-color:var(--accent-h); text-decoration:none; }
button:disabled { opacity:.55; cursor:default; }
button.ghost, .btnlink, .ghost { background:var(--surface); color:var(--text2); border:1px solid var(--line); height:36px; padding:0 12px; border-radius:var(--r-sm); font-weight:500; display:inline-flex; align-items:center; gap:7px; font-size:14px; cursor:pointer; }
button.ghost:hover, .btnlink:hover, .ghost:hover { background:var(--surface2); border-color:#d3d9e0; color:var(--text); text-decoration:none; }
button.ghost.danger, .ghost.danger, .danger-btn { color:var(--neg); } button.ghost.danger:hover, .ghost.danger:hover { background:var(--neg-soft); border-color:#f0c4c4; }
button.mini { height:28px; padding:0 10px; font-size:13px; } .big-btn { height:42px; padding:0 22px; font-size:15px; }
button.del { height:auto; padding:4px; background:none; border:0; color:var(--faint); border-radius:6px; } button.del:hover { background:var(--neg-soft); color:var(--neg); }
button.del.edit:hover { background:var(--accent-soft); color:var(--accent-text); }
.pos-btn { background:var(--warn-soft); color:var(--warn); border-color:#f5d9b4; } .pos-btn:hover { background:#fde9cc; border-color:#f0c78e; color:var(--warn); }
.rowbtns { display:flex; gap:6px; align-items:center; }

/* ---------- inputs ---------- */
input[type=text], input[type=date], input[type=password], input[type=number], input[type=email], input[type=search], select, textarea { width:100%; height:36px; padding:0 10px; border:1px solid var(--line); border-radius:var(--r-sm); background:var(--surface); color:var(--text); font:inherit; font-size:14px; }
textarea { height:auto; min-height:76px; padding:8px 10px; resize:vertical; }
select { appearance:none; -webkit-appearance:none; padding-right:30px; background:var(--surface) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236B7683' stroke-width='2'><path d='m6 9 6 6 6-6'/></svg>") no-repeat right 9px center; }
input:focus, select:focus, textarea:focus { outline:0; border-color:var(--accent); box-shadow:0 0 0 3px rgba(8,127,109,.15); }
input:disabled, select:disabled { background:var(--surface2); color:var(--text2); }
input::placeholder, textarea::placeholder { color:var(--faint); }
input[type=checkbox], input[type=radio] { accent-color:var(--accent); width:16px; height:16px; margin:0 6px 0 0; vertical-align:-3px; }
input[type=file] { font-size:13px; }
input.cell { height:32px; padding:0 8px; text-align:right; margin:0; } .w70 { width:70px; } .w110 { width:110px; }
label { display:block; font-size:12.5px; color:var(--muted); font-weight:500; margin-bottom:10px; }
label > input, label > select, label > textarea { margin-top:4px; font-weight:400; }
label.kind, .kind label { display:inline-flex; align-items:center; gap:4px; margin:0 14px 0 0; color:var(--text); font-weight:400; font-size:14px; }
.kind { display:flex; flex-wrap:wrap; gap:4px 0; margin-bottom:12px; }
.fld { display:flex; flex-direction:column; gap:4px; margin:0; font-size:12.5px; color:var(--muted); font-weight:500; } .fld > span:first-child { font-size:12.5px; }
.fld input, .fld select, .fld textarea { margin:0; font-weight:400; }
.two { display:grid; grid-template-columns:1fr 1fr; gap:0 12px; } .grid3 { display:grid; grid-template-columns:repeat(3, 1fr); gap:0 14px; align-items:end; }
.span2 { grid-column:span 2; } .span3 { grid-column:span 3; } .fend { display:flex; align-items:flex-end; margin-bottom:10px; }
.curtag { display:inline-block; font-size:11px; font-weight:600; color:var(--accent-text); background:var(--accent-soft); border-radius:4px; padding:1px 6px; }
.filters, .toolbar { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-bottom:12px; }
.filters label { display:inline-flex; align-items:center; gap:6px; margin:0; font-size:13px; } .filters label input { margin:0; width:auto; }
.toolbar select, .toolbar input[type=date], .filters select, .filters input[type=date] { width:auto; }
.toolbar .right, .filters .right { margin-left:auto; }
.searchbox { position:relative; display:inline-flex; align-items:center; width:280px; } .searchbox svg { position:absolute; left:10px; color:var(--faint); pointer-events:none; width:15px; height:15px; }
.searchbox input { padding-left:32px; width:100%; margin:0; } .searchbox.grow, .grow { flex:1; min-width:200px; }
.tb-date { display:inline-flex; align-items:center; gap:6px; height:36px; padding:0 8px; border:1px solid var(--line); border-radius:var(--r-sm); background:var(--surface); color:var(--muted); font-size:13px; }
.tb-date input { border:0; padding:0 2px; width:128px; height:32px; box-shadow:none; }
.quick { display:inline-flex; gap:4px; flex-wrap:wrap; margin-top:6px; } .quick a { padding:5px 9px; border-radius:6px; background:var(--surface2); border:1px solid var(--line); color:var(--text2); font-size:12.5px; }
.quick a:hover { background:var(--accent-soft); border-color:#bfe2db; color:var(--accent-text); text-decoration:none; }
.filter-active { display:inline-flex; align-items:center; gap:6px; font-size:12.5px; color:var(--muted); } .filter-active a { color:var(--accent-text); }

/* ---------- panels ---------- */
.panel { background:var(--surface); border:1px solid var(--line); border-radius:var(--r); padding:16px 18px; margin-bottom:16px; box-shadow:var(--sh); }
.panel > h2:first-child { margin-bottom:12px; } .listpanel { padding:12px 14px 10px; }
details.panel { padding:0; } details.panel > summary { list-style:none; cursor:pointer; padding:12px 18px; display:flex; align-items:center; gap:8px; }
details.panel > summary::before { content:""; width:6px; height:6px; border-right:2px solid var(--muted); border-bottom:2px solid var(--muted); transform:rotate(-45deg); transition:transform .12s; }
details.panel[open] > summary::before { transform:rotate(45deg); } details.panel > summary h2 { margin:0; } details.panel > *:not(summary) { padding:0 18px 16px; }
details.panel > summary::-webkit-details-marker { display:none; }
.scroll { overflow-x:auto; -webkit-overflow-scrolling:touch; }
.row { display:grid; grid-template-columns:1fr 1fr; gap:16px; } .grid-main { display:grid; grid-template-columns:2fr 1fr; gap:16px; align-items:start; }
.grid3top { display:grid; grid-template-columns:1fr 1.2fr 1.2fr; gap:16px; align-items:start; }
.summary { border-collapse:collapse; } .summary td { padding:6px 12px 6px 0; vertical-align:top; } .summary td:first-child { color:var(--muted); white-space:nowrap; }
.big { font-size:20px; font-weight:600; letter-spacing:-.01em; margin-top:2px; } .big small { font-size:12px; font-weight:400; color:var(--muted); }
.lbl { font-size:12px; color:var(--muted); margin-top:8px; }
.danger-zone { border-color:#f0c4c4; background:#fffafa; }
.keybox { font-family:ui-monospace, SFMono-Regular, Menlo, monospace; font-size:13px; background:var(--surface2); border:1px solid var(--line); border-radius:6px; padding:8px 10px; word-break:break-all; }
.api-doc { font-family:ui-monospace, Menlo, monospace; font-size:12.5px; background:var(--surface2); border:1px solid var(--line); border-radius:var(--r-sm); padding:12px 14px; overflow-x:auto; white-space:pre; }
.tg { display:grid; grid-template-columns:1fr 1fr; gap:16px; }

/* ---------- tables ---------- */
table.list, table.dtable { width:100%; border-collapse:separate; border-spacing:0; font-size:14px; }
table.list th, table.dtable th { position:sticky; top:var(--top); z-index:2; background:var(--surface); text-align:left; font-size:12px; font-weight:600; color:var(--muted); letter-spacing:.02em; padding:9px 10px; border-bottom:1px solid var(--line); white-space:nowrap; }
.dp table th, .modal table th { position:static; }
table.list td, table.dtable td { padding:9px 10px; border-bottom:1px solid var(--line2); vertical-align:middle; color:var(--text); height:42px; }
table.list tr:last-child td, table.dtable tr:last-child td { border-bottom:0; } table.dtable tr:hover td, table.list tr:hover td { background:var(--surface2); }
th.num, td.num { text-align:right; font-variant-numeric:tabular-nums; } td.num small, td .muted small { color:var(--muted); }
th.chk, td.chk { width:34px; text-align:center; padding-left:6px; padding-right:6px; }
td.rowmenu, .rowmenu { text-align:right; white-space:nowrap; } .rowmenu a { display:inline-flex; padding:5px; border-radius:6px; color:var(--faint); margin-left:2px; } .rowmenu a:hover { background:var(--accent-soft); color:var(--accent-text); }
th.sortable a { color:inherit; display:inline-flex; align-items:center; gap:4px; } th.sortable.on a { color:var(--accent-text); } .sarrow { font-size:11px; }
tr.total td { background:var(--surface2); font-weight:600; border-top:1px solid var(--line); } tr.total td small { font-weight:400; }
.clink { color:var(--text); font-weight:500; display:inline-flex; align-items:center; gap:6px; } .clink:hover { color:var(--accent-text); } .picon { color:var(--faint); display:inline-flex; }
.numtag { display:inline-flex; align-items:center; justify-content:center; min-width:22px; height:22px; border-radius:5px; background:var(--accent-soft); color:var(--accent-text); font-size:11px; font-weight:600; margin-right:6px; }
.tag { display:inline-flex; align-items:center; gap:4px; font-size:12px; font-weight:500; padding:2px 8px; border-radius:99px; background:var(--line2); color:var(--text2); white-space:nowrap; }
.tag.kirim, .tag.pos { background:var(--pos-soft); color:var(--pos); } .tag.chiqim, .tag.neg { background:var(--neg-soft); color:var(--neg); } .tag.warn { background:var(--warn-soft); color:var(--warn); } .tag.info { background:var(--info-soft); color:var(--info); }
.paidbar { display:block; height:3px; background:var(--line2); border-radius:2px; margin-top:4px; overflow:hidden; } .paidbar i { display:block; height:100%; background:var(--accent); }
.pager { display:flex; align-items:center; justify-content:flex-end; gap:14px; padding:12px 4px 2px; flex-wrap:wrap; font-size:13px; color:var(--muted); }
.pager .pages { display:inline-flex; gap:2px; } .pager .pages a { min-width:30px; height:30px; display:inline-flex; align-items:center; justify-content:center; border-radius:6px; color:var(--text2); padding:0 6px; }
.pager .pages a:hover { background:var(--surface2); text-decoration:none; } .pager .pages a.cur { background:var(--accent); color:#fff; } .pager .pages a.dis { color:var(--faint); pointer-events:none; }
.pager .persel select { width:auto; height:30px; padding:0 26px 0 8px; font-size:13px; }
.bulkbar { display:flex; align-items:center; gap:8px; padding:8px 12px; margin-bottom:10px; background:var(--accent-soft); border:1px solid #bfe2db; border-radius:var(--r-sm); font-size:13px; color:var(--accent-text); flex-wrap:wrap; }
.bulkbar button { height:30px; font-size:13px; } .bulkbar input { height:30px; width:auto; }
.editrow { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-top:6px; } .editrow input, .editrow select { width:auto; margin:0; }

/* ---------- KPI cards (dashboard) ---------- */
.kpi-grid { display:grid; grid-template-columns:repeat(4, 1fr); gap:12px; margin-bottom:16px; }
.kpi { background:var(--surface); border:1px solid var(--line); border-radius:var(--r); padding:14px 16px; box-shadow:var(--sh); display:flex; flex-direction:column; gap:6px; min-height:112px; }
.kpi .k-head { display:flex; align-items:center; justify-content:space-between; gap:8px; font-size:12.5px; color:var(--muted); } .kpi .k-head a { color:var(--muted); display:inline-flex; } .kpi .k-head a:hover { color:var(--accent-text); }
.kpi .k-ico { width:28px; height:28px; border-radius:8px; display:inline-flex; align-items:center; justify-content:center; background:var(--accent-soft); color:var(--accent-text); } .kpi .k-ico svg { width:16px; height:16px; }
.kpi .k-val { font-size:22px; font-weight:600; letter-spacing:-.01em; line-height:1.2; } .kpi .k-val small { font-size:12px; font-weight:400; color:var(--muted); margin-left:2px; }
.kpi .k-val.none { font-size:15px; font-weight:500; color:var(--muted); }
.kpi .k-sub { font-size:12.5px; color:var(--muted); } .kpi .k-sub b { color:var(--text2); font-weight:500; }
.kpi.neg .k-ico { background:var(--neg-soft); color:var(--neg); } .kpi.warn .k-ico { background:var(--warn-soft); color:var(--warn); } .kpi.info .k-ico { background:var(--info-soft); color:var(--info); }
.dash-grid { display:grid; grid-template-columns:minmax(0, 1.3fr) minmax(0, 1fr); gap:16px; align-items:start; }
.att { list-style:none; margin:0; padding:0; } .att li { display:flex; align-items:center; gap:10px; padding:9px 0; border-bottom:1px solid var(--line2); font-size:14px; } .att li:last-child { border:0; }
.att .a-ico { width:26px; height:26px; border-radius:7px; display:inline-flex; align-items:center; justify-content:center; flex:none; } .att .a-ico svg { width:14px; height:14px; }
.att .warn .a-ico { background:var(--warn-soft); color:var(--warn); } .att .neg .a-ico { background:var(--neg-soft); color:var(--neg); } .att .ok .a-ico { background:var(--pos-soft); color:var(--pos); }
.att .a-t { flex:1; min-width:0; } .att .a-t small { display:block; color:var(--muted); } .att .a-act { font-size:13px; white-space:nowrap; }
.recent { width:100%; border-collapse:collapse; font-size:13.5px; } .recent td { padding:8px 6px; border-bottom:1px solid var(--line2); vertical-align:middle; } .recent tr:last-child td { border:0; }
.recent td:first-child { color:var(--muted); white-space:nowrap; width:82px; } .recent .r-what { color:var(--text); } .recent .r-what small { display:block; color:var(--muted); }
.cash-list { display:flex; flex-direction:column; gap:6px; } .cash-list .acc { display:flex; align-items:center; gap:10px; padding:8px 10px; border:1px solid var(--line2); border-radius:var(--r-sm); background:var(--surface2); }
.acc-ico { width:28px; height:28px; border-radius:7px; background:var(--surface); border:1px solid var(--line); display:inline-flex; align-items:center; justify-content:center; color:var(--muted); } .acc-ico svg { width:15px; height:15px; }
.acc .acc-val { font-weight:600; font-size:15px; } .acc .acc-val small { font-weight:400; color:var(--muted); font-size:12px; } .acc > div { flex:1; } .acc .muted { font-size:12px; }
.period-note { font-size:12.5px; color:var(--muted); }
/* legacy dashboard cards (employee view) */
.cards, .cards4 { display:grid; grid-template-columns:repeat(4, 1fr); gap:12px; margin-bottom:16px; } .cards { grid-template-columns:repeat(auto-fill, minmax(240px, 1fr)); }
.card { background:var(--surface); border:1px solid var(--line); border-radius:var(--r); padding:14px 16px; position:relative; box-shadow:var(--sh); } .card .ct { font-weight:600; color:var(--text); } .card .sub { font-size:12.5px; color:var(--muted); }
.cardico { position:absolute; right:14px; top:14px; width:28px; height:28px; border-radius:8px; background:var(--accent-soft); color:var(--accent-text); display:inline-flex; align-items:center; justify-content:center; } .cardico svg { width:16px; height:16px; }
.card.plain { display:flex; align-items:center; gap:12px; }
/* chart */
.chartpanel { padding-bottom:8px; } .chartwrap { position:relative; } .chartwrap svg { width:100%; height:260px; display:block; }
.chartlegend { display:flex; gap:16px; font-size:12.5px; color:var(--muted); margin:2px 0 6px; flex-wrap:wrap; } .chartlegend i { display:inline-block; width:10px; height:10px; border-radius:2px; margin-right:6px; vertical-align:-1px; }
.charttip { position:absolute; background:var(--text); color:#fff; font-size:12px; padding:8px 10px; border-radius:6px; pointer-events:none; white-space:nowrap; z-index:5; line-height:1.5; }

/* ---------- money ---------- */
.subnav { display:flex; gap:2px; border-bottom:1px solid var(--line); margin-bottom:16px; overflow-x:auto; }
.subnav a { padding:9px 12px; color:var(--muted); font-size:14px; border-bottom:2px solid transparent; margin-bottom:-1px; white-space:nowrap; } .subnav a:hover { color:var(--text); text-decoration:none; } .subnav a.on { color:var(--accent-text); border-bottom-color:var(--accent); font-weight:500; }
.fxbox { background:var(--surface2); border:1px solid var(--line); border-radius:var(--r-sm); padding:12px 14px; margin:6px 0 12px; }
.fxrow { display:grid; grid-template-columns:1fr auto 1fr; gap:12px; align-items:center; } .fxcol { background:var(--surface); border:1px solid var(--line); border-radius:var(--r-sm); padding:12px 14px; } .fxcol .fxhead { font-weight:600; margin-bottom:8px; }
.fxarrow { color:var(--faint); } .totalline { font-size:13.5px; color:var(--text2); margin-top:4px; }
.cashsum { display:flex; flex-wrap:wrap; background:var(--surface); border:1px solid var(--line); border-radius:var(--r); box-shadow:var(--sh); margin:0 0 14px; max-width:820px; }
.cashsum > div { flex:1 1 200px; padding:12px 16px; border-right:1px solid var(--line2); } .cashsum > div:last-child { border-right:0; background:var(--accent-soft); border-radius:0 var(--r) var(--r) 0; }
.cashsum span { display:block; font-size:12px; color:var(--muted); margin-bottom:3px; } .cashsum b { font-size:18px; font-weight:600; } .cashsum small { font-size:12px; font-weight:400; color:var(--muted); } .cashsum b.neg { color:var(--neg); }
.cashgrid { display:grid; grid-template-columns:repeat(auto-fill, minmax(230px, 260px)); gap:12px; margin-bottom:12px; }
.cashcard { display:flex; align-items:center; gap:12px; background:var(--surface); border:1px solid var(--line); border-radius:var(--r); padding:12px 14px; box-shadow:var(--sh); }
.cashico { width:32px; height:32px; border-radius:8px; display:inline-flex; align-items:center; justify-content:center; flex:none; background:var(--accent-soft); color:var(--accent-text); } .cashico svg { width:16px; height:16px; }
.cur-uzs .cashico { background:var(--info-soft); color:var(--info); }
.cashbody { min-width:0; flex:1; } .cashname { font-size:12px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; } .cashval { font-size:17px; font-weight:600; } .cashval.neg { color:var(--neg); } .cashval small { font-size:12px; font-weight:400; color:var(--muted); }
.cashcur { font-size:11px; font-weight:600; color:var(--muted); background:var(--line2); border-radius:99px; padding:2px 8px; align-self:flex-start; } .cashhint { font-size:13px; }

/* ---------- reports ---------- */
.repgrid { display:grid; grid-template-columns:repeat(auto-fit, minmax(250px, 1fr)); gap:14px; align-items:start; }
.repcol { background:var(--surface); border:1px solid var(--line); border-radius:var(--r); padding:6px; box-shadow:var(--sh); }
.rephead { display:flex; align-items:center; gap:10px; padding:10px 10px 12px; margin:0 0 4px; border-bottom:1px solid var(--line2); font-size:14px; font-weight:600; color:var(--text); }
.rephead-ico { width:26px; height:26px; border-radius:7px; display:inline-flex; align-items:center; justify-content:center; background:var(--accent-soft); color:var(--accent-text); } .rephead-ico svg { width:14px; height:14px; }
.repcount { margin-left:auto; font-size:11px; font-weight:500; color:var(--muted); background:var(--line2); border-radius:99px; padding:1px 8px; }
.repitem { display:flex; align-items:center; gap:10px; height:38px; padding:0 10px; border-radius:var(--r-sm); color:var(--text); } .repitem:hover { background:var(--surface2); text-decoration:none; }
.repico { width:26px; height:26px; border-radius:7px; display:inline-flex; align-items:center; justify-content:center; flex:none; background:var(--surface2); color:var(--muted); border:1px solid var(--line2); } .repico svg { width:14px; height:14px; }
.repitem:hover .repico { background:var(--accent-soft); color:var(--accent-text); border-color:transparent; }
.repname { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; } .reparrow { margin-left:auto; display:inline-flex; color:var(--faint); opacity:0; } .repitem:hover .reparrow { opacity:1; color:var(--accent-text); }
.rep-title { display:flex; align-items:center; gap:10px; } .rep-title .repico { width:32px; height:32px; background:var(--accent-soft); color:var(--accent-text); border:0; } .rep-title .repico svg { width:16px; height:16px; }
.numcols { display:flex; gap:16px; flex-wrap:wrap; }

/* ---------- settings ---------- */
.settings { display:grid; grid-template-columns:220px 1fr; gap:16px; align-items:start; }
.setnav { background:var(--surface); border:1px solid var(--line); border-radius:var(--r); padding:8px; box-shadow:var(--sh); position:sticky; top:calc(var(--top) + 16px); }
.setgroup { font-size:11px; font-weight:600; color:var(--faint); letter-spacing:.06em; text-transform:uppercase; padding:12px 10px 4px; } .setgroup:first-child { padding-top:4px; }
.setnav a { display:block; padding:7px 10px; border-radius:var(--r-xs); color:var(--text2); font-size:13.5px; } .setnav a:hover { background:var(--surface2); text-decoration:none; color:var(--text); } .setnav a.on { background:var(--accent-soft); color:var(--accent-text); font-weight:500; }
.setbody { min-width:0; }

/* ---------- document form (hujjat_yangi) ---------- */
.ibx .ibx-card { padding:20px 22px 24px; } .ibx h1 { font-size:18px; } .ibx h1 span { color:var(--muted); font-weight:500; }
.ibx-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:18px; }
.ibx-actions { display:flex; gap:8px; } .ibx-menu { position:relative; }
.ibx-ico { width:36px; height:36px; border:1px solid var(--line); border-radius:var(--r-sm); background:var(--surface); color:var(--muted); display:inline-flex; align-items:center; justify-content:center; padding:0; } .ibx-ico:hover { background:var(--surface2); color:var(--text); border-color:#d3d9e0; }
.ibx-ico svg { width:17px; height:17px; } #favbtn.on { color:var(--warn); } #favbtn.on svg { fill:currentColor; }
.ibx-dd { position:absolute; right:0; top:42px; background:var(--surface); border:1px solid var(--line); border-radius:var(--r); box-shadow:var(--sh-md); min-width:220px; z-index:300; padding:6px 0; }
.ibx-dd a { display:block; padding:9px 14px; color:var(--text); font-size:14px; } .ibx-dd a:hover { background:var(--surface2); text-decoration:none; }
.ibx-grid { display:flex; gap:12px; align-items:center; flex-wrap:wrap; margin-bottom:14px; } .ibx-hr { border:0; border-top:1px solid var(--line2); margin:18px 0 16px; }
.mf { position:relative; display:block; margin:0; font-weight:400; }
.mf > span:first-child { display:block; font-size:12.5px; color:var(--muted); font-weight:500; margin-bottom:4px; line-height:1.2; }
.mf input, .mf select, .mf textarea { width:100%; margin:0; }
.mf.dt > svg { position:absolute; left:10px; bottom:10px; width:16px; height:16px; color:var(--muted); pointer-events:none; } .mf.dt input { padding-left:32px; }
.mf.dt input::-webkit-calendar-picker-indicator { opacity:0; position:absolute; inset:0; width:100%; height:100%; cursor:pointer; }
.mf textarea { min-height:76px; } .mf.addr > svg { position:absolute; right:10px; bottom:10px; width:16px; height:16px; color:var(--muted); } .mf.addr input { padding-right:34px; }
.mf.status .fake { height:36px; border:1px solid var(--line); border-radius:var(--r-sm); display:flex; align-items:center; padding:0 10px; background:var(--surface2); }
.mf.status .chip { height:22px; padding:0 10px; border:0; background:var(--pos-soft); color:var(--pos); font-weight:500; font-size:12.5px; border-radius:99px; }
.w535 { width:400px; } .mf.grow { flex:0 1 400px; min-width:260px; } .w455 { width:340px; } .w260 { width:196px; } .w255 { width:196px; } .w200 { width:190px; } .mf.note { width:400px; } .mf.right { margin-left:auto; }
.ibx-sq { width:44px; height:36px; border:1px solid var(--line); border-radius:var(--r-sm); display:inline-flex; align-items:center; justify-content:center; color:var(--muted); background:var(--surface); align-self:flex-end; } .ibx-sq svg { width:16px; height:16px; }
.ibx-tools { display:flex; gap:10px; align-items:flex-end; flex-wrap:wrap; }
.ibx-btn { display:inline-flex; align-items:center; gap:8px; height:36px; padding:0 12px; border:1px solid var(--line); border-radius:var(--r-sm); background:var(--surface); color:var(--accent-text); font-size:14px; font-weight:500; cursor:pointer; margin:0; }
.ibx-btn:hover { background:var(--accent-soft); border-color:#bfe2db; } .ibx-btn svg { width:16px; height:16px; } .ibx-warn { color:var(--faint); display:inline-flex; } .ibx-warn svg { width:16px; height:16px; }
table.ibx-lines { width:100%; border-collapse:separate; border-spacing:0; margin-top:12px; border:1px solid var(--line); border-radius:var(--r-sm); overflow:hidden; }
table.ibx-lines th { background:var(--surface2); color:var(--muted); font-size:12px; font-weight:600; text-align:left; padding:9px 10px; border-bottom:1px solid var(--line); letter-spacing:.02em; }
table.ibx-lines th.num { text-align:right; } table.ibx-lines th.n, table.ibx-lines td.n { width:40px; text-align:center; color:var(--muted); } .th-ico { float:right; color:var(--faint); }
table.ibx-lines td { padding:4px 8px; height:42px; border-bottom:1px solid var(--line2); font-size:14px; } table.ibx-lines tr:last-child td { border-bottom:0; } table.ibx-lines td.num { text-align:right; font-variant-numeric:tabular-nums; }
table.ibx-lines .pname { width:100%; margin:0; border:1px solid transparent; height:32px; padding:0 6px; background:transparent; } table.ibx-lines .pname:hover, table.ibx-lines input.cell:hover { border-color:var(--line); }
table.ibx-lines .pname:focus, table.ibx-lines input.cell:focus { border-color:var(--accent); background:var(--surface); box-shadow:none; }
table.ibx-lines input.cell { width:100%; margin:0; border:1px solid transparent; background:transparent; text-align:right; height:32px; }
table.ibx-lines .w120 { width:100px; } table.ibx-lines .w150 { width:120px; } table.ibx-lines .w200 { width:160px; } table.ibx-lines .w50 { width:40px; }
table.ibx-lines .del { color:var(--faint); } table.ibx-lines .stock.neg { color:var(--neg); }
.ibx-foot { display:flex; justify-content:space-between; align-items:flex-start; margin:18px 0; gap:24px; }
.ibx-sums { min-width:300px; font-size:14px; } .ibx-sums div { display:flex; justify-content:flex-end; gap:24px; align-items:center; padding:4px 0; white-space:nowrap; } .ibx-sums span:first-child { color:var(--muted); } .ibx-sums b { font-weight:500; min-width:110px; text-align:right; }
.ibx-sums .grand { font-size:16px; border-top:1px solid var(--line2); margin-top:4px; padding-top:8px; } .ibx-sums .grand span:first-child, .ibx-sums .grand b { font-weight:600; color:var(--text); } .ibx-sums input { width:100px; height:30px; margin-left:8px; }
.ibx-pen { height:auto; background:none; border:0; color:var(--accent-text); padding:0 0 0 4px; display:inline-flex; } .ibx-pen svg { width:15px; height:15px; }
.ibx-due { display:flex; flex-direction:column; gap:3px; font-size:13.5px; color:var(--text2); } .ibx-due b { font-weight:600; color:var(--text); }
.ibx .fxbox { margin:0 0 14px; }
.stickyfoot { position:sticky; bottom:0; z-index:150; background:var(--surface); border-top:1px solid var(--line); padding:10px 22px; margin:0 -24px -48px; display:flex; justify-content:space-between; align-items:center; box-shadow:0 -4px 12px rgba(23,33,43,.05); }
.sf-left { display:flex; align-items:center; gap:8px; } .sf-right { display:flex; gap:18px; font-size:13.5px; color:var(--muted); } .sf-right b { color:var(--text); font-weight:600; }
.ibx-split { position:relative; display:inline-flex; } .ibx-split .btn { border-radius:var(--r-sm) 0 0 var(--r-sm); } .ibx-split .btn.arrow { border-radius:0 var(--r-sm) var(--r-sm) 0; padding:0 8px; border-left:1px solid rgba(255,255,255,.3); }
.ibx-split .ibx-dd { left:0; right:auto; top:auto; bottom:42px; } .ibx-cancel { display:inline-flex; align-items:center; height:36px; padding:0 12px; border:1px solid var(--line); border-radius:var(--r-sm); color:var(--text2); background:var(--surface); font-weight:500; } .ibx-cancel:hover { background:var(--surface2); text-decoration:none; }
.docform .cur { color:var(--muted); font-size:12.5px; }
/* modal */
.modal { position:fixed; inset:0; background:rgba(23,33,43,.45); z-index:500; display:flex; align-items:center; justify-content:center; padding:20px; }
.modal-box { background:var(--surface); border-radius:var(--r); width:min(860px, 100%); max-height:88vh; display:flex; flex-direction:column; box-shadow:var(--sh-md); }
.modal-head { display:flex; justify-content:space-between; align-items:center; padding:14px 18px; border-bottom:1px solid var(--line); } .modal-head h2 { margin:0; }
.modal .toolbar { padding:12px 18px 0; margin:0; } .modal-list { overflow:auto; padding:8px 18px; flex:1; } .modal-foot { padding:12px 18px; border-top:1px solid var(--line); display:flex; justify-content:space-between; align-items:center; }
.pk_qty { width:64px; }

/* ---------- document drawer ---------- */
.dp-overlay { position:fixed; inset:0; background:rgba(23,33,43,.4); z-index:600; }
.dp-drawer { position:absolute; top:0; right:0; bottom:0; width:min(860px, 62vw); min-width:min(600px, 100vw); background:var(--surface); box-shadow:-8px 0 30px rgba(23,33,43,.15); overflow:auto; animation:dpIn .16s ease-out; }
@keyframes dpIn { from { transform:translateX(30px); opacity:.5; } to { transform:none; opacity:1; } } body.dp-open { overflow:hidden; }
.dp { display:flex; flex-direction:column; min-height:100%; font-size:14px; }
.dp-head { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:12px 20px; background:var(--surface); border-bottom:1px solid var(--line); position:sticky; top:0; z-index:5; flex-wrap:wrap; }
.dp-title h2 { margin:0; font-size:17px; } .dp-title h2 span { color:var(--muted); font-weight:500; } .dp-title .muted { font-size:12.5px; }
.dp-actions { display:flex; align-items:center; gap:6px; flex-wrap:wrap; } .dp-actions form { margin:0; display:inline-flex; }
.dp-btn { display:inline-flex; align-items:center; gap:7px; height:34px; padding:0 12px; border:1px solid var(--line); border-radius:var(--r-sm); background:var(--surface); color:var(--text2); font-size:13.5px; font-weight:500; cursor:pointer; }
.dp-btn:hover { background:var(--surface2); text-decoration:none; color:var(--text); } .dp-btn.ico { width:38px; padding:0; justify-content:center; color:var(--muted); } .dp-btn.xls { color:var(--pos); } .dp-btn svg { width:16px; height:16px; }
.dp-menu { position:relative; } .dp-menu .ibx-dd { top:40px; } .dp-menu .ibx-dd form { display:block; } .dp-menu .ibx-dd button.dd-danger { display:block; width:100%; text-align:left; background:none; border:0; padding:9px 14px; font-size:14px; color:var(--neg); cursor:pointer; border-radius:0; height:auto; font-weight:400; } .dp-menu .ibx-dd button.dd-danger:hover { background:var(--neg-soft); }
.dp-close { display:inline-flex; color:var(--muted); margin-left:8px; padding:4px; border-radius:6px; } .dp-close:hover { background:var(--surface2); color:var(--text); } .dp-close svg { width:20px; height:20px; }
.dp-body { padding:16px 20px; flex:1; }
.dp-info { background:var(--surface2); border:1px solid var(--line2); border-radius:var(--r-sm); padding:12px 16px; position:relative; margin-bottom:14px; }
.dp-info table { border-collapse:collapse; } .dp-info td { padding:5px 0; vertical-align:top; font-size:14px; } .dp-info td.k { color:var(--muted); width:170px; white-space:nowrap; } .dp-info td.k svg { width:15px; height:15px; color:var(--muted); vertical-align:-3px; margin-right:6px; }
.dp-info .bal { margin-top:4px; font-size:13px; } .dp-info .clink { color:var(--accent-text); } .dp-more td.k { padding-left:26px; }
.dp-morebtn { position:absolute; right:14px; bottom:10px; font-size:13px; display:inline-flex; align-items:center; gap:4px; } .dp-morebtn svg { width:13px; height:13px; transform:rotate(90deg); } .dp-morebtn.open svg { transform:rotate(-90deg); }
.dp-tabs { display:flex; gap:2px; border-bottom:1px solid var(--line); margin-bottom:14px; } .dp-tabs a { padding:9px 14px; color:var(--muted); font-size:14px; border-bottom:2px solid transparent; margin-bottom:-1px; } .dp-tabs a.on { color:var(--accent-text); border-bottom-color:var(--accent); font-weight:500; } .dp-tabs a:hover { text-decoration:none; color:var(--text); }
table.dp-table { width:100%; border-collapse:separate; border-spacing:0; border:1px solid var(--line); border-radius:var(--r-sm); overflow:hidden; }
table.dp-table th { background:var(--surface2); color:var(--muted); font-size:12px; font-weight:600; text-align:left; padding:9px 10px; border-bottom:1px solid var(--line); line-height:1.3; } table.dp-table th.num, table.dp-table td.num { text-align:right; }
table.dp-table td { padding:0 10px; height:40px; border-bottom:1px solid var(--line2); font-size:14px; } table.dp-table tr:last-child td { border-bottom:0; } table.dp-table th.n, table.dp-table td.n { width:42px; text-align:center; color:var(--muted); }
table.dp-table .plink { color:var(--text); font-weight:500; } table.dp-table .plink:hover { color:var(--accent-text); }
.dp-total { display:flex; justify-content:flex-end; gap:60px; padding:14px 4px; font-size:16px; font-weight:600; } .dp-total b { min-width:120px; text-align:right; }
.dp-foot { position:sticky; bottom:0; background:var(--surface); border-top:1px solid var(--line); padding:10px 20px; display:flex; justify-content:space-between; align-items:center; }
.dp-foot .chip { height:26px; background:var(--pos-soft); color:var(--pos); border:0; font-weight:500; border-radius:99px; } .dp-foot .chip.warn { background:var(--warn-soft); color:var(--warn); }
.dp-sum { text-align:right; color:var(--muted); font-size:13px; line-height:1.7; } .dp-sum span { display:inline-block; min-width:90px; text-align:right; margin-right:10px; }
.dp-page { background:var(--surface); border:1px solid var(--line); border-radius:var(--r); overflow:hidden; box-shadow:var(--sh); } .dp-page .dp-head, .dp-page .dp-foot { position:static; } .dp-page .dp-close { display:none; }

/* ---------- misc pages ---------- */
.topbar, .sidebar, .layout, .shell, .fly, .sbtoggle { all:unset; }
.acc-val { font-weight:600; }
.tg .panel { margin:0; }
.import-preview td { font-size:13px; }

/* ---------- responsive ---------- */
@media (max-width:1280px) { .kpi-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); } .dash-grid, .grid-main, .grid3top { grid-template-columns:minmax(0, 1fr); } .settings { grid-template-columns:190px 1fr; } }
@media (max-width:1024px) {
  .sb { width:var(--sb-mini); } .app { margin-left:var(--sb-mini); }
  .sb-brand div, .sb-link span, .sb-mini-btn span { display:none; } .sb-brand { justify-content:center; padding:0; } .sb-link { justify-content:center; padding:0; } .sb-group { font-size:0; padding:8px 0 4px; border-top:1px solid var(--line2); margin:6px 4px 0; }
  body:not(.sb-mini) .sb-foot { display:none; }
  .grid3 { grid-template-columns:1fr 1fr; } .row { grid-template-columns:1fr; }
}
@media (max-width:768px) {
  .sb { transform:translateX(-100%); width:var(--sb); box-shadow:var(--sh-md); } .app { margin-left:0; } body.sb-show .sb { transform:none; }
  body.sb-show .sb-brand div, body.sb-show .sb-link span, body.sb-show .sb-mini-btn span { display:block; } body.sb-show .sb-brand { justify-content:flex-start; padding:0 14px; } body.sb-show .sb-link { justify-content:flex-start; padding:0 10px; } body.sb-show .sb-group { font-size:11px; padding:14px 10px 6px; border:0; margin:0; }
  .sb-foot { display:none; } .sb-backdrop { position:fixed; inset:0; background:rgba(23,33,43,.4); z-index:290; } 
  .top { padding:0 14px; } .top .burger { display:inline-flex; } .crumb span { display:none; }
  main { padding:14px 14px 40px; } .kpi-grid, .cards4, .cards { grid-template-columns:1fr 1fr; } .two, .grid3 { grid-template-columns:1fr; } .span2, .span3 { grid-column:auto; }
  .settings { grid-template-columns:1fr; } .setnav { position:static; display:flex; flex-wrap:wrap; gap:4px; } .setgroup { width:100%; }
  table.list, table.dtable { display:block; overflow-x:auto; white-space:nowrap; } table.list th, table.dtable th { position:static; }
  .searchbox { width:100%; } .toolbar .right { margin-left:0; }
  .mf, .w535, .w455, .w260, .w255, .w200, .mf.note, .mf.grow { width:100%; flex:1 1 100%; } .ibx-foot { flex-direction:column; } .ibx-sums { min-width:0; width:100%; }
  .stickyfoot { margin:0 -14px -40px; padding:10px 14px; flex-wrap:wrap; gap:8px; } .sf-right { width:100%; justify-content:space-between; }
  .dp-drawer { width:100%; min-width:0; } .dp-info td.k { width:130px; } .dp-actions .dp-btn:not(.ico) span { display:none; }
  .fxrow { grid-template-columns:1fr; } .fxarrow { transform:rotate(90deg); justify-self:center; }
  .cashsum > div:last-child { border-radius:0 0 var(--r) var(--r); }
}
@media (max-width:480px) { .kpi-grid, .cards4, .cards { grid-template-columns:1fr; } }
@media print { .sb, .top, .stickyfoot, .dp-foot, .dp-head, .pager, .toolbar, .bulkbar { display:none !important; } .app { margin:0; } main { padding:0; } .panel { border:0; box-shadow:none; } }
/* fixes after first review */
.scroll { overflow:visible; } @media (max-width:768px) { .scroll { overflow-x:auto; } }
.sb-nav { padding:6px 10px 6px; } .sb-link { height:34px; } .sb-group { padding:10px 10px 4px; }
@media (max-width:768px) { .sb { transition:none; } body.sb-show .sb { transform:none !important; } .crumb { display:none; } .top .pm-btn span:not(.av) { display:none; } .top-right { gap:6px; } .top { gap:8px; } }
@media (max-width:768px) { table.ibx-lines { display:block; overflow-x:auto; } table.ibx-lines tbody { display:table; width:100%; min-width:620px; } }
.pm.wh .chip { cursor:pointer; height:32px; } .pm.wh .chip svg:last-child { transform:rotate(90deg); width:12px; height:12px; } .pm.wh .pm-dd { min-width:240px; }
@media (max-width:768px) { .top .pm.wh { display:inline-flex; } .top .pm.wh .chip span { display:none; } }
/* ===== Mobile: pastki panel, kartochka jadvallar, katta tugmalar ===== */
.mobnav { display:none; }
@media (max-width:768px) {
  body { padding-bottom:calc(64px + env(safe-area-inset-bottom)); }
  .mobnav { display:grid; grid-template-columns:repeat(5, 1fr); position:fixed; left:0; right:0; bottom:0; height:calc(60px + env(safe-area-inset-bottom)); padding-bottom:env(safe-area-inset-bottom); background:var(--surface); border-top:1px solid var(--line); z-index:280; }
  .mobnav a, .mobnav button { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; height:60px; padding:0; border:0; border-radius:0; background:none; color:var(--muted); font-size:11px; font-weight:500; }
  .mobnav a.on { color:var(--accent-text); } .mobnav a svg, .mobnav button svg { width:22px; height:22px; }
  .mobnav .fab { color:#fff; } .mobnav .fab svg { width:44px; height:44px; padding:11px; border-radius:50%; background:var(--accent); box-shadow:0 4px 12px rgba(8,127,109,.35); margin-top:-18px; }
  .mobnav .fab span { color:var(--accent-text); }
  .stickyfoot { bottom:calc(60px + env(safe-area-inset-bottom)); } .dp-foot { bottom:0; } body.dp-open .mobnav, body.sb-show .mobnav { display:none; }
  /* barmoq o'lchamlari */
  button, .btn, .btnlink, .ghost, .ibx-btn, .dp-btn { min-height:40px; } .sb-link { height:44px; font-size:15px; } .sb-link svg { width:20px; height:20px; }
  input[type=text], input[type=date], input[type=password], input[type=number], select, textarea { font-size:16px; height:42px; } textarea { height:auto; } .mf input, .mf select { height:42px; }
  table.ibx-lines .pname, table.ibx-lines input.cell { font-size:16px; height:38px; }
  .ph h1 { font-size:19px; } main { padding:12px 12px 24px; } .panel { padding:12px 12px; border-radius:var(--r); } .listpanel { padding:10px 10px 6px; }
  .toolbar, .filters { gap:6px; } .toolbar select, .filters select, .toolbar .tb-date, .filters .tb-date { flex:1 1 45%; min-width:0; } .toolbar button, .filters button { flex:1 1 auto; }
  /* jadvallar -> kartochkalar */
  table.list, table.dtable { display:block; overflow:visible; white-space:normal; border-spacing:0; }
  table.list tbody, table.dtable tbody { display:block; } table.list tr, table.dtable tr { display:block; }
  table.list tr:has(th), table.dtable tr:has(th) { display:none; }
  table.list tr, table.dtable tr { border:1px solid var(--line); border-radius:var(--r-sm); background:var(--surface); padding:8px 12px; margin-bottom:8px; }
  table.list tr:hover td, table.dtable tr:hover td { background:transparent; }
  table.list td, table.dtable td { display:flex; justify-content:space-between; align-items:baseline; gap:12px; padding:4px 0; border:0; height:auto; text-align:right; min-height:0; }
  table.list td::before, table.dtable td::before { content:attr(data-label); color:var(--muted); font-size:12px; font-weight:500; text-align:left; flex:0 0 38%; }
  table.list td:not([data-label])::before, table.dtable td:not([data-label])::before, table.list td[data-label=""]::before, table.dtable td[data-label=""]::before { display:none; }
  table.list td[data-label=""], table.dtable td[data-label=""] { justify-content:flex-end; }
  table.list td.chk, table.dtable td.chk { display:none; } table.list td.rowmenu, table.dtable td.rowmenu { justify-content:flex-end; gap:4px; }
  table.list td.rowmenu a, table.dtable td.rowmenu a { padding:8px; } table.list td:first-child:not(.chk), table.dtable td:first-child:not(.chk) { font-weight:500; }
  tr.total td { background:transparent; border:0; } tr.total { background:var(--surface2); }
  .pager { justify-content:center; } .bulkbar { display:none !important; }
  .modal { padding:0; align-items:flex-end; } .modal-box { max-height:92vh; border-radius:var(--r) var(--r) 0 0; }
  .dp table.dp-table { display:block; overflow-x:auto; } .dp table.dp-table tbody { display:table; width:100%; min-width:520px; }
  .recent td:first-child { width:auto; } .recent td { padding:8px 4px; font-size:13px; }
  .kpi { min-height:0; } .ph .actions { width:100%; } .ph .actions .btn { flex:1; justify-content:center; }
}
@media (max-width:768px) {
  .top { overflow:hidden; } .top-right { min-width:0; flex-shrink:1; } .chip .rl, .pm-btn .nm, .pm.wh .nm { display:none; } .pm-btn { padding:0 6px 0 4px; } .pm.wh .chip { padding:0 8px; }
  table.list td.mob-empty, table.dtable td.mob-empty { display:none; }
}
/* ===== sidebar groups (collapsible), fixed footer ===== */
.sb-nav { padding:6px 10px; min-height:0; }
.sb-grp { margin:0; } .sb-grp > summary { list-style:none; cursor:pointer; display:flex; align-items:center; justify-content:space-between; font-size:11px; font-weight:600; color:var(--faint); letter-spacing:.06em; text-transform:uppercase; padding:10px 10px 4px; user-select:none; white-space:nowrap; }
.sb-grp > summary::-webkit-details-marker { display:none; } .sb-grp > summary svg { width:12px; height:12px; transform:rotate(90deg); transition:transform .12s; } .sb-grp[open] > summary svg { transform:rotate(-90deg); }
.sb-grp > summary:hover { color:var(--text2); } .sb-grp.has-on > summary { color:var(--accent-text); }
.sb-foot { border-top:1px solid var(--line2); padding:6px 10px 8px; display:flex; flex-direction:column; gap:2px; flex:none; }
body.sb-mini .sb-grp > summary { display:none; } body.sb-mini .sb-grp { border-top:1px solid var(--line2); margin:4px 4px 0; padding-top:4px; } body.sb-mini .sb-grp:first-child { border:0; margin:0; padding:0; }
body.sb-mini .sb-foot { padding:6px 4px 8px; } body.sb-mini .sb-foot .sb-link { justify-content:center; padding:0; }
/* ===== global search ===== */
.gs { position:relative; flex:1; max-width:520px; min-width:0; display:flex; align-items:center; }
.gs-ico { position:absolute; left:10px; color:var(--faint); pointer-events:none; display:inline-flex; } .gs-ico svg { width:15px; height:15px; }
.gs input { height:34px; padding:0 40px 0 32px; border-radius:var(--r-sm); font-size:13.5px; background:var(--surface2); border-color:var(--line2); }
.gs input:focus { background:var(--surface); border-color:var(--accent); }
.gs input::-webkit-search-cancel-button { -webkit-appearance:none; }
.gs-kbd { position:absolute; right:8px; font:11px/1 ui-monospace, Menlo, monospace; color:var(--faint); border:1px solid var(--line); border-radius:4px; padding:3px 5px; background:var(--surface); pointer-events:none; }
.gs-dd { position:absolute; left:0; right:0; top:40px; background:var(--surface); border:1px solid var(--line); border-radius:var(--r); box-shadow:var(--sh-md); max-height:70vh; overflow:auto; z-index:450; padding:4px 0; }
.gs-g { font-size:11px; font-weight:600; color:var(--faint); letter-spacing:.06em; text-transform:uppercase; padding:8px 12px 4px; }
.gs-item { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:8px 12px; color:var(--text); font-size:14px; } .gs-item:hover, .gs-item.sel { background:var(--accent-soft); text-decoration:none; }
.gs-n { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } .gs-n small { display:block; color:var(--muted); font-size:12px; } .gs-r { color:var(--muted); font-size:13px; white-space:nowrap; font-variant-numeric:tabular-nums; }
.gs-empty { padding:12px 14px; color:var(--muted); font-size:13.5px; }
.gsbtn { display:none; }
/* ===== compact states ===== */
.state { display:flex; align-items:center; gap:8px; margin:0; font-size:13.5px; color:var(--muted); line-height:1.4; } .state svg { flex:none; }
.state.ok { color:var(--pos); } .state.ok a { color:inherit; } .state.err { color:var(--neg); }
.state.none a { color:var(--accent-text); }
.panel .state { padding:2px 0; }
@media (max-width:768px) {
  .gs { display:none; } .gsbtn { display:inline-flex; width:40px; padding:0; }
  body.gs-open .gs { display:flex; position:fixed; left:8px; right:8px; top:8px; z-index:460; max-width:none; } body.gs-open .gs input { height:40px; font-size:16px; } .gs-kbd { display:none; }
  body.gs-open .gs-dd { top:46px; max-height:60vh; }
  .sb-grp > summary { padding:12px 10px 6px; } .sb-foot .sb-link { height:44px; }
}
.top .gsbtn { display:none; } @media (max-width:768px) { .top .gsbtn { display:inline-flex; } }
/* sb-foot har doim ko'rinsin (rail va mobil rejimda ham) */
@media (max-width:1024px) { body:not(.sb-mini) .sb-foot { display:flex; } .sb-foot .sb-link { justify-content:center; padding:0; } .sb-foot .sb-link span, .sb-mini-btn span { display:none; } .sb-mini-btn { justify-content:center; } }
@media (max-width:768px) { .sb-foot { display:flex; } .sb-foot .sb-mini-btn { display:none; } body.sb-show .sb-foot .sb-link { justify-content:flex-start; padding:0 10px; } body.sb-show .sb-foot .sb-link span { display:block; } }
/* ===== filters & empty-state polish ===== */
.tb-date { position:relative; gap:4px; padding:0 6px; } .tb-date .sep { color:var(--faint); } .tb-date input { width:132px; padding:0 4px; } .tb-date.has-err { border-color:var(--neg); }
.fld-err { position:absolute; left:0; top:38px; font-size:11.5px; color:var(--neg); white-space:nowrap; }
.tb-actions { display:inline-flex; gap:8px; align-items:center; flex-wrap:wrap; }
details.lazy:not([open]) { display:none; } details.lazy > summary { justify-content:space-between; } details.lazy > summary span { font-weight:400; }
.subnav { overflow-y:hidden; scrollbar-width:none; } .subnav::-webkit-scrollbar { display:none; }
.cashsum, .cashgrid { display:grid; grid-template-columns:repeat(auto-fill, minmax(230px, 1fr)); gap:12px; max-width:none; } .cashsum { background:none; border:0; box-shadow:none; }
.cashsum > div { background:var(--surface); border:1px solid var(--line); border-radius:var(--r); box-shadow:var(--sh); } .cashsum > div:last-child { border-radius:var(--r); }
.repname { white-space:normal; overflow:visible; line-height:1.3; } .repitem { height:auto; min-height:38px; padding:6px 10px; }
.repfind { width:300px; } .repfind input { height:34px; }
.setsel { display:none; }
@media (max-width:768px) { .setnav { padding:0; border:0; background:none; box-shadow:none; } .setsel { display:block; } .setlist { display:none; } .repfind { width:100%; } .fld-err { position:static; } .tb-date { flex-wrap:wrap; height:auto; padding:4px 6px; } }
.toolbar { row-gap:10px; }
/* ===== two-column settings form, top-aligned ===== */
.form2 { display:grid; grid-template-columns:1fr 1fr; gap:4px 16px; align-items:start; max-width:760px; }
.form2 label { margin:0 0 8px; } .form2 label > input { margin-top:4px; }
.form2 .hint { display:block; margin-top:4px; font-size:12px; color:var(--muted); font-weight:400; line-height:1.35; }
.form2 .fbar { display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin-top:6px; }
.grid3 { align-items:start; } .grid3 .fend { align-items:flex-start; margin-top:20px; }
.setbody > h2:first-child { margin-bottom:14px; }
.setnav { max-height:calc(100vh - var(--top) - 32px); overflow-y:auto; scrollbar-width:thin; }
@media (max-width:768px) { .form2 { grid-template-columns:1fr; } .form2 .span2 { grid-column:auto; } .setnav { max-height:none; overflow:visible; } }
.kpi .k-val small + small, .kpi .k-val br + small { margin:0; } .kpi .k-val { font-size:20px; } .kpi .k-sub { line-height:1.35; }

/* ko'p valyutali to'lov qatorlari */
.mpbox { padding:10px 12px 12px; } .mpbox table.ibx-lines { margin-top:0; background:var(--surface); }
.mpbox table.ibx-lines td { height:40px; } .mpbox .mp_cur { width:64px; font-weight:600; } .mpbox .mp_ratecell { width:150px; } .mpbox .mp_ratecell.off input { visibility:hidden; }
.mpbox .mp_acc { width:100%; height:32px; margin:0; } .mpbox td:first-child { width:150px; } .mpbox .mp_conv { width:150px; font-weight:600; }
.mpbox .mp_del { color:var(--muted); font-size:18px; line-height:1; } .mpbox .mp_del:hover { color:var(--neg); text-decoration:none; }
.mp-foot { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-top:10px; flex-wrap:wrap; } .mp-sum { min-width:220px; text-align:right; align-items:flex-end; }
@media (max-width:768px) { .mp-foot { flex-direction:column; } .mp-sum { text-align:left; align-items:flex-start; } .mpbox .mp_ratecell { width:110px; } }
.mpbox .mp_conv[readonly] { color:var(--text2); }

.cv-bal { font-size:12.5px; color:var(--text2); margin:-4px 0 10px; line-height:1.5; } .cv-bal b { color:var(--text); font-weight:600; }

/* joyida yangi tovar */
.np-box { width:min(720px, 100%); } .np-body { padding:14px 18px 4px; overflow:auto; } .np-body .ibx-grid { margin-bottom:0; } .np-body .span2 { width:100%; }
.np-hint { display:block; font-size:12px; color:var(--accent-text); margin:2px 0 0 2px; white-space:nowrap; } .np-hint:hover { text-decoration:underline; }
table.ibx-lines td:has(.np-edit) { position:relative; } .np-edit { position:absolute; right:12px; top:50%; transform:translateY(-50%); display:inline-flex; align-items:center; color:var(--muted); } .np-edit:hover { color:var(--accent-text); } table.ibx-lines td:has(.np-edit) .pname { padding-right:30px; }

/* xodimlar */
.stf-head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:12px; } .stf-head p { margin:0; }
.stf-form { margin-top:10px; } .stf-form .two { display:grid; grid-template-columns:1fr 1fr; gap:0 12px; }
table.stf th.c, table.stf td.c { text-align:center; } table.stf td { vertical-align:middle; } table.stf tr.off td { color:var(--muted); }
.stf-name { display:inline-flex; align-items:center; gap:10px; } .stf-name b { font-weight:600; }
.stf-name .av { width:30px; height:30px; border-radius:50%; background:var(--accent-soft); color:var(--accent-text); display:inline-flex; align-items:center; justify-content:center; font-weight:600; font-size:13px; flex:0 0 30px; }
table.stf .stf-edit { display:inline-flex; align-items:center; justify-content:center; width:30px; height:30px; padding:0; color:var(--muted); } table.stf .stf-edit:hover { color:var(--accent-text); }
.stf-editrow td { background:var(--surface2); padding:14px 16px !important; } .stf-panel { display:grid; grid-template-columns:1.2fr 1fr; gap:16px 28px; }
.stf-access { border-left:1px solid var(--line); padding-left:24px; } .stf-danger { display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; padding-top:10px; border-top:1px dashed var(--line); }
.faint { color:var(--faint); }
@media (max-width:900px) { .stf-panel { grid-template-columns:1fr; } .stf-access { border-left:0; padding-left:0; border-top:1px solid var(--line); padding-top:12px; } }
.stf-access .form2 { grid-template-columns:1fr; } .stf-access .form2 .fend { margin-top:0; }
/* QA 2026-09-29: sozlamalar ichida enidan chiqib ketmasin */
.settings > * { min-width:0; } pre.code { max-width:100%; overflow-x:auto; white-space:pre-wrap; overflow-wrap:anywhere; }
table.api-doc td { overflow-wrap:anywhere; } table.api-doc code { white-space:normal; overflow-wrap:anywhere; }
table.api-doc td, table.api-doc th { white-space:normal; } table.api-doc td:first-child { white-space:nowrap; }
.dash-grid > *, .grid-main > *, .kpi-grid > * { min-width:0; }
/* QA 2026-09-29: telefon — ko'p valyutali to'lov qatorlari kartochka ko'rinishida */
@media (max-width:768px) {
  .mpbox { padding:10px; }
  .mpbox table.ibx-lines.mp, .mpbox table.ibx-lines.mp tbody { display:block; border:0; background:transparent; overflow:visible; white-space:normal; }
  .mpbox table.ibx-lines.mp tr:first-child { display:none; }
  .mpbox table.ibx-lines.mp tr { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:8px 10px; padding:12px 34px 12px 12px; border:1px solid var(--line); border-radius:var(--r-sm); margin-bottom:8px; background:var(--surface); position:relative; }
  .mpbox table.ibx-lines.mp td { display:block; height:auto; padding:0; border:0; width:auto !important; text-align:left; min-width:0; }
  .mpbox table.ibx-lines.mp td::before { display:block; font-size:11px; font-weight:600; color:var(--muted); margin-bottom:3px; }
  .mpbox table.ibx-lines.mp td:nth-child(1)::before { content:'Сумма'; } .mpbox table.ibx-lines.mp td:nth-child(2)::before { content:'Валюта'; }
  .mpbox table.ibx-lines.mp td:nth-child(3)::before { content:'Курс'; } .mpbox table.ibx-lines.mp td:nth-child(4)::before { content:'Касса'; }
  .mpbox table.ibx-lines.mp td:nth-child(5)::before { content:'В валюте документа'; }
  .mpbox table.ibx-lines.mp td:nth-child(4) { grid-column:span 2; } .mpbox table.ibx-lines.mp td.mp_ratecell.off { visibility:hidden; }
  .mpbox table.ibx-lines.mp td:nth-child(6) { position:absolute; top:8px; right:10px; } .mpbox table.ibx-lines.mp td:nth-child(6)::before { content:none; }
  .mpbox table.ibx-lines.mp input.cell, .mpbox .mp_acc { border:1px solid var(--line); border-radius:6px; background:var(--surface); height:38px; text-align:left; padding:0 10px; font-size:16px; width:100%; }
  .mpbox .mp_cur { line-height:38px; }
}
@media (max-width:768px) { .mpbox table.ibx-lines.mp, .mpbox table.ibx-lines.mp tbody { width:100%; max-width:100%; box-sizing:border-box; } .mpbox table.ibx-lines.mp tr { box-sizing:border-box; width:100%; } }

/* ============================================================
   Rang qatlami (2026-10-02): bo'limlarga xos sokin ranglar.
   Matn va fon neytral qoladi; rang faqat belgilar, ingichka chiziqlar va yumshoq fonlarda.
   ============================================================ */
:root {
  --c-sales:#0B8A77; --c-sales-soft:#E1F3EF; --c-sales-text:#0B6B5C;
  --c-stock:#2F6FDE; --c-stock-soft:#E8F0FD; --c-stock-text:#2256B8;
  --c-buy:#C2700E;   --c-buy-soft:#FDF1DF;   --c-buy-text:#9A570A;
  --c-fin:#6B4FD8;   --c-fin-soft:#EEEAFC;   --c-fin-text:#5239B5;
  --c-rep:#BE3A6A;   --c-rep-soft:#FBE8EF;   --c-rep-text:#9C2C55;
}
body { background:var(--bg) linear-gradient(180deg, #EAF3F1 0, var(--bg) 300px) no-repeat; }
/* yuqori panel: ingichka brend chizig'i */
.top { background-image:linear-gradient(90deg, var(--c-sales), var(--c-stock) 55%, var(--c-fin)); background-size:100% 2px; background-repeat:no-repeat; background-position:0 0; }
.sb-brand { background:linear-gradient(135deg, #E9F5F2 0, var(--surface) 70%); }
.pm-btn .av { background:linear-gradient(135deg, var(--c-sales), var(--c-stock)); color:#fff; }
button:not([class]), .btn:not(.ghost) { background-image:linear-gradient(180deg, #0C9682, var(--accent)); }

/* yon menyu: har guruh o'z rangida (faqat belgi va faol holat) */
.sb-nav > .sb-link svg { color:var(--c-sales); }
.sb-grp[data-g="Продажи"]   { --g:var(--c-sales); --g-soft:var(--c-sales-soft); --g-text:var(--c-sales-text); }
.sb-grp[data-g="Склад"]     { --g:var(--c-stock); --g-soft:var(--c-stock-soft); --g-text:var(--c-stock-text); }
.sb-grp[data-g="Закупки"]   { --g:var(--c-buy);   --g-soft:var(--c-buy-soft);   --g-text:var(--c-buy-text); }
.sb-grp[data-g="Финансы"]   { --g:var(--c-fin);   --g-soft:var(--c-fin-soft);   --g-text:var(--c-fin-text); }
.sb-grp[data-g="Аналитика"] { --g:var(--c-rep);   --g-soft:var(--c-rep-soft);   --g-text:var(--c-rep-text); }
.sb-grp .sb-link svg { color:var(--g, var(--muted)); opacity:.85; }
.sb-grp .sb-link:hover svg { opacity:1; }
.sb-grp .sb-link.on { background:var(--g-soft, var(--accent-soft)); color:var(--g-text, var(--accent-text)); box-shadow:inset 3px 0 0 var(--g, var(--accent)); }
.sb-grp .sb-link.on svg { color:var(--g, var(--accent)); opacity:1; }
.sb-grp.has-on > summary { color:var(--g-text, var(--accent-text)); }
.sb-nav > .sb-link.on { box-shadow:inset 3px 0 0 var(--accent); }

/* ko'rsatkich kartalari */
.kpi { border-top:3px solid var(--c-sales); background:linear-gradient(180deg, var(--c-sales-soft) 0, var(--surface) 58px); }
.kpi.info { border-top-color:var(--c-stock); background:linear-gradient(180deg, var(--c-stock-soft) 0, var(--surface) 58px); }
.kpi.neg { border-top-color:#D4524C; background:linear-gradient(180deg, var(--neg-soft) 0, var(--surface) 58px); }
.kpi.warn { border-top-color:#D98A1F; background:linear-gradient(180deg, var(--warn-soft) 0, var(--surface) 58px); }
.kpi .k-ico { background:var(--surface); color:var(--c-sales); box-shadow:0 1px 2px rgba(23,33,43,.08); }
.kpi.info .k-ico { background:var(--surface); color:var(--c-stock); } .kpi.neg .k-ico { background:var(--surface); color:var(--neg); } .kpi.warn .k-ico { background:var(--surface); color:var(--warn); }
.kpi .k-head { color:var(--text2); font-weight:500; }

/* panel sarlavhalari: kichik rangli belgi */
.panel > .ph h2::before, .dash-grid .panel .ph h2::before { content:""; display:inline-block; width:4px; height:14px; border-radius:2px; background:var(--accent); margin-right:8px; vertical-align:-2px; }
.dash-grid > div:last-child .panel:first-child .ph h2::before { background:var(--c-fin); }
.dash-grid > div:last-child .panel:nth-child(2) .ph h2::before { background:var(--c-stock); }
.dash-grid > div:first-child .panel:first-child .ph h2::before { background:#D98A1F; }
.chartpanel .ph h2::before { background:var(--c-stock); }

/* kassalar: valyuta bo'yicha */
.cash-list .acc { background:var(--surface); }
.acc[data-cur="USD"] .acc-ico { background:var(--pos-soft); color:var(--pos); border-color:transparent; }
.acc[data-cur="UZS"] .acc-ico { background:var(--c-stock-soft); color:var(--c-stock); border-color:transparent; }
.cash-list .acc:nth-child(3n) .acc-ico { background:var(--c-fin-soft); color:var(--c-fin); border-color:transparent; }
.cash-list .acc[data-cur="USD"] { border-left:3px solid var(--pos); } .cash-list .acc[data-cur="UZS"] { border-left:3px solid var(--c-stock); } .cash-list .acc:nth-child(3n) { border-left-color:var(--c-fin); }

/* jadvallar */
table.list th, table.dtable th { background:#F4F8F7; color:var(--text2); }
table.dtable tr:hover td, table.list tr:hover td { background:#F3F9F7; }
.recent tr:hover td { background:#F6FAF9; }

/* hisobotlar: guruh ranglari */
.g-sotuv  { --g:var(--c-sales); --g-soft:var(--c-sales-soft); } .g-ombor { --g:var(--c-stock); --g-soft:var(--c-stock-soft); }
.g-xarid  { --g:var(--c-buy);   --g-soft:var(--c-buy-soft); }   .g-moliya { --g:var(--c-fin);  --g-soft:var(--c-fin-soft); }
.repcol .rephead-ico { background:var(--g-soft, var(--accent-soft)); color:var(--g, var(--accent-text)); }
.repcol .repico { color:var(--g, var(--muted)); background:var(--g-soft, var(--surface2)); border-color:transparent; }
.repcol .repitem:hover .repico { background:var(--g, var(--accent)); color:#fff; }
.repcol .repcount { background:var(--g-soft, var(--line2)); color:var(--g, var(--muted)); }
.repcol { border-top:3px solid var(--g, var(--line)); }

/* chiplar va kichik urg'ular */
.top .chip svg:first-child { color:var(--c-stock); } .pm.wh .chip svg:first-child { color:var(--c-buy); }
.tag.info { background:var(--c-stock-soft); color:var(--c-stock-text); }
@media (max-width:768px) { .mobnav a.on svg, .mobnav a.on span { color:var(--c-sales); } body { background:var(--bg); } }

/* Mobile layout: keep navigation preferences from shifting the page,
   and let header menus extend below the header. */
@media screen and (max-width:768px) {
  body.sb-mini .app { margin-left:0; }
  body.sb-mini .sb { width:var(--sb); }
  body.sb-show .sb-grp > summary { display:flex; }
  body.sb-show .sb-grp { border:0; margin:0; padding:0; }
  .top { overflow:visible; }
  .top .pm { flex-shrink:0; }
  .top .pm-dd { max-width:calc(100vw - 24px); max-height:calc(100dvh - var(--top) - 24px); overflow-y:auto; }
  .stickyfoot { margin:0 -12px -24px; padding:10px 12px; }
  .sf-left, .sf-right { min-width:0; flex-wrap:wrap; gap:8px 12px; }
  .ibx-foot > *, .paybox { max-width:100%; min-width:0; }
  body.sb-show, body.dp-open { overflow:hidden; }
  .modal-box { max-height:92dvh; }
  body .login input { font-size:16px; }
}

/* Phone document entry: goods cards and a single compact action bar. */
@media screen and (max-width:768px) {
  body:has(#docform) { padding-bottom:0; }
  body:has(#docform) .mobnav { display:none; }
  #docform { padding-bottom:90px; }
  #docform .ibx-head { margin-bottom:12px; }
  #docform .ibx-head h1 { font-size:18px; }
  #docform .ibx-head h1 > span { font-size:13px; }
  #docform .ibx-actions { display:none; }
  #docform .mf { gap:4px; }
  #docform .ibx-grid { gap:10px; margin-bottom:10px; }
  #docform .ibx-grid:first-of-type > label:has(input[disabled]) { display:none; }
  #docform input[type=date] { min-width:0; max-width:100%; width:100%; -webkit-appearance:none; }
  #docform .ibx-tools { gap:8px; }
  #docform .ibx-tools #openpicker { width:100%; justify-content:center; font-weight:600; }
  #docform .ibx-tools .mf { flex:1 1 45%; width:auto; }
  #docform .ibx-tools .mf.right { margin-left:0; }
  #docform table#lines { display:block; border:0; overflow:visible; margin-top:12px; }
  #docform table#lines tbody { display:block; min-width:0; width:100%; }
  #docform table#lines tr:has(th) { display:none; }
  #docform table#lines tr:has(.pname) { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); position:relative; gap:10px; padding:12px; border:1px solid var(--line); border-radius:12px; margin-bottom:10px; background:var(--surface); }
  #docform table#lines td { display:block; padding:0; height:auto; width:auto; min-width:0; border:0; text-align:left; }
  #docform table#lines td::before { content:attr(data-label); display:block; color:var(--muted); font-size:12px; margin-bottom:4px; }
  #docform table#lines td.n { display:none; }
  #docform table#lines td:has(.pname) { grid-column:1 / -1; padding-right:38px; }
  #docform table#lines td:has(.pname)::before { content:'Товар'; }
  #docform table#lines td.stock { grid-column:1 / -1; display:flex; gap:6px; font-size:12px; }
  #docform table#lines td.stock::before { margin:0; content:'В наличии:'; }
  #docform table#lines input.cell, #docform table#lines .pname { height:44px; border:1px solid var(--line); border-radius:8px; padding:0 10px; background:var(--surface); font-size:16px; text-align:left; }
  #docform table#lines td.rowtotal { align-self:end; padding-bottom:10px; font-weight:600; }
  #docform table#lines td:has(.del) { position:absolute; right:8px; top:30px; }
  #docform table#lines td:has(.del)::before { display:none; }
  #docform table#lines .del { width:36px; height:44px; min-height:44px; padding:0; }
  #docform .ibx-foot { margin:12px 0; }
  #docform .ibx-sums { width:100%; }
  #docform .ibx-sums > div { justify-content:space-between; gap:8px; white-space:normal; }
  #docform .ibx-sums b { min-width:0; }
  .mobile-doc-details { border:1px solid var(--line); border-radius:10px; padding:10px 12px; margin:12px 0; }
  .mobile-doc-details summary { cursor:pointer; color:var(--muted); font-size:13px; min-height:24px; }
  .mobile-doc-details[open] summary { margin-bottom:12px; }
  .mobile-doc-details .mf.note { width:100%; }
  #docform .mf.status { display:none; }
  #docform .ibx-sf { position:fixed; left:0; right:0; bottom:0; margin:0; padding:10px 12px calc(10px + env(safe-area-inset-bottom)); display:flex; flex-wrap:nowrap; gap:8px; align-items:center; }
  #docform .ibx-sf .sf-right { order:0; width:auto; margin-right:auto; display:block; font-size:12px; }
  #docform .ibx-sf .sf-right > div:last-child { display:none; }
  #docform .ibx-sf .sf-right b { display:block; font-size:17px; }
  #docform .ibx-sf .sf-left { order:1; flex-wrap:nowrap; gap:8px; }
  #docform .ibx-sf .btn { font-size:14px; padding:0 10px; min-height:44px; }
  #docform .ibx-sf .btn.arrow { padding:0 6px; }
  #docform .ibx-sf .ibx-cancel { font-size:12px; }
  #docform .ibx-sf .ibx-dd { bottom:52px; top:auto; max-width:calc(100vw - 24px); }
}

@media screen and (max-width:768px) {
  #docform table#lines tr.empty-line td:not(:has(.pname)):not(:has(.del)) { display:none; }
}
@media screen and (max-width:768px) {
  #docform .ibx-grid:has([name=tdate]) > label:has(input[disabled]) { display:none; }
  #docform .ibx-tools #openpicker { order:2; }
  #docform .ibx-tools .mf.right { order:1; }
  #docform table#lines td:has(.pname) { position:relative; }
  #docform table#lines .np-edit { position:absolute; right:42px; top:0; }
}

/* Section palettes: readable accents with restrained, richer surfaces. */
:root { --bg:#F1F5F8; --line:#DCE4EB; --c-rep:#315BA3; --c-rep-soft:#EAF0FB; --c-rep-text:#25477E; }
body { --page-soft:#E5F3EF; background:linear-gradient(180deg,var(--page-soft),var(--bg) 420px); }
body:has(.app[data-section="Склад"]) { --accent:#2256B8; --accent-h:#1B4596; --accent-text:#2256B8; --accent-soft:#E8F0FD; --page-soft:#E8F0FD; }
body:has(.app[data-section="Закупки"]) { --accent:#9A570A; --accent-h:#7D4608; --accent-text:#9A570A; --accent-soft:#FDF1DF; --page-soft:#FDF1DF; }
body:has(.app[data-section="Финансы"]) { --accent:#6342C5; --accent-h:#50339F; --accent-text:#5239B5; --accent-soft:#EEEAFC; --page-soft:#EEEAFC; }
body:has(.app[data-section="Аналитика"]) { --accent:#315BA3; --accent-h:#25477E; --accent-text:#25477E; --accent-soft:#EAF0FB; --page-soft:#EAF0FB; }
.top { background-image:linear-gradient(90deg,var(--accent),var(--accent)); background-size:100% 3px; }
.panel, .cashcard, .kpi { box-shadow:0 3px 14px rgba(31,48,71,.045); }
.panel { border-color:var(--line); }
.app .ph h1, .ibx-head h1 { color:var(--accent-text); }
.ibx-head { padding-bottom:12px; border-bottom:1px solid var(--accent-soft); }
button:not([class]), .btn:not(.ghost) { background-image:none; background-color:var(--accent); }
button:not([class]):hover, .btn:not(.ghost):hover { background-color:var(--accent-h); }
input:focus, select:focus, textarea:focus { outline-color:var(--accent); }
.ibx-btn { background:var(--accent-soft); border-color:var(--accent-soft); }
.ibx-btn:hover { border-color:var(--accent); }
.subnav a.on, .mobnav a.on { background:var(--accent-soft); color:var(--accent-text); }
.mobnav .fab svg { background:#087F6D; }
.mobnav .fab span { color:#0B6B5C; }
.mobnav button { background:transparent; }
.kpi { background:linear-gradient(135deg,#E0F3EC,#F5FCF9); border-top-color:#087F6D; }
.kpi.info { background:linear-gradient(135deg,#E6EEFF,#F6F9FF); }
.kpi.receivable { background:linear-gradient(135deg,#EDE7FC,#FAF8FF); border-top-color:#7253C7; color:var(--text); }
.kpi.receivable .k-ico { color:#6342C5; background:#fff; }
.kpi.warn { background:linear-gradient(135deg,#FFF0DC,#FFFBF5); }
.kpi .k-val { font-weight:700; }
.cashcard { background:linear-gradient(120deg,var(--accent-soft),#fff 75%); }
.listpanel table th { background:var(--accent-soft); color:var(--accent-text); }
#docform table#lines td.rowtotal { color:var(--accent-text); }
#docform .ibx-sums .grand { background:var(--accent-soft); padding:10px 12px; border-radius:8px; border:0; }
#docform .ibx-sf .sf-right b { color:var(--accent-text); }
@media screen and (max-width:768px) {
  #docform table#lines tr:has(.pname) { background:linear-gradient(135deg,var(--accent-soft),#fff 95px); border-color:var(--line); }
  #docform table#lines tr.empty-line { background:#fff; border-style:dashed; }
  #docform table#lines td:has(.pname)::before { color:var(--accent-text); font-weight:600; }
  .mobile-doc-details { background:var(--surface2); }
  .mobnav a.on { border-radius:10px 10px 0 0; }
}
@media print { body { background:white; } .panel,.kpi,.cashcard { box-shadow:none; } }

/* Real-data tables and all header controls must fit small phones. */
@media screen and (max-width:768px) {
  .dash-grid .panel { min-width:0; }
  table.recent { table-layout:fixed; width:100%; }
  table.recent td { white-space:normal; overflow-wrap:anywhere; }
  table.recent .tag { max-width:100%; white-space:normal; }
}
@media screen and (max-width:360px) {
  .top { padding-left:8px; padding-right:8px; gap:4px; }
  .top-right { gap:4px; }
  .top .pm-btn { width:40px; padding:0; justify-content:center; }
  .top .pm-btn > svg { display:none; }
  .top .pm.wh .chip { padding:0 6px; }
  .top .pm.wh .chip > svg:last-child { display:none; }
  .top .gsbtn, .top .burger { width:40px; padding:0; justify-content:center; }
}


.contact-search{position:relative;width:100%;min-width:0}.contact-results{position:absolute;top:100%;left:0;right:0;z-index:80;background:#fff;border:1px solid #dce5eb;border-radius:10px;box-shadow:0 8px 24px #172b4426;overflow:hidden}.contact-results button{color:var(--text, #1f2937);height:auto;line-height:1.4;display:block;width:100%;text-align:left;background:#fff;border:0;border-radius:0;padding:12px 14px;white-space:normal;overflow-wrap:anywhere;min-height:44px}.contact-results button:hover,.contact-results button[aria-selected=true]{background:#e0f3ef;color:#087f70}.contact-results .contact-add{border-top:1px solid #e4eaef;color:#087f70}.contact-hint{padding:12px 14px;color:#768394}


/* Compact workspace, 2026-10-27. Presentation only; touch/print layouts remain independent. */
@media screen and (min-width:769px){
 .app main{padding:16px 18px 40px}
 main .ph{margin-bottom:10px;gap:10px}
 main h1{font-size:19px}main h2{margin-bottom:9px}
 main .panel:not(details){padding:12px 14px;margin-bottom:12px}
 main .listpanel{padding:10px 12px 8px}
 main .row,main .tg{align-items:start;gap:12px}
 main .grid-main,main .grid3top,main .dash-grid{gap:12px}
 main .toolbar,main .filters{gap:6px;row-gap:6px;margin-bottom:8px}
 main .toolbar .right,main .filters .right{font-size:12px}
 main .searchbox{width:240px}
 main button,main .btn,main .btnlink,main .ghost,main .ibx-btn,main .ibx-cancel{font-size:13px;height:34px}
 main button.mini{height:28px}
 main button.del,main .ibx-pen{height:auto}
 main input[type=text],main input[type=date],main input[type=password],main input[type=number],main input[type=email],main input[type=search],main select{height:34px;font-size:13px}
 main textarea{min-height:60px;font-size:13px;padding:6px 8px}
 main label{margin-bottom:6px}
 main .mf{margin:0}
 main .two,main .grid3{column-gap:10px}
 main .kind{margin-bottom:8px}
 main .tb-date{height:34px}
 main .tb-date input{height:30px}
 main .subnav{margin-bottom:12px}
 main .subnav a{padding:7px 10px;font-size:13px}
 main .period-note{margin:8px 0}
 main table.list,main table.dtable{font-size:13px}
 main table.list th,main table.dtable th{font-size:11.5px;padding:7px 8px}
 main table.list td,main table.dtable td{padding:5px 8px;height:34px;line-height:1.35}
 main table.list th.num,main table.dtable th.num{text-align:right}
 main table.money-list .money-entry td{padding:5px 8px}
 main table.list .tag,main table.dtable .tag{font-size:10.5px;padding:1px 6px}
 main .pager{padding-top:8px;gap:10px}
 main .summary td{padding-top:4px;padding-bottom:4px}
 main .contact-name{display:flex;align-items:center;gap:6px}
 main .contact-name .clink{min-width:0;overflow-wrap:anywhere}
 main .contact-name .tag{flex-shrink:0}
 main .kpi-grid,main .cards,main .cards4{gap:10px;margin-bottom:12px}
 main .kpi{padding:11px 13px;min-height:94px;gap:4px}
 main .card,main .cashcard{padding:11px 13px}
 main .att li{padding:6px 0;font-size:13px}
 main .recent td{padding:6px}
 main .cash-list .acc{padding:6px 8px}
 main .repgrid{gap:10px}
 main .rephead{padding:8px 9px;margin-bottom:2px}
 main .repitem{min-height:34px;padding:4px 9px;font-size:13px}
 main .settings{grid-template-columns:200px minmax(0,1fr);gap:12px}
 main .setnav a{padding:5px 8px;font-size:13px}
 main .setgroup{padding-top:9px}
 main .fxcol,main .fxbox{padding:10px 12px}
 main .fxrow{gap:10px}
 main .cv-bal{margin-bottom:6px;font-size:12px}
 main .money-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:12px;align-items:start}
 main .money-form>h2,main .money-form>.two,main .money-form>[data-money-rate],main .money-form>label:has([name=contact_id]),main .money-form>label:has([name=note]),main .money-form>div:last-of-type{grid-column:1/-1}
 main .money-form>[data-money-rate]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0 10px}
 main .money-form>[data-money-rate]>[data-rate-preview]{grid-row:2;grid-column:1/-1;margin-bottom:4px}
 main .money-form label{min-width:0}
 #docform .ibx-card{padding:14px 16px 16px}
 #docform .ibx-head{margin-bottom:12px;padding-bottom:9px}
 #docform .ibx-grid{gap:10px;margin-bottom:10px}
 #docform .ibx-hr{margin:12px 0}
 #docform .doc-meta-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px 12px}
 #docform .doc-meta-grid>.ibx-grid{margin:0;min-width:0}
 #docform .doc-meta-grid>.ibx-grid:first-child,#docform #newbox{grid-column:1/-1}
 #docform .doc-meta-grid>.document-currency-row{grid-column:span 2}
 #docform .doc-meta-grid .mf{width:100%;min-width:0;flex:1 1 0}
 #docform .doc-meta-grid .mf.grow{flex:2 1 0}
 #docform .doc-logistics-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px 12px;margin-bottom:10px}
 #docform .doc-logistics-grid>.ibx-grid{margin:0;min-width:0}
 #docform .doc-logistics-grid>.ibx-grid:has([name=address]),#docform .doc-logistics-grid>.ibx-grid:has([name=attachment]){grid-column:span 2}
 #docform .doc-logistics-grid .mf{width:100%;min-width:0;flex:1}
 #docform .ibx-tools{gap:8px}
 #docform table.ibx-lines{margin-top:8px}
 #docform table.ibx-lines th{padding:7px 8px;font-size:11.5px}
 #docform table.ibx-lines td{height:36px;padding:2px 6px;font-size:13px}
 #docform table.ibx-lines .pname,#docform table.ibx-lines input.cell{height:30px;font-size:13px}
 #docform .ibx-foot{margin:12px 0;gap:16px}
 #docform .ibx-sums{font-size:13px}
 #docform .ibx-sums div{gap:16px;padding:3px 0}
 #docform .ibx-sums .grand{padding:8px 10px}
 main .stickyfoot{padding:8px 18px;margin:0 -18px -40px}
 main .dp-body{padding:12px 16px}
 main .dp-info{padding:9px 12px;margin-bottom:10px}
 main .dp-info td{padding:4px 0;font-size:13px}
 main .dp-tabs{margin-bottom:10px}
 main .dp-tabs a{padding:7px 11px;font-size:13px}
 main table.dp-table td{height:34px;font-size:13px}
 main table.dp-table th{padding:7px 8px}
 main .dp-total{padding:10px 4px;gap:36px}
 main .empty{padding:24px 14px}
 main .exchange .card{padding:12px 14px}
 main .exchange th,main .exchange td{padding:6px 8px;font-size:13px}
}
@media screen and (min-width:769px) and (max-width:1100px){
 #docform .doc-meta-grid,#docform .doc-logistics-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 main .money-form>[data-money-rate]{grid-template-columns:repeat(2,minmax(0,1fr))}
 main .money-form>[data-money-rate]>[data-rate-preview]{grid-row:auto}
}
@media screen and (max-width:768px){
 main .panel:not(details):not(.ibx-card){margin-bottom:10px}
 main table.list tr,main table.dtable tr{margin-bottom:6px;padding:7px 10px}
 main table.list td,main table.dtable td{gap:8px;padding-top:3px;padding-bottom:3px}
 main .kpi-grid,main .cards,main .cards4{gap:8px;margin-bottom:10px}
 main .quick-payment input:not([type=radio]):not([type=checkbox]):not([type=hidden]),main .quick-payment select{font-size:16px;height:42px;min-height:42px}
}

@media screen and (max-width:768px){
 main table.money-list .money-entry td.money-amount{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:2px 8px;min-width:0}
 main table.money-list .money-entry td.money-amount::before{grid-column:1;grid-row:1/span 2}
 main .money-list .money-value{grid-column:2;white-space:normal;overflow-wrap:anywhere;min-width:0}
 main .money-list .money-meta{grid-column:2;min-width:0;max-width:100%;margin-top:0}
 main .money-list .money-meta .small{white-space:normal;overflow-wrap:anywhere;max-width:100%}
}

/* A local calendar surface; native mobile pickers and ISO date fields are preserved. */
main input[type=date]{font-family:Inter,-apple-system,"Segoe UI",sans-serif;font-variant-numeric:tabular-nums;letter-spacing:.01em}
.idc-calendar{position:fixed;z-index:1600;width:326px;max-width:calc(100vw - 16px);padding:16px;background:#fff;border:1px solid #e1e9e8;border-radius:18px;box-shadow:0 20px 64px #102c2b26,0 4px 14px #102c2b0d;font-family:Inter,-apple-system,"Segoe UI",sans-serif;color:#233633;line-height:1.4;animation:idcCalIn .12s ease-out}
.idc-calendar[hidden]{display:none!important}
.idc-cal-caption{font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);font-weight:600;margin-bottom:9px}
.idc-cal-header{display:grid;grid-template-columns:30px minmax(0,1fr) 80px 30px;align-items:center;gap:6px;margin-bottom:14px}
.idc-calendar select{min-width:0;width:100%;height:34px;padding:0 23px 0 8px;font:600 13px Inter,-apple-system,"Segoe UI",sans-serif;border:1px solid transparent;background-color:#f4f8f7;border-radius:8px;color:#233633;box-shadow:none}
.idc-calendar select:hover{border-color:#d2e4df}.idc-calendar select:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
.idc-calendar button{border:0;box-shadow:none;min-height:0;margin:0;padding:0;background:transparent;color:inherit;display:flex;align-items:center;justify-content:center;font-family:inherit;cursor:pointer;line-height:1;transition:background .12s,color .12s;white-space:nowrap}
.idc-calendar .idc-cal-nav{width:30px;height:34px;border-radius:8px;font-size:27px;font-weight:400;color:#647b75}
.idc-calendar .idc-cal-nav:hover{background:#edf5f2;color:var(--accent)}
.idc-cal-week,.idc-cal-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px}
.idc-cal-week{margin-bottom:6px}.idc-cal-week span{text-align:center;font-size:11px;font-weight:600;color:#84958e;padding:5px 0}.idc-cal-week .weekend{color:#ad8d7c}
.idc-calendar .idc-cal-day{height:37px;min-width:0;width:100%;border-radius:10px;font-size:13px;font-weight:500;font-variant-numeric:tabular-nums}
.idc-calendar .idc-cal-day:hover{background:#e7f3ee;color:#087f6d}.idc-calendar .idc-cal-day.outside{color:#b4c0bb}
.idc-calendar .idc-cal-day.today{box-shadow:inset 0 0 0 1px #9ccabb;color:#087f6d;font-weight:700}
.idc-calendar .idc-cal-day.selected{background:var(--accent,#087f6d);color:#fff;box-shadow:0 3px 8px #087f6d24;font-weight:700}
.idc-calendar button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.idc-calendar button:disabled{opacity:.3;cursor:default}
.idc-cal-description{font-size:11px;color:#789087;padding:12px 0 9px;min-height:35px;text-transform:capitalize}
.idc-cal-footer{border-top:1px solid #edf1ef;padding-top:10px;display:flex;align-items:center;justify-content:space-between;gap:8px}
.idc-calendar .idc-cal-today,.idc-calendar .idc-cal-clear{height:30px;padding:0 10px;border-radius:8px;font-size:12px;font-weight:600}
.idc-calendar .idc-cal-today{background:#e8f4ef;color:#087f6d}.idc-calendar .idc-cal-today:hover{background:#d8ece3}.idc-calendar .idc-cal-clear{color:#82948d}.idc-calendar .idc-cal-clear:hover{background:#f4f7f5;color:#445e53}
@keyframes idcCalIn{from{opacity:0;transform:translateY(-3px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.idc-calendar{animation:none}.idc-calendar button{transition:none}}
@media print{.idc-calendar{display:none!important}}

/* Daftario brendi (2026-11-02): asosiy tugmalar va logotip har bo'limda brend rangida; bo'lim ranglari boshqa joylarda qoladi */
:root { --brand:#0F766E; --brand-top:#159085; --brand-h:#0A5650; --brand-gold:#F2B33D; --brand-ink:#10233F; }
button:not([class]), .btn:not(.ghost):not(.danger-btn) { background-color:var(--brand); background-image:linear-gradient(180deg, var(--brand-top), var(--brand)); border-color:var(--brand); color:#fff; }
button:not([class]):hover, .btn:not(.ghost):not(.danger-btn):hover { background-color:var(--brand-h); background-image:none; border-color:var(--brand-h); }
.mobnav .fab svg { background:var(--brand); box-shadow:0 4px 12px rgba(15,118,110,.35); }
.sb-brand b { color:var(--brand-ink); font-weight:800; letter-spacing:-.01em; } .sb-brand b .brand-io { color:var(--brand); }
.sb-brand img { border-radius:8px; }


/* Bosh sahifa (2026-11-04): sotuv grafigi o'rniga «Месяц к месяцу» va «Прибыль по категориям» */
.dash-insights { display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1fr); gap:16px; align-items:start; }
.dash-insights > * { min-width:0; }
@media (max-width:1280px) { .dash-insights { grid-template-columns:minmax(0, 1fr); } }
.ins-month .ph h2::before { background:var(--c-sales); } .ins-cat .ph h2::before { background:var(--c-fin); }
.ins-d { font-weight:700; white-space:nowrap; } .ins-d.up { color:var(--pos); } .ins-d.down { color:var(--neg); }
.ins-note { margin:0; padding:10px 18px 14px; }
.ins-bar-h, .ins-bar { width:34%; } .ins-bar i { display:block; height:8px; border-radius:4px; background:var(--c-fin); opacity:.8; }
.ins-bar i.neg { background:var(--neg); }
@media (max-width:760px) { .ins-bar-h, .ins-bar { display:none !important; } }

/* Bosh sahifa (2026-11-04): KPI lenta — chapda firuza «Чистая позиция», o'ngda 3 ustun (A3 varianti) */
.panel.kpi-strip { display:flex; align-items:stretch; overflow:hidden; padding:0; }
.kpi-strip .ks { display:block; min-width:0; padding:16px 22px; color:inherit; text-decoration:none; }
.kpi-strip .net { flex:0 0 300px; background:linear-gradient(150deg, #159085, #0A5650); color:#fff; }
.kpi-strip .net .ks-l, .kpi-strip .net .ks-s, .kpi-strip .net .ks-v small { color:rgba(255,255,255,.82); }
.kpi-strip .net .ks-v { font-size:32px; font-weight:800; color:#fff; }
.ks-coin { display:inline-block; width:9px; height:9px; border-radius:50%; background:var(--brand-gold); margin-right:6px; }
.ks-rest { flex:1; min-width:0; display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); }
.ks-rest > .ks { border-left:1px solid var(--line); } .ks-rest > .ks:first-child { border-left:0; } .ks-rest > a.ks:hover { background:#F7FAF9; }
.ks-l { font-size:11.5px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); }
.ks-v { font-size:24px; font-weight:700; letter-spacing:-.02em; line-height:1.15; margin:5px 0 3px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.ks-v small { font-size:13px; font-weight:600; color:var(--muted); margin-left:4px; } .ks-v.neg { color:var(--neg); } .ks-v.none { color:var(--muted); }
.ks-s { font-size:13px; line-height:1.5; color:var(--muted); } .ks-s b { color:var(--text2); font-weight:600; }
@media (max-width:1280px) { .panel.kpi-strip { flex-direction:column; } .kpi-strip .net { flex:none; } }
@media (max-width:700px) { .ks-rest { grid-template-columns:minmax(0, 1fr); } .ks-rest > .ks { border-left:0; } .ks-rest > .ks + .ks { border-top:1px solid var(--line); } }

/* Kassa kartochkasi (2026-11-04): summa bitta qatorda — valyuta belgisi burchakka chiqarildi */
.cashcard { position:relative; }
.cashcard .cashcur { position:absolute; top:10px; right:12px; }
.cashcard .cashname { padding-right:46px; }
.cashcard .cashval { white-space:nowrap; }
