/* Savdobek nazorat paneli — kutubxonasiz. Ranglar kassa dasturi bilan bir xil (src/index.css: --brand 20 117 87). */
:root {
  --bg: #f3f5f9;
  --surface: #ffffff;
  --surface2: #f1f4f8;
  --line: #e2e8f0;
  --ink: #0f172a;
  --muted: #64748b;
  --brand: #147557;
  --brand-hover: #0e5e46;
  --brand-soft: #e2f0e8;
  --brand-deep: #0e4d3a;
  --danger: #c2410c;
  --danger-soft: #fdeee6;
  --warn: #a16207;
  --warn-soft: #fdf6dc;
  --info: #1d4ed8;
  --info-soft: #e5edfd;
  --ok: #15803d;
  --ok-soft: #e3f4e8;
  --shadow: 0 1px 2px rgb(15 23 42 / 0.05), 0 4px 16px rgb(15 23 42 / 0.05);
  --radius: 14px;
  --side: 248px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #090d14;
    --surface: #121823;
    --surface2: #1b2331;
    --line: #283242;
    --ink: #ecf1f7;
    --muted: #94a3b8;
    --brand: #1a8764;
    --brand-hover: #22a077;
    --brand-soft: #0e2821;
    --danger: #fb923c;
    --danger-soft: #3a1d10;
    --warn: #facc15;
    --warn-soft: #33290a;
    --info: #93b4fb;
    --info-soft: #17223d;
    --ok: #4ade80;
    --ok-soft: #10291a;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #090d14;
  --surface: #121823;
  --surface2: #1b2331;
  --line: #283242;
  --ink: #ecf1f7;
  --muted: #94a3b8;
  --brand: #1a8764;
  --brand-hover: #22a077;
  --brand-soft: #0e2821;
  --danger: #fb923c;
  --danger-soft: #3a1d10;
  --warn: #facc15;
  --warn-soft: #33290a;
  --info: #93b4fb;
  --info-soft: #17223d;
  --ok: #4ade80;
  --ok-soft: #10291a;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--brand);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
h1,
h2,
h3 {
  margin: 0;
  line-height: 1.25;
}
h1 {
  font-size: 22px;
  font-weight: 700;
}
h2 {
  font-size: 16px;
  font-weight: 650;
}
h3 {
  font-size: 14px;
  font-weight: 650;
}
code,
.mono {
  font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  font-size: 12.5px;
}
.i {
  width: 18px;
  height: 18px;
  flex: none;
}
[hidden] {
  display: none !important;
}

/* ---------- Karkas: yon menyu + kontent ---------- */
.shell {
  display: grid;
  grid-template-columns: var(--side) 1fr;
  min-height: 100vh;
}
.side {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 16px 12px;
  gap: 4px;
  overflow-y: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 16px;
}
.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}
.brand b {
  display: block;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.brand span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.nav-sec {
  margin: 12px 10px 4px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--ink);
  font-weight: 520;
}
.nav a:hover {
  background: var(--surface2);
  text-decoration: none;
}
.nav a.on {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 650;
}
.nav a .count {
  margin-left: auto;
  min-width: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  text-align: center;
  line-height: 20px;
}
.side-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.who {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
  flex: none;
}
.who .nm {
  font-weight: 600;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.who .rl {
  color: var(--muted);
  font-size: 12px;
}
.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
}
.top .crumbs {
  min-width: 0;
  flex: 1;
}
.top .crumbs .sub {
  color: var(--muted);
  font-size: 13px;
}
.top-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.content {
  padding: 8px 28px 40px;
  max-width: 1400px;
  width: 100%;
}
.menu-btn,
.bottom {
  display: none;
}

