:root {
  /* Aniq, uyg'un va zamonaviy ko'k-oq ranglar tizimi (Clean Modern Slate & Blue) */
  --bg: #f8fafc;               /* Toza, yengil och-kulrang fon (Slate 50) */
  --surface: #ffffff;          /* Sof oq kartochkalar */
  --surface-2: #f1f5f9;        /* Yordamchi fon (hover, sarlavhalar va bo'sh kataklar) */
  --border: #e2e8f0;           /* Naqshdor, nozik chegara (Slate 200) */
  --border-strong: #cbd5e1;    /* Aniqroq chegara (Slate 300) */
  --border-focus: #2563eb;
  --text: #0f172a;             /* Chuqur Slate 900 (aniq, to'q sarlavha va matn) */
  --text-body: #1e293b;        /* Slate 800 (o'qishga qulay asosiy matn) */
  --muted: #64748b;            /* Slate 500 (yordamchi, kichik matnlar) */
  --muted-light: #94a3b8;      /* Slate 400 (foniy izohlar) */
  --primary: #2563eb;          /* Royal Blue (asosiy brend va harakat) */
  --primary-hover: #1d4ed8;    /* To'q ko'k hover */
  --primary-active: #1e40af;
  --primary-2: #eff6ff;        /* Och ko'k ajratuvchi fon (Blue 50) */
  --primary-border: #bfdbfe;   /* Ko'k ramka (Blue 200) */
  --gold: #f59e0b;             /* Chiroyli tillarang (yulduzlar va baho) */
  --gold-light: #fef3c7;
  --gold-dark: #d97706;
  --ink: #0f172a;
  --serif: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --green: #10b981;
  --green-bg: #ecfdf5;
  --green-text: #047857;
  --red: #ef4444;
  --red-bg: #fef2f2;
  --red-text: #b91c1c;
  --amber: #f59e0b;
  --amber-bg: #fffbeb;
  --amber-text: #b45309;
  --blue: #2563eb;
  --blue-bg: #eff6ff;
  --blue-text: #1d4ed8;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.08), 0 1px 2px -1px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 24px -4px rgba(15, 23, 42, 0.12), 0 4px 8px -4px rgba(15, 23, 42, 0.04);
  --sidebar: 245px;
  --transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-body);
  font-variant-numeric: tabular-nums lining-nums;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text-body); }
a { color: var(--primary); text-decoration: none; font-weight: 500; transition: var(--transition); }
a:hover { color: var(--primary-hover); text-decoration: underline; }
h1 { font-size: 24px; font-weight: 800; margin: 0; color: var(--text); letter-spacing: -0.02em; line-height: 1.25; }
h2 { font-size: 18px; font-weight: 700; margin: 0 0 14px; color: var(--text); letter-spacing: -0.01em; line-height: 1.3; }
h3 { font-size: 15px; font-weight: 700; margin: 0 0 8px; color: var(--text); line-height: 1.35; }
[v-cloak] { display: none; }

