:root {
  --ink: #1f2421;
  --muted: #525b55;
  --line: #d9ded8;
  --panel: #ffffff;
  --surface: #f5f4ee;
  --soft: #ebe8dd;
  --green: #255f4b;
  --green-soft: #dcebe3;
  --coral: #bb4f3d;
  --gold: #c39733;
  --blue: #315a7d;
  --shadow: 0 18px 42px rgba(31, 36, 33, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--surface);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body.access-locked .app-shell {
  display: none;
}

.access-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #f7f4eb, #e6f0ec);
}

.access-card {
  width: min(100%, 430px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
}

.access-card h1 {
  margin: 0;
  font-size: 28px;
}

.access-demo-link {
  text-align: center;
  text-decoration: none;
}

.customer-entry-gate {
  align-items: start;
  padding: 18px;
  background: #f5f4ee;
}

.customer-entry-card {
  width: min(100%, 460px);
  margin-top: 24px;
  padding: 20px;
}

.customer-entry-heading {
  display: grid;
  gap: 5px;
}

.customer-entry-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.customer-auth-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.customer-auth-option {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf5;
  color: var(--ink);
  font-weight: 900;
}

.customer-auth-option.active {
  border-color: var(--green);
  background: var(--green-soft);
}

.customer-auth-panel {
  display: grid;
  gap: 10px;
}

.customer-auth-panel label,
.access-card label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}

.customer-auth-panel input,
.access-card input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
}

.customer-auth-panel textarea {
  width: 100%;
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  resize: vertical;
  font: inherit;
  line-height: 1.4;
  background: #fff;
}

.customer-entry-create-account {
  display: grid;
  gap: 10px;
}

.customer-terms-review {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfaf5;
}

.customer-terms-text {
  max-height: 190px;
  overflow: auto;
  white-space: pre-wrap;
  color: var(--muted);
  line-height: 1.45;
}

.terms-editor-panel {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.terms-editor-panel label {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.terms-editor-panel textarea {
  width: 100%;
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  resize: vertical;
  font: inherit;
  line-height: 1.45;
  background: #fff;
}

body.customer-session-mode .app-shell {
  display: block;
  min-height: 100vh;
}

body.customer-session-mode .sidebar,
body.customer-session-mode .topbar {
  display: none;
}

.customer-session-nav {
  display: none;
}

body.customer-session-mode .customer-session-nav {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(31, 36, 33, 0.1);
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr);
  margin: -4px 0 10px;
  padding: 8px;
  position: sticky;
  top: 0;
  z-index: 22;
}

body.customer-session-mode .customer-session-nav div {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 0;
}

body.customer-session-mode .customer-session-nav strong,
body.customer-session-mode .customer-session-nav span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.customer-session-mode .customer-session-nav span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

body.customer-session-mode .customer-session-nav nav {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.customer-session-mode .customer-session-nav .compact-button {
  min-height: 44px;
  padding: 5px 6px;
}

body.customer-session-mode .workspace {
  padding: 10px;
}

body.customer-session-mode .section-tabs-panel {
  position: sticky;
  top: 0;
  z-index: 18;
  margin: -10px -10px 10px;
  padding: 6px;
  gap: 6px;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 10px 24px rgba(31, 36, 33, 0.1);
}

body.customer-session-mode .section-tabs {
  grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
  gap: 6px;
}

body.customer-session-mode .section-tab-button {
  min-height: 34px;
  padding: 5px 7px;
  font-size: 13px;
  line-height: 1.1;
}

body.customer-session-mode .customer-mini-header {
  display: none;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.business-help-button {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fbfaf5;
  color: var(--green);
  font-weight: 900;
  line-height: 1;
  display: inline-grid;
  place-items: center;
  padding: 0;
  box-shadow: 0 4px 12px rgba(31, 36, 33, 0.08);
}

.business-help-button:hover,
.business-help-button:focus-visible {
  border-color: var(--green);
  background: var(--green-soft);
  outline: none;
}

.customer-help-button {
  width: 24px;
  height: 24px;
  min-width: 24px;
  font-size: 13px;
  box-shadow: none;
}

.customer-session-nav .customer-help-button {
  margin-left: auto;
}

.category-panel {
  position: relative;
}

.category-panel > .customer-help-button {
  position: absolute;
  top: 8px;
  right: 8px;
}

.category-panel .tier-row:first-child {
  padding-right: 28px;
}

.preference-filter-panel summary + .customer-help-button {
  margin-left: 6px;
  vertical-align: middle;
}

.panel-heading > .customer-help-button {
  align-self: start;
  margin-left: auto;
}

.order-cart-bar .customer-help-button,
.cart-panel .customer-help-button,
.customer-bill-panel .customer-help-button,
.pay-call-panel .customer-help-button,
.stripe-pay-panel .customer-help-button,
.customer-profile-panel .customer-help-button {
  align-self: center;
}

.business-help-sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
}

.business-help-sheet.active {
  display: block;
}

.business-help-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31, 36, 33, 0.42);
}

.business-help-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 520px);
  max-height: min(82vh, 680px);
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
  display: grid;
  gap: 14px;
}

.business-help-panel h2 {
  margin: 0;
  font-size: 22px;
}

.business-help-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.business-help-panel ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  line-height: 1.4;
}

.business-help-panel .config-actions {
  justify-content: end;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: #26312b;
  color: #fff;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-rail-toggle {
  display: none;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: #f7f0d5;
  color: #26312b;
  border-radius: 8px;
  font-weight: 800;
}

.brand span,
.label,
.eyebrow,
.quiet {
  color: var(--muted);
}

.brand span {
  display: block;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  margin-top: 2px;
}

.role-nav {
  display: grid;
  gap: 8px;
}

.admin-sidebar-sections {
  display: none;
}

.nav-button {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-radius: 8px;
  padding: 12px 14px;
  text-align: left;
}

.nav-button.active {
  background: #f7f0d5;
  color: #26312b;
}

.nav-button.role-hidden {
  display: none;
}

.status-strip {
  margin-top: auto;
  display: grid;
  gap: 10px;
}

.status-strip > div {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 12px;
}

.sidebar-logout {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 800;
  text-align: center;
}

.sidebar-logout:hover {
  background: rgba(255, 255, 255, 0.16);
}

.sidebar-build-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 10px;
  line-height: 1.4;
  overflow-wrap: break-word;
}

.status-strip .label {
  display: block;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  margin-bottom: 4px;
}

.workspace {
  min-width: 0;
  padding: 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 22px;
}

.eyebrow {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 800;
  margin-bottom: 4px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
}

.view-breadcrumb {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
  font-weight: 500;
}

h2 {
  font-size: 18px;
}

.session-card,
.operations-panel,
.cart-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.session-card {
  padding: 12px 16px;
  min-width: 210px;
}

.sync-status-chip {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: default;
}

.sync-status-chip:disabled {
  opacity: 1;
  cursor: default;
}

.sync-status-chip .sync-status-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 999px;
  background: var(--muted);
}

.sync-status-chip[data-sync-state="synced"] {
  background: var(--green-soft);
  color: var(--green);
}

.sync-status-chip[data-sync-state="synced"] .sync-status-dot {
  background: var(--green);
}

.sync-status-chip[data-sync-state="error"] {
  background: #f5e6cf;
  color: #815313;
}

.sync-status-chip[data-sync-state="error"] .sync-status-dot {
  background: var(--coral);
}

.sync-status-chip[data-sync-state="error"]:not(:disabled) {
  cursor: pointer;
}

.sync-status-chip[data-sync-state="error"]:not(:disabled):hover {
  filter: brightness(0.96);
}

.sync-status-chip[data-sync-state="conflict"] {
  background: rgba(49, 90, 125, 0.14);
  color: var(--blue);
}

.sync-status-chip[data-sync-state="conflict"] .sync-status-dot {
  background: var(--blue);
}

.topbar-actions {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.role-switcher-label {
  min-width: 150px;
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.role-switcher-label select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  padding: 0 10px;
  font-weight: 700;
  text-transform: none;
  box-shadow: var(--shadow);
}

.role-menu-shell {
  position: relative;
}

.hamburger-button {
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 18px auto;
  align-content: center;
  align-items: center;
  gap: 2px 8px;
  box-shadow: var(--shadow);
}

.hamburger-button span {
  width: 18px;
  height: 2px;
  display: block;
  background: var(--ink);
  border-radius: 999px;
  grid-column: 1;
}

.hamburger-button strong {
  grid-column: 2;
  grid-row: 1 / span 3;
  font-size: 13px;
}

.role-task-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(360px, calc(100vw - 24px));
  z-index: 50;
  display: none;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.role-task-menu.open {
  display: grid;
}

.role-menu-heading {
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.role-task-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf5;
  color: var(--ink);
  padding: 11px;
  text-align: left;
  display: grid;
  gap: 4px;
}

.role-task-button.active {
  border-color: var(--green);
  background: var(--green-soft);
}

.role-task-button span {
  font-weight: 800;
}

.role-task-button small {
  color: var(--muted);
  line-height: 1.35;
}

.session-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.section-hidden {
  display: none !important;
}

.view.task-focused .operations-panel:not(.focused-task),
.view.task-focused .menu-panel:not(.focused-task),
.view.task-focused .cart-panel:not(.focused-task) {
  display: none;
}

.focused-task {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.demo-entry-panel,
.workflow-demo-panel {
  display: none;
}

.workspace.show-demo-tools .demo-entry-panel,
.workspace.show-demo-tools .workflow-demo-panel {
  display: block;
}

.section-tabs-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 10px;
  margin-bottom: 12px;
  display: grid;
  gap: 10px;
}

#admin-view.active {
  display: grid;
  gap: 10px;
}

#admin-view > .section-tabs-panel {
  display: none;
}

#admin-view > .admin-command-center,
#admin-view > .admin-layout {
  min-width: 0;
}

