@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Cormorant+Garamond:ital,wght@0,500;1,500&display=swap');

:root {
  --serif: 'Playfair Display', Georgia, 'Iowan Old Style', serif;
  --script: 'Cormorant Garamond', Georgia, serif;

  --bg: #14120e;
  --bg-elev: #1b1812;
  --surface: #201c15;
  --surface-2: #262119;
  --border: rgba(201, 162, 39, 0.16);
  --border-strong: rgba(201, 162, 39, 0.32);
  --text: #f3ecdd;
  --text-dim: #b3a891;
  --text-faint: #7c7360;

  --gold: #c9a227;
  --gold-2: #e3c467;
  --gold-dark: #96770f;
  --gold-light: rgba(201, 162, 39, 0.16);

  --primary: var(--gold);
  --primary-dark: var(--gold-dark);
  --primary-light: var(--gold-light);

  --danger: #e2665c;
  --danger-light: rgba(226, 102, 92, 0.16);
  --warn: #d99a3d;
  --warn-light: rgba(217, 154, 61, 0.16);
  --ok: #4fae74;
  --ok-light: rgba(79, 174, 116, 0.16);

  --paper: #f8f3e6;
  --paper-text: #2a251c;

  --radius: 12px;
  --radius-sm: 9px;
  --radius-lg: 18px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 26px -8px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 28px 60px -18px rgba(0, 0, 0, 0.75);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h: 60px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

body {
  background-image:
    radial-gradient(700px 420px at 50% -120px, rgba(201, 162, 39, 0.14), transparent 70%),
    radial-gradient(500px 300px at 100% 100%, rgba(201, 162, 39, 0.05), transparent 70%);
  background-repeat: no-repeat;
  background-attachment: fixed;
}

a { color: inherit; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea, button { font-size: 16px; } /* iOS zoom oldini olish */

::selection { background: var(--gold-light); color: var(--gold-2); }

/* ---------------- Login ---------------- */

.login-body {
  height: 100vh; display: flex; align-items: center; justify-content: center;
  background-image: radial-gradient(640px 400px at 50% 4%, rgba(201, 162, 39, 0.22), transparent 70%);
}
.login-wrap { width: 100%; max-width: 360px; padding: 24px; }
.login-card {
  background: linear-gradient(165deg, var(--surface-2) 0%, var(--bg-elev) 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 40px 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.login-card::before {
  content: ''; position: absolute; top: 0; left: 14%; right: 14%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.6;
}
.login-mark {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(155deg, var(--gold-2), var(--gold-dark)); color: #1b1812;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 700; font-size: 24px; margin-bottom: 10px;
  box-shadow: 0 10px 26px -6px rgba(201, 162, 39, 0.5), inset 0 0 0 1px rgba(255,255,255,0.25);
}
.login-boot p { margin: 0; }
.login-boot strong {
  font-family: var(--serif); font-size: 22px; font-weight: 700; letter-spacing: 0.02em; color: var(--text);
}
.login-boot .dim { color: var(--text-dim); font-size: 14px; margin-top: 6px; }
.login-label { font-size: 12px; color: var(--text-faint); margin-top: 10px; text-transform: uppercase; letter-spacing: 0.06em; }
.login-card input {
  padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2); color: var(--text); outline: none;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.login-card input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-light); }
.login-card button {
  margin-top: 12px; padding: 13px; border-radius: var(--radius-sm); border: none;
  background: linear-gradient(155deg, var(--gold-2), var(--gold-dark)); color: #1b1812; font-weight: 700;
  letter-spacing: 0.03em; text-transform: uppercase; font-size: 13px;
  box-shadow: var(--shadow-md);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), filter .15s var(--ease);
}
.login-card button:active { transform: scale(0.98); filter: brightness(0.95); }
.error-msg { color: var(--danger); font-size: 14px; min-height: 18px; }

/* ---------------- App shell ---------------- */

.app-body { padding-bottom: calc(var(--nav-h) + 16px); min-height: 100vh; }

.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(20, 18, 14, 0.86); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 16px; display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
}
.topbar h1 {
  font-family: var(--serif); font-size: 20px; font-weight: 700; margin: 0; letter-spacing: 0.01em;
}
.topbar .logout-btn {
  background: none; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 6px 12px; font-size: 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em;
  transition: border-color .15s var(--ease), color .15s var(--ease);
}
.topbar .logout-btn:active { border-color: var(--gold); color: var(--gold-2); }

