/* ScanOrder — customer UI. No external fonts, CDN, or images. */
:root {
  --bg: #0b1020;
  --bg-2: #111832;
  --panel: #151d38;
  --panel-2: #1b2547;
  --line: #2a355c;
  --text: #f4f6ff;
  --muted: #9aa6c9;
  --accent: #ff8a3d;
  --accent-2: #ffb347;
  --green: #35d399;
  --red: #ff6b6b;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 110px;
}
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.app { max-width: 1120px; margin: 0 auto; padding: 0 18px; }

/* Top bar */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 18px 2px 14px;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 13px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #2a1400; font-weight: 900; font-size: 14px; letter-spacing: -.5px;
  box-shadow: 0 8px 24px rgba(255, 138, 61, .3);
}
.brand-name { font-weight: 800; font-size: 18px; letter-spacing: -.4px; }
.brand-sub { color: var(--muted); font-size: 11px; margin-top: 1px; letter-spacing: .3px; }
.table-pill {
  border: 1px solid var(--line); background: var(--panel);
  padding: 8px 14px; border-radius: 999px; font-weight: 700;
  font-size: 13px; white-space: nowrap;
}

/* Hero */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #1a2244 0%, #131a35 55%, #20182f 100%);
  border: 1px solid var(--line); border-radius: 24px;
  padding: 34px 28px; margin: 4px 0 24px;
}
.hero-glow {
  position: absolute; width: 330px; height: 330px; right: -90px; top: -150px;
  background: radial-gradient(circle, rgba(255,138,61,.28), transparent 68%);
  pointer-events: none;
}
.hero-inner { position: relative; }
.eyebrow {
  margin: 0 0 10px; color: var(--accent-2); font-size: 11px;
  font-weight: 800; letter-spacing: 2px;
}
.hero h1 { margin: 0; font-size: clamp(30px, 6vw, 46px); line-height: 1.08; letter-spacing: -1.5px; }
.hero-sub { color: var(--muted); max-width: 560px; line-height: 1.6; margin: 12px 0 18px; font-size: 15px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge {
  font-size: 11px; font-weight: 700; color: #cfe3ff;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  padding: 6px 11px; border-radius: 999px;
}

/* Category chips */
.chips {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 14px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; border: 1px solid var(--line); background: var(--panel);
  color: var(--muted); padding: 9px 15px; border-radius: 999px;
  font-size: 13px; font-weight: 700; transition: .18s ease;
}
.chip:hover { color: var(--text); border-color: #465582; }
.chip.is-active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #2a1400; border-color: transparent;
}

/* Menu cards */
.menu-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
}
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-3px); border-color: #465582; }
.card-art {
  height: 108px; display: grid; place-items: center; font-size: 52px;
  background: radial-gradient(circle at 50% 120%, rgba(255,138,61,.2), transparent 65%), var(--bg-2);
  border-bottom: 1px solid var(--line);
}
.card-body { padding: 15px; display: flex; flex-direction: column; flex: 1; gap: 9px; }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.card-top h3 { margin: 0; font-size: 15px; line-height: 1.25; }
.pop {
  flex: 0 0 auto; font-size: 9px; font-weight: 800; letter-spacing: .5px;
  text-transform: uppercase; color: var(--accent-2);
  background: rgba(255,179,71,.12); border: 1px solid rgba(255,179,71,.28);
  padding: 3px 7px; border-radius: 999px;
}
.card-desc { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 0; flex: 1; }
.card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.price { font-size: 16px; }
.food-dot { width: 11px; height: 11px; border: 2px solid; border-radius: 3px; display: inline-block; }
.food-dot.veg { border-color: var(--green); background: var(--green); }
.food-dot.nonveg { border-color: var(--red); background: var(--red); }
.cat-tag { color: var(--muted); font-size: 10px; margin-left: auto; }
.add-btn {
  margin-top: 2px; width: 100%; border: 0; border-radius: 11px;
  padding: 10px; font-weight: 800; font-size: 13px;
  background: rgba(255,138,61,.13); color: var(--accent-2);
  border: 1px solid rgba(255,138,61,.35); transition: .15s ease;
}
.add-btn:hover { background: var(--accent); color: #2a1400; border-color: var(--accent); }

/* Footer */
.footer { text-align: center; padding: 40px 0 20px; color: var(--muted); font-size: 12px; }
.footer-brand { font-weight: 800; color: var(--text); font-size: 14px; }
.footer-brand span { color: var(--muted); font-weight: 400; }
.footer-note { margin-top: 6px; }
.footer-link { display: inline-block; margin-top: 12px; color: var(--accent-2); text-decoration: none; font-weight: 700; }
.footer-link:hover { text-decoration: underline; }

/* Cart bar */
.cart-bar {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%);
  width: min(560px, calc(100% - 28px)); z-index: 40;
  display: flex; align-items: center; gap: 10px;
  background: rgba(21,29,56,.96); backdrop-filter: blur(10px);
  border: 1px solid #3a4774; border-radius: 16px; padding: 9px;
  box-shadow: var(--shadow);
}
.cart-bar[hidden] { display: none; }
.cart-summary { display: flex; align-items: center; gap: 11px; background: none; border: 0; color: var(--text); padding: 4px 6px; text-align: left; flex: 1; }
.cart-count {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent); color: #2a1400; font-weight: 900; flex: 0 0 auto;
}
.cart-summary-text { display: flex; flex-direction: column; line-height: 1.25; }
.cart-summary-text strong { font-size: 15px; }
.cart-summary-text small { color: var(--muted); font-size: 11px; }
.cart-open {
  border: 0; border-radius: 11px; padding: 12px 15px; white-space: nowrap;
  background: var(--accent); color: #2a1400; font-weight: 800; font-size: 13px;
}

