:root {
  --fon: #f4f5f7;
  --karta: #ffffff;
  --matn: #16181d;
  --xira: #6b7280;
  --chiziq: #e3e5e9;
  --asosiy: #1f6feb;
  --asosiy-matn: #ffffff;
  --yashil: #15803d;
  --qizil: #c62828;
  --sariq: #d97706;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fon: #0f1115;
    --karta: #1a1d23;
    --matn: #eceef2;
    --xira: #9aa1ad;
    --chiziq: #2b3038;
    --asosiy: #4c8dff;
    --yashil: #4ade80;
    --qizil: #f87171;
    --sariq: #fbbf24;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fon);
  color: var(--matn);
  font: 16px/1.4 -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}
#ekran { max-width: 680px; margin: 0 auto; padding: 16px; }
h3 { font-size: 15px; margin: 24px 0 8px; color: var(--xira); text-transform: uppercase; letter-spacing: .04em; }

/* Yuqori panel: nom va til almashtirgich */
#bosh { background: var(--karta); border-bottom: 1px solid var(--chiziq); }
.bosh-ichi {
  max-width: 680px; margin: 0 auto; padding: 8px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.bosh-ichi b { font-size: 17px; }
.bosh-chap, .bosh-ong { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bosh-chap b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sinxron { font-size: 13px; padding: 2px 8px; border-radius: 999px; background: var(--fon); flex: none; }
.sinxron.kutish { color: var(--sariq); }
.sinxron.ofline { color: var(--qizil); }
.profil-tugma { width: 38px; height: 34px; font-size: 18px; }
body.navsiz { padding-bottom: 24px; }
.til-qator { display: flex; justify-content: center; margin-top: 16px; }
.til-qator .tillar button { padding: 8px 18px; font-size: 14px; }
.tillar { display: flex; border: 1px solid var(--chiziq); border-radius: 8px; overflow: hidden; }
.tillar button {
  font: inherit; font-size: 13px; font-weight: 600; padding: 6px 10px; cursor: pointer;
  border: 0; border-left: 1px solid var(--chiziq); background: none; color: var(--xira);
}
.tillar button:first-child { border-left: 0; }
.tillar button.faol { background: var(--asosiy); color: var(--asosiy-matn); }

/* Pastki menyu */
nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; background: var(--karta); border-top: 1px solid var(--chiziq);
  padding-bottom: env(safe-area-inset-bottom);
}
nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 0 10px; color: var(--xira); text-decoration: none; font-size: 12px;
}
nav a span { font-size: 22px; filter: grayscale(1); opacity: .7; }
nav a.faol { color: var(--asosiy); font-weight: 600; }
nav a.faol span { filter: none; opacity: 1; }

/* Kirish maydonlari va tugmalar */
input, select, textarea {
  width: 100%; font: inherit; color: inherit; background: var(--karta);
  border: 1px solid var(--chiziq); border-radius: 10px; padding: 12px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--asosiy); outline-offset: -1px; }