/* Sidebar (>=720px) uchun "☰ Menyu" ochish tugmasi — app.js/initNavToggle()
   tomonidan har admin sahifada topbar'ga dinamik qo'shiladi. Mobil pastki
   tab-bar rejimida (720px'dan kichik) kerak emas, shuning uchun standart
   holatda yashirin. */
.nav-toggle-btn {
  display: none;
  background: none; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 6px 12px; font-size: 13px; color: var(--text-dim);
  transition: border-color .15s var(--ease), color .15s var(--ease);
}
.nav-toggle-btn:active { border-color: var(--gold); color: var(--gold-2); }

/* Sidebar orqasidagi qorong'ilashtiruvchi fon — ochiq bo'lganda bosilsa yopiladi. */
.nav-backdrop {
  position: fixed; inset: 0; background: rgba(6, 5, 3, 0.6); z-index: 25;
  opacity: 0; pointer-events: none; transition: opacity .2s var(--ease);
}
.nav-backdrop.open { opacity: 1; pointer-events: auto; }

main { max-width: 900px; margin: 0 auto; padding: 16px; }

.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--nav-h);
  background: rgba(20, 18, 14, 0.92); backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 20px -8px rgba(0, 0, 0, 0.5);
  display: flex; z-index: 10;
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; text-decoration: none; color: var(--text-faint); font-size: 11px; min-height: 44px;
  transition: color .15s var(--ease);
}
.bottom-nav a .ic { font-size: 18px; }
.bottom-nav a.active { color: var(--gold-2); font-weight: 600; }

@media (min-width: 720px) {
  /* Sidebar endi doim ochiq sticky panel emas — standart holatda yopiq,
     chapdan suriladigan drawer (topbar'dagi "☰ Menyu" tugmasi bilan ochiladi,
     bo'lim tugmasi yoki fon bosilsa yopiladi). Shu sabab position:fixed va
     translateX bilan ekrandan chiqarib turiladi, oqim (flow)dan chiqarilgan
     — main hamisha to'liq kenglikni egallaydi. */
  .bottom-nav {
    position: fixed; top: 0; left: 0; bottom: 0; height: 100vh; width: 240px;
    flex-direction: column; border-top: none; border-right: 1px solid var(--border);
    padding-top: 12px; box-shadow: 8px 0 24px -8px rgba(0, 0, 0, 0.5);
    z-index: 30; transform: translateX(-100%); transition: transform .2s var(--ease);
  }
  .bottom-nav.open { transform: translateX(0); }
  .bottom-nav a { flex-direction: row; justify-content: flex-start; gap: 10px; padding: 10px 20px; font-size: 14px; }
  .nav-toggle-btn { display: inline-flex; align-items: center; }
  .app-shell { display: flex; }
  main { flex: 1; padding: 24px; margin: 0; max-width: 900px; }
  .app-body { padding-bottom: 0; }
}

/* ---------------- Cards / tables ---------------- */

.card {
  background: linear-gradient(165deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow-sm);
}
.card-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card-title { font-family: var(--serif); font-weight: 600; letter-spacing: 0.01em; }
.card-sub { color: var(--text-dim); font-size: 13px; margin-top: 2px; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; }
.badge.low { background: var(--danger-light); color: var(--danger); }
.badge.ok { background: var(--ok-light); color: var(--ok); }
.badge.debt { background: var(--warn-light); color: var(--warn); }

/* ---------------- Afitsiant "Tayyor" bildirishnomalari ---------------- */
/* public/app.js'dagi initWaiterNotifications() shu konteynerni topbar'dan keyin
   dinamik yaratadi (har waiter/*.html sahifada) — oshpaz taomni tayyor deb
   belgilagach, "Qabul qildim" tugmasi bosilmaguncha shu yerda turadi. */
.notif-list { padding: 10px 16px 0; display: flex; flex-direction: column; gap: 8px; max-width: 900px; margin: 0 auto; }
.notif-card {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--warn-light); border: 1px solid var(--warn); border-radius: var(--radius-sm);
  padding: 10px 12px; font-size: 13px; box-shadow: var(--shadow-sm);
}
.notif-card.done { background: var(--ok-light); border-color: var(--ok); }
.notif-card .notif-msg { color: var(--text); flex: 1; }
.notif-card .notif-ack { color: var(--ok); font-weight: 600; white-space: nowrap; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 6px; border-bottom: 1px solid var(--border); font-size: 14px; }
th { color: var(--text-faint); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }

@media (max-width: 640px) { .table-desktop { display: none; } }
@media (min-width: 641px) { .card-list-mobile { display: none; } }

/* ---------------- Forms ---------------- */

.form-grid { display: flex; flex-direction: column; gap: 12px; }
.field label { display: block; font-size: 12px; color: var(--text-faint); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.04em; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.18); color: var(--text);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.field input[readonly] { opacity: 0.65; cursor: not-allowed; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-light);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font-weight: 600; font-size: 14px; min-height: 44px;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), filter .15s var(--ease), border-color .15s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn.primary {
  background: linear-gradient(155deg, var(--gold-2), var(--gold-dark)); border-color: var(--gold-dark); color: #1b1812;
  box-shadow: var(--shadow-sm); font-weight: 700; letter-spacing: 0.01em;
}
.btn.primary:active { filter: brightness(0.95); }
.btn.danger { background: rgba(226, 102, 92, 0.08); border-color: var(--danger); color: var(--danger); }
.btn.light { background: #fff; border-color: #fff; color: #1b1812; }
.btn.light:active { filter: brightness(0.95); }
.btn.block { width: 100%; }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 13px; }

.fab {
  position: fixed; right: 16px; bottom: calc(var(--nav-h) + 16px);
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(155deg, var(--gold-2), var(--gold-dark)); color: #1b1812; border: none; font-size: 26px;
  box-shadow: 0 12px 28px -6px rgba(201, 162, 39, 0.55);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
  z-index: 9;
}
.fab:active { transform: scale(0.94); }
@media (min-width: 720px) { .fab { bottom: 24px; } }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(6, 5, 3, 0.65);
  display: flex; align-items: flex-end; justify-content: center; z-index: 20;
}
@media (min-width: 640px) { .modal-backdrop { align-items: center; } }
.modal {
  background: linear-gradient(165deg, var(--surface-2), var(--bg-elev)); border: 1px solid var(--border-strong);
  border-radius: 18px 18px 0 0; padding: 20px;
  width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
@media (min-width: 640px) { .modal { border-radius: var(--radius-lg); } }
.modal h2 { margin-top: 0; font-family: var(--serif); font-size: 19px; font-weight: 700; }
.modal-actions { display: flex; gap: 8px; margin-top: 16px; }
.modal-actions .btn { flex: 1; }

/* "📋 Menyu" tanlash modali (kassir/manual.js) — 2026-09-15'dan to'liq ekran:
   avvalgi ichki max-height:50vh skroll qutisi (atrofida bo'sh joy qoldirib,
   kompyuter/planshetda faqat 1 qator ko'rsatardi) olib tashlandi — endi
   sarlavha+taglar tepada, "Yopish" pastda qotib turadi, taomlar orasi esa
   BUTUN ekran balandligini egallab, o'zi skroll bo'ladi. */
.menu-pick-modal {
  width: 100%; height: 100%; max-width: 1040px; max-height: 100%;
  border-radius: 0; margin: 0 auto; overflow: hidden;
  display: flex; flex-direction: column;
}
.menu-pick-modal h2, .menu-pick-modal .tabs { flex: 0 0 auto; }
.menu-pick-modal .menu-pick-items { flex: 1 1 auto; overflow-y: auto; margin: 0 -4px; padding: 0 4px; align-content: start; }
.menu-pick-modal .modal-actions { flex: 0 0 auto; }

.hidden { display: none !important; }
.dim { color: var(--text-dim); }
.text-right { text-align: right; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 480px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-tile {
  background: linear-gradient(165deg, var(--surface-2), var(--surface)); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow-sm);
}
.stat-tile .label { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-tile .value { font-family: var(--serif); font-size: 21px; font-weight: 700; margin-top: 6px; color: var(--gold-2); }

.tabs { display: flex; gap: 8px; margin-bottom: 12px; overflow-x: auto; }
.tabs button {
  flex: 0 0 auto; padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font-weight: 600; min-height: 44px; white-space: nowrap;
  transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.tabs button.active { background: linear-gradient(155deg, var(--gold-2), var(--gold-dark)); color: #1b1812; border-color: var(--gold-dark); }

.toast {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%);
  background: var(--bg-elev); color: var(--text); border: 1px solid var(--gold-dark);
  padding: 10px 18px; border-radius: var(--radius-sm); font-size: 14px; z-index: 50;
  box-shadow: var(--shadow-lg);
}
.toast.error { background: #2a1614; border-color: var(--danger); color: var(--text); }

.item-row { display: flex; gap: 8px; align-items: flex-end; border-bottom: 1px dashed var(--border); padding-bottom: 10px; margin-bottom: 10px; }
.item-row .field { flex: 1; }
.item-row .field.qty, .item-row .field.price { max-width: 90px; }
.item-row .remove-item { border: none; background: none; color: var(--danger); font-size: 20px; min-height: 44px; min-width: 32px; }

/* ---------------- Afitsiant: stollar tarmog'i ---------------- */

.table-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 480px) { .table-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 720px) { .table-grid { grid-template-columns: repeat(4, 1fr); } }

.table-tile {
  border-radius: var(--radius); padding: 18px 14px; min-height: 96px;
  display: flex; flex-direction: column; justify-content: space-between;
  border: 1px solid var(--border); background: linear-gradient(165deg, var(--surface-2), var(--surface));
  text-align: left;
  box-shadow: var(--shadow-sm);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.table-tile:active { transform: scale(0.97); }
.table-tile.free { border-color: rgba(79, 174, 116, 0.45); background: linear-gradient(165deg, rgba(79, 174, 116, 0.12), var(--surface)); }
.table-tile.occupied { border-color: rgba(217, 154, 61, 0.45); background: linear-gradient(165deg, rgba(217, 154, 61, 0.14), var(--surface)); }
.table-tile .t-name { font-family: var(--serif); font-size: 18px; font-weight: 700; }
.table-tile .t-status { font-size: 12px; color: var(--text-faint); margin-top: 4px; }
.table-tile .t-total { font-size: 15px; font-weight: 700; margin-top: 8px; color: var(--gold-2); }
.table-tile.free .t-status { color: var(--ok); }
.table-tile.occupied .t-status { color: var(--warn); }

/* ---------------- Afitsiant: buyurtma ekrani ---------------- */

.order-total-bar {
  position: sticky; bottom: calc(var(--nav-h) + 12px); z-index: 8;
  background: linear-gradient(155deg, var(--gold-2), var(--gold-dark)); color: #1b1812; border-radius: var(--radius);
  padding: 14px 16px; display: flex; justify-content: space-between; align-items: center;
  box-shadow: 0 12px 28px -8px rgba(201, 162, 39, 0.55); margin-top: 12px;
}
@media (min-width: 720px) { .order-total-bar { bottom: 16px; } }
.order-total-bar .amount { font-size: 20px; font-weight: 700; }

.menu-item-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 4px; border-bottom: 1px solid var(--border);
}
.menu-item-row .mi-name { font-weight: 600; }
.menu-item-row .mi-volume { font-weight: 400; color: var(--text-dim); font-size: 0.9em; }
.menu-item-row .mi-price { color: var(--text-dim); font-size: 13px; }
.menu-item-row .btn.add { min-width: 44px; }
.menu-item-row.unavailable { opacity: 0.55; }
.menu-item-row.unavailable .btn.add { cursor: not-allowed; }
.menu-item-row .mi-name .badge { margin-left: 6px; vertical-align: middle; }

/* Admin: taom "turi" (variant, 2026-09-09) — "+ Turi qo'shish" tugmasi bilan
   qo'shilgan taomlar asosiy taom ostida chekinib, chapdan ingichka chiziq
   bilan ajratilib chiqadi. */
.menu-item-variants {
  margin: 0 0 10px 20px; padding-left: 12px; border-left: 2px solid var(--border);
}
.menu-item-variants .menu-item-row { padding: 8px 4px; }

/* ---------------- Menyu tanlash kartochkalari (2026-09-15) ----------------
   Afitsiant (waiter/order.html, to'liq sahifa) VA kassir ("📋 Menyu" modali,
   kassir/manual.html) endi bitta umumiy komponentdan foydalanadi —
   public/menu-picker.js shu klasslar bilan HTML generatsiya qiladi. Admin
   panelning o'z menyu ro'yxati (.menu-item-row/.mi-*, yuqorida) bunga
   tegmaydi, mustaqil qolaveradi. */

.mp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; align-items: start; }

/* Kartochka + "Turlari" tugmasi + ochiq panel BITTA katakka o'raladi — shu
   sabab 2 ustunli ritm variantlar sonidan qat'iy nazar hech qachon buzilmaydi
   (menu-picker.js'dagi mp-cell wrapper). */
.mp-cell { display: flex; flex-direction: column; min-width: 0; }

.mp-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .15s var(--ease), border-color .15s var(--ease);
}
.mp-card.unavailable { opacity: 0.55; }

.mp-card-img-wrap { width: 100%; aspect-ratio: 4 / 3; background: var(--surface); }
.mp-card-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mp-card-img-wrap.noimg {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  color: var(--text-faint); font-family: var(--serif); font-size: 26px; font-weight: 700;
}

.mp-card-body { padding: 10px; flex: 1; display: flex; flex-direction: column; gap: 6px; cursor: pointer; }
.mp-card-name { font-family: var(--serif); font-size: 14.5px; font-weight: 700; line-height: 1.28; }
.mp-card-name .mp-volume { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-weight: 400; color: var(--text-dim); font-size: 0.8em; }
.mp-card-row { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.mp-card-price { color: var(--gold-2); font-weight: 700; font-size: 13.5px; }

.mp-add-btn {
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; border: none;
  background: linear-gradient(155deg, var(--gold-2), var(--gold-dark)); color: #1b1812;
  font-size: 18px; font-weight: 700; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 14px -5px rgba(201, 162, 39, 0.65);
  transition: transform .15s var(--ease);
}
.mp-add-btn:active { transform: scale(0.9); }
.mp-add-btn[disabled] { background: var(--surface); color: var(--text-faint); box-shadow: none; }

.mp-variants-toggle {
  margin: -4px 0 2px; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 3px;
  background: none; border: none; padding: 4px 2px; min-height: 0;
  color: var(--text-dim); font-size: 13px; font-weight: 600;
}
.mp-variants-toggle::after { content: '›'; font-size: 16px; transition: transform .15s var(--ease); }
.mp-variants-toggle.open::after { transform: rotate(90deg); }
.mp-variants-toggle:active { opacity: 0.65; }

.mp-variants-panel {
  margin: -2px 0 6px; padding-left: 10px; border-left: 2px solid var(--border);
  display: flex; flex-direction: column;
}
.mp-variant-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 4px; border-bottom: 1px dashed var(--border); }
.mp-variant-row:last-child { border-bottom: none; }
.mp-vr-info { cursor: pointer; }
.mp-vr-name { font-weight: 600; font-size: 13.5px; }
.mp-vr-price { color: var(--text-dim); font-size: 12.5px; margin-top: 1px; }
.mp-vr-add {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--gold-2); font-weight: 700; font-size: 15px;
}
.mp-vr-add[disabled] { color: var(--text-faint); }