/* Cart sheet */
.sheet-backdrop {
  position: fixed; inset: 0; background: rgba(3,6,16,.7);
  z-index: 50; backdrop-filter: blur(3px);
}
.sheet-backdrop[hidden] { display: none; }
.cart-sheet {
  position: fixed; z-index: 60; top: 0; right: 0; height: 100%;
  width: min(420px, 100%); background: var(--bg-2);
  border-left: 1px solid var(--line); box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transform: translateX(105%); transition: transform .25s ease;
  visibility: hidden;
}
.cart-sheet.is-open { transform: translateX(0); visibility: visible; }
.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px; border-bottom: 1px solid var(--line);
}
.sheet-eyebrow { margin: 0 0 2px; color: var(--accent-2); font-size: 10px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; }
.sheet-head h2 { margin: 0; font-size: 21px; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); font-size: 14px;
}
.cart-body { flex: 1; overflow-y: auto; padding: 10px 20px; }
.empty { text-align: center; padding: 60px 10px; color: var(--muted); }
.empty-icon { font-size: 42px; margin-bottom: 10px; }
.empty p { margin: 0 0 4px; color: var(--text); font-weight: 700; }
.empty small { font-size: 12px; }
.cart-row { display: flex; align-items: center; gap: 11px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-emoji {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  font-size: 24px; background: var(--panel); flex: 0 0 auto;
}
.cart-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cart-info strong { font-size: 13px; }
.cart-info small { color: var(--muted); font-size: 11px; }
.qty { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.qty button {
  width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); font-weight: 800; font-size: 15px;
}
.qty span { min-width: 20px; text-align: center; font-size: 13px; font-weight: 800; }
.cart-fields { padding: 12px 20px 0; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.field { display: grid; gap: 5px; font-size: 12px; font-weight: 700; }
.field small { color: var(--muted); font-weight: 400; }
.field input {
  width: 100%; background: var(--panel); border: 1px solid var(--line);
  color: var(--text); border-radius: 10px; padding: 10px 11px; font-size: 13px;
  outline: none;
}
.field input:focus { border-color: var(--accent); }
.sheet-foot { padding: 16px 20px 22px; }
.total-row { display: flex; justify-content: space-between; align-items: center; font-size: 15px; }
.total-row strong { font-size: 21px; }
.sheet-hint { color: var(--muted); font-size: 10px; line-height: 1.5; margin: 8px 0 12px; }
.wa-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; background: #25d366; color: #062b16;
  font-weight: 900; font-size: 14px; padding: 14px; border-radius: 12px;
}
.wa-btn:hover { background: #2ee677; }
.wa-btn.is-disabled { opacity: .45; pointer-events: none; }
.clear-btn {
  display: block; margin: 11px auto 0; background: none; border: 0;
  color: var(--muted); font-size: 11px; text-decoration: underline;
}

/* Online ordering */
.sheet-main { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.mode-switch { display: flex; gap: 5px; background: var(--panel); border: 1px solid var(--line); padding: 4px; border-radius: 12px; }
.mode-btn {
  flex: 1; border: 0; background: transparent; color: var(--muted);
  padding: 9px 6px; border-radius: 9px; font-size: 12px; font-weight: 800;
}
.mode-btn.is-active { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #2a1400; }
.delivery-fields { display: grid; gap: 10px; }
.online-btn {
  background: linear-gradient(135deg, #6aa8ff, #8a6bff); color: #07112b;
  margin-bottom: 8px; border: 0;
}
.online-btn:hover { filter: brightness(1.08); }
.online-btn.is-disabled, .wa-btn.is-disabled { opacity: .45; pointer-events: none; }
.inline-error { color: var(--red); font-size: 11px; line-height: 1.4; margin: 9px 0 0; }
.inline-error[hidden] { display: none; }
.cart-sheet.is-success .sheet-main { display: none; }
.success-view { padding: 40px 24px; text-align: center; overflow-y: auto; }
.success-view[hidden] { display: none; }
.success-icon {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  margin: 0 auto; background: rgba(53,211,153,.15); color: var(--green);
  font-size: 30px; font-weight: 900;
}
.success-view h2 { margin: 16px 0 8px; font-size: 23px; }
.success-id { color: var(--muted); font-size: 13px; }
.success-id strong { color: var(--text); }
.success-eta { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 0 0 22px; }
.success-view .ghost-btn {
  display: block; margin: 12px auto 0; background: var(--panel);
  border: 1px solid var(--line); color: var(--text); border-radius: 11px;
  padding: 11px 16px; font-weight: 800; font-size: 12px;
}

/* Toast */
.toast {
  position: fixed; left: 50%; top: 18px; transform: translate(-50%, -20px);
  background: #e9fbf4; color: #0c3d2a; padding: 10px 16px; border-radius: 10px;
  font-size: 12px; font-weight: 800; z-index: 80; opacity: 0;
  pointer-events: none; transition: .2s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 520px) {
  .hero { padding: 26px 20px; }
  .cart-sheet { top: auto; bottom: 0; height: 88%; width: 100%; border-left: 0; border-top: 1px solid var(--line); border-radius: 20px 20px 0 0; transform: translateY(105%); }
  .cart-sheet.is-open { transform: translateY(0); }
  .menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card-art { height: 84px; font-size: 40px; }
  .card-body { padding: 11px; gap: 7px; }
  .card-top h3 { font-size: 13px; }
  .card-desc { font-size: 11px; }
  .cat-tag { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