#admin-view > /* ============================================================
   Phase D — Cross-Cutting UX Polish & Customer Flow
   ============================================================ */
/* Notification Center */
.notification-center-shell {
  position: relative;
  display: inline-block;
}

.notification-bell-button {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  width: 38px;
  padding: 0;
  position: relative;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.notification-bell-button:hover {
  background: var(--surface);
  border-color: var(--green);
}

.bell-icon {
  font-size: 17px;
  line-height: 1;
}

.notification-badge-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--coral);
  color: #fff;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  padding: 3px 6px;
  min-width: 16px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(187, 79, 61, 0.4);
}

.notification-dropdown-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  z-index: 100;
  overflow: hidden;
}

.notification-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #fbfaf5;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.notification-dropdown-list {
  max-height: 360px;
  overflow-y: auto;
  display: grid;
  gap: 0;
}

.notification-item {
  padding: 10px 12px;
  border-bottom: 1px solid #f0efea;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  transition: background 0.1s ease;
}

.notification-item:hover {
  background: #faf9f4;
}

.notification-item:last-child {
  border-bottom: 0;
}

.notification-item-text {
  display: grid;
  gap: 2px;
}

.notification-item-text strong {
  font-size: 12px;
  line-height: 1.2;
}

.notification-item-text span {
  color: var(--muted);
  font-size: 11px;
}

.notification-item-text small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

/* Customer Order Progress Tracker */
.customer-order-tracker {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  display: grid;
  gap: 12px;
  box-shadow: 0 4px 16px rgba(31, 36, 33, 0.05);
}

.order-tracker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.order-tracker-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  position: relative;
}

.tracker-step {
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
  position: relative;
}

.step-dot {
  height: 28px;
  width: 28px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: #fbfbf8;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  transition: all 0.2s ease;
}

.step-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
}

.tracker-step.done .step-dot {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.tracker-step.done .step-label {
  color: var(--green);
}

.tracker-step.active .step-dot {
  background: var(--gold);
  border-color: #9c731a;
  color: #1a2420;
  box-shadow: 0 0 0 3px rgba(195, 151, 51, 0.25);
  animation: trackerPulse 1.8s infinite;
}

.tracker-step.active .step-label {
  color: var(--ink);
  font-weight: 900;
}

@keyframes trackerPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* Floating Call Server Quick Action */
.customer-floating-call-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--ink);
  color: #fff;
  border: 2px solid #fff;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(31, 36, 33, 0.25);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.15s ease, background 0.15s ease;
}

.customer-floating-call-btn:hover {
  background: var(--green);
  transform: translateY(-2px);
}

/* Interactive Onboarding Wizard (D2) */
.onboarding-wizard-shell {
  background: #fbfaf5;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.onboarding-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.onboarding-progress-bar-track {
  height: 8px;
  background: #e2e1d9;
  border-radius: 999px;
  overflow: hidden;
}

.onboarding-progress-bar-fill {
  height: 100%;
  background: var(--green);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.onboarding-steps-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.onboarding-step-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 4px;
}

.onboarding-step-card.step-complete {
  border-left: 4px solid var(--green);
}

.onboarding-step-card.step-pending {
  border-left: 4px solid var(--gold);
}

.onboarding-step-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.onboarding-step-title {
  font-size: 13px;
  font-weight: 900;
}

.onboarding-step-desc {
  color: var(--muted);
  font-size: 11px;
}

/* Touch & Mobile Accessibility Pass (D4) */
@media (max-width: 768px) {
  .server-triage-card,
  .table-tile {
    min-height: 52px;
  }

  .nav-button {
    min-height: 44px;
  }

  .notification-dropdown-panel {
    width: calc(100vw - 32px);
    right: -60px;
  }
}

/* ============================================================
   Phase B — Site Admin Operations Dashboard
   ============================================================ */
.site-admin-dashboard-panel {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.admin-dashboard-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-kpi-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.admin-kpi-card {
  background: #fbfbf8;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 4px;
  padding: 12px;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.admin-kpi-card:hover {
  border-color: var(--green);
  box-shadow: 0 4px 12px rgba(31, 36, 33, 0.06);
}

.admin-kpi-card .kpi-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-kpi-card .kpi-val {
  color: var(--ink);
  font-size: 24px;
  font-weight: 900;
  line-height: 1.1;
}

.admin-kpi-card .kpi-sub {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.admin-kpi-card.kpi-accent-green { border-left: 4px solid var(--green); }
.admin-kpi-card.kpi-accent-gold { border-left: 4px solid var(--gold); }
.admin-kpi-card.kpi-accent-coral { border-left: 4px solid var(--coral); }
.admin-kpi-card.kpi-accent-blue { border-left: 4px solid var(--blue); }

.admin-dashboard-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  margin-bottom: 2px;
}

.admin-dashboard-section-title h3 {
  font-size: 15px;
  margin: 0;
}

.admin-dashboard-two-col {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
}

@media (max-width: 860px) {
  .admin-dashboard-two-col {
    grid-template-columns: 1fr;
  }
}

.admin-floor-mini-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
}

.admin-floor-mini-tile {
  background: #fbfbf8;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: 3px;
  padding: 8px;
  text-align: left;
  transition: border-color 0.15s ease;
}

.admin-floor-mini-tile:hover {
  border-color: var(--green);
  background: var(--green-soft);
}

.admin-floor-mini-tile .tile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-floor-mini-tile .tile-num {
  font-size: 14px;
  font-weight: 900;
}

.admin-floor-mini-tile .tile-server {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-floor-mini-tile .tile-bottom {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 11px;
}

.admin-alerts-card,
.admin-reports-card {
  background: #fbfbf8;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.admin-alert-item {
  align-items: center;
  background: #fff8d9;
  border: 1px solid #d1b356;
  border-radius: 8px;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  padding: 8px 10px;
}

.admin-alert-item.urgent {
  background: #f5d3ce;
  border-color: #bb4f3d;
}

.admin-staff-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-staff-pill {
  background: #f0efea;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
}

/* ============================================================
   Phase C — Global Admin Control Tower
   ============================================================ */
.platform-view-switch-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #eae9e2;
  border-radius: 8px;
  padding: 3px;
  width: fit-content;
}

.platform-switch-btn {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding: 6px 12px;
  cursor: pointer;
}

.platform-switch-btn.active {
  background: #fff;
  box-shadow: 0 1px 3px rgba(31, 36, 33, 0.12);
  color: var(--ink);
}

.platform-roster-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

.platform-site-card {
  background: #fbfbf8;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 8px;
  padding: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.platform-site-card:hover {
  border-color: var(--green);
  box-shadow: 0 4px 14px rgba(31, 36, 33, 0.08);
}

.platform-site-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.platform-site-title {
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
}

.platform-site-id {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  display: block;
}

.platform-site-metrics {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(3, 1fr);
  background: #f4f3ee;
  border-radius: 6px;
  padding: 8px;
  text-align: center;
}

.platform-site-metric strong {
  display: block;
  font-size: 14px;
  font-weight: 900;
}

.platform-site-metric small {
  color: var(--muted);
  display: block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.platform-infra-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.platform-infra-card {
  background: #fbfbf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
}

.platform-infra-name {
  font-size: 12px;
  font-weight: 800;
}

.admin-command-center {
  display: none;
}

#admin-view .admin-tab-groups {
  gap: 6px;
}

#admin-view .admin-tab-group {
  border-left: 0;
  border-radius: 0 8px 8px 0;
  padding: 6px 6px 6px 0;
}

.admin-sidebar-sections .admin-tab-groups {
  display: grid;
  gap: 6px;
}

.admin-sidebar-sections .admin-tab-group {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  display: grid;
  gap: 4px;
  padding: 5px;
}

.admin-sidebar-sections .admin-tab-group summary {
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  font-size: 10px;
  font-weight: 900;
  list-style: none;
  padding: 3px 4px;
  text-transform: uppercase;
}

.admin-sidebar-sections .admin-tab-group summary::-webkit-details-marker {
  display: none;
}

.admin-sidebar-sections .admin-tab-group summary::before {
  content: "+";
  display: inline-block;
  margin-right: 5px;
  width: 10px;
}

.admin-sidebar-sections .admin-tab-group[open] summary::before {
  content: "-";
}

.admin-sidebar-sections .section-tabs {
  display: grid;
  gap: 4px;
  grid-template-columns: 1fr;
}

.admin-sidebar-sections .section-tab-button {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.14);
  color: #fff;
  justify-content: flex-start;
  min-height: 30px;
  padding: 5px 7px 5px 18px;
  text-align: left;
}

.admin-sidebar-sections .section-tab-button.active {
  background: #f7f0d5;
  border-color: #f7f0d5;
  color: #26312b;
}

#admin-view .admin-tab-group .section-tabs {
  grid-template-columns: 1fr;
}

#admin-view .section-tab-button {
  justify-content: flex-start;
  min-height: 32px;
  padding: 6px 8px 6px 14px;
  text-align: left;
}

.section-tabs-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.section-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 8px;
  overflow: visible;
}

.admin-tab-groups {
  display: grid;
  gap: 10px;
}

.admin-tab-group {
  border: 1px solid rgba(31, 36, 33, 0.08);
  border-radius: 8px;
  background: #fffdf8;
  display: grid;
  gap: 5px;
  padding: 8px;
}

.admin-tab-group > span,
.role-task-group-label {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

#admin-view .admin-tab-group > span {
  align-items: center;
  color: var(--ink);
  display: flex;
  gap: 6px;
  padding: 4px 8px 2px 12px;
}

#admin-view .admin-tab-group > span::before {
  background: var(--green);
  border-radius: 999px;
  content: "";
  height: 6px;
  width: 6px;
}

#admin-view .section-tab-button::before {
  background: var(--line);
  content: "";
  height: 1px;
  margin-right: 2px;
  width: 10px;
}

