/* ==========================================================================
   QRdasturxon — design tokens (faqat oq rejim)
   ========================================================================== */

:root {
  color-scheme: light;

  /* Restoran o'z rangini tanlaydi; public/base.html buni qayta yozadi.
     Accent ataylab kam ishlatiladi: narx, faol chip, asosiy tugma, hero. */
  --accent: #b45309;
  --accent-fg: #ffffff;
  --accent-wash: color-mix(in srgb, var(--accent) 8%, #ffffff);
  --accent-edge: color-mix(in srgb, var(--accent) 22%, var(--line));

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  /* Uslub tanlansa sarlavha shrifti va harflar orasi shu yerdan almashadi */
  --font-head: var(--font-sans);
  --head-spacing: -.025em;

  --text-xs: .75rem;
  --text-sm: .8125rem;
  --text-base: .9375rem;
  --text-lg: 1.0625rem;
  --text-xl: 1.1875rem;
  --text-2xl: 1.375rem;
  --text-3xl: 1.75rem;

  --r-sm: 10px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-full: 999px;

  --page: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #f2f3f5;
  --surface-3: #e9ebef;
  --ink: #0f1115;
  --ink-2: #6b7280;
  --ink-3: #9ca3af;
  --line: #eceef1;
  --line-2: #dfe2e7;

  --danger: #b42318;
  --danger-wash: #fef3f2;
  --danger-edge: #fecdca;
  --ok: #067647;
  --ok-wash: #ecfdf3;

  --shadow-xs: 0 1px 2px rgb(16 24 40 / .04);
  --shadow: 0 1px 2px rgb(16 24 40 / .04), 0 8px 24px -12px rgb(16 24 40 / .12);
  --shadow-lg: 0 2px 4px rgb(16 24 40 / .04), 0 20px 48px -16px rgb(16 24 40 / .18);

  --focus: 0 0 0 3px color-mix(in srgb, var(--accent) 26%, transparent);
}

/* ==========================================================================
   base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.55;
  color: var(--ink);
  background: var(--page);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { margin: 0 0 .4rem; line-height: 1.25; font-weight: 700; letter-spacing: -.02em; }
h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-lg); }
h3 { font-size: var(--text-base); }
p { margin: 0 0 .6rem; }
p:last-child { margin-bottom: 0; }

/* Inline ikonkalar — hamma joyda matn o'lchamiga moslashadi */
.ico {
  display: inline-block;
  width: 1.05em; height: 1.05em;
  flex: none;
  vertical-align: -.16em;
}

:where(a, button, input, select, textarea):focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: var(--r-sm);
}

/* utilities */
.wrap { max-width: 880px; margin-inline: auto; padding-inline: 1rem; }
.stack > * + * { margin-top: 1rem; }
.stack-sm > * + * { margin-top: .5rem; }
.muted { color: var(--ink-2); }
.small { font-size: var(--text-sm); }
.center { text-align: center; }
.row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.spread { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

/* ==========================================================================
   buttons
   ========================================================================== */

.btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--ink);
  --btn-line: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .55rem .95rem;
  border: 1px solid var(--btn-line);
  border-radius: var(--r-full);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit; font-size: var(--text-sm); font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s, transform .06s;
}
.btn:hover { text-decoration: none; background: var(--surface-2); }
.btn:active { transform: translateY(1px); }

.btn-primary { --btn-bg: var(--accent); --btn-fg: var(--accent-fg); --btn-line: var(--accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, black); border-color: transparent; }

.btn-danger { --btn-bg: var(--danger-wash); --btn-fg: var(--danger); --btn-line: var(--danger-edge); }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 12%, #fff); }

.btn-ghost { --btn-bg: transparent; --btn-line: transparent; }

.btn-sm { padding: .35rem .7rem; font-size: var(--text-xs); }
.btn-block { width: 100%; }

/* ==========================================================================
   forms
   ========================================================================== */

label { display: block; font-size: var(--text-sm); font-weight: 600; margin-bottom: .3rem; color: var(--ink); }

input, select, textarea {
  width: 100%;
  padding: .6rem .8rem;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
  font: inherit; font-size: var(--text-base);
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus);
}
textarea { min-height: 74px; resize: vertical; }
select {
  appearance: none; padding-right: 2rem; cursor: pointer;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 1rem center, right .7rem center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
input[type="color"] { padding: .25rem; height: 42px; cursor: pointer; }
input[type="file"] { padding: .45rem; font-size: var(--text-sm); cursor: pointer; }
input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--accent); }

.field + .field { margin-top: .9rem; }
.hint { margin: .35rem 0 0; font-size: var(--text-xs); color: var(--ink-3); }

.grid-2, .grid-3 { display: grid; gap: .9rem; }
/* grid elementlari yonma-yon turadi — vertikal margin ularni siljitmasin */
.grid-2 > .field + .field, .grid-3 > .field + .field { margin-top: 0; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 860px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 640px) and (max-width: 859px) { .grid-3 { grid-template-columns: 1fr 1fr; } }