.qty-stepper { display: flex; align-items: center; gap: 8px; }
.qty-stepper button {
  width: 32px; height: 32px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font-size: 16px; font-weight: 700;
  transition: transform .15s var(--ease), border-color .15s var(--ease);
}
.qty-stepper button:active { transform: scale(0.92); }
.qty-stepper .qty-val { min-width: 24px; text-align: center; font-weight: 700; }

.order-line { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--border); gap: 8px; }
.order-line .ol-name { font-weight: 600; }
.order-line .ol-meta { font-size: 12px; color: var(--text-dim); }
.order-line .ol-subtotal { font-weight: 700; white-space: nowrap; color: var(--gold-2); }

/* ---------------- Chek (print-friendly, qog'oz ko'rinishi) ---------------- */

.receipt {
  background: var(--paper); color: var(--paper-text); border: 1px solid rgba(0,0,0,0.08); border-radius: var(--radius);
  padding: 24px; max-width: 380px; margin: 0 auto; font-size: 14px;
  box-shadow: var(--shadow-lg);
}
.receipt h2 { text-align: center; margin: 0 0 4px; font-family: var(--serif); font-weight: 700; letter-spacing: 0.02em; }
.receipt .r-sub { text-align: center; color: #6b6152; font-size: 12px; margin-bottom: 12px; font-family: var(--script); font-style: italic; font-size: 15px; }
.receipt table td { padding: 4px 2px; font-size: 13px; border-color: rgba(0,0,0,0.1); }
.receipt .r-total-row td { border-top: 2px solid var(--paper-text); font-weight: 700; font-size: 16px; }
.receipt hr { border: none; border-top: 1px dashed rgba(0,0,0,0.2); margin: 10px 0; }

@media print {
  @page { size: 80mm auto; margin: 0; }
  .no-print { display: none !important; }
  html, body { width: 80mm; background: #fff; margin: 0; padding: 0; }
  main { padding: 0; }
  .receipt { border: none; box-shadow: none; max-width: 100%; width: 80mm; margin: 0; padding: 6px 8px; }
  .receipt table td { padding: 2px; }
}

canvas { max-width: 100%; }