.section-tab-button,
.utility-toggle {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf5;
  color: var(--ink);
  padding: 8px 11px;
  font-weight: 800;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.section-tab-button.active,
.utility-toggle.active {
  background: var(--green-soft);
  border-color: var(--green);
}

/* These header controls set an explicit `display`, which otherwise defeats the
   `hidden` attribute the UA maps to `display: none`. Without this, the
   walkthrough-tools toggle and the sync chip render as stray disabled buttons
   in the top bar in pilot mode instead of being hidden. */
.section-tab-button[hidden],
.utility-toggle[hidden],
.sync-status-chip[hidden] {
  display: none !important;
}

.danger-button {
  border-color: #c85b4c;
  color: #8f2f27;
}

.danger-button:hover {
  background: #fff0ed;
}

.tab-badge {
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  display: inline-grid;
  place-items: center;
  padding: 0 6px;
  font-size: 11px;
  line-height: 1;
}

.tab-badge[hidden] {
  display: none;
}

.server-alert-panel {
  margin-bottom: 12px;
}

/* ============================================================
   Phase A — Server Shift Dashboard
   ============================================================ */
.server-dashboard-panel {
  margin-bottom: 12px;
  padding: 12px;
}

.server-dashboard {
  display: grid;
  gap: 12px;
}

.server-dashboard-header {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.server-dashboard-greeting {
  display: block;
  font-size: 16px;
  line-height: 1.2;
  margin: 2px 0;
}

.server-dashboard-scope,
.station-dashboard-scope {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 700;
}

.server-stat-strip {
  display: flex;
  gap: 6px;
}

.server-stat {
  background: #fbfaf5;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 2px;
  min-width: 60px;
  padding: 6px 8px;
  text-align: center;
}

.server-stat strong {
  display: block;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
}

.server-stat small {
  color: var(--muted);
  display: block;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
}

.server-stat.stat-urgent {
  background: #f5d3ce;
  border-color: #bb4f3d;
}

.server-stat.stat-urgent strong {
  color: #bb4f3d;
}

.server-stat.stat-ready {
  background: #dcebe3;
  border-color: #255f4b;
}

.server-stat.stat-ready strong {
  color: #255f4b;
}

.server-triage-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.server-triage-card {
  background: #fbfbf8;
  border: 2px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  display: grid;
  gap: 3px;
  min-width: 80px;
  padding: 8px;
  text-align: left;
}

.server-triage-card:hover {
  border-color: var(--green);
  background: var(--green-soft);
}

.triage-icon {
  font-size: 18px;
  line-height: 1;
}

.triage-num {
  display: block;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.1;
}

.triage-status {
  color: var(--muted);
  display: block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.1;
}

.triage-balance {
  display: block;
  font-size: 12px;
  font-weight: 900;
}

.server-triage-card.triage-urgent {
  background: #f5d3ce;
  border-color: #bb4f3d;
}

.server-triage-card.triage-alert {
  background: #fff1d7;
  border-color: #c39733;
}

.server-triage-card.triage-active {
  background: #d8ecfa;
  border-color: #2f6f9f;
}

.server-triage-card.triage-seated {
  background: #fff0aa;
  border-color: #c39a22;
}

.server-triage-card.triage-ok {
  background: #dff4e4;
  border-color: #46935f;
}

.triage-empty {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin: 0;
}

/* ============================================================
   Phase A — Station Ticket Board Dashboard
   ============================================================ */
.station-dashboard-panel {
  margin-bottom: 12px;
  padding: 12px;
}

.station-dashboard {
  display: grid;
  gap: 12px;
}

.station-dashboard-header {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.station-dashboard-title {
  display: block;
  font-size: 16px;
  line-height: 1.2;
  margin: 2px 0;
}

.station-kanban {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow-x: auto;
}

.kanban-col {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 0;
  min-height: 80px;
  overflow: hidden;
}

.kanban-col-header {
  align-items: center;
  background: #f0efea;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 8px;
  justify-content: space-between;
  padding: 8px 10px;
}

.kanban-col-title {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.kanban-col-count {
  background: var(--ink);
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  padding: 3px 7px;
}

.kanban-col-body {
  display: grid;
  gap: 6px;
  padding: 8px;
}

.kanban-card {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 5px;
  padding: 8px;
}

.kanban-card-top {
  align-items: baseline;
  display: grid;
  gap: 4px;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.kanban-lane-icon {
  font-size: 13px;
  line-height: 1;
}

.kanban-item {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.kanban-age {
  font-size: 12px;
  font-weight: 900;
  text-align: right;
}

.kanban-card-meta {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 11px;
  font-weight: 700;
  gap: 5px;
}

.kanban-note {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.kanban-allergy {
  background: #fff1d7;
  border: 1px solid #c39733;
  border-radius: 4px;
  color: #8a6000;
  display: block;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 5px;
}

.kanban-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin: 4px 0;
  text-align: center;
}

/* Ticket aging — applied to kanban-card */
.ticket-age-ok { border-color: var(--line); }

.ticket-age-warn {
  background: #fffbe6;
  border-color: #c39733;
}

.ticket-age-warn .kanban-age { color: #8a6000; }

.ticket-age-critical {
  background: #fff0f0;
  border-color: #bb4f3d;
}

.ticket-age-critical .kanban-age { color: #bb4f3d; font-size: 13px; }

/* Responsive — stack kanban to 1 column on very small screens */
@media (max-width: 500px) {
  .station-kanban {
    grid-template-columns: 1fr;
  }

  .server-triage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  }
}

.admin-command-center {
  grid-column: 1 / -1;
  padding: 12px;
}

.admin-command-header {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 220px);
}

.admin-command-header h2 {
  margin-bottom: 2px;
}

.admin-context-card,
.admin-status-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf5;
  display: grid;
  gap: 2px;
  padding: 8px;
}

.admin-context-card span,
.admin-status-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-context-card strong {
  font-size: 15px;
}

.admin-context-card small,
.admin-status-grid small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.admin-status-grid,
.admin-action-grid {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  margin-top: 8px;
}

.admin-status-grid strong {
  font-size: 15px;
}

.admin-action-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  display: grid;
  gap: 2px;
  min-height: 56px;
  padding: 8px 10px;
  text-align: left;
}

.admin-action-card:hover {
  border-color: var(--green);
  background: var(--green-soft);
}

.admin-action-card strong {
  font-size: 14px;
}

.admin-action-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.server-alert-list {
  display: grid;
  gap: 8px;
}

.server-notification-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.server-notification-tools span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.server-alert-card {
  align-items: center;
  background: #fff8d9;
  border: 1px solid #d1b356;
  border-radius: 8px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 10px;
}

.server-alert-card.transfer {
  background: #e7f0f8;
  border-color: #96b9d7;
}

.server-alert-card.empty {
  background: #fbfbf8;
  border-color: var(--line);
}

.server-alert-card span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin-top: 2px;
}

.server-alert-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.pdf-preview-sheet {
  inset: 0;
  position: fixed;
  z-index: 60;
}

.pdf-preview-sheet[aria-hidden="true"] {
  display: none;
}

.pdf-preview-panel {
  background: var(--panel);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 14px;
  left: 50%;
  max-height: calc(100vh - 40px);
  max-width: 820px;
  overflow: hidden;
  padding: 18px;
  position: fixed;
  top: 20px;
  transform: translateX(-50%);
  width: min(94vw, 820px);
  z-index: 61;
}

.pdf-page {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(31, 36, 33, 0.12);
  color: #111;
  display: grid;
  gap: 12px;
  margin: 0 auto;
  min-height: 520px;
  max-height: calc(100vh - 190px);
  overflow: auto;
  padding: 28px;
  width: min(100%, 720px);
  -webkit-overflow-scrolling: touch;
}

.pdf-page h1,
.pdf-page h2,
.pdf-page p {
  margin: 0;
}

.pdf-page table {
  border-collapse: collapse;
  width: 100%;
}

.pdf-page th,
.pdf-page td {
  border-bottom: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}

.receipt-pdf {
  display: grid;
  gap: 18px;
  width: 100%;
}

.receipt-pdf-header,
.receipt-pdf-footer {
  border-bottom: 2px solid #111;
  display: grid;
  gap: 8px;
  padding-bottom: 14px;
  text-align: center;
}

.receipt-pdf-footer {
  border-bottom: 0;
  border-top: 1px solid #111;
  padding-bottom: 0;
  padding-top: 14px;
}

.receipt-pdf-header h1 {
  font-size: 24px;
  line-height: 1.1;
}

.receipt-custom-text {
  color: #222;
  font-size: 13px;
  line-height: 1.35;
}

.receipt-meta-grid {
  border: 1px solid #ddd;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.receipt-meta-grid div {
  border-bottom: 1px solid #e5e5e5;
  display: grid;
  gap: 3px;
  padding: 10px;
}

.receipt-meta-grid span,
.receipt-item-table td span,
.receipt-total-section span {
  color: #555;
  font-size: 12px;
}

.receipt-item-table td strong,
.receipt-item-table td span {
  display: block;
}

.receipt-line-number {
  color: #555;
  width: 34px;
}

.receipt-money {
  text-align: right;
  white-space: nowrap;
}

.receipt-total-section {
  border-top: 2px solid #111;
  display: grid;
  justify-self: end;
  min-width: 280px;
  padding-top: 10px;
  width: min(100%, 360px);
}

.receipt-total-section div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 6px 0;
}

.receipt-grand-total {
  border-top: 1px solid #111;
  font-size: 18px;
  margin-top: 4px;
  padding-top: 10px !important;
}

.customer-layout,
.server-grid,
.station-layout,
.admin-layout {
  display: grid;
  gap: 12px;
}

.customer-layout {
  grid-template-columns: minmax(0, 1fr) 360px;
}

.server-grid,
.station-layout,
.admin-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#admin-view .admin-layout {
  align-content: start;
  grid-template-columns: minmax(0, 1fr);
}

.modifier-admin-panel,
.integration-panel {
  grid-column: 1 / -1;
}

.admin-master-detail-panel {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(230px, 0.72fr) minmax(0, 1.64fr);
  grid-template-areas:
    "heading heading"
    "toolbar toolbar"
    "list mode"
    "list form"
    "list actions"
    "list message";
}

.admin-master-detail-panel > .panel-heading {
  grid-area: heading;
}

.admin-master-detail-panel > .admin-record-toolbar {
  grid-area: toolbar;
}

.admin-master-detail-panel > .record-mode-panel {
  grid-area: mode;
  margin-bottom: 0;
}

.admin-master-detail-panel > .settings-grid {
  grid-area: form;
}

.admin-master-detail-panel > .menu-item-editor-shell,
.admin-master-detail-panel > .admin-editor-shell {
  grid-area: form;
}

.admin-master-detail-panel > .config-actions {
  grid-area: actions;
  margin-top: 0;
}

.admin-master-detail-panel > p.quiet:not(.admin-list-count) {
  grid-area: message;
}

.admin-master-detail-panel > .admin-list-count {
  grid-area: count;
}

.modifier-admin-panel > .modifier-admin-list,
.staff-login-panel > .site-access-list {
  align-self: start;
  grid-area: list;
  max-height: min(560px, calc(100vh - 132px));
  overflow: auto;
  padding-right: 4px;
  position: sticky;
  top: 12px;
}

.admin-record-panel {
  display: grid;
  gap: 10px;
}

.admin-record-toolbar {
  align-items: center;
  background: #fbfaf5;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  padding: 8px;
}

.admin-list-search {
  color: var(--muted);
  display: grid;
  flex: 1 1 240px;
  font-size: 12px;
  font-weight: 900;
  gap: 4px;
  min-width: min(100%, 220px);
  text-transform: uppercase;
}

.admin-list-search input {
  min-height: 40px;
  width: 100%;
}

.admin-list-count {
  margin: -2px 0 2px;
}

.workflow-list-mode.admin-master-detail-panel {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "heading"
    "toolbar"
    "count"
    "list"
    "message";
}

.workflow-list-mode.modifier-admin-panel > .modifier-admin-list {
  grid-template-columns: repeat(auto-fill, minmax(min(310px, 100%), 1fr));
  max-height: none;
  overflow: visible;
  padding-right: 0;
  position: static;
}

.workflow-list-mode > .record-mode-panel,
.workflow-list-mode > .settings-grid,
.workflow-list-mode > .menu-item-editor-shell,
.workflow-list-mode > .admin-editor-shell,
.workflow-list-mode > .config-actions {
  display: none;
}

.workflow-list-mode > p.quiet:not(.admin-list-count) {
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfaf5;
  padding: 10px;
}

.workflow-form-mode > .admin-record-toolbar {
  justify-content: flex-start;
}

.workflow-form-mode .admin-record-toolbar .primary {
  display: none;
}

.workflow-list-mode .admin-record-toolbar [id$="-back"] {
  display: none;
}

.has-unsaved-changes > .record-mode-panel {
  border-color: #d1b356;
  box-shadow: inset 4px 0 0 #d1b356;
}

.has-unsaved-changes > .record-mode-panel::after {
  background: #fff3c4;
  border: 1px solid rgba(209, 179, 86, 0.5);
  border-radius: 999px;
  color: #6f5600;
  content: "Unsaved changes";
  font-size: 11px;
  font-weight: 900;
  justify-self: start;
  padding: 5px 9px;
  text-transform: uppercase;
}

.invalid-field {
  border-color: #bd4a3b !important;
  box-shadow: 0 0 0 3px rgba(189, 74, 59, 0.14);
}

.field-error {
  color: #9a2f24;
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-top: 4px;
}

.message-error {
  color: #9a2f24;
  font-weight: 800;
}

.required-marker {
  background: #f2eee5;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-block;
  font-size: 10px;
  font-weight: 900;
  margin-left: 6px;
  padding: 2px 6px;
  text-transform: uppercase;
}

.menu-panel {
  min-width: 0;
}

#customer-view.customer-tab-order .customer-layout {
  grid-template-columns: 1fr;
}

