/* ===========================================================================
   Metropole Cocktailbar - design system
   Palette: deep charcoal / warm gold / cream
   =========================================================================== */

:root {
  --bg: #0d0b0a;
  --bg-soft: #141110;
  --surface: #1a1613;
  --surface-2: #221c17;
  --ink: #f3ece3;
  --muted: #a99c8d;
  --muted-dim: #7d7266;
  --gold: #c9a227;
  --gold-soft: #e0c05a;
  --gold-dim: #8a6d12;
  --line: #2e2620;
  --line-soft: #241e19;
  --green: #4f9d69;
  --green-soft: #1c2e22;
  --amber: #d99a3c;
  --amber-soft: #2e2415;
  --red: #d05a5a;
  --red-soft: #2e1a1a;
  --blue: #6a9fd0;
  --blue-soft: #17222e;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.6);
  font-size: 16px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }
.hidden { display: none !important; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  min-height: 44px;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--gold); color: #14100c; }
.btn-primary:hover:not(:disabled) { background: var(--gold-soft); }
.btn-outline { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-outline:hover:not(:disabled) { border-color: var(--muted); }
.btn-danger { background: var(--red-soft); color: var(--red); border-color: #4a2626; }
.btn-danger:hover:not(:disabled) { background: #3a2020; }
.btn-success { background: var(--green); color: #0d1a11; }
.btn-success:hover:not(:disabled) { background: #5cb078; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--ink); }
.btn-block { width: 100%; }
.btn-sm { min-height: 36px; padding: 6px 12px; border-radius: 8px; font-size: 0.875rem; }

/* ------------------------------------------------------------------ chips */
.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.chip-green { background: var(--green-soft); color: var(--green); }
.chip-amber { background: var(--amber-soft); color: var(--amber); }
.chip-red { background: var(--red-soft); color: var(--red); }
.chip-blue { background: var(--blue-soft); color: var(--blue); }
.chip-gray { background: #241e19; color: var(--muted); }
.chip-gold { background: #2b2410; color: var(--gold-soft); }

/* ------------------------------------------------------------------ toast */
.toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: #2c2620;
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  max-width: min(92vw, 480px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 300;
  border: 1px solid var(--line);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.toast-error { background: #3a1f1f; border-color: #5a2c2c; }
.toast.toast-success { background: #1c2e22; border-color: #2f4a37; }

/* =========================================================================
   GUEST MENU (mobile-first)
   ========================================================================= */

.app-shell { max-width: 620px; margin: 0 auto; min-height: 100dvh; padding-bottom: 110px; }

.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(180deg, #17130f 0%, #12100d 100%);
  border-bottom: 1px solid var(--line);
  padding: 16px 20px 14px;
}
.header-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--gold), var(--gold-dim));
  color: #14100c;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.15rem;
}
.restaurant-name {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.1;
}
.restaurant-sub {
  font-size: 0.72rem;
  color: var(--gold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 3px;
  font-weight: 600;
}
.table-chip {
  background: rgba(201, 162, 39, 0.12);
  border: 1px solid rgba(201, 162, 39, 0.35);
  color: var(--gold-soft);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.8rem;
  white-space: nowrap;
}

/* category chips */
.cat-nav {
  position: sticky;
  top: 75px;
  z-index: 30;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 16px;
  background: linear-gradient(var(--bg) 82%, transparent);
  scrollbar-width: none;
}
.cat-nav::-webkit-scrollbar { display: none; }
.cat-btn {
  flex: 0 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
  padding: 9px 16px;
  font-weight: 600;
  font-size: 0.82rem;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.cat-btn.active { background: var(--gold); border-color: var(--gold); color: #14100c; }

/* menu list */
.menu-root { padding: 4px 16px 0; }
.cat-heading {
  font-size: 0.82rem;
  font-weight: 800;
  margin: 26px 4px 4px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
.cat-desc { color: var(--muted-dim); font-size: 0.78rem; margin: 0 4px 10px; }
.item-card {
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 9px;
  width: 100%;
  text-align: left;
  color: var(--ink);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.item-card:hover { border-color: #3d332a; background: var(--surface-2); }
.tile {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  color: #14100c;
  overflow: hidden;
}
.tile img { width: 100%; height: 100%; object-fit: cover; }
.item-info { flex: 1; min-width: 0; }
.item-name {
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.item-desc {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.item-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.item-price { font-weight: 800; color: var(--gold-soft); font-variant-numeric: tabular-nums; }
.item-volume { color: var(--muted-dim); font-size: 0.75rem; }

/* cart bar */
.cart-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(16px + env(safe-area-inset-bottom));
  width: min(92vw, 560px);
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--gold);
  color: #14100c;
  border: none;
  border-radius: 999px;
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(201, 162, 39, 0.3);
  z-index: 60;
}
.cart-bar:hover { background: var(--gold-soft); }
.cart-count {
  background: #14100c;
  color: var(--gold);
  border-radius: 999px;
  min-width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 800;
  padding: 0 6px;
}
.cart-bar .cart-total { margin-left: auto; font-variant-numeric: tabular-nums; }

/* modal + sheet */
.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(3px);
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
@media (min-width: 640px) { .backdrop { align-items: center; } }
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  width: min(100vw, 560px);
  border-radius: 22px 22px 0 0;
  padding: 20px;
  max-height: 88dvh;
  overflow-y: auto;
  animation: slide-up 0.22s ease;
}
@media (min-width: 640px) { .panel { border-radius: 22px; } }
@keyframes slide-up { from { transform: translateY(24px); opacity: 0.6; } to { transform: none; opacity: 1; } }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.panel-title { font-size: 1.1rem; font-weight: 800; }
.panel-close {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  width: 34px;
  height: 34px;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--muted);
  flex: 0 0 auto;
}
.panel-desc { color: var(--muted); font-size: 0.9rem; margin: 8px 0 0; }

.qty-row { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 6px; }
.qty-label { font-weight: 700; font-size: 0.9rem; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; }
.stepper button {
  width: 42px; height: 42px;
  background: none; border: none;
  font-size: 1.15rem; font-weight: 700; color: var(--gold);
}
.stepper span { min-width: 34px; text-align: center; font-weight: 800; }
.note-input, .field {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: var(--bg-soft);
  color: var(--ink);
  min-height: 44px;
}
.note-input::placeholder, .field::placeholder { color: var(--muted-dim); }
.note-input:focus, .field:focus { outline: 2px solid rgba(201, 162, 39, 0.25); border-color: var(--gold); }
textarea.note-input { resize: vertical; min-height: 70px; }
.field-label { display: block; font-size: 0.78rem; font-weight: 700; color: var(--muted); margin: 14px 0 6px; letter-spacing: 0.03em; }

/* cart lines */
.cart-line { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.cart-line-info { flex: 1; min-width: 0; }
.cart-line-name { font-weight: 700; font-size: 0.9rem; }
.cart-line-note { color: var(--amber); font-size: 0.76rem; margin-top: 2px; }
.cart-line-price { font-weight: 700; font-size: 0.9rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cart-empty { color: var(--muted); text-align: center; padding: 16px 0; }
.totals { margin-top: 16px; font-size: 0.9rem; }
.totals-row { display: flex; justify-content: space-between; padding: 4px 0; color: var(--muted); }
.totals-row.grand {
  color: var(--ink);
  font-weight: 800;
  font-size: 1.05rem;
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 12px;
}
.pay-note { color: var(--muted-dim); font-size: 0.76rem; text-align: center; margin: 10px 0 0; }

/* success view */
.success-wrap { max-width: 620px; margin: 0 auto; padding: 48px 24px; text-align: center; }
.check-ring {
  width: 92px; height: 92px;
  margin: 0 auto 20px;
  border-radius: 999px;
  background: var(--green-soft);
  border: 1px solid #2f4a37;
  display: flex; align-items: center; justify-content: center;
}
.check-ring::after {
  content: "";
  width: 40px; height: 22px;
  border-left: 6px solid var(--green);
  border-bottom: 6px solid var(--green);
  transform: rotate(-45deg) translate(2px, -4px);
}
.success-title { font-size: 1.4rem; font-weight: 800; }
.success-sub { color: var(--muted); margin-top: 8px; }
.success-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin: 24px 0;
  text-align: left;
}
.success-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 0.95rem; }
.success-row span:first-child { color: var(--muted); }
.eta-badge {
  display: inline-block;
  background: rgba(201, 162, 39, 0.14);
  color: var(--gold-soft);
  font-weight: 800;
  border-radius: 12px;
  padding: 6px 14px;
}

/* empty / blocked state */
.empty-state { text-align: center; padding: 64px 24px; color: var(--muted); }
.empty-state h2 { color: var(--ink); margin: 16px 0 10px; font-size: 1.2rem; }
.empty-state p { line-height: 1.65; font-size: 0.92rem; }
.empty-mark {
  width: 64px; height: 64px; margin: 0 auto;
  border-radius: 18px;
  background: linear-gradient(145deg, var(--gold), var(--gold-dim));
  color: #14100c;
  display: grid; place-items: center;
  font-weight: 800; font-size: 1.5rem;
}

/* notice banner */
.notice {
  background: var(--amber-soft);
  border: 1px solid #4a3a1c;
  color: var(--amber);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.85rem;
  margin: 12px 0 4px;
}

/* skeleton */
.skeleton {
  height: 78px;
  border-radius: var(--radius);
  background: linear-gradient(100deg, #1a1613 40%, #221c17 50%, #1a1613 60%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  margin-bottom: 10px;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* =========================================================================
   LANDING PAGE (/)
   ========================================================================= */
.landing { max-width: 680px; margin: 0 auto; padding: 56px 20px; }
.landing-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 32px; }
.landing-brand .brand-mark { width: 56px; height: 56px; border-radius: 16px; font-size: 1.4rem; }
.landing-title { font-size: 1.6rem; font-weight: 800; letter-spacing: 0.02em; text-transform: uppercase; margin: 0 0 6px; }
.landing-sub { color: var(--gold); margin: 0; font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600; }
.role-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 32px; }
@media (min-width: 640px) { .role-grid { grid-template-columns: repeat(2, 1fr); } }
.role-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  text-align: left;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.role-card:hover { transform: translateY(-2px); border-color: var(--gold-dim); }
.role-card h3 { margin: 0 0 6px; font-size: 1.02rem; }
.role-card p { margin: 0; color: var(--muted); font-size: 0.85rem; line-height: 1.55; }
.role-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.landing-note {
  margin-top: 32px;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
}