.check { display: flex; align-items: center; gap: .5rem; }
.check label { margin: 0; font-weight: 450; }

/* ==========================================================================
   surfaces
   ========================================================================== */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.15rem;
  box-shadow: var(--shadow-xs);
}
.card > h2:first-child { margin-bottom: .9rem; }

.badge {
  display: inline-flex; align-items: center;
  padding: .1rem .5rem;
  border-radius: var(--r-full);
  font-size: var(--text-xs); font-weight: 700;
  background: var(--accent-wash); color: var(--accent);
  border: 1px solid var(--accent-edge);
}
.badge-off { background: var(--surface-2); color: var(--ink-3); border-color: var(--line); }
.badge-ok { background: var(--ok-wash); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 22%, transparent); }

.alert {
  padding: .65rem .85rem;
  border-radius: var(--r-md);
  background: var(--danger-wash);
  color: var(--danger);
  border: 1px solid var(--danger-edge);
  font-size: var(--text-sm);
}

.notice {
  padding: .8rem 1rem;
  margin-bottom: 1.35rem;
  border-radius: var(--r-md);
  background: var(--accent-wash);
  border: 1px solid var(--accent-edge);
  color: var(--ink-2);
  font-size: var(--text-sm);
}
.notice strong { color: var(--ink); }
.notice-warn { background: var(--danger-wash); border-color: var(--danger-edge); }
.notice-warn strong { color: var(--danger); }

table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
th, td { text-align: left; padding: .7rem .55rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
thead th {
  font-size: var(--text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-3); border-bottom-color: var(--line-2);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--page); }
.table-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-xs); }
.table-scroll { overflow-x: auto; border-radius: var(--r-lg); }
.table-scroll > table { min-width: 880px; }
.col-thumb { width: 46px; }
.col-actions { width: 1%; white-space: nowrap; }
.table-scroll th:first-child, .table-scroll td:first-child { padding-left: 1rem; }
.table-scroll th:last-child, .table-scroll td:last-child { padding-right: 1rem; }

.empty {
  text-align: center; padding: 3.5rem 1.25rem;
  color: var(--ink-2);
  background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--r-lg);
}
.empty strong { display: block; color: var(--ink); margin-bottom: .25rem; }

.thumb, .thumb-empty {
  width: 46px; height: 46px; min-width: 46px; max-width: none;
  border-radius: var(--r-sm);
  background: var(--surface-2);
}
.thumb { object-fit: cover; }
.thumb-empty { border: 1px dashed var(--line-2); }

/* ==========================================================================
   admin shell — desktopda yon panel, mobilda yuqori panel
   ========================================================================== */

.app { min-height: 100vh; }

.sidebar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.sidebar-inner {
  display: flex; align-items: center; gap: 1rem;
  padding: .6rem 1rem;
  max-width: 1240px; margin-inline: auto;
}
.brand {
  font-size: var(--text-lg); font-weight: 800; letter-spacing: -.03em;
  color: var(--ink); white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand span { color: var(--accent); }

.nav { display: flex; gap: .15rem; overflow-x: auto; scrollbar-width: none; flex: 1; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .45rem .75rem; border-radius: var(--r-full);
  color: var(--ink-2); font-size: var(--text-sm); font-weight: 600;
  white-space: nowrap;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.nav a.active { background: var(--accent-wash); color: var(--accent); }
.nav svg { width: 17px; height: 17px; flex-shrink: 0; }

/* Mobil ustunda nav gorizontal skroll bo'ladi — chetida "davomi bor" belgisi */
@media (max-width: 899px) {
  .nav { mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
}

@media (min-width: 900px) {
  .app { display: grid; grid-template-columns: 236px 1fr; }
  .sidebar {
    border-bottom: none; border-right: 1px solid var(--line);
    height: 100vh; top: 0;
  }
  .sidebar-inner {
    flex-direction: column; align-items: stretch; gap: 1.25rem;
    height: 100%; padding: 1.25rem 1rem;
  }
  .brand { font-size: var(--text-xl); padding-inline: .5rem; }
  .nav { flex-direction: column; gap: .1rem; overflow: visible; }
  .nav a { padding: .5rem .75rem; }
  .sidebar form { margin-top: auto; }
}

.app-main { min-width: 0; padding: 1.5rem 0 4rem; }
.app-inner { max-width: 1100px; margin-inline: auto; padding-inline: 1rem; }
.page-head { margin-bottom: 1.35rem; }
.page-head h1 { font-size: var(--text-2xl); }
.page-head .muted { font-size: var(--text-sm); }

.stat-grid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.stat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 1rem 1.1rem; box-shadow: var(--shadow-xs);
}
.stat b { display: block; font-size: var(--text-3xl); font-weight: 700; line-height: 1.1; letter-spacing: -.03em; }
.stat span { color: var(--ink-2); font-size: var(--text-sm); }

.section-label {
  font-size: var(--text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-3); margin: 2rem 0 .75rem;
}
.section-label:first-child { margin-top: 0; }

/* ochilishlar grafigi — kutubxonasiz, oddiy ustunlar */
.chart {
  display: flex; align-items: flex-end; gap: 2px;
  height: 120px;
}
.chart-col {
  flex: 1; height: 100%;
  display: flex; align-items: flex-end;
  border-radius: 3px;
}
.chart-col:hover { background: var(--surface-2); }
.chart-bar {
  width: 100%; min-height: 2px;
  border-radius: 3px;
  background: var(--accent);
  opacity: .85;
}
.chart-col:hover .chart-bar { opacity: 1; }

.editor-row {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 1.1rem; box-shadow: var(--shadow-xs);
}
.editor-row + .editor-row { margin-top: .7rem; }

/* Yangi restoran uchun ishga tushirish ro'yxati */
.setup {
  padding: 1.15rem;
  margin-bottom: 1.35rem;
  background: var(--surface);
  border: 1px solid var(--accent-edge);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
}
.setup-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; margin-bottom: 1rem;
}
.setup-head h2 { margin-bottom: .15rem; }
.setup-progress { display: flex; gap: 4px; flex: none; padding-top: .4rem; }
.setup-progress span {
  width: 26px; height: 4px; border-radius: var(--r-full);
  background: var(--surface-3);
}
.setup-progress .is-done { background: var(--accent); }

.setup-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.setup-step {
  display: flex; align-items: center; gap: .75rem;
  padding: .7rem .85rem;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--page);
}
.setup-step.is-done { background: transparent; border-style: dashed; }
.setup-step.is-done strong { color: var(--ink-2); text-decoration: line-through; }

