:root {
  --surface: #f5ebd8;
  --surface-dim: #e6d7bf;
  --surface-bright: #fffdf8;
  --surface-low: #fbf5ec;
  --surface-mid: #efe1c8;
  --surface-high: #e0d4bc;
  --ink: #3b1f0e;
  --muted: #6b3a1f;
  --muted-2: #8a6a52;
  --outline: #e0d4bc;
  --outline-strong: #b98f68;
  --primary: #c94e22;
  --primary-hot: #d65e30;
  --primary-soft: #ffe5cc;
  --primary-dim: #fff3e6;
  --blue: #3b1f0e;
  --blue-soft: #f2dfc5;
  --teal: #2a8a4e;
  --teal-soft: #e1f2e7;
  --green: #2a8a4e;
  --green-soft: #e4f3e8;
  --amber: #d4860c;
  --amber-soft: #fff0cf;
  --red: #c92a2f;
  --red-soft: #ffe3dc;
  --purple: #7a3f1f;
  --purple-soft: #f5dcc9;
  --pink: #9e3a16;
  --pink-soft: #ffe2d4;
  --white: #fffdf8;
  --font-body: "Nunito", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-display: "Bebas Neue", "Nunito", sans-serif;
  --shadow: 0 10px 22px rgba(59, 31, 14, 0.07);
  --shadow-card: 0 4px 10px rgba(59, 31, 14, 0.055);
  --shadow-press: 0 2px 6px rgba(201, 78, 34, 0.12);
  --shadow-selected: inset 0 0 0 1px rgba(201, 78, 34, 0.16);
  --radius: 14px;
  --touch: 48px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 700;
}

body {
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  min-height: var(--touch);
  border: 0;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

button:active {
  transform: scale(0.98);
}

.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  font-size: 22px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
}

.app-shell {
  min-height: 100vh;
}

.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  transition: grid-template-columns 0.2s ease;
}

.layout.nav-collapsed {
  grid-template-columns: 88px minmax(0, 1fr);
}

.side-nav {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--ink);
  border-right: 1px solid rgba(255, 229, 204, 0.24);
  display: flex;
  flex-direction: column;
  padding: 24px 12px 16px;
  gap: 20px;
  z-index: 5;
  transition: padding 0.2s ease;
}

.nav-collapse-btn {
  width: 30px;
  height: 30px;
  min-height: 30px;
  position: absolute;
  top: 33px;
  right: 16px;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--surface-low);
  box-shadow: none;
  line-height: 1;
}

.nav-collapse-btn:hover {
  background: transparent;
  color: var(--white);
}

.nav-collapse-glyph {
  display: block;
  font-family: var(--font-body);
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-1px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 48px 8px 10px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary), var(--primary-hot));
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
  letter-spacing: 1px;
  box-shadow: 0 4px 10px rgba(201, 78, 34, 0.2);
}

.brand h1 {
  margin: 0;
  font-family: var(--font-body);
  font-size: 23px;
  line-height: 26px;
  color: var(--surface-low);
  font-weight: 900;
}

