:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e8f0;
  --text: #1e293b;
  --muted: #64748b;
  --primary: #4f46e5;          /* asosiy tugmalar: indigo */
  --primary-2: #e0e7ff;        /* yengil indigo fon */
  --gold: #818cf8;
  --gold-light: #e0e7ff;
  --gold-dark: #4f46e5;
  --ink: #1e1b4b;
  --sidebar-bg: linear-gradient(180deg, #1e1b4b 0%, #0f0c29 100%);
  --topbar-bg: #1e1b4b;
  --serif: 'Inter Variable', Inter, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --green: #059669;
  --green-bg: #d1fae5;
  --red: #dc2626;
  --red-bg: #fee2e2;
  --amber: #b45309;
  --amber-bg: #fef3c7;
  --blue: #2563eb;
  --blue-bg: #dbeafe;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 4px 16px rgba(15,23,42,.06);
  --sidebar: 232px;
  font-family: 'Inter Variable', Inter, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
  color: var(--text);
}

/* Qorong'u rejim (Dark theme) */
body.dark-theme {
  --bg: #0f172a;
  --surface: #1e293b;
  --surface-2: #334155;
  --border: #334155;
  --text: #f8fafc;
  --muted: #94a3b8;
  --ink: #f8fafc;
  --shadow: 0 4px 20px rgba(0, 0, 0, .4);
}
body.dark-theme .card, body.dark-theme .modal, body.dark-theme .ac-list {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
body.dark-theme input, body.dark-theme select, body.dark-theme textarea {
  background: #0f172a;
  color: #f8fafc;
  border-color: #334155;
}
body.dark-theme .btn {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border);
}
body.dark-theme .btn:hover {
  background: #475569;
}
body.dark-theme .btn.primary {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #ffffff !important;
}
body.dark-theme table.t th {
  background: var(--surface-2);
  color: var(--muted);
  border-color: var(--border);
}
body.dark-theme table.t td {
  border-color: var(--border);
}
body.dark-theme table.t tr.click:hover td {
  background: var(--surface-2);
}
body.dark-theme table.t tfoot td {
  background: var(--surface-2);
}
body.dark-theme .chip {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
}
body.dark-theme .chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
body.dark-theme .pos-tile {
  background: var(--surface);
  border-color: var(--border);
}
body.dark-theme .pos-tile:hover {
  border-color: var(--primary);
}
body.dark-theme .scan-test, body.dark-theme .tips {
  background: var(--surface-2);
  border-color: var(--border);
}

