:root {
  --menu-viewport-height: 100dvh;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  max-width: 100vw;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: #f5f7fa;
  color: #1a1a1a;
  background-image:
    radial-gradient(at 0% 0%, rgba(0, 200, 83, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(255, 214, 0, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(0, 200, 83, 0.05) 0px, transparent 50%);
  background-attachment: fixed;
}

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

button {
  cursor: pointer;
  border: none;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

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

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18);
}

.body-lock {
  overflow: hidden;
}

/* customer */
.container {
  min-height: var(--menu-viewport-height, 100dvh);
}

.menu-page-body .container {
  padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(circle at top, rgba(245, 158, 11, 0.14) 0%, rgba(245, 158, 11, 0) 32%),
    linear-gradient(180deg, #eef2f6 0%, #f8fafc 22%, #ffffff 100%);
}

.app-preview-root,
.app-preview-body,
.app-preview-body .container {
  min-width: 0;
  width: 100%;
  max-width: 390px;
  margin-inline: auto;
  overflow-x: clip;
}

.app-preview-body .header {
  margin-top: calc(0.8rem + env(safe-area-inset-top, 0px));
}

.app-preview-body .menuContainer {
  padding-bottom: 8.2rem;
}

.app-preview-body .categorySection:first-child {
  margin-top: 0.1rem;
}

.languageOverlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    calc(1.25rem + env(safe-area-inset-top, 0px))
    1.25rem
    calc(1.25rem + env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(circle at top, rgba(243, 156, 18, 0.18), transparent 38%),
    rgba(248, 249, 250, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.languageCard {
  width: min(100%, 420px);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 32px;
  padding: 2rem 1.5rem;
  box-shadow: 0 30px 70px rgba(45, 52, 54, 0.16);
  text-align: center;
}

.languageBadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.95rem;
  margin-bottom: 1rem;
  border-radius: 999px;
  background: rgba(243, 156, 18, 0.12);
  color: #d68910;
  font-size: 0.9rem;
  font-weight: 800;
}

.languageTitle {
  margin: 0;
  color: #2d3436;
  font-size: 1.8rem;
  font-weight: 800;
}

.languageSubtitle {
  margin: 0.75rem 0 1.5rem 0;
  color: #636e72;
  font-size: 1rem;
  line-height: 1.5;
}

.languageActions {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.languageButton {
  width: 100%;
  border: none;
  border-radius: 22px;
  background: linear-gradient(135deg, #ffffff 0%, #fff8f0 100%);
  color: #2d3436;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  box-shadow: 0 10px 24px rgba(45, 52, 54, 0.08);
}

.languageButtonLabel {
  font-size: 1.1rem;
  font-weight: 800;
}

.languageButtonHint {
  font-size: 0.88rem;
  color: #636e72;
}

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  margin: calc(0.6rem + env(safe-area-inset-top, 0px)) 0.75rem 0;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 0.95rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.title {
  font-size: 1.12rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.03em;
  margin: 0;
}

.tableBadge {
  font-size: 0.72rem;
  color: #b45309;
  font-weight: 800;
  background: rgba(251, 191, 36, 0.16);
  padding: 5px 9px;
  border-radius: 999px;
  align-self: flex-start;
  margin-top: 0;
}

.cartButton {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transition:
    transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    box-shadow 0.2s ease;
}

.cartButton:active {
  transform: scale(0.9);
}

.badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background-color: #ff7675;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.categoryNav {
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  padding: 0.9rem 0.75rem 0.65rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  background: transparent;
  position: relative;
  z-index: 1000;
  transition: all 0.3s ease;
}

.categoryNav::-webkit-scrollbar {
  display: none;
}

.fixedNav {
  position: fixed;
  top: calc(4.9rem + env(safe-area-inset-top, 0px));
  left: 0.7rem;
  right: 0.7rem;
  padding: 0.7rem 0.8rem;
  border-radius: 22px;
  background: rgba(239, 244, 247, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
  animation: slideDown 0.3s ease-out;
}

.categoryBtn {
  min-height: 38px;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #334155;
  font-weight: 700;
  font-size: 0.84rem;
  white-space: nowrap;
  transition: all 0.3s ease;
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
  flex-shrink: 0;
}

.categoryBtn.active {
  background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
  color: white;
  transform: none;
  border-color: rgba(15, 23, 42, 0.8);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.22);
}

.menuContainer {
  padding: 0.15rem 0.75rem 7.6rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.categorySection {
  scroll-margin-top: 132px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 24px;
  padding: 0.95rem;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
}

.categoryTitle {
  font-size: 0.98rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.9rem;
  padding: 0 0.2rem;
  line-height: 1.35;
  display: flex;
  align-items: center;
  box-shadow: none;
}

.menuGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  padding: 0;
  animation: none;
}

.menuItem {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid rgba(226, 232, 240, 0.9);
  height: 100%;
}

.menuItem:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.08);
}

.imageWrapper {
  position: relative;
  width: 100%;
  padding-top: 58%;
  background: #e2e8f0;
}

.itemImage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.menuItem:hover .itemImage {
  transform: scale(1.05);
}

.referenceText {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background-color: rgba(15, 23, 42, 0.56);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.64rem;
  padding: 4px 8px;
  border-radius: 999px;
  z-index: 5;
  pointer-events: none;
  backdrop-filter: blur(8px);
  font-weight: 600;
}

.soldOutOverlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  backdrop-filter: blur(4px);
  z-index: 2;
}

.itemContent {
  padding: 0.95rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.55rem;
}

.itemHeader {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.7rem;
  margin-bottom: 0;
}

.itemName {
  font-size: 0.98rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  margin: 0;
}

.itemPrice {
  font-weight: 800;
  color: #dc2626;
  font-size: 0.98rem;
  white-space: nowrap;
}

.itemDesc {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0 0 0.45rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
  line-height: 1.45;
}

.itemAction {
  display: flex;
  justify-content: center;
  min-height: 48px;
  margin-top: auto;
}

.addBtn {
  height: 40px;
  width: 100%;
  min-width: 0;
  padding: 0 1rem;
  background: linear-gradient(135deg, #0f172a 0%, #1f2937 100%);
  color: white;
  border-radius: 14px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.2s;
  align-self: stretch;
  margin-top: auto;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.2);
}

.addBtn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.24);
}

.addBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.quantityControl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  height: 42px;
  align-self: stretch;
  margin-top: auto;
  padding: 4px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid rgba(226, 232, 240, 0.95);
}

.quantityBtn {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background-color: white;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
}

.quantityBtn:hover {
  background-color: #0f172a;
  color: white;
}

.quantityDisplay {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-weight: 800;
  font-size: 1rem;
  color: #0f172a;
}

.fabContainer {
  position: fixed;
  bottom: calc(0.8rem + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 95;
  width: calc(100% - 1.5rem);
  max-width: none;
}

.fabButton {
  width: 100%;
  background: linear-gradient(135deg, #0f172a 0%, #1f2937 100%);
  color: white;
  padding: 0.95rem 1rem;
  border-radius: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 0.98rem;
  box-shadow: 0 20px 34px rgba(15, 23, 42, 0.22);
}

.cartOverlay,
.modalOverlay,
.successOverlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 200;
  display: flex;
  backdrop-filter: blur(6px);
  animation: fadeIn 0.3s ease-out;
}

.cartOverlay {
  justify-content: flex-end;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.cartContent {
  background-color: white;
  border-radius: 28px;
  margin: 0 0.55rem 0.55rem;
  padding: 1.25rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
  max-height: calc(var(--menu-viewport-height, 100dvh) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 1rem);
  display: flex;
  flex-direction: column;
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.2);
}

.cartHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f1f2f6;
}

