/* ==========================================================================
   Interactive Dining — mobile-first stylesheet
   The customer journey is built for a phone held one-handed at a table.
   Desktop styles are layered on top with min-width queries.
   ========================================================================== */

:root {
  --bg: #07070a;
  --panel: rgba(19, 19, 28, 0.72);
  --panel-strong: #12121a;
  --card: #101017;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f7f7fb;
  --muted: #a6a6b5;
  --purple: #8b5cf6;
  --blue: #27c2ff;
  --green: #32d583;
  --amber: #ffb020;
  --danger: #ff5d73;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
  --shadow-sheet: 0 -18px 60px rgba(0, 0, 0, 0.6);
  --radius: 24px;

  /* Space for the notch, the home indicator and the fixed order bar. */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --bar-height: 76px;
  --tap: 44px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 10%, rgba(139, 92, 246, .20), transparent 26rem),
    radial-gradient(circle at 88% 18%, rgba(39, 194, 255, .14), transparent 28rem),
    var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
body.sheet-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 8px; }

.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.container { width: min(1180px, calc(100% - 28px)); margin: 0 auto; }

/* Prices, totals and quantities stay column-aligned while they change. */
.price, .total-row, .qty span, .cart-count, .bar-total, .stat strong { font-variant-numeric: tabular-nums; }

.glass {
  background: var(--panel);
  border: 1px solid var(--line);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

/* --------------------------------------------------------------- brand -- */

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.03em; }
.brand-mark {
  width: 34px; height: 34px; flex: none;
  border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  box-shadow: 0 10px 30px rgba(139, 92, 246, .35);
}
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #d8d8e4;
  background: rgba(255, 255, 255, .04);
  font-size: .8rem;
  white-space: nowrap;
}

/* ------------------------------------------------------------- controls -- */

