/* Production tablets start with the station, not the account/brand header. */
html body.state-account.state-staff.station-mode { margin:0; background:var(--bg,#f2f6f3) !important; color:var(--text,#132d24); }
html body.state-account.state-staff.station-mode::before { display:none; }
html body.state-account.state-staff.station-mode .topbar,
html body.state-account.state-staff.station-mode .view-tabs { display:none !important; }
html body.state-account.state-staff.station-mode .app-shell {
  display:block !important; width:100%; max-width:none; margin:0;
  padding:max(6px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left)) !important;
}
html body.state-account.state-staff.station-mode .workspace { display:block !important; margin:0; padding:0 !important; min-width:0; }
html body.state-account.state-staff.station-mode .station-view.active { display:block; margin:0; padding:0 !important; border:0; border-radius:0 !important; background:transparent !important; box-shadow:none; min-width:0; }
html body.state-account.state-staff.station-mode .station-heading {
  position:sticky !important; top:0; z-index:35; display:flex; align-items:center; flex-wrap:nowrap;
  gap:10px; min-height:44px; margin:0 0 6px !important; padding:0 0 4px;
  background:var(--bg,#f2f6f3); border-bottom:1px solid var(--line,#cad8d1);
}
html body.state-account.state-staff.station-mode .station-heading .eyebrow { display:none; }
html body.state-account.state-staff.station-mode .station-heading h2 { margin:0; font-size:clamp(1.05rem,2vw,1.45rem) !important; line-height:1.15 !important; white-space:nowrap; }
.station-display-actions { display:none; flex:0 0 auto; align-items:center; gap:5px; margin-inline-start:auto; }
body.station-mode .station-display-actions { display:flex; }
.station-display-actions button,
.screen-settings button { min-height:40px; padding:7px 10px; border:1px solid var(--line,#cad8d1); border-radius:8px; background:var(--surface,#fff); color:var(--text,#132d24); font:inherit; font-size:.8rem; font-weight:750; cursor:pointer; }
.station-display-actions [data-station-menu] { min-width:40px; padding:0 8px; font-size:1.4rem; line-height:1; }
.station-display-actions button:focus-visible,
.screen-settings button:focus-visible { outline:3px solid var(--theme-accent,#087962); outline-offset:2px; }
.station-display-actions button:disabled { opacity:.55; }
html body.state-account.state-staff.station-mode .kitchen-language-controls { display:flex; flex:1 1 auto; min-width:0; gap:4px; margin:0; }
html body.state-account.state-staff.station-mode .kitchen-language-buttons { display:flex; flex-wrap:nowrap; flex:1 1 auto; min-width:0; gap:3px; overflow-x:auto; overscroll-behavior-x:contain; scrollbar-width:thin; }
html body.state-account.state-staff.station-mode .kitchen-language-buttons button { flex:0 0 auto; min-height:36px; padding:6px 7px; font-size:.75rem; border-radius:7px; }
html body.state-account.state-staff.station-mode .kitchen-language-buttons button span { margin-inline-start:3px; }
html body.state-account.state-staff.station-mode :is(.kitchen-carousel-toggle,.kitchen-language-settings-toggle) { flex:0 0 34px; width:34px; height:36px; min-height:36px; border-radius:7px; }
html body.state-account.state-staff.station-mode .kitchen-language-settings-panel { position:fixed; top:54px; inset-inline-end:8px; inset-inline-start:auto; max-height:calc(100dvh - 70px); overflow:auto; width:min(520px,calc(100vw - 16px)); z-index:80; }
.station-queue-tools { display:none; }
html body.state-account.state-staff.station-mode .station-queue-tools { display:flex; flex-wrap:wrap; align-items:center; gap:5px 12px; margin:0 0 6px; min-width:0; }
.station-queue-tools > [data-station-qr]:empty { display:none; }
.station-queue-tools > [data-station-summary] { flex:1 1 auto; min-width:0; }
html body.state-account.state-staff.station-mode .qr-toolbar { flex-wrap:nowrap; gap:5px; margin:0; }
html body.state-account.state-staff.station-mode .qr-toolbar button { min-height:40px; padding:6px 10px; border:1px solid var(--line,#cad8d1); border-radius:8px; background:var(--surface,#fff); color:var(--text,#132d24); font:inherit; font-size:.8rem; font-weight:750; cursor:pointer; }
html body.state-account.state-staff.station-mode .qr-toolbar button:disabled { opacity:.5; cursor:default; }
html body.state-account.state-staff.station-mode .qr-toolbar [data-qr-ready]:not(:disabled) { color:var(--theme-on-accent,#fff); background:var(--theme-accent,#087962); border-color:var(--theme-accent,#087962); }
html body.state-account.state-staff.station-mode .production-board-summary { min-height:40px; margin:0; gap:5px; padding:3px 0; border:0; border-radius:0; background:transparent !important; font-size:.8rem; }
html body.state-account.state-staff.station-mode .production-board-summary > span { padding:5px 7px; border-radius:7px; white-space:nowrap; }
html body.state-account.state-staff.station-mode .production-board-summary small { font-size:.7rem; }
html body.state-account.state-staff.station-mode .ticket-list { display:block !important; width:100%; max-width:none; margin:0; padding:0; min-width:0; }
html body.state-account.state-staff.station-mode .production-board { gap:5px; }
html body.state-account.state-staff.station-mode .production-table-list { gap:7px; }
html body.state-account.state-staff.station-mode :is(.production-column-headings,.production-line,.production-table-header) {
  grid-template-columns:minmax(155px,1.5fr) minmax(80px,.72fr) minmax(80px,.72fr) minmax(100px,.95fr) minmax(130px,1.1fr) 82px 144px;
  gap:8px;
}
html body.state-account.state-staff.station-mode .production-column-headings { padding:3px 10px; font-size:.65rem; }
html body.state-account.state-staff.station-mode .production-table-header { min-height:48px; padding:6px 10px; }
html body.state-account.state-staff.station-mode .production-line { min-height:76px; padding:8px 10px; }
html body.state-account.state-staff.station-mode .production-dish { display:grid; grid-template-columns:minmax(0,1fr); gap:3px 7px; }
html body.state-account.state-staff.station-mode .production-dish > strong { white-space:normal; overflow-wrap:anywhere; text-overflow:clip; font-size:.95rem; }
html body.state-account.state-staff.station-mode .production-dish:has(> .qr-select) { grid-template-columns:28px minmax(0,1fr); }
html body.state-account.state-staff.station-mode .production-dish:has(> .qr-select) > :not(.qr-select) { grid-column:2; }
html body.state-account.state-staff.station-mode .production-dish > .qr-select { grid-column:1; grid-row:1 / span 2; align-self:center; margin:0; min-height:40px; }
html body.state-account.state-staff.station-mode .qr-select input { width:28px !important; height:28px !important; flex-basis:28px; margin:0; }
html body.state-account.state-staff.station-mode .qr-select > span { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
html body.state-account.state-staff.station-mode .qr-assigned { grid-column:1 / -1; min-height:32px; padding:4px 7px; border-radius:7px; }
html body.state-account.state-staff.station-mode :is(.production-status-control,.production-table-status-control) select { min-height:44px; padding-inline-start:7px; padding-inline-end:22px; font-size:.75rem; }
html body.state-account.state-staff.station-mode .production-meta { font-size:.72rem; }
html body.state-account.state-staff.station-mode .production-claim { min-height:36px; padding:5px 7px; }

/* Kitchen language and filter controls share the top edge, including in fullscreen. */
.kitchen-board-controls { min-width:0; }
.kitchen-filters { display:flex; align-items:stretch; gap:5px; min-width:0; overflow-x:auto; overscroll-behavior-x:contain; scrollbar-width:thin; padding:2px 0 5px; margin:0 0 4px; }
.kitchen-filter { display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto; gap:7px; min-height:44px; padding:7px 12px; border:1px solid var(--line,#cad8d1); border-radius:8px; background:var(--surface,#fff); color:var(--text,#132d24); font:inherit; font-size:.85rem; font-weight:800; white-space:nowrap; }
.kitchen-filter b { padding:2px 5px; border-radius:6px; background:var(--surface-strong,#e8f2ec); font-size:.75rem; color:inherit; }
.kitchen-filter.active { border-color:var(--theme-accent,#087962); background:var(--theme-accent,#087962); color:var(--theme-on-accent,#fff); box-shadow:inset 0 -3px 0 currentColor; }
.kitchen-filter.active b { background:color-mix(in srgb,currentColor 15%,transparent); }
.kitchen-filter:focus-visible { outline:3px solid var(--theme-accent,#087962); outline-offset:-3px; }
html body.state-account.state-staff.station-mode[data-active-view=kitchen] .app-shell { padding-top:env(safe-area-inset-top,0px) !important; }
html body.state-account.state-staff.station-mode #kitchenView .kitchen-board-controls { position:sticky; top:0; z-index:35; margin:0; padding:0; background:var(--bg,#f2f6f3); }
html body.state-account.state-staff.station-mode #kitchenView .station-heading { position:static !important; align-items:flex-start; min-height:40px; margin:0 0 2px !important; padding:0; }
html body.state-account.state-staff.station-mode #kitchenView .station-heading > div:first-child { display:flex; align-items:center; min-height:40px; }
html body.state-account.state-staff.station-mode #kitchenView .kitchen-filters { margin:0 0 3px; }
.production-table.course-filtered .production-table-header { grid-template-columns:minmax(0,1fr) 100px !important; }
.production-table.course-filtered .production-table-time { grid-column:2; }

/* The existing employee menu stays available behind the small station menu. */
.production-course-section { min-width:0; }
.production-course-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:7px 12px; border-block:1px solid var(--line,#cad8d1); background:var(--surface-strong,#e8f2ec); color:var(--text,#132d24); }
.production-course-heading h3 { margin:0; font-size:.9rem; font-weight:850; line-height:1.3; color:inherit; }
.production-course-heading > span { font-size:.75rem; white-space:nowrap; }
.production-course-heading > div { min-width:0; }
.production-course-heading > div > span { font-size:.75rem; }
.production-course-status-control { flex:0 0 144px; width:144px; min-width:0; }
.production-course-status-control select { width:100%; min-height:42px; }
.production-scope-hint { grid-column:1/-1; font-size:.7rem; margin:0; }
.production-table-status-control > small { display:block; font-size:.65rem; margin-bottom:2px; }
.production-course-lines { display:grid; min-width:0; }
.production-course-section + .production-course-section { margin-top:4px; }
.production-course-section .production-meta > strong { overflow-wrap:anywhere; }
html body.state-account.state-staff.station-mode .production-course-heading { padding:6px 10px; }
.screen-settings { display:none; }
.station-mode .topbar.mobile-menu-open .screen-settings { display:grid; gap:7px; }
.screen-settings [data-screen-wake][aria-pressed="true"] { border-color:var(--theme-accent,#087962); background:var(--theme-accent-soft,#e0f4eb); }
.screen-settings p { margin:0; font-size:.82rem; line-height:1.4; overflow-wrap:anywhere; }
.station-view-switcher { display:grid; gap:4px; font-size:.85rem; }
.station-view-switcher select { min-height:40px; width:100%; color:var(--text,#132d24); background:var(--surface,#fff); }
.station-view-switcher[hidden], [data-screen-fullscreen][hidden], [data-screen-message][hidden] { display:none !important; }
html body.state-account.state-staff.station-mode .topbar.mobile-menu-open { display:block !important; position:fixed !important; inset:0 !important; width:100%; height:100dvh !important; min-height:0 !important; padding:0 !important; background:transparent; border:0; z-index:100; pointer-events:none; }
html body.state-account.state-staff.station-mode .topbar > :not(.header-actions) { display:none !important; }
html body.state-account.state-staff.station-mode .topbar.mobile-menu-open .header-actions { display:flex !important; flex-direction:column; align-items:stretch; position:absolute !important; top:max(52px,env(safe-area-inset-top)) !important; inset-inline-end:max(8px,env(safe-area-inset-right)); inset-inline-start:auto; width:min(340px,calc(100vw - 16px)); max-height:calc(100dvh - 64px - env(safe-area-inset-bottom)); margin:0; padding:12px; gap:10px; overflow:auto; border:1px solid var(--line,#cad8d1); border-radius:12px; background:var(--surface,#fff); color:var(--text,#132d24); box-shadow:0 12px 40px #001b2440; pointer-events:auto; }
html body.state-account.state-staff.station-mode .topbar.mobile-menu-open :is(.employee-menu-summary,.screen-settings,.theme-picker-mount,.mobile-change-staff,.employee-menu-logout) { display:grid !important; width:100%; }
html body.state-account.state-staff.station-mode .topbar.mobile-menu-open .employee-menu-summary { grid-template-columns:36px minmax(0,1fr) 36px; align-items:center; gap:8px; }
html body.state-account.state-staff.station-mode .employee-menu-avatar { width:34px; height:34px; font-size:.85rem; }
html body.state-account.state-staff.station-mode .employee-menu-summary > span:nth-child(2) { display:grid; }
html body.state-account.state-staff.station-mode .employee-menu-close { min-width:36px; min-height:36px; font-size:1.3rem; color:inherit; }
html body.state-account.state-staff.station-mode .topbar.mobile-menu-open :is(.header-account-session,#sessionPanel,.employee-menu-tables,.mobile-table-management,.service-connection-setting,.service-notification-setting) { display:none !important; }
html body.state-account.state-staff.station-mode .topbar.mobile-menu-open .service-notification-setting[data-staff-preference="displayMode"] { display:flex !important; min-height:40px; }
html body.state-account.state-staff.station-mode .theme-picker-panel { position:static; width:100%; margin-top:6px; }
html body.state-account.state-staff.station-mode .theme-picker-toggle { width:100%; min-height:40px; }
html body.state-account.state-staff.station-mode .mobile-change-staff,
html body.state-account.state-staff.station-mode .employee-menu-logout { min-height:40px; }
body.station-mode:is([data-screen-wake-state="unsupported"],[data-screen-wake-state="denied"],[data-screen-wake-state="released"]) [data-station-menu] { border-color:var(--warn,#aa6500); }
.screen-display-notice { position:fixed; z-index:200; inset-inline:12px; bottom:max(12px,env(safe-area-inset-bottom)); display:flex; align-items:center; gap:12px; width:max-content; max-width:min(680px,calc(100vw - 24px)); margin-inline:auto; padding:12px; border:1px solid var(--line,#cad8d1); border-radius:10px; background:var(--surface,#fff); color:var(--text,#132d24); box-shadow:0 8px 36px #001b2440; font-size:.85rem; line-height:1.4; }
.screen-display-notice button { flex:0 0 auto; min-height:40px; padding:7px 10px; background:var(--surface-strong,#e8f2ec); color:inherit; border:1px solid var(--line,#cad8d1); border-radius:7px; font:inherit; }
@media (max-width:1100px) {
  html body.state-account.state-staff.station-mode .production-board-summary small { display:none; }
}
@media (max-width:980px) {
  html body.state-account.state-staff.station-mode .production-column-headings { display:none; }
  html body.state-account.state-staff.station-mode .production-table-header { display:grid; grid-template-columns:minmax(0,1fr) 82px 144px; }
  html body.state-account.state-staff.station-mode .production-table-title { grid-column:1; }
  html body.state-account.state-staff.station-mode .production-table-time { grid-column:2; }
  html body.state-account.state-staff.station-mode .production-table-status-control { grid-column:3; }
  html body.state-account.state-staff.station-mode .production-line { grid-template-columns:minmax(0,1fr) 144px; gap:5px 10px; }
  html body.state-account.state-staff.station-mode .production-dish { grid-column:1; }
  html body.state-account.state-staff.station-mode .production-age { grid-column:2; grid-row:1; }
  html body.state-account.state-staff.station-mode :is(.production-adjustment,.production-remarks,.production-meta) { grid-column:1; }
  html body.state-account.state-staff.station-mode .production-status-control { grid-column:2; grid-row:2 / span 4; align-self:start; }
  html body.state-account.state-staff.station-mode :is(.production-adjustment,.production-remarks) small { display:block; }
  html body.state-account.state-staff.station-mode :is(.production-adjustment,.production-remarks):has(> .empty) { display:none; }
}
@media (max-width:700px) {
  html body.state-account.state-staff.station-mode .station-heading { flex-wrap:wrap; gap:5px 8px; }
  html body.state-account.state-staff.station-mode .station-heading h2 { font-size:1.1rem !important; }
  html body.state-account.state-staff.station-mode .kitchen-language-controls { order:3; flex-basis:100%; }
  html body.state-account.state-staff.station-mode .station-display-actions button { min-height:40px; padding:6px 8px; font-size:.75rem; }
  html body.state-account.state-staff.station-mode .station-queue-tools { gap:4px; }
  html body.state-account.state-staff.station-mode .production-board-summary { min-height:30px; font-size:.75rem; }
  html body.state-account.state-staff.station-mode .production-board-summary > span { padding:4px 6px; }
}
@media (max-width:480px) {
  html body.state-account.state-staff.station-mode .production-table-header { grid-template-columns:minmax(0,1fr) 72px 144px; }
  html body.state-account.state-staff.station-mode .production-line { grid-template-columns:minmax(0,1fr) 144px; }
}
@media (min-width:768px) and (orientation:portrait) {
  html body.state-account.state-staff.station-mode #kitchenView .production-column-headings { display:none; }
  html body.state-account.state-staff.station-mode #kitchenView .production-table-header { grid-template-columns:minmax(0,1fr) 82px 144px; }
  html body.state-account.state-staff.station-mode #kitchenView .production-table-title { grid-column:1; }
  html body.state-account.state-staff.station-mode #kitchenView .production-table-time { grid-column:2; }
  html body.state-account.state-staff.station-mode #kitchenView .production-table-status-control { grid-column:3; }
  html body.state-account.state-staff.station-mode #kitchenView .production-line { grid-template-columns:minmax(0,1fr) 144px; align-items:start; gap:5px 10px; padding:8px 10px; }
  html body.state-account.state-staff.station-mode #kitchenView .production-dish { grid-column:1; grid-row:1; }
  html body.state-account.state-staff.station-mode #kitchenView .production-age { grid-column:2; grid-row:1; }
  html body.state-account.state-staff.station-mode #kitchenView :is(.production-adjustment,.production-remarks,.production-meta) { grid-column:1; }
  html body.state-account.state-staff.station-mode #kitchenView .production-status-control { grid-column:2; grid-row:2; align-self:start; }
  html body.state-account.state-staff.station-mode #kitchenView .production-meta { display:flex; flex-wrap:wrap; align-items:center; gap:3px 9px; line-height:1.35; }
  html body.state-account.state-staff.station-mode #kitchenView .production-meta .production-claim { min-height:40px; width:auto; }
  html body.state-account.state-staff.station-mode #kitchenView .production-course-section .production-course:not(.course-with_main) { display:none; }
  html body.state-account.state-staff.station-mode #kitchenView :is(.production-adjustment,.production-remarks) { display:flex; flex-wrap:wrap; align-items:center; gap:3px 6px; }
  html body.state-account.state-staff.station-mode #kitchenView :is(.production-adjustment,.production-remarks):has(> .empty) { display:none; }
}
@media (prefers-reduced-motion:reduce) { .kitchen-carousel-toggle.active span { animation:none; } }
/* Direct production controls retain both shape and text cues alongside colour. */
.production-status-buttons{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;width:144px;min-width:144px;align-self:center;background:transparent!important;padding:0!important;border:0!important}
.production-status-buttons .production-state{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;min-height:52px;padding:4px 1px;border:2px solid currentColor;border-radius:8px;font:inherit;font-weight:800;line-height:1;cursor:pointer;box-shadow:none}
.production-state svg{width:22px;height:22px;flex:none}.production-state span{font-size:9px;line-height:1.15;white-space:normal;text-align:center;overflow-wrap:anywhere}.production-status-buttons .state-sent{color:#a62127;background:#ffebed}.production-status-buttons .state-in_progress{color:#875000;background:#fff0cc}.production-status-buttons .state-ready{color:#09633f;background:#dcf5e8}.production-status-buttons .production-state[aria-pressed=true]{opacity:1!important;outline:2px solid currentColor;outline-offset:-5px}.production-status-buttons .state-sent[aria-pressed=true]{background:#b9252c;color:white;border-color:#b9252c}.production-status-buttons .state-in_progress[aria-pressed=true]{background:#f5b440;color:#382300;border-color:#9f6000}.production-status-buttons .state-ready[aria-pressed=true]{background:#087c50;color:white;border-color:#087c50}.production-status-buttons .production-state:disabled:not([aria-pressed=true]){opacity:.4;cursor:default}.production-state:focus-visible{outline:3px solid var(--text,#132d24);outline-offset:1px}
html[data-display-mode=dark] .production-status-buttons .state-sent:not([aria-pressed=true]){background:#48262c;color:#ffbac1}html[data-display-mode=dark] .production-status-buttons .state-in_progress:not([aria-pressed=true]){background:#49371b;color:#ffd58b}html[data-display-mode=dark] .production-status-buttons .state-ready:not([aria-pressed=true]){background:#1a4030;color:#a0efc3}