.cartHeader h2 {
  font-size: 1.18rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.closeBtn {
  background: none;
  color: #636e72;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.closeBtn:hover {
  background-color: #f1f2f6;
}

.cartList {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  min-height: 0;
}

.cartItem {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cartItemInfo h4 {
  font-size: 0.98rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 4px 0;
}

.cartItemOptions {
  display: block;
  color: #666;
  font-size: 0.85rem;
  margin-top: 0.2rem;
}

.cartItemInfo span {
  color: #ff7675;
  font-weight: 600;
}

.quantityControls {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background-color: #f8fafc;
  padding: 6px 8px;
  border-radius: 20px;
  border: 1px solid rgba(226, 232, 240, 0.95);
}

.quantityControls button {
  background: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2d3436;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.quantityControls span {
  font-weight: 700;
  min-width: 32px;
  height: 32px;
  text-align: center;
  font-size: 1.2rem;
  color: #2d3436;
  background-color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cartFooter {
  border-top: 1px solid #f1f2f6;
  padding-top: 1.5rem;
}

.total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  font-size: 1.08rem;
  font-weight: 800;
  color: #0f172a;
}

.checkoutBtn {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, #0f172a 0%, #1f2937 100%);
  color: white;
  border-radius: 18px;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.18);
}

.checkoutBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.emptyCart {
  text-align: center;
  color: #b2bec3;
  font-size: 1.1rem;
  padding: 3rem 0;
}

.modalOverlay {
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding:
    calc(1rem + env(safe-area-inset-top, 0px))
    1rem
    calc(1rem + env(safe-area-inset-bottom, 0px));
}

.sheetOverlay {
  align-items: center;
}

.centeredOverlay {
  align-items: center;
  justify-content: center;
}

.modal {
  background: white;
  border-radius: 26px;
  padding: 1.15rem;
  width: 100%;
  max-width: 400px;
  animation: slideUp 0.3s ease-out;
  max-height: calc(var(--menu-viewport-height, 100dvh) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 2rem);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sheetModal {
  max-width: 500px;
  border-radius: 28px;
}

.modal h3,
.modal h2 {
  margin: 0 0 1.5rem 0;
  color: #2d3436;
  font-size: 1.3rem;
  text-align: center;
}

.optionsList {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
  max-height: 60vh;
  overflow-y: auto;
}

.optionItem {
  display: flex;
  align-items: center;
  padding: 1rem;
  border: 2px solid #eee;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.optionItem.selected {
  border-color: #3498db;
  background-color: #ebf5fb;
}

.checkbox {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 2px solid #bdc3c7;
  margin-right: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.optionItem.selected .checkbox {
  background-color: #3498db;
  border-color: #3498db;
}

.optionName {
  flex: 1;
  font-weight: 500;
  color: #2d3436;
}

.optionPrice {
  color: #e74c3c;
  font-weight: 600;
}

.modalActions {
  display: flex;
  gap: 1rem;
  padding-bottom: 5px;
}

.cancelBtn,
.confirmBtn,
.secondaryBtn {
  flex: 1;
  padding: 1rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
}

.cancelBtn,
.secondaryBtn {
  background: #f1f2f6;
  color: #636e72;
}

.confirmBtn {
  background: #3498db;
  color: white;
}

.successOverlay {
  z-index: 3000;
  align-items: center;
  justify-content: center;
  padding:
    calc(1rem + env(safe-area-inset-top, 0px))
    1rem
    calc(1rem + env(safe-area-inset-bottom, 0px));
}

.successCard,
.announcementModal {
  background: white;
  border-radius: 28px;
  width: 90%;
  max-width: 400px;
  max-height: calc(var(--menu-viewport-height, 100dvh) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 2rem);
  overflow-y: auto;
  animation: slideUp 0.3s ease-out;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.announcementModal {
  padding: 1.4rem 1.2rem;
  display: flex;
  flex-direction: column;
}

.announcementContent {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #2d3436;
  white-space: pre-wrap;
  text-align: center;
}

.successCard {
  padding: 1.1rem;
  text-align: center;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.35);
}

.successOrderList {
  min-height: 96px;
  max-height: min(27dvh, 220px);
  overflow-y: auto;
  padding-right: 4px;
  margin-top: 0.35rem;
}

.successBtn {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, #0f172a 0%, #1f2937 100%);
  color: white;
  border-radius: 16px;
  font-size: 1rem;
  font-weight: 700;
}

@media (min-width: 520px) {
  .menuGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.loadingSpinnerWrap {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  flex-direction: column;
  gap: 1rem;
}

.loadingSpinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #00c853;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loadingSpinnerWrap p {
  color: #666;
  font-weight: 500;
}

/* admin login */
.admin-login-body .container,
.admin-login-body {
  min-height: 100dvh;
}

.loginContainer {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #fafbfe 0%, #eef2f7 100%);
  padding: 2rem;
}

.glowPrimary,
.glowWarm {
  position: absolute;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.75;
  pointer-events: none;
}

.glowPrimary {
  top: 8%;
  left: 4%;
  width: 280px;
  height: 280px;
  background: rgba(245, 158, 11, 0.18);
}

.glowWarm {
  right: 0;
  bottom: 8%;
  width: 260px;
  height: 260px;
  background: rgba(251, 113, 133, 0.14);
}

.loginBox {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 3rem;
  border-radius: 24px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.12), 0 8px 20px rgba(15, 23, 42, 0.06);
  width: 100%;
  min-width: 300px;
  max-width: 480px;
  animation: slideUpAdmin 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.loginLogo {
  text-align: center;
  margin-bottom: 1.75rem;
}

.loginKicker {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: #92400e;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.loginLogo h1 {
  font-size: clamp(2.2rem, 5vw, 3.3rem);
  color: #2d3436;
  margin: 0 0 0.5rem 0;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  letter-spacing: -0.03em;
  font-family: "Iowan Old Style", "Palatino Linotype", "Noto Serif TC", serif;
}

.loginLogo p {
  color: #636e72;
  font-size: 1.1rem;
  margin: 0;
  font-weight: 500;
}

.loginForm {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.loginRedirectPanel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
  padding: 1.5rem 0 0.5rem;
}

.loginRedirectPanel p {
  margin: 0;
  color: #475569;
  line-height: 1.75;
}

.inputGroup {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.inputGroup label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #2d3436;
}

.inputGroup input {
  padding: 1rem;
  min-height: 48px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.94);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.inputGroup input:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.loginError {
  background-color: rgba(239, 68, 68, 0.92);
  color: white;
  padding: 1rem;
  border-radius: 16px;
  text-align: center;
  font-weight: 600;
  animation: shake 0.4s ease;
}

.loginBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  min-height: 50px;
  background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
  color: white;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: 0 12px 36px rgba(249, 115, 22, 0.28);
}

.directEnterBtn {
  width: 100%;
  text-decoration: none;
}

.loginSecondaryLink {
  color: #0f766e;
  font-weight: 700;
  text-decoration: none;
}

.loginFooter {
  margin-top: 2rem;
  text-align: center;
  color: #64748b;
  line-height: 1.75;
}

/* overview page */
.overview-page-body {
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background:
    radial-gradient(circle at top left, rgba(15, 23, 42, 0.06), transparent 24%),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.1), transparent 18%),
    linear-gradient(180deg, #f5f7fb 0%, #eef2f7 100%);
  color: #0f172a;
}

.overviewShell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px 24px;
  box-sizing: border-box;
}

.overviewGrid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 24px;
  width: min(100%, 1880px);
  margin: 0 auto;
  align-items: center;
}

