:root {
  --brand-orange: #f38321;
  --brand-orange-dark: #d96b0c;
  --brand-orange-soft: #fff3e6;
  --green: #246a34;
  --green-mid: #3b7e31;
  --green-bright: #8ec63d;
  --green-soft: #eef7eb;
  --cream: #faf8f3;
  --surface: #ffffff;
  --ink: #1b241d;
  --muted: #5a665d;
  --line: #e4dfd3;
  --gold: #f38321;
  --gold-soft: #fff3e6;
  --amber: #d97706;
  --amber-soft: #fef3c7;
  --red: #b42318;
  --red-soft: #fee4e2;
  --radius: 14px;
  --topbar-h: 58px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
body.sheet-open {
  overflow: hidden;
}

h1, h2, .cat-section-header h2, .footer-tagline {
  font-family: "Roboto Slab", Georgia, serif;
}

button, a, select, input, label {
  touch-action: manipulation;
}

/* Official Banana Leaf @ Saigon White Brand Header + Saffron/Leaf Accent Bar */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  background: #ffffff;
  color: var(--ink);
  position: sticky;
  top: 0;
  z-index: 50;
  flex-wrap: wrap;
  border-top: 4px solid var(--brand-orange);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 12px rgba(27, 36, 29, 0.07);
}
.topbar::after {
  content: "";
  position: absolute;
  top: -4px;
  right: 0;
  width: 42%;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-orange) 0%, var(--green-bright) 50%, var(--green) 100%);
  pointer-events: none;
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}
.brand-logo {
  height: 44px;
  width: auto;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}
.brand-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  border-left: 1.5px solid var(--line);
  padding-left: 10px;
}
.brand-meta small {
  color: var(--green);
  font-weight: 700;
  font-size: 12px;
  display: block;
}
.brand-hours {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}
.topbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.lang { display: flex; gap: 4px; }
.lang button {
  background: #f5f3ed;
  border: 1px solid var(--line);
  color: var(--green);
  border-radius: 999px;
  padding: 5px 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
  transition: all 0.15s ease;
}
.lang button.active {
  background: var(--brand-orange);
  color: #fff;
  border-color: var(--brand-orange);
}