/* ---------- Kartalar, tugmalar ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  min-width: 0;
}
.card + .card,
.stack > * + * {
  margin-top: 16px;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.card-head .sub,
.muted {
  color: var(--muted);
}
.small {
  font-size: 12.5px;
}
.strong {
  font-weight: 650;
}
.right {
  text-align: right;
}
.nowrap {
  white-space: nowrap;
}
.grid {
  display: grid;
  gap: 16px;
}
.g2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.g3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.g-main {
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none !important;
}
.btn:hover {
  background: var(--surface2);
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.btn-primary:hover {
  background: var(--brand-hover);
}
.btn-danger {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 35%, var(--line));
}
.btn-danger:hover {
  background: var(--danger-soft);
}
.btn-danger.solid {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}
.btn-ghost {
  border-color: transparent;
  background: transparent;
}
.btn-sm {
  height: 32px;
  padding: 0 10px;
  font-size: 13px;
  border-radius: 8px;
}
.icon-btn {
  width: 38px;
  padding: 0;
}
.btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* ---------- KPI ---------- */
.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.kpi {
  display: block;
  color: inherit;
  text-decoration: none !important;
  position: relative;
  overflow: hidden;
}
a.kpi:hover {
  border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
}
.kpi .lbl {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 560;
  font-size: 13px;
}
.kpi .lbl .i {
  color: var(--brand);
}
.kpi .val {
  font-size: 30px;
  font-weight: 750;
  letter-spacing: -0.02em;
  margin-top: 6px;
  line-height: 1.1;
}
.kpi .hint {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 4px;
}
.kpi.warn .val {
  color: var(--warn);
}
.kpi.danger .val {
  color: var(--danger);
}

/* ---------- Belgilar ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  background: var(--surface2);
  color: var(--muted);
}
.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.b-active,
.b-ok {
  background: var(--ok-soft);
  color: var(--ok);
}
.b-trial,
.b-info {
  background: var(--info-soft);
  color: var(--info);
}
.b-overdue,
.b-warn {
  background: var(--warn-soft);
  color: var(--warn);
}
.b-blocked,
.b-danger {
  background: var(--danger-soft);
  color: var(--danger);
}
.tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 6px;
  background: var(--surface2);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 560;
  white-space: nowrap;
}
.tag-brand {
  background: var(--brand-soft);
  border-color: transparent;
  color: var(--brand);
}
.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
  margin-right: 6px;
  vertical-align: 1px;
}
.dot.on {
  background: var(--ok);
  box-shadow: 0 0 0 3px var(--ok-soft);
}
.dot.mid {
  background: var(--warn);
}
.t-danger {
  color: var(--danger);
}
.t-warn {
  color: var(--warn);
}
.t-ok {
  color: var(--ok);
}

/* ---------- Jadvallar (telefonda kartalar) ---------- */
.table-wrap {
  overflow-x: auto;
  margin: 0 -18px;
}
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th {
  text-align: left;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.table th:first-child,
.table td:first-child {
  padding-left: 18px;
}
.table th:last-child,
.table td:last-child {
  padding-right: 18px;
}
.table tr:last-child td {
  border-bottom: 0;
}
.table tbody tr.link {
  cursor: pointer;
}
.table tbody tr.link:hover td {
  background: var(--surface2);
}
.table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.table tr.off td {
  opacity: 0.55;
}
.cell-main {
  font-weight: 620;
}
.cell-sub {
  color: var(--muted);
  font-size: 12.5px;
}

/* ---------- Filtrlar ---------- */
.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 14px;
}
.search {
  position: relative;
  flex: 1 1 260px;
  min-width: 200px;
}
.search .i {
  position: absolute;
  left: 11px;
  top: 10px;
  color: var(--muted);
}
.search input {
  padding-left: 36px;
}
input,
select,
textarea {
  width: 100%;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
textarea {
  height: auto;
  min-height: 84px;
  padding: 9px 11px;
  resize: vertical;
}
input:focus,
select:focus,
textarea:focus,
.btn:focus-visible,
.nav a:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--brand) 55%, transparent);
  outline-offset: 1px;
  border-color: var(--brand);
}
.toolbar select {
  width: auto;
  min-width: 140px;
}
.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.chip {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 560;
  cursor: pointer;
}
.chip b {
  color: var(--muted);
  font-weight: 600;
  margin-left: 4px;
}
.chip.on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.chip.on b {
  color: #fff;
  opacity: 0.85;
}