.brand p {
  margin: 2px 0 0;
  color: #e6d7bf;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-group,
.panel-actions,
.chip-row,
.status-row,
.keypad,
.quick-actions {
  display: flex;
}

.nav-group {
  flex-direction: column;
  gap: 8px;
}

.nav-btn {
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #f5ebd8;
  background: transparent;
  font-weight: 800;
  text-align: left;
  box-shadow: none;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.layout.nav-collapsed .side-nav {
  padding: 16px 10px;
}

.layout.nav-collapsed .brand {
  justify-content: center;
  padding: 0;
}

.layout.nav-collapsed .brand h1,
.layout.nav-collapsed .brand p,
.layout.nav-collapsed .nav-btn span:not(.material-symbols-outlined),
.layout.nav-collapsed .store-card,
.layout.nav-collapsed .nav-footer .btn span:not(.material-symbols-outlined) {
  display: none;
}

.layout.nav-collapsed .nav-collapse-btn {
  top: 32px;
  right: 4px;
  width: 24px;
  height: 24px;
  min-height: 24px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.layout.nav-collapsed .nav-collapse-glyph {
  font-size: 27px;
  transform: translateY(-2px);
}

.layout.nav-collapsed .nav-btn {
  justify-content: center;
  padding: 0;
}

.layout.nav-collapsed .nav-footer .btn {
  width: 100%;
  padding: 0;
}

.nav-btn:hover {
  background: rgba(255, 229, 204, 0.09);
  border-color: rgba(255, 229, 204, 0.1);
  color: var(--white);
}

.nav-btn.active {
  background: linear-gradient(180deg, rgba(255, 247, 237, 0.96), rgba(255, 228, 204, 0.9));
  border-color: rgba(255, 229, 204, 0.9);
  color: var(--ink);
  box-shadow: 0 3px 8px rgba(201, 78, 34, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.nav-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 229, 204, 0.22);
  padding-top: 14px;
  display: grid;
  gap: 10px;
}

.store-card {
  border: 1px solid rgba(255, 229, 204, 0.2);
  border-radius: var(--radius);
  padding: 14px;
  background: rgba(255, 253, 248, 0.08);
  color: var(--surface-low);
}

.store-card strong,
.store-card span {
  display: block;
}

.store-card strong {
  font-size: 15px;
}

.store-card span {
  margin-top: 3px;
  color: #e6d7bf;
  font-size: 13px;
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: 72px;
  padding: 14px 24px;
  background: rgba(251, 245, 236, 0.96);
  border-bottom: 1.5px solid var(--outline);
  position: sticky;
  top: 0;
  z-index: 4;
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.top-title {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.top-title h2 {
  margin: 0;
  font-family: var(--font-body);
  font-size: 28px;
  line-height: 34px;
  font-weight: 900;
  letter-spacing: 0;
}

.top-title p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.content {
  padding: 24px;
  display: grid;
  gap: 20px;
  align-content: start;
}

.btn,
.icon-btn,
.segment-btn,
.pill,
.table-card,
.menu-card,
.bill-tab,
.payment-chip,
.scenario-btn,
.action-tile,
.ticket-card,
.reservation-card,
.inventory-row,
.order-row {
  transition:
    background-color 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease,
    opacity 0.16s ease;
}

.btn {
  min-height: var(--touch);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: var(--radius);
  background: var(--surface-mid);
  color: var(--ink);
  font-weight: 800;
  border: 1.5px solid transparent;
}

.btn.primary {
  background: linear-gradient(180deg, var(--primary-hot), var(--primary));
  color: var(--white);
  box-shadow: var(--shadow-press);
}

.btn.primary:hover {
  background: var(--primary-hot);
}

.btn.secondary {
  background: var(--white);
  border-color: var(--outline-strong);
  color: var(--ink);
}

.btn.danger {
  background: var(--red);
  color: var(--white);
}

.btn.warning {
  background: var(--amber-soft);
  color: var(--amber);
  border-color: #d4860c;
}

.btn.ghost {
  background: transparent;
  color: var(--muted);
}

.icon-btn {
  width: var(--touch);
  height: var(--touch);
  padding: 0;
  border-radius: var(--radius);
  background: var(--white);
  border: 1.5px solid var(--outline);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
}

.icon-btn:hover,
.btn.secondary:hover,
.pill:hover {
  background: var(--surface-low);
}

.language-switcher {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius);
  background: var(--surface-mid);
  border: 1.5px solid var(--outline);
}

.language-btn {
  min-width: 46px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.language-btn.active {
  background: var(--white);
  color: var(--primary);
  box-shadow: var(--shadow-selected);
}

.language-menu {
  position: relative;
  z-index: 12;
}

.settings-language-control {
  display: flex;
  justify-content: flex-end;
}

.settings-language-control .language-menu {
  z-index: 20;
}

.language-trigger {
  min-width: 82px;
  height: var(--touch);
  min-height: var(--touch);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 10px;
  border-radius: var(--radius);
  background: var(--surface-mid);
  border: 1.5px solid var(--outline);
  color: var(--ink);
  font-weight: 900;
}

.language-trigger .material-symbols-outlined {
  color: var(--muted);
  font-size: 20px;
}

.language-code {
  font-size: 13px;
  line-height: 1;
}

.language-menu.open .language-trigger,
.language-trigger:hover {
  background: var(--white);
  border-color: var(--outline-strong);
  box-shadow: var(--shadow-selected);
}

.language-options {
  width: 190px;
  max-height: 280px;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: none;
  gap: 4px;
  padding: 6px;
  overflow-y: auto;
  background: var(--white);
  border: 1.5px solid var(--outline);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.language-menu.open .language-options {
  display: grid;
}

.language-option {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 0 10px;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-weight: 900;
  text-align: left;
}

.language-option:hover,
.language-option.active {
  background: var(--primary-dim);
  color: var(--primary);
}

.language-option .material-symbols-outlined {
  margin-left: auto;
  font-size: 20px;
}

.flag-icon {
  width: 28px;
  height: 20px;
  display: inline-block;
  position: relative;
  overflow: hidden;
  border-radius: 5px;
  border: 1px solid rgba(59, 31, 14, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.flag-cn {
  background: #de2910;
}

.flag-cn::before {
  content: "★";
  position: absolute;
  left: 4px;
  top: 1px;
  color: #ffde00;
  font-size: 10px;
  line-height: 1;
}

.flag-cn::after {
  content: "★";
  position: absolute;
  left: 14px;
  top: 2px;
  color: #ffde00;
  font-size: 4px;
  line-height: 1;
  text-shadow:
    4px 3px 0 #ffde00,
    4px 8px 0 #ffde00,
    0 11px 0 #ffde00;
  transform: rotate(18deg);
}

.flag-it {
  background: linear-gradient(90deg, #008c45 0 33.33%, #f4f5f0 33.33% 66.66%, #cd212a 66.66% 100%);
}

.sr-only {
  width: 1px;
  height: 1px;
  position: absolute;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.segment-btn {
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.segment-btn.active {
  background: var(--white);
  color: var(--primary);
  box-shadow: var(--shadow-selected);
}

.grid {
  display: grid;
  gap: 16px;
}

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

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

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

.panel {
  background: var(--white);
  border: 1.5px solid var(--outline);
  border-radius: var(--radius);
  min-width: 0;
  box-shadow: var(--shadow-card);
}

.panel-pad {
  padding: 18px;
}

.panel-head {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--outline);
}

.panel-head h3,
.panel-pad h3 {
  margin: 0;
  font-family: var(--font-body);
  font-size: 21px;
  line-height: 26px;
}

.panel-head p,
.panel-pad p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.metric {
  min-height: 150px;
  padding: 18px;
  border: 1.5px solid var(--outline);
  border-radius: var(--radius);
  background: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric .metric-label {
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
}

.metric .metric-value {
  margin-top: 12px;
  font-family: "JetBrains Mono", monospace;
  font-size: 34px;
  line-height: 40px;
  font-weight: 800;
}

.metric .metric-note {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metric.hot {
  border-color: #d4860c;
  background: linear-gradient(180deg, var(--amber-soft), var(--white));
}

.metric.good {
  border-color: #2a8a4e;
  background: linear-gradient(180deg, var(--green-soft), var(--white));
}

.metric.risk {
  border-color: #c92a2f;
  background: linear-gradient(180deg, var(--red-soft), var(--white));
}

.floor-layout {
  display: block;
  position: relative;
}

.table-board-panel {
  min-height: calc(100vh - 128px);
  overflow: hidden;
}

@media (min-width: 821px) {
  .floor-layout.drawer-open .table-board-panel {
    width: calc(100% - min(560px, calc(100vw - 108px)));
  }
}

.order-flow-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 14px 0;
}

.order-flow-tab {
  min-height: 78px;
  padding: 12px;
  border: 1.5px solid var(--outline);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  text-align: left;
}

.order-flow-tab .material-symbols-outlined {
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: var(--surface-low);
  color: var(--muted);
}

.order-flow-tab strong,
.order-flow-tab small {
  display: block;
}

.order-flow-tab strong {
  font-size: 16px;
}

.order-flow-tab small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
}

.order-flow-tab.active {
  border-color: var(--primary);
  background: var(--primary-dim);
}

.order-flow-tab.active .material-symbols-outlined {
  background: var(--white);
  color: var(--primary);
}

.table-toolbar,
.bill-toolbar,
.table-summary,
.receipt-summary,
.split-grid,
.lane-head,
.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.table-toolbar {
  padding: 14px;
  border-bottom: 1px solid var(--outline);
}

.service-scope-note {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
}

.table-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.pill-row,
.chip-row,
.bill-tabs,
.payment-chips,
.scenario-grid,
.doc-toggle,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  min-height: 42px;
  padding: 0 14px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1.5px solid var(--outline);
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.pill.active {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-dim);
  box-shadow: var(--shadow-selected);
}

.table-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 12px;
  padding: 18px;
}

.table-card {
  min-height: 112px;
  border: 2px solid var(--outline);
  background: var(--white);
  border-radius: var(--radius);
  padding: 12px;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.table-card:hover,
.table-card.active {
  border-color: var(--primary);
}

.table-card h4 {
  margin: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 26px;
  line-height: 30px;
}

.table-card small {
  color: var(--muted);
  font-weight: 800;
}

.table-card-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-due-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(201, 42, 47, 0.1);
}

.table-card.free {
  background: #eaf7ee;
  border-color: #8fd0a2;
  color: #174c2f;
}

.table-card.dining {
  background: #fff0df;
  border-color: #de7436;
  color: #87330f;
}

.table-card.reserved {
  background: #fff7d8;
  border-color: #e3bd4b;
  color: #70480a;
}

.table-card.free small {
  color: #2d7548;
}

.table-card.dining small {
  color: #b24c1d;
}

.table-card.reserved small {
  color: #8d6813;
}

.table-card.cleaning {
  background: var(--red-soft);
  border-color: #c92a2f;
}

.table-card.offline {
  opacity: 0.55;
}

.status-badge,
.doc-badge,
.line-status,
.severity {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 8px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.status-badge.free {
  background: var(--teal-soft);
  color: var(--teal);
}

.status-badge.dining {
  background: var(--primary-soft);
  color: var(--primary);
}

.status-badge.reserved {
  background: #fff0bf;
  color: #8a5c00;
}

.status-badge.cleaning,
.status-badge.error {
  background: var(--red-soft);
  color: var(--red);
}

.status-badge.offline {
  background: var(--surface-high);
  color: var(--muted);
}

.table-detail {
  display: grid;
  gap: 14px;
}

.table-drawer {
  width: min(560px, calc(100vw - 108px));
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  background: var(--surface-low);
  border-left: 1.5px solid var(--outline);
  box-shadow: -12px 0 28px rgba(59, 31, 14, 0.13);
  opacity: 1;
  animation: drawer-in 0.2s ease-out both;
}

.table-drawer-stable {
  animation: none;
}

.drawer-head {
  min-height: 114px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  align-items: start;
  gap: 16px;
  padding: 22px 20px 18px;
  border-bottom: 1.5px solid var(--outline);
  background: rgba(251, 245, 236, 0.96);
  backdrop-filter: blur(14px);
}

.drawer-title {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.drawer-title-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-head h2 {
  margin: 0;
  font-family: var(--font-body);
  font-size: 32px;
  line-height: 1;
  letter-spacing: 0;
}

.drawer-head p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.38;
}

.drawer-head .icon-btn {
  align-self: start;
  justify-self: end;
}

.drawer-kicker {
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1;
}

.table-drawer-scroll {
  min-height: 0;
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 14px;
  overflow-y: auto;
  padding: 16px;
}

@keyframes drawer-in {
  from {
    transform: translateX(32px);
  }
  to {
    transform: translateX(0);
  }
}

.table-summary {
  padding: 18px;
  background: var(--white);
  border: 1.5px solid var(--outline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.table-summary h3 {
  margin: 0;
  font-family: var(--font-body);
  font-size: 30px;
  line-height: 36px;
}

.table-summary p {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.bill-tabs {
  padding: 14px;
  background: var(--white);
  border: 1.5px solid var(--outline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.bill-tab {
  min-height: 58px;
  padding: 8px 12px;
  border-radius: var(--radius);
  background: var(--surface-low);
  border: 2px solid transparent;
  text-align: left;
  flex: 1 1 155px;
}

.bill-tab.active {
  border-color: var(--primary);
  background: var(--primary-dim);
}

.bill-tab strong,
.bill-tab small {
  display: block;
}

.bill-tab small {
  color: var(--muted);
  margin-top: 4px;
  font-weight: 800;
}

.bill-body {
  display: grid;
  align-content: start;
  background: var(--white);
  border: 1.5px solid var(--outline);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.bill-toolbar {
  padding: 14px 16px;
  border-bottom: 1px solid var(--outline);
}

.bill-toolbar h3 {
  margin: 0;
  font-family: var(--font-body);
  font-size: 22px;
}

.bill-lines {
  display: grid;
}

.bill-line {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 52px 86px 88px 136px;
  gap: 10px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--outline);
  min-height: 64px;
}

.bill-line.header {
  min-height: 42px;
  background: var(--surface-low);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.bill-line:last-child {
  border-bottom: 0;
}

.line-name strong,
.line-name span {
  display: block;
}

.line-name span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.money,
.mono {
  font-family: "JetBrains Mono", monospace;
  font-weight: 800;
}

.line-status.ready,
.doc-badge.ok {
  background: var(--green-soft);
  color: var(--green);
}

.line-status.kitchen {
  background: var(--amber-soft);
  color: var(--amber);
}

.line-status.void,
.doc-badge.block {
  background: var(--red-soft);
  color: var(--red);
}

.line-status.comp,
.doc-badge.hold {
  background: var(--purple-soft);
  color: var(--purple);
}

.line-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.line-menu-btn {
  width: 44px;
  height: 44px;
  min-height: 44px;
  border-radius: var(--radius);
  background: var(--surface-low);
  color: var(--muted);
}

.line-menu-btn:hover {
  color: var(--primary);
  background: var(--primary-dim);
}

.line-menu-btn:disabled,
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.scenario-btn,
.action-tile,
.payment-chip {
  min-height: 58px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1.5px solid var(--outline);
  color: var(--ink);
  font-weight: 900;
}

.scenario-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 0 12px;
  text-align: left;
}

.scenario-btn.active,
.payment-chip.active {
  border-color: var(--primary);
  background: var(--primary-dim);
  color: var(--primary);
  box-shadow: var(--shadow-selected);
}

.receipt-panel {
  display: grid;
  gap: 14px;
}

.receipt-summary {
  align-items: stretch;
  padding: 16px;
  background: var(--white);
  border: 1.5px solid var(--outline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.total-stack {
  display: grid;
  gap: 8px;
  width: 100%;
}

.total-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-weight: 800;
}

.total-row.strong {
  color: var(--primary);
  font-size: 24px;
}

.total-row.due {
  color: var(--red);
}

.total-row.paid {
  color: var(--green);
}

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

.payment-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 10px;
}

.compact-head {
  min-height: 54px;
  padding: 12px 14px;
}

.order-menu-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 14px 0;
}

.order-menu-card {
  min-height: 58px;
  padding: 10px 12px;
  border: 1.5px solid var(--outline);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  text-align: left;
}

.order-menu-card strong,
.order-menu-card span {
  display: block;
}

.order-menu-card strong {
  font-size: 14px;
}

.order-menu-card span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}

.order-menu-card.active {
  border-color: var(--primary);
  background: var(--primary-dim);
  color: var(--primary);
}

.order-find-bar {
  display: grid;
  gap: 10px;
  padding: 12px 14px 0;
}

.order-search {
  min-height: 46px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1.5px solid var(--outline);
  border-radius: var(--radius);
  background: var(--white);
}

.order-search .material-symbols-outlined {
  color: var(--muted);
}

.order-search input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  outline: 0;
}

.compact-clear {
  width: 34px;
  height: 34px;
  min-height: 34px;
}

.order-category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.order-category-row .pill {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.order-category-row .pill span {
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--surface-low);
  color: var(--muted);
  font-size: 11px;
}

.order-category-row .pill.active span {
  background: var(--white);
  color: var(--primary);
}

.order-dish-list {
  display: grid;
  gap: 8px;
  padding: 12px 14px 14px;
}

.order-dish {
  min-height: 92px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) minmax(86px, auto) 28px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1.5px solid var(--outline);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  text-align: left;
}

.order-dish:hover {
  border-color: var(--primary);
  background: var(--primary-dim);
}

.order-dish:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.order-dish.sold-out {
  background: var(--surface-low);
}

.order-dish img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--surface-mid);
}

.order-dish strong,
.order-dish small {
  display: block;
}

.order-dish-main {
  min-width: 0;
}

.order-dish small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.order-price-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.order-price-strip span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--surface-low);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.order-price-strip span.active {
  background: var(--primary-dim);
  color: var(--primary);
}

.order-dish-side {
  justify-self: end;
  text-align: right;
}

.order-dish-side strong {
  font-family: "JetBrains Mono", monospace;
  font-size: 17px;
}

.order-dish-side em {
  display: inline-flex;
  margin-top: 6px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.order-dish > .material-symbols-outlined {
  color: var(--primary);
}

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

.payment-row {
  min-height: 46px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: var(--radius);
  background: var(--surface-low);
  font-weight: 800;
}

.doc-toggle {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.doc-btn {
  min-height: 62px;
  border-radius: var(--radius);
  border: 1.5px solid var(--outline);
  background: var(--white);
  font-weight: 900;
}

.doc-btn.active {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.keypad button {
  min-height: 60px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1.5px solid var(--outline);
  font-family: "JetBrains Mono", monospace;
  font-size: 23px;
  font-weight: 800;
}

.amount-display {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--white);
  font-family: "JetBrains Mono", monospace;
  font-size: 26px;
  font-weight: 800;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.action-tile {
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 10px;
  color: var(--blue);
}

.action-tile span {
  font-size: 24px;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
}

.timeline {
  display: grid;
}

.event-row {
  min-height: 66px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--outline);
}

.event-row:last-child {
  border-bottom: 0;
}

.event-dot {
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: var(--surface-low);
  color: var(--ink);
}

.event-row strong,
.event-row span {
  display: block;
}

.event-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.compact-table-map {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  padding: 18px;
}

.tiny-table {
  min-height: 64px;
  border-radius: var(--radius);
  border: 1.5px solid var(--outline);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "JetBrains Mono", monospace;
  font-weight: 800;
  color: var(--ink);
}

.tiny-table.dining {
  background: #fff0df;
  border-color: #de7436;
  color: #a33d12;
}

.tiny-table.free {
  background: #eaf7ee;
  border-color: #8fd0a2;
  color: #1f7a43;
}

.tiny-table.reserved {
  background: #fff7d8;
  border-color: #e3bd4b;
  color: #8a5c00;
}

.tiny-table.cleaning {
  background: var(--red-soft);
  color: var(--red);
}

.orders-layout {
  display: grid;
  grid-template-columns: minmax(480px, 1fr) minmax(360px, 0.8fr);
  gap: 18px;
}

.order-list,
.kds-lanes,
.reservation-list,
.menu-grid,
.inventory-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.order-row {
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(160px, 1fr) minmax(82px, auto) minmax(94px, auto);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1.5px solid var(--outline);
  border-radius: var(--radius);
  background: var(--white);
}

.order-row.active {
  border-color: var(--primary);
  background: var(--primary-dim);
}

.order-row strong,
.order-row span {
  display: block;
}

.order-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin-top: 3px;
}

.order-status {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  margin-top: 0;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.order-row .order-status {
  display: inline-flex;
  margin-top: 0;
  font-size: 12px;
}

.order-status.partial {
  background: #f0e7df;
  color: #6b4c39;
}

.order-status.paid {
  background: var(--green-soft);
  color: var(--green);
}

.order-status.kitchen {
  background: var(--amber-soft);
  color: var(--amber);
}

.order-status.deposit {
  background: #f1e4d9;
  color: var(--purple);
}

.order-status.void {
  background: var(--red-soft);
  color: var(--red);
}

.checkout-stamp {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1.5px solid rgba(42, 138, 78, 0.28);
  border-radius: var(--radius);
  background: var(--green-soft);
}

.checkout-stamp strong,
.checkout-stamp span,
.checkout-stamp code {
  display: block;
}

.checkout-stamp span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.checkout-stamp code {
  color: var(--green);
  font-family: "JetBrains Mono", monospace;
  font-weight: 900;
}

.checkout-record-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.checkout-record {
  min-height: 66px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1.5px solid var(--outline);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  text-align: left;
}

.checkout-record:hover {
  border-color: var(--primary);
}

.checkout-record strong,
.checkout-record small {
  display: block;
}

.checkout-record small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.detail-stack {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.split-box {
  border: 1.5px solid var(--outline);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--surface-low);
}

.split-box strong,
.split-box span {
  display: block;
}

.split-box span {
  margin-top: 5px;
  color: var(--muted);
  font-weight: 700;
}

.kds-lanes {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.kds-lane {
  min-width: 0;
  border: 1.5px solid var(--outline);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
}

.lane-head {
  min-height: 60px;
  padding: 14px;
  border-bottom: 1px solid var(--outline);
  background: var(--surface-low);
}

.lane-head h3 {
  margin: 0;
  font-family: var(--font-body);
  font-size: 20px;
}

.ticket-card {
  margin: 12px;
  padding: 12px;
  border: 2px solid var(--outline);
  border-radius: var(--radius);
  background: var(--white);
  display: grid;
  gap: 10px;
}

.ticket-card.aging {
  border-color: var(--amber);
  background: var(--amber-soft);
}

.ticket-card.late {
  border-color: var(--red);
  background: var(--red-soft);
}

.ticket-card.hold {
  border-color: var(--purple);
  background: var(--purple-soft);
}

.ticket-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ticket-title strong {
  font-family: "JetBrains Mono", monospace;
}

.ticket-items {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.ticket-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ticket-actions button {
  min-height: 44px;
  border-radius: var(--radius);
  background: var(--surface-low);
  color: var(--ink);
  font-weight: 900;
}

.reservations-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 18px;
}

.reservation-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  padding: 16px;
}

.calendar-day {
  min-height: 94px;
  border: 1.5px solid var(--outline);
  border-radius: var(--radius);
  background: var(--white);
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-weight: 800;
}

.calendar-day.active {
  border-color: var(--primary);
  background: var(--primary-dim);
}

.calendar-day small {
  color: var(--muted);
}

.reservation-workbench {
  min-height: 620px;
}

.reservation-board {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.reservation-side {
  display: grid;
  align-content: start;
  gap: 18px;
}

.reservation-card {
  min-height: 118px;
  border: 1.5px solid var(--outline);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--white);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, auto);
  gap: 14px;
  align-items: stretch;
}

.reservation-card.confirmed,
.reservation-card.deposit {
  border-color: #e3bd4b;
  background: #fffaf0;
}

.reservation-card.arriving,
.reservation-card.queued {
  border-color: #de7436;
  background: #fff3e8;
}

.reservation-card.seated {
  border-color: #8fd0a2;
  background: #edf8f0;
}

.reservation-card.late,
.reservation-card.no-show,
.reservation-card.cancelled {
  border-color: rgba(201, 42, 47, 0.32);
  background: #fff5f2;
}

.reservation-main {
  min-width: 0;
  display: grid;
  gap: 7px;
  align-content: start;
}

.reservation-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reservation-card strong,
.reservation-card span,
.reservation-card small {
  display: block;
}

.reservation-card span {
  color: var(--muted);
  font-weight: 700;
}

.reservation-card small {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 900;
}

.reservation-status {
  min-height: 28px;
  display: inline-flex !important;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.reservation-status.confirmed,
.reservation-status.deposit {
  background: #fff0bf;
  color: #8a5c00;
}

.reservation-status.arriving,
.reservation-status.queued {
  background: #ffe1c4;
  color: #a33d12;
}

.reservation-status.seated {
  background: #dff4e6;
  color: #1f7a43;
}

.reservation-status.late,
.reservation-status.no-show,
.reservation-status.cancelled {
  background: var(--red-soft);
  color: var(--red);
}

.reservation-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-content: center;
  gap: 8px;
}

.reservation-actions .btn {
  min-height: 40px;
  padding: 0 12px;
  border-radius: 12px;
}

.queue-form {
  padding: 14px;
  display: grid;
  gap: 12px;
}

.reservation-create {
  padding: 14px;
  display: grid;
  gap: 12px;
  border-bottom: 1px solid var(--outline);
}

.reservation-inline-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 10px;
}

.reservation-table-pick {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1.5px dashed var(--outline);
  border-radius: var(--radius);
  background: var(--surface-low);
}

.reservation-table-pick > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.reservation-table-pick span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--white);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.reservation-table-pick .muted {
  background: transparent;
  padding: 0;
}

.queue-block {
  padding-top: 0;
}

.inline-head {
  min-height: 50px;
  padding: 12px 0 6px;
  border-bottom: 0;
}

.inline-head h3 {
  font-size: 18px;
  line-height: 22px;
}

.compact-counter {
  min-height: 54px;
  grid-template-columns: 50px 1fr 50px;
}

.compact-counter button {
  min-height: 52px;
}

.compact-counter strong {
  font-size: 24px;
}

.counter {
  min-height: 64px;
  display: grid;
  grid-template-columns: 58px 1fr 58px;
  border: 1.5px solid var(--outline);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}

.counter button {
  min-height: 62px;
  background: var(--surface-low);
  color: var(--ink);
  font-size: 26px;
  font-weight: 800;
}

.counter strong {
  display: grid;
  place-items: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 28px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.field input,
.field select {
  min-height: 54px;
  width: 100%;
  padding: 0 14px;
  border-radius: var(--radius);
  border: 1.5px solid var(--outline);
  background: var(--white);
  color: var(--ink);
  font-weight: 800;
}

.menu-management-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.menu-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.menu-set {
  min-height: 74px;
  border: 2px solid var(--outline);
  border-radius: var(--radius);
  background: var(--white);
  padding: 12px;
  text-align: left;
  display: grid;
  gap: 4px;
  color: var(--ink);
}

.menu-set.active {
  border-color: var(--primary);
  background: var(--primary-dim);
}

.menu-set strong,
.menu-set span {
  display: block;
}

.menu-set span {
  color: var(--muted);
  margin-top: 4px;
  font-size: 13px;
  font-weight: 700;
}

.menu-set small {
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.menu-side-note {
  margin: 0 14px 14px;
  padding: 12px;
  border: 1.5px dashed var(--outline-strong);
  border-radius: var(--radius);
  background: var(--surface-low);
  display: grid;
  gap: 6px;
}

.menu-side-note strong {
  color: var(--ink);
}

.menu-side-note span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.dish-catalog-panel {
  min-width: 0;
}

.dish-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 14px 0;
}

.dish-stat {
  min-height: 82px;
  padding: 12px;
  border: 1.5px solid var(--outline);
  border-radius: var(--radius);
  background: var(--surface-low);
  display: grid;
  align-content: center;
  gap: 2px;
}

.dish-stat strong {
  font-family: "JetBrains Mono", monospace;
  font-size: 26px;
  line-height: 30px;
}

.dish-stat span,
.dish-stat small {
  color: var(--muted);
  font-weight: 900;
}

.dish-stat small {
  font-size: 11px;
}

.dish-toolbar {
  display: grid;
  gap: 12px;
  padding: 14px 14px 0;
}

.dish-search {
  min-height: 54px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1.5px solid var(--outline);
  border-radius: var(--radius);
  background: var(--white);
}

.dish-search .material-symbols-outlined {
  color: var(--muted);
}

.dish-search input {
  border: 0;
  outline: 0;
  min-width: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.dish-category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dish-db-list {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.dish-db-header,
.dish-db-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.25fr) minmax(160px, 1fr) minmax(120px, 0.7fr) minmax(120px, 0.75fr);
  gap: 12px;
  align-items: center;
}

.dish-db-header {
  min-height: 38px;
  padding: 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.dish-db-row {
  min-height: 86px;
  padding: 10px 12px;
  border: 1.5px solid var(--outline);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  text-align: left;
}

.dish-db-row:hover,
.dish-db-row.active {
  border-color: var(--primary);
  background: var(--primary-dim);
}

.dish-db-row.inactive {
  background: var(--surface-low);
}

.dish-db-main {
  min-width: 0;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.dish-db-main img {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--surface-mid);
}

.dish-db-main strong,
.dish-db-main small,
.dish-db-stack strong,
.dish-db-stack small,
.dish-db-state small {
  display: block;
}

.dish-db-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
}

.dish-db-main small,
.dish-db-stack small,
.dish-db-state small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
}

.dish-db-stack {
  min-width: 0;
}

.dish-db-stack strong {
  font-size: 14px;
}

.dish-db-stack em {
  margin-left: 6px;
  color: var(--green);
  font-style: normal;
  font-size: 12px;
}

.dish-db-state {
  min-width: 0;
  display: grid;
  justify-items: start;
  gap: 2px;
}

.dish-status-inline {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.dish-status-inline.out {
  background: var(--red-soft);
  color: var(--red);
}

.dish-status-inline.hidden {
  background: var(--surface-mid);
  color: var(--muted);
}

.stock-risk {
  color: var(--red) !important;
}

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

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

.menu-card {
  min-height: 292px;
  border: 1.5px solid var(--outline);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
  display: grid;
  grid-template-rows: 138px 1fr;
  text-align: left;
  color: var(--ink);
  box-shadow: none;
  transition: border-color 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.menu-card:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.menu-card.active {
  border-color: var(--primary);
  background: var(--primary-dim);
}

.menu-card.inactive,
.menu-card.sold-out {
  background: var(--surface-low);
}

.dish-image-wrap {
  position: relative;
  min-width: 0;
}

.dish-image {
  width: 100%;
  height: 138px;
  object-fit: cover;
  background: var(--surface-mid);
}

.dish-status {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 2px 6px rgba(68, 34, 18, 0.1);
}

.dish-status.live {
  color: var(--green);
}

.dish-status.out {
  color: var(--red);
}

.dish-status.hidden {
  color: var(--muted);
}

.dish-body {
  padding: 12px;
  display: grid;
  gap: 8px;
}

.dish-body h4 {
  margin: 0;
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 24px;
}

.dish-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}

.allergen-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dish-channel-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dish-channel-row span,
.muted-mini {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--surface-mid);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.dish-editor {
  grid-column: 2;
  position: sticky;
  top: 16px;
}

.dish-editor-body {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.dish-editor-preview {
  min-height: 92px;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1.5px solid var(--outline);
  border-radius: var(--radius);
  background: var(--surface-low);
}

.dish-editor-preview img {
  width: 86px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--surface-mid);
}

.dish-editor-preview strong,
.dish-editor-preview span {
  display: block;
}

.dish-editor-preview strong {
  font-size: 17px;
  line-height: 22px;
}

.dish-editor-preview span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.dish-editor-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.dish-editor-grid .span-2 {
  grid-column: 1 / -1;
}

.stock-stepper {
  min-height: 54px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  border: 1.5px solid var(--outline);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}

.stock-stepper button {
  display: grid;
  place-items: center;
  background: var(--surface-low);
  color: var(--ink);
}

.stock-stepper input {
  min-width: 0;
  border: 0;
  border-left: 1.5px solid var(--outline);
  border-right: 1.5px solid var(--outline);
  border-radius: 0;
  text-align: center;
}

.editor-section {
  display: grid;
  gap: 8px;
}

.editor-section > strong {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.toggle-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.toggle-chip {
  min-height: 38px;
  padding: 0 12px;
  border: 1.5px solid var(--outline);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-weight: 900;
}

.toggle-chip.active {
  border-color: var(--primary);
  background: var(--primary-dim);
  color: var(--primary);
}

.menu-assignment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

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

.menu-price-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 126px;
  gap: 8px;
  align-items: stretch;
  padding: 8px;
  border: 1.5px solid var(--outline);
  border-radius: var(--radius);
  background: var(--surface-low);
}

.menu-price-row.active {
  border-color: rgba(201, 78, 34, 0.42);
  background: var(--primary-dim);
}

.menu-assignment {
  min-height: 54px;
  padding: 8px 10px;
  border: 1.5px solid var(--outline);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  text-align: left;
}

.menu-assignment.active {
  border-color: var(--primary);
  background: var(--primary-dim);
  color: var(--primary);
  box-shadow: var(--shadow-selected);
}

.menu-assignment strong,
.menu-assignment span {
  display: block;
}

.menu-assignment span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.menu-price-row label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.menu-price-row input {
  width: 100%;
  min-width: 0;
  height: 36px;
  min-height: 36px;
  padding: 0 9px;
  border: 1.5px solid var(--outline);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  font-weight: 900;
}

.menu-price-row input:disabled {
  opacity: 0.45;
  background: var(--surface-mid);
}

.editor-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.editor-actions .btn {
  min-width: 0;
}

.allergen {
  min-height: 24px;
  padding: 4px 7px;
  border-radius: var(--radius);
  background: var(--blue-soft);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.report-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
}

.chart {
  min-height: 290px;
  padding: 18px;
  display: flex;
  align-items: end;
  gap: 12px;
  border-top: 1px solid var(--outline);
}

.bar {
  flex: 1;
  min-width: 26px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(180deg, var(--primary-hot), var(--primary));
  display: flex;
  align-items: start;
  justify-content: center;
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
  padding-top: 8px;
}

.donut {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background:
    conic-gradient(var(--primary) 0 46%, var(--green) 46% 69%, var(--blue) 69% 85%, var(--amber) 85% 100%);
  margin: 18px auto;
  position: relative;
}

.donut::after {
  content: "";
  position: absolute;
  inset: 44px;
  border-radius: 50%;
  background: var(--white);
}

.inventory-row {
  min-height: 66px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1.5px solid var(--outline);
  border-radius: var(--radius);
  background: var(--white);
}

.inventory-row strong,
.inventory-row span {
  display: block;
}

.inventory-row span {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}

.settings-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.handoff-panel {
  grid-column: 1 / -1;
}

.handoff-list {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.contract-row {
  min-height: 76px;
  padding: 12px;
  border: 1.5px solid var(--outline);
  border-radius: var(--radius);
  background: var(--surface-low);
  display: grid;
  align-content: space-between;
  gap: 8px;
}

.contract-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.contract-row strong,
.contract-row code {
  min-width: 0;
  color: var(--ink);
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.toggle-row {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--outline);
}

.toggle-row:last-child {
  border-bottom: 0;
}

.toggle-row strong,
.toggle-row span {
  display: block;
}

.toggle-row span {
  color: var(--muted);
  margin-top: 3px;
  font-size: 13px;
  font-weight: 700;
}

.toggle-row .rule-badge {
  min-width: 94px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 0;
  padding: 0 10px;
  border: 1.5px solid var(--outline);
  border-radius: 11px;
  background: var(--surface-low);
  color: var(--muted);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
  white-space: nowrap;
}

.rule-badge .material-symbols-outlined {
  font-size: 18px;
}

.rule-badge em {
  font-style: normal;
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
}

.toggle-row .rule-badge.warn {
  background: #fff5dd;
  border-color: rgba(212, 134, 12, 0.28);
  color: #9b5d04;
}

.toggle-row .rule-badge.block {
  background: #ffeae5;
  border-color: rgba(201, 42, 47, 0.26);
  color: #9b292d;
}

.toggle-row .rule-badge.ok {
  background: #e9f6ed;
  border-color: rgba(42, 138, 78, 0.26);
  color: #246f43;
}

.toggle-row .rule-badge.neutral {
  background: #f4ece0;
  border-color: rgba(59, 31, 14, 0.14);
  color: var(--ink);
}

.switch {
  width: 50px;
  height: 28px;
  min-height: 28px;
  flex: 0 0 50px;
  border-radius: 999px;
  padding: 0;
  background: #ded6ca;
  border: 1.5px solid #cbbba7;
  position: relative;
  box-shadow: none;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.switch.on {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: none;
}

.switch:hover {
  border-color: var(--outline-strong);
}

.switch:focus-visible {
  outline: 3px solid rgba(201, 78, 34, 0.22);
  outline-offset: 2px;
}

.switch::after {
  content: "";
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid rgba(59, 31, 14, 0.12);
  position: absolute;
  left: 1.5px;
  top: 1.5px;
  box-shadow: none;
  transition: transform 0.18s ease;
}

.switch.on::after {
  transform: translateX(22px);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  min-width: 280px;
  max-width: 380px;
  min-height: 54px;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--white);
  box-shadow: var(--shadow);
  font-weight: 800;
}

.toast.show {
  display: flex;
}

.empty-note {
  min-height: 180px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
  border: 1.5px dashed var(--outline);
  border-radius: var(--radius);
  background: var(--surface-low);
}

@media (max-width: 1180px) {
  .layout {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .nav-collapse-btn {
    display: none;
  }

  .side-nav {
    padding: 16px 10px;
  }

  .brand {
    justify-content: center;
    padding: 0;
  }

  .brand h1,
  .brand p,
  .nav-btn span:not(.material-symbols-outlined),
  .store-card,
  .nav-footer .btn span:not(.material-symbols-outlined) {
    display: none;
  }

  .nav-btn {
    justify-content: center;
    padding: 0;
  }

  .floor-layout,
  .orders-layout,
  .reservations-layout,
  .menu-management-layout,
  .report-layout,
  .dashboard-layout,
  .settings-layout {
    grid-template-columns: 1fr;
  }

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

  .reservation-card {
    grid-template-columns: 1fr;
  }

  .reservation-actions {
    justify-content: flex-start;
  }

  .dish-db-header,
  .dish-db-row {
    grid-template-columns: 1fr;
  }

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

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

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

  .dish-editor {
    grid-column: auto;
    position: static;
  }

  .metric .metric-value {
    font-size: 30px;
    line-height: 36px;
  }
}

@media (max-width: 1420px) and (min-width: 1181px) {
  .receipt-panel {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1500px) {
  .menu-management-layout {
    grid-template-columns: 280px minmax(0, 1fr) 420px;
  }

  .dish-editor {
    grid-column: auto;
    position: sticky;
    top: 16px;
  }

  .dish-stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

@media (max-width: 820px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .side-nav {
    position: fixed;
    bottom: 0;
    top: auto;
    left: 0;
    right: 0;
    width: 100%;
    height: 116px;
    padding: 8px;
    border-right: 0;
    border-top: 1px solid var(--outline);
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    z-index: 10;
  }

  .brand,
  .nav-footer {
    display: none;
  }

  .nav-group {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
  }

  .nav-btn {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 48px;
    font-size: 11px;
    gap: 2px;
    flex-direction: column;
    padding: 4px;
  }

  .nav-btn span:not(.material-symbols-outlined) {
    display: none;
  }

  .main {
    padding-bottom: 124px;
  }

  .topbar {
    min-height: 156px;
    padding: 12px;
    align-items: stretch;
    flex-direction: column;
    overflow: visible;
  }

  .top-actions {
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .top-actions .language-menu {
    grid-column: auto;
  }

  .top-actions .language-trigger,
  .top-actions .btn {
    width: 100%;
    min-width: 0;
  }

  .top-title h2 {
    font-size: 23px;
    line-height: 28px;
  }

  .top-title p {
    display: none;
  }

  .content {
    padding: 12px;
  }

  .grid-4,
  .grid-3,
  .grid-2,
  .reservation-summary-grid,
  .order-flow-tabs,
  .order-menu-tabs,
  .dish-stat-grid,
  .receipt-panel,
  .payment-chips,
  .quick-actions,
  .scenario-grid,
  .kds-lanes,
  .handoff-list,
  .menu-grid,
  .menu-grid.managed,
  .dish-editor-grid,
  .editor-actions {
    grid-template-columns: 1fr;
  }

  .reservation-inline-fields,
  .menu-price-row {
    grid-template-columns: 1fr;
  }

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

  .order-dish {
    grid-template-columns: 52px minmax(0, 1fr) 28px;
  }

  .order-dish-side {
    grid-column: 2 / 3;
    justify-self: start;
    text-align: left;
  }

  .order-dish > .material-symbols-outlined {
    grid-column: 3 / 4;
    grid-row: 1 / 3;
  }

  .table-board-panel {
    min-height: calc(100vh - 180px);
  }

  .table-drawer {
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 124px;
    width: auto;
    border: 1.5px solid var(--outline);
    border-radius: var(--radius);
    box-shadow: 0 10px 28px rgba(59, 31, 14, 0.16);
  }

  .drawer-head {
    min-height: 108px;
    padding: 14px;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 10px;
  }

  .drawer-head h2 {
    font-size: 28px;
  }

  .drawer-head p {
    font-size: 13px;
  }

  .table-drawer-scroll {
    padding: 12px;
  }

  .compact-table-map {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bill-line {
    grid-template-columns: minmax(0, 1fr) 44px 74px;
  }

  .bill-line.header {
    display: none;
  }

  .bill-line .hide-sm {
    display: none;
  }

  .doc-toggle,
  .calendar-grid {
    grid-template-columns: 1fr;
  }

  .order-row {
    grid-template-columns: 1fr auto;
  }

  .order-row .hide-sm {
    display: none;
  }

  .top-actions {
    width: 100%;
    min-width: 0;
    overflow: visible;
  }

  .top-actions .btn {
    display: inline-flex;
    padding: 0 8px;
    font-size: 15px;
  }

  .top-actions .language-menu,
  .top-actions .language-switcher {
    width: 100%;
  }

  .language-options {
    left: 0;
    right: auto;
  }
}