.tugma {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 500; padding: 12px 16px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--chiziq); background: var(--karta); color: var(--matn); text-decoration: none;
}
.tugma.asosiy { background: var(--asosiy); border-color: var(--asosiy); color: var(--asosiy-matn); }
.tugma.ogohlantirish { background: var(--sariq); border-color: var(--sariq); color: #fff; }
.tugma.xavfli { color: var(--qizil); border-color: var(--qizil); background: transparent; }
.tugma.katta { width: 100%; padding: 14px; font-size: 17px; margin-top: 8px; }
.tugma:disabled { opacity: .4; cursor: not-allowed; }
.ikon-tugma {
  flex: none; width: 48px; font-size: 22px; border: 1px solid var(--chiziq);
  background: var(--karta); border-radius: 10px; cursor: pointer; color: inherit;
}
.ikon-tugma.kichik { width: 32px; height: 32px; font-size: 14px; }

.qidiruv-qator { display: flex; gap: 8px; }
.qidiruv-qator input { flex: 1; min-width: 0; }
.tugmalar-qator { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.tugmalar-qator .tugma { flex: 1; }
.tugmalar-panjara { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0; }
.chiplar { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.chip {
  font: inherit; font-size: 14px; padding: 6px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--chiziq); background: var(--karta); color: var(--matn);
}
.chip.faol { background: var(--matn); color: var(--fon); border-color: var(--matn); }

/* Ro'yxatlar */
.royxat { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.qator {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  padding: 12px 14px; background: var(--karta); border: 1px solid var(--chiziq); border-radius: var(--radius);
  font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.qator.tanlangan { border-color: var(--asosiy); outline: 2px solid var(--asosiy); }
.qator-chap { min-width: 0; }
.qator-nom { font-weight: 600; }
.qoldiq { flex: none; font-weight: 700; font-size: 17px; text-align: right; }
.qoldiq.kam { color: var(--qizil); }
.kichik-royxat { max-height: 40vh; overflow: auto; }

.izoh { color: var(--xira); font-size: 13px; }
.markaz { text-align: center; }
.qizil { color: var(--qizil); }
.yashil { color: var(--yashil); }
.bosh { color: var(--xira); text-align: center; padding: 24px 8px; margin: 0; }

/* Sotish */
.natijalar { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.natija {
  display: flex; justify-content: space-between; gap: 8px; padding: 12px; font: inherit; color: inherit; text-align: left;
  background: var(--karta); border: 1px solid var(--asosiy); border-radius: 10px; cursor: pointer;
}
.savat-qator { background: var(--karta); border: 1px solid var(--chiziq); border-radius: var(--radius); padding: 12px; }
.savat-bosh { display: flex; justify-content: space-between; gap: 8px; }
.savat-tana { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.miqdor { display: flex; align-items: center; gap: 4px; }
.miqdor button {
  width: 36px; height: 40px; font-size: 20px; border: 1px solid var(--chiziq); border-radius: 8px;
  background: var(--fon); color: inherit; cursor: pointer;
}
.miqdor input { width: 64px; text-align: center; padding: 8px 4px; }
.narx-kirit { width: 110px; padding: 8px; }
.xato-chegara { border-color: var(--qizil); }
.qator-summa { margin-left: auto; }
.jami-panel {
  position: sticky; bottom: calc(72px + env(safe-area-inset-bottom)); margin-top: 16px;
  background: var(--karta); border: 1px solid var(--chiziq); border-radius: var(--radius); padding: 12px;
  box-shadow: 0 -4px 16px rgba(0,0,0,.06);
}
.jami-qator { display: flex; justify-content: space-between; align-items: baseline; font-size: 18px; margin-bottom: 10px; }
.jami-qator b { font-size: 24px; }
.tolov-tugmalar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tolov-tugmalar .tugma { padding: 14px 4px; }
.tanlangan-mijoz { font-weight: 600; margin: 12px 0 4px; }
.mijoz-tanlov { display: flex; gap: 6px; margin-bottom: 10px; }

/* Bo'lim ichidagi ikki tomonlama almashtirgich (masalan: bizga qarzlar / bizning qarzlar) */
.segment { display: flex; border: 1px solid var(--chiziq); border-radius: 10px; overflow: hidden; margin-bottom: 12px; background: var(--karta); }
.segment button, .segment label {
  flex: 1; font: inherit; font-size: 14px; font-weight: 600; padding: 10px 6px; border: 0; cursor: pointer;
  background: none; color: var(--xira); text-align: center; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.segment button.faol { background: var(--asosiy); color: var(--asosiy-matn); }
.segment label:has(input:checked) { background: var(--asosiy); color: var(--asosiy-matn); }
.segment label input { width: auto; }
.segment.kichik label { padding: 8px 4px; }

/* Eslatmalar */
.qator.eslatma { cursor: default; border-color: var(--sariq); }
.qator.eslatma.otgan { border-color: var(--qizil); }
.qator.eslatma .qator-chap { cursor: pointer; flex: 1; }
.tugma.wa { background: #25d366; border-color: #25d366; color: #fff; flex: none; }
.muddat-qator { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 8px 0; font-size: 14px; }

/* Smena paneli */
.smena { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; margin-bottom: 10px; border-radius: 10px; font-size: 14px; border: 1px solid var(--chiziq); background: var(--karta); }
.smena.yopiq { border-style: dashed; color: var(--xira); }
.mijoz-tugma {
  flex: 1; min-width: 0; text-align: left; font: inherit; font-size: 14px; color: var(--xira); cursor: pointer;
  padding: 8px 10px; border: 1px dashed var(--chiziq); border-radius: 8px; background: transparent;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mijoz-tugma.tanlangan { color: var(--matn); border-style: solid; border-color: var(--asosiy); font-weight: 600; }

/* Kartalar va jadvallar */
.katta-karta, .karta { background: var(--karta); border: 1px solid var(--chiziq); border-radius: var(--radius); padding: 14px; }
.katta-karta { margin-bottom: 12px; }
.katta-son { font-size: 28px; font-weight: 700; text-align: center; margin: 4px 0; }
.katta-karta .katta-son { text-align: left; }
.kartalar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.karta-son { font-size: 19px; font-weight: 700; margin: 2px 0; }
.malumot-jadval {
  display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; margin-top: 12px;
  background: var(--karta); border: 1px solid var(--chiziq); border-radius: var(--radius); padding: 12px 14px;
}
.malumot-jadval > :nth-child(odd) { color: var(--xira); }
.malumot-jadval > :nth-child(even) { text-align: right; font-weight: 500; }
.tarix { background: var(--karta); border: 1px solid var(--chiziq); border-radius: var(--radius); overflow: hidden; }
.tarix-qator {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%;
  padding: 10px 14px; border: 0; border-bottom: 1px solid var(--chiziq);
  background: none; font: inherit; color: inherit; text-align: left;
}
.tarix-qator:last-child { border-bottom: 0; }
.tarix-qator b { flex: none; }
.bosiladigan { cursor: pointer; }

/* Oynalar */
.modal-fon {
  position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.45);
  display: flex; align-items: flex-end; justify-content: center;
}
.modal {
  background: var(--fon); width: 100%; max-width: 560px; max-height: 92vh; overflow: auto;
  border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom);
}
@media (min-width: 600px) {
  .modal-fon { align-items: center; }
  .modal { border-radius: 16px; }
}
.modal-bosh {
  position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 16px; background: var(--fon); border-bottom: 1px solid var(--chiziq);
}
.modal-bosh h2 { margin: 0; font-size: 18px; }
.yopish-tugma { border: 0; background: none; font-size: 20px; color: var(--xira); cursor: pointer; padding: 4px 8px; }
.modal-tana { padding: 16px; }
.forma { display: flex; flex-direction: column; gap: 12px; }
.forma label, label.forma { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--xira); }
.ikki-ustun { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#skaner-oyna { width: 100%; border-radius: 12px; overflow: hidden; background: #000; }

/* Kirish ekrani */
.kirish-quti { max-width: 420px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.kirish-quti h1 { text-align: center; margin: 0; font-size: 26px; }
.kirish-quti h3 { margin-bottom: 0; }
.kirish-ikon { font-size: 56px; text-align: center; margin-top: 16px; }
img.kirish-ikon { display: block; width: 88px; height: 88px; margin: 16px auto 0; border-radius: 20px; }
.chiplar.markazda { justify-content: center; }
.kod-kirit, .taklif-kod { font-family: ui-monospace, Menlo, monospace; letter-spacing: .15em; text-transform: uppercase; }
.taklif-kod {
  font-size: 32px; font-weight: 700; text-align: center; padding: 16px; margin: 12px 0 4px;
  background: var(--karta); border: 2px dashed var(--asosiy); border-radius: var(--radius); user-select: all;
}
form.karta { display: flex; flex-direction: column; gap: 12px; }
.kichik-tugma { padding: 6px 12px; font-size: 14px; }
.forma label.belgi-qator { flex-direction: row; align-items: center; gap: 10px; color: var(--matn); font-size: 15px; }
.forma label.belgi-qator input { width: 22px; height: 22px; flex: none; }
.narx-qulf { font-weight: 600; padding: 8px 4px; }

/* Xabarlar */
#toastlar {
  position: fixed; left: 50%; top: 16px; transform: translateX(-50%); z-index: 30;
  display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); pointer-events: none;
}
.toast {
  padding: 12px 16px; border-radius: 10px; color: #fff; background: var(--yashil);
  box-shadow: 0 6px 20px rgba(0,0,0,.2); font-weight: 500; animation: tushish .2s ease-out;
}
.toast.xato { background: var(--qizil); }
@keyframes tushish { from { transform: translateY(-10px); opacity: 0; } }

/* Oylik obuna */
.obuna-ogoh {
  display: block; width: 100%; border: 0; padding: 8px 16px; font: inherit; font-size: 14px; text-align: center; cursor: pointer;
  background: color-mix(in srgb, var(--sariq) 18%, var(--karta)); color: var(--matn); border-top: 1px solid var(--chiziq);
}
.obuna-qulf { font-size: 56px; text-align: center; margin-top: 24px; }
.tolov-matni {
  white-space: pre-wrap; font-size: 18px; font-weight: 600; text-align: center; padding: 14px;
  background: var(--karta); border: 2px dashed var(--asosiy); border-radius: var(--radius); user-select: all;
}
.bs-karta { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.bs-bosh { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.bs-tugmalar { display: flex; gap: 8px; margin-top: 6px; }
.bs-tugmalar .tugma { flex: 1; padding: 8px 4px; }
.chip.bs-faol { color: var(--yashil); border-color: var(--yashil); }
.chip.bs-yaqin { color: var(--sariq); border-color: var(--sariq); }
.chip.bs-tugadi { color: var(--qizil); border-color: var(--qizil); }
#bs-qidir { width: 100%; margin: 4px 0 0; }
.sariq { color: var(--sariq); }
button.karta.bs-son { font: inherit; color: inherit; text-align: left; cursor: pointer; }
.bs-segment { margin-top: 12px; }
.bs-segment button { font-size: 14px; }
.bs-tugmalar .tugma.wa { flex: 1; text-align: center; text-decoration: none; }
.bs-tugmalar .bs-yana { flex: 0 0 48px; }
.bs-tugmalar .tugma.asosiy { flex: 2; }
.bs-oy { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 6px 0; }
.bs-oy + .bs-oy { border-top: 1px solid var(--chiziq); }
.bs-chiziq { grid-column: 1 / -1; height: 6px; background: var(--chiziq); border-radius: 3px; overflow: hidden; }
.bs-chiziq div { height: 100%; background: var(--yashil); border-radius: 3px; }
.bs-summa { display: flex; align-items: center; gap: 6px; white-space: nowrap; }

/* Chek: ekranda qog'oz ko'rinishida (chop etishda chek.js o'z uslubini beradi) */
.chek-qogoz {
  background: #fff; color: #111; border-radius: 4px; padding: 14px 16px; margin: 4px auto 12px; max-width: 340px;
  box-shadow: 0 2px 10px rgba(0,0,0,.12); font: 14px/1.4 "Courier New", monospace;
}
.chek-bosh { text-align: center; font-size: 1.2em; font-weight: 700; margin-bottom: 6px; }
.chek-qator { display: flex; justify-content: space-between; gap: 8px; }
.chek-qator span:last-child { white-space: nowrap; text-align: right; }
.chek-tovar { margin-top: 6px; }
.chek-chiziq { border-top: 1px dashed #555; margin: 8px 0; }
.chek-jami { font-weight: 700; font-size: 1.15em; }
.chek-bekor { text-align: center; font-weight: 700; border: 1px solid #111; margin: 6px 0; }
.chek-oxir { text-align: center; margin-top: 4px; }
.oxirgi-chek { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 15px; }
.havola-tugma { background: none; border: 0; color: var(--asosiy); font: inherit; font-size: 15px; padding: 8px; cursor: pointer; }
.bs-zaxira-ogoh { border-radius: var(--radius); margin-bottom: 12px; border: 1px solid var(--chiziq); }
/* Razmer-rang tanlash va bir nechta razmerga son kiritish */
.variant-panjara { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.variant-tugma { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; }
.variant-tugma small { color: var(--xira, inherit); opacity: .75; font-size: 12px; }
.variant-tugma.tugagan { border-color: var(--qizil); }
.variant-tugma.tugagan small { color: var(--qizil); opacity: 1; }
.miqdor-qator { display: grid; grid-template-columns: 1fr 96px; align-items: center; gap: 10px; }

/* CRM: mijoz ko'rsatkichlari */
.crm-stat { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.crm-stat > div { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid var(--chiziq, #333); border-radius: 10px; }

/* ===== OSHXONA (kafe) ===== */
body.navsiz nav { display: none; }
.ogoh-quti { background: color-mix(in srgb, var(--sariq) 14%, var(--karta)); border: 1px solid var(--sariq); border-radius: var(--radius); padding: 10px 12px; margin: 8px 0; }
.holat { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; background: var(--chiziq); color: var(--matn); }
.holat-yangi { background: color-mix(in srgb, var(--sariq) 20%, transparent); color: var(--sariq); }
.holat-tayyor { background: color-mix(in srgb, var(--yashil) 20%, transparent); color: var(--yashil); }
.holat-berildi { color: var(--xira); }
.holat-bekor { color: var(--qizil); }

/* Buyurtma qatorlari (oshxona, zal) */
.b-qator { padding: 4px 0; font-size: 17px; }
.b-izoh { font-size: 15px; font-weight: 600; color: var(--qizil); margin: 2px 0 0 24px; }
.b-izoh.umumiy { margin-left: 0; margin-top: 6px; }
.osh-sarlavha { display: flex; align-items: center; gap: 10px; margin: 8px 0 12px; }
.osh-sarlavha h2 { margin: 0; font-size: 20px; }
.osh-son { background: var(--asosiy); color: var(--asosiy-matn); border-radius: 999px; min-width: 32px; padding: 2px 10px; text-align: center; font-weight: 700; }
.osh-kartalar, .tayyor-kartalar { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.osh-karta, .tayyor-karta { background: var(--karta); border: 2px solid var(--chiziq); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.osh-karta.kechikdi { border-color: var(--qizil); }
.osh-karta.tashqi { border-style: dashed; }
.tayyor-karta { border-color: var(--yashil); }
.osh-bosh { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.osh-bosh b { font-size: 20px; }
.osh-vaqt { color: var(--xira); font-size: 14px; }
.osh-karta.kechikdi .osh-vaqt { color: var(--qizil); font-weight: 700; }
.osh-qatorlar { flex: 1; }
/* Oshxona planshetida ekran kengroq */
@media (min-width: 900px) { body:has(.osh-kartalar) #ekran { max-width: 1200px; } }

/* Stollar panjarasi */
.stol-panjara { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.stol-tugma {
  font: inherit; color: var(--matn); cursor: pointer; aspect-ratio: 1; border-radius: var(--radius);
  border: 2px solid var(--chiziq); background: var(--karta); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px;
}
.stol-tugma b { font-size: 28px; line-height: 1; }
.stol-tugma small { font-size: 12px; color: var(--xira); text-align: center; }
.stol-tugma span { font-size: 13px; font-weight: 600; }
.stol-kutilmoqda { border-color: var(--sariq); background: color-mix(in srgb, var(--sariq) 10%, var(--karta)); }
.stol-tayyor { border-color: var(--yashil); background: color-mix(in srgb, var(--yashil) 14%, var(--karta)); animation: tayyor-puls 1.4s ease-in-out infinite; }
.stol-band { border-color: var(--asosiy); background: color-mix(in srgb, var(--asosiy) 10%, var(--karta)); }
@keyframes tayyor-puls { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--yashil) 35%, transparent); } }
@media (prefers-reduced-motion: reduce) { .stol-tayyor { animation: none; } }
.stol-belgilar { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; }
.nuqta { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--chiziq); margin-right: 5px; vertical-align: -1px; }
.nuqta.stol-kutilmoqda { border-color: var(--sariq); } .nuqta.stol-tayyor { border-color: var(--yashil); animation: none; } .nuqta.stol-band { border-color: var(--asosiy); }
.stol-buyurtma { margin-bottom: 10px; display: flex; flex-direction: column; gap: 6px; }
.katta-jami { font-size: 20px; margin: 12px 0; }
.xizmat-qator { display: flex; flex-direction: row; align-items: center; gap: 8px; margin: 10px 0; }
.xizmat-qator input { width: 22px; height: 22px; margin: 0; }

/* Taom tanlash (ofitsiant) */
.taom-panjara { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 10px 0; }
.taom-tugma {
  position: relative; font: inherit; color: var(--matn); cursor: pointer; border-radius: 10px; border: 1px solid var(--chiziq);
  background: var(--karta); padding: 10px 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center;
}
.taom-tugma.tanlangan { border-color: var(--asosiy); box-shadow: inset 0 0 0 1px var(--asosiy); }
.taom-tugma small { color: var(--xira); }
.taom-belgi { font-size: 28px; }
.taom-son {
  position: absolute; top: 6px; right: 6px; font-style: normal; background: var(--asosiy); color: var(--asosiy-matn);
  border-radius: 999px; min-width: 24px; height: 24px; display: grid; place-items: center; font-size: 13px; font-weight: 700;
}
.qator-izoh { flex: 1; min-width: 0; }
.qator.ochiq-emas { opacity: .55; }

/* ===== Stol plansheti (mijoz menyusi) ===== */
body.stol-sahifa { padding-bottom: calc(96px + env(safe-area-inset-bottom)); --asosiy: #d9480f; }
@media (prefers-color-scheme: dark) { body.stol-sahifa { --asosiy: #ff7a3d; } }
body.stol-sahifa #ekran { max-width: 1100px; }
.stol-belgi { background: var(--asosiy); color: var(--asosiy-matn); border-radius: 999px; padding: 2px 10px; font-size: 14px; font-weight: 700; margin-left: 8px; }
.stol-turkumlar { position: sticky; top: 0; z-index: 5; background: var(--fon); padding: 8px 0; flex-wrap: nowrap; overflow-x: auto; }
.stol-turkumlar .chip { font-size: 17px; padding: 10px 20px; white-space: nowrap; }
.stol-turkumlar .chip.faol { background: var(--asosiy); border-color: var(--asosiy); color: var(--asosiy-matn); }
.menyu-panjara { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-top: 8px; }
.menyu-karta {
  position: relative; font: inherit; color: var(--matn); cursor: pointer; text-align: left; border-radius: 16px; border: 1px solid var(--chiziq);
  background: var(--karta); padding: 12px; display: flex; flex-direction: column; gap: 4px; min-height: 200px;
}
.menyu-karta.tanlangan { border-color: var(--asosiy); box-shadow: inset 0 0 0 1px var(--asosiy); }
.menyu-karta img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; }
.menyu-belgi { font-size: 56px; text-align: center; padding: 10px 0; background: color-mix(in srgb, var(--asosiy) 8%, var(--fon)); border-radius: 10px; }
.menyu-belgi.katta { font-size: 96px; }
.menyu-karta b { font-size: 17px; }
.menyu-karta small { color: var(--xira); font-size: 13px; }
.menyu-narx { margin-top: auto; font-weight: 700; font-size: 18px; color: var(--asosiy); }
.menyu-qosh {
  position: absolute; right: 10px; bottom: 10px; font-style: normal; width: 36px; height: 36px; border-radius: 50%;
  background: var(--asosiy); color: var(--asosiy-matn); display: grid; place-items: center; font-size: 24px; font-weight: 700;
}
.menyu-karta .taom-son { top: auto; bottom: 14px; right: 12px; width: 32px; height: 32px; font-size: 16px; }
#savat-panel { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
#savat-panel:empty { display: none; }
.savat-tugma {
  width: 100%; max-width: 700px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font: inherit; font-size: 18px; border: 0; border-radius: 16px; padding: 16px 20px; cursor: pointer;
  background: var(--asosiy); color: var(--asosiy-matn); box-shadow: 0 6px 20px rgba(0,0,0,.2);
}
.taom-oyna { display: flex; flex-direction: column; gap: 12px; }
.taom-oyna img { width: 100%; border-radius: 12px; }
.katta-miqdor { justify-content: center; }
.katta-miqdor button { width: 56px; height: 56px; font-size: 26px; }
.katta-miqdor input { width: 70px; font-size: 24px; text-align: center; }

/* ===== MIJOZ MENYUSI (ofitsiant plansheti va stol plansheti) — to'q yashil, och yashil tugmalar ===== */
body.mm-rejim {
  --fon: #0e1a10; --karta: #17251a; --matn: #f1f5ec; --xira: #9fb39b; --chiziq: #28402c;
  --asosiy: #8cc63f; --asosiy-matn: #0f1c0d; --mm-yashil: #8cc63f; --mm-yashil-och: #a6d95b;
  color-scheme: dark;
  background: radial-gradient(1200px 600px at 50% -200px, #1d3321 0%, transparent 70%), #0e1a10;
  padding-bottom: 0;
}
body.mm-rejim #bosh { display: none; }
/* Admin va boshqaruvchida pastki menyu qoladi — savat tugmasi uning ustida */
body.mm-rejim:not(.navsiz) .mm-savat-tugma { bottom: calc(80px + env(safe-area-inset-bottom)); }
body.mm-rejim:not(.navsiz) .mm { padding-bottom: calc(170px + env(safe-area-inset-bottom)); }
body.mm-rejim #ekran { max-width: 1240px; padding: 0 16px; }
.mm { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
.mm-bosh { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 0 10px; }
.mm-logo { display: flex; flex-direction: column; line-height: 1; }
.mm-logo-nom { font-size: 30px; font-weight: 800; font-style: italic; letter-spacing: -.02em; color: var(--matn); }
.mm-logo-nom::first-letter { color: var(--mm-yashil); }
.mm-logo-kichik { font-size: 11px; letter-spacing: .32em; text-transform: uppercase; color: var(--mm-yashil); margin-top: 4px; }
.mm-ong { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.mm-ikon {
  position: relative; font: inherit; font-size: 20px; width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--chiziq); background: var(--karta); color: var(--matn); display: grid; place-items: center;
}
.mm-ikon.matnli { width: auto; border-radius: 999px; padding: 0 16px; font-size: 14px; font-weight: 600; display: flex; gap: 6px; align-items: center; }
.mm-ikon i {
  position: absolute; top: -4px; right: -4px; font-style: normal; font-size: 12px; font-weight: 800; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--mm-yashil); color: var(--asosiy-matn); display: grid; place-items: center;
}
.mm-ikon.matnli i { position: static; }
.mm-ikon.jiringla { border-color: var(--mm-yashil); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mm-yashil) 30%, transparent); animation: jiringla 1.2s ease-in-out infinite; }
@keyframes jiringla { 0%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(-12deg); } 20%, 40% { transform: rotate(12deg); } 50% { transform: rotate(0); } }
@media (prefers-reduced-motion: reduce) { .mm-ikon.jiringla { animation: none; } }
.mm-til { display: flex; background: var(--karta); border: 1px solid var(--chiziq); border-radius: 999px; padding: 3px; }
.mm-til button { font: inherit; font-size: 13px; font-weight: 700; border: 0; background: none; color: var(--xira); padding: 7px 12px; border-radius: 999px; cursor: pointer; }
.mm-til button.faol { background: var(--mm-yashil); color: var(--asosiy-matn); }
.mm-stol-belgi { background: var(--mm-yashil); color: var(--asosiy-matn); font-weight: 800; border-radius: 999px; padding: 8px 14px; font-size: 14px; }
.mm-turkumlar {
  position: sticky; top: 0; z-index: 6; display: flex; gap: 8px; overflow-x: auto; padding: 10px 0; margin: 0 -16px; padding-inline: 16px;
  background: color-mix(in srgb, var(--fon) 92%, transparent); backdrop-filter: blur(8px); scrollbar-width: none;
}
.mm-turkumlar::-webkit-scrollbar { display: none; }
.mm-turkumlar button {
  font: inherit; font-size: 15px; font-weight: 700; white-space: nowrap; cursor: pointer; padding: 10px 18px; border-radius: 999px;
  border: 1px solid var(--chiziq); background: var(--karta); color: var(--matn);
}
.mm-turkumlar button.faol { border-color: var(--mm-yashil); color: var(--mm-yashil); box-shadow: inset 0 0 0 1px var(--mm-yashil); }
.mm-bolim { scroll-margin-top: 70px; }
.mm-bolim h2 { display: flex; align-items: center; gap: 14px; margin: 22px 0 12px; font-size: 20px; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; }
.mm-bolim h2::after { content: ""; flex: 1; height: 2px; background: linear-gradient(90deg, var(--mm-yashil), transparent); opacity: .6; }
.mm-panjara { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
@media (max-width: 520px) { .mm-panjara { grid-template-columns: 1fr 1fr; gap: 10px; } }
.mm-karta {
  background: var(--karta); border: 1px solid var(--chiziq); border-radius: 18px; overflow: hidden; cursor: pointer;
  display: flex; flex-direction: column; transition: border-color .15s, transform .15s;
}
.mm-karta:active { transform: scale(.98); }
.mm-karta.tanlangan { border-color: var(--mm-yashil); box-shadow: 0 0 0 1px var(--mm-yashil); }
.mm-rasm, .mm-taom-rasm, .mm-savat-rasm {
  aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 50% 55%, #3b2c1c 0%, #1a2a1c 55%, #122014 100%);
}
.mm-rasm img, .mm-taom-rasm img, .mm-savat-rasm img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mm-belgi { font-size: 64px; filter: drop-shadow(0 8px 14px rgba(0,0,0,.5)); }
.mm-ichi { padding: 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.mm-ichi h3 { margin: 0; font-size: 17px; font-weight: 800; color: var(--matn); text-transform: none; letter-spacing: 0; }
.mm-tarkib-qisqa { margin: 0; font-size: 13px; color: var(--xira); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mm-narx { font-size: 20px; font-weight: 800; color: var(--mm-yashil); margin-top: auto; }
.mm-narx.katta { font-size: 26px; margin: 0; }
.mm-qosh, .mm-asosiy {
  font: inherit; font-weight: 800; font-size: 16px; cursor: pointer; border: 0; border-radius: 12px; padding: 12px;
  background: linear-gradient(180deg, var(--mm-yashil-och), var(--mm-yashil)); color: var(--asosiy-matn);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--mm-yashil) 25%, transparent);
}
.mm-asosiy { width: 100%; font-size: 18px; padding: 16px; border-radius: 14px; }
.mm-asosiy:disabled { opacity: .6; }
.mm-qadam { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--fon); border-radius: 12px; padding: 4px; }
.mm-qadam button {
  font: inherit; font-size: 22px; font-weight: 800; width: 40px; height: 40px; border-radius: 10px; border: 0; cursor: pointer;
  background: var(--mm-yashil); color: var(--asosiy-matn);
}
.mm-qadam b { font-size: 18px; min-width: 28px; text-align: center; }
.mm-qadam.katta button { width: 52px; height: 52px; }
.mm-savat-tugma {
  position: fixed; z-index: 15; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom));
  width: min(560px, calc(100% - 32px)); display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font: inherit; font-size: 18px; border: 0; border-radius: 999px; padding: 12px 22px 12px 12px; cursor: pointer;
  background: linear-gradient(180deg, var(--mm-yashil-och), var(--mm-yashil)); color: var(--asosiy-matn); box-shadow: 0 10px 30px rgba(0,0,0,.45);
}
.mm-savat-son { background: var(--asosiy-matn); color: var(--mm-yashil); border-radius: 999px; min-width: 40px; height: 40px; display: grid; place-items: center; font-weight: 800; }
.mm-bosh-matn { text-align: center; color: var(--xira); padding: 40px 0; }
.mm-xira { color: var(--xira); font-size: 14px; }
.mm-ogoh { background: color-mix(in srgb, #fbbf24 15%, var(--karta)); border: 1px solid #fbbf24; border-radius: 12px; padding: 10px 14px; }
.mm-xabar { max-width: 420px; margin: 80px auto; text-align: center; display: flex; flex-direction: column; gap: 16px; align-items: center; }
.mm-rahmat { text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; }

/* Mijoz menyusi oynalari */
body.mm-rejim .modal { background: var(--karta); border: 1px solid var(--chiziq); }
body.mm-rejim .modal-bosh { background: var(--karta); }
.mm-modal.modal { max-width: 620px; }
.mm-modal:not(.mm-panel) .modal-bosh { position: absolute; top: 8px; right: 8px; border: 0; background: none; padding: 0; z-index: 2; }
.mm-modal:not(.mm-panel) .modal-bosh h2 { display: none; }
.mm-modal:not(.mm-panel) .yopish-tugma { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.92); color: #111; font-size: 18px; }
.mm-modal:not(.mm-panel) { position: relative; }
.mm-modal:not(.mm-panel) .modal-tana { padding: 0; }
.mm-taom { display: flex; flex-direction: column; gap: 12px; padding-bottom: 16px; }
.mm-taom > :not(.mm-taom-rasm) { margin-left: 18px; margin-right: 18px; }
.mm-taom-rasm { aspect-ratio: 16 / 11; }
.mm-taom-rasm .mm-belgi { font-size: 120px; }
.mm-taom h2 { margin: 6px 18px 0; font-size: 24px; font-weight: 800; }
.mm-tarkib { margin: 0; color: var(--xira); font-size: 16px; line-height: 1.5; }
.mm-tarkib b { color: var(--matn); }
.mm-taom-qator { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.mm-izoh-quti summary { cursor: pointer; color: var(--mm-yashil); font-weight: 700; padding: 6px 0; }
.mm-izoh-quti textarea { width: 100%; margin-top: 8px; }
.mm-chiplar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.mm-chiplar button { font: inherit; font-size: 14px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--chiziq); background: var(--fon); color: var(--matn); cursor: pointer; }
@media (min-width: 700px) {
  body.mm-rejim .modal-fon:has(.mm-panel) { justify-content: flex-end; align-items: stretch; }
  .mm-panel.modal { max-width: 440px; max-height: 100vh; height: 100%; border-radius: 0; border-width: 0 0 0 1px; }
}
.mm-savat-qatorlar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.mm-savat-qator { display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; align-items: center; background: var(--fon); border-radius: 14px; padding: 8px; }
.mm-savat-rasm { width: 64px; border-radius: 10px; aspect-ratio: 1; }
.mm-savat-rasm .mm-belgi { font-size: 32px; }
.mm-savat-nom { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mm-savat-nom small { color: #f59e0b; }
.mm-savat-nom span { color: var(--mm-yashil); font-weight: 700; }
.mm-savat-qator .mm-qadam { background: none; }
.mm-savat-qator .mm-qadam button { width: 34px; height: 34px; font-size: 18px; }
.mm-maydon { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--xira); margin-bottom: 12px; }
.mm-maydon select.xato { border-color: var(--qizil); box-shadow: 0 0 0 2px color-mix(in srgb, var(--qizil) 40%, transparent); }
.mm-jami { display: flex; justify-content: space-between; align-items: center; font-size: 20px; margin: 8px 0 12px; }
.mm-jami b { color: var(--mm-yashil); font-size: 26px; }
.mm-sarlavha { color: var(--matn); text-transform: none; letter-spacing: 0; font-size: 17px; margin: 8px 0 10px; }
.mm-buyurtma { background: var(--fon); border: 1px solid var(--chiziq); border-radius: 14px; padding: 12px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 6px; }
.mm-buyurtma.tayyor { border-color: var(--mm-yashil); }
.mm-buyurtma-bosh { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mm-buyurtma-bosh b { font-size: 18px; }
.mm-buyurtma-bosh span { color: var(--xira); font-size: 13px; }

/* Egasi: taom rasmi */
.taom-kichik { width: 48px; height: 48px; flex: none; border-radius: 10px; overflow: hidden; display: grid; place-items: center; font-size: 26px; background: var(--fon); }
.taom-kichik img { width: 100%; height: 100%; object-fit: cover; }
.rasm-tanlov { display: flex; gap: 12px; align-items: center; }
.rasm-korinish { width: 110px; height: 110px; flex: none; border-radius: 14px; overflow: hidden; display: grid; place-items: center; font-size: 52px; background: var(--fon); border: 1px solid var(--chiziq); text-align: center; }
.rasm-korinish img { width: 100%; height: 100%; object-fit: cover; }
.rasm-tugmalar { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.forma .rasm-tugmalar label.tugma { display: inline-flex; flex-direction: row; color: var(--matn); font-size: 15px; }
.mm-taom .mm-asosiy { width: auto; }
@media (max-width: 520px) {
  .mm-ong { flex-wrap: nowrap; gap: 6px; }
  .mm-ikon.matnli .matn { display: none; }
  .mm-ikon.matnli { padding: 0 12px; }
  .mm-logo-nom { font-size: 24px; }
  .mm-logo-kichik { letter-spacing: .2em; }
  .mm-stol-belgi { padding: 8px 10px; font-size: 13px; white-space: nowrap; }
  .mm-til button { padding: 7px 9px; }
}
/* Pastki menyuda 8 tagacha bo'lim — tor telefonda ham sig'sin */
nav a { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 440px) { nav a { font-size: 10px; letter-spacing: -.01em; } nav a span { font-size: 20px; } }

/* Sklad va retsept */
.retsept-quti { border: 1px dashed var(--chiziq); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.retsept-qator { display: grid; grid-template-columns: 1fr 80px auto auto; gap: 6px; align-items: center; }
.retsept-qator input { text-align: right; }
.retsept-natija { font-weight: 600; color: var(--yashil); }
.kirim-qator { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.inv-qator { display: grid; grid-template-columns: 1fr 90px 64px; gap: 8px; align-items: center; }
.inv-farq { text-align: right; font-weight: 700; font-size: 14px; }

/* hidden atributi har doim yashirsin (display: flex bo'lgan elementlarda ham) */
[hidden] { display: none !important; }

/* Analiz grafiklari */
.grafik { width: 100%; height: 170px; display: block; }
.g-chiziq { stroke: var(--chiziq); stroke-width: 1; }
.g-ust { fill: var(--asosiy); }
.g-ust.eng { fill: var(--yashil); }
.g-oldin { fill: var(--chiziq); }
.g-yozuv { fill: var(--xira); font-size: 13px; text-anchor: middle; }
.g-belgilar { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 6px; }
.g-nuqta { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--asosiy); margin-right: 6px; vertical-align: -1px; }
.g-nuqta.oldin { background: var(--chiziq); }
.an-qator { margin: 8px 0; }
.an-nom { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.an-nom span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-nom b { white-space: nowrap; font-weight: 600; }
.an-chiziq { height: 8px; background: var(--fon); border-radius: 999px; overflow: hidden; margin-top: 4px; }
.an-chiziq i { display: block; height: 100%; background: var(--asosiy); border-radius: 999px; }
.an-ulush { display: flex; height: 18px; border-radius: 999px; overflow: hidden; background: var(--fon); }
.u-zal { background: var(--asosiy) !important; } .u-olib { background: var(--sariq) !important; } .u-dostavka { background: var(--yashil) !important; }