.btn {
  border: 1px solid var(--line);
  border-radius: 14px;
  min-height: var(--tap);
  padding: 12px 16px;
  color: white;
  font-weight: 700;
  background: rgba(255, 255, 255, .08);
  transition: transform .18s ease, background .18s ease, opacity .18s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.975); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: linear-gradient(135deg, var(--purple), #6d5dfc 45%, var(--blue)); border-color: transparent; }
.btn-danger { background: rgba(255, 93, 115, .13); color: #ff9bab; border-color: rgba(255, 93, 115, .3); }
.btn-success { background: rgba(50, 213, 131, .14); color: #8ff0bd; border-color: rgba(50, 213, 131, .3); }
.btn-block { width: 100%; }
.btn.small { min-height: 36px; padding: 8px 12px; font-size: .84rem; }

.input, .select, .textarea {
  width: 100%;
  color: var(--text);
  background: rgba(255, 255, 255, .045);
  border: 1px solid var(--line);
  border-radius: 14px;
  min-height: var(--tap);
  padding: 12px 14px;
  outline: none;
  font-size: 16px; /* stops iOS Safari zooming in when a field is focused */
}
.input:focus, .select:focus, .textarea:focus {
  border-color: rgba(139, 92, 246, .75);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, .12);
}
.select option { color: #111; }
.textarea { min-height: 95px; resize: vertical; }
.field { display: grid; gap: 8px; }
.field label { color: #d8d8e4; font-size: .9rem; font-weight: 650; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }

.icon-btn {
  width: var(--tap); height: var(--tap);
  display: grid; place-items: center;
  border-radius: 13px;
  border: 1px solid var(--line);
  color: white;
  background: rgba(255, 255, 255, .06);
  -webkit-tap-highlight-color: transparent;
}
.icon-btn:active { transform: scale(.94); }

.notice {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(39, 194, 255, .24);
  background: rgba(39, 194, 255, .08);
  color: #bfefff;
  font-size: .9rem;
  line-height: 1.5;
}
.notice.warn { border-color: rgba(255, 176, 32, .28); background: rgba(255, 176, 32, .09); color: #ffdfa5; }

.toast {
  position: fixed; z-index: 120;
  left: 50%;
  bottom: calc(var(--bar-height) + var(--safe-bottom) + 16px);
  transform: translateX(-50%);
  width: max-content;
  max-width: min(520px, calc(100% - 24px));
  padding: 13px 16px;
  border-radius: 14px;
  background: #222231;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  font-size: .9rem;
  animation: toast-in .22s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } }

/* ------------------------------------------------------ marketing pages -- */

.topbar {
  position: sticky; top: 0; z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 7, 10, .8);
  backdrop-filter: blur(18px);
  padding-top: var(--safe-top);
}
.topbar-inner { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.nav-actions { display: flex; align-items: center; gap: 10px; }

.hero { min-height: calc(100vh - 62px); display: grid; place-items: center; padding: 40px 0; }
.hero-copy { text-align: center; max-width: 860px; margin: 0 auto 30px; }
.hero h1 { font-size: clamp(2.3rem, 9vw, 6rem); line-height: .98; letter-spacing: -.055em; margin: 16px 0; }
.gradient-text { background: linear-gradient(90deg, #fff 15%, #c7b5ff 52%, #68d9ff 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); font-size: clamp(1rem, 2vw, 1.2rem); line-height: 1.7; }

.role-grid { display: grid; grid-template-columns: 1fr; gap: 16px; max-width: 900px; margin: 0 auto; }
.role-grid.single { max-width: 520px; grid-template-columns: 1fr; }
.role-card { padding: 24px; border-radius: var(--radius); transition: .25s ease; overflow: hidden; position: relative; }
.role-card::after {
  content: ""; position: absolute; width: 180px; height: 180px; border-radius: 999px;
  right: -80px; top: -90px; background: rgba(139, 92, 246, .22); filter: blur(10px);
}
.role-icon {
  width: 52px; height: 52px; border-radius: 16px;
  display: grid; place-items: center; font-size: 1.45rem;
  background: rgba(139, 92, 246, .16); border: 1px solid rgba(139, 92, 246, .3);
}
.role-card h2 { margin: 20px 0 10px; font-size: 1.4rem; }

.login-shell { min-height: 100dvh; display: grid; place-items: center; padding: calc(24px + var(--safe-top)) 14px calc(24px + var(--safe-bottom)); }
.login-card { width: min(520px, 100%); padding: 26px 22px; border-radius: var(--radius); }
.login-card h1 { margin: 16px 0 8px; font-size: 1.85rem; letter-spacing: -.04em; }
.login-card form { display: grid; gap: 15px; margin-top: 22px; }

/* ======================================================== customer menu == */

.app-bar {
  position: sticky; top: 0; z-index: 40;
  padding-top: var(--safe-top);
  background: rgba(7, 7, 10, .86);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
}
.app-bar-inner {
  min-height: 56px;
  display: flex; align-items: center; gap: 10px;
  width: min(1180px, calc(100% - 28px)); margin: 0 auto;
}
.app-bar .brand span:last-child { display: none; }
.app-bar-spacer { flex: 1; }
.table-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px;
  background: rgba(139, 92, 246, .16);
  border: 1px solid rgba(139, 92, 246, .34);
  font-size: .82rem; font-weight: 700; white-space: nowrap;
}

.page { padding: 18px 0 calc(var(--bar-height) + var(--safe-bottom) + 24px); }

.venue { margin-bottom: 18px; }
.venue h1 { font-size: clamp(1.7rem, 7.5vw, 3.2rem); line-height: 1.04; letter-spacing: -.045em; margin: 12px 0 6px; }
.venue p { margin: 0; color: var(--muted); line-height: 1.55; font-size: .95rem; }
.venue-actions { display: flex; gap: 10px; margin-top: 16px; }
.venue-actions .btn { flex: 1; text-align: center; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }

/* Search and categories stay reachable while scrolling a long menu. */
.tools {
  position: sticky;
  top: calc(56px + var(--safe-top));
  z-index: 30;
  margin: 0 -14px 4px;
  padding: 10px 14px 6px;
  background: linear-gradient(to bottom, rgba(7, 7, 10, .96) 72%, rgba(7, 7, 10, 0));
}
.search-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.categories {
  display: flex; gap: 8px;
  overflow-x: auto;
  margin-top: 10px;
  padding-bottom: 8px;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.categories::-webkit-scrollbar { display: none; }
.category-btn {
  white-space: nowrap;
  scroll-snap-align: start;
  min-height: 38px;
  padding: 9px 15px;
  border-radius: 999px;
  color: #ddddea;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line);
  font-size: .88rem; font-weight: 650;
  -webkit-tap-highlight-color: transparent;
}
.category-btn.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, .36), rgba(39, 194, 255, .2));
  border-color: rgba(139, 92, 246, .65);
  color: #fff;
}

.dishes { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 8px; }

.dish { border-radius: 22px; overflow: hidden; border: 1px solid var(--line); background: var(--card); }
.dish-media { position: relative; aspect-ratio: 16 / 10; background: #15151f; }
.dish-media img { width: 100%; height: 100%; object-fit: cover; }
.dish-media::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 55%;
  background: linear-gradient(to top, rgba(8, 8, 12, .92), transparent);
  pointer-events: none;
}
.pick-badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: 999px;
  background: rgba(10, 10, 14, .72);
  border: 1px solid rgba(255, 176, 32, .45);
  color: var(--amber);
  font-size: .74rem; font-weight: 750; letter-spacing: .02em;
  backdrop-filter: blur(8px);
}

/* Signature element: a viewfinder-framed chip sitting on the photo. A photo
   cannot answer "how big is this actually?" — this is the control that can. */
.ar-chip {
  position: absolute; z-index: 2;
  left: 12px; bottom: 12px;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 12px;
  color: #fff; font-size: .82rem; font-weight: 700;
  background: rgba(10, 10, 14, .6);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(10px);
  -webkit-tap-highlight-color: transparent;
}
.ar-chip:active { transform: scale(.96); }
.ar-chip::before, .ar-chip::after {
  content: ""; position: absolute; width: 9px; height: 9px;
  border: 2px solid var(--blue); opacity: .85;
}
.ar-chip::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; border-radius: 4px 0 0 0; }
.ar-chip::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; border-radius: 0 0 4px 0; }

