:root {
  color-scheme: light;
  --ink: #1b1f24;
  --muted: #68707d;
  --line: #dde3ea;
  --panel: #ffffff;
  --soft: #f8f4ef;
  --accent: #b10812;
  --accent-2: #d43b2e;
  --ok: #1f7a4d;
  --warm: #fff8ef;
  --gold: #b9862d;
  --red-dark: #7e050b;
  --red-soft: #fff1ee;
  --shadow: 0 14px 34px rgba(80, 14, 14, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  color: var(--ink);
  font-size: 14px;
  background:
    radial-gradient(circle at 18% 0, rgba(177, 8, 18, 0.12), transparent 320px),
    linear-gradient(180deg, #fff8ef 0, #f8f4ef 330px),
    var(--soft);
}

.adminLoginBody {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 12%, rgba(177, 8, 18, 0.16), transparent 360px),
    linear-gradient(135deg, #fffaf5 0%, #fff2ef 100%);
}

.adminLoginShell {
  width: min(460px, 100%);
}

.adminLoginCard {
  display: grid;
  gap: 16px;
  padding: 30px;
  border: 1px solid rgba(177, 8, 18, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 60px rgba(95, 25, 18, 0.16);
}

.adminLoginCard img {
  width: 210px;
  height: 82px;
  object-fit: contain;
  justify-self: center;
}

.adminLoginCard h1 {
  margin: 0;
  color: var(--red-dark);
  text-align: center;
}

.adminLoginCard p {
  margin: 0;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}

.adminLoginCard label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.adminLoginCard input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  background: #fff;
  color: var(--ink);
}

.adminLoginCard button {
  min-height: 48px;
  font-weight: 800;
}

.adminLoginError {
  min-height: 22px;
  color: var(--accent);
  text-align: center;
  font-weight: 800;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.brandLockup {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 260px;
}

.brandLockup img {
  width: 138px;
  height: 52px;
  object-fit: contain;
}

.topbar strong {
  display: block;
  font-size: 16px;
}

.topbar span {
  color: var(--muted);
  font-size: 13px;
}

nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

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

nav a,
button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

nav a:hover,
button:hover {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  transform: translateY(-1px);
}

button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

button.primary:hover {
  border-color: var(--red-dark);
  background: var(--red-dark);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

button.danger {
  border-color: var(--accent-2);
  color: var(--accent-2);
}

main {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 24px 20px 34px;
}

.customerMode .topbar {
  display: none;
}

.customerMode main {
  padding-top: 12px;
}

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

.cartPageShell {
  display: grid;
  gap: 18px;
}

.cartPageGrid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 18px;
  align-items: start;
}

.cartPageGrid.takeawayCheckoutGrid {
  grid-template-columns: minmax(320px, 760px);
  justify-content: center;
}

.takeawayCheckoutGrid .cartPagePanel {
  width: 100%;
}

.takeawayMenuShell {
  padding-bottom: 92px;
}

.takeawayCustomerBox {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.takeawayCustomerBox input,
.takeawayCustomerBox textarea {
  margin-top: 6px;
}

.takeawayCheckoutNotice {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(166, 33, 29, 0.18);
  border-radius: 8px;
  color: var(--red-dark);
  background: #fff7f4;
  font-weight: 800;
}

.takeawayPaymentBox {
  display: grid;
  gap: 12px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid rgba(166, 33, 29, 0.16);
  border-radius: 8px;
  background: #fffaf7;
}

.compactTitle {
  margin: 0;
  gap: 8px;
}

.compactTitle h2 {
  font-size: 15px;
}

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

.takeawayPaymentChoice {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}

.takeawayPaymentChoice input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.takeawayPaymentChoice input:checked + span {
  color: var(--red-dark);
  font-weight: 900;
}

.onlinePaymentToggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--accent-dark);
  font-weight: 800;
  cursor: pointer;
}

.onlinePaymentToggle .chevron {
  transition: transform 0.2s;
  font-size: 14px;
}

.onlinePaymentToggle.open .chevron {
  transform: rotate(90deg);
}

.onlinePaymentCollapse {
  grid-column: 1 / -1;
}

.onlinePaymentCollapse[hidden] {
  display: none;
}

.onlinePaymentCollapse .takeawayPaymentChoice {
  border-style: solid;
  background: #fffaf7;
}

.panel,
.menuPanel,
.cartPanel,
.cartPagePanel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.menuPanel,
.cartPanel,
.cartPagePanel {
  box-shadow: var(--shadow);
}

.menuPanel {
  padding: 18px;
}

.ipadTableChooser {
  max-width: 980px;
  margin: 20px auto;
}

.tableChoiceGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.tableChoiceGrid .buttonLink {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
}

.cartPanel {
  position: sticky;
  top: 86px;
  display: flex;
  flex-direction: column;
  align-self: start;
  max-height: calc(100vh - 110px);
  overflow: hidden;
}

.cartToggle {
  display: none;
}

.cartPanel #cart,
.cartPagePanel #cart {
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.cartPanel label,
.cartPagePanel label {
  flex: 0 0 auto;
  margin-top: 12px;
}

.cartPanel textarea,
.cartPagePanel textarea {
  max-height: 88px;
  resize: vertical;
}

.cartSubTitle {
  margin: 12px 0 8px;
  color: var(--red-dark);
  font-size: 14px;
}

.submittedOrder {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid #efd8d3;
  border-radius: 8px;
  background: #fffaf7;
}

.submittedHeader,
.submittedLine {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.submittedHeader small,
.lockedNote {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.submittedHeader span {
  color: var(--red-dark);
  font-weight: 900;
}

.submittedLines {
  display: grid;
  gap: 5px;
}

.submittedLine span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.submittedLine em {
  color: var(--muted);
  font-style: normal;
  white-space: nowrap;
}

.dangerButton {
  border-color: #f0b8af;
  color: #a40711;
  background: #fff;
  font-weight: 800;
}

.cancelGroup {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.cancelGroup > strong {
  flex: 1 0 100%;
  color: var(--red-dark);
  font-size: 13px;
}

.compactCancel {
  min-height: 34px;
  padding: 6px 9px;
  font-size: 12px;
}

.cartPanel #submitOrder,
.cartPagePanel #submitOrder {
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  width: 100%;
  min-height: 48px;
  margin-top: 10px;
  font-weight: 700;
  box-shadow: 0 -10px 20px rgba(255, 255, 255, 0.9);
}

.buttonLink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font-weight: 800;
  text-decoration: none;
}

.buttonLink.primary,
a.primary.buttonLink {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.orderShell {
  padding-bottom: 86px;
}

.orderCartFab {
  position: fixed;
  right: max(18px, calc((100vw - 1240px) / 2 + 20px));
  bottom: 18px;
  z-index: 9;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  width: min(520px, calc(100vw - 36px));
  min-height: 60px;
  padding: 10px 14px 10px 18px;
  border: 1px solid var(--red-dark);
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--red-dark));
  box-shadow: 0 18px 38px rgba(126, 5, 11, 0.28);
  text-decoration: none;
}

.orderCartFab span {
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.orderCartFab strong {
  font-size: 18px;
  white-space: nowrap;
}

.orderCartFab em {
  display: inline-grid;
  place-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.orderCartFab.takeawayCartFab {
  min-height: 66px;
}

.billButton {
  border-color: #d7b36b;
  color: #7a4b00;
  background: #fff8e8;
  font-weight: 800;
}

.menuHero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin: -4px -4px 18px;
  padding: 22px;
  border: 1px solid #efd8d3;
  border-radius: 8px;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 246, 243, 0.96)),
    linear-gradient(45deg, #fff, #fff1ee);
  box-shadow: 0 14px 32px rgba(126, 5, 11, 0.08);
}

.heroLogo {
  display: block;
  width: min(360px, 78vw);
  height: 92px;
  margin-bottom: 12px;
  padding: 0;
  border-radius: 8px;
  object-fit: contain;
  object-position: left center;
}

.menuHero h1 {
  margin: 6px 0;
  color: var(--red-dark);
  font-size: 30px;
}

.menuHero p {
  margin: 0;
  color: var(--muted);
}

.eyebrow {
  color: #ffe2ad;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.tableBadge {
  display: grid;
  place-items: center;
  min-width: 84px;
  height: 84px;
  border: 1px solid #f1c9c1;
  border-radius: 50%;
  color: var(--accent);
  font-size: 18px;
  font-weight: 700;
  background: #fff7f4;
  box-shadow: inset 0 0 0 5px #fff;
}

.heroSubmit {
  display: grid;
  justify-items: end;
  gap: 10px;
  min-width: 170px;
}

.heroSubmit .tableBadge {
  margin-bottom: 2px;
}

.tableExitButton {
  min-width: 112px;
  border-color: #e8c9c1;
  color: var(--red-dark);
  font-weight: 800;
}

.heroCartSummary {
  display: grid;
  justify-items: end;
  gap: 2px;
  color: var(--muted);
  font-size: 13px;
}

.heroCartSummary strong {
  color: var(--red-dark);
  font-size: 21px;
}

.cartFlyer {
  position: fixed;
  z-index: 9999;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--accent);
  background-position: center;
  background-size: cover;
  color: #fff;
  box-shadow: 0 12px 28px rgba(126, 5, 11, 0.28);
  font-size: 21px;
  font-weight: 900;
  pointer-events: none;
}

.cartFlyer.hasImage {
  background-color: #fff;
}

.cartPulse {
  animation: cartPulse 420ms ease;
}

@keyframes cartPulse {
  0% { transform: scale(1); }
  45% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.heroSubmit button {
  min-width: 150px;
  min-height: 48px;
  font-weight: 800;
}

.heroSubmit .billButton {
  min-height: 42px;
}

.sectionTitle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.sectionTitle h1,
.sectionTitle h2 {
  margin: 0;
  font-size: 21px;
}

.muted {
  color: var(--muted);
}

.menu {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.menuGroups {
  display: grid;
  gap: 20px;
}

.categorySection {
  display: grid;
  gap: 10px;
}

.categoryHeader {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}

.categorySection:first-child .categoryHeader {
  padding-top: 0;
  border-top: 0;
}

.categoryHeader h2 {
  margin: 0;
  font-size: 19px;
}

.filters {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.customerMode .filters {
  position: sticky;
  top: 0;
  z-index: 12;
  margin: 0 -16px 18px;
  padding: 10px 16px 12px;
  border-bottom: 1px solid rgba(177, 8, 18, 0.14);
  background: rgba(255, 250, 247, 0.98);
  box-shadow: 0 12px 26px rgba(80, 14, 14, 0.08);
  backdrop-filter: blur(14px);
}

.languageSwitch {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: -4px 0 16px;
  padding: 10px;
  border: 1px solid #ecd8d4;
  border-radius: 8px;
  background: #fffaf7;
}

.languageSwitch span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.languageSwitch button {
  min-height: 42px;
  padding-inline: 14px;
  font-weight: 700;
}

.aiAssistant {
  display: grid;
  gap: 12px;
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid #efd8d3;
  border-radius: 8px;
  background: linear-gradient(135deg, #fff, #fff8f6);
  box-shadow: 0 10px 24px rgba(126, 5, 11, 0.06);
}

.aiHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.aiHeader h2 {
  margin: 4px 0;
  color: var(--red-dark);
  font-size: 18px;
}

.aiHeader p,
.aiMemory,
.aiSuggestion p {
  margin: 0;
  color: var(--muted);
}

.aiHeader button {
  min-height: 36px;
  padding: 7px 10px;
  color: var(--accent);
  font-weight: 700;
}

.aiBadge {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  min-height: 24px;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.aiTags {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 3px;
}

.aiTags button {
  flex: 0 0 auto;
  min-height: 40px;
  border-color: #edd2cc;
  background: #fff;
  font-weight: 800;
  white-space: nowrap;
}

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

.aiSuggestion {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #f0ded9;
  border-radius: 8px;
  background: #fff;
}

.aiSuggestion span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.aiSuggestion h3 {
  margin: 3px 0;
  font-size: 15px;
  line-height: 1.25;
}

.aiSuggestion strong {
  color: var(--red-dark);
}

.aiSuggestionActions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.aiAssistantDock {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 120;
  pointer-events: none;
}

.aiAssistantDock > * {
  pointer-events: auto;
}

.aiAssistantLauncher {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px 16px 10px 10px;
  border: 1px solid #efcfca;
  border-radius: 999px;
  color: var(--red-dark);
  background: #fffaf8;
  box-shadow: 0 16px 38px rgba(76, 18, 15, 0.18);
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

.aiAssistantLauncher:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 42px rgba(76, 18, 15, 0.24);
}

.aiAssistantDock:not(.open) .aiAssistantLauncher {
  justify-content: center;
  width: 62px;
  height: 62px;
  min-height: 62px;
  padding: 10px;
  border-radius: 50%;
}

.aiAssistantDock:not(.open) .aiLauncherText {
  display: none;
}

.aiRobotMark {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 15px 15px 12px 12px;
  color: #fff;
  background: linear-gradient(180deg, #b31d1a, #7d0d0d);
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.08);
}

.aiRobotMark::before {
  content: "";
  position: absolute;
  top: -7px;
  width: 14px;
  height: 8px;
  border: 2px solid #b31d1a;
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
}

.aiRobotMark::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 12px 0 0 #fff;
  transform: translateX(-6px);
}

.aiRobotMark span {
  position: absolute;
  bottom: 7px;
  width: 16px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
}

.aiAssistantPanel[hidden] {
  display: none !important;
}

.aiAssistant.aiAssistantPanel {
  position: fixed;
  right: 22px;
  bottom: 96px;
  width: min(760px, calc(100vw - 44px));
  max-height: min(72vh, 680px);
  margin: 0;
  padding: 18px;
  overflow: auto;
  box-shadow: 0 24px 70px rgba(74, 18, 15, 0.22);
}

.aiAssistantClose {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border: 1px solid #efd8d3;
  border-radius: 999px;
  color: var(--red-dark);
  background: #fff;
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(60, 20, 15, 0.08);
}

.aiAssistantClose:hover {
  color: #fff;
  background: var(--accent);
}

.aiAssistantPanel .aiHeader {
  padding-right: 48px;
}

.filters input {
  min-height: 48px;
  border-color: #d4dde6;
  font-size: 15px;
  box-shadow: 0 8px 22px rgba(27, 31, 36, 0.05);
}

.categoryScroller {
  position: sticky;
  top: 82px;
  z-index: 7;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 8px;
  margin: 2px -4px 0;
  padding: 8px 4px;
  border: 1px solid #efd8d3;
  border-radius: 8px;
  background: rgba(255, 250, 247, 0.96);
  box-shadow: 0 12px 28px rgba(80, 14, 14, 0.08);
  backdrop-filter: blur(12px);
}

.customerMode .categoryScroller {
  position: relative;
  top: auto;
  z-index: 1;
  margin-top: 0;
}

.categoryScroller::before,
.categoryScroller::after {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  z-index: 1;
  width: 34px;
  pointer-events: none;
}

.categoryScroller::before {
  left: 50px;
  background: linear-gradient(90deg, rgba(255, 250, 247, 0.98), rgba(255, 250, 247, 0));
}

.categoryScroller::after {
  right: 50px;
  background: linear-gradient(270deg, rgba(255, 250, 247, 0.98), rgba(255, 250, 247, 0));
}

.categoryScrollButton {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 48px;
  padding: 0;
  border-color: #e8c9c1;
  color: var(--red-dark);
  background: #fff;
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 3px 26px 7px;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(126, 5, 11, 0.35) transparent;
}

.chips button {
  flex: 0 0 auto;
  min-height: 46px;
  padding: 10px 15px;
  white-space: nowrap;
  border-color: #ead0c8;
  background: #fff;
  color: #243241;
  font-size: 15px;
  font-weight: 900;
  scroll-snap-align: center;
  box-shadow: 0 8px 18px rgba(27, 31, 36, 0.04);
}

.chips button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(177, 8, 18, 0.18);
}

.dish,
.order,
.cashierGroup {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.dish {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 13px;
  min-height: 196px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(27, 31, 36, 0.06);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.dish:hover {
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
  box-shadow: 0 14px 30px rgba(80, 14, 14, 0.13);
  transform: translateY(-2px);
}

.dishImage {
  grid-row: span 2;
  width: 88px;
  height: 88px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #fff3ed, #f0e3d5);
  background-position: center;
  background-size: cover;
  cursor: pointer;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
}

.dishImage.hasImage {
  background-color: #fff;
}

.dishImage:hover,
.dishImage:focus-visible {
  border-color: rgba(178, 31, 31, 0.45);
  box-shadow: 0 0 0 3px rgba(178, 31, 31, 0.12);
}

.dishImage:active {
  transform: scale(0.98);
}

.dish h3,
.order h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.dishInfo {
  min-width: 0;
}

.dishInfo h3 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.dish p,
.order p {
  margin: 0;
  color: var(--muted);
}

.dishIntro {
  display: -webkit-box;
  min-height: 38px;
  margin-top: 2px;
  padding-right: 4px;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.dishMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 6px;
  font-size: 11px;
}

.allergenChip,
.allergenEmpty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1.5px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: #c79a2e;
  font-size: 10px;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(27, 31, 36, 0.16);
}

.allergenEmpty {
  width: auto;
  padding: 4px 8px;
  color: var(--muted);
  background: #f7f9fb;
  border-color: var(--line);
}

.allergenIcon {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  color: #fff;
  background: transparent;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
}

.allergen-gluten {
  background: #e0bd35;
}

.allergen-sesame,
.allergen-milk {
  background: #8581aa;
}

.allergen-nuts,
.allergen-peanut {
  background: #b7774c;
}

.allergen-crustacean,
.allergen-shellfish,
.allergen-spicy {
  background: #d85b5b;
}

.allergen-egg,
.allergen-mustard {
  background: #e49c26;
}

.allergen-fish,
.allergen-sulphite {
  background: #56b8ca;
}

.allergen-celery,
.allergen-soya {
  background: #70b54a;
}

.allergen-lupin {
  background: #d2bb34;
}

.allergen-other {
  background: #767d88;
}

.allergen-sulphite .allergenIcon,
.allergen-spicy .allergenIcon {
  font-size: 8px;
}

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

.dishActions {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.dishActions strong {
  display: block;
  color: var(--accent-2);
  font-size: 18px;
}

.taxBadge {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.dishButtons {
  display: flex;
  gap: 8px;
}

.dishButtons button {
  min-width: 92px;
}

.cartLine {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.cartLine small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.taxBreakdown {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #e8edf2;
  border-radius: 8px;
  background: #fffaf7;
  color: var(--muted);
  font-size: 13px;
}

.taxBreakdown > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.taxBreakdown strong {
  color: var(--ink);
  font-size: 13px;
}

.cartTotal {
  display: flex;
  justify-content: space-between;
  margin: 16px 0;
  padding: 14px 0 0;
  border-top: 2px solid var(--line);
  font-size: 19px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

label {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--muted);
}

.orders {
  display: grid;
  gap: 12px;
}

.adminTools {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.adminMenu {
  display: grid;
  gap: 10px;
}

.adminDrawerStack {
  display: grid;
  gap: 10px;
  margin: 14px 0 22px;
}

.adminTitle {
  align-items: center;
}

.adminTitle > div {
  display: grid;
  gap: 4px;
}

.adminTitle h1 {
  margin: 0;
}

.adminTitle button {
  color: var(--red-dark);
  background: #fff7f5;
  font-weight: 800;
}

.adminDrawer {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(88, 44, 30, 0.05);
}

.adminDrawer summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 0 16px;
  cursor: pointer;
  list-style: none;
}

.adminDrawer summary::-webkit-details-marker {
  display: none;
}

.adminDrawer summary::after {
  content: "打开";
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--red-dark);
  background: #fff7f5;
  font-weight: 800;
}

.adminDrawer[open] summary::after {
  content: "隐藏";
}

.adminDrawer summary strong {
  color: var(--red-dark);
  font-size: 16px;
}

.adminDrawer summary span {
  color: var(--muted);
  font-size: 14px;
}

.adminDrawerBody {
  border-top: 1px solid var(--line);
  padding: 0 12px 12px;
}

.settingsListForm {
  display: grid;
  gap: 10px;
  padding: 14px 0 4px;
}

.settingsListForm textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
}

.settingsListForm input {
  width: 100%;
}

.restaurantSettingsForm textarea {
  min-height: 72px;
}

.settingsListForm button {
  justify-self: start;
}

.adminCategoryBrowser {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
  margin: 10px 0 18px;
}

.adminCategoryTile {
  display: grid;
  gap: 6px;
  min-height: 104px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(88, 44, 30, 0.06);
}

.adminCategoryTile.active,
.adminCategoryTile:hover {
  border-color: var(--red);
  background: #fff7f5;
}

.adminCategoryTile strong {
  color: var(--red-dark);
  font-size: 16px;
}

.adminCategoryTile span,
.adminCategoryTile small,
.currentCategoryBadge {
  color: var(--muted);
}

.currentCategoryBadge {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff7f5;
  font-weight: 700;
}

.categoryDishTools {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf7;
}

.compactTitle {
  margin-bottom: 0;
}

.tableManager {
  display: grid;
  gap: 14px;
  margin: 16px 0 20px;
  padding: 14px;
  border: 1px solid #efd8d3;
  border-radius: 8px;
  background: #fffaf7;
}

.tableAddForm {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 10px;
}

.qrBaseForm {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.qrBaseForm span {
  grid-column: 1 / -1;
}

.tableQrGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

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

.tableQrCard img {
  width: 132px;
  height: 132px;
  justify-self: center;
}

.tableQrCard span {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.tableQrCard .toolbar {
  gap: 6px;
}

.categoryAddForm,
.categoryCard {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, 0.8fr) minmax(170px, 0.8fr) auto;
  gap: 8px;
  align-items: center;
}

.categoryList {
  display: grid;
  gap: 8px;
}

.categoryCard {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.categoryCard .toolbar {
  gap: 6px;
}

.dishEditor {
  display: grid;
  grid-template-columns: 80px minmax(170px, 1.2fr) minmax(150px, 1fr) minmax(120px, 0.7fr) 86px 96px minmax(160px, 1fr) 76px 72px;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.dishEditor h2 {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 16px;
}

.dishDetailDrawer {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.dishDetailDrawer summary {
  min-height: 42px;
  padding: 0 12px;
  color: var(--red-dark);
  font-weight: 800;
  cursor: pointer;
}

.dishDetailGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 8px;
  padding: 10px;
}

.detailsField {
  grid-column: 1 / -1;
  min-height: 72px;
  resize: vertical;
}

.imagesField,
.optionGroupsField,
.dishEditor input[type="file"] {
  grid-column: 1 / -1;
}

.imagesField,
.optionGroupsField {
  min-height: 58px;
  resize: vertical;
}

.allergenPicker {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.allergenPicker > span {
  color: var(--muted);
  font-size: 13px;
}

.allergenOptions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.allergenOption {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 6px 9px;
  border: 1px solid #ead8c0;
  border-radius: 999px;
  color: #6f4c18;
  background: #fff8ec;
  cursor: pointer;
}

.allergenOption input {
  width: auto;
  accent-color: var(--gold);
}

.allergenOption:has(input:checked) {
  border-color: var(--gold);
  background: #ffecc8;
  color: #4f3510;
}

.inlineCheck {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--ink);
  white-space: nowrap;
}

.inlineCheck input {
  width: auto;
}

.orderHeader {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.order.billRequested,
.cashierGroup.billRequested {
  border-color: #d7b36b;
  background: #fffaf0;
  box-shadow: 0 12px 28px rgba(122, 75, 0, 0.12);
}

.billFlag {
  display: inline-flex;
  margin-left: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #7a4b00;
  background: #ffe8ad;
  font-size: 12px;
  vertical-align: middle;
}

.paymentPill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid #ead0c8;
  color: #7f151c;
  background: #fff5f2;
  font-size: 13px;
  font-weight: 800;
}

.cashierRequestBadges {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.rushBanners {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
}
.rushBanner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #e11d48, #be123c);
  box-shadow: 0 6px 18px rgba(190, 18, 60, 0.35);
  animation: rushPulse 1.2s ease-in-out infinite;
}
.rushBanner strong {
  font-size: 22px;
  font-weight: 900;
  white-space: nowrap;
}
.rushBanner span {
  flex: 1;
  font-size: 15px;
  font-weight: 700;
}
.rushBanner button {
  border: 0;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  color: #be123c;
  background: #fff;
}
@keyframes rushPulse {
  0%, 100% { box-shadow: 0 6px 18px rgba(190, 18, 60, 0.35); }
  50% { box-shadow: 0 6px 24px rgba(190, 18, 60, 0.6); }
}

/* 新单/结账/订台 顶部通知横幅 */
.noticeBar {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 95;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(94vw, 560px);
}
.noticeItem {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #7a1f1f;
  color: #fff;
  padding: 14px 16px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  animation: noticeSlideIn 0.35s ease-out;
  font-size: 17px;
  font-weight: 700;
}
.noticeItem.bill { background: #b45309; }
.noticeItem.reservation { background: #1d4ed8; }
.noticeBody {
  flex: 1;
  background: none;
  border: none;
  color: #fff;
  text-align: left;
  font: inherit;
  cursor: pointer;
  padding: 0;
}
.noticeX {
  background: rgba(255, 255, 255, 0.25);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
  flex: 0 0 auto;
}
@keyframes noticeSlideIn {
  from { transform: translateY(-18px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.paymentMethodBadge {
  display: inline-grid;
  place-items: center;
  min-width: 96px;
  min-height: 42px;
  padding: 8px 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--accent);
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(80, 14, 14, 0.16);
}

.paymentMethodBadge.cash {
  background: #b12024;
}

.paymentMethodBadge.card {
  background: #14233b;
}

.paymentMethodBadge.glovo {
  background: #12805c;
}

.paymentMethodBadge.unknown {
  background: #7b5b52;
}

.status {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 9px;
  color: #fff;
  background: var(--accent);
  font-size: 13px;
}

.status.paid,
.status.done {
  background: var(--ok);
}

.status.requested {
  background: #b9862d;
}

.cashierItems {
  display: grid;
  gap: 0;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid #eaded5;
  border-radius: 8px;
  background: #fff;
}

.cashierItemsHead,
.cashierItem {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 96px 72px 104px 92px;
  gap: 10px;
  align-items: center;
}

.cashierItemsHead {
  padding: 9px 12px;
  color: #7b5b52;
  background: #fff6f1;
  font-size: 12px;
  font-weight: 800;
}

.cashierItem {
  padding: 10px 12px;
  border-top: 1px solid #f1e7df;
}

.cashierItem > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.cashierItem strong {
  color: var(--ink);
}

.cashierItem small {
  color: var(--muted);
  font-size: 12px;
}

.cashierItem > span,
.cashierItem > strong:last-child,
.cashierItemsHead span:nth-child(n+2) {
  text-align: right;
}

.cashierItem.voidedItem {
  color: var(--muted);
  background: #f7f4f2;
}

.cashierItem.voidedItem strong,
.cashierItem.voidedItem span {
  color: #8e8581;
  text-decoration: line-through;
}

.cashierItem button {
  min-height: 34px;
  padding: 6px 8px;
  font-size: 12px;
}

.cashierQuickOrder {
  display: grid;
  grid-template-columns: 1.2fr 130px minmax(180px, 1fr) 86px minmax(150px, 0.8fr) auto;
  gap: 10px;
  align-items: end;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #efd8d3;
  border-radius: 8px;
  background: #fffaf7;
}

.cashierQuickOrder > div {
  display: grid;
  gap: 3px;
  align-self: center;
}

.cashierQuickOrder label {
  margin: 0;
}

.quickDishField label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
}

.cashierQuickOrder input,
.cashierQuickOrder select {
  min-height: 40px;
}

.quickDishField {
  position: relative;
}

.quickDishHint {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding: 8px;
  border: 1px solid #efd8d3;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(62, 24, 18, 0.16);
}

.quickDishHint:empty {
  display: none;
}

.quickDishHint button {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 46px;
  width: 100%;
  padding: 10px 12px;
  border-color: #efd8d3;
  background: #fff;
  color: #2c2523;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.quickDishHint button strong {
  color: var(--accent);
}

.quickDishHint button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quickDishHint button em {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.splitBill {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.splitBill summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 800;
}

.splitOrders {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.splitOrder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #ece2d9;
  border-radius: 8px;
  background: #fff;
}

.splitOrder div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.splitOrder span {
  color: var(--muted);
  font-size: 13px;
}

.cashierReport,
.paidHistory {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.paidHistory.isCollapsed {
  padding-bottom: 4px;
}

.paidHistory .sectionTitle {
  align-items: center;
}

.historyToggle {
  border-color: #eaded5;
  background: #fffaf7;
  color: var(--accent-dark);
  font-weight: 700;
}

.historyToggle:hover {
  border-color: var(--accent);
}

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

.reportGrid div {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid #eaded5;
  border-radius: 8px;
  background: #fffaf7;
}

.reportGrid span,
.historyOrder span {
  color: var(--muted);
  font-size: 13px;
}

.reportGrid strong {
  color: var(--accent-dark);
  font-size: 18px;
}

.taxReport {
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid #eaded5;
  border-radius: 8px;
  background: #fff;
}

.reportEmpty {
  padding: 12px;
}

.historyList {
  display: grid;
  gap: 8px;
}

.historyList[hidden] {
  display: none;
}

.historyOrder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #eaded5;
  border-radius: 8px;
  background: #fff;
}

.historyOrder div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.kitchenStationGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.kitchenStation {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #eaded5;
  border-radius: 8px;
  background: #fffaf7;
}

.stationHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.stationHeader h2 {
  margin: 0;
  color: var(--accent-dark);
}

.stationHeader span {
  display: inline-flex;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #7f151c;
  background: #fff;
  font-size: 13px;
  font-weight: 800;
}

.stationOrder {
  display: grid;
  gap: 12px;
  min-height: 210px;
  align-content: space-between;
  box-shadow: 0 8px 18px rgba(27, 31, 36, 0.05);
}

.stationOrder .orderHeader {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.stationOrder h3 {
  margin-bottom: 9px;
  line-height: 1.25;
}

.stationOrder .status {
  min-width: 48px;
  justify-content: center;
  font-weight: 800;
  white-space: nowrap;
}

.stationOrderItems {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stationOrderItems li {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 7px 8px;
  border: 1px solid #f0e4db;
  border-radius: 8px;
  background: #fff;
}

.stationOrderItems span {
  min-width: 0;
  color: #56677c;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.stationOrderItems strong {
  color: var(--red-dark);
  font-size: 14px;
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
}

.stationOrderItems strong.isMany {
  font-size: 16px;
  font-weight: 950;
}

.stationNote {
  margin-top: 9px;
  padding: 8px 9px;
  border-radius: 8px;
  color: #7a4b00;
  background: #fff4dc;
  line-height: 1.35;
}

.stationOrder .toolbar {
  display: grid;
  grid-template-columns: minmax(124px, 1.4fr) minmax(92px, 1fr) minmax(92px, 1fr);
  gap: 8px;
  margin-top: 0;
}

.stationOrder .toolbar button {
  min-height: 50px;
  padding: 9px 10px;
  font-weight: 800;
}

.historyActions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.bitartTicket h1 {
  font-size: 16px;
}

.bitartItems td {
  font-size: 12px;
}

.bitartDetail td {
  color: #333;
  font-size: 11px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.sectionTitle > .toolbar {
  margin-top: 0;
  justify-content: flex-end;
}

.dateFilter {
  display: inline-flex;
  align-items: center;
  flex-direction: row;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.dateFilter input {
  width: 154px;
  min-height: 38px;
  padding: 8px 10px;
}

.notice {
  padding: 12px;
  border: 1px solid #e7c5bd;
  border-radius: 8px;
  background: var(--red-soft);
  color: #7e2721;
}

.printArea {
  display: none;
}

.printTicket {
  width: 72mm;
  padding: 4mm;
  color: #000;
  background: #fff;
  font-family: "Courier New", "Microsoft YaHei", monospace;
}

.printTicket h1 {
  margin: 0 0 8px;
  text-align: center;
  font-size: 19px;
}

.receiptTicket h1 {
  text-align: left;
  font-size: 16px;
  line-height: 1.08;
}

.receiptTicket h2 {
  margin: 18px 0;
  text-align: center;
  font-size: 15px;
  letter-spacing: 0;
}

.receiptTicket p {
  margin: 4px 0;
  font-size: 13px;
  line-height: 1.25;
}

.ticketCenter {
  text-align: center;
}

.ticketWarning {
  padding: 4px 0;
  border-top: 1px dotted #000;
  border-bottom: 1px dotted #000;
  font-weight: 700;
}

.ticketRule {
  height: 1px;
  margin: 8px 0;
  border-top: 1px dotted #000;
}

.ticketMeta {
  border-top: 1px dashed #000;
  border-bottom: 1px dashed #000;
  padding: 6px 0;
}

.ticketMeta p,
.ticketNote,
.ticketFooter {
  margin: 4px 0;
}

.printTicket table {
  width: 100%;
  margin: 8px 0;
  border-collapse: collapse;
}

.printTicket th,
.printTicket td {
  padding: 5px 0;
  border-bottom: 1px dashed #999;
  text-align: left;
  font-size: 15px;
  font-weight: 700;
}

.receiptTicket th,
.receiptTicket td {
  padding: 3px 0;
  border-bottom: 0;
  font-size: 12px;
  vertical-align: top;
}

.printTicket td:first-child,
.receiptTicket td:first-child {
  max-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.receiptItems th:nth-child(1),
.receiptItems td:nth-child(1) {
  width: 42%;
}

.receiptItems th:nth-child(n+2),
.receiptItems td:nth-child(n+2),
.receiptTax th:nth-child(n+2),
.receiptTax td:nth-child(n+2) {
  text-align: right;
}

.receiptTotal {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
}

.receiptTotal strong {
  font-size: 19px;
}

.printTicket th:last-child,
.printTicket td:last-child {
  width: 18mm;
  text-align: right;
  font-weight: 700;
}

.ticketNote {
  padding: 6px 0;
  border-top: 1px dashed #000;
  border-bottom: 1px dashed #000;
  font-weight: 700;
}

.ticketFooter {
  text-align: center;
  font-size: 12px;
}

.qrPrintSheet {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  color: #111;
}

.qrPrintCard {
  display: grid;
  gap: 8px;
  justify-items: center;
  break-inside: avoid;
  padding: 16px;
  border: 1px dashed #999;
  text-align: center;
}

.qrPrintCard h1 {
  margin: 0;
  font-size: 25px;
}

.qrPrintCard img {
  width: 180px;
  height: 180px;
}

.qrPrintCard p {
  margin: 0;
  font-weight: 900;
}

.qrPrintCard small {
  overflow-wrap: anywhere;
  font-size: 10px;
}

.modalOverlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(27, 31, 36, 0.58);
}

.dishModal {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 360px) minmax(260px, 420px);
  width: min(820px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
}

.paymentModal {
  position: relative;
  display: grid;
  gap: 18px;
  width: min(420px, 100%);
  padding: 26px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
}

.paymentModal h2 {
  margin: 0;
  color: var(--accent-dark);
}

.optionModal {
  position: relative;
  display: grid;
  gap: 16px;
  width: min(520px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
}

.optionModal h2 {
  margin: 0;
  padding-right: 42px;
  color: var(--red-dark);
  font-size: 21px;
}

.optionModal p {
  margin: 0;
  color: var(--muted);
}

.optionGroups {
  display: grid;
  gap: 14px;
}

.optionGroup {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 12px;
  border: 1px solid #efd6cf;
  border-radius: 8px;
  background: #fffaf8;
}

.optionGroup legend {
  padding: 0 6px;
  color: var(--accent-dark);
  font-weight: 900;
}

.optionChoice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.optionChoice span {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 800;
}

.optionChoice input:checked + span {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

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

.paymentChoices button {
  min-height: 58px;
  font-size: 16px;
  font-weight: 900;
}

.successModal {
  display: grid;
  justify-items: center;
  gap: 12px;
  width: min(430px, 100%);
  padding: 30px 26px;
  border-radius: 8px;
  border: 1px solid #f0d5ce;
  background: linear-gradient(180deg, #fff 0%, #fff8f5 100%);
  box-shadow: 0 18px 46px rgba(80, 14, 14, 0.22);
  text-align: center;
}

.successMark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
  font-size: 32px;
  font-weight: 900;
}

.successModal h2 {
  margin: 2px 0 0;
  color: var(--red-dark);
  font-size: 23px;
}

.successModal p {
  margin: 0;
  color: var(--muted);
}

.successModal .orderCode {
  padding: 8px 14px;
  border: 1px dashed #e8b8ad;
  border-radius: 8px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 1px;
  background: #fff;
}

.successActions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.modalClose {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
}

.modalDishImage {
  min-height: 320px;
  background: linear-gradient(135deg, #fff3ed, #f0e3d5);
  background-position: center;
  background-size: cover;
}

.modalDishImage.hasImage {
  background-color: #fff;
}

.dishGallery {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0 0 14px;
  padding-bottom: 4px;
}

.dishGallery button {
  flex: 0 0 58px;
  width: 58px;
  height: 44px;
  padding: 0;
  border-radius: 8px;
  border: 2px solid var(--line);
  background-color: #fff;
  background-position: center;
  background-size: cover;
}

.dishGallery button.active {
  border-color: var(--accent);
}

.dishDetailBody {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  padding: 26px;
}

.dishCode {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.dishDetailBody h2 {
  margin: 0 0 12px;
  font-size: 25px;
}

.dishDetailBody p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.detailAllergens {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.dishDetailFooter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.dishDetailFooter strong {
  font-size: 21px;
}

@media (max-width: 820px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .brandLockup {
    width: 100%;
    min-width: 0;
  }

  .brandLockup img {
    width: 124px;
    height: 46px;
  }

  main {
    padding: 14px 10px 86px;
  }

  .grid,
  .orderShell,
  .cartPageGrid {
    grid-template-columns: 1fr;
  }

  .orderHeader {
    flex-direction: column;
  }

  .cashierRequestBadges {
    justify-items: start;
  }

  .paymentMethodBadge {
    min-width: 86px;
    min-height: 38px;
    font-size: 16px;
  }

  .menuPanel,
  .cartPanel,
  .cartPagePanel {
    padding: 12px;
  }

  .customerMode .filters {
    margin-right: -12px;
    margin-left: -12px;
    padding: 8px 12px 10px;
  }

  .cartPanel {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 0;
    z-index: 8;
    max-height: min(70vh, 560px);
    padding: 10px;
    border-color: #efd8d3;
    box-shadow: 0 -14px 34px rgba(80, 14, 14, 0.16);
  }

  .cartToggle {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 56px;
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
    font-weight: 800;
  }

  .cartToggle strong {
    font-size: 16px;
  }

  .cartToggle em {
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 12px;
    font-style: normal;
    white-space: nowrap;
  }

  .cartPanel.isCollapsed {
    max-height: 78px;
    background: transparent;
    border-color: transparent;
    padding: 0;
    box-shadow: none;
  }

  .cartPanel.isCollapsed .sectionTitle,
  .cartPanel.isCollapsed .cartSubTitle,
  .cartPanel.isCollapsed #cart,
  .cartPanel.isCollapsed #submittedOrders,
  .cartPanel.isCollapsed label,
  .cartPanel.isCollapsed #submitOrder,
  .cartPanel.isCollapsed .billButton {
    display: none;
  }

  .cartPanel.isOpen {
    padding: 10px 12px 12px;
  }

  .cartPanel.isOpen .cartToggle {
    margin-bottom: 10px;
  }

  .cartPanel .sectionTitle {
    margin-bottom: 8px;
  }

  .cartPanel .sectionTitle button {
    padding: 7px 9px;
    color: var(--accent);
  }

  .cartPanel #cart {
    max-height: min(34vh, 280px);
  }

  .cartPanel #submittedOrders {
    max-height: min(28vh, 240px);
    overflow-y: auto;
  }

  .cartPanel #submitOrder {
    min-height: 54px;
    font-size: 15px;
  }

  .cartPanel .billButton {
    width: 100%;
    min-height: 46px;
    margin-top: 8px;
  }

  body:has(.cartPanel.isCollapsed) main {
    padding-bottom: 86px;
  }

  body:has(.cartPanel.isOpen) main {
    padding-bottom: min(70vh, 560px);
  }

  .menuHero {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px;
  }

  .heroLogo {
    width: 100%;
    max-width: 330px;
    height: 82px;
  }

  .menuHero h1 {
    font-size: 25px;
  }

  .aiAssistant {
    padding: 12px;
  }

  .aiHeader {
    display: grid;
  }

  .aiHeader button {
    justify-self: start;
  }

  .aiSuggestionGrid {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
  }

  .aiSuggestion {
    min-width: min(78vw, 280px);
    scroll-snap-align: start;
  }

  .tableBadge {
    min-width: 64px;
    height: 64px;
    font-size: 15px;
  }

  .heroSubmit {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    justify-items: stretch;
    width: 100%;
  }

  .heroSubmit .tableBadge {
    margin-bottom: 0;
  }

  .heroCartSummary {
    justify-items: start;
  }

  .categoryScroller {
    top: 72px;
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    gap: 6px;
    margin-right: -2px;
    margin-left: -2px;
  }

  .categoryScrollButton {
    width: 38px;
    height: 46px;
  }

  .chips {
    gap: 7px;
    padding-right: 18px;
    padding-left: 18px;
  }

  .chips button {
    min-height: 44px;
    padding: 9px 13px;
    font-size: 14px;
  }

  .orderShell {
    padding-bottom: 92px;
  }

  .orderCartFab {
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
    min-height: 58px;
    gap: 10px;
    padding: 9px 10px 9px 14px;
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .orderCartFab strong {
    font-size: 16px;
  }

  .orderCartFab em {
    min-height: 38px;
    padding: 0 10px;
    font-size: 14px;
  }

  .takeawayPaymentChoices {
    grid-template-columns: 1fr;
  }

  .heroSubmit button {
    min-width: 128px;
    min-height: 52px;
  }

  .heroSubmit .billButton {
    min-height: 46px;
  }

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

  .dishEditor {
    grid-template-columns: 1fr;
  }

  .categoryAddForm,
  .categoryCard {
    grid-template-columns: 1fr;
  }

  .cashierItems {
    overflow-x: auto;
  }

  .cashierItemsHead,
  .cashierItem {
    grid-template-columns: minmax(150px, 1fr) 82px 58px 90px 86px;
    min-width: 530px;
  }

  .cashierQuickOrder {
    grid-template-columns: 1fr;
  }

  .quickDishHint {
    position: static;
    max-height: 320px;
    margin-top: 8px;
  }

  .dateFilter {
    width: 100%;
    justify-content: space-between;
  }

  .dateFilter input {
    flex: 1;
  }

  .reportGrid {
    grid-template-columns: 1fr 1fr;
  }

  .kitchenStationGrid {
    grid-template-columns: 1fr;
  }

  .stationOrder {
    min-height: 0;
  }

  .stationOrder .toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .stationOrder .toolbar button:first-child {
    grid-column: 1 / -1;
  }

  .taxReport {
    overflow-x: auto;
  }

  .historyOrder {
    grid-template-columns: 1fr;
  }

  .historyActions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .historyOrder button {
    width: 100%;
  }

  .splitOrder {
    grid-template-columns: 1fr;
  }

  .splitOrder button {
    width: 100%;
  }

  .dishModal {
    grid-template-columns: 1fr;
  }

  .modalDishImage {
    min-height: 240px;
  }

  .dishDetailBody {
    padding: 20px;
  }

  .aiAssistantDock {
    right: 14px;
    bottom: 14px;
  }

  .aiAssistantLauncher {
    justify-content: center;
    width: 58px;
    min-height: 58px;
    padding: 10px;
  }

  .aiLauncherText {
    display: none;
  }

  .aiAssistant.aiAssistantPanel {
    right: 10px;
    bottom: 84px;
    left: 10px;
    width: auto;
    max-height: 72vh;
    padding: 14px;
  }

  .aiAssistantPanel .aiHeader {
    padding-right: 42px;
  }

  .aiAssistantClose {
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    min-height: 34px;
    font-size: 21px;
  }
}

@media print {
  @page {
    size: 80mm auto;
    margin: 0;
  }

  body.printing {
    background: #fff;
  }

  body.printing > :not(.printArea) {
    display: none !important;
  }

  body.printing .printArea {
    display: block !important;
  }

  body.printing .printTicket {
    box-shadow: none;
  }
}

/* Display-only menu comparison price. */
.menuPricePair { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: stretch; max-width: 100%; }
.menuPriceColumn { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; padding: 6px; }
.menuPriceColumn small { font-size: 11px; line-height: 1.25; color: #444; }
.menuPriceColumn strong { white-space: nowrap; }
.menuPriceColumn.comparisonPrice { background: #d9f3fc; border-radius: 5px; }
.menuPriceColumn.comparisonPrice small { font-size: 9px; white-space: nowrap; }
.comparisonPriceEditor { display: flex; flex-direction: column; gap: 4px; font-size: 12px; min-width: 0; }
.comparisonPriceEditor input { width: 100%; min-width: 0; }

.dishActions:has(.menuPricePair) { flex-wrap: wrap; align-items: center; }
.dishActions:has(.menuPricePair) > div:first-child { flex: 1 1 auto; min-width: 0; }
.dishActions:has(.menuPricePair) .dishButtons { margin-left: auto; }
.dishActions .taxBadge { display: none; }
.comparisonPriceEditor { grid-column: span 2; }

/* iPad 横屏及大屏：点餐卡更紧凑，一屏容纳 3 行 */
@media (min-width: 900px) {
  .menu { gap: 10px; }
  .dish {
    padding: 10px;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 10px;
    min-height: 0;
  }
  .dishImage { width: 84px; height: 84px; }
  .dish h3 { margin-bottom: 4px; font-size: 15px; line-height: 1.25; }
  .dishIntro { min-height: 0; line-height: 1.35; margin-top: 0; -webkit-line-clamp: 2; }
  .dishMeta { margin-top: 4px; }
  .dishActions { padding-top: 6px; gap: 8px; }
  .dishActions strong { font-size: 16px; }
  .taxBadge { margin-top: 2px; font-size: 11px; }
  .menuPriceColumn { flex-wrap: wrap; align-items: baseline; gap: 5px; padding: 4px; }
  .menuPriceColumn.comparisonPrice small { font-size: 9px; white-space: nowrap; }
}

/* ===== 客人订单进度跟踪 ===== */
.trackShell { max-width: 560px; margin: 0 auto; padding: 16px; }
.trackShell h1 { margin: 0 0 4px; font-size: 20px; }
.trackTop { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.trackBack { color: var(--accent); text-decoration: none; font-weight: 600; }
.trackBack:hover { text-decoration: underline; }
.trackLive { color: var(--ok); font-size: 12px; }
.trackOrderCard { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 14px; box-shadow: var(--shadow); }
.trackOrderHead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.trackOrderHead strong { font-size: 15px; }
.trackOrderHead .trackCode { font-weight: 700; color: var(--accent); }
.trackMeta { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.trackSteps { display: flex; gap: 4px; margin-bottom: 10px; }
.trackStep { flex: 1; text-align: center; font-size: 12px; color: var(--muted); position: relative; padding-top: 22px; }
.trackStep::before { content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 14px; height: 14px; border-radius: 50%; background: var(--line); }
.trackStep::after { content: ""; position: absolute; top: 7px; right: -50%; width: 100%; height: 2px; background: var(--line); z-index: -1; }
.trackStep:last-child::after { display: none; }
.trackStep.done { color: var(--ok); }
.trackStep.done::before { background: var(--ok); }
.trackStep.done::after { background: var(--ok); }
.trackStep.active { color: var(--accent); font-weight: 700; }
.trackStep.active::before { background: var(--accent); box-shadow: 0 0 0 4px rgba(177,8,18,.15); }
.trackCancelled { color: var(--red-dark); font-weight: 700; margin-bottom: 8px; }
.trackOrderCard.cancelled .trackSteps { opacity: .5; }
.trackItems { border-top: 1px dashed var(--line); padding-top: 8px; font-size: 13px; }
.trackItemsRow { display: flex; justify-content: space-between; color: var(--ink); }
.trackTotal { display: flex; justify-content: space-between; font-weight: 700; margin-top: 6px; }
.trackLookupForm { display: flex; gap: 8px; margin-bottom: 12px; }
.trackLookupForm input { flex: 1; padding: 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.trackLookupForm button { padding: 10px 16px; }
.trackTabs { display: flex; gap: 8px; margin-bottom: 12px; }
.trackTabs button { flex: 1; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.trackTabs button.on { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.trackEmpty { text-align: center; color: var(--muted); padding: 24px 0; }
.menuTopBar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; }
.trackMenuLink { display: inline-flex; align-items: center; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--accent); font-size: 13px; font-weight: 600; text-decoration: none; }