.setup-mark {
  display: grid; place-items: center; flex: none;
  width: 26px; height: 26px; border-radius: var(--r-full);
  background: var(--surface-3); color: var(--ink-2);
  font-size: var(--text-sm); font-weight: 700;
}
.setup-step.is-done .setup-mark { background: var(--accent); color: var(--accent-fg); }
.setup-mark svg { width: 15px; height: 15px; }

/* Menyu uslubini tanlash */
.theme-picker { display: grid; gap: .6rem; }
@media (min-width: 720px) { .theme-picker { grid-template-columns: 1fr 1fr; } }

.theme-option {
  display: flex; align-items: flex-start; gap: .75rem;
  padding: .85rem;
  border: 1px solid var(--line-2); border-radius: var(--r-md);
  cursor: pointer; margin: 0; font-weight: 400;
  transition: border-color .15s, background .15s;
}
.theme-option:hover { background: var(--page); }
.theme-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-wash);
}
.theme-option input { width: auto; margin-top: .2rem; accent-color: var(--accent); }
.theme-swatch {
  width: 30px; height: 30px; flex: none;
  border-radius: 8px; border: 1px solid rgb(0 0 0 / .08);
}
.theme-text { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.theme-text strong { font-size: var(--text-base); }

/* ==========================================================================
   login
   ========================================================================== */

.login-shell {
  min-height: 100vh; display: grid; place-items: center; padding: 1.5rem;
  background:
    radial-gradient(900px 420px at 50% -8%, var(--accent-wash), transparent 70%),
    var(--page);
}
.login-card { width: 100%; max-width: 372px; box-shadow: var(--shadow-lg); padding: 1.6rem; }
.login-card .brand { font-size: var(--text-2xl); }

/* ==========================================================================
   public — hero (foto yoki tekis panel) + yumaloq varaq
   ========================================================================== */

/* Matnni N qatorga kesish — eski -webkit sintaksisi va standarti birga */
.clamp-2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.hero {
  position: relative;
  padding: .9rem 0 2.75rem;
  background: var(--accent) center / cover no-repeat;
}
/* Muqova fotosi ko'rinib turishi uchun biroz balandroq */
.hero-photo { min-height: 250px; display: flex; align-items: flex-end; }
.hero-photo .hero-inner { width: 100%; }
.hero-photo .hero-top { position: absolute; inset-inline: 1rem; top: .9rem; }
.hero-flat {
  background-image: linear-gradient(
    155deg,
    color-mix(in srgb, var(--accent) 90%, #ffffff),
    color-mix(in srgb, var(--accent) 72%, #000000));
}
.hero-photo::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgb(15 17 21 / .34) 0%, rgb(15 17 21 / .12) 38%, rgb(15 17 21 / .78) 100%);
}
.hero-inner {
  position: relative; z-index: 1;
  max-width: 880px; margin-inline: auto; padding-inline: 1rem;
}
.hero-top { display: flex; justify-content: flex-end; }
.hero-body { display: flex; align-items: flex-end; gap: .8rem; margin-top: 1.5rem; }
.hero-logo {
  width: 56px; height: 56px; flex: none;
  border-radius: 15px; object-fit: cover; background: #fff;
  box-shadow: 0 0 0 3px rgb(255 255 255 / .8);
}
.hero-title {
  margin: 0; color: #fff;
  font-family: var(--font-head);
  font-size: var(--text-2xl); font-weight: 700; letter-spacing: var(--head-spacing);
  text-shadow: 0 1px 10px rgb(0 0 0 / .28);
}
.hero-sub {
  margin: .12rem 0 0; color: rgb(255 255 255 / .84); font-size: var(--text-sm);
  text-shadow: 0 1px 8px rgb(0 0 0 / .3);
}

/* Aloqa chiplari muqova ustida — shishasimon, foto ustida ham o'qiladi */
.hero-meta {
  display: flex; gap: .4rem; margin-top: .85rem;
  overflow-x: auto; scrollbar-width: none;
  padding-bottom: .1rem;
}
.hero-meta::-webkit-scrollbar { display: none; }
.hero-meta > * {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .3rem .7rem; border-radius: var(--r-full);
  background: rgb(0 0 0 / .35);
  backdrop-filter: blur(10px);
  border: 1px solid rgb(255 255 255 / .2);
  font-size: var(--text-xs); color: rgb(255 255 255 / .92);
  white-space: nowrap;
}
.hero-meta a { color: rgb(255 255 255 / .92); }
.hero-meta a:hover { text-decoration: none; background: rgb(0 0 0 / .45); }
.hero-meta svg { color: rgb(255 255 255 / .7); }

/* Hero ustiga chiqadigan yumaloq varaq — dizaynning asosiy detali */
.sheet {
  position: relative; z-index: 2;
  margin-top: -1.5rem;
  padding-top: 1.1rem;
  min-height: 55vh;
  background: var(--page);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
}

/* til tanlagich */
.langs {
  display: inline-flex; gap: 2px; padding: 3px;
  border-radius: var(--r-full);
  background: rgb(255 255 255 / .18);
  backdrop-filter: blur(10px);
  border: 1px solid rgb(255 255 255 / .22);
}
.langs a {
  padding: .18rem .6rem; border-radius: var(--r-full);
  font-size: var(--text-xs); font-weight: 700; letter-spacing: .02em;
  color: rgb(255 255 255 / .88);
}
.langs a:hover { color: #fff; text-decoration: none; }
.langs a.active { background: #fff; color: var(--ink); }

.langs-solid { background: var(--surface-2); border-color: var(--line); backdrop-filter: none; }
.langs-solid a { color: var(--ink-2); }
.langs-solid a:hover { color: var(--ink); }
.langs-solid a.active { background: var(--accent); color: var(--accent-fg); }

/* meta chiplari — ish vaqti / telefon / manzil */
/* Wi-Fi paroli — bosilganda ochiladi, darrov ko'rinib turmasin */
.wifi {
  max-width: 880px; margin: 0 auto .5rem; padding-inline: 1rem;
}
.wifi summary {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .35rem .75rem; border-radius: var(--r-full);
  background: var(--surface); border: 1px solid var(--line);
  font-size: var(--text-xs); color: var(--ink-2);
  cursor: pointer; list-style: none; white-space: nowrap;
}
.wifi summary::-webkit-details-marker { display: none; }
.wifi[open] summary { border-color: var(--accent-edge); color: var(--accent); }
.wifi summary svg { color: var(--ink-3); }
.wifi[open] summary svg { color: var(--accent); }
.wifi-body {
  margin-top: .35rem; padding: .5rem .75rem;
  border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--accent-edge);
  font-size: var(--text-xs);
}
.wifi-body code {
  display: block; margin-top: .15rem;
  font-size: var(--text-base); font-weight: 700; color: var(--ink);
  user-select: all;
}

/* Taom belgilari: o'tkir / vegetarian / halol */
.marks { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .4rem; }
.mark {
  display: inline-flex; align-items: center; gap: .2rem;
  padding: .1rem .4rem; border-radius: var(--r-full);
  font-size: var(--text-xs); font-weight: 600;
  background: var(--surface-2); color: var(--ink-2);
  border: 1px solid var(--line);
}
.mark svg { width: .9em; height: .9em; }
.mark-spicy { color: #b42318; background: #fef3f2; border-color: #fecdca; }
.mark-veg { color: #067647; background: #ecfdf3; border-color: #abefc6; }
.mark-halal { color: #175cd3; background: #eff8ff; border-color: #b2ddff; }
.detail-note + .marks, .sheet-scroll .marks { margin-top: 0; }

/* Taomga qoldirilgan izohlar */
.comment { padding: .6rem 0; border-bottom: 1px solid var(--line); }
.comment:last-of-type { border-bottom: 0; }
.comment-head { display: flex; align-items: baseline; gap: .5rem; margin-bottom: .1rem; }

/* ==========================================================================
   public — kategoriya chiplari + qidiruv
   ========================================================================== */

.chips {
  position: sticky; top: 0; z-index: 20;
  margin-top: 1rem;
  background: color-mix(in srgb, var(--page) 90%, transparent);
  backdrop-filter: blur(12px) saturate(1.4);
}
.chips-inner {
  max-width: 880px; margin-inline: auto;
  padding: .6rem 1rem;
  display: flex; gap: .4rem; overflow-x: auto;
  scrollbar-width: none; scroll-behavior: smooth;
}
.chips-inner::-webkit-scrollbar { display: none; }
.chip {
  white-space: nowrap;
  padding: .42rem .9rem; border-radius: var(--r-full);
  background: var(--surface); border: 1px solid var(--line);
  font-size: var(--text-sm); font-weight: 600; color: var(--ink-2);
  transition: background .15s, color .15s, border-color .15s;
}
.chip:hover { text-decoration: none; color: var(--ink); border-color: var(--line-2); }
.chip.active {
  background: var(--accent); border-color: var(--accent); color: var(--accent-fg);
}

.search { max-width: 880px; margin: .6rem auto 0; padding-inline: 1rem; }
.search-box { position: relative; }
.search-box svg {
  position: absolute; left: .95rem; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; color: var(--ink-3); pointer-events: none;
}
.search-box input {
  padding-left: 2.6rem; border-radius: var(--r-full);
  border-color: var(--line); box-shadow: var(--shadow-xs);
}

/* ==========================================================================
   public — bo'lim sarlavhasi + taom gridi
   ========================================================================== */

.section-title {
  position: relative; display: inline-block;
  margin: 1.9rem 0 .9rem;
  font-family: var(--font-head);
  font-size: var(--text-xl); font-weight: 700; letter-spacing: var(--head-spacing);
  scroll-margin-top: 4rem;
}
.section-title::after {
  content: "";
  position: absolute; left: -3px; right: -7px; bottom: .1em;
  height: .42em; border-radius: 3px;
  background: var(--accent); opacity: .16;
}
.section-title span { position: relative; }

.dish-grid {
  display: grid; gap: .7rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 640px) { .dish-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; } }
@media (min-width: 960px) { .dish-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.dish {
  display: flex; flex-direction: column;
  padding: .45rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  color: inherit;
  transition: box-shadow .18s, transform .18s;
}
.dish:hover { text-decoration: none; box-shadow: var(--shadow); transform: translateY(-2px); }
.dish:active { transform: translateY(0); }

.dish-media {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface-2);
}
.dish-media img { width: 100%; height: 100%; object-fit: cover; }

/* rasmsiz taom — ataylab qilingan neytral plitka */
.dish-ph {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  background: linear-gradient(160deg, var(--surface-2), var(--surface-3));
  color: var(--ink-3);
}
.dish-ph svg { width: 34px; height: 34px; opacity: .55; }

.price-pill {
  position: absolute; left: .4rem; bottom: .4rem;
  padding: .2rem .55rem; border-radius: var(--r-full);
  background: rgb(255 255 255 / .93);
  backdrop-filter: blur(8px);
  color: var(--ink); font-size: var(--text-xs); font-weight: 700;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 1px 4px rgb(16 24 40 / .16);
}
.price-pill small { font-weight: 600; color: var(--ink-2); }

/* Tayyorlanish vaqti — rasmning o'ng-pastida, narx bilan bir qatorda */
.time-pill {
  position: absolute; right: .4rem; bottom: .4rem;
  display: inline-flex; align-items: center; gap: .2rem;
  padding: .2rem .5rem; border-radius: var(--r-full);
  background: rgb(15 17 21 / .6);
  backdrop-filter: blur(8px);
  color: #fff; font-size: var(--text-xs); font-weight: 600;
  white-space: nowrap;
}
.time-pill svg { width: .95em; height: .95em; opacity: .8; }

.dish-tag {
  position: absolute; right: .4rem; top: .4rem;
  padding: .12rem .5rem; border-radius: var(--r-full);
  background: var(--accent); color: var(--accent-fg);
  font-size: var(--text-xs); font-weight: 700;
  box-shadow: 0 1px 4px rgb(16 24 40 / .18);
}

.dish-body { padding: .6rem .4rem .3rem; }
.dish-name {
  margin: 0;
  font-family: var(--font-head);
  font-size: var(--text-base); font-weight: 600; letter-spacing: -.012em; line-height: 1.35;
}
.dish-desc {
  margin: .15rem 0 0;
  font-size: var(--text-sm); color: var(--ink-2); line-height: 1.4;
}

/* ==========================================================================
   public — taom tafsiloti
   ========================================================================== */

.detail-bar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--page) 90%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.detail-bar-inner {
  max-width: 640px; margin-inline: auto; padding: .6rem 1rem;
  display: flex; align-items: center; gap: 1rem;
}
.detail-img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--r-lg); box-shadow: var(--shadow);
}
.detail-ph {
  width: 100%; aspect-ratio: 4 / 3;
  display: grid; place-items: center;
  border-radius: var(--r-lg);
  background: linear-gradient(160deg, var(--surface-2), var(--surface-3));
  color: var(--ink-3);
}
.detail-ph svg { width: 56px; height: 56px; opacity: .5; }
.detail-title {
  font-family: var(--font-head);
  font-size: var(--text-3xl); letter-spacing: var(--head-spacing); margin-bottom: .1rem;
}
.detail-place { margin: 0 0 .6rem; }
.detail-head { display: flex; flex-direction: column; gap: 0; }

/* Narx, vaqt va nishonlar bitta qatorda */
.detail-facts { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .5rem; }
.fact {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .25rem .65rem; border-radius: var(--r-full);
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: var(--text-sm); font-weight: 600; color: var(--ink-2);
  white-space: nowrap;
}
.fact svg { color: var(--ink-3); }
.fact-price {
  background: var(--accent-wash); border-color: var(--accent-edge);
  color: var(--accent); font-size: var(--text-lg); font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.fact-price small { font-size: var(--text-xs); font-weight: 600; }
.fact-hot { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }

.detail-note { font-size: var(--text-lg); color: var(--ink-2); }
.detail-block {
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.detail-block-title {
  display: flex; align-items: center; gap: .35rem;
  font-size: var(--text-xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-3); margin-bottom: .3rem;
}
.detail-block-title svg { width: 1.1em; height: 1.1em; }

/* ==========================================================================
   bottom sheet — taom tafsiloti menyudan chiqmasdan ochiladi
   ========================================================================== */

.sheet-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgb(15 17 21 / .45);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .34s ease;
}
.sheet-panel {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 61;
  display: flex; flex-direction: column;
  max-height: 88vh;
  max-height: 88dvh;
  background: var(--surface);
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -8px 40px -12px rgb(16 24 40 / .3);
  transform: translateY(100%);
  transition: transform .34s cubic-bezier(.32, .72, 0, 1);
  will-change: transform;
}
/* Keng ekranda oynani markazda ushlab turamiz */
@media (min-width: 720px) {
  .sheet-panel { inset-inline: auto; left: 50%; width: 560px; margin-left: -280px; }
}

.is-sheet-open .sheet-overlay { opacity: 1; }
.is-sheet-open .sheet-panel { transform: translateY(0); }

/* Barmoq ortidan sudralayotganda animatsiya xalaqit bermasin */
.sheet-panel.is-dragging { transition: none; }

.sheet-grip {
  flex: none;
  display: block; width: 100%; padding: .85rem 0 .35rem;
  border: 0; background: none; cursor: grab;
  touch-action: none;
}
.sheet-grip::before {
  content: ""; display: block; margin-inline: auto;
  width: 40px; height: 4px; border-radius: var(--r-full);
  background: var(--line-2);
}
.sheet-grip:active { cursor: grabbing; }

.sheet-scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: .35rem 1.15rem calc(1.5rem + env(safe-area-inset-bottom));
}
.sheet-scroll > * + * { margin-top: 1rem; }
.sheet-scroll .detail-title { font-size: var(--text-2xl); }

/* mazmun yuklanguncha ko'rinadigan skelet */
.sheet-skeleton { display: grid; gap: .8rem; }
.sheet-skeleton i {
  display: block; border-radius: var(--r-md);
  background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2));
  background-size: 200% 100%;
  animation: sheet-shimmer 1.2s linear infinite;
}
.sheet-skeleton i:nth-child(1) { aspect-ratio: 4 / 3; }
.sheet-skeleton i:nth-child(2) { height: 26px; width: 55%; }
.sheet-skeleton i:nth-child(3) { height: 18px; width: 35%; }
@keyframes sheet-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* Oyna ochiq turganda orqa fon qimirlamasin */
body.is-sheet-locked { position: fixed; inset-inline: 0; overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .sheet-panel, .sheet-overlay { transition: none; }
  .sheet-skeleton i { animation: none; }
}

