/* Tandir Tun Halal — design system matching the «Lagan» demo.
   Guests: warm cream theme. Staff (data-theme="night"): deep night theme.
   Display font: Unbounded. Text font: Inter. Accent: saffron. Brand: deep teal. All self-hosted. */
@import url('/css/fonts.css');

:root {
  --bg: #F7F1E6;             /* cream page */
  --bg-2: #EFE6D6;           /* cream-2: photo placeholders, soft panels */
  --surface: #FFFFFF;        /* cards */
  --surface-2: #FBF7F0;
  --line: #ECE3D3;
  --line-strong: #DCCFB8;
  --ink: #1E1A16;
  --ink-2: #3A332B;
  --muted: #8B8172;
  --brand: #0E5E5A;          /* deep teal */
  --brand-deep: #0A4643;
  --brand-soft: #E3EFED;
  --brand-text: #0E5E5A;     /* prices, links */
  --accent: #F2A93B;         /* saffron: primary actions */
  --accent-deep: #D98F1F;
  --accent-soft: #FDF1DC;
  --accent-text: #9A5F07;
  --on-accent: #1E1A16;
  --danger: #C0392B;
  --danger-soft: #FBEAE8;
  --ok: #1F9D62;
  --ok-soft: #E2F4EA;
  --input-bg: #FFFFFF;
  --hdr-bg: rgba(247, 241, 230, .9);
  --footer-bg: rgba(255, 255, 255, .94);
  --overlay: rgba(30, 26, 22, .55);
  --display: 'Unbounded', 'Inter', 'Arial Black', sans-serif;
  --text: 'Inter', 'Segoe UI', Roboto, Arial, sans-serif;
  --shadow: 0 1px 2px rgba(30, 26, 22, .04), 0 8px 24px rgba(30, 26, 22, .06);
  --shadow-lg: 0 18px 44px rgba(30, 26, 22, .2);
  --glow: 0 10px 24px rgba(242, 169, 59, .38);
  --r-card: 22px;
  --r-btn: 16px;
  /* «Lagan» pattern: diamond, plate ring and an almond leaf */
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23f2a93b' stroke-opacity='.22' stroke-width='1.2'%3E%3Cpath d='M28 4 L52 28 L28 52 L4 28 Z'/%3E%3Ccircle cx='28' cy='28' r='9'/%3E%3Cpath d='M28 19 Q34 28 28 37 Q22 28 28 19Z'/%3E%3C/g%3E%3C/svg%3E");
  --dish-ph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='%23c9b99c' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M8 26h32a16 12 0 0 1-32 0z'/%3E%3Cpath d='M6 26h36M20 16c0-3 3-3 3-6M27 16c0-3 3-3 3-6'/%3E%3C/g%3E%3C/svg%3E");
}