#customer-view.customer-tab-order .menu-panel {
  grid-column: 1 / -1;
  width: 100%;
  max-width: none;
  justify-self: stretch;
  display: grid;
  gap: 10px;
  padding-bottom: 76px;
}

#customer-view.customer-tab-order .menu-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  width: 100%;
}

#customer-view:not(.customer-tab-cart) .cart-panel,
#customer-view:not(.customer-tab-bill) .customer-bill-panel,
#customer-view:not(.customer-tab-stripepay) .stripe-pay-panel,
#customer-view:not(.customer-tab-profile) .customer-profile-panel,
#customer-view:not(.customer-tab-session) .session-guard-panel,
#customer-view:not(.customer-tab-specials) .customer-specials-panel,
#customer-view:not(.customer-tab-promos) .customer-promos-panel,
#customer-view:not(.customer-tab-paycall) .pay-call-panel {
  display: none !important;
}

#customer-view.customer-tab-specials .customer-specials-panel,
#customer-view.customer-tab-promos .customer-promos-panel,
#customer-view.customer-tab-cart .cart-panel,
#customer-view.customer-tab-bill .customer-bill-panel,
#customer-view.customer-tab-stripepay .stripe-pay-panel,
#customer-view.customer-tab-profile .customer-profile-panel,
#customer-view.customer-tab-session .session-guard-panel,
#customer-view.customer-tab-paycall .pay-call-panel {
  grid-column: 1 / -1;
  width: 100%;
  max-width: none;
  justify-self: stretch;
}

#customer-view.customer-tab-session .menu-panel,
#customer-view.customer-tab-stripepay .menu-panel,
#customer-view.customer-tab-profile .menu-panel,
#customer-view.customer-tab-paycall .menu-panel {
  display: contents;
}

#customer-view.customer-tab-cart .customer-layout,
#customer-view.customer-tab-bill .customer-layout,
#customer-view.customer-tab-stripepay .customer-layout,
#customer-view.customer-tab-profile .customer-layout,
#customer-view.customer-tab-session .customer-layout,
#customer-view.customer-tab-specials .customer-layout,
#customer-view.customer-tab-promos .customer-layout,
#customer-view.customer-tab-paycall .customer-layout {
  grid-template-columns: 1fr;
}

#customer-view.customer-tab-specials .customer-specials-panel,
#customer-view.customer-tab-promos .customer-promos-panel,
#customer-view.customer-tab-cart .cart-panel,
#customer-view.customer-tab-bill .customer-bill-panel,
#customer-view.customer-tab-stripepay .stripe-pay-panel,
#customer-view.customer-tab-profile .customer-profile-panel,
#customer-view.customer-tab-session .session-guard-panel,
#customer-view.customer-tab-paycall .pay-call-panel {
  text-align: left;
}

#customer-view.customer-tab-cart .cart-panel {
  position: static;
  top: auto;
  max-height: none;
  margin: 0;
}

.menu-hero {
  position: relative;
  height: 40px;
  min-height: 40px;
  border-radius: 8px;
  overflow: hidden;
  background: #ddd;
}

.menu-hero img {
  width: 100%;
  height: 40px;
  min-height: 40px;
  object-fit: cover;
  display: block;
}

.hero-copy {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(31, 36, 33, 0.76);
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hero-title-block,
.hero-meta-block {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.hero-title-block strong,
.hero-title-block span,
.hero-meta-block span,
.hero-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-copy span,
.hero-title-block span {
  display: block;
  font-size: 11px;
}

.hero-copy small {
  color: rgba(255, 255, 255, 0.86);
  font-size: 11px;
}

.hero-meta-block {
  text-align: right;
}

.customer-mini-header {
  display: none;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  min-height: 34px;
  padding: 4px 0 8px;
}

.customer-mini-header strong,
.customer-mini-header span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-mini-header span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.preference-row,
.tier-row,
.bill-tools,
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.preference-filter-panel {
  background: transparent;
  border: 0;
}

.preference-filter-panel summary {
  width: fit-content;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 14px;
  font-weight: 800;
  cursor: pointer;
}

.preference-filter-panel .preference-row {
  margin: 8px 0 0;
}

.category-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  display: grid;
  gap: 8px;
}

.tier-row {
  margin: 0;
}

.tier-button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
  font-weight: 800;
}

.tier-button.sub {
  min-height: 38px;
  font-weight: 700;
  background: #fbfbf8;
}

.tier-button.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.chip,
.secondary,
.primary,
.icon-button {
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  min-height: 40px;
  padding: 0 14px;
}

.chip.active,
.primary {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.secondary {
  background: var(--soft);
}

.icon-button {
  width: 40px;
  padding: 0;
}

.icon-button.tiny {
  width: auto;
  min-height: 30px;
  padding: 0 8px;
  font-size: 14px;
}

.full {
  width: 100%;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 10px;
  width: 100%;
}

.menu-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  overflow: hidden;
}

.menu-card-body {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.menu-item-thumb,
.admin-item-thumb {
  aspect-ratio: 1;
  background: #ece9de;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
}

.menu-item-thumb {
  grid-column: 1;
  grid-row: 1;
  height: 72px;
  width: 72px;
}

.admin-item-thumb {
  height: 54px;
  width: 54px;
}

.menu-card header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  min-width: 0;
}

.menu-card header > div:first-child {
  min-width: 0;
}

.menu-card h3 {
  overflow-wrap: anywhere;
  margin: 0;
}

.menu-card-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}

.favorite-button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf5;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.favorite-button.active {
  color: #bd4a3b;
  border-color: #d8a29a;
  background: #fff1ef;
}

.menu-price {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 96px;
  min-width: 0;
  text-align: right;
  line-height: 1.1;
  white-space: normal;
}

.original-price {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: line-through;
}