.overviewPanel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}

.overviewPanelMeta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 4px;
}

.overviewPanelEyebrow {
  display: inline-flex;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.07);
  color: #7c2d12;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.overviewPanelMeta h2 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.overviewPanelCustomer {
  align-items: center;
}

.overviewFrame {
  width: 100%;
  border: 0;
  background: transparent;
}

.previewStage {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  overflow: visible;
  position: relative;
}

.previewStageCustomer::before {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(15, 118, 110, 0.08) 0%, rgba(15, 118, 110, 0) 74%);
  filter: blur(36px);
  top: 90px;
  pointer-events: none;
}

.previewViewport {
  overflow: hidden;
}

.previewViewportCustomer {
  width: 344px;
  height: 744px;
  position: relative;
  background: linear-gradient(180deg, #fdfefe 0%, #dfe5ef 100%);
  padding: 12px;
  margin: 0 auto;
  border-radius: 44px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow:
    0 28px 80px rgba(15, 23, 42, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.68),
    inset 0 -12px 28px rgba(255, 255, 255, 0.4);
}

.previewViewportCustomer::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 74px;
  height: 6px;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.16);
  z-index: 2;
  pointer-events: none;
}

.previewViewportAdmin {
  width: 100%;
  height: min(calc(100dvh - 96px), 760px);
  position: relative;
  background: #ffffff;
  padding: 10px;
  margin: 0 auto;
  border-radius: 28px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow:
    0 24px 64px rgba(15, 23, 42, 0.08),
    0 6px 24px rgba(15, 23, 42, 0.05);
}