.footer {
  padding: 2.5rem 1rem 3rem; text-align: center;
  color: var(--ink-3); font-size: var(--text-sm);
}
.footer-name { color: var(--ink-2); font-weight: 600; }

/* ==========================================================================
   landing — platformaga kelgan restoran egasi ko'radigan sahifa
   ========================================================================== */

.site-head {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-head-inner {
  max-width: 1080px; margin-inline: auto; padding: .7rem 1rem;
  display: flex; align-items: center; gap: 1rem;
}
.site-nav { display: none; flex: 1; gap: .25rem; }
.site-nav a {
  padding: .4rem .7rem; border-radius: var(--r-full);
  color: var(--ink-2); font-size: var(--text-sm); font-weight: 600;
}
.site-nav a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
@media (min-width: 760px) {
  .site-nav { display: flex; }
  .site-head-inner .brand { margin-right: 1rem; }
}

.lp-wrap { max-width: 1080px; margin-inline: auto; padding-inline: 1rem; }

.lp-hero {
  padding: 3.5rem 0 3rem;
  text-align: center;
  background:
    radial-gradient(900px 420px at 50% -20%, var(--accent-wash), transparent 70%),
    var(--page);
}
.lp-eyebrow {
  display: inline-block;
  padding: .25rem .8rem; margin-bottom: 1rem;
  border-radius: var(--r-full);
  background: var(--surface); border: 1px solid var(--accent-edge);
  color: var(--accent); font-size: var(--text-xs); font-weight: 700;
}
.lp-title {
  max-width: 16ch; margin: 0 auto .8rem;
  font-size: clamp(1.9rem, 6vw, 3.1rem); font-weight: 700; letter-spacing: -.035em;
  line-height: 1.1;
}
.lp-lead {
  max-width: 54ch; margin: 0 auto 1.6rem;
  font-size: var(--text-lg); color: var(--ink-2);
}

.lp-section { padding: 3rem 0; }
.lp-alt { background: var(--surface); border-block: 1px solid var(--line); }
.lp-h2 {
  text-align: center; margin-bottom: 1.75rem;
  font-size: clamp(1.35rem, 3.5vw, 1.9rem); letter-spacing: -.03em;
}

.lp-steps, .lp-grid, .lp-plans { display: grid; gap: 1rem; }
@media (min-width: 720px) {
  .lp-steps { grid-template-columns: repeat(3, 1fr); }
  .lp-grid { grid-template-columns: repeat(2, 1fr); }
  .lp-plans { grid-template-columns: repeat(3, 1fr); align-items: start; }
}
@media (min-width: 980px) { .lp-grid { grid-template-columns: repeat(3, 1fr); } }
/* Ikkita tarif markazda tursin, uchtalikdek cho'zilib ketmasin */
@media (min-width: 720px) {
  .lp-plans-two { grid-template-columns: repeat(2, minmax(0, 320px)); justify-content: center; }
}

.lp-step { text-align: center; padding: 1rem; }
.lp-num {
  display: grid; place-items: center;
  width: 38px; height: 38px; margin: 0 auto .7rem;
  border-radius: var(--r-full);
  background: var(--accent); color: var(--accent-fg);
  font-weight: 700;
}

.lp-card {
  padding: 1.25rem;
  background: var(--page); border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.lp-alt .lp-card { background: var(--page); }
.lp-card h3 { display: flex; align-items: center; gap: .5rem; margin-bottom: .35rem; }
.lp-card h3 svg { color: var(--accent); }

.lp-plan {
  position: relative;
  padding: 1.5rem 1.25rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-xs);
}
.lp-plan-best {
  border-color: var(--accent); box-shadow: var(--shadow);
}
.lp-tag {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  padding: .15rem .7rem; border-radius: var(--r-full);
  background: var(--accent); color: var(--accent-fg);
  font-size: var(--text-xs); font-weight: 700; white-space: nowrap;
}
.lp-price {
  margin: .3rem 0 1rem;
  font-size: var(--text-2xl); font-weight: 700; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.lp-list { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.lp-list li {
  position: relative; padding-left: 1.4rem; margin-bottom: .45rem;
  font-size: var(--text-sm); color: var(--ink-2);
}
.lp-list li::before {
  content: ""; position: absolute; left: .15rem; top: .45em;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}

.lp-cta { padding: 3.5rem 0 4rem; background: var(--surface); border-top: 1px solid var(--line); }

/* ==========================================================================
   uslublar — palitra themes.py dan keladi, quyida tuzilmaviy farqlar
   ========================================================================== */

/* --- Klassik: chop etilgan menyu hissi. Soyasiz, chiziqli, serif --- */

[data-theme="klassik"] .dish {
  box-shadow: none;
  border-color: var(--line-2);
}
[data-theme="klassik"] .dish:hover { box-shadow: none; transform: none; border-color: var(--accent); }
[data-theme="klassik"] .dish-name { font-family: var(--font-head); font-size: var(--text-lg); }

/* Sarlavha ostida ingichka chiziq — bo'yoq izi o'rniga */
[data-theme="klassik"] .section-title {
  display: block;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: var(--text-lg);
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--line-2);
}
[data-theme="klassik"] .section-title::after { display: none; }

[data-theme="klassik"] .price-pill {
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-head);
  box-shadow: none;
  border: 1px solid var(--line-2);
}
[data-theme="klassik"] .hero-title { font-size: var(--text-3xl); }
[data-theme="klassik"] .chips a,
[data-theme="klassik"] .chip { letter-spacing: .04em; text-transform: uppercase; font-size: var(--text-xs); }
[data-theme="klassik"] .search-box input,
[data-theme="klassik"] .card,
[data-theme="klassik"] .table-card { box-shadow: none; }

/* --- Issiq: chegarasiz, yumshoq va katta soyalar --- */

[data-theme="issiq"] .dish {
  border-color: transparent;
  box-shadow: 0 2px 4px rgb(124 66 30 / .06), 0 12px 28px -10px rgb(124 66 30 / .22);
  padding: .55rem;
}
[data-theme="issiq"] .dish:hover {
  box-shadow: 0 4px 8px rgb(124 66 30 / .08), 0 18px 36px -12px rgb(124 66 30 / .3);
}
[data-theme="issiq"] .section-title::after { height: .55em; opacity: .24; border-radius: 999px; }
[data-theme="issiq"] .chip { border-color: transparent; box-shadow: 0 1px 3px rgb(124 66 30 / .1); }
[data-theme="issiq"] .search-box input { border-color: transparent; box-shadow: 0 2px 8px rgb(124 66 30 / .1); }
[data-theme="issiq"] .card { border-color: transparent; box-shadow: 0 2px 10px rgb(124 66 30 / .1); }
[data-theme="issiq"] .hero-logo { border-radius: 50%; }

/* --- Minimal: soyasiz, faqat ingichka chiziqlar, rang yo'q --- */

[data-theme="minimal"] .dish {
  box-shadow: none;
  border-color: var(--line);
}
[data-theme="minimal"] .dish:hover { box-shadow: none; transform: none; border-color: var(--ink); }

[data-theme="minimal"] .section-title {
  display: block;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--ink-2);
  margin-bottom: 1.1rem;
}
[data-theme="minimal"] .section-title::after { display: none; }