.menu-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
  margin: 0;
}

.tag-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.menu-card-body > .primary,
.menu-card-body > .secondary {
  width: 100%;
}

.order-cart-bar {
  position: sticky;
  bottom: 10px;
  z-index: 16;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: min(100%, 680px);
  justify-self: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 30px rgba(31, 36, 33, 0.16);
}

.order-cart-bar div {
  display: grid;
  gap: 2px;
}

.order-cart-bar span {
  color: var(--muted);
  font-weight: 800;
}

.order-cart-bar button {
  min-width: 132px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.tag,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--green-soft);
  color: var(--green);
}

.tag.warning,
.pill.warning {
  background: #f5e6cf;
  color: #815313;
}

.pill.success,
.tag.success {
  background: #dcebe3;
  color: var(--green);
}

.cart-panel,
.operations-panel {
  padding: 16px;
}

#admin-view .operations-panel {
  padding: 12px;
}

.cart-panel {
  text-align: left;
}

.cart-panel .panel-heading,
.cart-panel .cart-summary div {
  text-align: left;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.panel-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.cart-items,
.customer-bill-items,
.ticket-list,
.event-log,
.analysis-list,
.modifier-groups,
.modifier-admin-list,
.site-access-list,
.qr-preview-grid {
  display: grid;
  gap: 10px;
}

#admin-view .modifier-admin-list,
#admin-view .site-access-list {
  gap: 7px;
}

.cart-item,
.bill-draft-card,
.ticket,
.event,
.analysis-row,
.modifier-group,
.modifier-admin-card,
.site-access-card,
.qr-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfbf8;
}

#admin-view .modifier-admin-card,
#admin-view .site-access-card {
  gap: 7px;
  padding: 9px;
}

.cart-item {
  display: grid;
  gap: 8px;
}

.inactive-record {
  opacity: 0.68;
  background: #f1f1ec;
  border-style: dashed;
}

.bill-draft-section {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 14px;
}

.customer-bill-panel {
  align-self: start;
}

.bill-actions {
  margin-bottom: 10px;
}

.compact-heading {
  margin-bottom: 10px;
}

.bill-draft-card {
  display: grid;
  gap: 10px;
}

.bill-draft-card[draggable="true"] {
  cursor: grab;
}

.bill-draft-card.locked {
  opacity: 0.82;
}

.bill-draft-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.split-bill-grid {
  display: grid;
  gap: 10px;
}

.bill-overview-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.bill-overview-strip > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  display: grid;
  gap: 4px;
}

.bill-overview-strip span,
.bill-column-total span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.bill-overview-strip strong {
  font-size: 18px;
}

.bill-column {
  min-height: 160px;
  border: 1px dashed #b9c8bd;
  border-radius: 8px;
  background: #fbfaf5;
  padding: 10px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.bill-column.paid {
  border-style: solid;
  border-color: #c8cec8;
  background: #f0f1ef;
}

.bill-column.paid .bill-draft-card,
.bill-column.paid .bill-column-total {
  background: #f7f7f4;
  opacity: 0.72;
}

.bill-column.paid header {
  opacity: 0.72;
}

.bill-column.paid button:disabled {
  cursor: not-allowed;
}

.bill-column.paid [data-bill-receipt] {
  cursor: pointer;
  opacity: 1;
}

.paid-bills-hidden-note {
  margin: 0;
  padding: 8px 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfaf5;
}

.bill-column header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.bill-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.bill-title-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.bill-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.bill-column-total {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  display: grid;
  gap: 7px;
}

.bill-items-total-divider {
  border-top: 2px solid var(--line);
  margin: 2px 0;
}

.session-action-log {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 12px;
}

.bill-column-total div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.bill-column-total .total {
  border-top: 1px solid var(--line);
  padding-top: 7px;
  font-size: 17px;
}

.bill-payment-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 8px;
  margin-top: 2px;
}

.bill-payment-actions button {
  min-height: 42px;
}

.pending-bill-column {
  border-style: solid;
  margin-bottom: 10px;
}

.item-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.item-actions button {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

.modifier-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.modifier-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.modifier-option {
  min-height: 42px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.modifier-option:first-of-type {
  border-top: 0;
}

.modifier-option input {
  width: 18px;
  height: 18px;
}

.modifier-option small {
  color: var(--muted);
  font-weight: 700;
}

.modifier-sheet {
  display: none;
}

.modifier-sheet.open {
  display: block;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(31, 36, 33, 0.46);
}

.sheet-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 41;
  max-height: 86vh;
  overflow: auto;
  background: #fff;
  border-radius: 8px 8px 0 0;
  border: 1px solid var(--line);
  padding: 12px;
  box-shadow: var(--shadow);
}

.sheet-handle {
  width: 44px;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
  margin: 0 auto 12px;
}

.sheet-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding: 14px 0;
  font-size: 18px;
}

.modifier-admin-card {
  display: grid;
  gap: 10px;
}

.admin-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modifier-admin-card.selected,
.site-access-card.selected {
  border-color: var(--green);
  background: var(--green-soft);
  box-shadow: inset 4px 0 0 var(--green);
}

.modifier-admin-card.selected strong,
.site-access-card.selected strong {
  color: var(--green);
}

.empty-editor-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfaf5;
  display: grid;
  gap: 6px;
  padding: 14px;
}

.focused-editor-form {
  align-items: start;
}

.menu-name-label {
  font-weight: 800;
}

.menu-name-label input {
  margin-top: 6px;
  font-size: 18px;
  font-weight: 800;
}

.menu-image-editor {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(96px, 140px) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #faf9f4;
}

.menu-image-preview-card {
  min-height: 118px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.menu-image-preview-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.menu-image-preview-card.has-image img {
  display: block;
}

.menu-image-preview-card.has-image span {
  display: none;
}

.menu-image-controls {
  display: grid;
  gap: 10px;
}

.menu-editor-actions {
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

/* ==========================================================================
   Admin editor shell primitives
   Shared two-column "form + live preview" editor used by the menu item, staff,
   station, site, and receipt editors. The canonical primitives are prefixed
   `.admin-editor-*`; the original `.menu-item-*` / `.menu-editor-*` names are
   kept as aliases so existing markup keeps working with no visual change.
   New admin editors should reach for `.admin-editor-shell` +
   `.admin-editor-layout` + `.admin-editor-preview-panel` +
   `.admin-editor-sticky-actions`, plus `.editor-section*` for field groups.
   See docs/admin-editor-shell.md.
   ========================================================================== */
.menu-item-editor-shell,
.admin-editor-shell {
  width: 100%;
}

.menu-item-editor-layout,
.admin-editor-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr);
}

.menu-item-preview-panel,
.admin-editor-preview-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf5;
  display: grid;
  gap: 10px;
  padding: 12px;
}

/* Preview card body reset shared by every editor's live preview */
.admin-editor-preview,
.menu-item-editor-preview,
.staff-login-editor-preview,
.station-editor-preview,
.site-editor-preview {
  margin: 0;
}

.receipt-editor-live-preview {
  background: #fff;
  border: 1px dashed var(--line);
  font-size: 12px;
  padding: 12px;
}

.receipt-line-rows-panel {
  display: grid;
  gap: 8px;
}

.receipt-line-rows-header {
  color: var(--muted);
  display: grid;
  font-size: 11px;
  font-weight: 900;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 88px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.receipt-line-rows-list {
  display: grid;
  gap: 8px;
}

.receipt-line-row {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 88px;
}

.receipt-line-field {
  display: grid !important;
  gap: 4px !important;
  margin: 0;
}

.receipt-line-remove {
  justify-self: stretch;
  min-width: 0;
}

.menu-item-preview-thumb {
  min-height: 120px;
}

.menu-item-preview-steps {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.menu-item-preview-step {
  border-top: 1px dashed var(--line);
  padding-top: 8px;
}

.menu-item-preview-step ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.menu-item-preview-step li {
  margin-bottom: 4px;
}

.preview-option-price {
  color: var(--green);
  font-weight: 800;
}

.editor-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf5;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.editor-section-heading {
  display: grid;
  gap: 4px;
}

.editor-section-heading strong {
  font-size: 16px;
}

.editor-section-heading p {
  margin: 0;
}

.editor-section-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}

.option-rows-panel {
  display: grid;
  gap: 8px;
}

.option-rows-header {
  color: var(--muted);
  display: grid;
  font-size: 11px;
  font-weight: 900;
  gap: 8px;
  grid-template-columns: minmax(0, 1.4fr) minmax(88px, 0.7fr) 72px 88px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.option-rows-header-paid {
  grid-template-columns: minmax(0, 1.4fr) minmax(88px, 0.7fr) 88px;
}

.option-rows-list {
  display: grid;
  gap: 8px;
}

.option-row {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: 72px minmax(0, 1.4fr) minmax(88px, 0.7fr) 88px;
}

.option-row-default {
  align-items: center;
  color: var(--muted);
  display: grid !important;
  font-size: 12px;
  font-weight: 800;
  gap: 6px !important;
  grid-template-columns: auto 1fr;
  margin: 0;
}

.option-row-default input {
  margin: 0;
  min-height: auto;
  width: auto;
}

.option-row-field {
  display: grid !important;
  gap: 4px !important;
  margin: 0;
}

.option-row-price-field {
  position: relative;
}

.option-row-currency {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  left: 10px;
  position: absolute;
  top: 34px;
}

.option-row-price-field .option-row-price {
  padding-left: 22px;
}

.option-row-remove {
  justify-self: stretch;
  min-width: 0;
}

.menu-editor-sticky-actions .primary:not([hidden]),
.menu-editor-sticky-actions .secondary:not([hidden]),
.admin-editor-sticky-actions .primary:not([hidden]),
.admin-editor-sticky-actions .secondary:not([hidden]) {
  min-height: 44px;
}

.compact-select-label {
  display: grid;
  gap: 4px;
  min-width: 130px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

.compact-select-label select {
  min-height: 32px;
  width: 100%;
}

.modifier-admin-card:has(> .admin-item-thumb),
.site-access-card:has(> .admin-item-thumb),
.schedule-card:has(> .admin-item-thumb),
.cart-item:has(> .admin-item-thumb),
.bill-draft-card:has(> .admin-item-thumb) {
  align-items: start;
  grid-template-columns: 54px minmax(0, 1fr);
}

.modifier-admin-card:has(> .admin-item-thumb) > :not(.admin-item-thumb),
.site-access-card:has(> .admin-item-thumb) > :not(.admin-item-thumb),
.schedule-card:has(> .admin-item-thumb) > :not(.admin-item-thumb),
.cart-item:has(> .admin-item-thumb) > :not(.admin-item-thumb),
.bill-draft-card:has(> .admin-item-thumb) > :not(.admin-item-thumb) {
  grid-column: 2;
}

.modifier-admin-card > .admin-item-thumb,
.site-access-card > .admin-item-thumb,
.schedule-card > .admin-item-thumb,
.cart-item > .admin-item-thumb,
.bill-draft-card > .admin-item-thumb {
  grid-column: 1;
  grid-row: 1 / span 4;
}

.modifier-admin-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modifier-progress {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0;
}

.modifier-step {
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.modifier-step.active {
  color: var(--ink);
  border-color: var(--green);
  background: var(--green-soft);
}

.item-note-label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
}

.item-note-label textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  font: inherit;
}

.wizard-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.wizard-actions #add-configured-item {
  grid-column: 1 / -1;
}

.site-access-list {
  margin-top: 12px;
}

.site-access-card {
  display: grid;
  gap: 8px;
}

.qr-preview-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.qr-card {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 8px;
}

.qr-box {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--ink);
}