.previewViewportAdmin::before {
  display: none;
}

.previewScalerCustomer {
  width: 390px;
  height: 844px;
  transform: scale(0.8205) translateY(0);
  transform-origin: top left;
}

.previewScalerAdmin {
  width: 100%;
  height: 100%;
  transform: none;
  transform-origin: top left;
}

.overviewFrameCustomer {
  display: block;
  width: 390px;
  height: 844px;
  background: #fff;
  border-radius: 32px;
  scrollbar-width: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.overviewFrameCustomer::-webkit-scrollbar {
  display: none;
}

.overviewFrameAdmin {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

/* admin page */
.admin-page-body .adminContainer {
  min-height: 100dvh;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at top left, rgba(15, 23, 42, 0.08), transparent 32%),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.12), transparent 24%),
    linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  color: #1f2937;
  --primary: #2d3436;
  --accent: #00b894;
  --danger: #dc2626;
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --card-bg: #ffffff;
  --border: #e5e7eb;
  --status-pending-bg: #fef3c7;
  --status-pending-text: #d97706;
  --status-cooking-bg: #dbeafe;
  --status-cooking-text: #2563eb;
  --status-served-bg: #d1fae5;
  --status-served-text: #059669;
  --bg-subtle: #f3f4f6;
  --text-main: #111827;
}

.tablet-preview-body,
.tablet-preview-body .adminContainer {
  min-width: 0;
  width: 100%;
}

.tablet-preview-body .adminHeader {
  padding-top: 24px;
}

.tablet-preview-body .adminMain {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 1rem 1rem 1.25rem;
}

.tablet-preview-body .tabContent {
  width: 100%;
}

.tablet-preview-body .ordersGrid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 1024px) {
  .tablet-preview-body,
  .tablet-preview-body .adminContainer {
    min-width: 0;
    width: 100%;
  }

  .tablet-preview-body .adminHeader,
  .tablet-preview-body .adminMain {
    width: 100%;
  }

  .tablet-preview-body .adminMain {
    max-width: 100%;
    padding: 1rem;
  }

  .tablet-preview-body .ordersGrid {
    grid-template-columns: 1fr;
  }
}

.adminHeader {
  flex-shrink: 0;
  padding: calc(env(safe-area-inset-top) + 16px) 24px 16px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  z-index: 10;
}

.headerTop,
.headerBottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.titleGroup {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.titleMeta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.kicker {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(15, 23, 42, 0.07);
  color: #7c2d12;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.adminTitle {
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  letter-spacing: -0.02em;
  margin: 0;
}

.headerActions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.qrBtn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  min-height: 46px;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  color: white;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
}

.qrBtnDanger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 12px 30px rgba(220, 38, 38, 0.24);
}

