/* Shared palette for restaurant workspaces. Status colours are reserved for service state. */
:root {
  color-scheme: light;
  --paper: #fff;
  --ink: #202322;
  --muted: #575e5b;
  --line: #d9ddda;
  --forest: #242a27;
  --deep: #202522;
  --mint: #f0f2f0;
  --gold: #696e6a;
  --surface-subtle: #f7f8f7;
  --display: var(--ui, -apple-system, system-ui, sans-serif);
}
body { background: white; color: var(--ink); }
/* The emulator's fixed informational banner shares the bottom edge with the guest dock. */
.firebase-emulator-warning { pointer-events: none; }
body:has(.firebase-emulator-warning) .guest-menu [data-testid="customer-orders-dock"] { margin-bottom: 38px; }
:where(button,a,input,textarea,select):focus-visible { outline: 3px solid #315e99; outline-offset: 2px; }
.access-page, .workspace-home, .station-picker, .service-floor, .kitchen-board, .owner-console,
body:has(#setup), body:has(.dining-entry) { background: #fff !important; color: var(--ink); }
.access-mark, .login-photo .access-mark, .station-heading .access-mark { background: var(--ink); box-shadow: none; }
.access-mark::after, .brand-home::before { background: linear-gradient(90deg,#fff 22%,transparent 22% 38%,#fff 38% 62%,transparent 62% 78%,#fff 78%); }
.access-page { padding: clamp(18px,4vw,52px); }
.login-shell { display: block; width: min(100%,460px); min-height: auto; border: 1px solid var(--line); border-radius: 12px; box-shadow: none; background: white; }
.login-photo { min-height: auto; background: white; color: var(--ink); padding: 28px 32px 0; }
.access-card { padding: 26px 32px 30px; }
.access-card h1, .workspace-heading h1, #setup :is(.signup-intro,.assistant-heading) h1, .station-heading h1 {
  color: var(--ink); font-family: var(--ui); font-weight: 650; letter-spacing: -.045em;
}
.access-card .access-primary, #setup .primary { background: var(--ink); border-color: var(--ink); color: white; }
.access-card .access-primary:hover:enabled, #setup .primary:hover:enabled { background: #404642; }
body:has(#setup)>header, .workspace-bar, .service-bar {
  background: white !important; color: var(--ink) !important; border-bottom: 1px solid var(--line);
}
body:has(#setup)>header a, .workspace-bar .access-brand, .staff-session, .service-bar h1 { color: var(--ink) !important; }
body:has(#setup)>header>span, .service-bar p { color: var(--muted) !important; opacity: 1 !important; }
.workspace-bar button, .setup-sign-out, .service-tools button, .owner-console>.service-bar>button, .station-picker>button {
  background: white !important; border: 1px solid var(--line) !important; color: var(--ink) !important; box-shadow: none !important;
}
.service-bar .brand-home { background: var(--ink) !important; border: 0 !important; }
.workspace-action, #setup .panel, .assistant-panel, .station-options>button, .bill-sheet, .receipt-sheet { border-color: var(--line); box-shadow: none; }
.workspace-icon, .workspace-counts span, .workspace-count, .workspace-settings, .workspace-action:hover,
.station-options>button:hover { background: var(--surface-subtle) !important; color: var(--ink); }
.owner-assistant-entry { background: var(--surface-subtle); color: var(--ink); border: 1px solid var(--line); }
.owner-assistant-entry:hover { background: var(--mint); }
.signup-intro, .assistant-heading { color: var(--ink); background: var(--surface-subtle); }
.signup-intro::after, .assistant-heading::after { content: none; }
#setup .signup-intro h1, #setup .assistant-heading h1, .assistant-heading .access-brand { color: var(--ink); }
.signup-intro>p, .assistant-heading>p { color: var(--muted); }
.assistant-heading { padding-bottom: clamp(22px,4vw,50px); }
#setup :is(.intake,.review,.owner-report,.chat p,.signup input[readonly]) { background: var(--surface-subtle); border-color: var(--line); color: var(--ink); }
#setup .chat p.user, #setup nav [aria-current=step] { color: var(--ink); background: #e9ece9; }
#setup .intake-file, #setup .owner-shortcuts button, #setup .owner-workspace-link { background: #fff; color: var(--ink); border-color: #adb4ae; }
.station-picker .station-heading h1 { color: var(--ink) !important; }
.station-picker .station-heading p { color: var(--muted) !important; }
.station-options>button { color: var(--ink) !important; background: white !important; border: 1px solid var(--line) !important; }
.station-options>button :is(small,p) { color: var(--muted) !important; }
.kitchen-tabs button, .owner-tabs button { background: #fff !important; color: var(--muted) !important; border: 1px solid var(--line) !important; box-shadow: none !important; }
:is(.kitchen-tabs,.owner-tabs) button[aria-pressed=true] { background: var(--ink) !important; color: white !important; border-color: var(--ink) !important; }
.kitchen-ticket { color: var(--ink); background: white !important; border-color: var(--line) !important; border-top-color: #747e76 !important; }
.kitchen-ticket[data-waiting=true] { border-top-color: #aa7210 !important; }
.kitchen-ticket[data-urgent=true] { border-top-color: #b4392e !important; }
.ticket-heading { background: var(--surface-subtle); color: var(--ink); border-color: var(--line); }
.ticket-actions>button:enabled, .kitchen-ticket button[aria-label^="Mark "] { color: white !important; background: var(--ink) !important; }
.ticket-actions>button:first-child:not(:last-child) { color: var(--ink) !important; background: var(--mint) !important; }
.pos-loading { min-height: 100svh; display: grid; place-items: center; background: var(--paper); color: var(--muted); font: 400 16px/1.5 var(--ui); }
.kitchen-history, .kitchen-pickup-prompt { background: white; color: var(--ink); padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.kitchen-pickup-prompt { width: min(360px,100%); padding: 24px; text-align: center; }
.kitchen-pickup-prompt button { color: var(--ink) !important; background: white !important; border: 1px solid var(--line) !important; }
.kitchen-pickup-prompt button:last-child { color: white !important; background: var(--ink) !important; border-color: var(--ink) !important; }
.owner-metric-card { background: white; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.owner-metrics>div:first-child { background: white !important; color: var(--ink) !important; }
.owner-metrics>div { box-shadow: none !important; }
.service-floor .foh-floor-plan { background: var(--surface-subtle) !important; border: 1px solid var(--line) !important; box-shadow: none !important; }
.floor-table[data-status=empty] { background: white !important; border: 1px solid #b8bfb9 !important; color: #424a45 !important; }
.floor-table[data-status=new] { background: #fff6de !important; color: #694206 !important; border-color: #c39645 !important; }
.floor-table[data-status=served] { background: #edf5ef !important; color: #295638 !important; border-color: #9dbba5 !important; }
.service-floor :is(.bill-heading,.bill-sheet,.receipt-overlay>div,[data-testid="foh-payment-modal"]>div) { background: white !important; color: var(--ink); border-color: var(--line); }
.service-floor :is([data-testid="foh-payment-modal"],[data-testid="foh-payment-confirm-modal"]) button[aria-pressed=true] { background: var(--ink) !important; color: white !important; border-color: var(--ink) !important; }

.service-floor :is([data-testid="foh-open-payment"],[data-testid="foh-payment-complete"],.receipt-print):enabled { color: white !important; background: var(--ink) !important; }
.service-floor .receipt-overlay>div>button:last-child:enabled { color: var(--ink) !important; background: white !important; border: 1px solid var(--line) !important; }

/* QR menu, cart and confirmation. Keep the same light canvas in dark device mode. */
.guest-menu:is(.guest-menu-light,.customer-playful) { background: #fff !important; color: var(--ink); animation: none; }
.guest-menu:is(.guest-menu-light,.customer-playful) .customer-compact-header,
.guest-menu:is(.guest-menu-light,.customer-playful) .category-nav {
  background: white !important; color: var(--ink) !important; border: 0 !important; border-bottom: 1px solid var(--line) !important;
  box-shadow: none !important; border-radius: 0 !important; backdrop-filter: none;
}
.guest-menu .customer-compact-header { padding: 15px max(20px,calc((100% - 700px)/2)) !important; }
.guest-store-name { font: 650 22px/1.18 var(--ui); letter-spacing: -.045em; }
.guest-menu [data-testid="customer-tier-label"] { color: var(--muted); opacity: 1 !important; margin-top: 3px; }
.guest-menu .customer-language-toolbar>button { background: #fff !important; color: var(--ink) !important; border: 1px solid var(--line) !important; box-shadow: none; }
.guest-menu:is(.guest-menu-light,.customer-playful) .category-nav { padding: 0 !important; }
.guest-menu:is(.guest-menu-light,.customer-playful) .category-item {
  border: 0 !important; border-bottom: 2px solid transparent !important; border-radius: 0 !important; box-shadow: none !important;
  background: white !important; color: var(--muted) !important; min-height: 46px;
}
.guest-menu:is(.guest-menu-light,.customer-playful) .category-item.active { color: var(--ink) !important; border-bottom-color: var(--ink) !important; background: white !important; }
.dining-entry, .dining-choice, .dining-entry .dining-meal, .dining-entry .dining-meal:nth-child(2) { background: white; color: var(--ink); box-shadow: none; }
.dining-entry .dining-meal { border: 1px solid #adb4ae; }
.dining-entry .dining-meal:hover { border-color: var(--ink); }
.dining-entry .dining-title em { color: var(--ink); }
.guest-menu .customer-assistance :is(h3,.text-premium), .guest-menu .guest-category-content>.premium-card p { color: var(--ink) !important; }
.guest-menu .customer-assistance button, .guest-menu .guest-category-content>.premium-card { color: var(--ink) !important; background: white !important; border: 1px solid var(--line) !important; box-shadow: none !important; }
.guest-menu .customer-assistance button:disabled { background: #edf5ef !important; }
.guest-menu .customer-drink-tabs button { background: white !important; color: var(--ink) !important; border: 1px solid var(--line) !important; }
.guest-menu .customer-drink-tabs button[aria-pressed=true] { background: var(--ink) !important; color: white !important; }
.guest-menu .guest-choice>.slide-up,
.guest-menu :is(.customer-set-section,.customer-ayce-section)>.premium-card,
.guest-menu .customer-set-section .customer-set-card { background: white !important; color: var(--ink) !important; box-shadow: none !important; border: 1px solid var(--line) !important; }
.guest-menu .customer-set-section .customer-set-card:nth-child(n)>div:first-child { background: var(--surface-subtle) !important; }
.guest-menu :is(.guest-choice,.customer-set-section,.customer-ayce-section) :is(div,span,p) { color: var(--ink) !important; }
.guest-menu :is(.customer-set-section,.customer-ayce-section) .gradient-text { background: none !important; -webkit-text-fill-color: currentColor !important; }
.guest-menu .guest-choice button { background: var(--surface-subtle) !important; color: var(--ink) !important; border: 1px solid var(--line) !important; }
.guest-menu .guest-choice button[aria-pressed=true], .guest-menu .customer-options-list button[aria-pressed=true] { border: 2px solid var(--ink) !important; color: var(--ink) !important; background: var(--mint) !important; }
.guest-menu .customer-options [role=dialog]>div:last-child button:enabled,
.guest-menu :is(.customer-set-section,.customer-ayce-section) .btn-primary:enabled { background: var(--ink) !important; color: white !important; border-color: var(--ink) !important; }
.guest-menu .category-item::after, .guest-menu .menu-item-card::before { content: none; }
.guest-menu .menu-section-title, .guest-menu .customer-chapter-heading { max-width: 700px; margin: 0 auto; padding: 28px 20px 12px; color: var(--ink); background: white; font: 650 28px/1.15 var(--ui); letter-spacing: -.045em; }
.guest-menu .guest-category-content { max-width: 700px !important; padding: 0 20px 22px !important; }
.guest-menu .guest-item-list { grid-template-columns: 1fr !important; gap: 0 !important; }
.guest-menu:is(.guest-menu-light,.customer-playful) .guest-item-list .menu-item-card {
  display: flex; flex-direction: row-reverse !important; align-items: center; gap: 16px;
  margin: 0; padding: 14px 0; border: 0 !important; border-top: 1px solid var(--line) !important; border-radius: 0 !important;
  background: white !important; box-shadow: none !important; backdrop-filter: none; transform: none;
}
.guest-menu .guest-item-list .menu-item-card>div:not(.guest-item-details) { flex: 0 0 76px; width: 76px !important; height: 76px; border-radius: 8px !important; }
.guest-menu .guest-item-list .menu-item-card>.menu-item-image { display: none !important; }
.guest-menu:is(.guest-menu-light,.customer-playful) .guest-item-list .menu-item-card>.guest-item-details { padding: 0 !important; min-width: 0; }
.guest-menu:is(.guest-menu-light,.customer-playful) .menu-item-card .guest-item-name { color: var(--ink) !important; font: 650 18px/1.35 var(--ui) !important; letter-spacing: -.025em; display: block !important; overflow: visible !important; margin-bottom: 4px !important; }
.guest-item-details>div:empty { display: none !important; }
.guest-menu:is(.guest-menu-light,.customer-playful) .menu-item-card .guest-item-description { color: var(--muted) !important; font: 400 14px/1.42 var(--ui) !important; margin: 0 0 5px !important; }
.guest-item-actions .text-premium { color: var(--ink) !important; font: 600 15px/1.3 var(--ui); }
.guest-menu:is(.guest-menu-light,.customer-playful) .menu-item-card :is(.btn-primary,.btn-success) {
  min-width: 64px !important; min-height: 44px; color: var(--ink) !important; background: white !important;
  border: 1px solid #a7aea8 !important; border-radius: 8px !important; box-shadow: none !important;
}
.guest-menu:is(.guest-menu-light,.customer-playful) [data-testid="customer-cart-bar"] { background: white !important; border: 0 !important; border-top: 1px solid var(--line) !important; border-radius: 0 !important; box-shadow: none; }
.guest-menu:is(.guest-menu-light,.customer-playful) [data-testid="customer-cart-bar"] button { background: var(--ink) !important; color: white !important; border-radius: 8px !important; box-shadow: none !important; }
.guest-menu [data-testid="customer-cart-total"] { background: none !important; color: white !important; -webkit-text-fill-color: currentColor; }
.guest-menu [data-testid="customer-orders-dock"] { color: var(--ink) !important; background: white !important; border: 1px solid #a7aea8 !important; box-shadow: none !important; }
.guest-menu .order-backdrop { background: #161a1852; }
.guest-menu:is(.guest-menu-light,.customer-playful) #customer-cart-dialog,
.guest-menu:is(.guest-menu-light,.customer-playful) #customer-cart-dialog>.premium-header,
.guest-menu .order-result { color: var(--ink) !important; background: #fff !important; border-color: var(--line) !important; box-shadow: none !important; }
.guest-menu #customer-cart-dialog { padding-top: 0 !important; }
.guest-menu #customer-cart-dialog>.customer-language-toolbar { position: relative; top: auto; padding: 4px 12px; }
.guest-menu #customer-cart-dialog>.premium-header { position: static !important; padding: 12px 16px !important; border-bottom: 1px solid var(--line); }
.guest-menu #customer-cart-dialog :is(#customer-cart-title,.gradient-text,.text-luxury), .guest-menu .order-result h2 {
  color: var(--ink) !important; -webkit-text-fill-color: currentColor !important; background: none !important; font-family: var(--ui) !important;
}
.guest-menu #customer-cart-dialog>.premium-header button { color: var(--ink) !important; background: white !important; border: 1px solid var(--line) !important; min-height: 44px; }
.guest-menu:is(.guest-menu-light,.customer-playful) .cart-item { background: white !important; border: 0 !important; border-bottom: 1px solid var(--line) !important; padding: 12px 0 !important; border-radius: 0 !important; margin: 0 !important; box-shadow: none !important; }
.guest-menu .cart-item :is(div,span), .guest-menu .order-estimate :is(div,span), .guest-menu [data-testid="customer-pay-where"] { color: var(--ink) !important; }
.guest-menu:is(.guest-menu-light,.customer-playful) .cart-item button { background: white !important; border: 1px solid var(--line) !important; color: var(--ink) !important; border-radius: 50% !important; width: 44px !important; height: 44px !important; box-shadow: none; }
.guest-menu:is(.guest-menu-light,.customer-playful) #customer-cart-dialog textarea { background: #fff !important; color: var(--ink) !important; border: 1px solid #a7aea8 !important; border-radius: 8px !important; }
.guest-menu:is(.guest-menu-light,.customer-playful) #customer-cart-dialog textarea::placeholder { color: var(--muted); }
.guest-menu:is(.guest-menu-light,.customer-playful) .order-estimate { background: var(--surface-subtle) !important; border: 0 !important; padding: 14px !important; }
.guest-menu:is(.guest-menu-light,.customer-playful) [data-testid="customer-place-order"]:enabled, .guest-menu .order-result button { background: var(--ink) !important; color: white !important; border: 0 !important; box-shadow: none !important; }
.guest-menu #customer-cart-dialog .customer-cart-actions>.btn-secondary { background: white !important; color: var(--ink) !important; border: 1px solid var(--line); box-shadow: none; }
.order-result-mark { display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto 16px; border-radius: 50%; background: #edf5ef; color: #295638; font-size: 24px; }
.guest-menu .order-result[role=dialog] { padding-top: 24px !important; }
.guest-menu #customer-cart-dialog [data-testid="customer-tier-cover"] { color: var(--ink) !important; }
.guest-menu #customer-cart-dialog [data-testid="slow-prep-order-note"] { color: #764500 !important; }
@media (min-height: 620px) {
  .guest-menu #customer-cart-dialog { display: flex; flex-direction: column; overflow: hidden !important; }
  .guest-menu #customer-cart-dialog>:is(.customer-language-toolbar,.premium-header) { flex: none; }
  .guest-menu #customer-cart-dialog .customer-cart-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  .guest-menu #customer-cart-dialog .customer-cart-actions { flex: none; max-height: 38dvh; overflow-y: auto; padding: 8px 16px max(12px,env(safe-area-inset-bottom)) !important; border-top: 1px solid var(--line); }
  .guest-menu #customer-cart-dialog .customer-cart-actions>button { margin-top: 4px !important; min-height: 44px; padding: 10px !important; }
}
.guest-menu .order-result p { color: var(--muted) !important; }
.customer-startup-loading { background: white; color: var(--muted); }
.customer-startup-art { display: none; }
@media (max-width: 740px) {
  .login-photo { padding: 22px 22px 0; }
  .access-card { padding: 22px; }
  .signup-intro, .assistant-heading { padding-bottom: 20px; }
  .guest-menu #customer-cart-dialog .cart-item>div:first-child { min-width: min(120px,100%); }
}
body:has(.container) .card { box-shadow: none; border: 1px solid var(--line); border-radius: 12px; }
body:has(.container) .btn-primary { background: var(--ink); color: white; }

body:has(.container) :is(.points-box,.combo-card,.combo-chip,.info-card) { background: var(--surface-subtle); color: var(--ink); border: 1px solid var(--line); }
body:has(.container) :is(.points-num,.points-dollar,.points-where,.points-label,.combo-plus,.info-card b) { color: var(--ink); }

.access-footer a + a { margin-left: 1rem; }
#table-qr-card { text-align: center; break-inside: avoid; }
#table-qr-card img { margin: .5rem auto; }
#table-qr-card p { color: var(--ink); }
@media print {
  body:has(#table-qr-card)>:not(#setup),
  #setup:has(#table-qr-card)>:not(.panel),
  #setup .panel:has(#table-qr-card)>:not(#qr-preview),
  #qr-preview>:not(#table-qr-card) { display: none !important; }
  body:has(#table-qr-card), #setup:has(#table-qr-card), #setup .panel:has(#table-qr-card), #qr-preview:has(#table-qr-card) {
    display: block; margin: 0; padding: 0; border: 0; box-shadow: none; background: white;
  }
  #table-qr-card { margin: 0 auto; padding: 6mm; }
  #table-qr-card img { width: 45mm; height: 45mm; }
}