.qr-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-url {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 11px;
  color: var(--muted);
}

.cart-summary {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  margin: 14px 0;
  display: grid;
  gap: 8px;
}

.cart-bill-routing {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: 10px;
}

.cart-bill-routing label {
  display: grid;
  gap: 6px;
  font-weight: 900;
}

.cart-bill-routing select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
}

.cart-summary div {
  display: flex;
  justify-content: space-between;
}

.cart-summary .total {
  font-size: 18px;
}

.quiet {
  font-size: 13px;
  line-height: 1.4;
  margin-top: 12px;
}

.table-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.table-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf5;
  color: var(--muted);
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 800;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}

.legend-dot.empty {
  background: #b9d7c6;
}

.legend-dot.session {
  background: #d1b356;
}

.legend-dot.active {
  background: #96b9d7;
}

.legend-dot.cleaning {
  background: #bd4a3b;
}

.table-map {
  display: grid;
  gap: 12px;
}

.table-map-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(31, 36, 33, 0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(31, 36, 33, 0.04) 1px, transparent 1px),
    #fbfaf5;
  background-size: 52px 52px;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.floor-map-labels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.floor-map-labels span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  padding: 7px 9px;
  text-align: center;
  text-transform: uppercase;
}

.selected-table-summary {
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fbfbf8;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(120px, 0.6fr) minmax(0, 1.4fr) auto;
  padding: 12px;
}

.selected-table-summary strong {
  display: block;
  font-size: 22px;
  line-height: 1.1;
}

.selected-table-summary p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  margin: 4px 0 0;
}

