/* Admin panel — kassa terminali bilan bir xil POS uslubi (iiko Office kabi): to'q ko'k, tekis, aniq; telefonda qulay */
:root {
  color-scheme: dark;
  /* POS uslubi (kassa terminali bilan bir xil): to'q ko'k fon, tekis kartalar, ko'k asosiy rang */
  --bg: #0f1b2d;
  --surface: #16263d;
  --surface-2: #1e3352;
  --ink: #e8eef7;
  --muted: #8fa3bf;
  --line: #2a4468;
  --cobalt: #2a72e0;      /* asosiy (ko'k), oq yozuv bilan 4.6:1 */
  --cobalt-hi: #3b82ea;
  --cobalt-ink: #ffffff;
  --accent-rgb: 42 114 224;
  --ishkor: #2fbf6c;      /* yashil — tayyor, yoqilgan (yozuv/belgi rangi) */
  --anor: #ff7b7b;        /* qizil yozuv; to'ldirilgan tugma — #cf3f3f */
  --warn: #f2994a;
  --amber: #8ec5ff;       /* havola va urg'u */
  --focus: #56ccf2;
  --gold-grad: linear-gradient(180deg, #3b82ea 0%, #2a72e0 100%);
  --bar-bg: #0b1524;      /* yuqori panel va menyu */
  --radius: 12px;
  --display: 'Golos Text', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --body: 'Golos Text', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --topbar-h: 60px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
h1 { font: 700 clamp(1.7rem, 4vw, 2.3rem)/1.15 var(--display); }
h2 { font: 700 1.3rem/1.2 var(--display); }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0; }
a { color: var(--amber); }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
h1:focus { outline: none; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.f-cobalt { fill: #1c3e94; } .f-plate { fill: #f8faf7; } .f-ishkor { fill: #17837f; }

/* ── tugmalar ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 20px; border-radius: 999px;
  border: 2px solid var(--cobalt); background: var(--cobalt); color: var(--cobalt-ink);
  font: 600 15px/1 var(--body); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn-ghost { background: transparent; color: var(--cobalt); }
.btn-ghost:hover { background: color-mix(in srgb, var(--cobalt) 10%, transparent); filter: none; }
.btn-text { background: transparent; border-color: transparent; color: var(--cobalt); padding: 0 10px; }
.btn-text:hover { background: color-mix(in srgb, var(--cobalt) 8%, transparent); filter: none; }
.btn-small { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn-block { width: 100%; }
.danger, .btn.danger { color: var(--anor); }
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface);
  color: var(--ink); font: 600 16px/1 var(--body); cursor: pointer;
}
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn.danger { color: var(--anor); }

/* ── kirish ekranlari ── */
.gate { min-height: 100svh; display: grid; place-items: center; padding: 24px 16px; }
.gate-card {
  width: min(100%, 400px); display: grid; gap: 16px; padding: 32px 28px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
}
.gate-card h1 { font-size: 1.8rem; }
.gate-mark { width: 44px; height: 44px; }
.gate-or { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--muted); font-size: 14px; }
.gate-or::before, .gate-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ── karkas ── */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); grid-template-rows: var(--topbar-h) 1fr; min-height: 100svh; }
.topbar {
  grid-column: 1 / -1; position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 20px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 800 1.2rem/1 var(--display); white-space: nowrap; }
