/* =====================================================================
   SDMSYS KAFE POS — YANGI DIZAYN (v9)
   app.css dan KEYIN yuklanadi va uning ustiga yoziladi.
   Shriftlar va ikonkalar tizimning o'zida — internet kerak emas.
   ===================================================================== */

/* ---------- Shrift (Manrope, OFL litsenziya) ---------- */
@font-face { font-family: 'Manrope'; font-weight: 400; font-display: swap;
  src: url('../fonts/manrope-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-weight: 500; font-display: swap;
  src: url('../fonts/manrope-latin-500-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-weight: 600; font-display: swap;
  src: url('../fonts/manrope-latin-600-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-weight: 700; font-display: swap;
  src: url('../fonts/manrope-latin-700-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-weight: 800; font-display: swap;
  src: url('../fonts/manrope-latin-800-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-weight: 400; font-display: swap;
  src: url('../fonts/manrope-cyrillic-400-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-weight: 500; font-display: swap;
  src: url('../fonts/manrope-cyrillic-500-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-weight: 600; font-display: swap;
  src: url('../fonts/manrope-cyrillic-600-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-weight: 700; font-display: swap;
  src: url('../fonts/manrope-cyrillic-700-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-weight: 800; font-display: swap;
  src: url('../fonts/manrope-cyrillic-700-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

/* ---------- Ranglar ---------- */
:root {
  --brand:        #5B47D6;
  --brand-dark:   #4535B5;
  --brand-light:  #ECE9FD;
  --ink:          #17151F;
  --ink-2:        #5A5870;
  --ink-3:        #6E6C85;
  --line:         #E4E2EE;
  --bg:           #F3F2F8;
  --card:         #FFFFFF;
  --ok:           #0E8A5A;
  --ok-bg:        #E3F5EC;
  --warn:         #E08A00;
  --warn-bg:      #FFF0D6;
  --danger:       #D23B52;
  --danger-bg:    #FDE8EB;
  --info:         #2563C4;
  --radius:       18px;
  --radius-sm:    12px;
  --shadow:       0 1px 2px rgba(23,21,31,.05), 0 6px 20px rgba(23,21,31,.04);
  --shadow-lg:    0 12px 40px rgba(23,21,31,.16);
  --font:         'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease:         cubic-bezier(.22,.9,.3,1);
}
[data-bs-theme="dark"] {
  --brand:        #8B7BEE;
  --brand-dark:   #A79BF5;
  --brand-light:  #28244A;
  --ink:          #F1F0F8;
  --ink-2:        #BFBDD3;
  --ink-3:        #9A98B2;
  --line:         #33304A;
  --bg:           #12111A;
  --card:         #1B1A27;
  --ok:           #35C98F;
  --ok-bg:        #123327;
  --warn:         #F2A93B;
  --warn-bg:      #3A2B10;
  --danger:       #FF6B80;
  --danger-bg:    #3D1A22;
  --info:         #6AA2F0;
}

html, body { font-family: var(--font); }
body { font-feature-settings: 'tnum' 1; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6, .fw-semibold, .fw-bold { font-family: var(--font); }

/* ---------- Umumiy komponentlar ---------- */
.btn { font-weight: 700; border-radius: var(--radius-sm); transition: background .15s, transform .1s, box-shadow .15s; }
.btn:active { transform: scale(.97); }
.btn-brand { box-shadow: 0 6px 16px rgba(91,71,214,.28); }
.btn-brand:hover { box-shadow: 0 8px 22px rgba(91,71,214,.36); }
.btn-soft { color: var(--brand-dark); }
.btn-soft:hover { background: color-mix(in srgb, var(--brand-light) 80%, var(--brand) 20%); }
.btn-success { background: var(--ok); border-color: var(--ok); }
.btn-success:hover { background: #0B7249; border-color: #0B7249; }
.btn-lg-touch { padding: 15px 22px; font-size: 17px; border-radius: 16px; }
.btn-light { background: #fff; border: 1.5px solid var(--line); color: var(--ink); }
[data-bs-theme="dark"] .btn-light { background: var(--brand-light); color: var(--ink); border-color: var(--line); }

.form-control, .form-select { border-radius: var(--radius-sm); border: 1.5px solid var(--line); padding: 11px 14px; font-weight: 500; }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(91,71,214,.14); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }

.modal-content { border-radius: 24px; box-shadow: var(--shadow-lg); }
.modal.fade .modal-dialog { transform: translateY(18px) scale(.98); transition: transform .28s var(--ease); }
.modal.show .modal-dialog { transform: none; }
.badge-x { font-weight: 700; padding: 5px 11px; }

.card-x, .stat {
  border: 0; border-radius: var(--radius); box-shadow: var(--shadow); background: #fff;
}
[data-bs-theme="dark"] .card-x, [data-bs-theme="dark"] .stat { background: #1B1A27; }

/* =====================================================================
   KASSA — BOSH EKRAN
   ===================================================================== */
body.pos2 { background: var(--bg); }

.pos-shell { display: flex; min-height: 100vh; }

/* ----- Chap panel (rail) ----- */
.rail {
  width: 96px; flex: none; background: #17151F; display: flex; flex-direction: column;
  align-items: center; padding: 18px 0; gap: 6px;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 1030;
}
.rail-logo {
  width: 48px; height: 48px; border-radius: 15px; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 20px; margin-bottom: 14px;
  box-shadow: 0 8px 20px rgba(91,71,214,.45);
}
.rail-i {
  width: 76px; padding: 10px 0; border-radius: 15px; display: flex; flex-direction: column; align-items: center;
  gap: 5px; color: #B9B7CC; font-size: 11.5px; font-weight: 700; border: 0; background: transparent;
  text-decoration: none; transition: background .18s, color .18s, transform .12s; position: relative; cursor: pointer;
}
.rail-i i { font-size: 23px; line-height: 1; }
.rail-i:hover { background: #26232F; color: #fff; }
.rail-i:active { transform: scale(.95); }
.rail-i.on, .rail-i.on:hover { background: var(--brand); color: #fff; box-shadow: 0 8px 18px rgba(91,71,214,.4); }
.rail-i .dot {
  position: absolute; top: 6px; right: 14px; min-width: 18px; height: 18px; border-radius: 9px;
  background: var(--warn); color: #fff; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; padding: 0 5px;
}
.rail-user {
  margin-top: auto; width: 44px; height: 44px; border-radius: 50%; background: #3A3650; color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 14px;
}

.pos-main { flex: 1; min-width: 0; margin-left: 96px; display: flex; flex-direction: column; }

/* ----- Tepa panel ----- */
.pos-top {
  height: 76px; flex: none; display: flex; align-items: center; gap: 18px; padding: 0 28px;
  position: sticky; top: 0; z-index: 1020; background: var(--bg);
}
.pos-top .ttl-s { font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.pos-top h1 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.01em; line-height: 1.15; }
.pos-search {
  flex: 1; max-width: 380px; height: 46px; border-radius: 14px; background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--line); display: flex; align-items: center; gap: 10px; padding: 0 14px;
  color: var(--ink-3); margin-left: 10px;
}
.pos-search input { border: 0; outline: 0; background: transparent; font: inherit; font-size: 14px; font-weight: 500; color: var(--ink); width: 100%; }
[data-bs-theme="dark"] .pos-search { background: #1B1A27; }
.shift-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px;
  background: var(--ok-bg); color: var(--ok); font-size: 13px; font-weight: 700; white-space: nowrap; text-decoration: none;
}
.shift-pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 1.8s infinite; }
.shift-pill.off { background: var(--danger-bg); color: var(--danger); }
.shift-pill.off::before { animation: none; }
.pos-clock { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 62px; text-align: right; }
.btn-o {
  display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px; border-radius: 14px;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink); font-size: 14px; font-weight: 700; cursor: pointer;
  transition: background .15s, transform .1s, border-color .15s;
}
.btn-o:hover { background: var(--bg); border-color: var(--brand); color: var(--brand-dark); }
.btn-o:active { transform: scale(.97); }
.btn-o:disabled { opacity: .45; pointer-events: none; }
[data-bs-theme="dark"] .btn-o { background: #1B1A27; }
.pos-burger { display: none; }

.pos-content { padding: 0 28px 28px; flex: 1; min-width: 0; }

/* ----- Ko'rsatkichlar ----- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi {
  background: #fff; border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow);
  animation: rise .5s var(--ease) both;
}
[data-bs-theme="dark"] .kpi { background: #1B1A27; }
.kpi:nth-child(2) { animation-delay: .05s; } .kpi:nth-child(3) { animation-delay: .1s; } .kpi:nth-child(4) { animation-delay: .15s; }
.kpi-l { font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.kpi-v { margin-top: 2px; font-size: 24px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi-v small { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.kpi-h { font-size: 12px; font-weight: 500; color: var(--ink-3); }

/* ----- Diqqat talab qiladi ----- */
.attn-t { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; margin-bottom: 8px; }
.attn-n { min-width: 22px; height: 22px; border-radius: 11px; background: var(--warn); color: #fff; font-size: 12px; display: inline-grid; place-items: center; padding: 0 6px; }
.attn { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-bottom: 18px; }
.acard {
  display: flex; align-items: center; gap: 12px; box-sizing: border-box; border-radius: 18px; padding: 14px 16px; min-height: 84px;
  text-decoration: none; color: inherit; cursor: pointer; border: 0; text-align: left; width: 100%;
  transition: transform .15s, box-shadow .15s; animation: rise .45s var(--ease) both;
}
.acard:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(23,21,31,.12); color: inherit; }
.acard .ai { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; font-size: 20px; }
.acard .at { font-size: 14px; font-weight: 800; line-height: 1.25; }
.acard .as { font-size: 12.5px; font-weight: 500; }
.acard .ac { margin-left: auto; font-size: 16px; opacity: .7; }
.acard.qr    { background: #FFF6E0; box-shadow: inset 0 0 0 1.5px #F0D28A; } .acard.qr .ai { background: #FFE4A8; color: #5B3E00; } .acard.qr .as { color: #7A5200; }
.acard.app   { background: var(--brand-light); box-shadow: inset 0 0 0 1.5px #CFC8F8; } .acard.app .ai { background: #D8D2FA; color: #4535B5; } .acard.app .as { color: #4535B5; }
.acard.plain { background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); } .acard.plain .ai { background: var(--bg); } .acard.plain .as { color: var(--ink-3); }
.acard.stop  { background: var(--danger-bg); box-shadow: inset 0 0 0 1.5px #F4BCC5; } .acard.stop .ai { background: #F9CFD6; color: #B8293F; } .acard.stop .as { color: #9A2236; }
.acard.low   { background: var(--warn-bg); box-shadow: inset 0 0 0 1.5px #F0D28A; } .acard.low .ai { background: #FFE4A8; color: #7A5200; } .acard.low .as { color: #7A5200; }
[data-bs-theme="dark"] .acard.plain { background: #1B1A27; }
[data-bs-theme="dark"] .acard .at { color: var(--ink); }
.acard.pulse .ai { animation: ring 2s infinite; }

/* ----- Zonalar va filtr ----- */
.zbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.ztabs { display: flex; gap: 8px; flex-wrap: wrap; }
.zchip {
  border: 0; cursor: pointer; border-radius: 999px; padding: 9px 16px; font-size: 13.5px; font-weight: 700; display: inline-flex;
  align-items: center; gap: 8px; background: #fff; color: var(--ink); transition: background .15s, color .15s, transform .1s; font-family: inherit;
}
.zchip:active { transform: scale(.96); }
.zchip .n { min-width: 22px; height: 22px; border-radius: 11px; background: var(--bg); color: var(--ink-2); font-size: 12px; display: inline-grid; place-items: center; padding: 0 5px; }
.zchip.on { background: var(--ink); color: var(--bg); }
.zchip.on .n { background: rgba(255,255,255,.2); color: inherit; }
[data-bs-theme="dark"] .zchip { background: #1B1A27; }
[data-bs-theme="dark"] .zchip.on { background: var(--brand); color: #fff; }
.fseg { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: color-mix(in srgb, var(--line) 70%, transparent); }
.fseg button { border: 0; cursor: pointer; border-radius: 10px; padding: 8px 16px; font-size: 13px; font-weight: 700; background: transparent; color: var(--ink-2); font-family: inherit; transition: background .15s; }
.fseg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(23,21,31,.15); }
[data-bs-theme="dark"] .fseg button.on { background: var(--brand); color: #fff; }

/* ----- Stollar ----- */
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; align-content: start; }
.tcard {
  display: flex; flex-direction: column; box-sizing: border-box; border-radius: 20px; padding: 16px 16px 14px; min-height: 140px;
  cursor: pointer; transition: transform .15s var(--ease), box-shadow .15s; text-decoration: none; position: relative;
  animation: rise .45s var(--ease) both; -webkit-tap-highlight-color: transparent;
}
.tcard:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(23,21,31,.16); }
.tcard:active { transform: scale(.97); }
.tcard .tz { font-size: 12px; font-weight: 600; opacity: .8; }
.tcard .tn { font-size: 30px; font-weight: 800; line-height: 1.05; letter-spacing: -.02em; }
.tcard .tp { font-size: 11.5px; font-weight: 700; padding: 5px 10px; border-radius: 999px; white-space: nowrap; align-self: flex-start; }
.tcard .tl1 { font-size: 20px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.tcard .tl2 { display: flex; align-items: center; justify-content: space-between; margin-top: 2px; font-size: 12.5px; font-weight: 600; opacity: .85; gap: 6px; }
.tcard .tav { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 10.5px; font-weight: 800; }
.tcard .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.tcard .bot { margin-top: auto; }

.tcard.st-free  { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.tcard.st-free .tp { background: var(--ok-bg); color: var(--ok); }
.tcard.st-free .tav { background: var(--bg); }
.tcard.st-busy  { background: var(--brand); color: #fff; box-shadow: 0 8px 22px rgba(91,71,214,.28); }
.tcard.st-busy .tp { background: rgba(255,255,255,.18); color: #fff; }
.tcard.st-busy .tav { background: rgba(255,255,255,.22); }
.tcard.st-ready { background: var(--ok); color: #fff; box-shadow: 0 8px 22px rgba(14,138,90,.28); }
.tcard.st-ready .tp { background: rgba(255,255,255,.2); color: #fff; }
.tcard.st-ready .tav { background: rgba(255,255,255,.22); }
.tcard.st-bill  { background: #FFC247; color: #3A2600; box-shadow: 0 8px 22px rgba(255,194,71,.35); }
.tcard.st-bill .tp { background: rgba(58,38,0,.12); color: #3A2600; }
.tcard.st-bill .tav { background: rgba(58,38,0,.14); }
.tcard.st-res   { background: #E6EFFD; color: #1B3F7A; box-shadow: inset 0 0 0 1.5px #BCD3F7; }
.tcard.st-res .tp { background: #CFE0FA; color: #1B3F7A; }
.tcard.st-qr    { background: #FFF6E0; color: var(--ink); box-shadow: inset 0 0 0 1.5px #E0A93A; }
.tcard.st-qr .tp { background: #FFE4A8; color: #5B3E00; }
[data-bs-theme="dark"] .tcard.st-free { background: #1B1A27; }
[data-bs-theme="dark"] .tcard.st-res  { background: #17233A; color: #BCD3F7; }
[data-bs-theme="dark"] .tcard.st-qr   { background: #3A2B10; color: var(--ink); }
.tcard.st-bill { animation: rise .45s var(--ease) both, glow 2.4s ease-in-out infinite .5s; }
.tcard.st-busy .tm, .tcard.st-ready .tm, .tcard.st-bill .tm { font-variant-numeric: tabular-nums; }
.tcard.hide { display: none; }

/* ----- Kassa: yon menyu (Yana) ----- */
.pos2 .sidebar { background: #fff; z-index: 1060; box-shadow: var(--shadow-lg); border-right: 0; }
[data-bs-theme="dark"] .pos2 .sidebar { background: #1B1A27; }
.pos2 .sidebar a.nav-x { border-left: 0; margin: 2px 10px; padding: 11px 14px; border-radius: 12px; font-weight: 600; }
.pos2 .sidebar a.nav-x.active, .pos2 .sidebar a.nav-x:hover { background: var(--brand-light); color: var(--brand-dark); }
.pos2 .sidebar-brand { border: 0; color: var(--ink); }
.pos2 .sidebar-backdrop { z-index: 1055; backdrop-filter: blur(2px); }

/* ----- Animatsiyalar ----- */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.7); } }
@keyframes ring { 0%, 100% { box-shadow: 0 0 0 0 rgba(224,138,0,.5); } 60% { box-shadow: 0 0 0 10px rgba(224,138,0,0); } }
@keyframes glow { 0%, 100% { box-shadow: 0 8px 22px rgba(255,194,71,.35); } 50% { box-shadow: 0 8px 30px rgba(255,194,71,.7); } }
@keyframes shimmer { from { background-position: -200px 0; } to { background-position: 200px 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ----- Planshet va telefon ----- */
@media (max-width: 1199px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pos-search { display: none; }
}
@media (max-width: 991px) {
  .rail { display: none; }
  .pos-main { margin-left: 0; }
  .pos-burger { display: inline-flex; }
  .pos-top { padding: 0 14px; height: 64px; gap: 10px; }
  .pos-content { padding: 0 14px 24px; }
  .pos-top .btn-o span { display: none; }
  .btn-o { padding: 0 14px; }
  .pos-clock { display: none; }
  .tgrid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .tcard { min-height: 124px; border-radius: 18px; }
  .tcard .tn { font-size: 26px; }
  .kpi-v { font-size: 20px; }
}
@media (max-width: 575px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 12px 14px; }
  .shift-pill { padding: 0 10px; font-size: 12px; }
  .pos-top .ttl-s { display: none; }
  .pos-top h1 { font-size: 20px; }
}

/* Stol kartochkasi: vaqt qatorga bo'linmasin, ism qisqarsin */
.tcard .tm { white-space: nowrap; flex: none; }
.tcard .tl2 > span:first-child { min-width: 0; flex: 1 1 auto; overflow: hidden; }

@media (max-width: 575px) {
  .attn { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; margin-left: -14px; margin-right: -14px; padding: 2px 14px 6px; scrollbar-width: none; }
  .attn::-webkit-scrollbar { display: none; }
  .acard { min-width: 260px; flex: none; scroll-snap-align: start; min-height: 72px; }
}

/* =====================================================================
   BUYURTMA EKRANI
   ===================================================================== */
body.order-page { background: var(--bg); }

.ord-top {
  height: 64px; display: flex; align-items: center; gap: 14px; padding: 0 20px; background: var(--bg);
  position: sticky; top: 0; z-index: 30;
}
@media (min-width: 992px) { .ord-top { position: fixed; top: 0; left: 0; right: 0; } }
.ord-ttl-s { font-size: 12px; font-weight: 600; color: var(--ink-3); line-height: 1.1; }
.ord-ttl-m { font-size: 21px; font-weight: 800; letter-spacing: -.01em; line-height: 1.15; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.ord-no { font-size: 12.5px; font-weight: 700; background: var(--brand-light); color: var(--brand-dark); border-radius: 999px; padding: 3px 10px; }
.ord-search { max-width: 340px; margin-left: 8px; display: flex !important; }
@media (max-width: 991px) { .ord-top { padding: 0 12px; gap: 8px; } .ord-search { max-width: none; flex: 1; margin-left: 0; } .ord-ttl-s { display: none; } .ord-ttl-m { font-size: 18px; } }

/* --- Kategoriyalar --- */
.cat-bar { background: transparent; border: 0; padding: 4px 20px 10px; gap: 8px; }
.cat-chip { background: #fff; color: var(--ink); border-radius: 999px; padding: 10px 18px; font-size: 14px; font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--line); transition: background .15s, color .15s, transform .1s; }
.cat-chip:active { transform: scale(.96); }
.cat-chip.active { background: var(--ink); color: var(--bg); box-shadow: none; }
[data-bs-theme="dark"] .cat-chip { background: #1B1A27; }
[data-bs-theme="dark"] .cat-chip.active { background: var(--brand); color: #fff; }

/* --- Mahsulot kartochkalari: hammasi bitta 4:3 ramkada --- */
.prod-grid { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; padding: 4px 20px 24px; }
.prod-card {
  border: 0; border-radius: 18px; box-shadow: var(--shadow); min-height: 0; height: auto; background: #fff;
  transition: transform .15s var(--ease), box-shadow .15s;
}
[data-bs-theme="dark"] .prod-card { background: #1B1A27; }
.prod-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(23,21,31,.14); }
.prod-card:active { transform: scale(.97); border-color: transparent; }
.prod-img {
  height: auto; flex: none; aspect-ratio: 4 / 3; padding: 0; background: var(--brand-light);
  display: block; position: relative; overflow: hidden;
}
[data-bs-theme="dark"] .prod-img { background: #26233A; }
.prod-img img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; display: block; background: #fff; }
.prod-card.framed .prod-img img { object-fit: cover; }
.prod-img .ph { position: absolute; inset: 0; display: none; place-items: center; font-size: 34px; color: var(--brand); opacity: .55; }
.prod-card.noimg { min-height: 0; }
.prod-card.noimg .prod-img { display: block; }
.prod-card.noimg .prod-img img, .prod-card.noimg .zoom-hint { display: none; }
.prod-card.noimg .prod-img .ph { display: grid; }
.prod-card.noimg .prod-body { min-height: 0; justify-content: space-between; padding: 10px 12px 12px; }
.prod-body { padding: 10px 12px 12px; gap: 6px; }
.prod-name { font-size: 13.5px; font-weight: 700; line-height: 1.3; min-height: 35px; }
.prod-price { font-size: 15px; font-weight: 800; color: var(--brand-dark); }
.zoom-hint { background: rgba(23,21,31,.55); width: 26px; height: 26px; border-radius: 8px; right: 7px; bottom: 7px; }
.stop-tag { border-radius: 8px; }
@media (max-width: 575px) { .prod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 4px 12px 24px; } .cat-bar { padding: 4px 12px 8px; } }

/* --- Savat --- */
.cart { background: #fff; border-left: 0; box-shadow: -8px 0 30px rgba(23,21,31,.06); }
[data-bs-theme="dark"] .cart { background: #1B1A27; }
.cart-head { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.cart-head .fw-semibold { font-size: 18px; font-weight: 800 !important; }
.cart-items { padding: 10px 14px; }
.cart-sec { font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: 10px 4px 4px; }
.cart-sec.new { color: var(--brand); }
.cart-item { padding: 12px 8px; border-bottom: 1px solid var(--line); gap: 12px; animation: rise .25s var(--ease) both; }
.cart-item .ci-name { font-size: 14.5px; font-weight: 700; }
.cart-item .ci-sum { font-weight: 800; font-size: 14.5px; }
.cart-item.sent { background: transparent; opacity: .82; }
.cart-item.sent .ci-name { color: var(--ink-2); }
.qty-box { background: var(--bg); border-radius: 12px; padding: 3px; gap: 2px; }
.qty-btn { width: 34px; height: 34px; border: 0; border-radius: 10px; background: #fff; font-weight: 700; box-shadow: 0 1px 2px rgba(23,21,31,.1); }
[data-bs-theme="dark"] .qty-btn { background: #2A2840; color: var(--ink); }
.qty-val { min-width: 30px; font-weight: 800; }
.cart-foot { background: transparent; border-top: 1px solid var(--line); padding: 14px 18px 18px; }
.total-row.big { font-size: 24px; font-weight: 800; border-top: 1px dashed var(--line); }
.cta { height: 58px; font-size: 17px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.cta:disabled { background: var(--line); border-color: var(--line); color: var(--ink-3); box-shadow: none; opacity: 1; }
.cart-handle { background: var(--ink); color: var(--bg); }

/* --- To'lov oynasi --- */
.pay-dlg { max-width: 760px; }
.pay-total { background: var(--brand-light); border-radius: 20px; padding: 16px 20px; text-align: center; margin-bottom: 16px; }
.pay-total-l { font-size: 13px; font-weight: 700; color: var(--brand-dark); }
.pay-total-v { font-size: 40px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.15; }
.pay-total-v small { font-size: 16px; color: var(--ink-3); font-weight: 600; }
.pay-methods { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pay-btn {
  padding: 14px 8px; border-radius: 16px; border: 2px solid var(--line); background: #fff; font-weight: 700; font-size: 13.5px;
  display: flex; flex-direction: column; align-items: center; gap: 6px; line-height: 1.2; transition: border-color .15s, background .15s, transform .1s;
}
[data-bs-theme="dark"] .pay-btn { background: #1B1A27; color: var(--ink); }
.pay-btn i { font-size: 24px; margin: 0; }
.pay-btn.active { border-color: var(--brand); background: var(--brand-light); color: var(--brand-dark); }
.cash-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.pay-input { height: 64px; font-size: 30px; font-weight: 800; text-align: center; border-radius: 16px; font-variant-numeric: tabular-nums; }
.pay-change { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--ok-bg); color: var(--ok); font-weight: 700; }
.pay-change b { font-size: 24px; font-weight: 800; }
.pay-short { margin-top: 10px; padding: 10px 14px; border-radius: 12px; background: var(--warn-bg); color: #8A5300; font-weight: 700; }
[data-bs-theme="dark"] .pay-short { color: var(--warn); }
.pay-pad { gap: 8px; }
.pay-pad button { height: 58px; border-radius: 14px; border: 0; background: var(--bg); font-size: 22px; font-weight: 700; color: var(--ink); transition: background .12s, transform .08s; }
.pay-pad button:active { background: var(--brand-light); transform: scale(.95); }
.pay-info .pay-note { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 16px; background: var(--brand-light); }
.pay-note > i { font-size: 30px; color: var(--brand); flex: none; }
.trans-card { font-size: 24px; font-weight: 800; letter-spacing: .06em; font-variant-numeric: tabular-nums; word-break: break-all; margin-top: 2px; }
.qr-box { background: #fff; border-radius: 20px; padding: 10px; display: inline-block; box-shadow: inset 0 0 0 1.5px var(--line); }
.qr-box svg { width: 220px; height: 220px; }
.qr-done { width: 220px; height: 220px; display: grid; place-content: center; text-align: center; color: var(--ok); font-weight: 800; font-size: 24px; animation: rise .3s var(--ease) both; }
.qr-done i { font-size: 76px; line-height: 1; }
.click-state { border-radius: 14px; font-weight: 700; }
@media (max-width: 575px) {
  .cash-grid { grid-template-columns: 1fr; }
  .pay-methods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pay-total-v { font-size: 32px; }
}

/* Rasmni kattalashtirish: faqat burchakdagi lupa tugmasi */
.prod-img[data-zoom] { cursor: pointer; }
.zoom-hint {
  pointer-events: auto !important; cursor: zoom-in; top: 8px; right: 8px; bottom: auto; width: 34px; height: 34px;
  border-radius: 10px; font-size: 16px; background: rgba(23,21,31,.55); backdrop-filter: blur(4px); opacity: 1;
}
.zoom-hint::before { content: ''; position: absolute; inset: -8px; }
.zoom-hint:hover { background: rgba(23,21,31,.8); }
.iz-add { margin-top: 14px; min-width: 200px; }
.iz-inner img { background: transparent; }
.btn-link { text-decoration: none; }
.ci-edit { font-size: 11px; color: var(--ink-3); opacity: .6; margin-left: 2px; }
.ch-count.bump, .cart-handle .ch-count.bump { animation: bump .3s var(--ease); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }

/* =====================================================================
   OFITSIANT
   ===================================================================== */
.w-top { position: sticky; top: 0; height: 64px; padding: 0 14px; gap: 10px; }
.w-me { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-weight: 800; }
.w-top .ord-search { max-width: none; flex: 1; margin-left: 0; }
.w-top .pos-clock { display: none; }
@media (min-width: 992px) { .waiter-mode.pos2 .pos-content { max-width: 1100px; margin: 0 auto; } }
.bottom-nav { background: #fff; border-top: 0; box-shadow: 0 -6px 24px rgba(23,21,31,.08); padding-top: 6px; }
[data-bs-theme="dark"] .bottom-nav { background: #1B1A27; }
.bottom-nav a { font-weight: 700; font-size: 11.5px; color: var(--ink-3); }
.bottom-nav a i { font-size: 22px; }
.bottom-nav a.active { color: var(--brand); }
body.has-bottom-nav .pos-content { padding-bottom: 96px; }
@media (max-width: 575px) { .ord-top .util-bar { display: none; } }

/* =====================================================================
   ADMIN PANEL
   ===================================================================== */
body { background: var(--bg); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-check-input:focus { box-shadow: 0 0 0 4px rgba(91,71,214,.18); border-color: var(--brand); }
.form-switch { padding-left: 3.3em; }
.form-switch .form-check-input { width: 2.6em; height: 1.4em; cursor: pointer; margin-left: -3.3em; }
.form-switch .form-check-label { padding-top: 1px; }
.alert { border: 0; border-radius: 14px; }

/* --- Yon menyu --- */
.sidebar { border-right: 0; box-shadow: 1px 0 0 var(--line); padding-bottom: 12px; scrollbar-width: thin; }
.sidebar-brand { border-bottom: 0; padding: 22px 22px 10px; font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.sidebar-brand i { width: 38px; height: 38px; border-radius: 12px; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 18px; box-shadow: 0 6px 16px rgba(91,71,214,.35); }
.sidebar-group { font-size: 11px; font-weight: 800; letter-spacing: .08em; padding: 18px 24px 6px; }
.sidebar .nav-x {
  display: flex; align-items: center; gap: 12px; width: calc(100% - 20px); margin: 2px 10px; padding: 10px 14px;
  border: 0; border-radius: 12px; background: transparent; color: var(--ink-2); font: inherit; font-size: 14.5px; font-weight: 600;
  text-align: left; text-decoration: none; cursor: pointer; transition: background .15s, color .15s;
}
.sidebar .nav-x i { font-size: 18px; width: 20px; flex: none; }
.sidebar .nav-x:hover { background: var(--bg); color: var(--ink); }
.sidebar .nav-x.active { background: var(--brand-light); color: var(--brand-dark); font-weight: 800; border-left: 0; }
.nav-drop .drop-arrow { margin-left: auto; font-size: 11px !important; width: auto !important; }
.nav-sub-inner { margin-left: 32px; border-left-color: var(--line); }
.nav-sub-item { font-weight: 600; border-radius: 0 10px 10px 0; }
.nav-sub-item.active { color: var(--brand-dark); font-weight: 800; background: var(--brand-light); }

/* --- Tepa panel --- */
.topbar { height: 68px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 0; padding: 0 28px; }
[data-bs-theme="dark"] .topbar { background: color-mix(in srgb, var(--bg) 88%, transparent); }
.page-title { font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.content { padding: 8px 28px 32px; }
@media (max-width: 991px) { .topbar { padding: 0 14px; } .content { padding: 8px 14px 28px; } .page-title { font-size: 20px; } }

/* --- Kartalar va ko'rsatkichlar --- */
.stat { border: 0; border-radius: 20px; padding: 18px 20px; box-shadow: var(--shadow); background: var(--card); transition: transform .18s var(--ease), box-shadow .18s; animation: rise .5s var(--ease) both; }
a.stat:hover, .stat:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(23,21,31,.1); }
.row > :nth-child(2) > .stat { animation-delay: .05s; } .row > :nth-child(3) > .stat { animation-delay: .1s; } .row > :nth-child(4) > .stat { animation-delay: .15s; }
.stat-label { font-size: 12px; font-weight: 700; letter-spacing: .05em; color: var(--ink-3); }
.stat-value { font-size: 28px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-icon { width: 46px; height: 46px; border-radius: 14px; font-size: 21px; }
.card-x { border: 0; border-radius: 20px; box-shadow: var(--shadow); background: var(--card); animation: rise .5s var(--ease) both; }
.chart-card { overflow: hidden; }
.chart-box { position: relative; width: 100%; }
.fseg-sm button { padding: 6px 12px; font-size: 12.5px; }

/* --- Jadvallar --- */
.table { --bs-table-bg: transparent; }
.table thead th { background: transparent; color: var(--ink-3); font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; border-bottom: 1.5px solid var(--line); }
.table td { border-color: var(--line); font-weight: 500; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--bg); }
.progress { background: var(--bg); border-radius: 999px; overflow: hidden; }
.progress-bar { border-radius: 999px; }
.badge-x { border-radius: 999px; font-weight: 700; padding: 5px 11px; font-size: 12px; }

/* =====================================================================
   Yuqori banner (xabarlar / litsenziya) va to'lov oynasi
   ===================================================================== */
:root { --nb: 0px; }
.nb-wrap { position: fixed; top: 0; left: 0; right: 0; z-index: 1045; display: flex; flex-direction: column; }
.nb-item {
  display: flex; align-items: center; gap: 12px; padding: 9px 16px; min-height: 42px;
  font-size: 14px; line-height: 1.35; color: #fff; width: 100%;
}
.nb-item + .nb-item { border-top: 1px solid rgba(255,255,255,.22); }
.nb-info    { background: #2f6fe4; }
.nb-warning { background: #d98a00; }
.nb-danger  { background: #d33a3a; }
.nb-update  { background: var(--brand, #5B47D6); }
.nb-ic { font-size: 18px; flex: none; }
.nb-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.nb-btn {
  flex: none; border: 0; border-radius: 9px; padding: 6px 16px; font-weight: 700; font-size: 13.5px;
  background: #fff; color: #1d1b26; cursor: pointer; white-space: nowrap;
}
.nb-btn:hover { filter: brightness(.94); }
.nb-x {
  flex: none; border: 0; background: rgba(255,255,255,.18); color: #fff; width: 28px; height: 28px; border-radius: 8px;
  font-size: 20px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0 0 2px;
}
.nb-x:hover { background: rgba(255,255,255,.32); }

/* Banner chiqqanda sahifa pastga suriladi */
body.has-nb { padding-top: var(--nb); }
body.has-nb .sidebar, body.has-nb .rail { top: var(--nb); }
body.has-nb .topbar, body.has-nb .pos-top, body.has-nb .w-top { top: var(--nb); }
body.has-nb .pos-topbar, body.has-nb .ord-top { top: var(--nb); }
body.has-nb .pos-shell, body.has-nb .main { min-height: calc(100vh - var(--nb)); }
@media (min-width: 992px) {
  body.has-nb.order-page .order-layout { top: calc(64px + var(--nb)); }
  body.has-nb.order-page .pos-topbar { top: var(--nb); }
}

/* To'lov oynasi */
.sp-ov { position: fixed; inset: 0; z-index: 3600; background: rgba(20,17,35,.55); display: grid; place-items: center; padding: 16px; }
.sp-card { position: relative; width: 100%; max-width: 400px; max-height: 94vh; overflow: auto; background: var(--card, #fff); color: var(--ink, #1d1b26); border-radius: 22px; padding: 22px 22px 20px; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.sp-close { position: absolute; top: 10px; right: 12px; border: 0; background: transparent; font-size: 26px; line-height: 1; color: var(--ink-3, #8a8799); cursor: pointer; }
.sp-title { font-weight: 800; margin: 0 28px 10px 0; font-size: 18px; }
.sp-sub { font-size: 13px; color: var(--ink-3, #6f6c80); margin: 8px 0; text-align: center; }
.sp-per { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.sp-chip { border: 1.5px solid var(--line, #e6e3f1); background: transparent; color: inherit; border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 13.5px; cursor: pointer; }
.sp-chip.on { background: var(--brand, #5B47D6); border-color: var(--brand, #5B47D6); color: #fff; }
.sp-sum { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; margin: 6px 0 12px; }
.sp-sum b { font-size: 22px; font-weight: 800; }
.sp-qr { width: 100%; aspect-ratio: 1; max-width: 270px; margin: 0 auto; background: #fff; border-radius: 16px; padding: 8px; display: grid; place-items: center; border: 1px solid var(--line, #e6e3f1); }
.sp-qr svg { width: 100%; height: 100%; display: block; }
.sp-err { color: #b01818; font-size: 13px; text-align: center; }
.sp-state { text-align: center; font-weight: 600; font-size: 14px; margin: 8px 0 12px; color: var(--ink-3, #6f6c80); }
.sp-state.ok { color: #0a8a46; font-size: 16px; }
.sp-btns { display: flex; gap: 8px; }
.sp-btn { flex: 1; text-align: center; border: 1.5px solid var(--line, #e6e3f1); background: transparent; color: inherit; border-radius: 12px; padding: 9px 10px; font-weight: 700; font-size: 13.5px; cursor: pointer; text-decoration: none; }
.sp-btn:hover { background: var(--brand-light, #efecff); color: inherit; }
[data-bs-theme="dark"] .sp-qr { border-color: transparent; }
@media (max-width: 575px) { .nb-item { padding: 8px 12px; font-size: 13px; } }

/* =====================================================================
   v9.2 — Buyurtma ekrani, telefon/planshet: savat pastdan chiqadigan varaq
   (kassa ham, ofitsiant ham). Tutqichga bosilsa ochiladi, yana bossa pastga tushadi.
   ===================================================================== */
@media (max-width: 991px) {
  .order-page .cart {
    position: fixed !important; left: 0; right: 0; bottom: 0; top: auto;
    z-index: 1050; width: auto;
    height: auto !important; max-height: 86vh; max-height: 86dvh;
    display: flex !important; flex-direction: column;
    border: 0; border-top: 1px solid var(--line); border-radius: 22px 22px 0 0;
    box-shadow: 0 -10px 40px rgba(23,21,31,.22);
    transform: translateY(calc(100% - 66px - env(safe-area-inset-bottom, 0px)));
    transition: transform .26s var(--ease, ease);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .order-page .cart.open { transform: translateY(0); }
  .order-page .cart-handle {
    display: flex !important; align-items: center; gap: 10px; flex: 0 0 auto;
    min-height: 66px; padding: 0 18px; cursor: pointer; user-select: none; -webkit-user-select: none;
    background: var(--brand); color: #fff; border: 0; border-radius: 22px 22px 0 0;
    position: relative;
  }
  .order-page .cart-handle::before {      /* kichik "ushlagich" chizig'i */
    content: ""; position: absolute; top: 7px; left: 50%; width: 38px; height: 4px; margin-left: -19px;
    border-radius: 4px; background: rgba(255,255,255,.55);
  }
  .order-page .cart-handle .ch-count { background: #fff; color: var(--brand-dark, var(--brand)); margin-top: 6px; }
  .order-page .cart-handle > span:nth-child(2) { margin-top: 6px; font-weight: 700; }
  .order-page .cart-handle .ch-sum { color: #fff; margin-top: 6px; font-size: 18px; }
  .order-page .cart-handle .ch-arrow { color: #fff; margin-top: 6px; font-size: 18px; }
  .order-page .cart.open .ch-arrow { transform: rotate(180deg); }
  .order-page .cart-head, .order-page .cart-foot { flex: 0 0 auto; }
  .order-page .cart-items {
    flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  }
  .order-page .prod-grid { padding-bottom: 96px !important; }
  .cart-backdrop {
    position: fixed; inset: 0; z-index: 1049; background: rgba(15,12,24,.45);
    opacity: 0; pointer-events: none; transition: opacity .22s ease;
  }
  .cart-backdrop.on { opacity: 1; pointer-events: auto; }
  /* Kassadagi tepa panel va kategoriya paneli telefonda tor bo'lsin */
  .order-page .ord-top { gap: 8px; padding-left: 10px; padding-right: 10px; }
}
@media (min-width: 992px) { .cart-backdrop { display: none; } }

/* =====================================================================
   v9.2 — Telefon: yuqori panel sig'adi (to'liq ekran va AnyDesk tugmalari
   telefonda kerak emas, ular yashirinadi — til, tun rejimi, qo'ng'iroq qoladi)
   ===================================================================== */
@media (max-width: 575px) {
  .util-bar [data-fs-btn], .util-bar .util-desk { display: none !important; }
  .util-bar { flex: 0 0 auto; }
}
html, body { max-width: 100%; }
body { overflow-x: hidden; }

/* Telefon: tepa panel ikki qatorga bo'linadi (1-qator: menyu, sarlavha, til/tun;
   2-qator: sahifaning asosiy tugmalari) — hech narsa ekrandan chiqib ketmaydi */
@media (max-width: 767px) {
  .topbar { height: auto !important; min-height: 60px; flex-wrap: wrap; row-gap: 8px; column-gap: 10px; padding: 9px 12px !important; }
  .topbar .page-title { flex: 1 1 110px; min-width: 110px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar > .util-bar { order: 2; }
  .topbar > :not(.util-bar):not(.page-title):not(.d-lg-none):not(.d-md-flex) {
    order: 3; flex: 1 1 auto; min-width: 44%; justify-content: center;
  }
  .topbar > form.d-flex input { width: 100%; }
  .topbar .btn { white-space: normal; }
}

/* Telefon: jadval qatorlari kartaga aylanadi */
@media (max-width: 575px) {
  .table-responsive { overflow: visible; }
  table.rtbl, table.rtbl > tbody, table.rtbl > tfoot { display: block; width: 100%; }
  table.rtbl > thead { display: none; }
  table.rtbl > tbody > tr, table.rtbl > tfoot > tr {
    display: block; background: var(--card, #fff); border: 1px solid var(--line); border-radius: 16px;
    padding: 6px 14px; margin: 0 0 10px; box-shadow: 0 1px 2px rgba(23,21,31,.04);
  }
  table.rtbl > tbody > tr > td, table.rtbl > tfoot > tr > td {
    display: flex; justify-content: space-between; align-items: center; gap: 14px;
    padding: 8px 0 !important; border: 0 !important; border-bottom: 1px dashed var(--line) !important;
    text-align: right; width: auto !important; background: transparent !important; font-size: 14px;
  }
  table.rtbl > tbody > tr > td:last-child { border-bottom: 0 !important; }
  table.rtbl > tbody > tr > td::before {
    content: attr(data-label); flex: 0 0 40%; max-width: 45%; text-align: left;
    font-size: 11.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-3);
  }
  table.rtbl > tbody > tr > td.rtbl-nolabel { justify-content: flex-start; text-align: left; }
  table.rtbl > tbody > tr > td.rtbl-nolabel::before, table.rtbl > tbody > tr > td.rtbl-empty { display: none; }
  table.rtbl > tbody > tr.rtbl-wide > td { display: table-cell; }
  table.rtbl > tbody > tr.rtbl-wide > td::before { display: none; }
  table.rtbl .btn, table.rtbl .btn-o { white-space: nowrap; }
  table.rtbl td > .d-flex, table.rtbl td > div { max-width: 100%; }
}

/* --- Hisobni teng bo'lish --- */
.bill-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bill-row .btn-o { width: 100%; padding-left: 8px; padding-right: 8px; white-space: nowrap; }
.split-info {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; cursor: pointer;
  background: var(--brand-light); color: var(--brand-dark); font-weight: 700; font-size: 14px;
}
.sp-total { text-align: center; background: var(--brand-light); border-radius: 18px; padding: 12px 16px; margin-bottom: 14px; }
.sp-total-l, .sp-res-l { font-size: 12.5px; font-weight: 700; color: var(--brand-dark); }
.sp-total-v { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.15; }
.sp-total-v small, .sp-res-v small { font-size: 14px; font-weight: 600; color: var(--ink-3); }
.sp-label { text-align: center; font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.sp-stepper { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 10px; }
.sp-stepper button {
  width: 56px; height: 56px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--card, #fff);
  color: var(--ink); font-size: 22px; display: grid; place-items: center; cursor: pointer;
}
.sp-stepper button:active { transform: scale(.94); background: var(--brand-light); }
.sp-stepper > div { min-width: 90px; text-align: center; line-height: 1.05; }
.sp-stepper b { display: block; font-size: 44px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sp-stepper span { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.sp-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 14px; }
.sp-chips button {
  min-width: 44px; height: 40px; padding: 0 12px; border-radius: 12px; border: 1.5px solid var(--line);
  background: transparent; color: var(--ink); font-weight: 700; cursor: pointer;
}
.sp-chips button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.sp-result { text-align: center; border: 2px dashed var(--brand); border-radius: 18px; padding: 12px; }
.sp-res-v { font-size: 38px; font-weight: 800; color: var(--brand-dark); font-variant-numeric: tabular-nums; line-height: 1.15; }
[data-bs-theme="dark"] .sp-res-v { color: var(--brand); }
.sp-res-n { font-size: 13px; color: var(--ink-3); min-height: 18px; }
.sp-foot { flex-wrap: nowrap; }
.sp-foot .btn { min-height: 48px; border-radius: 14px; font-weight: 700; }
@media (max-width: 420px) { .sp-foot { flex-wrap: wrap; } .sp-foot .btn { flex: 1 1 100%; } }

/* QR menyu: ochilish usuli tanlash */
.qm-via { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 2px solid var(--line); border-radius: 16px; cursor: pointer; height: 100%; position: relative; }
.qm-via input { position: absolute; opacity: 0; pointer-events: none; }
.qm-via > i { font-size: 26px; color: var(--brand); flex: none; }
.qm-via b { display: block; margin-bottom: 2px; }
.qm-via span { font-size: 13px; color: var(--ink-3); display: block; line-height: 1.35; }
.qm-via.on, .qm-via:has(input:checked) { border-color: var(--brand); background: var(--brand-light); }
.qm-via.dis { opacity: .7; }

/* =====================================================================
   v9.2 — Forma (CRUD oynasi): bo'limlar, rasm ko'rinishi, foyda ko'rsatkichi
   ===================================================================== */
.cf-sec { border: 1px solid var(--line); border-radius: 18px; margin-bottom: 14px; background: var(--card, #fff); overflow: hidden; }
.cf-sec-h { display: flex; align-items: center; gap: 10px; padding: 12px 16px; font-weight: 800; background: color-mix(in srgb, var(--brand-light) 55%, transparent); }
.cf-sec-h > i:first-child { color: var(--brand); font-size: 18px; }
.cf-sec-h small { font-weight: 500; color: var(--ink-3); font-size: 12.5px; }
.cf-sec-h .cf-chev { margin-left: auto; transition: transform .2s; color: var(--ink-3); }
.cf-sec-b { padding: 16px; }
.cf-collapsible .cf-sec-h { cursor: pointer; user-select: none; }
.cf-collapsible:not(.open) .cf-sec-b { display: none; }
.cf-collapsible.open .cf-chev { transform: rotate(180deg); }
.cf-img { display: flex; gap: 14px; align-items: center; }
.cf-img-prev { width: 96px; height: 96px; flex: none; border-radius: 16px; background: var(--bg); border: 2px dashed var(--line); display: grid; place-items: center; overflow: hidden; color: var(--ink-3); font-size: 28px; }
.cf-img-prev img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.margin-chip { margin-top: 8px; font-size: 13px; font-weight: 700; }
.margin-chip:empty { display: none; }
.margin-chip .mc { display: inline-flex; gap: 6px; align-items: center; padding: 5px 12px; border-radius: 999px; }
.margin-chip .ok { background: var(--ok-bg, #e5f7ee); color: var(--ok, #0a8a46); }
.margin-chip .bad { background: var(--danger-bg, #fde8e8); color: var(--danger, #c62828); }
.crud-modal .modal-body { max-height: none; background: var(--bg); }
.crud-modal .modal-footer { position: sticky; bottom: 0; background: var(--card, #fff); gap: 8px; }
@media (max-width: 767px) { .crud-modal .modal-footer .btn { flex: 1 1 auto; } .cf-sec-b { padding: 12px; } }

/* ===== v9.2 — Prixod (yangi) ===== */
.pn-results{z-index:50;max-width:440px;width:calc(100% - 24px);max-height:320px;overflow:auto;border-radius:12px}
.pn-results .list-group-item.active .hint{color:rgba(255,255,255,.85)}
.pn-list-head{padding:12px 16px;border-bottom:1px solid var(--line);display:flex;gap:8px;align-items:baseline}
.pn-row{display:grid;grid-template-columns:minmax(0,1fr) auto 110px 36px;gap:10px;align-items:center;padding:10px 16px;border-bottom:1px solid var(--line)}
.pn-row:last-child{border-bottom:0}
.pn-row-name{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pn-row-sum{text-align:right;white-space:nowrap}
.pn-step{display:flex;align-items:center;gap:4px}
.pn-step button{width:30px;height:30px;border-radius:8px;border:1px solid var(--line);background:var(--card,#fff);color:var(--ink);display:inline-flex;align-items:center;justify-content:center;padding:0}
.pn-step input{width:64px;height:30px;text-align:center;border:1px solid var(--line);border-radius:8px;background:var(--card,#fff);color:var(--ink);font-weight:600}
.pn-step .hint{margin-left:4px;min-width:26px}
.pn-msg{position:fixed;left:50%;top:76px;transform:translateX(-50%);z-index:2000;padding:10px 18px;border-radius:12px;font-weight:600;font-size:14px;box-shadow:0 8px 24px rgba(0,0,0,.18);max-width:92vw}
.pn-msg.ok{background:#16a34a;color:#fff}
.pn-msg.err{background:#dc2626;color:#fff}
.pn-bar{display:none}
@media (max-width:991px){
  .pn-wrap{padding-bottom:84px}
  .pn-bar{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:1040;gap:12px;align-items:center;justify-content:space-between;
    padding:10px 16px calc(10px + env(safe-area-inset-bottom));background:var(--card,#fff);border-top:1px solid var(--line);box-shadow:0 -6px 20px rgba(0,0,0,.08)}
  .pn-bar-sum{display:flex;flex-direction:column;line-height:1.15}
  .pn-bar-sum b{font-size:20px}
  .pn-bar .btn{min-height:46px;padding:0 22px;font-weight:700}
  #saveForm .btn-brand,#saveForm .btn-light{display:none}
  #saveForm .total-row.big{display:none}
}
@media (max-width:575px){
  .pn-row{grid-template-columns:minmax(0,1fr) auto 32px;grid-template-areas:"name name del" "step sum sum"}
  .pn-row-main{grid-area:name}
  .pn-step{grid-area:step}
  .pn-row-sum{grid-area:sum}
  .pn-row-del{grid-area:del}
}