/* ---------- Formalar va oynalar ---------- */
.field {
  display: block;
  margin-bottom: 12px;
}
.field > span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 5px;
}
.field .hint {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}
.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.check {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin: 8px 0;
  cursor: pointer;
}
.check input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  flex: none;
  accent-color: var(--brand);
}
.modal-back {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgb(15 23 42 / 0.45);
  display: grid;
  place-items: center;
  padding: 16px;
  animation: fade 0.12s ease;
}
.modal {
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgb(0 0 0 / 0.25);
  border: 1px solid var(--line);
}
.modal.wide {
  max-width: 820px;
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 6px;
}
.modal-head .sub {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}
.modal-body {
  padding: 12px 20px;
  overflow-y: auto;
}
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px 18px;
  flex-wrap: wrap;
}
.form-error {
  color: var(--danger);
  font-weight: 600;
  padding: 0 20px;
}
.form-error:empty {
  display: none;
}
.alert {
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--info-soft);
  color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--info) 25%, transparent);
  margin-bottom: 12px;
}
.alert-warn {
  background: var(--warn-soft);
  border-color: color-mix(in srgb, var(--warn) 30%, transparent);
}
.alert-danger {
  background: var(--danger-soft);
  border-color: color-mix(in srgb, var(--danger) 30%, transparent);
}
.key-box {
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 8px 8px 12px;
}
.key-box code {
  flex: 1;
  word-break: break-all;
  font-size: 13px;
}
.qr {
  display: block;
  width: 220px;
  max-width: 100%;
  margin: 8px auto;
  background: #fff;
  border-radius: 10px;
  padding: 6px;
}

/* ---------- Toast ---------- */
#toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  min-width: 240px;
  max-width: 380px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--surface);
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.2);
  font-weight: 560;
  animation: up 0.18s ease;
}
.toast-err {
  background: var(--danger);
  color: #fff;
}
@keyframes up {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
}

/* ---------- Bo'sh holat, yuklanish ---------- */
.empty {
  text-align: center;
  padding: 40px 16px;
  color: var(--muted);
}
.empty .ic {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
}
.empty .ic .i {
  width: 26px;
  height: 26px;
}
.empty b {
  display: block;
  color: var(--ink);
  font-size: 15px;
  margin-bottom: 4px;
}
.empty .btn {
  margin-top: 14px;
}
.loading {
  display: grid;
  place-items: center;
  padding: 60px;
}
.spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--brand);
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Ro'yxatlar, grafiklar ---------- */
.bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bar-row {
  display: grid;
  grid-template-columns: minmax(90px, 160px) 1fr 54px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}
