/* LUMI CAFE — guest, waiter and admin pages. Deep navy and gold, like the LUMI brand. */
:root {
  --bg: #0b1f3f;
  --bg-2: #102a52;
  --card: #13305c;
  --card-2: #183a6c;
  --line: rgba(233, 201, 138, 0.16);
  --gold: #e9c98a;
  --gold-2: #f5dea9;
  --ink: #f4efe4;
  --muted: #a9b4c8;
  --ok: #5fd39a;
  --bad: #ff7b7b;
  --radius: 18px;
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { min-height: 100vh; font-size: 15px; line-height: 1.4; padding-bottom: 96px; }
button, input, textarea, select { font: inherit; color: inherit; }
.serif { font-family: Georgia, "Times New Roman", serif; }

/* top bar */
.top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top-mark { flex-shrink: 0; }
.top-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.top-text b { font-family: Georgia, serif; letter-spacing: 0.2em; color: var(--gold); font-size: 15px; }
.top-text span { font-size: 12.5px; color: var(--muted); }
.top-orders { margin-left: auto; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 600; color: var(--gold); cursor: pointer; }

main { max-width: 720px; margin: 0 auto; padding: 0 16px; }
.state { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 64px 16px; color: var(--muted); text-align: center; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--gold); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* welcome */
.hero { text-align: center; padding: 28px 8px 8px; }
.hero h1 { font-family: Georgia, serif; font-weight: 500; font-size: 30px; margin: 10px 0 4px; color: var(--gold-2); }
.hero p { color: var(--muted); margin: 0; }
.place-chip { display: inline-block; margin-top: 12px; padding: 6px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--gold); font-weight: 600; }
.form { display: flex; flex-direction: column; gap: 12px; margin: 24px 0; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; color: var(--muted); }
.input { width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 16px; }
.input:focus { outline: 2px solid var(--gold); outline-offset: -1px; }
.btn { border: none; border-radius: 14px; padding: 15px 18px; font-weight: 700; font-size: 16px; cursor: pointer; background: var(--card-2); color: var(--ink); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn-gold { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #1b1408; box-shadow: 0 6px 20px rgba(233, 201, 138, 0.25); }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.note { font-size: 12.5px; color: var(--muted); text-align: center; }

/* menu */
.tabs { position: sticky; top: 61px; z-index: 20; display: flex; gap: 8px; padding: 12px 0 8px; background: var(--bg); }
.tab { flex: 1; padding: 11px; border-radius: 14px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-weight: 700; cursor: pointer; }
.tab.active { background: var(--gold); color: #1b1408; border-color: var(--gold); }
.chips { position: sticky; top: 117px; z-index: 19; display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; background: var(--bg); scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 13.5px; cursor: pointer; white-space: nowrap; }
.cat-title { font-family: Georgia, serif; font-weight: 500; font-size: 22px; color: var(--gold-2); margin: 22px 0 12px; scroll-margin-top: 170px; }
.items { display: flex; flex-direction: column; gap: 12px; }
.item {
  display: flex; gap: 14px; align-items: stretch;
  padding: 12px; border-radius: var(--radius);
  background: linear-gradient(160deg, var(--card), var(--bg-2));
  border: 1px solid var(--line);
}
.item.off { opacity: 0.45; }
.item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.item-title { font-weight: 700; font-size: 16px; }
.item-desc { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.item-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 6px; }
.price { font-weight: 800; color: var(--gold); font-size: 16px; }
.badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.photo { position: relative; width: 116px; height: 116px; flex-shrink: 0; border-radius: 14px; overflow: hidden; background: var(--bg-2); cursor: zoom-in; border: none; padding: 0; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-empty { display: grid; place-items: center; font-size: 40px; background: radial-gradient(circle at 30% 25%, rgba(233,201,138,.22), transparent 60%), var(--card-2); cursor: default; }
.qty { display: flex; align-items: center; gap: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.qty button { width: 34px; height: 34px; border-radius: 50%; border: none; background: var(--card-2); color: var(--gold); font-size: 20px; font-weight: 700; cursor: pointer; line-height: 1; }
.qty span { min-width: 22px; text-align: center; font-weight: 700; }
.add { width: 40px; height: 40px; border-radius: 50%; border: none; background: var(--gold); color: #1b1408; font-size: 24px; font-weight: 700; cursor: pointer; line-height: 1; }

/* cart bar + sheet */
.cartbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 30%); }
.cartbar .btn { width: 100%; max-width: 688px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.sheet { position: fixed; inset: 0; z-index: 60; background: rgba(4, 10, 22, 0.6); display: flex; align-items: flex-end; justify-content: center; }
.sheet-card { width: 100%; max-width: 720px; max-height: 88vh; overflow-y: auto; background: var(--bg-2); border-radius: 24px 24px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.sheet-head h2 { font-family: Georgia, serif; font-weight: 500; color: var(--gold-2); margin: 0; font-size: 22px; }
.x { border: none; background: var(--card); color: var(--ink); width: 36px; height: 36px; border-radius: 50%; font-size: 18px; cursor: pointer; }
.line { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.line-title { flex: 1; min-width: 0; }
.line-title small { display: block; color: var(--muted); }
.totals { margin: 14px 0; display: flex; flex-direction: column; gap: 6px; }
.totals div { display: flex; justify-content: space-between; color: var(--muted); }
.totals .grand { color: var(--ink); font-weight: 800; font-size: 18px; }
.totals .grand span:last-child { color: var(--gold); }
textarea.input { resize: vertical; min-height: 60px; }

/* order status */
.status-card { margin: 18px 0; padding: 18px; border-radius: var(--radius); background: linear-gradient(160deg, var(--card), var(--bg-2)); border: 1px solid var(--line); }
.status-card h2 { margin: 0 0 4px; font-family: Georgia, serif; font-weight: 500; color: var(--gold-2); }
.steps { display: flex; gap: 6px; margin: 14px 0; }
.step { flex: 1; height: 6px; border-radius: 999px; background: var(--card-2); }
.step.on { background: var(--gold); }
.status-name { font-size: 20px; font-weight: 800; }
.status-cancelled { color: var(--bad); }
.status-delivered { color: var(--ok); }

.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.9); display: grid; place-items: center; padding: 16px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 82vh; border-radius: 18px; }
.lightbox p { color: #fff; text-align: center; font-weight: 600; }
.toast { position: fixed; left: 16px; right: 16px; bottom: 96px; z-index: 90; max-width: 520px; margin: 0 auto; padding: 12px 16px; border-radius: 14px; background: #fff; color: #10203d; font-weight: 600; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.toast.bad { background: var(--bad); color: #fff; }

.center-page { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.welcome-card { text-align: center; max-width: 360px; }
.welcome-card h1 { font-family: Georgia, serif; font-weight: 500; letter-spacing: 0.2em; color: var(--gold); }
.welcome-card p { color: var(--muted); }

/* waiter + admin */
.panel { max-width: 720px; margin: 16px auto; padding: 0 16px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.grid-btn { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table td, .admin-table th { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.thumb { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; background: var(--card-2); display: block; }
.small { font-size: 12.5px; color: var(--muted); }
.qr-print { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.qr-tag { background: #fff; color: #0b1f3f; border-radius: 16px; padding: 16px; text-align: center; }
.qr-tag canvas, .qr-tag img { width: 180px; height: 180px; }
.qr-tag b { display: block; font-family: Georgia, serif; font-size: 22px; margin-top: 6px; }
@media print {
  body { background: #fff; padding: 0; }
  .no-print { display: none !important; }
  .qr-tag { break-inside: avoid; border: 1px solid #ccc; }
}