.nav {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.navBtn {
  min-height: 44px;
  padding: 0.7rem 1.1rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
  border-radius: 12px;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.03);
}

.navBtn.active {
  background: linear-gradient(135deg, #2d3436 0%, #111827 100%);
  color: white !important;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.18);
}

.mainActionBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: 0 12px 36px rgba(16, 185, 129, 0.22);
}

.adminMain {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  position: relative;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

.tabContent {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.loadingState {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 4px solid #e5e7eb;
  border-top-color: #10b981;
  animation: spin 1s linear infinite;
}

.ordersGrid {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  align-content: start;
}

.orderCard {
  background-color: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cardHeader {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f9fafb;
}

.tableId {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.statusBadge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.itemsList {
  padding: 0.5rem 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.orderItem {
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-primary);
  border-bottom: 1px dashed #f3f4f6;
}

.orderItem:last-child {
  border-bottom: none;
}

.itemQty {
  background-color: #fee2e2;
  color: #ef4444;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
  margin-right: 0.5rem;
  font-size: 0.9rem;
}

.cardFooter {
  padding: 1rem;
  border-top: 1px solid var(--border);
  background-color: #f9fafb;
}

.actions {
  display: flex;
  gap: 0.5rem;
}

.actionBtn {
  flex: 1;
  padding: 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: white;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
}

.historyView {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-bottom: 2rem;
}

.statsCards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.statCard {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.statCard h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.statValue {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}

.historyList,
.menuManagement,
.categoryManagement {
  flex: 1;
  overflow-y: auto;
}

.historyList {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}

.historyTable {
  width: 100%;
  border-collapse: collapse;
}

.historyTable th,
.historyTable td {
  padding: 0.9rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}

.tableActionBtn {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.35rem;
  background: white;
  border: 1px solid var(--border);
}

.printBtn {
  color: #2563eb;
}

.deleteBtn {
  color: #ef4444;
}

.emptyHistory {
  color: var(--text-secondary);
}

.actionsBar {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: center;
}

.categoryFilter {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.filterBtn {
  padding: 0.5rem 1rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
}

.filterBtn.active {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}

.menuSectionHeader {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 1.5rem 0 1rem 0;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.adminMenuGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  padding-bottom: 2rem;
}

.menuItemCard {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.itemThumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background-color: #f3f4f6;
  border-bottom: 1px solid var(--border);
}

.itemInfo {
  padding: 1rem;
  flex: 1;
}

.itemInfo h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.itemInfo p {
  margin: 0 0 0.5rem 0;
  font-weight: 600;
  color: var(--accent);
  font-size: 1.1rem;
}

.itemMetaRow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.categoryTag {
  display: inline-block;
  padding: 2px 8px;
  background-color: #f3f4f6;
  color: var(--text-secondary);
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}

.availabilityBadge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.availableBadge {
  background: rgba(5, 150, 105, 0.12);
  color: #059669;
}

.soldOutBadge {
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
}

.itemActions {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  background-color: #f9fafb;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.iconBtn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: white;
  color: var(--text-secondary);
}

.availabilityToggleBtn {
  min-width: 56px;
  height: 36px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 0.82rem;
  font-weight: 700;
}

.markSoldOutBtn {
  background: rgba(220, 38, 38, 0.08);
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.18);
}

.restoreAvailabilityBtn {
  background: rgba(5, 150, 105, 0.08);
  color: #059669;
  border-color: rgba(5, 150, 105, 0.18);
}

.modalLarge {
  width: min(1200px, calc(100vw - 2rem));
  max-width: 1200px;
  max-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
}

.modalHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.modalHeader h3 {
  margin: 0;
}

.modalCloseButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: #f1f5f9;
  color: #475569;
  font-size: 1.15rem;
  cursor: pointer;
  transition: background-color 180ms ease-out, color 180ms ease-out;
}

.modalCloseButton:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.modalCloseButton:focus-visible {
  outline: 4px solid rgba(59, 130, 246, 0.18);
  outline-offset: 2px;
}

.modalBody {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  min-height: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
}

.posMenuSection,
.posCartSection {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.categoryNavScroll {
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
  border-bottom: 1px solid #eee;
  background: #f8fafc;
}

.categoryNavBtn {
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: white;
  border: 1px solid #e5e7eb;
  white-space: nowrap;
  font-weight: 600;
}

.categoryNavBtnActive {
  background: #2d3436;
  color: white;
  border-color: #2d3436;
}

.menuGridScroll {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.menuGridCompact {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}

.menuItemCompact {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0.9rem;
  background: white;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.menuItemCompactTitle {
  color: #111827;
  font-weight: 700;
  line-height: 1.35;
}

.menuItemCompactPrice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #10b981;
  font-weight: 700;
}

.menuItemAddIcon {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #10b981;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.orderSettingsHeader {
  padding: 1rem;
  border-bottom: 1px solid #eee;
}

.cartItemsScroll {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.cartFooterFixed {
  border-top: 1px solid #eee;
  padding: 1rem;
  background: #fff;
}

.emptyMenu {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem;
  color: var(--text-secondary);
  gap: 1rem;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUpAdmin {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-10px);
  }
  75% {
    transform: translateX(10px);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1024px) {
  .overview-page-body {
    height: auto;
    min-height: 100dvh;
    overflow-y: auto;
  }

  .overviewShell {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .overviewGrid {
    grid-template-columns: 1fr;
    align-content: start;
  }

  .overviewPanelAdmin {
    min-height: 700px;
  }

  .previewStage {
    align-items: center;
  }

  .previewViewportAdmin {
    width: 100%;
    height: auto;
    padding: 10px;
    border-radius: 24px;
    min-height: 640px;
  }

  .previewViewportAdmin::before {
    display: none;
  }

  .previewScalerAdmin {
    width: 100%;
    height: 100%;
    transform: none;
  }

  .overviewFrameAdmin {
    width: 100%;
    height: 100%;
    min-height: 620px;
    border-radius: 22px;
  }

  .modalLarge {
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .headerTop,
  .headerBottom {
    flex-direction: column;
    align-items: stretch;
  }

  .headerActions {
    justify-content: stretch;
  }

  .headerActions .qrBtn {
    flex: 1;
  }

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

@media (max-width: 768px) {
  .overviewShell {
    padding: 12px;
    overflow-y: auto;
  }

  .previewStage {
    padding: 0;
    overflow: visible;
  }

  .previewStageCustomer::before {
    display: none;
  }

  .previewViewportCustomer {
    width: min(100%, 360px);
    height: auto;
    min-height: 0;
    margin: 0 auto;
    border-radius: 28px;
    padding: 0;
    background: transparent;
    border: 0;
    overflow: hidden;
    box-shadow: none;
  }

  .previewViewportCustomer::before {
    display: none;
  }

  .previewScalerCustomer {
    width: 100%;
    height: 100%;
    transform: none;
  }

  .overviewFrameCustomer {
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 390 / 844;
    border-radius: 28px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
  }

  .previewViewportAdmin {
    min-height: 540px;
    border-radius: 20px;
  }

  .overviewFrameAdmin {
    width: 100%;
    height: 100%;
    min-height: 520px;
    border-radius: 18px;
  }

  .app-preview-body,
  .app-preview-body .container {
    min-width: 0;
    width: 100%;
    max-width: none;
  }

  .menuGrid {
    gap: 0.75rem;
    padding: 0 0.75rem;
  }

  .cartOverlay,
  .successOverlay {
    align-items: flex-end;
    justify-content: flex-end;
    padding:
      calc(0.75rem + env(safe-area-inset-top, 0px))
      0.75rem
      calc(0.75rem + env(safe-area-inset-bottom, 0px));
  }

  .modalOverlay {
    padding:
      calc(0.9rem + env(safe-area-inset-top, 0px))
      0.75rem
      calc(0.9rem + env(safe-area-inset-bottom, 0px));
  }

  .cartContent,
  .sheetModal {
    width: 100%;
    max-width: none !important;
    border-radius: 28px;
    margin-top: auto;
    padding: 1.25rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
  }

  .successCard,
  .announcementModal {
    width: 100%;
    max-width: min(420px, calc(100vw - 1.5rem)) !important;
  }

  .successCard {
    border-radius: 28px 28px 0 0;
    margin-top: auto;
  }
}

@media (max-width: 480px) {
  .loginContainer {
    padding: 1rem;
  }

  .loginBox {
    padding: 2rem 1.5rem;
  }

  .overviewPanelHeader {
    padding: 12px 14px;
  }

  .previewViewportCustomer {
    width: min(100%, 336px);
    border-radius: 24px;
  }

  .overviewFrameCustomer {
    border-radius: 24px;
  }

  .overviewFrameAdmin {
    min-height: 500px;
  }
}

/* The embedded customer surface is intentionally denser than the standalone layout. */
.app-preview-body .header {
  margin: calc(0.65rem + env(safe-area-inset-top, 0px)) 0.65rem 0;
  padding: 0.8rem 0.85rem;
  border-radius: 16px;
}

.app-preview-body .categoryNav {
  position: sticky;
  top: calc(4.7rem + env(safe-area-inset-top, 0px));
  z-index: 90;
  gap: 0.45rem;
  margin: 0.55rem 0.65rem;
  padding: 0.55rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  background: rgba(239, 244, 247, 0.92);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.app-preview-body .categoryBtn {
  min-height: 40px;
  padding: 0.5rem 0.8rem;
  font-size: 0.78rem;
}

.app-preview-body .menuContainer {
  gap: 0.75rem;
  padding: 0.1rem 0.65rem 8rem;
}

.app-preview-body .categorySection {
  padding: 0.75rem;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.app-preview-body .categoryTitle {
  margin-bottom: 0.65rem;
  padding: 0;
  font-size: 0.92rem;
}

.app-preview-body .menuGrid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  padding: 0;
}

.app-preview-body .menuItem {
  min-width: 0;
  border-radius: 16px;
  box-shadow: 0 5px 16px rgba(15, 23, 42, 0.06);
}

.app-preview-body .imageWrapper {
  padding-top: 70%;
}

.app-preview-body .itemContent {
  min-height: 142px;
  gap: 0.4rem;
  padding: 0.7rem;
}

.app-preview-body .itemHeader {
  display: block;
}

.app-preview-body .itemName {
  min-height: 2.55em;
  font-size: 0.88rem;
  line-height: 1.28;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.app-preview-body .itemPrice {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.95rem;
}

.app-preview-body .itemDesc {
  display: none;
}

.app-preview-body .itemAction,
.app-preview-body .addBtn,
.app-preview-body .quantityControl {
  min-height: 48px;
  height: 48px;
}

.app-preview-body .addBtn {
  padding: 0 0.7rem;
  border-radius: 16px;
  font-size: 0.84rem;
  box-shadow: none;
}

.app-preview-body .quantityControl {
  width: 100%;
  border-radius: 16px;
}

.app-preview-body .quantityBtn {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
}

@media (max-width: 350px) {
  .app-preview-body .menuGrid {
    gap: 0.5rem;
  }

  .app-preview-body .categorySection {
    padding: 0.6rem;
  }

  .app-preview-body .itemContent {
    padding: 0.6rem;
  }
}

@media (min-width: 769px) and (max-width: 1100px) {
  .tablet-preview-body .headerTop,
  .tablet-preview-body .headerBottom {
    flex-direction: row;
    align-items: center;
  }

  .tablet-preview-body .headerActions {
    justify-content: flex-end;
  }

  .tablet-preview-body .headerActions .qrBtn {
    flex: 0 0 auto;
  }

  .tablet-preview-body .nav {
    width: auto;
  }

  .tablet-preview-body .navBtn,
  .tablet-preview-body .mainActionBtn {
    width: auto;
  }

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