.brand-mark { width: 28px; height: 28px; }
.topbar-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.me { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.side-nav {
  position: sticky; top: var(--topbar-h); align-self: start; height: calc(100svh - var(--topbar-h));
  display: flex; flex-direction: column; gap: 2px; padding: 16px 12px; border-right: 1px solid var(--line); overflow-y: auto;
}
.side-nav a { padding: 10px 14px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 500; }
.side-nav a:hover { background: var(--surface-2); }
.side-nav a[aria-current="page"] { background: var(--cobalt); color: var(--cobalt-ink); }
.content { padding: 28px clamp(16px, 3vw, 40px) 120px; max-width: 1040px; width: 100%; }
.loading { padding: 40px 0; }

.page { display: grid; gap: 22px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.page-head p { margin-top: 6px; max-width: 60ch; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.stack { display: grid; gap: 18px; }
.stack-sm { display: grid; gap: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row > input { flex: 1 1 200px; }
.align-end { align-items: flex-end; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.gap-lg { gap: 18px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 16px; align-content: start; }
.card-desc { margin-top: -8px; max-width: 70ch; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.error-card { border-color: var(--anor); }

/* ── maydonlar ── */
.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .field-label { font-weight: 600; font-size: 14px; }
.hint { color: var(--muted); font-size: 13px; }
input:not([type=checkbox]):not([type=file]), textarea, select {
  width: 100%; min-height: 44px; padding: 10px 14px; border-radius: 10px;
  border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; font-size: 16px;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cobalt) 22%, transparent); }
.form-error { color: var(--anor); font-weight: 600; font-size: 14px; }
.ok-text { color: var(--ishkor); font-weight: 600; }

.toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; font-size: 14px; min-height: 36px; }
.switch { appearance: none; width: 40px; height: 24px; border-radius: 99px; background: var(--line); position: relative; cursor: pointer; flex: none; margin: 0; transition: background .15s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch:checked { background: var(--ishkor); }
.switch:checked::after { transform: translateX(16px); }

.secret-status { font-size: 14px; }
.secret-status.is-set { color: var(--ishkor); font-weight: 600; }
.secret-status.is-empty { color: var(--muted); }
.advanced summary, details > summary { cursor: pointer; color: var(--cobalt); font-weight: 600; padding: 4px 0; }
.advanced[open] summary { margin-bottom: 12px; }

.image-field { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.image-preview { width: 132px; height: 100px; border-radius: 12px; border: 1.5px dashed var(--line); display: grid; place-items: center; overflow: hidden; background: var(--bg); flex: none; font-size: 13px; }
.image-preview img { width: 100%; height: 100%; object-fit: contain; }
.image-controls { display: grid; gap: 8px; flex: 1 1 220px; }

.chips-edit { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.chips-edit:empty { display: none; }
.chips-edit li { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 12px; border-radius: 99px; background: var(--surface-2); font-size: 14px; font-weight: 500; }
.chip-x { width: 26px; height: 26px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); font-size: 18px; cursor: pointer; }
.chip-x:hover { background: var(--line); color: var(--ink); }

.list-rows { display: grid; gap: 10px; }
.list-row { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 14px; background: var(--bg); display: grid; gap: 10px; }
.list-row-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.list-row-title { font-weight: 600; font-size: 14px; color: var(--muted); }

.save-bar {
  position: sticky; bottom: 0; z-index: 10; margin: 0 -8px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 -6px 18px rgb(21 38 45 / .08);
}
.save-status { color: var(--muted); font-size: 14px; }
.save-bar.is-dirty { border-color: var(--cobalt); }
.save-bar.is-dirty .save-status { color: var(--cobalt); font-weight: 600; }
.sticky-actions { position: sticky; bottom: 0; padding: 12px 0; background: var(--bg); }

/* ── bosh panel ── */
.status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.status { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.status:hover { border-color: var(--cobalt); }
.status-dot { width: 12px; height: 12px; border-radius: 50%; grid-row: span 2; }
.status.is-ok .status-dot { background: var(--ishkor); }
.status.is-bad .status-dot { background: var(--anor); }
.status-label { font-weight: 600; }
.status-text { color: var(--muted); font-size: 14px; }
.status.is-bad .status-text { color: var(--anor); }
.big-number { font: 800 3rem/1 var(--display); color: var(--cobalt); }
.menu-state { display: grid; gap: 4px; }
.steps { margin: 0; padding-left: 22px; display: grid; gap: 8px; }

/* ── test natijalari ── */
.test-result:empty { display: none; }
.test-result { display: grid; gap: 10px; padding: 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.table th { color: var(--muted); font-weight: 600; }
pre { margin: 8px 0 0; padding: 12px; max-height: 320px; overflow: auto; border-radius: 10px; background: var(--surface-2); font-size: 12.5px; white-space: pre-wrap; word-break: break-word; }
.reply { margin: 0; padding: 12px 14px; border-left: 3px solid var(--ishkor); background: var(--surface); white-space: pre-wrap; }
.chat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.chat-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ── ro'yxatlar ── */
.item-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.item { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.item-thumb { width: 84px; height: 64px; border-radius: 10px; object-fit: cover; background: var(--surface-2); }
.item-main { display: grid; gap: 4px; min-width: 0; }
.item-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 13px; }
.item-actions { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; }
.chip { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); }
.chip.is-ok { background: color-mix(in srgb, var(--ishkor) 16%, transparent); color: var(--ishkor); }
.chip.is-warn { background: color-mix(in srgb, var(--amber) 16%, transparent); color: var(--amber); }
.empty { padding: 20px 0; color: var(--muted); }

.section-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: sec; }
.section-row { border: 1px solid var(--line); border-radius: 12px; background: var(--bg); padding: 12px 14px; display: grid; gap: 8px; }
.section-row-head { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px 16px; }
.section-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.section-title strong { overflow-wrap: anywhere; }
.section-toggles { gap: 14px; }
.section-body > summary { font-size: 14px; }
.section-editor { padding-top: 12px; }

.filter-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.filter-chips button { flex: none; min-height: 36px; padding: 0 14px; border-radius: 99px; border: 1.5px solid var(--line); background: transparent; color: var(--ink); font: 500 14px/1 var(--body); cursor: pointer; }
.filter-chips button[aria-pressed="true"] { background: var(--cobalt); border-color: var(--cobalt); color: var(--cobalt-ink); }
.complaint-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.complaint { display: grid; gap: 10px; padding: 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); border-left: 4px solid var(--line); }
.complaint.is-yangi { border-left-color: var(--anor); }
.complaint.is-jarayonda { border-left-color: var(--amber); }
.complaint.is-hal { border-left-color: var(--ishkor); }
.complaint-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.complaint-head select { width: auto; min-width: 190px; }
.complaint-who { margin-top: 4px; }
.complaint-text { white-space: pre-wrap; }
.complaint-note { display: grid; gap: 8px; justify-items: start; }

.toast {
  position: fixed; left: 50%; bottom: 20px; z-index: 100; transform: translate(-50%, 20px);
  max-width: min(92vw, 520px); padding: 12px 18px; border-radius: 12px;
  background: var(--ink); color: var(--bg); font-weight: 500; box-shadow: 0 10px 30px rgb(0 0 0 / .25);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.is-shown { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { background: #cf3f3f; color: #fff; }

.order-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.order-sum { font: 800 1.3rem/1 var(--display); white-space: nowrap; }
.chip.is-bad { background: color-mix(in srgb, var(--anor) 14%, transparent); color: var(--anor); }
.staff-item { grid-template-columns: minmax(0, 1fr) auto; }
.bot-status { display: grid; gap: 4px; padding: 12px 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); font-size: 14px; }
.bot-status strong { font-size: 15px; }

/* ── telefon ── */
@media (max-width: 820px) {
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: var(--topbar-h) auto 1fr; }
  .side-nav {
    position: sticky; top: var(--topbar-h); z-index: 15; height: auto; flex-direction: row; overflow-x: auto;
    padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--line); background: var(--bg); scrollbar-width: none;
  }
  .side-nav a { flex: none; padding: 8px 14px; font-size: 14px; }
  .me { display: none; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .content { padding-top: 20px; }
  .item { grid-template-columns: 64px minmax(0, 1fr); }
  .item-thumb { width: 64px; height: 52px; }
  .item-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .section-row-head { grid-template-columns: minmax(0, 1fr) auto; }
  .section-toggles { grid-column: 1 / -1; grid-row: 2; }
  .complaint-head select { width: 100%; }
  .card { padding: 18px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* Mison tekshiruvi: filial / menyu / to'lov turini tanlash */
.pick-list { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.pick-title { margin: 0 0 8px; font-weight: 600; }
.mison-line { margin: 6px 0 0; font-size: .92rem; }
.mison-line.is-bad { color: var(--anor); font-weight: 600; }
.mison-line.is-ok { color: var(--ishkor); }
.test-result .table td:nth-child(2) { white-space: nowrap; }
.facts { margin: 8px 0 0; padding-left: 18px; font-size: .92rem; }
.facts li { margin: 3px 0; }
.bot-status code { word-break: break-all; font-size: .85rem; }

/* ── Stollar: QR stikerlar ── */
.qr-hall h2 { margin-bottom: 14px; }
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.qr-tile { margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: #111; display: grid; gap: 8px; justify-items: center; text-align: center; break-inside: avoid; }
.qr-tile svg { width: 100%; max-width: 160px; height: auto; }
.qr-tile figcaption { display: grid; gap: 2px; }
.qr-tile strong { font-size: 1.15rem; }
.qr-sub { font-size: 12px; color: #555; }
@media print {
  .topbar, .side-nav, .no-print, .toast, .save-bar, .page-head p { display: none !important; }
  body, .content, .card { background: #fff !important; color: #000 !important; box-shadow: none !important; border: 0 !important; }
  .layout, .content { display: block !important; margin: 0 !important; padding: 0 !important; }
  .qr-grid { grid-template-columns: repeat(3, 1fr); gap: 8mm; }
  .qr-tile { border: 1px dashed #999; border-radius: 0; padding: 6mm; }
  .qr-hall { page-break-after: always; }
}


/* ── oltin uslub ── */
.btn:not(.btn-ghost):not(.btn-text) { background: var(--gold-grad) padding-box, var(--gold-grad) border-box; border-color: transparent; color: var(--cobalt-ink); }
.btn:not(.btn-ghost):not(.btn-text):hover { filter: brightness(1.08); }
.btn-ghost { color: var(--amber); border-color: var(--cobalt); }
img.brand-mark { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; }
img.gate-mark { width: 96px; height: 96px; border-radius: 22px; object-fit: cover; }
.side-nav a[aria-current="page"] { background: var(--gold-grad); color: var(--cobalt-ink); }
@media (max-width: 440px) { .topbar .brand { font-size: 0; gap: 0; } .topbar .brand .brand-mark { font-size: initial; } }

/* ── xodimlar, stollar, menyu (kg), yetkazish ── */
.role-badge { display: inline-block; margin-left: 6px; padding: 2px 10px; border-radius: 99px; font: 600 12px/1.6 var(--body, inherit); vertical-align: middle; background: rgb(var(--accent-rgb) / .15); color: var(--amber); }
.role-badge.is-cashier { background: rgb(39 174 96 / .16); color: #a9d25e; }
.role-badge.is-courier { background: rgb(97 160 255 / .16); color: #8dbaff; }
.row.wrap > .field { flex: 1 1 200px; margin: 0; }
.pct-input { width: 90px; min-height: 38px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: inherit; font: inherit; }
.pct-field { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 6px; font-size: 13px; color: #444; }
.qr-tile input.pct-input { width: 72px; background: #f4f4f4; color: #111; border-color: #ccc; }
.pct-field span { white-space: nowrap; }
.weight-list .item { grid-template-columns: minmax(0, 1fr) auto; }
.weight-list .item.is-on { border-color: rgb(var(--accent-rgb) / .5); }
.weight-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; justify-content: flex-end; }
.mini-field { display: grid; gap: 2px; font-size: 12px; color: var(--muted, #999); }
.mini-field .pct-input:disabled { opacity: .45; }
.search-input { flex: 1 1 240px; min-height: 42px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: inherit; font: inherit; }
.addr-line { margin: 6px 0; font-size: 14px; }
@media (max-width: 640px) {
  .weight-list .item { grid-template-columns: minmax(0, 1fr); }
  .weight-ctl { justify-content: flex-start; }
}
.notice.warn { padding: 12px 14px; border-radius: 12px; background: rgb(var(--accent-rgb) / .12); border: 1px solid rgb(var(--accent-rgb) / .45); color: var(--amber); margin-top: 12px; }

/* ── mehmonlar ── */
.guest-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.guest-stat { display: grid; gap: 2px; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.guest-stat strong { font-size: 1.8rem; line-height: 1.1; color: var(--amber); }
.guest-stat span { color: var(--muted, #999); font-size: 13px; }
.guest-list .item { grid-template-columns: minmax(0, 1fr) auto; }
.guest-orders { margin: 4px 0 0; font-size: 14px; }
.danger-zone { display: grid; gap: 12px; padding: 14px; border-radius: 14px; border: 1px dashed #e2654f; background: rgb(235 87 87 / .06); }
.btn-danger { background: #cf3f3f; border-color: #cf3f3f; color: #fff; }
.btn-danger:hover { background: #d9553e; }
@media (max-width: 640px) { .guest-list .item { grid-template-columns: minmax(0, 1fr); } }

/* Qurilmalar va chek printeri */
.printer-status { display: grid; gap: 12px; margin-bottom: 16px; }
.printer-card { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.printer-card.is-on { border-color: rgb(110 200 120 / .55); background: rgb(110 200 120 / .07); }
.printer-card.is-off { border-color: rgb(var(--accent-rgb) / .45); }
.printer-card strong { font-size: 1.05rem; }
.printer-card p { margin: 2px 0 0; }
.printer-icon { font-size: 2rem; }
.warn-text { color: var(--amber); }
.device-item { grid-template-columns: 48px minmax(0, 1fr) auto; }
.device-item.is-station { border-color: rgb(39 174 96 / .55); }
.device-kind { font-size: 1.8rem; text-align: center; }
.dot { display: inline-block; width: 9px; height: 9px; margin-left: 8px; border-radius: 50%; background: #6b6460; vertical-align: middle; }
.dot.is-on { background: #6ccf7a; box-shadow: 0 0 0 3px rgb(108 207 122 / .2); }
.job-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.job { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 8px 12px; border-radius: 10px; background: var(--surface); font-size: 14px; }
.job.is-done strong { color: #8fd69a; }
.job.is-new strong { color: var(--amber); }
.job.is-error strong, .job.is-expired strong { color: #ff9d8a; }
.steps { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.steps .no-num { list-style: none; margin-left: -22px; display: grid; gap: 8px; justify-items: start; }
.shortcut { display: block; width: 100%; padding: 10px 12px; border-radius: 10px; background: rgb(0 0 0 / .35); border: 1px solid var(--line); font-size: 12.5px; word-break: break-all; user-select: all; }
@media (max-width: 720px) {
  .device-item { grid-template-columns: 40px minmax(0, 1fr); }
  .job { grid-template-columns: 1fr auto; }
  .job span:nth-child(3) { display: none; }
}

/* Xodim paroli va ishxona tarmog'i */
.role-badge.is-pw { background: rgb(255 255 255 / .08); color: #e9dccb; }
.pw-dialog { max-width: 420px; width: calc(100% - 32px); padding: 22px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface, #17161a); color: inherit; }
.pw-dialog::backdrop { background: rgb(0 0 0 / .6); }
.pw-dialog h2 { margin: 0 0 4px; }
.pw-big { margin: 14px 0; padding: 14px; border-radius: 14px; text-align: center; font: 700 2.2rem/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .18em; color: var(--amber); background: rgb(0 0 0 / .3); border: 1px dashed rgb(var(--accent-rgb) / .5); user-select: all; }
.wp-here { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid rgb(var(--accent-rgb) / .45); }
.wp-here > span { font-size: 1.6rem; }
.wp-here > div { flex: 1 1 220px; }
.wp-here p { margin: 2px 0 0; }
.wp-here.is-ok { border-color: rgb(110 200 120 / .55); background: rgb(110 200 120 / .07); }
.wp-head { margin: 4px 0 8px; font-size: 1rem; }
.wp-nets { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.wp-nets li { display: grid; grid-template-columns: minmax(120px, auto) minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 12px; border-radius: 10px; background: var(--surface); }
.wp-ip { font: 600 14px/1.3 ui-monospace, Menlo, Consolas, monospace; word-break: break-all; }
@media (max-width: 720px) { .wp-nets li { grid-template-columns: 1fr auto; } .wp-nets li .muted { grid-column: 1 / -1; grid-row: 2; } }

/* ───────── Stol menyusi (bosma) ───────── */
.pm-controls { margin-bottom: 14px; }
.pm-toggles { gap: 18px; margin: 4px 0 14px; }
.pm-h3 { margin: 6px 0 8px; font-size: 1rem; }
.pm-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.pm-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; cursor: pointer; }
.pm-chip input { accent-color: var(--cobalt); }
.pm-info { margin: 4px 0 12px; }
.pm-info.is-warn { color: var(--amber); }
.pm-preview { display: grid; gap: 18px; justify-items: start; }
.pm-frame { width: calc(var(--fw) * var(--z, 1)); height: calc(var(--fh) * var(--z, 1)); overflow: hidden; border-radius: 6px; box-shadow: 0 10px 30px rgb(0 0 0 / .45); }
.pm-frame > .pm-sheet { transform: scale(var(--z, 1)); transform-origin: 0 0; }
.pm-print-extra { display: none; }

.pm-sheet { --pm-bg: #fff; width: var(--w); height: calc(var(--h) - 1mm); box-sizing: border-box; padding: 6.5mm 7.5mm 5.5mm; display: flex; flex-direction: column; gap: 2.6mm;
  overflow: hidden; background: var(--pm-bg); color: var(--pm-ink); font: 400 calc(3.25mm * var(--fs, 1))/1.28 'Golos Text', Arial, sans-serif; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.pm-sheet * { box-sizing: border-box; }
.pm-head { flex: none; display: flex; align-items: center; gap: 4mm; padding-bottom: 2.4mm; border-bottom: .6mm solid var(--pm-line); }
.pm-logo { width: 13mm; height: 13mm; border-radius: 3mm; object-fit: cover; }
.pm-title h1 { margin: 0; font: 700 8.6mm/1 Oswald, 'Arial Narrow', sans-serif; letter-spacing: .01em; color: var(--pm-title, var(--pm-ink)); text-transform: uppercase; }
.pm-title p { margin: 1mm 0 0; font-size: 3.1mm; color: var(--pm-muted); }
.pm-note { margin-left: auto; display: grid; justify-items: end; gap: .6mm; font-size: 2.9mm; color: var(--pm-muted); text-align: right; }
.pm-note span:first-child { font-weight: 700; color: var(--pm-ink); }
.pm-cols { flex: 1 1 auto; min-height: 0; column-count: var(--cols); column-gap: 5mm; column-fill: balance; overflow: hidden; }
.pm-cat { break-inside: avoid; page-break-inside: avoid; margin: 0 0 3mm; }
.pm-cat h2 { margin: 0 0 1.5mm; padding: 1.5mm 3mm 1.3mm; border-radius: 2.2mm; background: var(--pm-bar); color: var(--pm-bar-ink);
  font: 700 calc(4.5mm * var(--fs, 1))/1.05 Oswald, 'Arial Narrow', sans-serif; text-transform: uppercase; letter-spacing: .03em; }
.pm-cat.is-alt h2 { background: var(--pm-bar2); color: var(--pm-bar2-ink); }
.pm-photos { display: grid; gap: 1.2mm; margin: 0 0 1.5mm; }
.pm-photos.n1 { grid-template-columns: 1fr; }
.pm-photos.n2 { grid-template-columns: 1fr 1fr; }
.pm-photos.n3 { grid-template-columns: 1fr 1fr 1fr; }
.pm-photos img { display: block; width: 100%; height: calc(15mm * var(--fs, 1)); object-fit: cover; border-radius: 1.6mm; background: var(--pm-line2); }
.pm-photos.n1 img { height: calc(19mm * var(--fs, 1)); }
.pm-items, .pm-sub { list-style: none; margin: 0; padding: 0; }
.pm-items { padding: 0 .8mm; }
.pm-item { padding: .65mm 0; border-bottom: .2mm solid var(--pm-line2); }
.pm-item:last-child { border-bottom: 0; }
.pm-row { display: flex; flex-wrap: nowrap; align-items: baseline; align-items: last baseline; gap: 1.2mm; }
.pm-row .n { min-width: 0; }
.pm-sheet .n { font-weight: 600; }
.pm-sheet .n small { font-weight: 400; font-size: .8em; color: var(--pm-muted); }
.pm-sheet .d { flex: 1 1 3mm; min-width: 3mm; border-bottom: .35mm dotted var(--pm-dots); transform: translateY(-.7mm); }
.pm-sheet .p { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pm-sheet .p small { font-weight: 500; font-size: .78em; color: var(--pm-muted); }
.pm-vn { margin-top: .2mm; font-size: .8em; color: var(--pm-muted); }
.pm-desc { margin-top: .3mm; font-size: .78em; line-height: 1.22; color: var(--pm-muted); }
.pm-sub { margin: .3mm 0 0 3mm; }
.pm-sub .n { font-weight: 500; }
.pm-foot { flex: none; height: 24mm; display: flex; align-items: center; gap: 4mm; padding-top: 2.2mm; border-top: .6mm solid var(--pm-line); }
.pm-qr svg { display: block; width: 21mm; height: 21mm; padding: 1mm; border-radius: 1.6mm; background: #fff; border: .3mm solid var(--pm-line2); }
.pm-cta { display: grid; gap: 1mm; max-width: 120mm; }
.pm-cta b { font: 600 4.6mm/1.1 Oswald, 'Arial Narrow', sans-serif; text-transform: uppercase; letter-spacing: .02em; }
.pm-cta span { font-size: 3mm; color: var(--pm-muted); }
.pm-contact { margin-left: auto; display: grid; justify-items: end; gap: .8mm; text-align: right; font-size: 2.9mm; color: var(--pm-muted); }
.pm-contact b { font: 600 4.6mm/1 Oswald, 'Arial Narrow', sans-serif; color: var(--pm-ink); letter-spacing: .02em; }

.pm-sheet.theme-yorqin { --pm-bg: #fff; --pm-ink: #1b1712; --pm-muted: #6b6257; --pm-bar: #ffd21f; --pm-bar-ink: #1b1712; --pm-bar2: #5a45c6; --pm-bar2-ink: #fff;
  --pm-line: #ffd21f; --pm-line2: #eee7d8; --pm-dots: #c9bfae; }
.pm-sheet.theme-yorqin .pm-head { border-bottom-width: 1.2mm; }
.pm-sheet.theme-oqtosh { --pm-bg: #fbf5e9; --pm-ink: #2a1d10; --pm-muted: #7c6a55; --pm-bar: #1d1610; --pm-bar-ink: #f0c15c; --pm-bar2: #7a4f1c; --pm-bar2-ink: #fff1d6;
  --pm-line: #c9973f; --pm-line2: #e9dcc5; --pm-dots: #cdb894; --pm-title: #1d1610; }
.pm-sheet.theme-oddiy { --pm-bg: #fff; --pm-ink: #000; --pm-muted: #555; --pm-bar: #000; --pm-bar-ink: #fff; --pm-bar2: #444; --pm-bar2-ink: #fff;
  --pm-line: #000; --pm-line2: #ddd; --pm-dots: #999; }

@media print {
  body.pm-printing { background: #fff !important; }
  body.pm-printing .page-head, body.pm-printing .card, body.pm-printing .pm-info { display: none !important; }
  body.pm-printing .pm-preview, body.pm-printing .pm-print-extra { display: block !important; }
  body.pm-printing .pm-frame { width: auto !important; height: auto !important; box-shadow: none !important; border-radius: 0 !important; overflow: visible !important; }
  body.pm-printing .pm-frame > .pm-sheet { transform: none !important; }
  /* har varaq yangi sahifadan (oxiridan keyin bo'sh sahifa qolmasin) */
  body.pm-printing .pm-frame ~ .pm-frame > .pm-sheet, body.pm-printing .pm-print-extra .pm-sheet { break-before: page; page-break-before: always; }
  body.pm-printing .page > *:not(.pm-preview):not(.pm-print-extra) { display: none !important; }
  body.pm-printing .page, body.pm-printing .shell, body.pm-printing .content { display: block !important; gap: 0 !important; min-height: 0 !important; height: auto !important; }
  body.pm-printing .pm-print-extra:empty { display: none !important; }
}
.pm-row .n small { white-space: nowrap; }

/* ───────── Misonsiz ishlash va menyu tahriri ───────── */
.notice.ok-note { padding: 12px 14px; border-radius: 12px; margin-top: 12px; border: 1px solid rgb(110 200 120 / .45); background: rgb(110 200 120 / .08); color: #bfe9c5; }
.mode-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.mode-opt { display: grid; gap: 6px; text-align: left; padding: 16px 18px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); color: inherit; font: inherit; cursor: pointer; }
.mode-opt strong { font-size: 1.05rem; }
.mode-opt span { color: var(--muted, #a99a8a); font-size: 14px; line-height: 1.45; }
.mode-opt.is-on { border-color: var(--cobalt); background: rgb(var(--accent-rgb) / .1); box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / .15); }
.mode-opt.is-on strong::after { content: '  ✓ yoqilgan'; color: var(--cobalt); font-size: 13px; }
.zx-bar { height: 10px; border-radius: 999px; background: rgb(255 255 255 / .08); overflow: hidden; }
.zx-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cobalt), var(--amber)); transition: width .4s ease; }
.zx-log { margin: 0; }
.guest-stat small { display: block; margin-top: 2px; font-size: 12px; }

.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.seg-btn { min-height: 40px; padding: 0 18px; border: 0; border-radius: 10px; background: none; color: inherit; font: 600 15px/1 inherit; cursor: pointer; }
.seg-btn.is-on { background: var(--cobalt); color: var(--cobalt-ink); }
.own-toolbar select { min-height: 44px; }
.own-cat h3 { margin: 6px 0 8px; font-size: 1rem; color: var(--amber); }
.own-item { grid-template-columns: 56px minmax(0, 1fr) auto auto auto; align-items: center; }
.own-item.is-off { opacity: .55; }
.own-thumb { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; background: rgb(255 255 255 / .06); display: grid; place-items: center; font-size: 1.4rem; }
.own-price { white-space: nowrap; font-variant-numeric: tabular-nums; }
.cat-manager { padding: 14px 18px; }
.cat-manager summary { cursor: pointer; font-weight: 600; }
.cat-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.cat-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 10px; border-radius: 10px; background: var(--surface); }
.edit-dialog { width: min(640px, calc(100% - 24px)); max-height: calc(100dvh - 24px); overflow: auto; padding: 22px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface, #17161a); color: inherit; }
.edit-dialog::backdrop { background: rgb(0 0 0 / .6); }
.edit-dialog h2 { margin: 0 0 14px; }
.edit-dialog > * + * { margin-top: 12px; }
.dialog-actions { margin-top: 18px; }
.hall-card { padding: 14px 16px; display: grid; gap: 12px; }
.hall-name { min-height: 42px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgb(0 0 0 / .25); color: inherit; font: 600 16px/1.2 inherit; }
.table-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.table-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 3px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.table-chip .chip-name { border: 0; background: none; color: inherit; font: 600 14px/1 inherit; padding: 8px 10px; cursor: pointer; }
.table-chip small { color: var(--amber); font-size: 11px; }
.table-chip .chip-x { width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgb(255 255 255 / .06); color: inherit; cursor: pointer; font-size: 16px; }
@media (max-width: 720px) {
  .own-item { grid-template-columns: 48px minmax(0, 1fr) auto; }
  .own-item .own-price { grid-column: 2; }
  .own-item .btn { grid-column: 3; grid-row: 1; }
}

/* Tayyorlash joylari (oshxona printerlari) */
.kitchen-form { display: grid; gap: inherit; }
.big-toggle { margin: 4px 0 14px; font-size: 15px; }
.station-head, .station-row { display: grid; grid-template-columns: 46px minmax(120px, 1.1fr) minmax(160px, 1.6fr) 104px 58px 118px 36px; gap: 10px; align-items: center; }
.station-head { padding: 0 12px 4px; }
.station-head span:nth-child(n+6) { display: none; }
.station-list { display: grid; gap: 8px; margin-bottom: 10px; }
.station-row { padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.station-row.is-off { opacity: .6; }
.station-row input:not([type=checkbox]), .station-row select, .cat-row select, .mini-select, .port-input, .item-search, .add-ip input {
  min-height: 38px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2, #1e1e22); color: var(--ink); font: inherit; font-size: 14px; min-width: 0; }
.station-row .station-name { font-weight: 600; }
.station-on { min-height: 0; }
.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.checks { display: grid; gap: 10px; }
.cat-map, .item-map { display: grid; gap: 6px; }
.cat-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 280px) auto; gap: 10px; align-items: center; padding: 6px 4px 6px 12px; border-radius: 10px; }
.cat-row:nth-child(odd) { background: color-mix(in srgb, var(--surface) 70%, transparent); }
.cat-row.is-other { margin-bottom: 8px; border: 1px dashed var(--line); background: transparent; }
.cat-row .cat-name { min-width: 0; overflow-wrap: anywhere; }
.sub-title { margin: 18px 0 4px; font-size: 16px; }
.item-pick { position: relative; max-width: 460px; margin-top: 8px; }
.item-search { width: 100%; }
.item-found { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 2px; }
.item-found .btn-link { text-align: left; padding: 6px 8px; }
.mini-select { min-height: 32px; padding: 4px 8px; width: auto !important; flex: 0 0 auto; }
.printer-list .item-actions { max-width: 360px; }
.port-input { width: 84px; flex: 0 0 auto !important; }
.add-ip { margin-top: 12px; }
.add-ip summary { cursor: pointer; color: var(--muted); }
.printer-list .item-actions { align-items: center; }
@media (max-width: 820px) {
  .station-head { display: none; }
  .station-row { grid-template-columns: 40px minmax(0, 1fr) auto 36px; grid-template-areas: "on name name del" ". printer printer printer" ". copies beep beep" ". count count count"; row-gap: 8px; }
  .station-row .station-on { grid-area: on; }
  .station-row .station-name { grid-area: name; }
  .station-row .st-printer { grid-area: printer; }
  .station-row .st-copies { grid-area: copies; }
  .station-row .st-beep { grid-area: beep; }
  .station-row .station-count { grid-area: count; }
  .station-row .st-del { grid-area: del; }
  .cat-row { grid-template-columns: minmax(0, 1fr); }
}
.station-count { white-space: nowrap; font-size: 13px; }

/* Chek ko'rinishi */
.receipt-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 24px; align-items: start; }
.receipt-form { display: grid; gap: 20px; min-width: 0; }
.toggle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px 18px; margin-top: 8px; }
.receipt-preview { position: sticky; top: 84px; display: grid; gap: 12px; }
.rp-head { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; }
.rp-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.rp-tabs .chip { border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 99px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.rp-tabs .chip.is-on { background: var(--accent, #e8b04a); border-color: transparent; color: #1a1408; }
.rp-paper { --cols: 48; background: #fbfaf6; color: #151515; border-radius: 4px; padding: 18px 14px 10px; box-shadow: 0 18px 40px rgb(0 0 0 / .45), inset 0 -1px 0 rgb(0 0 0 / .06);
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, 'Courier New', monospace; line-height: 1.35; overflow: hidden;
  font-size: min(12px, calc((100vw - 72px) / (var(--cols) * 0.61))); width: calc(var(--cols) * 0.61em + 28px); max-width: 100%; justify-self: center; box-sizing: border-box; }
.rp-line { white-space: pre; min-height: 1.35em; }
.rp-line.a-center { text-align: center; }
.rp-line.a-right { text-align: right; }
.rp-line.b { font-weight: 800; }
.rp-line.s2 { font-size: 2em; line-height: 1.15; letter-spacing: -.02em; }
.rp-line.st { transform: scaleY(1.9); transform-origin: top left; margin-bottom: .95em; letter-spacing: -.01em; }
.rp-cut { margin: 10px -14px 0; padding-top: 6px; border-top: 2px dashed #b9b4a6; color: #8a8576; font-size: 11px; text-align: center; font-family: inherit; }
.rp-beep { color: #8a8576; font-size: 11px; text-align: center; }
.rp-mison { margin-top: 12px; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--line); }
.rp-mison code { display: block; margin: 6px 0; font-size: 15px; color: var(--ink); white-space: pre-wrap; }
@media (max-width: 1100px) {
  .receipt-layout { grid-template-columns: minmax(0, 1fr); }
  .receipt-preview { position: static; order: -1; }
}

.owner-url { padding: 8px 12px; border-radius: 10px; background: var(--surface-2); font-size: 15px; overflow-wrap: anywhere; }

.pair-box { margin-top: 12px; padding: 14px 16px; border-radius: 14px; border: 1px dashed var(--cobalt); }
.pair-code { display: block; margin-top: 4px; font-size: 32px; letter-spacing: .12em; font-variant-numeric: tabular-nums; color: var(--cobalt); }

/* ───────── Xodimlar: ruxsatlar ───────── */
.perm-scroll-x { overflow-x: auto; border-radius: 14px; border: 1px solid var(--line); }
.perm-matrix { width: 100%; border-collapse: collapse; font-size: 14px; }
.perm-matrix th, .perm-matrix td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.perm-matrix th { position: sticky; top: 0; background: var(--surface-2, #1f1e22); font-weight: 600; white-space: nowrap; }
.perm-matrix th:not(:first-child), .perm-cell { text-align: center; width: 92px; }
.perm-cell input { width: 20px; height: 20px; accent-color: var(--gold, var(--cobalt)); }
.perm-group-row td { background: rgb(var(--accent-rgb) / .08); color: var(--gold, var(--cobalt)); font-weight: 600; font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; }
.perm-dialog { width: min(640px, calc(100vw - 24px)); }
.perm-scroll { max-height: 60vh; overflow: auto; display: grid; gap: 12px; margin: 10px 0 14px; padding-right: 4px; }
.perm-group { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin: 0; display: grid; gap: 4px; }
.perm-group legend { padding: 0 6px; font-weight: 600; color: var(--muted); font-size: 13px; }
.perm-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 4px 0; font-size: 14px; }
.perm-row select { max-width: 220px; }
.perm-row.is-custom span { color: var(--gold, var(--cobalt)); font-weight: 600; }
.role-select { min-height: 34px; padding: 4px 8px; font-size: 13px; }
.role-badge.is-nopw { background: rgb(235 87 87 / .14); color: #ff9d8a; }
.role-badge.is-storekeeper { background: rgb(120 160 220 / .16); color: #a9c6f0; }
/* ───────── To'lovlar va ombor ───────── */
.pay-list { display: grid; gap: 8px; }
.pay-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2, #1f1e22); }
.pay-item input[type=text] { min-height: 38px; }
.pay-kind { font-size: 12px; color: var(--muted); white-space: nowrap; }
.stock-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.stock-table th, .stock-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.stock-table th { color: var(--muted); font-weight: 600; }
.stock-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stock-table tr.is-off td { opacity: .5; }
.stock-table tr.is-low td { background: rgb(235 87 87 / .08); }
.pack-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pack-row input { width: 90px; }
.item-actions .role-select { width: auto; max-width: 150px; flex: none; }

/* chek rasmlari: logo, QR, pastki rasm */
.rp-imgline { white-space: normal; padding: 4px 0; }
.rp-img { display: inline-block; max-width: 100%; height: auto; image-rendering: pixelated; }
.rp-media-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 10px 0; }
.rp-media { display: grid; gap: 8px; align-content: start; padding: 12px; border-radius: 12px; border: 1px solid var(--line, #2e2a25); }
.rp-media-thumb { display: grid; place-items: center; min-height: 96px; padding: 8px; border-radius: 8px; background: #fbfaf6; }
.rp-media-thumb canvas { max-width: 100%; max-height: 160px; image-rendering: pixelated; }
.rp-media .row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ═════════ ☰ Bo'limlar menyusi ═════════ */
.nav-toggle { display: grid; place-items: center; width: 44px; height: 44px; flex: none; margin-right: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2, transparent); color: var(--ink); cursor: pointer; }
.nav-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.nav-toggle:hover { border-color: var(--cobalt); }
.topbar { justify-content: flex-start; }
.topbar .topbar-right { margin-left: auto; }
.nav-group { margin: 14px 14px 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.side-nav > .nav-group:first-of-type { margin-top: 2px; }
.nav-foot { margin-top: auto; padding-top: 14px; }
.btn-block { width: 100%; }
.side-nav [hidden] { display: none !important; }
@media (min-width: 821px) {
  .shell { transition: grid-template-columns .22s ease; }
  .shell.nav-collapsed { grid-template-columns: 0 minmax(0, 1fr); }
  .shell.nav-collapsed .side-nav { visibility: hidden; padding: 0; border: 0; overflow: hidden; }
  .shell.nav-collapsed .content { max-width: 1200px; }
}
@media (max-width: 820px) {
  .shell { grid-template-rows: var(--topbar-h) 1fr; }
  .side-nav {
    position: fixed; z-index: 40; top: 0; left: 0; bottom: 0; width: min(300px, 84vw); height: 100dvh;
    flex-direction: column; overflow-x: hidden; overflow-y: auto; padding: 16px 12px calc(16px + env(safe-area-inset-bottom));
    border-right: 1px solid var(--line); border-bottom: 0; background: var(--surface, #111);
    transform: translateX(-102%); visibility: hidden; transition: transform .24s ease, visibility 0s linear .24s; box-shadow: 20px 0 50px rgb(0 0 0 / .45);
  }
  /* yopiq menyu klaviatura bilan ham tanlanmaydi (visibility) */
  .shell.nav-open .side-nav { transform: none; visibility: visible; transition: transform .24s ease; }
  .side-nav a { padding: 12px 14px; font-size: 15px; }
  .nav-scrim { position: fixed; inset: 0; z-index: 39; background: rgb(0 0 0 / .55); }
}
@media (prefers-reduced-motion: reduce) { .shell, .side-nav { transition: none; } }

/* ═════════ PIN bilan kirish (admin va egasi) ═════════ */
.pin-gate { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(380px, .85fr); }
.pin-gate[hidden] { display: none; }
.pin-gate .pin-brand {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 48px;
  background: radial-gradient(120% 90% at 30% 20%, #1d3a63 0%, #12233b 45%, #0b1626 100%); border-right: 1px solid var(--line);
}
.pin-gate .pin-logo { width: clamp(160px, min(24vw, 38vh), 320px); height: auto; aspect-ratio: 1; border-radius: 50%; object-fit: cover; border: 3px solid rgb(var(--accent-rgb) / .35); box-shadow: 0 30px 80px rgb(0 0 0 / .5); }
.pin-gate .pin-brand h1 { margin: 10px 0 0; font: 800 clamp(1.8rem, 3vw, 2.6rem)/1.1 var(--display); }
.pin-gate .pin-who { margin: 0; color: var(--muted); }
.pin-gate .pin-clock { position: absolute; left: 36px; bottom: 28px; display: grid; gap: 2px; margin: 0; color: var(--muted); }
.pin-gate .pin-clock strong { font: 800 2.4rem/1 var(--display); color: var(--ink); }
.pin-gate .pin-panel { display: grid; align-content: center; justify-items: center; gap: 14px; padding: 36px clamp(20px, 3vw, 48px); background: var(--surface, #111); }
.pin-gate .pin-panel > * { width: min(100%, 380px); }
.pin-gate .pin-panel h2 { margin: 0; text-align: center; font: 800 1.6rem var(--display); }
.pin-gate .pin-panel > p { margin: 0; text-align: center; }
.pin-gate .pin-dots { display: flex; justify-content: center; gap: 18px; padding: 8px 0; }
.pin-gate .pin-dots span { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--muted); }
.pin-gate .pin-dots span.is-on { background: var(--cobalt); border-color: var(--cobalt); }
.pin-gate .pin-dots span[hidden] { display: none; }
.pin-gate .pin-dots.is-shake { animation: pinShake .4s; }
@keyframes pinShake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.pin-gate .pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pin-gate .pin-key { min-height: clamp(62px, 10vh, 86px); border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2, #1d1c20); color: var(--ink); font: 700 1.8rem var(--display); cursor: pointer; touch-action: manipulation; }
.pin-gate .pin-key:active { transform: scale(.97); }
.pin-gate .pin-key.is-soft { color: var(--muted); font-size: 1.4rem; }
.pin-gate .pin-key.is-ok { background: var(--cobalt); border-color: var(--cobalt); color: var(--cobalt-ink); font-size: 1.15rem; }
.pin-gate .pin-alt { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; }
.pin-gate .form-error { text-align: center; }
dialog.pin-setup { width: min(460px, calc(100vw - 24px)); padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface, #111); color: var(--ink); }
dialog.pin-setup::backdrop { background: rgb(0 0 0 / .6); }
dialog.pin-setup h2 { margin: 0 0 6px; }
dialog.pin-setup .field { display: grid; gap: 6px; margin: 12px 0; }
dialog.pin-setup input { min-height: 52px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg, #0b0b0d); color: var(--ink); font: 700 1.4rem var(--body); letter-spacing: .4em; }
dialog.pin-setup .row { display: flex; gap: 10px; margin-top: 8px; }
@media (max-width: 820px) {
  .pin-gate { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .pin-gate .pin-brand { flex-direction: row; justify-content: flex-start; padding: 18px 20px; border-right: 0; border-bottom: 1px solid var(--line); }
  .pin-gate .pin-logo { width: 64px; }
  .pin-gate .pin-brand h1 { margin: 0; font-size: 1.3rem; }
  .pin-gate .pin-who { margin-left: auto; font-size: 13px; }
  .pin-gate .pin-clock { display: none; }
  .pin-gate .pin-panel { align-content: start; padding: 24px 18px; }
}
.pin-offer { position: relative; }
.pin-offer::after { content: ""; position: absolute; top: -3px; right: -3px; width: 9px; height: 9px; border-radius: 50%; background: #e2654f; box-shadow: 0 0 0 2px var(--surface); }
@media (max-width: 560px) { .pin-offer { font-size: 0; padding: 0 10px; } .pin-offer::before { content: "🔢"; font-size: 18px; } }
@media (max-width: 820px) {
  .topbar { gap: 8px; padding: 0 10px; }
  .topbar-right { gap: 6px; }
  #open-site { display: none; }
}
@media (max-width: 480px) { .topbar .brand { font-size: 0; gap: 0; } }

/* ═════════ POS uslubi (kassa terminali bilan bir xil): tekis, to'rtburchakroq, ko'k ═════════ */
body { background: var(--bg); }
h1, h2 { letter-spacing: -.01em; }
h1 { font-weight: 800; }
.btn { border-radius: 10px; min-height: 46px; font-weight: 700; }
.btn-small { min-height: 38px; border-radius: 8px; }
.btn:not(.btn-ghost):not(.btn-text) { background: var(--cobalt); border-color: var(--cobalt); color: var(--cobalt-ink); }
.btn:not(.btn-ghost):not(.btn-text):hover { background: var(--cobalt-hi); border-color: var(--cobalt-hi); filter: none; }
.btn-ghost { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: #26406a; border-color: #3b5a85; }
.btn-text { color: var(--amber); }
.btn-danger, .btn.btn-danger:not(.btn-ghost):not(.btn-text) { background: #cf3f3f; border-color: #cf3f3f; color: #fff; }
.topbar { background: var(--bar-bg); border-bottom-color: #1d2f4a; }
.brand { font-weight: 800; letter-spacing: -.01em; }
.side-nav { background: var(--bar-bg); border-right-color: #1d2f4a; gap: 1px; }
.side-nav a { position: relative; padding: 10px 14px; border-radius: 8px; color: #c7d3e3; font-weight: 500; }
.side-nav a:hover { background: #13223a; color: var(--ink); }
.side-nav a[aria-current="page"] { background: rgb(var(--accent-rgb) / .2); color: #fff; font-weight: 700; box-shadow: inset 3px 0 0 var(--cobalt); }
.nav-group { color: #6f86a6; }
.nav-toggle { background: #13223a; border-color: #1f3352; }
.card { border-radius: 12px; }
.item { border-radius: 12px; }
input:not([type=checkbox]):not([type=file]), textarea, select { border-radius: 10px; background: var(--bg); border-color: var(--line); }
.filter-chips button { border-radius: 8px; border-width: 1px; background: var(--surface); min-height: 40px; }
.filter-chips button[aria-pressed="true"] { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.chip { border-radius: 6px; }
.save-bar { border-radius: 12px; background: var(--surface); }
.gate { background: radial-gradient(110% 80% at 50% 0%, #1d3a63 0%, #12233b 40%, var(--bg) 100%); }
.gate-card { border-radius: 16px; background: var(--surface); border-color: var(--line); }
.role-badge { border-radius: 6px; }
.pin-gate .pin-logo { border-color: rgb(var(--accent-rgb) / .35); }
.pin-gate .pin-key { border-radius: 12px; box-shadow: inset 0 -3px 0 rgb(0 0 0 / .25); }
.pin-gate .pin-key.is-ok { background: var(--cobalt); color: #fff; }
.pin-offer::after { box-shadow: 0 0 0 2px var(--bar-bg); }
.toast { border-radius: 10px; }
/* egasi hisobotlari — xuddi shu uslubda */
.owner-main .ow-chip, .owner-main .ow-seg-btn { border-radius: 8px; }
.owner-main .ow-seg { border-radius: 10px; }
.owner-main .ow-chip.is-on, .owner-main .ow-seg-btn.is-on, .owner-main .ow-seg .ow-seg-btn.is-on { background: var(--cobalt); color: #fff; }
.owner-main .ow-tile, .owner-main .ow-card { border-radius: 12px; }
.owner-main .ow-head h1 { font-family: var(--display); font-weight: 800; }

/* Email bilan kirish: PIN ekrani kabi — chapda katta logo, o'ngda forma */
@media (min-width: 900px) {
  #screen-login { grid-template-columns: minmax(0, 1.2fr) minmax(420px, .85fr); place-items: stretch; padding: 0; background: var(--surface); }
  #screen-login { position: relative; }
  #screen-login::before { content: ""; border-right: 1px solid var(--line); background: radial-gradient(120% 90% at 30% 20%, #1d3a63 0%, #12233b 45%, #0b1626 100%); }
  /* dumaloq logo chap ustun o'rtasida */
  #screen-login::after {
    content: ""; position: absolute; top: 47%; left: min(29.27%, calc((100% - 420px) / 2)); transform: translate(-50%, -50%);
    width: clamp(180px, min(24vw, 38vh), 320px); aspect-ratio: 1; border-radius: 50%;
    background: url(/logo.jpg) center / cover; border: 3px solid rgb(var(--accent-rgb) / .35); box-shadow: 0 30px 80px rgb(0 0 0 / .5);
  }
  #screen-login .gate-card { align-self: center; justify-self: center; width: min(400px, 100%); border: 0; background: transparent; box-shadow: none; }
  #screen-login .gate-mark { display: none; }
}