.selected-table-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.selected-table-metrics span {
  border: 1px solid rgba(31, 36, 33, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  min-width: 0;
  padding: 8px;
}

.selected-table-metrics strong {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-table-metrics small {
  color: var(--muted);
  display: block;
  font-size: 10px;
  font-weight: 800;
  margin-top: 3px;
  text-transform: uppercase;
}

.table-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 8px;
}

.table-section-divider {
  height: 1px;
  background: var(--line);
}

.table-section-caption {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.table-section-empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding: 10px;
}

.table-tile {
  min-height: 126px;
  aspect-ratio: 1 / 1;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fbfbf8;
  padding: 8px;
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  justify-items: start;
  gap: 5px;
  text-align: left;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.table-tile.active {
  border-color: var(--green);
  background: var(--green-soft);
}

.table-tile-top {
  align-items: start;
  display: grid;
  gap: 4px;
  grid-template-columns: auto minmax(0, 1fr);
  width: 100%;
}

.table-tile-number {
  font-size: 24px;
  line-height: 1;
  font-weight: 900;
}

.table-status-pill,
.table-payment-chip {
  border-radius: 999px;
  display: block;
  max-width: 100%;
  overflow: hidden;
  padding: 4px 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-status-pill {
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  font-size: 10px;
  font-weight: 900;
  justify-self: end;
  line-height: 1;
  text-transform: uppercase;
}

.table-payment-chip {
  background: rgba(31, 36, 33, 0.1);
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.table-server {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-tile-bottom {
  align-self: end;
  display: grid;
  gap: 3px;
  width: 100%;
}

.table-tile-bottom strong {
  color: var(--ink);
  display: block;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.1;
}

.table-tile-bottom em {
  color: var(--ink);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-empty {
  border-color: #46935f;
  background: #dff4e4;
}

.table-session {
  border-color: #c39a22;
  background: #fff0aa;
}

.table-active {
  border-color: #2f6f9f;
  background: #d8ecfa;
}

.table-needs-server {
  border-color: #c39733;
  background: #fff1d7;
}

.table-bill-requested {
  border-color: #bb4f3d;
  background: #f5d3ce;
}

.table-cleaning {
  border-color: #bd4a3b;
  background: #f5c7bf;
}

.table-alert-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 100%;
  overflow: hidden;
}

.table-alert-badges span {
  border-radius: 999px;
  background: rgba(31, 36, 33, 0.12);
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.floor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
  gap: 16px;
}

.floor-plan-panel {
  min-height: 680px;
}

.floor-zones {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.floor-zones span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f6f4ed;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.floor-grid {
  min-height: 560px;
  --floor-grid-rows: 5;
  --floor-grid-cols: 5;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(to right, rgba(30, 36, 34, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(30, 36, 34, 0.08) 1px, transparent 1px),
    #fbfaf5;
  background-size: calc(100% / var(--floor-grid-cols)) calc(100% / var(--floor-grid-rows));
  display: grid;
  grid-template-columns: repeat(var(--floor-grid-cols), minmax(56px, 1fr));
  grid-template-rows: repeat(var(--floor-grid-rows), minmax(58px, 1fr));
  gap: 10px;
  padding: 12px;
}

.floor-table {
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  min-width: 0;
  overflow: hidden;
}

.floor-grid.editable {
  outline: 2px dashed rgba(37, 95, 75, 0.3);
  outline-offset: 4px;
}

.floor-table.draggable {
  cursor: grab;
}

.floor-table.draggable:active {
  cursor: grabbing;
}

.floor-table strong {
  font-size: 18px;
}

.floor-table span,
.floor-table em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.floor-table.active {
  border-color: var(--green);
  background: var(--green-soft);
}

.floor-table.empty {
  border-color: #b9d7c6;
}

.floor-table.session {
  border-color: #d1b356;
}

.floor-table.cleaning {
  border-color: #bd4a3b;
}

.bill-status-list {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.bill-status-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbf8;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.bill-status-card.paid {
  background: var(--green-soft);
  border-color: #b9d7c6;
}

.bill-status-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.delivery-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.delivery-row .tag {
  min-width: 0;
  overflow-wrap: anywhere;
}

.delivery-row button {
  min-height: 32px;
  padding: 7px 10px;
}

.server-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.shift-report {
  display: grid;
  gap: 10px;
}

.shift-total-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbf8;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.customer-request-actions,
.receipt-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.pay-call-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 10px;
}

.pay-call-action {
  min-height: 126px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf5;
  color: var(--ink);
  padding: 12px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 7px;
  text-align: center;
}

.pay-call-action.primary-action {
  border-color: var(--green);
  background: var(--green-soft);
}

.pay-call-action .action-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fff;
  color: var(--green);
  border: 1px solid var(--line);
  font-size: 22px;
  font-weight: 900;
}

.pay-call-action small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.memo-label {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

.memo-label textarea {
  min-height: 84px;
  resize: vertical;
}

.stripe-placeholder {
  display: grid;
  gap: 10px;
}

.stripe-card-placeholder {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf5;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.request-queue {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbf8;
  padding: 12px;
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.table-control-selector {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbf8;
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
}

.table-control-selector label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 900;
  gap: 6px;
  text-transform: uppercase;
}

.table-control-selector select {
  width: 100%;
}

.table-state-flow {
  display: grid;
  gap: 8px;
}

.table-state-callout {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.table-state-callout strong {
  font-size: 15px;
}

.table-state-callout span {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.table-state-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.table-state-steps span {
  background: #f2eee5;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  overflow: hidden;
  padding: 6px 4px;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.table-state-steps span.done {
  background: rgba(36, 108, 78, 0.12);
  border-color: rgba(36, 108, 78, 0.28);
  color: var(--forest);
}

.table-state-steps span.active {
  background: var(--forest);
  border-color: var(--forest);
  color: #fff;
}

.metric-grid > div {
  background: #fbfbf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.metric-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}

.ticket {
  display: grid;
  gap: 10px;
}

.ticket header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.ticket footer {
  display: flex;
  gap: 8px;
}

.station-status-button {
  min-width: 74px;
}

.station-status-button.active {
  border-color: transparent;
  color: #fff;
  font-weight: 900;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.station-status-button.active.acknowledged {
  background: #2f6f95;
}

.station-status-button.active.preparing {
  background: #c2922e;
  color: #16231d;
}

.station-status-button.active.ready {
  background: #1f6f52;
}

.filters label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.settings-grid label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
}

.full-span {
  grid-column: 1 / -1;
}

.form-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf5;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.allergen-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.allergen-option {
  align-items: start;
  border: 1px solid rgba(31, 36, 33, 0.1);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  display: grid !important;
  gap: 2px !important;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 8px;
}

.allergen-option input {
  margin-top: 2px;
}

.allergen-option span,
.allergen-option small {
  min-width: 0;
}

.allergen-option span {
  font-size: 13px;
  font-weight: 900;
}

.allergen-option small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.filters input,
.filters select,
.settings-grid input,
.settings-grid select,
.settings-grid textarea {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
}

.settings-grid textarea {
  min-height: 84px;
  padding: 10px;
  resize: vertical;
}

.rich-editor-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, max-content));
  align-items: end;
  gap: 8px;
  margin: 12px 0;
}

.editor-select-control {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 4px;
  text-transform: uppercase;
}

.editor-select-control select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 8px;
  text-transform: none;
}

.editor-file-button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf5;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  font-weight: 800;
}

.editor-file-button input {
  display: none;
}

.editor-image-label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
}

.editor-image-label input {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
}

.rich-html-editor {
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  display: grid;
  gap: 10px;
  line-height: 1.45;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}

.rich-html-editor:focus {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.rich-html-editor img,
.promotion-html img {
  width: 100%;
  max-width: 100% !important;
  height: auto !important;
  max-height: 220px;
  object-fit: cover;
  border-radius: 8px;
}

.rich-html-editor *,
.promotion-html * {
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.rich-html-editor p,
.rich-html-editor h1,
.rich-html-editor h2,
.rich-html-editor h3,
.rich-html-editor h4,
.rich-html-editor h5,
.rich-html-editor h6,
.promotion-html p,
.promotion-html h1,
.promotion-html h2,
.promotion-html h3,
.promotion-html h4,
.promotion-html h5,
.promotion-html h6 {
  margin: 0 0 8px;
}

.rich-html-editor table,
.promotion-html table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  white-space: normal;
}

.rich-html-editor pre,
.promotion-html pre {
  white-space: pre-wrap;
}

.rich-html-editor h2,
.promotion-html h2 {
  font-size: 20px;
}

.rich-html-editor hr,
.promotion-html hr {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
}

.promo-cta {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  padding: 8px 12px;
  font-weight: 800;
  text-decoration: none;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
}

.workflow-steps {
  display: grid;
  gap: 8px;
}

.workflow-step {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf5;
  padding: 10px;
  display: grid;
  gap: 4px;
}

.workflow-step strong {
  font-size: 14px;
}

.workflow-step span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.workflow-step.active {
  border-color: var(--green);
  background: var(--green-soft);
}

.workflow-step.done {
  border-color: #b9d7c6;
  background: #eef8f1;
}

.focused-page {
  display: grid;
  gap: 14px;
}

.schedule-grid,
.promotion-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr);
  max-width: 100%;
  min-width: 0;
}

.schedule-card,
.promotion-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf5;
  overflow: hidden;
  max-width: 100%;
  min-width: 0;
}

.schedule-card {
  padding: 12px;
  display: grid;
  gap: 10px;
}

.schedule-card h3,
.promotion-card h3 {
  font-size: 16px;
}

.schedule-card p,
.promotion-card p {
  color: var(--muted);
  line-height: 1.45;
}

.promotion-card {
  display: grid;
}

.promotion-card img {
  width: 100%;
  max-width: 100%;
  height: 150px;
  object-fit: cover;
  background: var(--soft);
}

.promotion-card-body {
  padding: 12px;
  display: grid;
  gap: 9px;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}

.promotion-card-top {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.promotion-html {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.promotion-html a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.customer-promos-panel {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.wide-label {
  grid-column: 1 / -1;
}

.compact-button {
  /* Touch-target minimum kept at 44px (was 32px); .rich-editor-toolbar already
     uses an auto-fit grid that wraps rows, so raising the height here does not
     cause the 8-button promotions toolbar to overflow. */
  min-height: 44px;
  padding: 7px 10px;
}

.config-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
}

.record-mode-panel {
  align-items: center;
  background: #f6f4ed;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 12px;
  padding: 12px;
}

.record-mode-panel strong,
.record-mode-panel p {
  margin: 0;
}

.record-mode-panel strong {
  font-size: 17px;
  font-weight: 850;
}

.record-mode-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.record-mode-actions .active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.record-mode-panel.editor-active {
  background: #fff8df;
  border-color: #d4b455;
}

.editor-selected-name {
  display: inline-block;
  font-size: 1.16em;
  font-weight: 900;
  color: var(--green);
}

.compact-record-mode {
  grid-template-columns: 1fr;
}

.config-actions.inline-actions {
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  margin-top: 8px;
}

.compact-heading {
  margin-top: 14px;
  margin-bottom: 8px;
}

.orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.orders-table th,
.orders-table td {
  border-bottom: 1px solid var(--line);
  padding: 11px 8px;
  text-align: left;
}

.orders-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.analysis-row {
  display: grid;
  gap: 7px;
}

.analysis-top {
  display: flex;
  justify-content: space-between;
}

.bar {
  height: 10px;
  background: var(--soft);
  border-radius: 999px;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  background: var(--blue);
}

@media (max-width: 1050px) {
  .app-shell,
  .customer-layout,
  .server-grid,
  .station-layout,
  .admin-layout,
  .floor-layout {
    grid-template-columns: 1fr;
  }

  #admin-view.active {
    display: block;
    margin-left: 0;
  }

  #admin-view > .section-tabs-panel {
    border-radius: 8px;
    padding: 10px;
    max-height: none;
    overflow: visible;
    position: static;
  }

  #admin-view .admin-tab-group .section-tabs {
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  }

  .admin-master-detail-panel {
    grid-template-columns: 1fr;
    grid-template-areas:
      "heading"
      "toolbar"
      "mode"
      "list"
      "form"
      "actions"
      "message";
  }

  .modifier-admin-panel > .modifier-admin-list,
  .staff-login-panel > .site-access-list {
    max-height: none;
    overflow: visible;
    position: static;
  }

  .workflow-list-mode.admin-master-detail-panel {
    grid-template-areas:
      "heading"
      "toolbar"
      "count"
      "list"
      "message";
  }

  .admin-record-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .sidebar {
    position: static;
  }

  .role-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .status-strip {
    display: none;
  }
}

@media (max-width: 720px) {
  .workspace {
    padding: 16px;
  }

  .topbar,
  .panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .role-nav,
  .menu-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .admin-command-header,
  .admin-status-grid,
  .admin-action-grid {
    grid-template-columns: 1fr;
  }

  .admin-tab-group .section-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-master-detail-panel {
    gap: 10px;
  }

  .floor-grid {
    min-height: 460px;
    grid-template-columns: repeat(var(--floor-grid-cols), minmax(48px, 1fr));
    grid-template-rows: repeat(var(--floor-grid-rows), minmax(60px, 1fr));
    gap: 6px;
  }

  .floor-table {
    padding: 6px;
  }

  .floor-zones {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .floor-map-labels {
    grid-template-columns: 1fr;
  }

  .selected-table-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .table-map-shell {
    padding: 10px;
  }

  .menu-image-editor {
    grid-template-columns: 1fr;
  }

  .menu-item-editor-layout,
  .admin-editor-layout {
    grid-template-columns: 1fr;
  }

  .menu-item-preview-panel,
  .admin-editor-preview-panel {
    order: -1;
  }

  .option-rows-header,
  .option-row {
    grid-template-columns: 1fr;
  }

  .option-rows-header {
    display: none;
  }

  .option-row-default[hidden] {
    display: none !important;
  }

  .receipt-line-rows-header,
  .receipt-line-row {
    grid-template-columns: 1fr;
  }

  .receipt-line-rows-header {
    display: none;
  }

  .menu-editor-sticky-actions,
  .admin-editor-sticky-actions {
    backdrop-filter: blur(6px);
    background: rgba(251, 250, 245, 0.96);
    border-top: 1px solid var(--line);
    bottom: 0;
    margin-bottom: -16px;
    padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px));
    position: sticky;
    z-index: 20;
  }

  .menu-image-preview-card {
    min-height: 150px;
  }
}

/* Mobile-first pilot overrides */
.app-shell {
  display: block;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 12px;
  gap: 12px;
}

.brand {
  justify-content: space-between;
}

.brand-mark {
  width: 38px;
  height: 38px;
}

.role-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.nav-button {
  min-height: 44px;
  padding: 8px 6px;
  text-align: center;
  font-size: 12px;
}

.workspace {
  padding: 12px;
}

.topbar {
  align-items: stretch;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.topbar-actions {
  display: grid;
  grid-template-columns: 1fr;
}

.role-switcher-label,
.role-switcher-label select {
  width: 100%;
}

.hamburger-button {
  width: 100%;
}

.role-task-menu {
  left: 0;
  right: auto;
}

h1 {
  font-size: 22px;
}

.session-card {
  min-width: 0;
}

.customer-layout,
.server-grid,
.station-layout,
.admin-layout,
.menu-grid,
.metric-grid {
  grid-template-columns: 1fr;
}

.menu-hero {
  height: 40px;
  min-height: 40px;
  margin-bottom: 8px;
}

.menu-hero img {
  height: 40px;
  min-height: 40px;
}

.hero-copy {
  left: 12px;
  right: 12px;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
}

.hero-title-block strong {
  font-size: 13px;
}

.category-panel {
  position: sticky;
  top: 78px;
  z-index: 10;
  box-shadow: 0 10px 28px rgba(31, 36, 33, 0.08);
}

.tier-row,
.preference-row {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.tier-row::-webkit-scrollbar,
.preference-row::-webkit-scrollbar {
  display: none;
}

.tier-button,
.chip {
  flex: 0 0 auto;
}

.menu-card {
  padding: 13px;
}

@media (max-width: 520px) {
  .customer-mini-header {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .customer-mini-header .compact-button {
    min-height: 44px;
    padding: 5px 6px;
    font-size: 12px;
  }

  .hero-copy {
    gap: 8px;
    padding: 5px 8px;
  }

  .hero-meta-block span,
  .hero-copy small {
    font-size: 10px;
  }

  .menu-card {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 10px;
  }

  .menu-item-thumb {
    height: 64px;
    width: 64px;
  }

  .menu-card header {
    grid-template-columns: 1fr;
  }

  .menu-card-actions {
    justify-content: space-between;
  }

  .menu-price {
    margin-left: auto;
    max-width: none;
  }
}

.menu-card header,
.ticket header,
.analysis-top {
  align-items: flex-start;
  flex-direction: column;
}

.cart-panel {
  position: sticky;
  bottom: 0;
  z-index: 18;
  margin: 0 -12px -12px;
  border-radius: 8px 8px 0 0;
  max-height: 58vh;
  overflow: auto;
}

.cart-summary {
  margin: 10px 0;
}

.primary,
.secondary {
  min-height: 46px;
}

.bill-tools,
.filters,
.ticket footer {
  display: grid;
  grid-template-columns: 1fr;
}

.orders-table {
  display: block;
  overflow-x: auto;
  white-space: nowrap;
}

/* Tablet portrait — 600–899px (redesign plan §4.2 Phase 9) */
@media (min-width: 600px) and (max-width: 899px) {
  .app-shell {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
  }

  body.sidebar-rail-expanded .app-shell {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .sidebar {
    position: static;
    padding: 10px 6px;
    gap: 10px;
    align-items: stretch;
  }

  .sidebar-rail-toggle {
    display: grid;
    place-items: center;
    min-height: 44px;
    min-width: 44px;
    margin-left: auto;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-weight: 900;
    padding: 0;
    flex: none;
  }

  .brand {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .brand > div:not(.brand-mark) {
    display: none;
  }

  body.sidebar-rail-expanded .brand {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
  }

  body.sidebar-rail-expanded .brand > div:not(.brand-mark) {
    display: block;
    min-width: 0;
  }

  body.sidebar-rail-expanded .sidebar-rail-toggle {
    margin-left: auto;
  }

  .role-nav {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .nav-button {
    min-height: 44px;
    padding: 8px 4px;
    text-align: center;
    font-size: 0;
    line-height: 1;
    display: grid;
    place-items: center;
  }

  .nav-button::before {
    content: attr(data-rail-label);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: -0.02em;
  }

  body.sidebar-rail-expanded .nav-button {
    font-size: 13px;
    text-align: left;
    padding: 8px 10px;
    display: block;
  }

  body.sidebar-rail-expanded .nav-button::before {
    content: none;
  }

  .admin-sidebar-sections {
    display: none !important;
  }

  .status-strip,
  .sidebar-logout,
  .sidebar-build-info {
    display: none;
  }

  body.sidebar-rail-expanded .status-strip {
    display: grid;
  }

  body.sidebar-rail-expanded .sidebar-logout,
  body.sidebar-rail-expanded .sidebar-build-info {
    display: flex;
  }

  .workspace {
    padding: 16px;
  }

  .topbar {
    align-items: center;
    flex-direction: row;
    margin-bottom: 16px;
  }

  .topbar-actions {
    display: flex;
  }

  .role-switcher-label,
  .role-switcher-label select {
    width: auto;
  }

  .hamburger-button {
    width: auto;
  }

  .settings-grid:has(> :nth-child(6)) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-active-view="server"] .primary,
  body[data-active-view="server"] .secondary,
  body[data-active-view="server"] .chip,
  body[data-active-view="server"] .tier-button,
  body[data-active-view="server"] .station-status-button,
  body[data-active-view="floor"] .primary,
  body[data-active-view="floor"] .secondary,
  body[data-active-view="floor"] .table-tile,
  body[data-active-view="stations"] .primary,
  body[data-active-view="stations"] .secondary,
  body[data-active-view="stations"] .station-status-button {
    min-height: 44px;
  }

  .server-grid,
  .station-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .table-section-grid {
    grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  }

  .table-tile {
    min-height: 120px;
  }
}

/* Tablet landscape — 900px+ (was 860px; redesign plan §4.2 Phase 9) */
@media (min-width: 900px) {
  .app-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .sidebar {
    position: static;
    padding: 24px 18px;
    gap: 24px;
  }

  body[data-active-view="admin"] .admin-sidebar-sections {
    display: grid;
    max-height: calc(100vh - 260px);
    overflow: auto;
  }

  body[data-active-view="admin"] .admin-sidebar-sections .section-tab-button {
    min-height: 44px;
  }

  .brand {
    justify-content: flex-start;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
  }

  .role-nav {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .nav-button {
    min-height: 44px;
    padding: 12px 14px;
    text-align: left;
    font-size: 16px;
  }

  body[data-active-view="admin"] .nav-button {
    min-height: 44px;
    padding: 10px 12px;
    font-size: 14px;
  }

  .workspace {
    padding: 24px;
  }

  .topbar {
    align-items: center;
    flex-direction: row;
    margin-bottom: 22px;
  }

  .topbar-actions {
    display: flex;
  }

  .role-switcher-label,
  .role-switcher-label select {
    width: auto;
  }

  .hamburger-button {
    width: auto;
  }

  .role-task-menu {
    left: auto;
    right: 0;
  }

  #admin-view.active {
    display: grid;
    gap: 10px;
  }

  #admin-view > .section-tabs-panel {
    display: none;
  }

  #admin-view > .admin-command-center,
  #admin-view > .admin-layout {
    min-width: 0;
  }

  #admin-view .admin-tab-group .section-tabs {
    grid-template-columns: 1fr;
  }

  .admin-master-detail-panel {
    grid-template-columns: minmax(230px, 0.72fr) minmax(0, 1.64fr);
    grid-template-areas:
      "heading heading"
      "toolbar toolbar"
      "list mode"
      "list form"
      "list actions"
      "list message";
  }

  .modifier-admin-panel > .modifier-admin-list,
  .staff-login-panel > .site-access-list {
    max-height: min(560px, calc(100vh - 132px));
    overflow: auto;
    position: sticky;
    top: 12px;
  }

  h1 {
    font-size: 28px;
  }

  .customer-layout {
    grid-template-columns: minmax(0, 1fr) 360px;
  }

  #customer-view.customer-tab-order .customer-layout {
    grid-template-columns: 1fr;
  }

  .server-grid,
  .station-layout,
  .admin-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  #admin-view .admin-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .menu-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  }

  .table-section-grid {
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 10px;
  }

  .table-tile {
    min-height: 128px;
    padding: 9px;
  }

  .selected-table-summary {
    grid-template-columns: 1fr;
  }

  .selected-table-summary .table-alert-badges {
    justify-content: flex-start;
  }

  .metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .menu-hero,
  .menu-hero img {
    height: 92px;
    min-height: 92px;
  }

  .category-panel {
    position: static;
    box-shadow: none;
  }

  .tier-row,
  .preference-row {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .menu-card header,
  .ticket header,
  .analysis-top {
    align-items: flex-start;
    flex-direction: row;
  }

  .cart-panel {
    position: sticky;
    top: 24px;
    margin: 0;
    border-radius: 8px;
    max-height: calc(100vh - 48px);
  }

  .bill-tools,
  .filters,
  .config-actions,
  .ticket footer {
    display: flex;
  }

  .settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .menu-item-editor-layout,
  .admin-editor-layout {
    grid-template-columns: minmax(0, 1.45fr) minmax(240px, 0.85fr);
  }

  .menu-item-preview-panel,
  .admin-editor-preview-panel {
    position: sticky;
    top: 12px;
  }

  .editor-section-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .server-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split-bill-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .focused-page {
    grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
  }

  .schedule-grid,
  .promotion-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  }

  .promotion-card img {
    min-height: 170px;
  }

  .qr-preview-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .sheet-panel {
    left: auto;
    right: 24px;
    bottom: 24px;
    width: min(460px, calc(100vw - 48px));
    border-radius: 8px;
  }
}

/* Desktop — 1200px+ admin dense nav (redesign plan §4.2–4.4 Phase 9) */
@media (min-width: 1200px) {
  body[data-active-view="admin"] .app-shell {
    grid-template-columns: 172px minmax(0, 1fr);
  }

  body[data-active-view="admin"] .sidebar {
    gap: 10px;
    padding: 12px 8px;
  }

  body[data-active-view="admin"] .brand {
    gap: 8px;
  }

  body[data-active-view="admin"] .brand-mark {
    height: 32px;
    width: 32px;
  }

  body[data-active-view="admin"] .brand span,
  body[data-active-view="admin"] .status-strip {
    display: none;
  }

  body[data-active-view="admin"] .role-nav {
    gap: 4px;
  }

  body[data-active-view="admin"] .nav-button {
    min-height: 36px;
    padding: 6px 8px;
    font-size: 13px;
  }

  body[data-active-view="admin"] .admin-sidebar-sections {
    max-height: calc(100vh - 220px);
  }

  body[data-active-view="admin"] .admin-sidebar-sections .section-tab-button {
    min-height: 30px;
    padding: 5px 7px 5px 18px;
  }

  body[data-active-view="admin"] .workspace {
    padding: 10px 12px;
  }

  body[data-active-view="admin"] .topbar {
    gap: 12px;
    margin-bottom: 10px;
  }
}

@media print {
  body {
    background: #fff;
  }

  .sidebar,
  .topbar,
  .operations-panel:not(.printable-qr-sheet),
  .cart-panel,
  .menu-panel,
  .modifier-sheet {
    display: none !important;
  }

  .workspace {
    padding: 0;
  }

  .printable-qr-sheet {
    display: block !important;
    box-shadow: none;
    border: 0;
  }

  .qr-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .qr-card {
    min-height: 320px;
    break-inside: avoid;
    border: 1px solid #111;
  }
}