.num, table.t td.num, table.t th.num, .nowrap, .stat .v, .balance-big, .big-price {
  font-variant-numeric: tabular-nums;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
a { color: var(--gold-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0; }
h2 { font-size: 17px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 0 0 8px; }
[v-cloak] { display: none; }

/* ---------- Layout ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar); flex-shrink: 0; background: var(--sidebar-bg, linear-gradient(180deg, #1e1b4b 0%, #0f0c29 100%)); color: #c7d2fe;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column;
}
.sidebar .brand { padding: 18px 18px 14px; font-weight: 700; font-size: 16px; color: #fff; display: flex; gap: 8px; align-items: center; }
.sidebar nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 18px; color: #c7d2fe; font-size: 14px; position: relative;
}
.sidebar nav a:hover { background: rgba(255, 255, 255, .06); text-decoration: none; }
.sidebar nav a.active { background: rgba(165,180,252, .13); color: #eef2ff; }
.sidebar nav a.active::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; background: linear-gradient(180deg, #eef2ff, #818cf8); border-radius: 0 3px 3px 0; }
.sidebar nav .ico { width: 20px; text-align: center; }
.sidebar .badge { margin-left: auto; }
.sidebar .user { margin-top: auto; padding: 14px 18px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 13px; }
.sidebar .user a { color: #a5b4fc; }

.main { flex: 1; min-width: 0; padding: 20px 24px 60px; }
.topbar { display: none; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h1 { margin-right: auto; }
.page-head .back { font-size: 20px; color: var(--muted); }

@media (max-width: 1100px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 50; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .4); }
  .backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 40; }
  .topbar {
    display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 30;
    background: var(--topbar-bg, #1e1b4b); color: #eef2ff; padding: 8px 14px; border-bottom: 1px solid rgba(165,180,252,.25);
  }
  .topbar button { background: none; border: 0; color: #fff; font-size: 22px; padding: 0 4px; }
  .topbar .t { font-weight: 600; flex: 1; }
  .main { padding: 14px 12px 80px; }
  h1 { font-size: 19px; }
}

/* ---------- Cards / grid ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card + .card { margin-top: 14px; }
.grid > .card + .card, .row > .card + .card { margin-top: 0; }
.card.p0 { padding: 0; overflow-x: auto; }
.grid { display: grid; gap: 14px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) {
  .grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.c3 { grid-template-columns: 1fr; }
  .grid.c3 > * { grid-column: auto !important; }
}
@media (max-width: 700px) { .grid.c2, .grid.c3 { grid-template-columns: 1fr; } .grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

.stat { padding: 14px 16px; }
.stat .l { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.stat .v { font-size: 20px; font-weight: 700; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .s { color: var(--muted); font-size: 12px; margin-top: 2px; }
@media (max-width: 700px) { .stat .v { font-size: 16px; } }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.bold { font-weight: 600; }
.mt { margin-top: 14px; }
.mb { margin-bottom: 14px; }
.pos { color: var(--green); }
.neg { color: var(--red); }

/* ---------- Buttons / inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); border-radius: 8px; padding: 8px 14px; font: inherit; font-weight: 500;
  cursor: pointer; white-space: nowrap; text-decoration: none !important; line-height: 1.2;
}
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #ffffff; }
.btn.primary:hover { background: #4338ca; }
.btn.green { background: var(--green); border-color: var(--green); color: #fff; }
.btn.red { background: var(--surface); border-color: #fca5a5; color: var(--red); }
.btn.red:hover { background: var(--red-bg); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.icon { padding: 6px 9px; }

input, select, textarea {
  font: inherit; color: inherit; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px;
  background: var(--surface); width: 100%; min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary-2); border-color: var(--gold); }
textarea { min-height: 70px; resize: vertical; }
label.f { display: block; }
label.f > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; font-weight: 500; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.check input { width: auto; }

.search-big { position: relative; flex: 1; min-width: 220px; }
.search-big input { padding: 11px 14px 11px 38px; font-size: 15px; border-radius: 10px; }
.search-big::before { content: "🔍"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 14px; opacity: .6; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 6px 12px; cursor: pointer;
  font-size: 13px; color: var(--text); white-space: nowrap;
}
.chip.active { background: var(--primary); border-color: var(--primary); color: #ffffff; }
.chip .n { opacity: .7; margin-left: 4px; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 14px; overflow-x: auto; }
.tabs button {
  background: none; border: 0; padding: 10px 14px; font: inherit; color: var(--muted); cursor: pointer;
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.tabs button.active { color: var(--text); border-bottom-color: var(--gold); font-weight: 600; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge.green { background: var(--green-bg); color: var(--green); }
.badge.red { background: var(--red-bg); color: var(--red); }
.badge.amber { background: var(--amber-bg); color: var(--amber); }
.badge.blue { background: var(--blue-bg); color: var(--blue); }
.badge.gray { background: #eceef2; color: #4b5563; }
.badge.purple { background: var(--primary-2); color: var(--gold-dark); }
.sidebar .badge { background: #ef4444; color: #fff; }

/* ---------- Tables (telefonda kartochkaga aylanadi) ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
table.t td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: #f3f6f9; }
table.t tr.dim td { opacity: .55; }
table.t tfoot td { font-weight: 700; background: var(--surface-2); }
table.t td.num, table.t th.num { text-align: right; white-space: nowrap; }

@media (max-width: 820px) {
  table.rt thead { display: none; }
  table.rt, table.rt tbody, table.rt tr, table.rt td { display: block; width: 100%; }
  table.rt tr { border-bottom: 1px solid var(--border); padding: 10px 12px; }
  table.rt td { border: 0; padding: 3px 0 3px 112px; position: relative; text-align: right; min-height: 24px; }
  table.rt td::before { content: attr(data-l); position: absolute; left: 0; top: 4px; max-width: 108px; color: var(--muted); font-size: 12px; text-align: left; }
  table.rt td[data-l=""], table.rt td:not([data-l]) { padding-left: 0; }
  table.rt td[data-l=""]::before, table.rt td:not([data-l])::before { content: none; }
  table.rt td.main-cell { font-size: 15px; text-align: left; padding-left: 0; }
  table.rt td.num { text-align: right; }
  table.rt tfoot { display: block; }
  table.rt tfoot tr { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 10px 12px; background: var(--surface-2); }
  table.rt tfoot td { display: block; padding: 0 !important; min-height: 0; text-align: left; background: none; }
  table.rt tfoot td:empty { display: none; }
  table.rt tfoot td::before { position: static; margin-right: 6px; }
}
/* Planshet: jadval kataklari ixchamroq */
@media (min-width: 821px) and (max-width: 1280px) {
  table.t th, table.t td { padding: 8px 8px; }
}

.empty { padding: 40px 20px; text-align: center; color: var(--muted); }

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(16, 22, 28, .45); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 40px 12px; overflow-y: auto; }
.modal { background: var(--surface); border-radius: 14px; width: 100%; max-width: 560px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.modal.wide { max-width: 960px; }
.modal .mh { display: flex; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.modal .mh h2 { margin: 0; flex: 1; }
.modal .mb { padding: 18px; }
.modal .mf { padding: 14px 18px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 600px) { .modal-bg { padding: 0; align-items: stretch; } .modal { border-radius: 0; min-height: 100vh; } }

/* ---------- Toast ---------- */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: 420px; }
.toast { background: #1e293b; color: #fff; padding: 12px 16px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); font-size: 14px; white-space: pre-line; }
.toast.error { background: #991b1b; }
.toast.ok { background: #065f46; }
.toast .act { margin-left: 10px; color: #e0e7ff; cursor: pointer; font-weight: 600; text-decoration: underline; }
@media (max-width: 600px) { .toasts { left: 12px; right: 12px; } }

/* ---------- Autocomplete ---------- */
.ac { position: relative; }
.ac-list { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .12); max-height: 320px; overflow-y: auto; }
.ac-item { padding: 9px 12px; cursor: pointer; display: flex; gap: 10px; align-items: center; }
.ac-item:hover, .ac-item.hl { background: var(--primary-2); }
.ac-item .sub { color: var(--muted); font-size: 12px; }

/* ---------- Items editor ---------- */
.items-ed .it { display: grid; grid-template-columns: minmax(180px, 2.4fr) 110px 80px 90px 130px 130px 34px; gap: 8px; align-items: end; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.items-ed .it .tot { font-weight: 600; text-align: right; padding: 9px 0; white-space: nowrap; }
.items-ed .hdr { font-size: 12px; color: var(--muted); padding-bottom: 0; border: 0; }
.items-ed .sub { font-size: 12px; color: var(--muted); grid-column: 1 / -1; margin-top: -4px; }
@media (max-width: 900px) {
  .items-ed .it { grid-template-columns: 1fr 1fr 1fr; }
  .items-ed .it .prod { grid-column: 1 / -1; }
  .items-ed .hdr { display: none; }
  .items-ed .it .tot { text-align: right; align-self: end; }
  .items-ed .it > div:last-of-type:not(.sub) { justify-self: end; }
}
.unit-toggle { display: flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.unit-toggle button { flex: 1; border: 0; background: var(--surface); padding: 8px 4px; font: inherit; font-size: 13px; cursor: pointer; }
.unit-toggle button.on { background: var(--primary); color: #ffffff; }
.mini-l { display: none; font-size: 11px; color: var(--muted); margin-bottom: 2px; }
@media (max-width: 900px) { .mini-l { display: block; } }

.totals-box { margin-left: auto; max-width: 380px; }
.totals-box .tr { display: flex; justify-content: space-between; padding: 5px 0; gap: 12px; }
.totals-box .tr.big { font-size: 18px; font-weight: 700; border-top: 1px solid var(--border); padding-top: 10px; margin-top: 4px; }

.info-list { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; }
.info-list dt { color: var(--muted); }
.info-list dd { margin: 0; word-break: break-word; }

.balance-big { font-size: 28px; font-weight: 800; }
.result-box { border-radius: 10px; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--border); }
.result-box .tr { display: flex; justify-content: space-between; padding: 3px 0; }

.timeline-amt { font-weight: 600; white-space: nowrap; }
.prod-thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--surface-2); border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; font-size: 18px; }

.login-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 24px 16px; background: radial-gradient(ellipse at 50% 30%, #3730a3 0%, #1e1b4b 55%, #10161c 100%); }
.login-wrap .card { width: 100%; max-width: 360px; padding: 26px; }

/* ---------- Hujjat (nakladnoy / KP) ---------- */
.doc-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.doc-scroll { overflow-x: auto; }
.doc {
  background: #fff; color: #000; width: 210mm; min-height: 297mm; margin: 0 auto; padding: 14mm 12mm;
  box-shadow: 0 4px 24px rgba(0, 0, 0, .12); font-family: "Times New Roman", Times, serif; font-size: 12.5px; line-height: 1.35;
}
.doc h1 { font-size: 18px; text-align: center; margin: 4px 0 2px; text-transform: uppercase; letter-spacing: .02em; }
.doc .doc-sub { text-align: center; margin-bottom: 14px; }
.doc .parties { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 12px; }
.doc .parties .p { border: 1px solid #000; padding: 6px 8px; }
.doc .parties .p b.h { display: block; text-transform: uppercase; font-size: 11px; margin-bottom: 3px; }
.doc table { width: 100%; border-collapse: collapse; }
.doc table th, .doc table td { border: 1px solid #000; padding: 4px 5px; }
.doc table th { background: #efefef; font-size: 11.5px; text-align: center; }
.doc table td.n { text-align: right; white-space: nowrap; }
.doc table td.c { text-align: center; }
.doc table tfoot td { font-weight: 700; }
.doc .words { margin: 8px 0; }
.doc .bal { margin-top: 10px; width: 60%; margin-left: auto; }
.doc .bal td { border: 1px solid #000; padding: 3px 6px; }
.doc .signs { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 34px; }
.doc .signs div { border-top: 1px solid #000; padding-top: 4px; font-size: 11.5px; }
.doc .head-row { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid #000; padding-bottom: 8px; margin-bottom: 10px; }
.doc .head-row .co { font-size: 16px; font-weight: 700; }
.doc .note { margin-top: 12px; white-space: pre-line; }
.doc .stamp { margin-top: 6px; font-size: 11px; color: #444; }
@media (max-width: 900px) { .doc { transform-origin: top left; } }

@media print {
  @page { size: A4; margin: 0; }
  html, body { background: #fff !important; }
  .sidebar, .topbar, .no-print, .doc-toolbar, .toasts, .backdrop, .page-head { display: none !important; }
  .main { padding: 0 !important; }
  .layout { display: block; }
  .doc-scroll { overflow: visible; }
  .doc { box-shadow: none; margin: 0; width: auto; min-height: auto; }
  .print-hide-others > *:not(.print-area) { display: none !important; }
}

/* ================= POS ================= */
.pos-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 16px; align-items: start; }
.pos-wrap > * { min-width: 0; }
.pos-tools { position: sticky; top: 0; z-index: 6; background: var(--bg); padding: 4px 0 10px; display: flex; flex-direction: column; gap: 8px; }
.pos-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.pos-btns .btn { padding: 7px 11px; }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 10px; }
.pos-tile {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px 10px;
  cursor: pointer; user-select: none; transition: transform .06s, box-shadow .1s; display: flex; flex-direction: column; gap: 2px;
}
.pos-tile:active { transform: scale(.97); }
.pos-tile .img { aspect-ratio: 1.25; border-radius: 8px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 38px; overflow: hidden; margin-bottom: 4px; }
.pos-tile .img img { width: 100%; height: 100%; object-fit: cover; }
.pos-tile .nm { font-weight: 600; font-size: 13.5px; line-height: 1.25; }
.pos-tile .pr { font-size: 12px; color: var(--muted); }
.pos-tile .pr.sel { color: var(--text); }
.pos-tile .pr.sel b { color: var(--primary); }
.pos-info { position: absolute; top: 12px; right: 14px; z-index: 2; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border); background: rgba(255,255,255,.95); font-weight: 700; font-style: italic; font-family: Georgia, serif; cursor: pointer; color: var(--primary); }
.pos-in { position: absolute; top: 12px; left: 14px; z-index: 2; background: var(--primary); color: #fff; border-radius: 999px; font-size: 12px; font-weight: 700; padding: 2px 8px; }
.pos-branch-badge { display: inline-flex; align-items: center; gap: 5px; background: var(--surface); border: 1px solid var(--border); padding: 6px 12px; border-radius: 9px; font-size: 13px; color: var(--primary); white-space: nowrap; }
.pos-sku { font-family: monospace; font-size: 11px; font-weight: 700; color: var(--muted); background: var(--surface-2); padding: 1px 6px; border-radius: 4px; border: 1px solid var(--border); width: fit-content; letter-spacing: .2px; }
.pos-vibr-chips { display: flex; gap: 4px; flex-wrap: wrap; margin: 3px 0 5px; }
.vibr-chip { padding: 2px 6px; font-size: 11px; font-weight: 600; border-radius: 6px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; line-height: 1.2; transition: all .1s; }
.vibr-chip:hover { border-color: var(--primary); background: var(--primary); color: #fff; }
.vibr-chip.more { background: transparent; color: var(--primary); }

.pos-cart { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; padding: 0; }
.pos-cart-in { display: flex; flex-direction: column; }
.pos-sec { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.pos-line { padding: 8px 0; border-bottom: 1px dashed var(--border); }
.pos-line:last-of-type { border-bottom: 0; }
.pos-actions { padding: 12px 14px; position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--border); }
.pos-go { width: 100%; padding: 14px; font-size: 16px; }
.stepper { display: flex; align-items: center; gap: 4px; }
.stepper input { width: 54px; text-align: center; padding: 6px 4px; }
.unit-toggle.sm button { padding: 5px 8px; font-size: 12px; }
.grow { flex: 1; min-width: 0; }

.pos-li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; background: var(--surface); cursor: pointer; }
.pos-li:hover { border-color: #a5b4fc; background: #f3f6f9; }
.pos-li.dim { opacity: .55; }

.pos-drawer-bg { position: fixed; inset: 0; background: rgba(16, 22, 28, .35); z-index: 80; }
.pos-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--bg); z-index: 81; overflow-y: auto; box-shadow: -10px 0 40px rgba(0,0,0,.2); animation: posIn .16s ease-out; }
@keyframes posIn { from { transform: translateX(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.pos-drawer .ph { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--surface); border-bottom: 1px solid var(--border); }
.pos-drawer .ph .pt { flex: 1; min-width: 0; }
.pos-drawer .ph .pt .bold { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-drawer .pb { padding: 14px; }
.pos-drawer .pos-cart-in .pos-sec { padding-left: 0; padding-right: 0; }
.pos-drawer .pos-actions { margin: 0 -14px -14px; }

.pos-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); background: var(--primary); color: #fff; font-size: 15px; cursor: pointer; box-shadow: 0 -6px 20px rgba(0,0,0,.15); }

@media (max-width: 999px) {
  .pos-wrap { grid-template-columns: minmax(0, 1fr); padding-bottom: 70px; }
  .pos-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
  .pos-btns { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
}
@media (max-width: 1100px) {
  .pos-tools { top: 46px; }
  .pos-cart { top: 58px; max-height: calc(100vh - 70px); }
}
@media (max-width: 420px) {
  .pos-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pos-tile .img { aspect-ratio: 1.6; font-size: 30px; }
}

/* POS ichidan chop etish: faqat hujjat chiqadi */
.print-portal { display: none; }
@media print {
  body.print-doc #app { display: none !important; }
  body.print-doc .print-portal { display: block; }
  body.print-doc .print-portal .doc { box-shadow: none; margin: 0; width: auto; min-height: auto; }
}
/* Termo-chek: qora-oq, mayda shrift, chekka qog'oz kengligida */
.receipt { font: 12px/1.35 'Courier New', ui-monospace, monospace; color: #000; background: #fff; padding: 3mm 2mm; box-sizing: border-box; }
.receipt .rc-c { text-align: center; }
.receipt .rc-b { font-weight: 700; }
.receipt .rc-row { display: flex; justify-content: space-between; gap: 6px; }
.receipt .rc-row > :last-child { text-align: right; white-space: nowrap; }
.receipt .rc-item { margin: 2px 0; }
.receipt .rc-hr { border-top: 1px dashed #000; margin: 5px 0; }
@media (max-width: 600px) {
  .pos-btns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; gap: 6px; }
  .pos-btns .btn { padding: 8px 4px; font-size: 12.5px; white-space: normal; line-height: 1.15; }
}
.unit-fixed { border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; background: var(--surface-2); font-size: 13px; text-align: center; }
.lang-sw { display: flex; gap: 4px; padding: 8px 18px; }
.lang-sw button { flex: 1; border: 1px solid rgba(255,255,255,.15); background: transparent; color: #c7d2fe; border-radius: 6px; padding: 5px 6px; font: inherit; font-size: 12px; cursor: pointer; }
.lang-sw button.on { background: linear-gradient(135deg, #eef2ff, #818cf8); border-color: #a5b4fc; color: #312e81; font-weight: 600; }
.login-wrap .lang-sw button { color: var(--text); border-color: var(--border); }
.login-wrap .lang-sw button.on { color: #312e81; }
.lang-btn { background: rgba(255,255,255,.12) !important; border: 1px solid rgba(255,255,255,.25) !important; border-radius: 6px; font-size: 12px !important; padding: 4px 8px !important; color: #fff; }
.sidebar .lang-sw { margin-top: auto; }
.sidebar .lang-sw + .user { margin-top: 0; }
.client-grid { grid-template-columns: minmax(240px, 290px) minmax(0, 1fr); align-items: start; }
@media (max-width: 1100px) { .client-grid { grid-template-columns: minmax(0, 1fr); } }


/* ================= Do'kon boshqaruv — dizayn ================= */
body { font-family: 'Inter Variable', Inter, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
h1, .page-head h1 { font-family: var(--serif); font-weight: 600; font-size: 28px; letter-spacing: .2px; }
h2 { font-family: var(--serif); font-weight: 600; font-size: 21px; }
.modal .mh h2 { font-size: 22px; }
.brand-logo { display: inline-flex; line-height: 0; }
.brand-logo svg { width: 100%; height: auto; display: block; }
.sidebar .brand { padding: 20px 18px 16px; border-bottom: 1px solid rgba(165,180,252,.18); margin-bottom: 8px; justify-content: center; }
.sidebar .brand .brand-logo { width: 170px; }
.sidebar nav a { font-size: 13.5px; letter-spacing: .1px; }
.sidebar .user { border-top-color: rgba(165,180,252,.18); color: #a5b4fc; }
.topbar .brand-logo { width: 34px; }
.topbar .t { color: #eef2ff; font-family: var(--serif); font-size: 19px; font-weight: 600; }
.topbar button { color: #eef2ff; }
.card { border-color: var(--border); }
.stat .l { color: #64748b; letter-spacing: .06em; }
.stat .v { font-variant-numeric: tabular-nums; }
table.t th { background: #f8fafc; color: #64748b; text-transform: uppercase; font-size: 11px; letter-spacing: .05em; }
.btn { border-radius: 9px; }
.btn.green { background: #059669; border-color: #059669; }
.pos-go { background: linear-gradient(135deg, #1e293b, #1e1b4b) !important; border-color: #1e1b4b !important; color: #ffffff !important; letter-spacing: .3px; }
.pos-go:disabled { opacity: .45; }
.pos-bar { background: linear-gradient(135deg, #1e293b, #1e1b4b); color: #ffffff; border-top: 1px solid rgba(165,180,252,.4); }
.pos-in { background: #312e81; color: #ffffff; }
.pos-info { color: var(--gold-dark); }
.pos-tile .pr.sel b { color: var(--gold-dark); }
.chip { border-color: var(--border); }
.search-big input { border-color: var(--border); }
.sidebar .badge { background: linear-gradient(135deg, #eef2ff, #818cf8); color: #312e81; }
.topbar .badge { background: linear-gradient(135deg, #eef2ff, #818cf8) !important; color: #312e81 !important; }
/* Kirish sahifasi */
.login-wrap .login-logo { width: 230px; filter: drop-shadow(0 6px 24px rgba(165,180,252,.18)); }
.login-wrap .card { background: rgba(255,255,255,.97); border: 1px solid rgba(165,180,252,.35); box-shadow: 0 24px 70px rgba(0,0,0,.45); border-radius: 16px; }
.login-wrap .card h2 { text-align: center; color: var(--text); margin-bottom: 18px; }
.login-wrap .btn.primary { padding: 12px; font-size: 15px; letter-spacing: .3px; }
.login-wrap .lang-sw { padding: 0; }
.login-foot { color: #64748b; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
/* Hujjatlar: logotip */
.doc .head-row .doc-logo { width: 210px; }
.sidebar nav .ico { width: 20px; height: 20px; display: inline-flex; color: #a5b4fc; opacity: .85; }
.sidebar nav .ico svg { width: 19px; height: 19px; }
.sidebar nav a.active .ico { color: #eef2ff; opacity: 1; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.dot.red { background: var(--red); } .dot.green { background: var(--green); } .dot.amber { background: #c98a1b; }
.chip.active .dot { box-shadow: 0 0 0 2px rgba(255,255,255,.25); }
/* Raqamlar doim oddiy (serif shriftda ham) */
:root { font-variant-numeric: lining-nums; }
/* Hujjatlar o'z klassik shriftida */
.doc h1 { font-family: "Times New Roman", Times, serif; font-size: 18px; font-weight: 700; letter-spacing: .02em; }
.notice-gold { display: block; background: linear-gradient(90deg, #f3f6f9, #e9eef3); border-color: #c8d1da; color: #3b4b5c; text-decoration: none !important; }
.notice-gold b { color: #312e81; }
table.t th, table.t th.num { white-space: normal; line-height: 1.25; }
/* Kassalar */
.reg-grid { align-items: start; }
.reg-card h2 { font-size: 24px; }
.reg-cash { background: linear-gradient(135deg, #312e81, #3730a3); color: #ffffff; border-radius: 12px; padding: 12px 14px; }
.reg-cash .muted { color: #a9b3bd; }
.reg-cash .v { font-family: var(--serif); font-size: 30px; font-weight: 700; }
.reg-cash small { font-family: 'Inter Variable', Inter, sans-serif; font-size: 13px; color: #a9b3bd; }
.pos-reg { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.pos-reg select { padding: 6px 8px; font-weight: 600; border-color: #a5b4fc; background: #f8fafc; }
@media (max-width: 1100px) { .reg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } .reg-grid > * { grid-column: auto !important; } }
@media (max-width: 700px) { .reg-grid { grid-template-columns: minmax(0, 1fr) !important; } }
@media (max-width: 600px) {
  .pos-tools > .row:first-child { flex-wrap: wrap !important; }
  .pos-tools > .row:first-child .search-big { flex-basis: 100%; }
  .pos-reg { margin-left: auto; }
}

/* ---- Sharhlar ---- */
.stars-mini { color: #b08a2e; white-space: nowrap; }
.stars-v { color: #b08a2e; }
.review-list { display: flex; flex-direction: column; gap: 10px; }
.review-card { display: flex; gap: 12px; align-items: flex-start; margin: 0; }
.grid.rv-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 700px) { .grid.rv-stats .stat .v { font-size: 18px; } .grid.rv-stats .stat .l { font-size: 10px; } }
.review-card.dim { opacity: .55; }
.review-card .rc-body { flex: 1; min-width: 0; }
.review-card .rc-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.review-card .rc-head a { color: inherit; text-decoration: none; }
.review-card .rc-stars { color: #b08a2e; letter-spacing: 1px; margin-left: auto; white-space: nowrap; }
.review-card .rc-text { margin-top: 6px; white-space: pre-line; line-height: 1.45; overflow-wrap: anywhere; }
.review-card .rc-actions { display: flex; gap: 6px; flex-shrink: 0; }
@media (max-width: 640px) {
  .review-card { flex-wrap: wrap; }
  .review-card .rc-body { flex-basis: calc(100% - 64px); }
  .review-card .rc-actions { width: 100%; justify-content: flex-end; }
}

.calc-box { padding: 9px 12px; border: 1px dashed var(--border); border-radius: 8px; background: var(--surface-2); font-weight: 600; }
/* ---- Ranglar ---- */
.cchip { display: inline-block; padding: 1px 8px; margin: 1px 3px 1px 0; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; line-height: 1.6; }
.color-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: -4px; }
.item-color { font-size: 12px; color: var(--muted); }
.color-sel { margin-top: 4px; font-size: 13px; padding: 4px 8px; }
.color-sel.need { border-color: var(--amber, #c98a1b); }
.amber-t { color: #b45309; }
/* Kategoriya tanlash ro'yxati */
.cat-ac .cat-list { max-height: 320px; overflow-y: auto; }
.cat-ac .ac-item { display: flex; align-items: center; gap: 8px; }
.cat-ac .ac-item.on { font-weight: 600; }
/* ---- Filiallar: egasi sahifasi va filial nomi ---- */
.sidebar .branch-name { margin: -4px 18px 8px; padding: 7px 10px; border-radius: 8px; background: rgba(255,255,255,.07); color: #eef2ff; font-size: 13px; font-weight: 600; }
.sidebar .back-branches { display: block; margin: 0 18px 10px; font-size: 13px; color: #a5b4fc; }
.owner-wrap { min-height: 100vh; background: var(--bg); }
.owner-top { display: flex; align-items: center; gap: 16px; padding: 12px 24px; background: var(--ink); color: #eef2ff; }
.owner-top .brand-logo { height: 34px; }
.owner-top a { color: #a5b4fc; }
.owner-top .lang-sw button { color: #a5b4fc; }
.owner-me { text-align: right; font-size: 14px; }
.owner-main { max-width: 1120px; margin: 0 auto; padding: 24px 16px 48px; }
.owner-empty { text-align: center; padding: 48px 24px; max-width: 560px; margin: 24px auto; }
.owner-empty-ico { font-size: 44px; }
.branch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.branch-card { display: flex; flex-direction: column; gap: 12px; }
.branch-card.dim { opacity: .7; }
.branch-info { display: grid; gap: 4px; font-size: 14px; }
.branch-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
@media (max-width: 640px) {
  .owner-top { padding: 10px 16px; flex-wrap: wrap; }
  .owner-me { text-align: left; }
  .branch-grid { grid-template-columns: 1fr; }
}

/* ---- Yangi ko'rinish: dinamik SaaS palitra, yumaloq burchaklar, yumshoq soyalar ---- */
h1, .page-head h1 { font-weight: 700; font-size: 26px; letter-spacing: -.3px; color: var(--text); }
h2 { font-weight: 650; font-size: 18px; letter-spacing: -.2px; }
.modal .mh h2 { font-size: 19px; }
.sidebar { background: var(--sidebar-bg, linear-gradient(180deg, #1e1b4b 0%, #0f0c29 100%)); }
.sidebar .brand .brand-logo { width: 168px; }
.sidebar nav a { margin: 2px 10px; padding: 9px 12px; border-radius: 10px; }
.sidebar nav a:hover { background: rgba(255,255,255,.07); }
.sidebar nav a.active { background: var(--primary, #4f46e5); color: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.sidebar nav a.active::before { display: none; }
.sidebar nav a.active .ico { color: #fff; }
.sidebar .badge { background: #f43f5e; color: #fff; }
.topbar { background: var(--topbar-bg, #1e1b4b); }
.topbar .badge { background: #f43f5e !important; color: #fff !important; }
.card { border-color: #e8ecf4; }
.btn { border-radius: 10px; }
.btn.primary { background: var(--primary, #4f46e5); border-color: var(--primary, #4f46e5); color: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.btn.primary:hover { filter: brightness(0.92); }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(99,102,241,.18); border-color: var(--primary, #818cf8); }
table.t th { background: #f8fafc; color: #64748b; }
.stat .v { color: var(--text); }
.chip.active { background: var(--primary, #4f46e5); border-color: var(--primary, #4f46e5); color: #fff; }
.lang-sw button.on { background: var(--primary, #4f46e5); border-color: var(--primary, #4f46e5); color: #fff; }
.login-wrap .lang-sw button.on { color: #fff; }
.login-wrap { background: radial-gradient(circle at 20% 10%, #4338ca 0%, #1e1b4b 45%, #0f0c29 100%); }
.login-wrap .login-logo { width: 220px; filter: drop-shadow(0 10px 30px rgba(99,102,241,.35)); }
.login-wrap .card { border-radius: 20px; box-shadow: 0 30px 80px rgba(15,12,41,.5); }
.login-foot { color: #a5b4fc; }
.pos-go { background: var(--primary, #4f46e5) !important; border-color: var(--primary, #4f46e5) !important; color: #fff !important; }
.pos-bar { background: var(--topbar-bg, #1e1b4b); }
.owner-top { background: var(--topbar-bg, #1e1b4b); }
.owner-top .lang-sw button { color: #c7d2fe; }
.owner-top .lang-sw button.on { color: #fff; }
.branch-card { transition: transform .15s, box-shadow .15s; border-top: 4px solid var(--primary, #6366f1); }
.branch-card:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(15,23,42,.10); }
.branch-card.dim { border-top-color: #f43f5e; }

/* ---- SaaS Modular & Theme UI Components ---- */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-top: 10px; }
.theme-box { border: 2px solid var(--border); border-radius: 12px; padding: 12px 10px; cursor: pointer; text-align: center; background: var(--surface); transition: all .2s; }
.theme-box:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.theme-box.active { border-color: var(--primary); background: var(--primary-2, rgba(99,102,241,.06)); font-weight: 600; }
.theme-dot { width: 32px; height: 32px; border-radius: 50%; margin: 0 auto 8px; box-shadow: 0 2px 6px rgba(0,0,0,.2); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; }

.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-top: 12px; }
.module-card { border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; background: var(--surface); display: flex; flex-direction: column; justify-content: space-between; transition: all .2s; }
.module-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.module-card.on { border-color: var(--primary); background: linear-gradient(to bottom, var(--surface), var(--primary-2)); }
.module-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.module-icon { font-size: 26px; line-height: 1; }
.module-info h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; color: var(--text); }
.module-desc { font-size: 12.5px; color: var(--muted); line-height: 1.4; margin: 0; }

.ui-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.ui-switch input { opacity: 0; width: 0; height: 0; }
.ui-switch .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #cbd5e1; transition: .25s; border-radius: 24px; }
.ui-switch .slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .25s; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.ui-switch input:checked + .slider { background-color: var(--primary, #4f46e5); }
.ui-switch input:checked + .slider:before { transform: translateX(20px); }
.sidebar .branch-name { background: rgba(165,180,252,.14); color: #e0e7ff; }
.owner-top .brand-logo { width: 150px; height: auto; }
.owner-me .muted { color: #a5b4fc; }
.branch-grid > .card + .card { margin-top: 0; }
.notice-gold { background: linear-gradient(135deg, #eef2ff, #f5f3ff) !important; border-color: #c7d2fe !important; color: #3730a3; }

/* ---------- Rollar va ruxsatlar ---------- */
.warn-box { background: var(--amber-bg); color: var(--amber); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.role-card { cursor: pointer; display: flex; flex-direction: column; gap: 8px; transition: box-shadow .15s, transform .15s; }
.role-card:hover { box-shadow: 0 6px 24px rgba(79,70,229,.14); transform: translateY(-1px); }
.role-card.system { background: linear-gradient(135deg, #eef2ff, #faf5ff); }
.rc-head { display: flex; align-items: center; gap: 10px; }
.rc-ico { width: 38px; height: 38px; border-radius: 10px; background: var(--primary-2); display: grid; place-items: center; font-size: 18px; flex: none; }
.rc-bar { height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.rc-bar > div { height: 100%; background: linear-gradient(90deg, #6366f1, #8b5cf6); border-radius: 3px; }
.rc-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.rc-tags .tag { font-size: 11px; padding: 2px 7px; border-radius: 999px; background: var(--primary-2); color: var(--gold-dark); }
.rc-tags .tag.off { background: var(--surface-2); color: #a3acb9; text-decoration: line-through; }
.rc-actions { display: flex; gap: 6px; margin-top: auto; }
.perm-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-top: 12px; }
.perm-group { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; background: var(--surface-2); }
.pg-head { display: flex; align-items: center; gap: 8px; padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid var(--border); cursor: pointer; }
.check.perm { display: flex; align-items: flex-start; gap: 8px; padding: 4px 0; font-size: 13px; cursor: pointer; }
.check.perm input { margin-top: 2px; }
.check.perm.dis, .pg-head.dis { opacity: .55; cursor: default; }
.matrix-wrap { overflow-x: auto; }
.matrix th.c, .matrix td.c { text-align: center; white-space: nowrap; }
.matrix tr.grp td { background: var(--surface-2); font-weight: 600; color: var(--gold-dark); }
.matrix .yes { color: var(--green); font-weight: 700; }
.matrix .no { color: #cbd5e1; }

/* ---------- Universal mahsulot formasi ---------- */
.form-grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 800px) { .form-grid.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .form-grid.c3 { grid-template-columns: 1fr; } }
.form-sec { font-weight: 600; color: var(--gold-dark); border-top: 1px solid var(--border); padding-top: 10px; margin-top: 2px; }
.check.f { flex-direction: row; display: flex; align-items: center; gap: 8px; }
.low-badge { background: var(--amber-bg); color: var(--amber); }

/* ---------- Xarid formasi ---------- */
.items-ed .it.pur { grid-template-columns: minmax(200px, 2.6fr) 170px 90px 140px 130px 34px; }
@media (max-width: 760px) { .items-ed .it.pur { grid-template-columns: 1fr 1fr; } }
.row.end { justify-content: flex-end; }

/* ---------- Narx etiketkalari ---------- */
.labels-sheet { display: flex; flex-wrap: wrap; gap: 6px; }
.label { background: #fff; color: #000; border: 1px dashed #cbd5e1; padding: 1.5mm 2mm; box-sizing: border-box; display: flex; flex-direction: column; overflow: hidden; font-family: Arial, sans-serif; }
.label .lb-co { font-size: 7pt; text-align: center; }
.label .lb-name { font-size: 8pt; line-height: 1.15; max-height: 2.3em; overflow: hidden; }
.label .lb-price { font-size: 13pt; font-weight: 700; margin: 0.5mm 0; }
.label .lb-price small { font-size: 7pt; font-weight: 400; }
.label .lb-code { margin-top: auto; }
@media print {
  body.print-labels .sidebar, body.print-labels .topbar, body.print-labels .no-print, body.print-labels .toasts { display: none !important; }
  body.print-labels .main { padding: 0 !important; }
  body.print-labels .labels-sheet { display: block; }
  body.print-labels .label { border: 0; page-break-after: always; break-after: page; }
}

/* ---------- Xarajatlar: gorizontal ustunlar ---------- */
.bar-row { display: grid; grid-template-columns: minmax(90px, 1.2fr) 2fr auto; gap: 8px; align-items: center; padding: 4px 0; font-size: 13px; }
.bar-row .bt { height: 10px; background: var(--surface-2); border-radius: 5px; overflow: hidden; }
.bar-row .bf { display: block; height: 100%; background: linear-gradient(90deg, #6366f1, #8b5cf6); border-radius: 5px; }
.bar-row .bv { white-space: nowrap; }

/* ---------- Kassa smenasi ---------- */
.shift-bar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.shift-bar .small { flex: 1; min-width: 0; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: #94a3b8; flex: none; }
.dot.green { background: var(--green); } .dot.red { background: var(--red); } .dot.amber { background: #f59e0b; }
.z-report { font-size: 13px; }
.z-report .tr { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; }
.z-report .tr.big { font-size: 15px; }
.z-report .rc-hr { border-top: 1px dashed var(--border); margin: 6px 0; }
.z-report .center { text-align: center; }
.z-tbl { width: 100%; border-collapse: collapse; }
.z-tbl th { font-weight: 500; color: var(--muted); text-align: right; font-size: 12px; }
.z-tbl td { padding: 2px 0; } .z-tbl td.n { text-align: right; }
@media print {
  body.print-z #app > *:not(.modal-bg), body.print-z .modal-bg .mh, body.print-z .modal-bg .mf { display: none !important; }
  body.print-z .modal-bg { position: static; background: none; }
  body.print-z .modal { box-shadow: none; width: auto; max-width: none; }
  body.print-z .z-report { font: 12px/1.35 'Courier New', monospace; color: #000; }
}

/* ---------- Hisobotlar ---------- */
.stat.hero .v { font-size: 26px; }
.t.pl td { padding: 6px 4px; }
.t.pl tr.b td { font-weight: 700; border-top: 1px solid var(--border); }
.t.pl tr.big td { font-size: 16px; }
.day-chart { display: grid; grid-template-columns: auto 1fr; grid-template-rows: 180px auto; gap: 4px 8px; }
.dc-axis { position: relative; font-size: 11px; color: var(--muted); min-width: 64px; }
.dc-axis span { position: absolute; right: 0; transform: translateY(50%); white-space: nowrap; }
.dc-plot { position: relative; border-bottom: 1px solid var(--border); }
.dc-grid { position: absolute; left: 0; right: 0; border-top: 1px dashed #e5e9f0; }
.dc-bars { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 2px; }
.dc-col { flex: 1; height: 100%; display: flex; align-items: flex-end; cursor: default; min-width: 0; }
.dc-bar { width: 100%; background: #6366f1; border-radius: 4px 4px 0 0; }
.dc-col.on .dc-bar { background: #4338ca; }
.dc-tip { position: absolute; top: 4px; left: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; font-size: 12px; box-shadow: var(--shadow); pointer-events: none; }
.dc-x { grid-column: 2; display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }

.sidebar .nav-grp { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.2px; color: rgba(199, 210, 254, .5); padding: 12px 22px 4px; }

.bar-row.br-wide { grid-template-columns: minmax(140px, 1fr) 3fr minmax(110px, auto); padding: 6px 0; }
.bar-row .bf.negf { background: var(--red); }

.qr-box { width: 160px; flex: none; background: #fff; border-radius: 10px; padding: 4px; }
.qr-box svg { width: 100%; height: auto; display: block; }
.backup-list { max-height: 360px; overflow-y: auto; }

.onboard { max-width: 760px; margin: 0 auto; }
.ind-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 6px; }
.ind-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); cursor: pointer; font-size: 13px; text-align: center; }
.ind-card .ii { font-size: 26px; }
.ind-card.on { border-color: var(--primary); background: var(--primary-2); font-weight: 600; }

.pos-promo { position: absolute; top: 12px; right: 44px; background: #dc2626; color: #fff; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 6px; z-index: 1; }

/* ---------- Kassa uskunalari ---------- */
.hw-status { display: flex; gap: 14px; flex-wrap: wrap; padding: 2px 2px 0; }
.hw-status .kbd-help { margin-left: auto; opacity: .8; }
.kbd { display: inline-block; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; padding: 0 4px; font-size: 10.5px; background: var(--surface-2); }
.change-box { display: flex; justify-content: space-between; align-items: center; background: var(--green-bg); color: var(--green); border-radius: 10px; padding: 8px 12px; font-size: 15px; }
.change-box b { font-size: 22px; }
.pos-line.flash { animation: posflash 1.2s ease-out; }
@keyframes posflash { 0% { background: #c7d2fe; } 100% { background: transparent; } }

.mode-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.mode-card { display: flex; align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer; text-align: left; font-size: 13px; }
.mode-card .mi { font-size: 20px; }
.mode-card.on { border-color: var(--primary); background: var(--primary-2); }
.scan-test { border: 1px dashed var(--border); border-radius: 10px; padding: 8px 12px; min-height: 90px; background: var(--surface-2); }
.tips { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.tips ul { margin: 6px 0 0; padding-left: 18px; }

.shift-strip { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; }

.doc.akt tr.b td { font-weight: 700; background: #f8fafc; }

.print-only { display: none; }
@media print { .print-only { display: inline; } .no-print-input, .print-area .money-input, .print-area input { display: none !important; } }

.bonus-row { display: flex; align-items: center; gap: 8px; background: var(--amber-bg); border-radius: 10px; padding: 6px 10px; font-size: 13px; }

.sidebar .att { font-size: 12px; margin: 4px 0; display: flex; align-items: center; gap: 6px; color: #c7d2fe; }
.sidebar .att a { color: #a5b4fc; }