/* ---------- Layout ---------- */
.layout { display: flex; min-height: 100vh; height: 100vh; overflow: hidden; background: var(--bg); }
.sidebar {
  width: var(--sidebar); flex-shrink: 0; background: #0f172a; color: #cbd5e1;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  height: 100vh; display: flex; flex-direction: column; overflow: hidden; user-select: none;
}
.sidebar .brand {
  flex-shrink: 0;
  padding: 16px 16px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); margin-bottom: 4px;
  display: flex; justify-content: center; align-items: center;
}
.sidebar .brand .brand-logo { width: 175px; }
.sidebar .mode-tag { flex-shrink: 0; }
.sidebar nav {
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  padding: 4px 0 12px;
}
.sidebar nav::-webkit-scrollbar { width: 5px; }
.sidebar nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 4px; }
.sidebar nav::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.28); }
.sidebar nav a {
  display: flex; align-items: center; gap: 10px; margin: 3px 10px; padding: 9px 12px;
  border-radius: 8px; color: #e2e8f0; font-size: 13.5px; font-weight: 600;
  position: relative; transition: var(--transition);
}
.sidebar nav a:hover {
  background: rgba(255, 255, 255, 0.1); color: #ffffff; text-decoration: none;
}
.sidebar nav a.active {
  background: #2563eb !important; color: #ffffff !important; font-weight: 700;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}
.sidebar nav a.active::before { display: none; }
.sidebar nav .ico { width: 20px; text-align: center; color: #94a3b8; transition: var(--transition); }
.sidebar nav a:hover .ico, .sidebar nav a.active .ico { color: #ffffff !important; }
.sidebar .badge { margin-left: auto; }
.sidebar .lang-sw { flex-shrink: 0; }
.sidebar .user {
  flex-shrink: 0;
  margin-top: auto; padding: 12px 16px; border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px; color: #94a3b8; font-weight: 500; background: #0b1120;
}
.sidebar .user a { color: #e2e8f0; font-weight: 600; transition: var(--transition); }
.sidebar .user a:hover { color: #ffffff; }

.app-stage {
  flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100vh; overflow: hidden;
}
.main {
  flex: 1; min-width: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  padding: 20px 24px 60px;
}
.main::-webkit-scrollbar { width: 8px; height: 8px; }
.main::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 6px; }
.main::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

.main-pos {
  padding: 12px 18px 12px !important;
  overflow: hidden !important;
}

.topbar { display: none; }
.page-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
  position: sticky; top: -20px; z-index: 20; background: var(--bg); padding: 4px 0 8px;
}
.page-head h1 { margin-right: auto; }
.page-head .back { font-size: 20px; color: var(--muted); cursor: pointer; transition: var(--transition); }
.page-head .back:hover { color: var(--text); transform: translateX(-2px); }

.sticky-filter-panel {
  position: sticky; top: 34px; z-index: 18; background: var(--bg);
  padding: 4px 0 6px; box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.05);
}

@media (max-width: 1100px) {
  .layout { height: auto; min-height: 100vh; overflow: visible; }
  .app-stage { height: auto; overflow: visible; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 50; transform: translateX(-100%); transition: transform .25s ease; }
  .sidebar.open { transform: none; box-shadow: 0 0 50px rgba(0, 0, 0, .5); }
  .backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .6); backdrop-filter: blur(2px); z-index: 40; }
  .topbar {
    display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 30;
    background: #0f172a; color: #ffffff; padding: 10px 14px; border-bottom: 1px solid rgba(255, 255, 255, .08);
  }
  .topbar button { background: none; border: 0; color: #fff; font-size: 22px; padding: 0 4px; cursor: pointer; }
  .topbar .t { font-weight: 600; flex: 1; }
  .main { padding: 16px 14px 80px; overflow: visible; }
  .main-pos { overflow: visible !important; }
  h1 { font-size: 20px; }
  .page-head { position: static; top: auto; }
}

/* ---------- Cards / grid ---------- */
.card {
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: 20px; transition: var(--transition);
}
.card + .card { margin-top: 16px; }
.grid > .card + .card, .row > .card + .card { margin-top: 0; }
.grid { display: grid; gap: 16px; }
.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: 16px 18px; border-radius: var(--radius-lg); background: var(--surface); border: 1.5px solid var(--border); }
.stat .l { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.stat .v { font-size: 26px; font-weight: 800; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.stat .s { color: var(--muted-light); font-size: 12.5px; margin-top: 4px; font-weight: 500; }
@media (max-width: 700px) { .stat .v { font-size: 19px; } }

.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: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.bold { font-weight: 700; }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }
.pos { color: var(--green); font-weight: 700; }
.neg { color: var(--red); font-weight: 700; }

/* ---------- Buttons / inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1.5px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 8px; padding: 8px 14px; font: inherit; font-size: 13.5px; font-weight: 600;
  cursor: pointer; white-space: nowrap; text-decoration: none !important; line-height: 1.25;
  box-shadow: var(--shadow-sm); transition: var(--transition);
}
.btn:hover {
  background: var(--surface-2); border-color: #94a3b8; color: var(--text);
}
.btn:active {
  transform: scale(0.98);
}
.btn:disabled {
  opacity: .55; cursor: not-allowed; transform: none; box-shadow: none;
}
.btn.primary {
  background: var(--primary); border-color: var(--primary); color: #ffffff;
  box-shadow: 0 2px 4px 0 rgba(37, 99, 235, 0.3);
}
.btn.primary:hover {
  background: var(--primary-hover); border-color: var(--primary-hover);
  box-shadow: 0 4px 12px 0 rgba(37, 99, 235, 0.4);
}
.btn.green {
  background: var(--green); border-color: var(--green); color: #fff;
  box-shadow: 0 2px 4px 0 rgba(5, 150, 105, 0.3);
}
.btn.green:hover {
  background: #047857; border-color: #047857;
}
.btn.red {
  background: var(--surface); border-color: #fca5a5; color: var(--red);
}
.btn.red:hover {
  background: var(--red-bg); border-color: #ef4444;
}
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 6px; }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.icon { padding: 7px 10px; }

input, select, textarea {
  font: inherit; color: var(--text); border: 1.5px solid var(--border); border-radius: 8px;
  padding: 9px 12px; background: var(--surface); width: 100%; min-width: 0;
  transition: var(--transition); box-shadow: var(--shadow-sm);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}
textarea { min-height: 70px; resize: vertical; }
label.f { display: block; }
label.f > span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; font-weight: 600; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.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; font-weight: 500; }
.check input { width: auto; box-shadow: none; }

.search-big { position: relative; flex: 1; min-width: 220px; }
.search-big input { padding: 11px 14px 11px 40px; font-size: 14.5px; border-radius: 10px; border-color: #94a3b8; }
.search-big::before { content: "🔍"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 14px; opacity: .6; pointer-events: none; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1.5px solid var(--border); background: var(--surface); border-radius: 999px;
  padding: 6px 14px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text);
  white-space: nowrap; transition: var(--transition); box-shadow: var(--shadow-sm);
}
.chip:hover { border-color: #94a3b8; background: var(--surface-2); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #ffffff; box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35); }
.chip .n { opacity: .85; margin-left: 4px; font-weight: 500; }

.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs button {
  background: none; border: 0; padding: 10px 16px; font: inherit; font-size: 13.5px;
  color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px;
  white-space: nowrap; transition: var(--transition); font-weight: 600;
}
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 700; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge.green { background: var(--green-bg); color: var(--green-text); }
.badge.red { background: var(--red-bg); color: var(--red-text); }
.badge.amber { background: var(--amber-bg); color: var(--amber-text); }
.badge.blue { background: var(--blue-bg); color: var(--blue-text); }
.badge.gray { background: #f1f5f9; color: #334155; }
.badge.purple { background: #f3e8ff; color: #7e22ce; }
.sidebar .badge { background: #ef4444; color: #ffffff; padding: 2px 7px; font-size: 11px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1.5px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.card.p0 {
  padding: 0; overflow-x: auto; overflow-y: auto; max-height: calc(100vh - 210px);
  overscroll-behavior: contain; position: relative; border-radius: var(--radius-lg); background: var(--surface);
}
.card.p0::-webkit-scrollbar { width: 6px; height: 6px; }
.card.p0::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.card.p0::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; }
table.t thead th {
  position: sticky; top: 0; z-index: 10;
  text-align: left; font-size: 12px; font-weight: 700; color: #334155; padding: 12px 16px;
  border-bottom: 2px solid var(--border); background: #f1f5f9; white-space: nowrap; text-transform: uppercase; letter-spacing: .04em;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
table.t td { padding: 12px 16px; border-bottom: 1px solid #e2e8f0; vertical-align: middle; transition: background 0.12s ease; font-size: 13.5px; color: #0f172a; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: #eff6ff; color: #1d4ed8; }
table.t tr.dim td { opacity: .6; }
table.t tfoot td { font-weight: 800; background: #f8fafc; border-top: 2px solid var(--border); color: #0f172a; }
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: #1f2a36; 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: #dfe4e9; 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: #e9edf1; }
.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%, #2b3746 0%, #1b232c 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 {
  /* Har sahifada hoshiya (2-sahifa ham qog'oz chetidan emas, 12 mm ichkaridan boshlanadi) */
  @page { size: A4; margin: 12mm 11mm 12mm 11mm; }
  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; padding: 0; }
  .print-hide-others > *:not(.print-area) { display: none !important; }
}