[data-theme="night"] {
  --bg: #0D1219;
  --bg-2: #1E2734;
  --surface: #151C27;
  --surface-2: #1E2734;
  --line: #222C3A;
  --line-strong: #2F3B4D;
  --ink: #FFFFFF;
  --ink-2: #D9DEE6;
  --muted: #9AA3B2;
  --brand-soft: rgba(14, 94, 90, .35);
  --brand-text: #F2A93B;
  --accent-soft: rgba(242, 169, 59, .1);
  --accent-text: #F2A93B;
  --danger-soft: rgba(192, 57, 43, .16);
  --ok-soft: rgba(31, 157, 98, .16);
  --input-bg: #1E2734;
  --hdr-bg: rgba(13, 18, 25, .9);
  --footer-bg: rgba(13, 18, 25, .94);
  --overlay: rgba(0, 0, 0, .6);
  --shadow: none;
  --shadow-lg: 0 18px 44px rgba(0, 0, 0, .5);
  --dish-ph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M8 26h32a16 12 0 0 1-32 0z'/%3E%3Cpath d='M6 26h36M20 16c0-3 3-3 3-6M27 16c0-3 3-3 3-6'/%3E%3C/g%3E%3C/svg%3E");
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--text); font-weight: 500; font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font-family: inherit; color: var(--ink); }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; opacity: .45; }
a { color: inherit; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

/* ---------- Screen layout ---------- */
.screen { max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }
@media (min-width: 520px) { .screen { box-shadow: 0 0 0 1px var(--line), var(--shadow-lg); } body { background: var(--bg-2); } [data-theme="night"] body { background: #070A0F; } }
.grow { flex: 1; }

/* Header: translucent bar with the logo + wordmark (or a title) and a table badge */
.hdr { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 12px 16px; margin-bottom: 14px; min-height: 66px;
  background: var(--hdr-bg); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); color: var(--ink); }
.hdr.tight { margin-bottom: 12px; }
.logo { width: 38px; height: 38px; flex: none; display: block; border-radius: 50%; }
.logo-lg { width: 88px; height: 88px; box-shadow: 0 10px 30px rgba(242, 169, 59, .35); }
.wordmark { flex: 1; min-width: 0; font-family: var(--display); font-weight: 800; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wordmark small { display: block; margin-top: 3px; font-family: var(--text); font-size: 10.5px; font-weight: 800; letter-spacing: .16em; color: var(--accent-text); }
.title { flex: 1; min-width: 0; margin: 0; font-family: var(--display); font-weight: 700; font-size: 19px; line-height: 1.2; letter-spacing: -.01em; }
.title.t22 { font-size: 18px; }
.who { flex: 1; min-width: 0; }
.who .name { font-weight: 800; font-size: 16px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who .role { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.pill { background: var(--brand); color: #fff; font-family: var(--display); font-weight: 700; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; padding: 9px 13px; border-radius: 999px; white-space: nowrap; flex: none; }
.pill.amber { background: var(--accent); color: var(--on-accent); }
.pill.red { background: var(--danger); color: #fff; }
.back { width: 44px; height: 44px; flex: none; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--surface); border-radius: 50%; color: var(--ink); font-size: 28px; font-weight: 500; line-height: 1; text-decoration: none; padding: 0 2px 4px 0; box-shadow: var(--shadow); }
.hdr .btn { min-height: 42px; padding: 0 14px; font-size: 13.5px; border-radius: 14px; flex: none; }

.section-title { padding: 22px 16px 12px; font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: -.01em; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.section-title .aside { font-family: var(--text); font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.eyebrow { padding: 18px 16px 10px; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.list { padding: 0 16px; display: flex; flex-direction: column; gap: 10px; }
.list.g12 { gap: 12px; }
.pad { padding: 0 16px; }
.mx { margin-left: 16px; margin-right: 16px; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt14 { margin-top: 14px; } .mt16 { margin-top: 16px; } .mt20 { margin-top: 20px; }
.footer { position: sticky; bottom: 0; z-index: 15; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); background: var(--footer-bg); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.footer.short { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.row.top { align-items: flex-start; }
.row.base { align-items: baseline; }
.row.g10 { gap: 10px; }
.flex1 { flex: 1; min-width: 0; }
.nowrap { white-space: nowrap; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px; box-shadow: var(--shadow); }
.card.compact { padding: 13px 16px; border-radius: 18px; }
.card.col { display: flex; flex-direction: column; gap: 10px; }
.card.col8 { display: flex; flex-direction: column; gap: 8px; }
.card.amber-border { border: 1.5px solid var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 4px rgba(242, 169, 59, .12); }
.card.red-border { border: 1.5px solid var(--danger); background: var(--danger-soft); }
.card.dark { background: var(--brand) var(--pattern); color: #fff; border: 0; }
.card.dark .muted, .card.dark .t13 { color: rgba(255, 255, 255, .78); }
.card.dimmed { opacity: .55; box-shadow: none; }
.card[role="button"] { transition: transform .12s ease, border-color .15s ease; }
.card[role="button"]:active { transform: scale(.99); }
.strip { margin: 0 16px; padding: 12px 12px 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hero { margin: 0 16px; padding: 20px; background: var(--brand) var(--pattern); color: #fff; border-radius: 26px; box-shadow: 0 16px 34px rgba(14, 94, 90, .28); }
[data-theme="night"] .hero { box-shadow: none; }
.hero .t14, .hero .lbl { color: rgba(255, 255, 255, .8); font-weight: 800; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.hero .big { font-family: var(--display); font-weight: 700; font-size: 38px; margin-top: 6px; line-height: 1.1; letter-spacing: -.02em; }
.hero .sum, .hero .total-row .sum { color: #fff; }
.hero .muted { color: rgba(255, 255, 255, .78); }
.alert-card { margin: 0 16px; padding: 16px; background: var(--accent-soft); border: 1.5px solid var(--accent); color: var(--ink); border-radius: var(--r-card); display: flex; align-items: center; justify-content: space-between; gap: 12px; animation: glow 2s ease-in-out infinite; }
.alert-card .t13 { color: var(--muted); }
.alert-card + .alert-card { margin-top: 10px; }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(242, 169, 59, .0); } 50% { box-shadow: 0 0 0 6px rgba(242, 169, 59, .18); } }
@media (prefers-reduced-motion: reduce) { .alert-card { animation: none; } .spinner { animation-duration: 4s; } .live-dot::before { animation: none; } }
.dark-note { margin: 0 16px 12px; padding: 14px 16px; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 18px; font-weight: 700; font-size: 15px; }

.dish-name { font-weight: 700; font-size: 16px; line-height: 1.25; }
.dish-sub { font-size: 13.5px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.dish-sub.red { color: var(--danger); font-weight: 700; }
.price { font-family: var(--display); font-weight: 700; font-size: 16px; white-space: nowrap; color: var(--brand-text); letter-spacing: -.01em; }
.item-name { font-weight: 700; font-size: 15px; }
.item-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.t13 { font-size: 13px; } .t14 { font-size: 14px; } .t15 { font-size: 15px; } .t16 { font-size: 16px; } .t17 { font-size: 17px; } .t18 { font-size: 18px; }
.b { font-weight: 700; } .sb { font-weight: 600; }
.muted { color: var(--muted); }
.red-text { color: var(--danger); }
.green-text { color: var(--ok); }
.cream-line { color: rgba(255, 255, 255, .82); }
.lh { line-height: 1.55; }
.center { text-align: center; }
.divider { height: 0; border-top: 1.5px dashed var(--line-strong); margin: 6px 0; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.total-row .lbl { font-size: 14px; color: var(--muted); font-weight: 700; }
.total-row .sum { font-family: var(--display); font-weight: 700; font-size: 26px; color: var(--ink); letter-spacing: -.02em; white-space: nowrap; }
.total-row .sum.s26 { font-size: 24px; }
.line-item { display: flex; justify-content: space-between; gap: 8px; font-size: 15px; }

/* ---------- Dish cards with photos ---------- */
.dish { display: flex; gap: 14px; padding: 12px; border-radius: var(--r-card); }
.dish-photo { width: 104px; height: 104px; flex: none; border-radius: 16px; object-fit: cover; display: block; background: var(--bg-2) var(--dish-ph) center / 46px no-repeat; }
.dish-photo.sm { width: 64px; height: 64px; border-radius: 14px; background-size: 30px; }
.dish-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dish-foot { margin-top: auto; padding-top: 8px; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.add-btn { width: 44px; height: 44px; flex: none; border: 0; border-radius: 14px; background: var(--accent); color: var(--on-accent); font-size: 26px; font-weight: 600; line-height: 1; display: flex; align-items: center; justify-content: center; padding: 0 0 2px; box-shadow: var(--glow); transition: transform .1s ease; }
.add-btn:active { transform: scale(.92); }
.tag { display: inline-block; vertical-align: 2px; margin-left: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 3px 7px; border-radius: 7px; background: var(--accent-soft); color: var(--accent-text); }
.dish.open { flex-direction: column; gap: 12px; }
.dish.open .dish-top { display: flex; gap: 14px; }

/* Recommended dishes: horizontal cards */
.reco { display: flex; gap: 12px; overflow-x: auto; padding: 0 16px 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.reco::-webkit-scrollbar { display: none; }
.reco-card { position: relative; flex: 0 0 236px; scroll-snap-align: start; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.reco-card img { width: 100%; height: 150px; object-fit: cover; display: block; background: var(--bg-2); }
.reco-card .rc-body { padding: 12px 14px 14px; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.reco-card .badge { position: absolute; top: 12px; left: 12px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 800; letter-spacing: .08em; padding: 5px 9px; border-radius: 9px; }
.reco-card .badge.time { left: auto; right: 12px; background: rgba(30, 26, 22, .72); color: #fff; letter-spacing: 0; }

/* Welcome banner on the menu */
.banner { position: relative; overflow: hidden; margin: 0 16px; min-height: 132px; padding: 20px 132px 20px 20px; border-radius: 26px; background: var(--brand) var(--pattern); color: #fff; }
.banner h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 1.15; color: var(--accent); letter-spacing: -.01em; }
.banner p { margin: 8px 0 0; font-size: 13.5px; line-height: 1.45; color: rgba(255, 255, 255, .9); }
.banner .plate { position: absolute; right: -34px; top: 50%; transform: translateY(-50%); width: 170px; height: 170px; border-radius: 50%; object-fit: cover; border: 5px solid var(--accent); box-shadow: 0 0 0 6px rgba(242, 169, 59, .25); }

/* Welcome hero (table waiting screen, delivery top) */
.welcome { position: relative; margin: 0; min-height: 560px; padding: 230px 20px 24px; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; gap: 14px;
  background: linear-gradient(180deg, rgba(30, 26, 22, .15) 0%, rgba(30, 26, 22, .75) 40%, #1E1A16 62%), url(/menu/hero.jpg) center top / 100% auto no-repeat, #1E1A16; }
.welcome h1 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 34px; line-height: 1.08; letter-spacing: -.02em; }
.welcome h1 .acc { display: block; color: var(--accent); }
.welcome p { margin: 0; font-size: 15.5px; line-height: 1.55; color: rgba(255, 255, 255, .82); }
.welcome .card { color: var(--ink); background: var(--bg); border: 0; border-radius: 28px; padding: 18px; }
.welcome .check label { color: var(--ink-2); }
.welcome-top { position: absolute; top: 14px; left: 16px; right: 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brand-chip { display: flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; border-radius: 999px; background: rgba(30, 26, 22, .7); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #fff; font-family: var(--display); font-weight: 800; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.brand-chip .logo { width: 34px; height: 34px; }
.welcome-top .pill { background: #fff; color: var(--brand); }
.icon-tile { width: 48px; height: 48px; flex: none; border-radius: 16px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; }
.icon-tile svg { width: 24px; height: 24px; }
.icon-tile.amber { background: var(--accent); color: var(--on-accent); }
.icon-tile.dark { background: var(--surface-2); color: var(--accent); }

/* Restaurant home (public /delivery) */
.hdr.site-nav { margin-bottom: 0; }
.welcome.site { min-height: 0; padding: 200px 20px 26px; gap: 12px; }
.welcome .kicker { font-size: 11.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.welcome .btn-row { margin-top: 6px; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 16px; }
.info-card { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 14px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); }
.info-card.wide { grid-column: 1 / -1; }
.info-card .icon-tile { width: 36px; height: 36px; border-radius: 12px; }
.info-card .lbl { font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.info-card .val { font-weight: 700; font-size: 14.5px; line-height: 1.45; }
.info-card a { color: var(--brand-text); text-decoration: none; }
.site-foot { margin-top: 28px; padding: 22px 16px calc(24px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); text-align: center; font-size: 12.5px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.site-foot a { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn { min-height: 46px; padding: 0 18px; border: 0; border-radius: var(--r-btn); font-weight: 700; font-size: 14.5px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; background: transparent; color: var(--ink); line-height: 1.2; text-align: center; transition: transform .08s ease, filter .15s ease, box-shadow .15s ease; }
.btn:active:not(:disabled) { transform: scale(.98); filter: brightness(.96); }
.btn.block { display: flex; width: 100%; }
.btn.lg { min-height: 58px; border-radius: 20px; font-size: 16.5px; }
.btn.md { min-height: 54px; border-radius: 18px; font-size: 15.5px; }
.btn.m48 { min-height: 48px; }
.btn.f15 { font-size: 15px; } .btn.f16 { font-size: 16px; } .btn.f13 { font-size: 13px; }
.btn.wide { padding: 0 22px; }
.btn-amber { background: var(--accent); color: var(--on-accent); box-shadow: var(--glow); }
.btn-amber:disabled { box-shadow: none; }
.btn-dark { background: var(--ink); color: var(--bg); }
[data-theme="night"] .btn-dark { background: var(--surface-2); color: #fff; }
.btn-outline { border: 1.5px solid var(--line-strong); color: var(--ink); background: var(--surface); }
[data-theme="night"] .btn-outline { border-color: transparent; background: var(--surface-2); }
.btn-outline-light { border: 1.5px solid rgba(255, 255, 255, .8); color: #fff; background: transparent; }
.btn-danger { border: 1.5px solid var(--danger); color: var(--danger); background: var(--surface); }
[data-theme="night"] .btn-danger { background: var(--danger-soft); border-color: transparent; color: #FF8A7D; }
.btn-red { background: var(--danger); color: #fff; box-shadow: 0 10px 22px rgba(192, 57, 43, .3); }
.btn-green { background: var(--ok); color: #fff; box-shadow: 0 10px 22px rgba(31, 157, 98, .28); }
.btn-white { background: var(--accent); color: var(--on-accent); font-size: 15px; padding: 0 22px; box-shadow: var(--glow); }
.btn-link { background: transparent; border: 0; color: var(--brand-text); text-decoration: none; font-weight: 700; font-size: 14px; min-height: 44px; }
[data-theme="night"] .btn-link { color: var(--muted); }
.cart-bar { width: 100%; min-height: 60px; border: 0; background: var(--ink); color: var(--bg); border-radius: 20px; font-weight: 700; font-size: 15.5px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 8px 0 20px; text-decoration: none; box-shadow: 0 14px 30px rgba(30, 26, 22, .28); }
.cart-bar span:last-child { font-family: var(--display); font-weight: 700; font-size: 15px; background: var(--accent); color: var(--on-accent); padding: 11px 14px; border-radius: 14px; white-space: nowrap; }
.cart-bar:disabled { box-shadow: none; }
[data-theme="night"] .cart-bar { background: var(--accent); color: var(--on-accent); }
[data-theme="night"] .cart-bar span:last-child { background: rgba(0, 0, 0, .14); }
.btn-row { display: flex; gap: 10px; }
.btn-row > * { flex: 1; }
.btn-row > .btn { padding: 0 8px; }

.stepper { display: flex; align-items: center; gap: 12px; }
.stepper.g10 { gap: 8px; }
.step-btn { width: 44px; height: 44px; border-radius: 14px; font-size: 22px; font-weight: 600; display: flex; align-items: center; justify-content: center; padding: 0 0 2px; }
.step-minus { border: 0; background: var(--bg-2); color: var(--ink); }
.step-plus { border: 0; background: var(--accent); color: var(--on-accent); box-shadow: var(--glow); }
.stepper.sm { gap: 6px; }
.stepper.sm .step-btn { width: 38px; height: 38px; border-radius: 12px; font-size: 20px; }
.stepper.sm .step-qty { min-width: 18px; font-size: 15px; }
.step-qty { font-family: var(--display); font-weight: 700; font-size: 17px; min-width: 22px; text-align: center; }

/* ---------- Chips ---------- */
.chip { font-weight: 800; font-size: 12px; padding: 6px 11px; border-radius: 999px; white-space: nowrap; color: var(--brand); background: var(--brand-soft); border: 0; letter-spacing: .02em; }
[data-theme="night"] .chip { color: #7ED3C6; }
.chip.k { padding: 6px 12px; }
.chip.cooking { background: var(--accent-soft); color: var(--accent-text); }
.chip.ready { background: var(--ok); color: #fff; }
.chip.red { background: var(--danger); color: #fff; }
.chip.amber { background: var(--accent); color: var(--on-accent); }
.chip.small { font-size: 11.5px; padding: 4px 9px; }
button.chip { min-height: 34px; }
.card.dark .btn-amber { background: var(--accent); color: var(--on-accent); }
.card.dark .chip:not(.amber) { background: rgba(255, 255, 255, .16); color: #fff; }
.card.dark .btn-outline { background: rgba(255, 255, 255, .12); color: #fff; border-color: transparent; }

/* ---------- Notes ---------- */
.note { padding: 13px 16px; border-radius: 18px; background: var(--accent-soft); border: 1px solid rgba(242, 169, 59, .45); font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.note.t13 { font-size: 13px; }
.note.box { padding: 16px 18px; border-radius: 22px; }
.banner-red { margin: 0 16px 14px; padding: 13px 16px; border-radius: 18px; background: var(--danger); color: #fff; font-weight: 700; font-size: 14px; line-height: 1.45; }
.disclaimer { padding: 10px 24px 24px; font-size: 12px; line-height: 1.5; color: var(--muted); text-align: center; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .lbl13 { font-size: 13px; font-weight: 700; color: var(--muted); }
/* 16 px text avoids the automatic zoom on iPhone when a field gets focus */
.input { width: 100%; min-height: 50px; border: 1.5px solid var(--line-strong); border-radius: 14px; padding: 0 14px; font-size: 16px; background: var(--input-bg); color: var(--ink); transition: border-color .15s ease, box-shadow .15s ease; }
.input::placeholder { color: var(--muted); opacity: .8; }
.input.h48 { min-height: 50px; }
.input.h52 { min-height: 54px; padding: 0 16px; }
.input.bold { font-weight: 700; }
.input.big { font-size: 18px; font-weight: 800; }
textarea.input { padding: 13px 14px; line-height: 1.45; resize: none; min-height: 120px; }
select.input { appearance: auto; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(242, 169, 59, .22); }
.btn:focus-visible, .tab:focus-visible, a:focus-visible, .add-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.check { display: flex; align-items: flex-start; gap: 10px; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--brand); flex: none; }
.check label { font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.check a { color: var(--brand-text); font-weight: 700; }
.radio { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.radio input { width: 22px; height: 22px; margin: 0; accent-color: var(--brand); flex: none; }
[data-theme="night"] .radio input, [data-theme="night"] .check input { accent-color: var(--accent); }
.radio label { font-size: 15px; font-weight: 600; }
.form { padding: 0 16px; display: flex; flex-direction: column; gap: 12px; }

/* ---------- Tabs: rounded pills ---------- */
.tabs { display: flex; gap: 8px; margin: 0 0 14px; padding: 2px 16px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs.top0, .tabs.tight { margin-top: 0; }
.tab { min-height: 42px; padding: 0 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); font-weight: 700; font-size: 14px; white-space: nowrap; flex: none; transition: background .15s ease, color .15s ease; }
.tab.w18 { padding: 0 20px; }
.tab.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
[data-theme="night"] .tabs { margin: 0 16px 14px; padding: 5px; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
[data-theme="night"] .tab { border: 0; background: transparent; color: var(--muted); border-radius: 13px; min-height: 40px; padding: 0 14px; }
[data-theme="night"] .tab.active { background: var(--surface-2); color: #fff; }
.tabbar { position: sticky; bottom: 0; z-index: 15; display: flex; background: var(--footer-bg); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 0 8px env(safe-area-inset-bottom); margin-top: 18px; }
.tabbar a { flex: 1; min-height: 60px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-weight: 700; font-size: 14px; text-decoration: none; position: relative; }
.tabbar a.active { color: var(--accent-text); }
.tabbar a.active::before { content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }

/* ---------- Bars ---------- */
.bar-track { height: 10px; border-radius: 6px; background: var(--bg-2); margin-top: 6px; overflow: hidden; }
.bar-fill { height: 10px; border-radius: 6px; background: var(--accent); }

/* ---------- Staff: stats, live dot, table map ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px 12px; min-width: 0; }
.stat .n { font-family: var(--display); font-weight: 700; font-size: 24px; line-height: 1.1; color: var(--accent-text); }
.stat .n.w { color: var(--ink); }
.stat .l { margin-top: 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-dot { display: inline-flex; align-items: center; gap: 7px; font-family: var(--text); font-size: 11.5px; font-weight: 800; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.live-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(31, 157, 98, .6); animation: live 2s ease-out infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 7px rgba(31, 157, 98, 0); } 100% { box-shadow: 0 0 0 0 rgba(31, 157, 98, 0); } }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--danger); color: #fff; font-family: var(--text); font-size: 12.5px; font-weight: 800; letter-spacing: 0; }
.tcard { display: flex; align-items: center; gap: 14px; }
.tnum { width: 52px; height: 52px; flex: none; border-radius: 16px; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 700; font-size: 20px; }
.tnum.amber { background: var(--accent); color: var(--on-accent); }
.tnum.ok { background: var(--ok); }
.tnum.dim { background: var(--surface-2); color: var(--muted); }

/* Kitchen ticket */
.ticket-title { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: .02em; text-transform: uppercase; }
.timer { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); font-family: var(--display); font-weight: 700; font-size: 13px; }
.qty-x { font-family: var(--display); font-weight: 700; color: var(--accent-text); margin-right: 6px; }

/* ---------- Waiting / status visuals ---------- */
.center-stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px 28px; text-align: center; }
.h1-big { margin: 0; font-family: var(--display); font-weight: 800; font-size: 28px; line-height: 1.15; color: var(--ink); letter-spacing: -.02em; }
.lead { margin: 0; font-size: 15.5px; line-height: 1.6; color: var(--muted); }
.spinner { animation: spin 1.2s linear infinite; }
.spinner circle { stroke: var(--line-strong); }
.spinner path { stroke: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }
.qr-box { width: 196px; height: 196px; background: #fff; border: 1px solid var(--line); border-radius: 28px; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 8px var(--accent-soft), var(--shadow); }
.qr-box img { width: 148px; height: 148px; display: block; }
.bill-no { font-family: var(--display); font-weight: 800; font-size: 40px; letter-spacing: .1em; color: var(--brand-text); }
.steps { padding: 24px 16px 0; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step .rail { display: flex; flex-direction: column; align-items: center; }
.dot { width: 28px; height: 28px; border-radius: 14px; background: var(--bg-2); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; font-weight: 800; }
.dot.done { background: var(--ok); }
.dot.now { background: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.vline { width: 3px; height: 32px; border-radius: 2px; background: var(--bg-2); }
.vline.done { background: var(--ok); }
.step .lbl { padding-top: 3px; font-size: 16px; color: var(--muted); }
.step .lbl.on { font-weight: 800; color: var(--ink); }

/* ---------- Overlays: toast, sheet, banners ---------- */
.toast-wrap { position: fixed; left: 0; right: 0; top: 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 70; pointer-events: none; padding: 0 12px; }
.toast { position: relative; max-width: 456px; width: 100%; background: #1E1A16; color: #fff; padding: 13px 16px 13px 34px; border-radius: 16px; font-size: 14px; font-weight: 600; line-height: 1.45; box-shadow: var(--shadow-lg); pointer-events: auto; animation: toast .35s cubic-bezier(.2, 1.2, .4, 1); }
.toast::before { content: ''; position: absolute; left: 16px; top: 19px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.toast.err::before { background: #FF6B5B; }
.toast.ok::before { background: #3DDC97; }
[data-theme="night"] .toast { background: #253042; }
@keyframes toast { from { transform: translateY(-12px); opacity: 0; } }
.toast .t-title { font-weight: 800; }
.offline { position: sticky; top: 0; z-index: 40; background: var(--danger); color: #fff; text-align: center; font-size: 13px; font-weight: 700; padding: 8px 12px; }
.sheet-bg { position: fixed; inset: 0; background: var(--overlay); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 480px; background: var(--bg); border-radius: 30px 30px 0 0; padding: 28px 18px calc(22px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; max-height: 90vh; overflow-y: auto; position: relative; animation: sheet .34s cubic-bezier(.2, .9, .25, 1); }
.sheet::before { content: ''; position: absolute; top: 10px; left: 50%; width: 44px; height: 5px; margin-left: -22px; border-radius: 3px; background: var(--line-strong); }
@keyframes sheet { from { transform: translateY(40px); opacity: .4; } }
.sheet h2 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--ink); letter-spacing: -.01em; }
.install-banner { margin: 0 16px 12px; padding: 13px 14px 13px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line-strong); font-size: 14px; line-height: 1.45; display: flex; gap: 10px; align-items: center; }
.install-banner .x { flex: none; width: 36px; height: 36px; border-radius: 12px; border: 0; background: var(--surface-2); font-size: 20px; font-weight: 700; color: var(--ink); }
.empty { padding: 28px 18px; text-align: center; color: var(--muted); font-size: 15px; line-height: 1.55; background: var(--surface); border: 1.5px dashed var(--line-strong); border-radius: var(--r-card); }
.loading { padding: 72px 16px; display: flex; justify-content: center; }
.video-box { width: 100%; border-radius: 24px; overflow: hidden; background: #000; aspect-ratio: 1 / 1; }
.video-box video { width: 100%; height: 100%; object-fit: cover; display: block; }
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; padding: 0 16px; }
.qr-grid figure { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 10px; }
.qr-grid img { width: 100%; display: block; }
.privacy { padding: 0 16px; display: flex; flex-direction: column; gap: 14px; font-size: 14px; line-height: 1.6; }
.privacy .card { padding: 16px; }
.hl { background: var(--accent-soft); color: var(--accent-text); padding: 0 5px; border-radius: 6px; font-weight: 700; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; }
.switch-row input { width: 26px; height: 26px; accent-color: var(--accent); flex: none; }
.photo-edit { display: flex; gap: 14px; align-items: center; }
.photo-edit .dish-photo { width: 92px; height: 92px; }

/* ---------- Login (night) ---------- */
.login-top { background: linear-gradient(180deg, rgba(13, 18, 25, 0) 35%, var(--bg) 100%), var(--pattern); padding: 56px 24px 40px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.login-top .brand { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 800; font-size: 17px; letter-spacing: .08em; text-transform: uppercase; }
.login-top .brand .logo { width: 46px; height: 46px; }
.login-top h1 { margin: 14px 0 0; font-family: var(--display); font-weight: 800; font-size: 28px; line-height: 1.15; letter-spacing: -.02em; }
.login-top .sub { color: var(--muted); font-weight: 500; font-size: 14.5px; }
.login-card { margin: 0 16px; position: relative; z-index: 1; display: flex; flex-direction: column; gap: 16px; padding: 22px 18px; border-radius: 28px; }
.login-note { padding: 18px 24px 28px; font-size: 13px; line-height: 1.55; color: var(--muted); text-align: center; }

@media (max-width: 360px) {
  .title { font-size: 17px; }
  .wordmark { font-size: 13px; }
  .hdr .btn { padding: 0 11px; font-size: 12.5px; }
  .welcome h1 { font-size: 29px; }
  .dish-photo { width: 88px; height: 88px; }
  .stat .n { font-size: 20px; }
  .banner { padding-right: 118px; }
  .banner h2 { font-size: 19px; }
  .banner .plate { width: 150px; height: 150px; right: -38px; }
}

@media print {
  :root, [data-theme="night"] { --bg: #fff; --surface: #fff; --ink: #000; --ink-2: #222; --muted: #444; --line: #ddd; }
  .no-print, .tabbar, .hdr .btn { display: none !important; }
  html, body, .screen { background: #fff; box-shadow: none; color: #000; }
  .hdr { position: static; background: #fff; color: #000; border: 0; }
  .qr-grid { grid-template-columns: repeat(3, 1fr); }
  .qr-grid figure { break-inside: avoid; border: 0; }
}
