:root {
  --ink: #1f2421;
  --muted: #66706a;
  --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;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.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;
}

.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;
}

.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);
}

.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;
}

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;
}

.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;
}

.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;
}

.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);
}

.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;
}

.server-alert-list {
  display: grid;
  gap: 8px;
}

.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: 18px;
}

.customer-layout {
  grid-template-columns: minmax(0, 1fr) 360px;
}

.server-grid,
.station-layout,
.admin-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.modifier-admin-panel,
.integration-panel {
  grid-column: 1 / -1;
}

.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;
}

#customer-view.customer-tab-order .menu-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  width: 100%;
}

#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-paycall .customer-layout {
  grid-template-columns: 1fr;
}

#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;
  margin-bottom: 8px;
  background: #ddd;
}

.menu-hero img {
  width: 100%;
  height: 40px;
  min-height: 40px;
  object-fit: cover;
  display: block;
}

.hero-copy {
  position: absolute;
  left: 12px;
  bottom: 10px;
  background: rgba(31, 36, 33, 0.76);
  color: #fff;
  padding: 8px 10px;
  border-radius: 8px;
}

.hero-copy span {
  display: block;
  font-size: 11px;
  margin-bottom: 2px;
}

.preference-row,
.tier-row,
.bill-tools,
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.category-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  margin-bottom: 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;
}

.full {
  width: 100%;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 10px;
  width: 100%;
}

.menu-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  overflow: hidden;
}

.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: 64px;
  width: 64px;
}

.admin-item-thumb {
  height: 54px;
  width: 54px;
}

.menu-card header {
  grid-column: 2;
  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;
}

.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: 76px;
  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 {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.tag-row {
  grid-column: 1 / -1;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.menu-card > .primary,
.menu-card > .secondary {
  grid-column: 1 / -1;
}

.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;
}

.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;
}

.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;
}

.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;
}

.bill-column header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.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;
}

.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;
}

.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;
  grid-template-columns: repeat(9, 1fr);
  grid-template-rows: repeat(9, 1fr);
  gap: 2px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--ink);
}

.qr-dot {
  background: #fff;
}

.qr-dot.on {
  background: var(--ink);
}

.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-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-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 126px));
  gap: 8px;
  justify-content: start;
}

.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: 104px;
  aspect-ratio: 1 / 1;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fbfbf8;
  padding: 9px;
  display: grid;
  align-content: space-between;
  justify-items: start;
  gap: 4px;
  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-number {
  font-size: 24px;
  line-height: 1;
  font-weight: 900;
}

.table-tile-status {
  width: 100%;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.table-tile small {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.table-server {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.table-tile em {
  color: var(--ink);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.1;
}

.table-empty {
  border-color: #46935f;
  background: #dff4e4;
}

.table-session {
  border-color: #c39a22;
  background: #fff0aa;
}

.table-active {
  border-color: #2f6f9f;
  background: #d8ecfa;
}

.table-cleaning {
  border-color: #bd4a3b;
  background: #f5c7bf;
}

.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);
}

.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;
}

.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;
}

.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;
}

.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;
}

.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: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.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;
}

.rich-html-editor:focus {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.rich-html-editor img,
.promotion-html img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 8px;
}

.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;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  padding: 8px 12px;
  font-weight: 800;
  text-decoration: none;
}

.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;
}

.schedule-card,
.promotion-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf5;
  overflow: hidden;
}

.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%;
  height: 150px;
  object-fit: cover;
  background: var(--soft);
}

.promotion-card-body {
  padding: 12px;
  display: grid;
  gap: 9px;
}

.promotion-card-top {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wide-label {
  grid-column: 1 / -1;
}

.compact-button {
  min-height: 32px;
  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;
  }

  .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;
  }

  .floor-grid {
    min-height: 460px;
    grid-template-columns: repeat(5, minmax(48px, 1fr));
    grid-template-rows: repeat(5, minmax(60px, 1fr));
    gap: 6px;
  }

  .floor-table {
    padding: 6px;
  }

  .floor-zones {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .menu-image-editor {
    grid-template-columns: 1fr;
  }

  .menu-image-preview-card {
    min-height: 150px;
  }
}

/* Mobile-first prototype 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;
  bottom: 12px;
}

.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;
}

.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;
}

@media (min-width: 860px) {
  .app-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .sidebar {
    position: static;
    padding: 24px 18px;
    gap: 24px;
  }

  .brand {
    justify-content: flex-start;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
  }

  .role-nav {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .nav-button {
    padding: 12px 14px;
    text-align: left;
    font-size: 16px;
  }

  .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;
  }

  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));
  }

  .menu-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  }

  .table-section-grid {
    grid-template-columns: repeat(auto-fill, minmax(118px, 148px));
    gap: 12px;
  }

  .table-tile {
    min-height: 118px;
    padding: 12px;
  }

  .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));
  }

  .server-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split-bill-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .focused-page,
  .schedule-grid,
  .promotion-grid {
    grid-template-columns: repeat(2, minmax(0, 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;
  }
}

@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;
  }
}