[data-theme="minimal"] .price-pill {
  background: var(--ink);
  color: #fff;
  box-shadow: none;
  backdrop-filter: none;
}
[data-theme="minimal"] .dish-tag,
[data-theme="minimal"] .badge { background: var(--ink); color: #fff; border-color: var(--ink); }
[data-theme="minimal"] .chip { box-shadow: none; }
[data-theme="minimal"] .chip.active { background: var(--ink); border-color: var(--ink); }
[data-theme="minimal"] .search-box input,
[data-theme="minimal"] .card,
[data-theme="minimal"] .table-card,
[data-theme="minimal"] .sheet-panel { box-shadow: none; }
[data-theme="minimal"] .fact-price { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
[data-theme="minimal"] .mark { background: transparent; }

/* ==========================================================================
   chop etish uchun menyu — brauzerdan "Chop etish -> PDF saqlash"
   ========================================================================== */

.print-page { background: var(--surface-3); }

.print-bar {
  position: sticky; top: 0; z-index: 20;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.print-bar-inner {
  max-width: 820px; margin-inline: auto; padding: .6rem 1rem;
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
}

.print-sheet {
  max-width: 820px; margin: 1.5rem auto; padding: 2.5rem;
  background: #fff; box-shadow: var(--shadow);
}
.print-head { text-align: center; padding-bottom: 1rem; border-bottom: 2px solid var(--ink); }
.print-head h1 { font-size: 2rem; letter-spacing: -.03em; margin-bottom: .2rem; }
.print-sub { color: var(--ink-2); margin: 0 0 .3rem; }
.print-meta { color: var(--ink-3); font-size: var(--text-sm); margin: 0; }

.print-cols { columns: 2; column-gap: 2.5rem; margin-top: 1.5rem; }
.print-cat { break-inside: avoid-column; margin-bottom: 1.5rem; }
.print-cat h2 {
  font-size: var(--text-lg); text-transform: uppercase; letter-spacing: .08em;
  padding-bottom: .3rem; margin-bottom: .6rem;
  border-bottom: 1px solid var(--line-2);
}
.print-item { break-inside: avoid; margin-bottom: .65rem; }
.print-item-head { display: flex; align-items: baseline; gap: .3rem; }
.print-name { font-weight: 600; }
.print-dots {
  flex: 1;
  border-bottom: 1px dotted var(--line-2);
  transform: translateY(-.2em);
}
.print-price { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.print-desc { font-size: var(--text-sm); color: var(--ink-2); line-height: 1.35; }
.print-foot {
  margin-top: 1.5rem; padding-top: .75rem;
  border-top: 1px solid var(--line);
  text-align: center; font-size: var(--text-xs); color: var(--ink-3);
}

@media print {
  @page { size: A4; margin: 14mm; }
  .no-print { display: none !important; }
  .print-page { background: #fff; }
  .print-sheet { max-width: none; margin: 0; padding: 0; box-shadow: none; }
  /* Ranglar oqarib ketmasin */
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ==========================================================================
   QR
   ========================================================================== */

.qr-preview {
  display: inline-block; padding: 1.1rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}
.qr-preview img { width: 236px; height: 236px; }
.qr-url {
  display: inline-block; padding: .4rem .75rem; border-radius: var(--r-full);
  background: var(--surface-2); color: var(--ink-2);
  font-size: var(--text-sm); word-break: break-all;
}