.bar {
  height: 10px;
  border-radius: 6px;
  background: var(--surface2);
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: var(--brand);
  min-width: 3px;
}
.bar-row .n {
  text-align: right;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.feed {
  display: flex;
  flex-direction: column;
}
.feed-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.feed-item:last-child {
  border-bottom: 0;
}
.feed-ic {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--surface2);
  color: var(--muted);
}
.feed-ic .i {
  width: 16px;
  height: 16px;
}
.feed-ic.g {
  background: var(--brand-soft);
  color: var(--brand);
}
.feed-ic.r {
  background: var(--danger-soft);
  color: var(--danger);
}
.feed-body {
  min-width: 0;
  flex: 1;
}
.feed-body .t {
  font-weight: 580;
}
.feed-body .d {
  color: var(--muted);
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kv {
  display: grid;
  grid-template-columns: minmax(120px, 38%) 1fr;
  gap: 8px 14px;
  margin: 0;
}
.kv dt {
  color: var(--muted);
}
.kv dd {
  margin: 0;
  font-weight: 560;
  min-width: 0;
  overflow-wrap: anywhere;
}
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tab {
  padding: 10px 14px;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.tab.on {
  color: var(--brand);
  border-bottom-color: var(--brand);
}
.hero {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.hero .ttl {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
}
.shop-ic {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 750;
  flex: none;
}
.big-key {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  gap: 8px;
}

/* ---------- Kirish ekrani ---------- */
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}
.auth-art {
  background: linear-gradient(150deg, var(--brand) 0%, var(--brand-deep) 100%);
  color: #fff;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.auth-art .brand b,
.auth-art .brand span {
  color: #fff;
}
.auth-art h2 {
  font-size: 30px;
  line-height: 1.2;
  font-weight: 750;
  max-width: 440px;
}
.auth-art ul {
  padding: 0;
  list-style: none;
  margin: 22px 0 0;
  display: grid;
  gap: 10px;
  opacity: 0.92;
}
.auth-art li::before {
  content: '✓';
  margin-right: 10px;
  font-weight: 700;
}
.auth-form {
  display: grid;
  place-items: center;
  padding: 32px 20px;
}
.auth-box {
  width: 100%;
  max-width: 380px;
}
.auth-box h1 {
  margin-bottom: 6px;
}
.auth-box .btn {
  width: 100%;
  height: 44px;
  margin-top: 6px;
}
.pw {
  position: relative;
}
.pw input {
  padding-right: 44px;
}
.pw button {
  position: absolute;
  right: 3px;
  top: 3px;
  height: 32px;
  width: 38px;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  border-radius: 8px;
}

/* Sotuvchi sozlamalari muharriri (cloud/admin/vendor-ui.js) */
.v-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.v-field span,
.v-sub {
  display: block;
  font-weight: 650;
  font-size: 13px;
  margin-bottom: 5px;
}
.v-sub {
  margin: 18px 0 8px;
}
.v-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.v-flags label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.v-flags select,
.v-flags input {
  width: auto;
  height: 32px;
}
.v-feats label {
  flex: 1 1 260px;
  justify-content: space-between;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.v-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.v-row {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.v-label {
  font-weight: 600;
  font-size: 13px;
}
.v-lock {
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}
.v-lock input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}
.v-sum {
  width: 100%;
  border-collapse: collapse;
}
.v-sum td {
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.v-sum td:first-child {
  color: var(--muted);
  width: 40%;
  padding-right: 12px;
}

/* ---------- Planshet va telefon ---------- */
@media (max-width: 1180px) {
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .g-main,
  .g3 {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 860px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .side {
    position: fixed;
    z-index: 90;
    left: 0;
    top: 0;
    width: 280px;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: 0 0 40px rgb(0 0 0 / 0.2);
  }
  .shell.drawer .side {
    transform: none;
  }
  .shell.drawer::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgb(15 23 42 / 0.4);
  }
  .menu-btn {
    display: inline-flex;
  }
  .top {
    padding: 10px 16px;
  }
  .top h1 {
    font-size: 18px;
  }
  .top .crumbs .sub {
    display: none;
  }
  .content {
    padding: 4px 16px 92px;
  }
  .bottom {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    z-index: 70;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom a,
  .bottom button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font: inherit;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    background: none;
    border: 0;
    padding: 4px 0;
    text-decoration: none !important;
    cursor: pointer;
  }
  .bottom .on {
    color: var(--brand);
  }
  .bottom .i {
    width: 22px;
    height: 22px;
  }
  #toasts {
    left: 16px;
    right: 16px;
    bottom: 84px;
  }
  .toast {
    max-width: none;
  }
  .auth {
    grid-template-columns: 1fr;
  }
  .auth-art {
    padding: 28px 20px 24px;
  }
  .auth-art h2 {
    font-size: 22px;
  }
  .auth-art ul,
  .auth-art .foot {
    display: none;
  }
  .g2,
  .row2,
  .v-grid {
    grid-template-columns: 1fr;
  }
  .v-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .top-actions .lbl-hide {
    display: none;
  }
}
@media (max-width: 640px) {
  .kpis {
    gap: 10px;
  }
  .card {
    padding: 14px;
  }
  .kpi .val {
    font-size: 24px;
  }
  .table-wrap {
    margin: 0;
    overflow: visible;
  }
  .table.cards thead {
    display: none;
  }
  .table.cards,
  .table.cards tbody,
  .table.cards tr,
  .table.cards td {
    display: block;
    width: 100%;
  }
  .table.cards tr {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 10px;
    background: var(--surface);
  }
  .table.cards td {
    border: 0;
    padding: 3px 0 !important;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    text-align: right;
  }
  .table.cards td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12.5px;
    text-align: left;
    flex: none;
  }
  .table.cards td.lead {
    display: block;
    text-align: left;
    padding-bottom: 6px !important;
  }
  .table.cards td.lead::before,
  .table.cards td.act::before {
    display: none;
  }
  .table.cards td.act {
    justify-content: flex-end;
    padding-top: 8px !important;
  }
  .table.cards .num {
    text-align: right;
  }
  .modal-back {
    align-items: end;
    padding: 0;
  }
  .modal {
    border-radius: 18px 18px 0 0;
    max-height: 92vh;
  }
  .bar-row {
    grid-template-columns: 100px 1fr 40px;
  }
  .kv {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .kv dd {
    margin-bottom: 8px;
  }
}

/* Yordamchi klasslar (CSP: inline style ishlatilmaydi) */
.u-x1 {
  opacity:.8;
}
.u-x2 {
  margin:0 0 20px;
}
.u-p0 {
  padding:0;
}
.u-mt18 {
  margin-top:18px;
}
.u-x3 {
  margin:0 0 16px;
}
.u-minw0 {
  min-width:0;
}
.u-x4 {
  padding:4px 8px;
}
.u-x5 {
  min-height:100vh;
}
.u-x6 {
  margin:0 0 8px;
}
.u-x7 {
  background:var(--danger-soft);
  color:var(--danger);
}
.u-x8 {
  margin:10px 0 4px;
}
.u-x9 {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.u-mt10 {
  margin-top:10px;
}
.u-mb14 {
  margin-bottom:14px;
}
.u-mt12 {
  margin-top:12px;
}
.u-mt6 {
  margin-top:6px;
}
.u-jend {
  justify-content:flex-end;
}
.u-hrow {
  display:flex;
  gap:10px;
  align-items:center;
}
.u-mb16 {
  margin-bottom:16px;
}
.u-mt4 {
  margin-top:4px;
}
.u-x10 {
  margin:14px 0 0;
}
.u-x11 {
  margin:0;
  max-width:220px;
}
.u-mt14 {
  margin-top:14px;
}
.u-x12 {
  display:inline-flex;
  align-items:center;
  text-decoration:none;
}
.u-x13 {
  width:auto;
  height:32px;
}
.u-mb10 {
  margin-bottom:10px;
}
.u-x14 {
  max-height:50vh;
  overflow:auto;
}
.u-wauto {
  width:auto;
}
.u-x15 {
  padding:0 0 8px;
}
.u-mt8 {
  margin-top:8px;
}
.u-x16 {
  gap:8px;
}
.u-x17 {
  font-size:19px;
}
.u-x18 {
  margin:6px 0 14px;
}
.u-x19 {
  margin:18px 0 8px;
}
.u-center {
  text-align:center;
}
.u-mt16 {
  margin-top:16px;
}
.u-mt0 {
  margin-top:0;
}
.u-x20 {
  margin:6px 0;
}
.bar i.warn {
  background: var(--warn);
}
.kpis > .card,
.grid > .card {
  margin-top: 0;
}
.key-box .big-key {
  font-size: 17px;
}
.flt-btn {
  display: none;
}
@media (max-width: 640px) {
  .table.cards td.ph-hide {
    display: none;
  }
  .card:has(> .table-wrap > .table.cards),
  .card:has(> .toolbar) {
    background: none;
    border: 0;
    box-shadow: none;
    padding: 0;
  }
  .flt-btn {
    display: inline-flex;
  }
  .toolbar .search {
    flex: 1 1 0;
    min-width: 0;
  }
  .toolbar select,
  .toolbar input[type='date'] {
    display: none;
  }
  .toolbar.open select,
  .toolbar.open input[type='date'] {
    display: block;
    flex: 1 1 45%;
  }
}
.grid {
  align-items: start;
}
.v-row {
  grid-template-columns: minmax(150px, 230px) minmax(0, 1fr) auto;
}
.v-ctl .v-flags label {
  white-space: nowrap;
}
.v-ctl input[type='text'] {
  max-width: 420px;
}
.v-ctl > select {
  max-width: 320px;
}
@media (min-width: 641px) {
  .table td.act .btn-row {
    flex-wrap: nowrap;
    justify-content: flex-end;
  }
}
