/* Staff-only compatibility layer: legacy utility names retain their layout and behavior. */
.staff-theme {
  --paper: #faf6ee;
  --wine: #631f25;
  --header: #3c0b14;
  --gold: #c4a37a;
  --ink: #503a32;
  --muted: #746354;
  --baresto-kitchen: var(--paper);
  --baresto-kitchen-elevated: #fffaf3;
  --baresto-kitchen-border: #d8c5aa;
  --baresto-new-order: var(--gold);
  --baresto-new-order-hover: #ae8758;
  --baresto-order: var(--wine);
  --baresto-order-hover: var(--header);
  --baresto-text: var(--ink);
  --baresto-text-muted: var(--muted);
  background: var(--paper);
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.5;
  color-scheme: light;
  accent-color: var(--wine);
}
.staff-theme :is(button, input, select, textarea) { font-family: inherit; }
.staff-theme :is(h1, h2, h3) { color: var(--wine); }
.staff-theme :is(.text-xs, .menu-label, .legal-preview, .field-error) { font-size: .9375rem; }
.staff-theme .text-sm { font-size: 1rem; }
body.staff-theme .text-slate-100,
body.staff-theme .text-slate-200,
body.staff-theme .text-slate-300,
body.staff-theme .legal-preview strong { color: var(--ink); }
body.staff-theme :is(.bg-order, .bg-order-dark, .bg-red-600, .btn-secondary, .nav-link-active):is(.text-slate-100, .text-slate-200, .text-slate-300),
body.staff-theme :is(.bg-order, .bg-order-dark, .bg-red-600, .btn-secondary, .nav-link-active) :is(.text-slate-100, .text-slate-200, .text-slate-300) { color: var(--paper); }
.staff-theme :is(.text-slate-400, .text-slate-500, .menu-label, .legal-preview, .bt-venue-name) { color: var(--muted); }
.staff-theme .text-white:not(.bg-order):not(.bg-order-dark):not(.bg-red-600) { color: var(--ink); }
.staff-theme .hover\:text-white:hover { color: var(--wine); }
.staff-theme :is(.text-new-order, .text-new-order-light, .text-accent) { color: #79572c; }
.staff-theme .bg-new-order { color: var(--header); }
.staff-theme :is(.text-red-300, .text-red-400, .field-error) { color: #a32222; }
.staff-theme :is(.bg-red-950, .bg-red-950\/50, .bg-red-900\/40) { background: #fbe8e4; }
.staff-theme .hover\:bg-red-950:hover { background: #fbe8e4; }
.staff-theme :is(.border-red-800, .border-red-800\/50) { border-color: #b95149; }
.staff-theme :is(.input-field, .menu-input),
.staff-theme select.input-field {
  min-height: 44px;
  border: 1px solid var(--baresto-kitchen-border);
  background: var(--paper);
  color: var(--ink);
  color-scheme: light;
  font-size: 1.0625rem;
}
.staff-theme :is(input, textarea)::placeholder { color: var(--muted); opacity: 1; }
.staff-theme :is(input, select, textarea):focus-visible,
.staff-theme :is(button, a):focus-visible {
  outline: 3px solid var(--wine);
  outline-offset: 3px;
}
.staff-theme :is(button, .btn-primary, .btn-secondary, .nav-link, .lang-switcher__btn) { min-height: 44px; }
.staff-theme :is(.nav-link, .lang-switcher__btn) { display: inline-flex; align-items: center; justify-content: center; }
.staff-theme .lang-switcher__btn { min-width: 44px; }
.staff-theme :is(.menu-check, #id_allergens li label) { min-height: 44px; }
.staff-theme :is(.btn-primary, .btn-secondary) { border-radius: .75rem; font-weight: 700; }
.staff-theme .btn-primary { color: var(--header); }
.staff-theme :is(.btn-secondary, .nav-link-active, .nav-link-active .text-white) { color: var(--paper); }
.staff-theme .card { box-shadow: 0 3px 16px #631f2506; }
.staff-theme .status-free { border-color: #357052; background: #edf3e9; }
.staff-theme .status-occupied { border-color: #9a6a27; background: #f8edda; }
.staff-theme .status-reserved { border-color: #79558e; background: #f0eaf4; }
.staff-theme .status-cleaning { border-color: #8c8071; background: #eee9df; }
.staff-theme .staff-brand-slot { min-width: 0; }
.staff-theme .staff-brand-slot p { overflow-wrap: anywhere; }
.staff-theme nav :is(.nav-link, .nav-link-mobile, button, .staff-identity) { font-weight: 700; }
.staff-theme .nav-link { white-space: nowrap; }
.staff-theme .staff-desktop-nav { min-width: 0; flex-shrink: 1; flex-wrap: wrap; justify-content: flex-end; white-space: normal; }
.staff-theme .staff-mobile-panel { max-height: calc(100dvh - 125px); }
.staff-theme .localized-file-picker { border-color: var(--baresto-kitchen-border); background: var(--paper); }
.staff-theme .localized-file-picker__button { background: var(--wine); color: var(--paper); }
.staff-theme .localized-file-picker:focus-within { outline-color: var(--wine); }
.staff-theme .localized-file-picker__selection { color: var(--muted); font-size: 1rem; }
.staff-theme .touch-product-button { border-color: var(--baresto-kitchen-border); background: var(--baresto-kitchen-elevated); color: var(--ink); }
.staff-theme .touch-product-button:hover { border-color: var(--wine); }
.staff-theme .touch-product-button:active { background: #f0e4d5; }
.staff-theme .touch-product-button:focus-visible { outline-color: var(--wine); }
.staff-theme .touch-product-name { font-size: 1.2rem; line-height: 1.3; }
.staff-theme .touch-product-price { color: var(--wine); font-size: 1.125rem; }
.staff-theme .touch-product-add { background: var(--wine); color: var(--paper); }
.staff-theme .touch-product-quantity { background: #631f2512; color: var(--wine); }
.staff-theme .flash-message { border-color: var(--baresto-kitchen-border); background: #f3eadc; color: var(--ink); }
.staff-theme .flash-message--success { border-color: #357052; background: #edf3e9; color: #28573d; }
.staff-theme .flash-message--error { border-color: #b95149; background: #fbe8e4; color: #a32222; }
.staff-theme .guest-call-notice { background: #3c0b1470; }
.staff-theme .guest-call-notice__card { border-color: var(--gold); background: var(--paper); color: var(--ink); }
.staff-theme .guest-call-notice__timer { color: var(--muted); }
.staff-theme .guest-call-notice[data-state="error"] .guest-call-notice__card { border-color: #b95149; }
.staff-theme .guest-call-notice[data-state="warning"] .guest-call-notice__card { border-color: #9a6a27; }
.staff-theme .guest-preview-frame { border-color: var(--baresto-kitchen-border); background: var(--paper); }
.staff-theme :is(.company-logo-preview, .legal-catalogue img) { background: var(--header); border-radius: .5rem; padding: .5rem; }
.staff-theme :is(.text-price, .touch-product-price, .tabular-nums) { font-variant-numeric: lining-nums tabular-nums; }
@media (max-width: 430px) {
  .staff-theme .staff-brand-slot .bt-brand__logo { width: 88px; height: 68px; padding: 4px 8px; }
  .staff-theme .staff-brand-slot p { font-size: .875rem; }
  .staff-theme .touch-product-name { font-size: 1.125rem; }
}
@media print {
  .staff-theme { background: #fff; color: #000; }
  .staff-theme .card { background: #fff; border-color: #999; box-shadow: none; }
  .staff-theme :is(h1, h2, h3, .text-price, .text-accent) { color: #000; }
  .staff-theme .bt-brand__logo { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

/* Canvas intrinsic width must not become a report grid track's minimum width. */
.staff-theme .reports-page,
.staff-theme .reports-page .grid > *,
.staff-theme .reports-page .card,
.staff-theme .reports-page .report-chart { min-width: 0; }
.staff-theme .reports-page .report-chart { max-width: 100%; }
.staff-theme .reports-page .report-chart canvas { display: block; max-width: 100%; }

/* Tailwind injects utilities late; the light shell must own its inherited text color. */
body.staff-theme { color: var(--ink); }
.staff-theme .nav-link:not(.nav-link-active),
.staff-theme .bt-brand-link { color: var(--ink); }
.staff-theme .nav-link:not(.nav-link-active):hover {
  color: var(--wine);
  background-color: #efe2d2;
}
.staff-theme .bt-brand-link:hover { color: var(--wine); }