/* ================= POS ================= */
.pos-wrap {
  display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 16px;
  align-items: stretch; height: 100%; max-height: calc(100vh - 24px); overflow: hidden;
}
.pos-wrap > * { min-width: 0; }
.pos-left {
  height: 100%; display: flex; flex-direction: column; overflow: hidden; min-width: 0;
}
.pos-tools {
  flex-shrink: 0; background: var(--bg); padding: 0 0 10px; display: flex; flex-direction: column; gap: 8px; z-index: 10;
}
.pos-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.pos-btns .btn { padding: 7px 12px; }
.pos-grid {
  flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 6px 30px 2px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; align-content: start;
}
.pos-grid::-webkit-scrollbar { width: 6px; }
.pos-grid::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.pos-grid::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

.pos-tile {
  position: relative; background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 10px; cursor: pointer; user-select: none; transition: transform .12s, box-shadow .12s, border-color .12s;
  display: flex; flex-direction: column; gap: 3px; box-shadow: var(--shadow-sm);
}
.pos-tile:hover {
  transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #93c5fd;
}
.pos-tile:active { transform: scale(.98); }
.pos-tile.is-out {
  border-color: #fca5a5 !important;
  background: #fff8f8 !important;
}
.pos-tile.is-out:hover {
  border-color: #ef4444 !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15) !important;
}
.pos-tile.is-low {
  border-color: #fcd34d !important;
  background: #fffdf5 !important;
}
.pos-tile.is-low:hover {
  border-color: #f59e0b !important;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15) !important;
}
tr.row-out td { background-color: #fff8f8 !important; }
tr.row-out:hover td { background-color: #fee2e2 !important; }
tr.row-low td { background-color: #fffdf5 !important; }
tr.row-low:hover td { background-color: #fef3c7 !important; }
.pos-tile .img {
  aspect-ratio: 1.25; border-radius: var(--radius-sm); background: var(--surface-2);
  display: flex; align-items: center; justify-content: center; font-size: 36px;
  overflow: hidden; margin-bottom: 6px; transition: var(--transition); border: 1px solid var(--border);
}
.pos-tile:hover .img { background: #eff6ff; }
.pos-tile .img img { width: 100%; height: 100%; object-fit: cover; }
.pos-tile .nm {
  font-weight: 700; font-size: 13.5px; line-height: 1.35; color: var(--text);
  min-height: 2.7em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pos-tile .pr { font-size: 12px; color: var(--muted); }
.pos-tile .pr b { font-weight: 700; color: var(--text); }
.pos-tile .pr.sel {
  color: #1e40af; background: #eff6ff; border: 1px solid #dbeafe; border-radius: 6px;
  padding: 2px 6px; margin-top: 3px; font-weight: 600;
}
.pos-tile .pr.sel b { color: var(--primary); font-size: 13px; font-weight: 800; }
.pos-info {
  position: absolute; top: 12px; right: 14px; z-index: 2; width: 26px; height: 26px;
  border-radius: 50%; border: 1.5px solid var(--border); background: rgba(255,255,255,.95);
  font-weight: 700; font-style: italic; font-family: Georgia, serif; cursor: pointer;
  color: var(--primary); box-shadow: var(--shadow-sm); transition: var(--transition);
}
.pos-info:hover { background: #eff6ff; border-color: #93c5fd; transform: scale(1.08); }
.pos-in {
  position: absolute; top: 12px; left: 14px; z-index: 2; background: var(--primary);
  color: #fff; border-radius: 999px; font-size: 11.5px; font-weight: 800; padding: 2px 8px;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
}

.pos-cart {
  height: 100%; max-height: 100%; display: flex; flex-direction: column; overflow: hidden; padding: 0;
  position: relative; top: 0; background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.pos-cart-in { height: 100%; display: flex; flex-direction: column; overflow: hidden; }
.pos-sec { padding: 10px 14px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.pos-sec-client { flex-shrink: 0; background: var(--surface); }

/* Tanlangan tovarlar — maksimal maydon va erkin ko'rinish! */
.pos-cart-items {
  flex: 1; min-height: 220px; overflow-y: auto; overscroll-behavior: contain;
  padding: 8px 14px; background: var(--surface);
}
.pos-cart-items::-webkit-scrollbar { width: 5px; }
.pos-cart-items::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.pos-cart-items::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
.pos-items-head { padding-bottom: 6px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.line-nm { font-size: 13.5px; color: var(--text); line-height: 1.3; }
.pos-line { padding: 8px 0; border-bottom: 1px dashed var(--border); }
.pos-line:last-of-type { border-bottom: 0; }

/* Hisob-kitob bloki — pastga tushirilgan, ixcham va tartibli */
.pos-cart-checkout {
  flex-shrink: 0; padding: 8px 14px; background: #f8fafc;
  border-top: 1.5px solid var(--border);
}
.pos-sub-row { display: flex; gap: 8px; align-items: flex-end; }
.pos-sub-row .f { display: flex; flex-direction: column; gap: 2px; }
.chip.sm { padding: 4px 10px; font-size: 12px; }

.pos-actions {
  flex-shrink: 0; padding: 10px 14px; position: relative; bottom: auto;
  background: var(--surface); border-top: 1.5px solid var(--border);
}
.pos-go {
  width: 100%; padding: 13px 18px; font-size: 15.5px; font-weight: 700;
  background: var(--primary) !important; border: 1px solid var(--primary) !important;
  color: #ffffff !important; border-radius: var(--radius); cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35) !important; transition: var(--transition);
}
.pos-go:hover:not(:disabled) {
  background: var(--primary-hover) !important; border-color: var(--primary-hover) !important;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45) !important; transform: translateY(-1px);
}
.pos-go:active:not(:disabled) { transform: scale(0.99); }
.pos-go:disabled { opacity: .5; cursor: not-allowed; box-shadow: none !important; }

.stepper { display: flex; align-items: center; gap: 4px; }
.stepper input { width: 54px; text-align: center; padding: 6px 4px; font-weight: 700; }
.unit-toggle.sm button { padding: 5px 8px; font-size: 12px; font-weight: 600; }
.grow { flex: 1; min-width: 0; }

.pos-li {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius); margin-bottom: 8px; background: var(--surface); cursor: pointer;
  box-shadow: var(--shadow-sm); transition: var(--transition);
}
.pos-li:hover { border-color: #93c5fd; background: #eff6ff; }
.pos-li.dim { opacity: .55; }

.pos-drawer-bg { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); backdrop-filter: blur(2px); 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(15, 23, 42, .25); 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: 14px 16px; background: var(--surface); border-bottom: 1.5px solid var(--border);
}
.pos-drawer .ph .pt { flex: 1; min-width: 0; }
.pos-drawer .ph .pt .bold { font-size: 16px; font-weight: 800; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-drawer .pb { padding: 16px; }
.pos-drawer .pos-cart-in .pos-sec { padding-left: 0; padding-right: 0; }
.pos-drawer .pos-actions { margin: 0 -16px -16px; }

.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; font-weight: 700; cursor: pointer;
  box-shadow: 0 -6px 20px rgba(37, 99, 235, .25); border-top: 1px solid rgba(255, 255, 255, 0.2);
}

@media (max-width: 999px) {
  .pos-wrap {
    grid-template-columns: minmax(0, 1fr);
    height: auto; max-height: none; overflow: visible;
    padding-bottom: 70px;
  }
  .pos-left { height: auto; overflow: visible; }
  .pos-tools { position: sticky; top: 0; z-index: 10; }
  .pos-grid {
    overflow: visible; height: auto;
    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; padding: 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: #cfd7df; border-radius: 6px; padding: 5px 6px; font: inherit; font-size: 12px; cursor: pointer; }
.lang-sw button.on { background: linear-gradient(135deg, #eef1f4, #8e99a4); border-color: #aab3bc; color: #22303f; font-weight: 600; }
.login-wrap .lang-sw button { color: var(--text); border-color: var(--border); }
.login-wrap .lang-sw button.on { color: #22303f; }
.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); } }


/* ================= Dokon boshqaruvi — brend va zamonaviy uslub ================= */
.brand-logo { display: inline-flex; line-height: 0; }
.brand-logo svg { width: 100%; height: auto; display: block; }
.topbar .brand-logo { width: 34px; }
.topbar .t { color: #ffffff; font-size: 17px; font-weight: 600; }
.topbar button { color: #ffffff; }

/* Kirish sahifasi */
.login-wrap {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 24px; padding: 24px 16px; background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #172554 100%);
}
.login-wrap .login-logo { width: 230px; filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.3)); }
.login-wrap .card {
  background: #ffffff; border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35); border-radius: 16px; padding: 28px 26px;
}
.login-wrap .card h2 { text-align: center; color: var(--text); margin-bottom: 20px; font-size: 20px; }
.login-wrap .btn.primary { padding: 11px; font-size: 15px; font-weight: 600; border-radius: 8px; }
.login-wrap .lang-sw { padding: 0; }
.login-foot { color: #64748b; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 500; }

/* Hujjatlar: logotip */
.doc .head-row .doc-logo { width: 210px; }
.sidebar nav .ico { width: 20px; height: 20px; display: inline-flex; color: #94a3b8; }
.sidebar nav .ico svg { width: 19px; height: 19px; }
.sidebar nav a.active .ico { color: #ffffff; }
.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: var(--amber); }
.chip.active .dot { box-shadow: 0 0 0 2px rgba(255,255,255,.25); }

/* 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: #eff6ff; border: 1.5px solid #bfdbfe; color: #1e40af; border-radius: var(--radius-sm); padding: 10px 14px; text-decoration: none !important; font-weight: 500; }
.notice-gold b { color: #1d4ed8; }
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, #0f172a, #1e293b); color: #f8fafc; border-radius: 14px; padding: 14px 16px; border: 1px solid #334155; box-shadow: var(--shadow); }
.reg-cash .muted { color: #94a3b8; }
.reg-cash .v { font-family: var(--serif); font-size: 30px; font-weight: 800; color: #ffffff; }
.reg-cash small { font-family: Inter, sans-serif; font-size: 13px; color: #cbd5e1; }
.pos-reg { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.pos-reg select { padding: 6px 10px; font-weight: 600; border-color: var(--border); background: var(--surface); }
@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: var(--gold); white-space: nowrap; font-size: 13px; }
.stars-v { color: var(--gold); font-weight: 700; }
.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: var(--gold); letter-spacing: 1px; margin-left: auto; white-space: nowrap; font-size: 14px; }
.review-card .rc-text { margin-top: 6px; white-space: pre-line; line-height: 1.5; overflow-wrap: anywhere; color: var(--text-body); }
.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; }
}

/* ---- Telegram (admin bot) ulanish ---- */
.tg-box .note { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.tg-box .row.wrap { flex-wrap: wrap; }
.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: 2px 10px; margin: 1px 3px 1px 0; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; line-height: 1.6; font-weight: 500; }
.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; border-radius: 6px; }
.color-sel.need { border-color: var(--amber); }
.amber-t { color: #b45309; }
.new-version { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 1000; background: var(--primary); color: #fff; padding: 8px 10px 8px 16px; border-radius: 12px; box-shadow: 0 6px 24px rgba(0,0,0,.25); display: flex; align-items: center; gap: 12px; font-size: 14px; }
.new-version .btn { background: #fff; color: var(--primary); border-color: #fff; }
@media print { .new-version { display: none !important; } }

/* 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; }

/* Telefonda PDF yaratish */
body.pdf-render .print-portal { display: block; position: fixed; left: -10000px; top: 0; width: 210mm; background: #fff; }

html { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (pointer: coarse) {
  input, select, textarea { font-size: 16px !important; }
}

/* PDF tayyor oynasi */
.pdf-sheet-bg { position: fixed; inset: 0; z-index: 2000; background: rgba(15,23,42,.45); display: flex; align-items: flex-end; justify-content: center; }
.pdf-sheet { width: 100%; max-width: 520px; background: var(--surface); border-radius: 18px 18px 0 0; padding: 14px 16px calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; }
.pdf-sheet .ps-head { display: flex; align-items: center; gap: 8px; } .pdf-sheet .ps-head b { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-sheet .ps-big { width: 100%; padding: 14px; font-size: 16px; display: flex; flex-direction: column; gap: 2px; }
.pdf-sheet .ps-big small { font-size: 12px; font-weight: 400; opacity: .8; }
.pdf-sheet .ps-wait { padding: 22px 0; text-align: center; color: var(--muted); }
.spin { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media print { .pdf-sheet-bg { display: none !important; } }

/* Hujjat sahifalari */
.doc .page-break { page-break-before: always; break-before: page; height: 0; }
@media screen {
  .doc:not(.pdf-mode) .page-break { height: 34px; margin: 16mm -12mm 14mm; background: var(--bg); box-shadow: inset 0 8px 10px -8px rgba(0,0,0,.18), inset 0 -8px 10px -8px rgba(0,0,0,.18);
    display: flex; align-items: center; justify-content: center; }
  .doc:not(.pdf-mode) .page-break span { font: 600 11px Inter, sans-serif; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
}
.doc .page-break span { display: none; }
@media screen { .doc:not(.pdf-mode) .page-break span { display: inline; } }
.doc table.items { table-layout: fixed; }
.doc table.items td { overflow-wrap: anywhere; }
.doc table.items tr { page-break-inside: avoid; break-inside: avoid; }
.doc table.items thead { display: table-header-group; }
.doc .words, .doc table.bal, .doc .signs { page-break-inside: avoid; break-inside: avoid; }

/* POS: matnlar aniq, saralangan va o'qishga oson ierarxiya */
.pos-wrap .small.muted { color: var(--muted); font-size: 12px; font-weight: 500; }
.pos-wrap .grow .bold { font-weight: 700; font-size: 14px; color: var(--text); }
.pos-wrap b.nowrap { font-size: 14.5px; font-weight: 800; color: var(--text); }

@media (max-width: 700px) { table.rt td.m-hide { display: none; } }

.doc.pdf-mode { padding: 0; width: 188mm; min-height: auto; box-shadow: none; }
.doc table.items th, .doc table.items td { padding: 3px 5px; line-height: 1.25; }
.doc table.items th.chk-h { padding: 3px 0; font-size: 11px; }
.doc table.items td.chk { padding: 2px 0; text-align: center; }

/* ===== B2C mijoz baza rejimi ===== */
.nav-switch { margin-top: 10px; border-top: 1px solid rgba(255,255,255,.08); padding-top: 12px !important; color: #93c5fd !important; font-weight: 600; }
.mode-tag { margin: -4px 18px 10px; padding: 6px 10px; border-radius: 8px; background: #2563eb; color: #fff; font-weight: 700; font-size: 13px; text-align: center; letter-spacing: .02em; }
.mode-pill { display: inline-block; background: #2563eb; color: #fff; border-radius: 6px; padding: 1px 7px; font-size: 12px; margin-right: 6px; vertical-align: 2px; }
body.mode-b2c .sidebar { background: #0f172a; }
body.mode-b2c .topbar { background: #0f172a; }
body.mode-b2c .page-head h1::before { content: 'B2C · '; color: #2563eb; }

/* B2C: mahsulotlar ro'yxatida dona narxini qo'lda kiritish */
.retail-in { width: 130px; text-align: right; font-weight: 600; padding: 6px 8px; }
@media (max-width: 760px) { .retail-in { width: 100%; } }
.retail-cell { display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; }
.retail-ok { color: var(--green); font-weight: 700; opacity: 0; transition: opacity .2s; }
.retail-ok.on { opacity: 1; }

/* ---------- Valyuta (so'm / dollar) ---------- */
.cur-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cur-bar .chips { margin: 0; }
.cur-rate { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.cur-rate input { width: 120px; text-align: right; font-weight: 600; }
.stat .v2 { font-size: 15px; font-weight: 700; margin-top: 2px; }
.stat.usd { border-left: 3px solid var(--green); }
.chip-sep { width: 1px; align-self: stretch; background: var(--border); margin: 0 6px; }
.rate-card { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 16px; }
.rate-card input { text-align: right; font-weight: 600; }
@media (max-width: 760px) { .cur-rate input { width: 100px; } }