.mobile-lang-wrap { display: none; margin: 0; }
.mobile-lang-select {
  background: var(--green-soft);
  color: var(--green);
  border: 1.5px solid #cde3c6;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 15px;
  font-weight: 700;
  width: auto;
  cursor: pointer;
}
.mobile-lang-select option { color: var(--ink); background: #fff; }

.views { display: flex; gap: 4px; }
.views a {
  color: var(--green);
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.views a.active, .views a:hover {
  background: var(--brand-orange);
  color: #fff;
}

.sample-banner {
  margin: 0;
  padding: 10px 16px;
  background: #fff3cd;
  border-bottom: 1px solid #e6c87a;
  font-size: 13px;
  text-align: center;
}
.late-night-banner {
  margin: 0;
  padding: 9px 14px;
  background: var(--brand-orange-soft);
  border-bottom: 1px solid #f7c997;
  color: #8a4300;
  font-size: 13px;
  text-align: center;
}

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 12px calc(115px + var(--safe-bottom));
}
h1 { font-size: 24px; margin: 8px 0 12px; }
h2 { font-size: 18px; margin: 18px 0 10px; }
h3 { font-size: 16px; margin: 0; }
.muted { color: var(--muted); font-size: 13px; margin: 4px 0; }
.error { color: var(--red); font-weight: 700; font-size: 14px; }
.hidden { display: none !important; }

/* Table Context & 3-Button Service Bar */
.table-context-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 11px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}
.table-context-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.table-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--green-soft);
  color: var(--green);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13.5px;
}
.link-btn {
  background: transparent;
  border: 0;
  color: var(--green-mid);
  text-decoration: underline;
  font-size: 12.5px;
  cursor: pointer;
  padding: 2px 6px;
  font-weight: 600;
}
.service-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.service-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 40px;
  padding: 7px 6px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fdfcf9;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  line-height: 1.2;
  transition: transform 0.1s ease, background 0.15s ease;
}
.service-btn:active { transform: scale(0.96); background: var(--green-soft); }
.service-btn.bill { background: var(--gold-soft); border-color: #ebd08c; color: #7a5200; }

/* Shared Table Running Tab */
.shared-tab-banner {
  background: #eff8f2;
  border: 1px solid #b8dec6;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

/* Search & Dietary Filter Bar */
.search-filter-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 6px 0;
}
.search-wrap {
  position: relative;
  flex: 1 1 260px;
}
.search-wrap input {
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: #fff;
  font-size: 16px; /* 16px prevents iOS Safari forced auto-zoom */
  padding: 10px 38px 10px 15px;
}
.search-wrap input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(20, 83, 52, 0.12);
}
.search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: #e7e5df;
  color: var(--ink);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 13px;
  cursor: pointer;
}
.diet-chips {
  margin: 0 !important;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 100%;
}
.diet-chips::-webkit-scrollbar { display: none; }
.diet-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.diet-dot.veg { background: #16a34a; box-shadow: 0 0 0 2px #dcfce7; }
.diet-dot.non-veg { background: #dc2626; box-shadow: 0 0 0 2px #fee2e2; }

/* Sticky Smart Category & Sub-Category Bars */
.sticky-nav-wrap {
  position: sticky;
  top: var(--topbar-h, 52px);
  z-index: 35;
  background: rgba(248, 246, 240, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 6px 12px 7px;
  margin: 0 -12px;
  border-bottom: 1px solid var(--line);
}
.cat-bar-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cat-grid-trigger {
  flex-shrink: 0;
  width: 38px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 17px;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.cat-grid-trigger:active { transform: scale(0.95); background: var(--green-soft); }

.chips {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 6px 0;
}
.cat-scroll, .subcat-scroll, .upsell-scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
  margin: 2px 0;
  flex: 1;
}
.cat-scroll::-webkit-scrollbar, .subcat-scroll::-webkit-scrollbar, .upsell-scroll::-webkit-scrollbar { display: none; }

.chip {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 8px 13px;
  min-height: 36px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--ink);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.chip:active { transform: scale(0.97); }
.chip.active {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
  box-shadow: 0 2px 6px rgba(36, 106, 52, 0.22);
}
.cat-scroll .chip.active {
  background: var(--brand-orange);
  color: #fff;
  border-color: var(--brand-orange);
  box-shadow: 0 2px 8px rgba(243, 131, 33, 0.3);
}
.chip .count {
  font-size: 11px;
  opacity: 0.85;
  font-weight: 500;
}
.subcat-scroll { margin-top: 5px; }
.subcat-scroll .chip {
  padding: 6px 12px;
  min-height: 32px;
  font-size: 12.5px;
  background: #f2efe7;
}
.subcat-scroll .chip.active {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.cat-section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
  margin: 12px 0 8px;
  padding: 0 2px;
  scroll-margin-top: 130px;
}
.cat-section-header h2 { margin: 0; font-size: 17.5px; color: var(--green); }
.cat-section-header span { font-size: 12px; color: var(--muted); }

/* Compact GrabFood-Style Dish Grid & Cards */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 10px;
}
.dish {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.dish.in-cart {
  border-color: var(--green);
  background: #fbfefb;
  box-shadow: 0 2px 10px rgba(20, 83, 52, 0.08);
}
.dish-main {
  display: flex;
  gap: 11px;
  align-items: flex-start;
}
.dish-tap-preview {
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
}
.dish-photo {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 11px;
  display: block;
  background: #f0ede4;
}
.tile {
  width: 90px;
  height: 90px;
  border-radius: 11px;
  background: var(--green-mid);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 800;
  flex-shrink: 0;
}
.dish-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.dish-badges {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  align-items: center;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--green-soft);
  color: var(--green);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
}
.tag.pop { background: var(--gold-soft); color: #8c5e00; border: 1px solid #f2d488; }
.tag.special { background: #fce7f3; color: #9d174d; }
.tag.veg-tag { background: #dcfce7; color: #166534; }
.tag.nonveg-tag { background: #fee2e2; color: #991b1b; }

.dish-title-btn {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  text-align: left;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  cursor: pointer;
}
.dish-desc {
  color: var(--muted);
  font-size: 12.5px;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dish-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
.price {
  font-weight: 800;
  color: var(--green);
  font-size: 15.5px;
}
.dish-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cust-btn {
  background: #f9f8f4;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
  min-height: 36px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.cust-btn.open { border-color: var(--green); color: var(--green); background: var(--green-soft); }

.add-pill {
  background: var(--green);
  color: #fff;
  border: 0;
  border-radius: 999px;
  min-height: 38px;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.1s ease;
}
.add-pill:active { transform: scale(0.95); }

.qty-stepper {
  display: inline-flex;
  align-items: center;
  background: var(--green);
  color: #fff;
  border-radius: 999px;
  min-height: 38px;
  overflow: hidden;
}
.qty-stepper button {
  background: transparent;
  border: 0;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  width: 36px;
  height: 38px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.qty-stepper button:active { background: rgba(255, 255, 255, 0.2); }
.qty-stepper span {
  font-size: 13.5px;
  font-weight: 800;
  min-width: 20px;
  text-align: center;
}

/* Collapsible Dish Customize Panel */
.dish-customizer {
  border-top: 1px dashed var(--line);
  margin-top: 2px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #faf9f5;
  padding: 10px;
  border-radius: 10px;
}
.dish-customizer .row { display: flex; gap: 8px; }
.dish-customizer .row > * { flex: 1; }
.extras-wrap { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.extras-wrap label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.extras-wrap input[type="checkbox"] { width: 18px; height: 18px; margin: 0; }

/* Forms & General Buttons */
.controls, .formgrid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: end;
  margin: 8px 0;
}
input, select, textarea {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 16px; /* Prevents iOS Safari forced zoom */
  background: #fff;
  width: 100%;
}
label { font-size: 13px; font-weight: 600; display: grid; gap: 4px; }
.inline-label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.inline-label select { width: auto; }
.inline-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; cursor: pointer; }
.inline-check input { width: 18px; height: 18px; margin: 0; }

.btn {
  background: var(--green);
  color: #fff;
  border: 0;
  border-radius: 11px;
  min-height: 40px;
  padding: 10px 16px;
  font-size: 14px;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn:active { transform: scale(0.98); }
.btn.secondary {
  background: #fff;
  color: var(--green);
  border: 1px solid var(--green);
}
.btn.gold { background: var(--gold); color: #fff; }
.btn.danger { background: var(--red-soft); color: var(--red); border: 1px solid #f5b6b1; }
.btn.sm { min-height: 34px; padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px;
  margin: 12px 0;
}

/* Tracker, Quick Refill & Post-Meal Review */
.tracker-card { border: 2px solid var(--green); background: #f8fcf9; }
.tracker-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.tracker-header h2 { margin: 0; }
.steps { display: flex; gap: 6px; list-style: none; padding: 0; flex-wrap: wrap; margin: 10px 0; }
.steps li { padding: 5px 11px; border-radius: 999px; background: #e8e5dc; font-size: 12.5px; font-weight: 700; }
.steps li.done { background: var(--green); color: #fff; }
.steps li.cancelled { background: var(--red); color: #fff; }
.tracker-item-list { margin: 8px 0; padding-left: 18px; font-size: 13.5px; }
.quick-refill {
  background: #fff;
  border: 1px dashed var(--green);
  border-radius: 11px;
  padding: 9px 12px;
  margin-top: 10px;
}
.quick-refill-title { font-size: 12.5px; font-weight: 700; color: var(--green); margin-bottom: 4px; }
.celebration-box {
  background: var(--gold-soft);
  border: 1px solid #ebd08c;
  border-radius: 12px;
  padding: 14px;
  margin-top: 12px;
}
.celebration-box h3 { margin: 0 0 4px; color: #6e4800; }
.celebration-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* Native-Style Bottom Sheets (Cart, Category Quick-Jump, Dish Preview) */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(14, 24, 18, 0.52);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 55;
}
.bottom-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  max-width: 640px;
  margin: 0 auto;
  max-height: 88vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  padding: 10px 16px calc(18px + var(--safe-bottom));
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.28);
}
.sheet-handle {
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: #d4d0c5;
  margin: 2px auto 10px;
}

/* Visual 2-Column Category Quick-Jump Sheet */
.cat-sheet-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.cat-sheet-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #faf9f5;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.cat-sheet-btn.active {
  background: var(--green-soft);
  border-color: var(--green);
  color: var(--green);
}

/* Dish Detail Modal Sheet */
.dish-modal-photo {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 10px;
  display: block;
}

/* Floating Cart Bar */
.cartbar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + var(--safe-bottom));
  z-index: 45;
  max-width: 600px;
  margin: 0 auto;
}
.cart-open-btn {
  min-height: 50px;
  padding: 13px 20px;
  font-size: 16px;
  border-radius: 999px;
  box-shadow: 0 8px 28px rgba(16, 69, 43, 0.38);
}
.cart-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}
.cart-drawer-head h2 { margin: 0; }
.cart-list {
  list-style: none;
  padding: 0;
  margin: 10px 0;
}
.cart-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid #f0ede4;
  font-size: 14px;
}
.upsell-box {
  background: var(--gold-soft);
  border: 1px solid #ebd08c;
  border-radius: 11px;
  padding: 10px 12px;
  margin: 10px 0;
}
.upsell-title { font-size: 12.5px; font-weight: 800; color: #785000; margin-bottom: 4px; }
.cart-footer { display: flex; flex-direction: column; gap: 10px; }
.cart-total-line { font-size: 17px; margin: 4px 0; }
.send-order-btn { min-height: 48px; padding: 13px; font-size: 16px; }

/* Counter & Kitchen Live Board */
.counter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.counter-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.waiter-alert {
  margin: 12px 0;
  padding: 14px 16px;
  background: var(--red);
  color: #fff;
  border-radius: 12px;
  font-weight: 800;
  font-size: 16px;
  animation: pulseAlert 1.5s infinite;
}
@keyframes pulseAlert {
  0%, 100% { box-shadow: 0 0 0 0 rgba(180, 35, 24, 0.45); }
  50% { box-shadow: 0 0 0 8px rgba(180, 35, 24, 0); }
}

/* Live 10-Table Floor Map */
.floor-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.floor-head h2 { margin: 0 0 8px; }
.floor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 8px;
  margin-top: 6px;
}
.floor-tile {
  border: 1.5px solid var(--line);
  border-radius: 11px;
  padding: 9px 10px;
  background: #faf9f5;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}
.floor-tile.free { opacity: 0.72; }
.floor-tile.occupied { background: var(--amber-soft); border-color: #f59e0b; }
.floor-tile.urgent { background: var(--red-soft); border-color: var(--red); animation: pulseAlert 1.6s infinite; }
.floor-tile-top { display: flex; justify-content: space-between; font-weight: 800; font-size: 13.5px; }
.floor-tile-sub { font-size: 12px; color: var(--ink); margin-top: 3px; }
.table-bill-modal {
  margin-top: 12px;
  padding: 12px 14px;
  background: #fffdf7;
  border: 2px solid var(--green);
  border-radius: 12px;
}

.call-list { list-style: none; padding: 0; display: grid; gap: 8px; }
.call-list li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--red);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 12px;
}
.col {
  background: #f2efe6;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
}
.col h3 { margin: 0 0 8px; font-size: 15px; display: flex; justify-content: space-between; }
.order-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px;
  margin: 8px 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.order-card.overdue-warn { border-left: 4px solid var(--amber); }
.order-card.overdue-crit { border-left: 4px solid var(--red); background: #fffbfa; }
.order-head { display: flex; justify-content: space-between; align-items: center; gap: 6px; flex-wrap: wrap; }
.timer-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
}
.timer-badge.warn { background: var(--amber-soft); color: #92400e; }
.timer-badge.crit { background: var(--red-soft); color: var(--red); }

.station-group {
  margin: 6px 0;
  padding: 6px 8px;
  border-radius: 8px;
  background: #f8f6f0;
  font-size: 13px;
}
.station-group.drinks { background: #eff6ff; border: 1px solid #bfdbfe; }
.station-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 3px; color: var(--muted); }
.station-group ul { list-style: none; padding: 0; margin: 0; }
.station-group li { margin: 4px 0; display: flex; align-items: flex-start; gap: 6px; }
.station-group input[type="checkbox"] { width: 17px; height: 17px; margin-top: 2px; }
.order-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

.filter-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.filter-row input[type="search"] { flex: 1 1 260px; }
.compact-item-list {
  list-style: none;
  padding: 0;
  max-height: 360px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}
.compact-item-list li {
  padding: 8px 12px;
  border-bottom: 1px solid #f0ede4;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13.5px;
}

/* Admin Analytics */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.stat-box {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px 12px;
}
.stat-box small { color: var(--muted); font-size: 12px; display: block; }
.stat-box strong { font-size: 19px; color: var(--green); }
.top-dishes-box { font-size: 13px; }

/* Official Banana Leaf @ Saigon Restaurant Footer (matches bananaleafsaigon.vn) */
.brand-footer {
  margin-top: 28px;
  background: var(--green-mid);
  border-top: 5px solid var(--brand-orange);
  border-radius: 16px;
  padding: 20px 16px;
  color: #fff;
}
.brand-footer-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  margin-bottom: 14px;
}
.footer-logo-pill {
  background: #ffffff;
  padding: 8px 18px;
  border-radius: 14px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.14);
}
.footer-logo-pill img {
  height: 48px;
  width: auto;
  display: block;
}
.footer-tagline {
  margin: 0;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.94);
  max-width: 520px;
}
.footer-branches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.footer-branch-card {
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12.5px;
}
.footer-branch-card strong {
  font-size: 13.5px;
  color: #ffe2bd;
}
.footer-branch-card a {
  color: #fff;
  text-decoration: none;
  opacity: 0.94;
}
.footer-branch-card a:hover { text-decoration: underline; }
.footer-phone {
  font-weight: 700;
  color: #fff !important;
  margin-top: 2px;
}
.footer-hours {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 12.5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 12px;
  text-align: center;
}
.footer-socials {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
}
.footer-socials a {
  background: #ffffff;
  color: var(--green);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 11px;
  border-radius: 999px;
}
.footer-socials a:hover {
  background: var(--brand-orange);
  color: #fff;
}
.footer-staff-links {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  text-align: center;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.78);
}
.footer-staff-links a {
  color: #fff;
  text-decoration: underline;
  margin: 0 3px;
}

/* Docket & QR Print */
.docket {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  max-width: 320px;
  margin: 14px auto;
  font-family: ui-monospace, Menlo, monospace;
}
.docket-brand { text-align: center; margin-bottom: 6px; }
.docket-logo { height: 52px; width: auto; }
.docket-sub { font-size: 11.5px; text-align: center; margin: 2px 0 8px; color: #333; }
.docket h1 { font-size: 20px; text-align: center; margin: 0 0 8px; }
.docket ul { list-style: none; padding: 0; }
.docket li { margin: 6px 0; }
.docket-actions { text-align: center; }

.qrgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 16px;
  margin-top: 14px;
}
.qrcard {
  background: #fff;
  border: 2px solid var(--green-mid);
  border-top: 6px solid var(--brand-orange);
  border-radius: 14px;
  padding: 14px 12px;
  text-align: center;
  break-inside: avoid;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.qrcard .qr-logo {
  height: 46px;
  width: auto;
  object-fit: contain;
}
.qr-table-pill {
  background: var(--green);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  padding: 4px 14px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.qr-code-img { width: 176px; height: 176px; display: block; margin: 2px auto; }
.qr-scan-cta {
  font-size: 12px;
  font-weight: 800;
  color: var(--brand-orange-dark);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.qr-branch-line {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.3;
}
.qrcard code { word-break: break-all; font-size: 10px; color: #666; }
.formgrid > * { flex: 1; min-width: 180px; }
.formgrid .wide { flex-basis: 100%; }

.toast {
  position: fixed;
  top: calc(var(--topbar-h, 58px) + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  z-index: 75;
  font-weight: 600;
  font-size: 13.5px;
  max-width: 92vw;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* Print Rules: Supports BOTH 80mm Docket Printing AND QR Table Card Sheet Printing */
@media print {
  .topbar, .sample-banner, .late-night-banner, .views, .cartbar, .bottom-sheet, .sheet-backdrop, .toast, button, .controls, .qr-hint, .docket-actions, .brand-footer {
    display: none !important;
  }
  body { background: #fff; overflow: visible !important; }
  main { padding: 0; max-width: 100%; }
  body[data-view="docket"] .view { display: none !important; }
  body[data-view="docket"] #view-docket { display: block !important; }
  body[data-view="docket"] .docket { border: 0; max-width: 80mm; padding: 0; margin: 0; }
  body[data-view="qr"] .view { display: none !important; }
  body[data-view="qr"] #view-qr { display: block !important; }
  body[data-view="qr"] .qrgrid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}

/* Mobile-Specific Optimizations (Phones <= 640px) */
@media (max-width: 640px) {
  h1 { font-size: 20px; }
  .menu-grid { grid-template-columns: 1fr; gap: 9px; }
  .brand-logo { height: 40px; }
  .brand-meta { display: none; }
  .desktop-lang { display: none; }
  .mobile-lang-wrap { display: block; }
  /* Hide staff nav from topbar on guest mobile phones so logo + language pill stay clean */
  body[data-view="guest"] #staff-nav { display: none; }
  .service-btn { font-size: 12px; padding: 7px 4px; }
  .cat-sheet-grid { grid-template-columns: 1fr 1fr; }
}
