/* ============================================================
   Shared stylesheet — multi-tenant.
   Default palette: Radhika's Chill House (sage green + cream).
   Brand colours are CSS variables; brand.js overrides them from
   config.js theme, so a new client is a one-file tweak.
   ============================================================ */
:root {
  --strawberry: #5e9a7b;        /* primary brand green */
  --strawberry-deep: #3e7b5e;   /* deeper brand green  */
  --berry: #244e3e;             /* darkest green — headings, bars */
  --cream: #fbfaf5;             /* warm white background */
  --cream-2: #eef5f0;           /* soft green-tinted */
  --mint: #86c2a8;
  --mint-deep: #3e8e7a;
  --blueberry: #4e8067;
  --vanilla: #e7c98b;           /* warm gold accent */
  --choc: #5a4632;
  --ink: #23392f;               /* body text */
  --ink-soft: #6e8379;          /* muted */
  --white: #ffffff;
  --good: #2fae66;
  --warn: #f4a52a;
  --danger: #e5484d;

  /* soft brand tints used across cards/borders (overridable) */
  --tint: #e4f0e9;
  --tint-2: #edf5ef;
  --line: #d7e9de;
  --line-soft: #e4efe8;

  --shadow-sm: 0 2px 8px rgba(36, 78, 62, 0.10);
  --shadow: 0 10px 30px rgba(36, 78, 62, 0.16);
  --shadow-lg: 0 20px 50px rgba(20, 40, 30, 0.22);
  --radius: 22px;
  --radius-sm: 14px;
  --font-head: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Nunito', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; }
input { font-family: inherit; }

/* ---------- Customer app background ---------- */
.app-customer {
  background:
    radial-gradient(1200px 600px at 20% -10%, #e3f1e9 0%, transparent 60%),
    radial-gradient(1000px 700px at 100% 0%, #e7f6ef 0%, transparent 55%),
    linear-gradient(180deg, var(--cream) 0%, var(--cream-2) 100%);
  min-height: 100vh;
}

.loading-splash {
  min-height: 100vh; display: grid; place-content: center; text-align: center;
  color: var(--ink-soft); gap: 8px;
}
.splash-cone { font-size: 64px; animation: bob 1.4s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-4deg);} 50% { transform: translateY(-10px) rotate(4deg);} }

/* ---------- Real brand logo (replaces the emoji monogram) ---------- */
.brand .logo { padding: 0; overflow: hidden; }
.logo-img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 12px; }
.brand-img { object-fit: cover; border-radius: 50%; display: block; margin: 0 auto; box-shadow: var(--shadow-sm); }
.splash-cone .brand-img { width: 112px; height: 112px; }
.success-cone .brand-img { width: 96px; height: 96px; }
.nostore-logo { width: 96px; height: 96px; object-fit: cover; border-radius: 50%; margin: 0 auto 4px; display: block; box-shadow: var(--shadow-sm); }

/* ---------- Marketing opt-in checkbox (customer) ---------- */
.optin-row { display: flex; align-items: flex-start; gap: 10px; margin: 4px 2px 8px; font-weight: 700; color: var(--ink); font-size: 13px; cursor: pointer; }
.optin-row input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--strawberry); flex: 0 0 auto; }