.dish-body { padding: 15px 16px 16px; }
.dish-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.dish-head h3 { margin: 0; font-size: 1.08rem; letter-spacing: -.02em; line-height: 1.25; }
.price { font-weight: 800; white-space: nowrap; }
.dish-desc { margin: 8px 0 0; color: var(--muted); font-size: .9rem; line-height: 1.55; }
.dish-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; color: var(--muted); font-size: .8rem; }
.dish-meta .rating { color: var(--amber); font-weight: 700; }
.dish-add { margin-top: 14px; }

/* Add turns into a stepper in place, so the thumb never has to travel. */
.stepper {
  display: grid; grid-template-columns: var(--tap) 1fr var(--tap);
  align-items: center; gap: 4px;
  padding: 4px;
  border-radius: 14px;
  border: 1px solid rgba(139, 92, 246, .4);
  background: rgba(139, 92, 246, .1);
}
.stepper button {
  width: var(--tap); height: 38px;
  border: 0; border-radius: 10px;
  background: rgba(255, 255, 255, .09);
  color: #fff; font-size: 1.15rem; line-height: 1;
  -webkit-tap-highlight-color: transparent;
}
.stepper button:active { transform: scale(.92); }
.stepper .count { text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }

.skeleton { border-radius: 22px; overflow: hidden; border: 1px solid var(--line); background: var(--card); }
.skeleton-media { aspect-ratio: 16 / 10; }
.skeleton-line { height: 12px; border-radius: 6px; margin: 12px 16px; }
.skeleton-line.short { width: 45%; }
.skeleton-media, .skeleton-line {
  background: linear-gradient(100deg, rgba(255,255,255,.04) 30%, rgba(255,255,255,.10) 50%, rgba(255,255,255,.04) 70%);
  background-size: 240% 100%;
  animation: shimmer 1.3s linear infinite;
}
@keyframes shimmer { from { background-position: 140% 0; } to { background-position: -40% 0; } }

.empty-state { padding: 40px 18px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 20px; grid-column: 1 / -1; }
.empty-state strong { display: block; color: var(--text); font-size: 1.05rem; margin-bottom: 6px; }

/* ----------------------------------------------------------- order bar -- */

.order-bar {
  position: fixed; z-index: 45;
  left: 0; right: 0; bottom: 0;
  padding: 12px 14px calc(12px + var(--safe-bottom));
  background: rgba(10, 10, 15, .92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px;
  transform: translateY(0);
  transition: transform .24s ease;
}
.order-bar.tucked { transform: translateY(140%); pointer-events: none; }
.order-bar .summary { flex: 1; min-width: 0; }
.order-bar .bar-count { display: block; color: var(--muted); font-size: .78rem; }
.order-bar .bar-total { font-size: 1.15rem; font-weight: 800; letter-spacing: -.02em; }
.order-bar .btn { flex: none; padding-inline: 22px; }

/* -------------------------------------------------------------- sheets -- */

.sheet-scrim {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(0, 0, 0, .68);
  backdrop-filter: blur(6px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade-in .18s ease;
}
@keyframes fade-in { from { opacity: 0; } }

.sheet {
  width: 100%;
  max-height: 90dvh;
  display: flex; flex-direction: column;
  background: #101018;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 26px 26px 0 0;
  box-shadow: var(--shadow-sheet);
  animation: sheet-up .26s cubic-bezier(.2, .8, .25, 1);
}
@keyframes sheet-up { from { transform: translateY(100%); } }

.sheet-grip { width: 40px; height: 4px; border-radius: 999px; background: var(--line-strong); margin: 10px auto 2px; flex: none; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 10px 18px 12px; flex: none; }
.sheet-head h2 { margin: 0; font-size: 1.15rem; letter-spacing: -.02em; }
.sheet-body { padding: 0 18px 18px; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.sheet-foot {
  flex: none;
  padding: 14px 18px calc(16px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: rgba(14, 14, 20, .96);
}

/* --------------------------------------------------------------- viewer -- */

model-viewer {
  width: 100%;
  height: min(52dvh, 460px);
  border-radius: 18px;
  background: radial-gradient(circle at 50% 25%, #2a2339, #0d0d13 68%);
}
.viewer-wrap { position: relative; }
.viewer-progress {
  position: absolute; left: 14px; right: 14px; bottom: 14px; height: 3px;
  border-radius: 999px; background: rgba(255, 255, 255, .12); overflow: hidden;
}
.viewer-progress span { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--purple), var(--blue)); transition: width .2s ease; }
.ar-help { margin-top: 12px; font-size: .85rem; color: var(--muted); line-height: 1.55; }
.ar-lan { display: block; margin-top: 6px; color: #bfefff; word-break: break-all; font-weight: 650; }

/* ---------------------------------------------------------------- cart -- */

.cart-lines { display: grid; gap: 12px; }
.cart-line { padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, .03); }
.cart-line-top { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.cart-line-top strong { font-size: .98rem; }
.cart-line-controls { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; }
.qty { display: flex; gap: 6px; align-items: center; }
.qty button {
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .07); color: white; font-size: 1.1rem; line-height: 1;
}
.qty button:active { transform: scale(.92); }
.qty span { min-width: 26px; text-align: center; font-weight: 750; }
.instruction-input { margin-top: 12px; }

.totals { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; display: grid; gap: 9px; }
.total-row { display: flex; justify-content: space-between; gap: 12px; font-size: .95rem; }
.total-row.grand { font-size: 1.25rem; font-weight: 850; letter-spacing: -.02em; padding-top: 6px; }
.checkout-actions { display: grid; gap: 10px; }

.success-icon {
  width: 62px; height: 62px; margin: 4px auto 0;
  border-radius: 20px; display: grid; place-items: center; font-size: 1.7rem;
  background: rgba(50, 213, 131, .15); border: 1px solid rgba(50, 213, 131, .35); color: #8ff0bd;
}

/* ================================================================ admin == */

.admin-shell { display: grid; grid-template-columns: 1fr; min-height: 100vh; }
.sidebar { display: none; padding: 22px; border-right: 1px solid var(--line); background: rgba(10, 10, 15, .9); }
.sidebar-nav { display: grid; gap: 8px; margin-top: 28px; }
.sidebar-nav button { text-align: left; color: var(--muted); background: transparent; border: 1px solid transparent; padding: 11px 13px; border-radius: 12px; }
.sidebar-nav button.active, .sidebar-nav button:hover { color: white; background: rgba(139, 92, 246, .11); border-color: rgba(139, 92, 246, .25); }
.admin-main { padding: calc(18px + var(--safe-top)) 14px 80px; overflow: hidden; }
.admin-top { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; margin-bottom: 20px; }
.admin-top h1 { margin: 0; letter-spacing: -.04em; font-size: 1.6rem; }
.mobile-admin-nav { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 18px; scrollbar-width: none; }
.mobile-admin-nav::-webkit-scrollbar { display: none; }
.mobile-admin-nav button { white-space: nowrap; }
.tab-panel { display: block; }
.tab-panel.hidden { display: none !important; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { padding: 16px; border-radius: 18px; border: 1px solid var(--line); background: rgba(255, 255, 255, .035); }
.stat strong { display: block; font-size: 1.5rem; margin-top: 8px; }
.panel { margin-top: 16px; padding: 18px; border-radius: 20px; border: 1px solid var(--line); background: rgba(255, 255, 255, .028); }
.panel-head { display: flex; justify-content: space-between; gap: 14px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.panel h2 { margin: 0; font-size: 1.1rem; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; }
.status { padding: 6px 9px; border-radius: 999px; display: inline-flex; font-size: .76rem; border: 1px solid var(--line); white-space: nowrap; }
.status.new { color: #d8c6ff; background: rgba(139, 92, 246, .13); }
.status.preparing { color: #ffe8a7; background: rgba(255, 194, 66, .12); }
.status.ready { color: #91f1bd; background: rgba(50, 213, 131, .12); }
.status.served { color: #bfefff; background: rgba(39, 194, 255, .11); }
.status.cancelled { color: #ff9bab; background: rgba(255, 93, 115, .12); }

/* ======================================================= larger screens == */

@media (min-width: 620px) {
  .form-grid { grid-template-columns: repeat(2, 1fr); }
  .role-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dishes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .checkout-actions { grid-template-columns: 1fr 1fr; }
  .app-bar .brand span:last-child { display: inline; }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .admin-main { padding: 24px 20px 60px; }
}

@media (min-width: 900px) {
  .dishes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .venue { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: end; }
  .venue-actions { margin-top: 0; }
  .venue-actions .btn { flex: none; }
  .tools { margin-inline: 0; padding-inline: 0; }
  .page { padding-bottom: 60px; }

  /* On a desktop the sheets behave like ordinary centred dialogs. */
  .sheet-scrim { align-items: center; padding: 24px; }
  .sheet { width: min(680px, 100%); max-height: 86vh; border-radius: 24px; border-bottom: 1px solid var(--line); animation: fade-in .18s ease; }
  .sheet-grip { display: none; }
  .sheet-foot { padding-bottom: 18px; }
  .order-bar { left: auto; right: 24px; bottom: 24px; border-radius: 20px; border: 1px solid var(--line); padding: 14px 16px; box-shadow: var(--shadow); }
  .toast { bottom: 24px; }

  .admin-shell { grid-template-columns: 250px 1fr; }
  .sidebar { display: block; position: sticky; top: 0; height: 100vh; }
  .mobile-admin-nav { display: none; }
  .admin-main { padding: 28px; }
  .admin-top { align-items: center; }
  .admin-top h1 { font-size: 2rem; }
}

@media (hover: hover) {
  .btn:hover { transform: translateY(-1px); background: rgba(255, 255, 255, .12); }
  .btn-primary:hover { filter: brightness(1.06); }
  .dish { transition: transform .2s ease, border-color .2s ease; }
  .dish:hover { transform: translateY(-3px); border-color: rgba(139, 92, 246, .38); }
  .role-card:hover { transform: translateY(-5px); border-color: rgba(139, 92, 246, .5); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* ============================================ analytics, floor, kitchen == */

.chart { margin-top: 14px; overflow-x: auto; }
.chart-empty { margin: 0; padding: 26px 8px; text-align: center; color: var(--muted); font-size: .9rem; }
.chart-pair { display: grid; grid-template-columns: 1fr; gap: 0; }
.chart-pair .panel { min-width: 0; }
.donut-wrap { display: grid; gap: 14px; justify-items: center; margin-top: 12px; }
.chart-key { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; width: 100%; }
.chart-key li { display: flex; align-items: center; gap: 10px; font-size: .88rem; color: var(--muted); }
.chart-key li strong { margin-left: auto; color: var(--text); }
.chart-key i { width: 11px; height: 11px; border-radius: 4px; flex: none; }

.feedback-list { display: grid; gap: 12px; margin-top: 12px; max-height: 320px; overflow-y: auto; }
.feedback-item { padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.03); }
.feedback-item p { margin: 8px 0; font-size: .9rem; line-height: 1.5; }
.feedback-stars { color: var(--amber); letter-spacing: 2px; }
.feedback-stars .muted { color: rgba(255,255,255,.16); }

.legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 4px 0 14px; color: var(--muted); font-size: .82rem; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend .dot { width: 10px; height: 10px; border-radius: 4px; display: inline-block; }
.dot.free { background: rgba(255,255,255,.2); }
.dot.reserved { background: var(--amber); }
.dot.seated { background: var(--blue); }
.dot.serving { background: var(--purple); }
.dot.off { background: rgba(255,93,115,.6); }

.floor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.floor-table {
  display: grid; gap: 3px; align-content: start;
  padding: 14px; min-height: 108px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  border-left-width: 4px;
}
.floor-table.free { border-left-color: rgba(255,255,255,.25); }
.floor-table.reserved { border-left-color: var(--amber); background: rgba(255,176,32,.07); }
.floor-table.seated { border-left-color: var(--blue); background: rgba(39,194,255,.07); }
.floor-table.serving { border-left-color: var(--purple); background: rgba(139,92,246,.1); }
.floor-table.off { border-left-color: rgba(255,93,115,.6); opacity: .55; }
.floor-label { font-size: 1.45rem; font-weight: 850; letter-spacing: -.03em; }
.floor-status { font-size: .8rem; font-weight: 700; color: #d8d8e4; }
.floor-detail { color: var(--muted); }
.floor-zone { margin-top: 4px; }

/* --------------------------------------------------------- booking page -- */

.slot-rail { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; scroll-snap-type: x proximity; }
.slot-rail::-webkit-scrollbar { display: none; }
.slot {
  scroll-snap-align: start; white-space: nowrap;
  min-height: 40px; padding: 9px 15px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255,255,255,.04);
  color: #ddddea; font-weight: 650; font-variant-numeric: tabular-nums;
}
.slot.active { background: linear-gradient(135deg, rgba(139,92,246,.36), rgba(39,194,255,.2)); border-color: rgba(139,92,246,.65); color: #fff; }

.table-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.table-choice {
  display: grid; gap: 3px; text-align: left;
  padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--text);
}
.table-choice.active { border-color: rgba(139,92,246,.7); background: rgba(139,92,246,.14); }
.table-choice.taken { opacity: .4; cursor: not-allowed; }
.table-choice-label { font-weight: 750; }

.booking-code {
  margin: 18px auto 8px; padding: 12px 20px; width: max-content;
  border-radius: 14px; border: 1px dashed rgba(139,92,246,.6); background: rgba(139,92,246,.12);
  font-size: 1.7rem; font-weight: 850; letter-spacing: .28em; text-indent: .28em;
}

/* ------------------------------------------------------------ rate block -- */

.rate-block { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.stars { display: flex; justify-content: center; gap: 6px; }
.stars button {
  width: 44px; height: 44px; border: 0; background: transparent;
  font-size: 1.6rem; line-height: 1; color: rgba(255,255,255,.2);
  -webkit-tap-highlight-color: transparent;
}
.stars button.on { color: var(--amber); }
.stars button:active { transform: scale(.9); }

/* --------------------------------------------------------------- kitchen -- */

.kitchen-body { min-height: 100dvh; display: flex; flex-direction: column; }
.kitchen-body.flash { animation: kitchen-flash .9s ease; }
@keyframes kitchen-flash { 0%, 100% { background-color: transparent; } 30% { background-color: rgba(139,92,246,.22); } }

.kitchen-bar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: calc(10px + var(--safe-top)) 16px 10px;
  background: rgba(7,7,10,.9); backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.kitchen-board {
  flex: 1;
  display: grid; grid-template-columns: 1fr; gap: 14px;
  padding: 16px 14px calc(20px + var(--safe-bottom));
  align-items: start;
}
.kitchen-column { border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.028); padding: 14px; }
.kitchen-column header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.kitchen-column h2 { margin: 0; font-size: 1rem; letter-spacing: -.02em; }
.kitchen-column .count { min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px; display: grid; place-items: center; background: rgba(255,255,255,.09); font-weight: 800; font-size: .85rem; }
.kitchen-list { display: grid; gap: 12px; }
.kitchen-empty { margin: 0; padding: 22px 8px; text-align: center; color: var(--muted); font-size: .86rem; }

.ticket { border: 1px solid var(--line); border-radius: 16px; background: #12121a; padding: 14px; border-left: 4px solid var(--purple); }
.ticket.warm { border-left-color: var(--amber); }
.ticket.late { border-left-color: var(--danger); background: rgba(255,93,115,.07); }
.ticket header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.ticket-table { font-size: 1.15rem; font-weight: 850; letter-spacing: -.02em; }
.ticket-timer { font-variant-numeric: tabular-nums; font-weight: 750; color: var(--muted); }
.ticket.late .ticket-timer { color: #ff9bab; }
.ticket-lines { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.ticket-lines li { display: flex; gap: 10px; font-size: .96rem; line-height: 1.35; }
.ticket-qty { font-weight: 850; color: var(--blue); min-width: 26px; }
.ticket-note { display: block; margin-top: 3px; font-style: normal; font-size: .82rem; color: var(--amber); }
.ticket footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); }

@media (min-width: 620px) {
  .chart-pair { grid-template-columns: 1fr 1fr; gap: 16px; }
  .donut-wrap { grid-template-columns: auto 1fr; align-items: center; }
}
@media (min-width: 900px) {
  .kitchen-board { grid-template-columns: repeat(3, 1fr); padding: 20px; }
  .kitchen-column { max-height: calc(100dvh - 120px); overflow-y: auto; }
}