/* ---------- CRM tags + WhatsApp campaigns (dashboard) ---------- */
.cust-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.tag { display: inline-block; font-weight: 800; font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid #cfe3d8; background: #eef5f0; color: var(--berry); white-space: nowrap; }
.tag-recurring { background: #e4f0e9; color: var(--strawberry-deep); border-color: #bfd8cb; }
.tag-new { background: #fdf1e5; color: #9a6a2f; border-color: #ebd3b6; }
.tag-opt { background: #e8f0fb; color: #2f5a9a; border-color: #c6d8f1; }
.wa-note { font-size: 12px; color: var(--ink-soft); font-weight: 700; }
.wa-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.wa-row .input { flex: 1; min-width: 180px; }
.wa-row .btn-primary { width: auto; flex: 0 0 auto; }
.wa-result { margin-top: 12px; }
.wa-links-head { font-weight: 700; color: var(--ink-soft); font-size: 13px; margin-bottom: 8px; }
.wa-links { display: flex; flex-wrap: wrap; gap: 8px; }
.wa-link, .wa-btn { display: inline-block; font-weight: 800; font-size: 13px; padding: 7px 12px; border-radius: 999px; border: 1px solid #bfe0c6; background: #eafaf0; color: #1f7a44; text-decoration: none; cursor: pointer; }
.wa-link:hover, .wa-btn:hover { background: #d8f3e2; }
.wa-off { font-size: 12px; color: var(--ink-soft); font-weight: 700; }
.wa-ok { color: #1f7a44; font-weight: 800; }

/* ---------- Order type (eat-in / takeaway) + offer + install ---------- */
.ot-pick { display: flex; gap: 12px; margin: 4px 0 14px; }
.ot-btn { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 18px 10px; border-radius: 16px; border: 2px solid #d7e9de; background: var(--white); cursor: pointer; font-weight: 800; color: var(--berry); }
.ot-btn:hover { border-color: var(--strawberry); background: var(--cream-2); }
.ot-btn .ot-ico { font-size: 30px; }
.ot-btn small { font-weight: 700; color: var(--ink-soft); font-size: 12px; }
.ot-chip-row { display: flex; justify-content: flex-start; margin: 2px 0 8px; }
.ot-chip { display: inline-block; font-weight: 800; font-size: 13px; padding: 5px 12px; border-radius: 999px; background: #e4f0e9; color: var(--strawberry-deep); border: 1px solid #bfd8cb; }
.offer-line { background: #fff3e0; border: 1px solid #f0d6a8; color: #9a6a2f; font-weight: 800; font-size: 13px; padding: 9px 12px; border-radius: 12px; margin: 6px 0; }
.success-sub { font-weight: 800; color: var(--ink-soft); margin: 4px 0 2px; }
.np-install { border-color: #bfe0c6 !important; }

/* ---------- Kitchen station tabs + order-type tags ---------- */
.k-tabs { display: flex; gap: 10px; padding: 12px 22px; background: #1b2e24; border-bottom: 1px solid #24463a; position: sticky; top: 64px; z-index: 9; }
.k-tab { flex: 0 0 auto; padding: 10px 18px; border-radius: 999px; font-weight: 800; font-size: 15px; color: #cfe6da; background: #22392e; border: 2px solid #2f5143; cursor: pointer; }
.k-tab.on { background: var(--strawberry); color: #fff; border-color: var(--strawberry); }
.ot-tag { margin-left: auto; font-weight: 800; font-size: 11px; padding: 4px 9px; border-radius: 999px; }
.ot-tag.take { background: #ffd0e2; color: #b02a63; border: 1px solid #f3a9c8; }
.ot-tag.dine { background: #e4f0e9; color: var(--strawberry-deep); border: 1px solid #bfd8cb; }
/* Order-type BOX colours: eat-in = white, takeaway = pink */
.ticket.ot-dine, .mgr-card.ot-dine { background: #ffffff; border-top-color: var(--strawberry); }
.ticket.ot-take, .mgr-card.ot-take { background: #ffe3ef; border-top-color: #e85a9b; }
.ticket.ot-dine .ticket-foot, .mgr-card.ot-dine .ticket-foot { background: #f1f8f3; }
.ticket.ot-take .ticket-foot, .mgr-card.ot-take .ticket-foot { background: #ffd0e2; }
.ti-st { margin-left: auto; opacity: .8; }

/* ---------- Manager screen ---------- */
.mgr-main { display: flex; gap: 16px; align-items: flex-start; padding: 18px 22px 60px; }
.mgr-orders { flex: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.mgr-counter { flex: 0 0 340px; width: 340px; background: #fff; color: var(--ink); border-radius: 16px; padding: 16px; position: sticky; top: 84px; max-height: calc(100vh - 110px); overflow: auto; box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.mgr-counter-h { font-family: var(--font-head); color: var(--berry); margin: 0 0 10px; }
.mgr-card { background: #fff; color: var(--ink); border-radius: 18px; overflow: hidden; box-shadow: 0 12px 30px rgba(0,0,0,.35); display: flex; flex-direction: column; border-top: 6px solid var(--strawberry); transition: background-color .4s ease, color .4s ease, outline-color .4s ease, box-shadow .4s ease, border-top-color .4s ease; }
.mgr-card .ticket-head, .mgr-card .ticket-foot { transition: background-color .4s ease, color .4s ease; }
/* takeaway box colour handled by .ticket.ot-take, .mgr-card.ot-take above */
/* ALL STATIONS DONE → whole card turns solid green (overrides white/pink); pink/grey ot-tag pill still shows eat-in vs takeaway */
.mgr-card.ready { background: #1f9d57; color: #fff; border-top-color: #0f7a3f; outline: 3px solid #0f7a3f; box-shadow: 0 0 0 4px rgba(31,157,87,.3), 0 14px 32px rgba(0,0,0,.35); }
.mgr-card.ready .ticket-head, .mgr-card.ready .ticket-foot { background: #15823f; }
.mgr-card.ready .ticket-code, .mgr-card.ready .ticket-meta, .mgr-card.ready .ticket-meta span, .mgr-card.ready .ti-line, .mgr-card.ready .ti-st { color: #fff; }
.mgr-stations { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 16px 8px; }
.st-chip { font-weight: 800; font-size: 12px; padding: 4px 10px; border-radius: 999px; }
.st-chip.done { background: #e7f6ef; color: #1c7a4a; border: 1px solid #b7eccd; }
.st-chip.wait { background: #fff3e0; color: #b3711a; border: 1px solid #f3d8a8; }
.mgr-wait { flex: 1; text-align: center; color: var(--ink-soft); font-weight: 800; font-size: 13px; }
.mgr-alert.confirm { background: #e08a3c; }
/* POS-style counter panel */
.pos-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 8px; }
.pos-head h3 { font-family: var(--font-head); color: var(--berry); margin: 0; }
.pos-clear { font-weight: 800; font-size: 12px; color: var(--danger); background: #fff; border: 1px solid #ffd6d7; border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.seg { display: flex; gap: 6px; background: #eef5f0; border-radius: 12px; padding: 4px; margin: 0 0 10px; }
.seg-btn { flex: 1; padding: 9px 8px; border-radius: 9px; font-weight: 800; font-size: 13px; color: var(--ink-soft); background: transparent; border: none; cursor: pointer; }
.seg-btn.on { background: #fff; color: var(--strawberry-deep); box-shadow: var(--shadow-sm); }
.pos-cats { position: sticky; top: 0; z-index: 3; display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 8px; margin: 0; background: #fff; border-bottom: 1px solid #eef3f0; -webkit-overflow-scrolling: touch; }
.pos-cat { flex: 0 0 auto; font-weight: 800; font-size: 12px; padding: 7px 12px; border-radius: 999px; border: 1px solid #d7e9de; background: var(--white); color: var(--berry); cursor: pointer; white-space: nowrap; }
.pos-cat.on { background: var(--strawberry); color: #fff; border-color: var(--strawberry); }
/* All items in ONE scroll, grouped by category (the panel itself scrolls — no cramped inner box). */
.pos-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 2px; margin: 8px 0 10px; }
.pos-cat-head { grid-column: 1 / -1; font-weight: 800; font-size: 12px; color: var(--berry); padding: 10px 2px 2px; }
.pos-cat-head:first-child { padding-top: 2px; }
.pos-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 8px; border-radius: 14px; border: 1px solid #e4efe8; background: var(--white); cursor: pointer; text-align: center; }
.pos-tile:hover { border-color: var(--strawberry); background: var(--cream-2); }
.pos-tile:active { transform: scale(0.97); }
.pt-emoji { font-size: 24px; }
.pt-name { font-weight: 800; font-size: 12px; color: var(--ink); line-height: 1.15; }
.pt-price { font-weight: 800; font-size: 12px; color: var(--strawberry-deep); }
.pt-badge { position: absolute; top: 6px; right: 6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--good); color: #fff; font-weight: 800; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.pt-badge:empty { display: none; }
.pos-bill { border: 1px solid #e4efe8; border-radius: 12px; padding: 8px 10px; margin: 0 0 10px; max-height: 180px; overflow-y: auto; }
.pos-bill-empty { color: var(--ink-soft); font-weight: 700; font-size: 13px; text-align: center; padding: 10px 0; }
.pos-line { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dashed #eef3f0; }
.pl-name { flex: 1; font-weight: 700; font-size: 13px; }
.pl-amt { font-weight: 800; font-size: 13px; min-width: 52px; text-align: right; }
.pos-step { display: flex; align-items: center; gap: 6px; }
.ps { width: 26px; height: 26px; border-radius: 7px; font-weight: 800; background: var(--cream-2); color: var(--berry); border: 1px solid #cfe3d8; cursor: pointer; }
.pos-step b { min-width: 16px; text-align: center; font-size: 13px; }
.pos-total { display: flex; justify-content: space-between; font-family: var(--font-head); color: var(--berry); font-size: 17px; padding-top: 8px; margin-top: 2px; }
.pos-inputs { display: flex; flex-direction: column; gap: 8px; margin: 0 0 10px; }
.pos-charge { width: 100%; position: sticky; bottom: 0; margin-top: 4px; box-shadow: 0 -8px 16px rgba(255,255,255,0.95); }
.pos-charge:disabled { opacity: .55; }
@media (max-width: 860px) { .mgr-main { flex-direction: column; } .mgr-counter { width: 100%; flex: none; position: static; max-height: none; } }
.of-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 8px 0 12px; }

/* First-screen order-type gate + the switch chip on the menu */
.gate-card { max-width: 460px; margin: 0 auto; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px 24px 26px; text-align: center; }
.gate-logo { margin-bottom: 4px; }
.gate-title { font-family: var(--font-head); color: var(--berry); margin: 8px 0 2px; font-size: 24px; }
.gate-store { display: inline-block; font-weight: 800; font-size: 13px; color: var(--strawberry-deep); background: #e4f0e9; border: 1px solid #bfd8cb; padding: 5px 12px; border-radius: 999px; margin: 4px 0 2px; }
.gate-q { color: var(--ink-soft); font-weight: 800; margin: 14px 0 10px; }
.ot-switch { font-weight: 800; font-size: 12px; color: var(--strawberry-deep); background: #e4f0e9; border: 1px solid #bfd8cb; padding: 6px 11px; border-radius: 999px; cursor: pointer; white-space: nowrap; }

/* ---------- Layout shell ---------- */
.shell { max-width: 720px; margin: 0 auto; padding: 0 16px 140px; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px; flex-wrap: nowrap;
  padding: 11px 14px;
  background: linear-gradient(180deg, rgba(251,250,245,0.96), rgba(251,250,245,0.82));
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(36,78,62,0.10);
}
.brand { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; }
.brand .logo {
  width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-content: center;
  font-size: 24px; background: var(--white); border-radius: 13px;
  box-shadow: var(--shadow-sm); border: 2px solid #d7e9de;
}
.brand-text { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.brand h1 { font-family: var(--font-head); font-size: 18px; margin: 0; line-height: 1.1; color: var(--berry); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand .tag { font-size: 11.5px; color: var(--ink-soft); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-branch { color: var(--strawberry-deep); }
.table-chip {
  font-weight: 800; font-size: 12px; color: var(--strawberry-deep); white-space: nowrap;
  background: #e4f0e9; padding: 6px 11px; border-radius: 999px; border: 1px solid #bfd8cb;
}

.hero {
  margin: 18px 0 8px; padding: 20px 22px; border-radius: var(--radius);
  background: linear-gradient(120deg, var(--strawberry), var(--strawberry-deep));
  color: #fff; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.hero h2 { font-family: var(--font-head); margin: 0 0 4px; font-size: 24px; }
.hero p { margin: 0; opacity: 0.92; font-weight: 600; }
.hero .sparkle { position: absolute; right: -8px; top: -14px; font-size: 96px; opacity: 0.22; transform: rotate(12deg); }

/* ---------- Category nav ---------- */
.cat-nav {
  position: sticky; top: 74px; z-index: 15;
  display: flex; gap: 8px; overflow-x: auto; padding: 12px 2px; margin: 8px -2px;
  scrollbar-width: none;
}
.cat-nav::-webkit-scrollbar { display: none; }
.cat-pill {
  white-space: nowrap; font-weight: 800; font-size: 14px; color: var(--berry);
  background: var(--white); padding: 9px 16px; border-radius: 999px;
  box-shadow: var(--shadow-sm); border: 1px solid transparent; transition: .15s;
}
.cat-pill.active { background: var(--berry); color: #fff; }

/* ---------- Menu ---------- */
.cat-section { margin-top: 22px; scroll-margin-top: 130px; }
.cat-title { font-family: var(--font-head); font-size: 19px; color: var(--berry); margin: 0 0 12px; display:flex; align-items:center; gap:8px; }

.item-card {
  display: flex; gap: 14px; align-items: center;
  background: var(--white); border-radius: var(--radius-sm); padding: 12px;
  box-shadow: var(--shadow-sm); margin-bottom: 12px; border: 1px solid #e4efe8;
}
.item-emoji {
  width: 62px; height: 62px; flex: 0 0 62px; display: grid; place-content: center;
  font-size: 34px; background: linear-gradient(160deg, #fff, #edf5ef); border-radius: 16px;
}
.item-main { flex: 1; min-width: 0; }
.item-name { font-weight: 800; font-size: 16px; margin: 0; }
.item-desc { color: var(--ink-soft); font-size: 13px; margin: 3px 0 0; font-weight: 600; }
.item-price { font-family: var(--font-head); color: var(--strawberry-deep); font-weight: 800; margin-top: 6px; }

.qty-add {
  display: flex; align-items: center; gap: 4px;
}
.btn-add {
  background: var(--strawberry); color: #fff; font-weight: 800; font-size: 14px;
  padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow-sm); transition: transform .1s;
}
.btn-add:active { transform: scale(0.94); }
.stepper { display: flex; align-items: center; gap: 10px; background: #eef6f1; border-radius: 12px; padding: 4px; border: 1px solid #cbe3d5; }
.stepper button {
  width: 34px; height: 34px; border-radius: 10px; font-size: 20px; font-weight: 800;
  background: var(--white); color: var(--strawberry-deep); box-shadow: var(--shadow-sm);
  display: grid; place-content: center;
}
.stepper .count { min-width: 20px; text-align: center; font-weight: 800; }

/* ---------- Floating cart bar ---------- */
.cart-bar {
  position: fixed; left: 50%; transform: translateX(-50%) translateY(120%);
  bottom: 18px; width: min(680px, calc(100% - 24px)); z-index: 30;
  background: var(--berry); color: #fff; border-radius: 18px; padding: 14px 18px;
  display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow-lg);
  transition: transform .28s cubic-bezier(.2,.8,.2,1);
}
.cart-bar.show { transform: translateX(-50%) translateY(0); }
.cart-bar .count-badge {
  background: var(--strawberry); font-weight: 800; padding: 6px 12px; border-radius: 999px; font-size: 14px;
}
.cart-bar .cb-total { margin-left: auto; font-family: var(--font-head); font-size: 18px; }
.cart-bar .cb-go { background: #fff; color: var(--berry); font-weight: 800; padding: 10px 16px; border-radius: 12px; }

/* ---------- Modal / sheet ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; background: rgba(20,40,30,0.5); backdrop-filter: blur(3px);
  z-index: 40; display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.sheet-backdrop.show { opacity: 1; pointer-events: auto; }
.sheet {
  background: var(--cream); width: min(720px, 100%); max-height: 92vh; overflow-y: auto;
  border-radius: 26px 26px 0 0; padding: 8px 18px 26px; box-shadow: var(--shadow-lg);
  transform: translateY(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1);
}
.sheet-backdrop.show .sheet { transform: translateY(0); }
.sheet-grip { width: 44px; height: 5px; background: #cfe0d6; border-radius: 999px; margin: 8px auto 6px; }
.sheet h3 { font-family: var(--font-head); color: var(--berry); font-size: 22px; margin: 6px 4px 14px; }

.cart-line { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed #d8e7de; }
.cart-line .cl-emoji { font-size: 26px; }
.cart-line .cl-main { flex: 1; }
.cart-line .cl-name { font-weight: 800; }
.cart-line .cl-sub { color: var(--ink-soft); font-size: 13px; font-weight: 700; }
.cart-line .cl-price { font-weight: 800; color: var(--berry); }

.totals { margin: 16px 4px 6px; }
.totals .row { display: flex; justify-content: space-between; padding: 5px 0; font-weight: 700; color: var(--ink-soft); }
.totals .row.grand { font-family: var(--font-head); font-size: 20px; color: var(--berry); border-top: 2px dashed #cfe0d6; margin-top: 6px; padding-top: 12px; }

.field { margin: 12px 4px; }
.field label { display: block; font-weight: 800; margin-bottom: 6px; color: var(--berry); font-size: 14px; }
.field .hint { font-weight: 600; color: var(--ink-soft); font-size: 12px; margin-top: 6px; }
.input {
  width: 100%; padding: 15px 16px; border-radius: 14px; border: 2px solid #cbe3d5;
  background: #fff; font-size: 17px; font-weight: 700; color: var(--ink); outline: none; transition: .15s;
}
.input:focus { border-color: var(--strawberry); box-shadow: 0 0 0 4px #e4f0e9; }
.input.tel { letter-spacing: 1px; }

.btn-primary {
  width: 100%; background: linear-gradient(120deg, var(--strawberry), var(--strawberry-deep));
  color: #fff; font-weight: 800; font-size: 17px; padding: 16px; border-radius: 16px;
  box-shadow: var(--shadow); margin-top: 8px; transition: transform .1s, opacity .2s;
}
.btn-primary:active { transform: scale(0.985); }
.btn-primary:disabled { opacity: 0.55; }
.btn-ghost { width: 100%; padding: 14px; border-radius: 14px; font-weight: 800; color: var(--berry); background: #fff; box-shadow: var(--shadow-sm); margin-top: 10px; }

.error-msg { color: var(--danger); font-weight: 800; font-size: 14px; margin: 6px 4px; min-height: 18px; }

/* ---------- Payment methods ---------- */
.pay-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 8px 4px 4px; }
.pay-method {
  border: 2px solid #cbe3d5; background: #fff; border-radius: 14px; padding: 14px 6px; text-align: center;
  font-weight: 800; color: var(--berry); font-size: 13px; transition: .15s;
}
.pay-method .pm-ico { font-size: 24px; display: block; margin-bottom: 4px; }
.pay-method.sel { border-color: var(--strawberry); background: #eef6f1; box-shadow: 0 0 0 3px #e4f0e9; }
.mock-badge { display:inline-block; background:#eafff4; color:var(--good); font-weight:800; font-size:11px; padding:5px 10px; border-radius:999px; border:1px solid #b7eccd; }

/* ---------- Success / tracking ---------- */
.success-wrap { text-align: center; padding: 10px 6px; }
.success-cone { font-size: 74px; animation: pop .5s ease; }
@keyframes pop { 0% { transform: scale(0);} 70% { transform: scale(1.2);} 100% { transform: scale(1);} }
.order-code { font-family: var(--font-head); font-size: 30px; color: var(--berry); letter-spacing: 1px; }
.track-steps { display: flex; justify-content: space-between; margin: 22px 0; gap: 6px; }
.track-step { flex: 1; text-align: center; opacity: 0.4; transition: .3s; }
.track-step.on { opacity: 1; }
.track-step .ts-dot { width: 40px; height: 40px; margin: 0 auto 6px; border-radius: 50%; background: #e4f0e9; display: grid; place-content: center; font-size: 20px; border: 2px solid #bfd8cb; }
.track-step.on .ts-dot { background: var(--strawberry); border-color: var(--strawberry-deep); color:#fff; }
.track-step .ts-label { font-weight: 800; font-size: 12px; color: var(--berry); }

.empty-note { text-align: center; color: var(--ink-soft); font-weight: 700; padding: 40px 0; }

/* ============================================================
   KITCHEN screen
   ============================================================ */
.app-kitchen { background: #14231c; color: #fff; min-height: 100vh; }
.k-topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 14px;
  padding: 16px 22px; background: #1b2e24; border-bottom: 1px solid #24463a;
}
.k-topbar h1 { font-family: var(--font-head); font-size: 22px; margin: 0; }
.k-topbar .logo { font-size: 26px; flex: 0 0 auto; width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 50%; }
.k-topbar .logo .logo-img, .k-topbar .logo img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; display: block; box-shadow: var(--shadow-sm); }
.k-live { margin-left: auto; display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 13px; }
.k-live .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 rgba(47,174,102,.6); animation: pulse 1.6s infinite; }
.k-live .dot.off { background: var(--danger); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(47,174,102,.6);} 70% { box-shadow: 0 0 0 10px rgba(47,174,102,0);} 100% { box-shadow: 0 0 0 0 rgba(47,174,102,0);} }
.k-stat { background:#1f3529; padding:6px 12px; border-radius:999px; font-weight:800; font-size:13px; }

.k-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; padding: 20px 22px 60px; }
.ticket {
  background: #fff; color: var(--ink); border-radius: 18px; overflow: hidden;
  box-shadow: 0 12px 30px rgba(0,0,0,.35); display: flex; flex-direction: column;
  border-top: 6px solid var(--strawberry); animation: slidein .35s ease;
}
@keyframes slidein { from { opacity: 0; transform: translateY(-12px);} to { opacity:1; transform: none;} }
.ticket.status-preparing { border-top-color: var(--warn); }
.ticket.status-ready { border-top-color: var(--good); }
.ticket-head { display: flex; align-items: baseline; gap: 8px; padding: 14px 16px 8px; }
.ticket-code { font-family: var(--font-head); font-size: 20px; color: var(--berry); }
.ticket-table { margin-left: auto; font-weight: 800; background: #e4f0e9; color: var(--strawberry-deep); padding: 4px 10px; border-radius: 999px; font-size: 13px; }
.ticket-meta { padding: 0 16px 6px; color: var(--ink-soft); font-weight: 700; font-size: 13px; display:flex; gap:12px; }
.ticket-items { padding: 6px 16px 10px; }
.ti-line { display: flex; gap: 8px; padding: 6px 0; border-bottom: 1px dashed #dce9e1; font-weight: 700; }
.ti-qty { font-family: var(--font-head); color: var(--strawberry-deep); min-width: 30px; }
.ticket-foot { margin-top: auto; display: flex; gap: 8px; padding: 12px 16px; background: #f1f8f3; }
.k-btn { flex: 1; padding: 12px; border-radius: 12px; font-weight: 800; font-size: 14px; color: #fff; box-shadow: var(--shadow-sm); }
.k-btn.start { background: var(--warn); }
.k-btn.ready { background: var(--good); }
.k-btn.done { background: var(--berry); }
.k-btn.cancel { background: #fff; color: var(--danger); border: 2px solid #ffd6d7; flex: 0 0 auto; padding: 12px 14px; }
.k-age { font-weight: 800; }
.k-age.warn { color: var(--warn); }
.k-age.late { color: var(--danger); }
.k-empty { grid-column: 1/-1; text-align: center; color: #8fae9f; font-weight: 700; padding: 80px 0; font-size: 18px; }
.k-empty .big { font-size: 60px; display:block; margin-bottom: 10px; }

/* ============================================================
   ADMIN / QR screen
   ============================================================ */
.app-admin { background: linear-gradient(180deg, var(--cream), var(--cream-2)); min-height: 100vh; }
.admin-wrap { max-width: 900px; margin: 0 auto; padding: 26px 18px 80px; }
.admin-head { text-align: center; margin-bottom: 24px; }
.admin-head h1 { font-family: var(--font-head); color: var(--berry); font-size: 30px; margin: 6px 0; }
.admin-head p { color: var(--ink-soft); font-weight: 700; margin: 0; }
.admin-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 22px; align-items: start; }
@media (max-width: 720px) { .admin-grid { grid-template-columns: 1fr; } }
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; border: 1px solid #e4efe8; }
.card h3 { font-family: var(--font-head); color: var(--berry); margin: 0 0 14px; }
.qr-stage { background: linear-gradient(160deg,#fff,#eef6f1); border-radius: var(--radius); padding: 16px; display: grid; place-content: center; min-height: 340px; border: 2px dashed #cbe3d5; }
.qr-stage svg { width: 300px; height: auto; }
.links { display:flex; flex-wrap:wrap; gap:10px; margin-top:16px; }
.links a { text-decoration:none; }
.nav-links { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.nav-links a { text-decoration: none; font-weight: 800; color: var(--berry); background: #fff; padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow-sm); }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--berry); color: #fff; font-weight: 800; padding: 12px 20px; border-radius: 14px;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: .25s; z-index: 60;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================
   OWNER menu manager
   ============================================================ */
.mgr-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.mgr-top .btn-primary, .mgr-top .btn-ghost { width: auto; margin: 0; }
.mgr-cat { font-family: var(--font-head); color: var(--berry); font-size: 18px; margin: 20px 0 10px; display: flex; align-items: center; gap: 8px; }
.mgr-cat .cnt { font-family: var(--font-body); font-size: 12px; font-weight: 800; color: var(--ink-soft); background: #fff; padding: 3px 9px; border-radius: 999px; box-shadow: var(--shadow-sm); }
.mgr-item {
  display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #e4efe8;
  border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 10px; box-shadow: var(--shadow-sm);
}
.mgr-item.off { opacity: 0.55; }
.mgr-item .m-emoji { font-size: 28px; width: 48px; height: 48px; flex: 0 0 48px; display: grid; place-content: center; background: linear-gradient(160deg,#fff,#edf5ef); border-radius: 12px; }
.mgr-item .m-main { flex: 1; min-width: 0; }
.mgr-item .m-name { font-weight: 800; }
.mgr-item .m-sub { color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.mgr-item .m-price { font-family: var(--font-head); color: var(--strawberry-deep); font-weight: 800; margin-right: 4px; }
.mgr-item .m-btn { width: 38px; height: 38px; border-radius: 10px; display: grid; place-content: center; font-size: 16px; background: #f1f8f3; color: var(--berry); box-shadow: var(--shadow-sm); }
.mgr-item .m-btn.del { color: var(--danger); background: #fff; border: 1px solid #ffd6d7; }

/* availability toggle */
.toggle { position: relative; width: 46px; height: 26px; flex: 0 0 46px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle .track { position: absolute; inset: 0; background: #c7d9ce; border-radius: 999px; transition: .2s; cursor: pointer; }
.toggle .track::before { content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.toggle input:checked + .track { background: var(--good); }
.toggle input:checked + .track::before { transform: translateX(20px); }

.emoji-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.emoji-pick button { font-size: 22px; width: 40px; height: 40px; border-radius: 10px; background: #fff; box-shadow: var(--shadow-sm); }
.emoji-pick button.sel { background: #eef6f1; box-shadow: 0 0 0 2px var(--strawberry); }
.mgr-empty { text-align: center; color: var(--ink-soft); font-weight: 700; padding: 30px 0; }

/* ---------- Kitchen: store label + paid/unpaid badge ---------- */
.k-store { font-family: var(--font-body); font-weight: 800; font-size: 13px; color: var(--mint); opacity: .95; }
.ticket-pay { margin-left: auto; font-weight: 800; font-size: 11px; letter-spacing: .3px; padding: 4px 9px; border-radius: 999px; }
.ticket-pay.paid { background: #e7f6ef; color: #1c7a4a; border: 1px solid #b7eccd; }
.ticket-pay.unpaid { background: #fff3e0; color: #b3711a; border: 1px solid #f3d8a8; }

/* ============================================================
   Admin analytics dashboard
   ============================================================ */
.dash-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.dash-title { font-family: var(--font-head); color: var(--berry); font-size: 26px; margin: 0; }
.dash-sub { color: var(--ink-soft); font-weight: 800; margin: 2px 0 0; }
.dash-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dash-btn { width: auto !important; margin: 0 !important; padding: 9px 14px !important; font-size: 13px; }
.dash-filters { display: flex; gap: 10px; margin: 14px 0 18px; flex-wrap: wrap; }
.dash-filters .input { width: auto; flex: 1; min-width: 150px; padding: 11px 14px; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 640px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
.kpi { background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 16px; box-shadow: var(--shadow-sm); }
.kpi-label { color: var(--ink-soft); font-weight: 800; font-size: 13px; }
.kpi-value { font-family: var(--font-head); color: var(--berry); font-size: 28px; font-weight: 800; margin-top: 4px; }
.kpi-sub { color: var(--ink-soft); font-weight: 700; font-size: 12px; margin-top: 2px; }

.dash-card { background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 18px; box-shadow: var(--shadow-sm); margin-top: 14px; }
.dash-card h3 { font-family: var(--font-head); color: var(--berry); margin: 0 0 12px; font-size: 18px; }
.dash-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.dash-card-head h3 { margin: 0; }
.dash-exports { display: flex; gap: 8px; flex-wrap: wrap; }
.dash-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 720px) { .dash-2col { grid-template-columns: 1fr; } }

.split-bar { display: flex; height: 26px; border-radius: 999px; overflow: hidden; background: var(--tint); }
.split-cash { background: var(--vanilla); }
.split-online { background: var(--strawberry); }
.split-legend { display: flex; gap: 18px; margin-top: 10px; font-weight: 800; color: var(--ink); font-size: 14px; flex-wrap: wrap; }
.split-legend .dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 5px; }
.split-legend .dot.cash { background: var(--vanilla); }
.split-legend .dot.online { background: var(--strawberry); }

.bar-chart { width: 100%; height: auto; display: block; }
.dash-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.dash-table th { text-align: left; color: var(--ink-soft); font-size: 12px; font-weight: 800; padding: 6px 8px; border-bottom: 2px solid var(--line-soft); }
.dash-table td { padding: 8px; border-bottom: 1px solid var(--line-soft); font-weight: 700; }
.dash-table tr:last-child td { border-bottom: none; }
.dash-empty { color: var(--ink-soft); font-weight: 700; text-align: center; padding: 14px 0; }

/* ---------- Staff / kitchen sign-in ---------- */
.k-login { min-height: 60vh; display: grid; place-content: center; padding: 30px 16px; }
.k-login-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px 26px; width: min(360px, 92vw); text-align: center; }
.k-login-card h2 { font-family: var(--font-head); color: var(--berry); margin: 10px 0 4px; }
.k-login-card p { color: var(--ink-soft); font-weight: 700; margin: 0 0 14px; }
.k-login-card .input { margin-bottom: 10px; }
.app-kitchen .k-login-card { color: var(--ink); }

/* ---------- "Order ready" alarm banner ---------- */
.ready-banner { position: fixed; inset: 0; z-index: 80; background: rgba(20,40,30,0.55); backdrop-filter: blur(4px); display: grid; place-content: center; padding: 20px; animation: rbIn .25s ease; }
@keyframes rbIn { from { opacity: 0; } to { opacity: 1; } }
.rb-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 30px 26px; text-align: center; width: min(360px, 92vw); }
.rb-emoji { font-size: 64px; animation: bob 1s ease-in-out infinite; }
.rb-title { font-family: var(--font-head); color: var(--berry); font-size: 24px; margin-top: 6px; }
.rb-no { font-family: var(--font-head); font-size: 34px; font-weight: 800; color: var(--strawberry-deep); letter-spacing: 1px; margin: 8px 0; }
.rb-sub { color: var(--ink-soft); font-weight: 700; margin-bottom: 16px; }

.k-navlink { color: var(--mint); font-weight: 800; font-size: 13px; text-decoration: none; background: rgba(255,255,255,0.08); padding: 7px 12px; border-radius: 10px; }
.k-navlink:hover { background: rgba(255,255,255,0.16); }

.dash-links { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 0; }
.dash-links a { text-decoration: none; font-weight: 800; font-size: 13px; color: var(--berry); background: #fff; border: 1px solid var(--line-soft); padding: 8px 12px; border-radius: 10px; box-shadow: var(--shadow-sm); }

/* ---------- Push notify note/button ---------- */
.notify-note { background: var(--tint); color: var(--berry); font-weight: 800; font-size: 13px; text-align: center; padding: 12px; border-radius: 12px; margin-bottom: 10px; }
.btn-ghost.notify-on { color: #1c7a4a; background: #e7f6ef; }

/* ---------- Full-page "turn on alerts" prompt ---------- */
.notify-pop { position: fixed; inset: 0; z-index: 85; background: rgba(20,40,30,0.62); backdrop-filter: blur(5px); display: grid; place-content: center; padding: 22px; animation: rbIn .22s ease; }
.np-card { background: #fff; border-radius: 26px; box-shadow: var(--shadow-lg); padding: 30px 24px; width: min(400px, 94vw); text-align: center; }
.np-emoji { font-size: 60px; line-height: 1; animation: bob 1.3s ease-in-out infinite; }
.np-title { font-family: var(--font-head); color: var(--berry); font-size: 23px; margin: 10px 0 6px; }
.np-text { color: var(--ink); font-weight: 700; margin: 0 0 16px; font-size: 15px; }
.np-btn { font-size: 18px; padding: 17px; }
.np-tips { text-align: left; margin: 16px 0 6px; display: grid; gap: 8px; }
.np-tip { background: var(--tint); color: var(--ink); font-weight: 700; font-size: 13px; padding: 11px 13px; border-radius: 12px; line-height: 1.4; }
.np-skip { margin-top: 12px; }

/* ---------- My Orders (history, stored on-device) ---------- */
.top-right { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: 0 0 auto; }
.orders-chip { font-weight: 800; font-size: 12px; color: var(--berry); background: #fff; border: 1px solid var(--line); padding: 6px 11px; border-radius: 999px; box-shadow: var(--shadow-sm); white-space: nowrap; }
.hist-item { background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 10px; box-shadow: var(--shadow-sm); }
.hist-head { display: flex; align-items: center; gap: 8px; }
.hist-no { font-family: var(--font-head); font-weight: 800; color: var(--berry); font-size: 17px; }
.hist-when { margin-left: auto; color: var(--ink-soft); font-weight: 700; font-size: 12px; }
.hist-status { font-weight: 800; font-size: 11px; padding: 3px 9px; border-radius: 999px; background: var(--tint); color: var(--strawberry-deep); }
.hist-status.st-ready { background: #e7f6ef; color: #1c7a4a; }
.hist-status.st-preparing { background: #fff3e0; color: #b3711a; }
.hist-status.st-completed { background: var(--tint-2); color: var(--ink-soft); }
.hist-status.st-cancelled { background: #ffecec; color: var(--danger); }
.hist-lines { color: var(--ink); font-weight: 700; font-size: 14px; margin: 8px 0; line-height: 1.4; }
.hist-foot { display: flex; align-items: center; gap: 10px; }
.hist-total { font-family: var(--font-head); font-weight: 800; color: var(--strawberry-deep); }
.hist-store { color: var(--ink-soft); font-weight: 700; font-size: 12px; }
.hist-reorder { margin-left: auto; font-weight: 800; font-size: 13px; color: #fff; background: var(--strawberry); padding: 9px 14px; border-radius: 10px; box-shadow: var(--shadow-sm); }

.np-ok { background: #e7f6ef; color: #1c7a4a; font-weight: 800; font-size: 14px; padding: 12px; border-radius: 12px; margin-bottom: 4px; }
.np-warn { background: #fff3e0; color: #b3711a; border: 1px solid #f3d8a8; font-weight: 800; font-size: 13px; padding: 12px; border-radius: 12px; margin-bottom: 4px; line-height: 1.4; }
.np-skip-link { background: none; border: none; color: var(--ink-soft); font-weight: 700; font-size: 13px; text-decoration: underline; cursor: pointer; margin-top: 14px; }
.track-keepopen { background: #fff6e6; border: 1px solid #f3d8a8; color: #8a5a12; font-weight: 800; font-size: 13px; padding: 12px 14px; border-radius: 14px; margin: 14px 0 4px; text-align: center; line-height: 1.45; }
.np-test { border: 2px solid var(--strawberry); color: var(--strawberry-deep); }
