:root {
  --bg: #f5f7fb;
  --panel: rgba(255, 255, 255, 0.94);
  --panel-strong: #ffffff;
  --ink: #172033;
  --muted: #64748b;
  --gold: #c47a19;
  --gold-2: #9f5f0f;
  --teal: #087f7a;
  --rose: #c2416b;
  --danger: #dc2626;
  --line: rgba(30, 41, 59, 0.13);
  --shadow: 0 18px 48px rgba(30, 41, 59, 0.12);
}

* { box-sizing: border-box; }
html { min-height: 100%; height: 100%; background: var(--bg); }
body {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(196, 122, 25, 0.12), transparent 32rem),
    radial-gradient(circle at top right, rgba(8, 127, 122, 0.12), transparent 30rem),
    linear-gradient(180deg, #fffdf7 0%, #f5f7fb 44%, #edf4f7 100%);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body > main {
  flex: 1 0 auto;
}

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--gold-2); }

.auth-page {
  min-height: 100svh;
}

body.auth-page {
  display: flex;
  flex-direction: column;
  place-items: initial;
}

.auth-shell {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 24px;
}
body.auth-page .auth-shell {
  flex: 1 0 auto;
  display: grid;
  place-items: center;
}
.auth-card, .panel, .stat-card, .subscription-lock {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 8px;
}
.auth-card {
  position: relative;
  overflow: hidden;
  width: min(100%, 440px);
  margin: auto;
  padding: 30px;
}
.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--gold), var(--teal));
}
.auth-card.wide { width: min(100%, 760px); }
.auth-card h1 { margin: 0 0 10px; font-size: 2rem; }
.auth-link { display: block; margin-top: 18px; text-align: center; }

.muted, small { color: var(--muted); }
label {
  color: #334155;
  font-weight: 700;
  margin-bottom: 6px;
}
hr {
  border-color: rgba(30, 41, 59, 0.12);
  opacity: 1;
}
.alert {
  border-radius: 8px;
  border-width: 1px;
}
.eyebrow {
  color: var(--gold-2);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
  margin: 0 0 6px;
}

.form-control, .form-select {
  min-height: 44px;
  background: #ffffff;
  border: 1px solid rgba(30, 41, 59, 0.2);
  color: var(--ink);
  border-radius: 8px;
}
.form-control::placeholder {
  color: #5f6f86;
  opacity: 1;
}
.form-control::-webkit-input-placeholder { color: #5f6f86; opacity: 1; }
.form-control::-moz-placeholder { color: #5f6f86; opacity: 1; }
.form-control:-ms-input-placeholder { color: #5f6f86; opacity: 1; }
.form-control:focus, .form-select:focus {
  background: #ffffff;
  border-color: var(--teal);
  color: var(--ink);
  box-shadow: 0 0 0 0.22rem rgba(8, 127, 122, 0.16);
}
.form-control[readonly] {
  background: #eef3f7;
  color: #334155;
}
.form-select option { background: #ffffff; color: var(--ink); }

.btn { min-height: 40px; border-radius: 8px; font-weight: 700; }
.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  border-color: transparent;
  color: #1a1510;
  box-shadow: 0 10px 22px rgba(196, 122, 25, 0.22);
}
.btn-gold:hover { color: #1a1510; filter: brightness(1.04); }
.btn-outline-light { border-color: var(--line); color: var(--ink); }
.btn-danger {
  background: #dc2626;
  border-color: #dc2626;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 22px;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 28px rgba(30, 41, 59, 0.08);
}
.app-topbar strong { display: block; font-size: 1.05rem; }
.app-topbar span { color: var(--muted); font-size: 0.86rem; }
.app-topbar nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.app-topbar nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
}
.app-topbar nav a:hover {
  color: #ffffff;
  border-color: var(--teal);
  background: var(--teal);
}

.app-main {
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: 22px;
}
.two-col {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(420px, 1.25fr);
  gap: 18px;
}
.full-span { grid-column: 1 / -1; }
.grid { display: grid; gap: 18px; }
.stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; }
.dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.panel, .stat-card { padding: 18px; }
.panel, .stat-card { backdrop-filter: blur(18px); }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.panel h2 { margin: 0; font-size: 1.2rem; }
.stat-card span { color: var(--muted); display: block; margin-bottom: 8px; }
.stat-card strong { font-size: 1.7rem; }
.stat-card {
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--teal));
}

.app-table { color: var(--ink); margin: 0; }
.app-table th {
  color: #53657d;
  background: #f3f6fa;
  border-color: var(--line);
  font-size: 0.8rem;
  text-transform: uppercase;
}
.app-table td { border-color: var(--line); vertical-align: middle; }
.app-table tbody tr:hover { background: rgba(8, 127, 122, 0.05); }
.app-table small { display: block; margin-top: 2px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.inline { display: inline-flex; align-items: center; gap: 6px; }
.table-responsive {
  border: 1px solid rgba(30, 41, 59, 0.08);
  border-radius: 8px;
}
.table-responsive .table {
  margin-bottom: 0;
}
.edit-details summary {
  cursor: pointer;
  color: var(--teal);
  min-height: 34px;
  display: flex;
  align-items: center;
}
.code-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  min-width: 46px;
  justify-content: center;
  padding: 0 8px;
  margin: 2px 4px 2px 0;
  border: 1px solid rgba(215, 173, 85, 0.36);
  border-radius: 8px;
  color: #9f5f0f;
  background: #fff5dd;
  font-weight: 800;
  font-size: 0.78rem;
}

.category-admin-list {
  display: grid;
  gap: 10px;
}
.category-admin-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(30, 41, 59, 0.1);
  border-radius: 8px;
  background: #f8fafc;
}
.category-update-form {
  min-width: 0;
}
.category-delete-form {
  white-space: nowrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(30, 41, 59, 0.14);
  background: #ffffff;
  color: #334155;
  font-size: 0.78rem;
  text-transform: capitalize;
}
.status-pill.active, .status-pill.completed, .status-pill.paid, .status-pill.ready, .status-pill.open, .status-pill.present {
  color: #04746f;
  background: #e8fbf8;
  border-color: rgba(8, 127, 122, 0.18);
}
.status-pill.trial, .status-pill.preparing, .status-pill.closed {
  color: #9f5f0f;
  background: #fff5dd;
  border-color: rgba(196, 122, 25, 0.24);
}
.status-pill.half_day {
  color: #92400e;
  background: #fff7ed;
  border-color: rgba(196, 122, 25, 0.22);
}
.status-pill.absent, .status-pill.leave {
  color: #b4233c;
  background: #fff0f3;
  border-color: rgba(220, 38, 38, 0.18);
}
.status-pill.expired, .status-pill.suspended, .status-pill.cancelled, .status-pill.disabled {
  color: #b4233c;
  background: #fff0f3;
  border-color: rgba(220, 38, 38, 0.18);
}

.subscription-lock {
  padding: 24px;
  margin-bottom: 18px;
  border-color: rgba(239, 91, 140, 0.35);
}
.subscription-lock.large { width: min(100%, 780px); margin: 40px auto; }
.lock-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0; }
.lock-grid div { border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.lock-grid span { display: block; color: var(--muted); }

.pos-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 410px;
  gap: 18px;
  padding: 18px;
  height: calc(100vh - 68px);
}
.pos-menu, .pos-cart {
  min-height: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}
.pos-menu { overflow: hidden; display: flex; flex-direction: column; }
.pos-cart { overflow-y: auto; }
.pos-workbar {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}
.pos-search { display: grid; grid-template-columns: minmax(0, 1fr) 150px 132px; gap: 10px; margin-bottom: 14px; }
.pos-workbar .pos-search { margin-bottom: 0; }
.pos-mode-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(30, 41, 59, 0.1);
  border-radius: 8px;
  background: #f8fafc;
}
.pos-mode-bar button {
  min-height: 38px;
  border: 1px solid rgba(30, 41, 59, 0.12);
  border-radius: 8px;
  color: #334155;
  background: #ffffff;
  font-weight: 800;
}
.pos-mode-bar button.active {
  color: #ffffff;
  border-color: var(--teal);
  background: linear-gradient(135deg, var(--teal), #13a79f);
  box-shadow: 0 10px 22px rgba(8, 127, 122, 0.16);
}
.pos-menu-body {
  min-height: 0;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 14px;
  flex: 1;
}
.pos-category-rail,
.pos-products {
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.pos-category-rail {
  padding: 12px;
  overflow: hidden;
}
.pos-products {
  display: flex;
  flex-direction: column;
  padding: 12px;
}
.pos-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.pos-section-title h2 { margin: 0; font-size: 1.05rem; }
.category-tabs {
  height: calc(100% - 26px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding-right: 4px;
}
.category-tab {
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: #ffffff;
  border-radius: 8px;
  text-align: left;
  font-weight: 750;
  line-height: 1.2;
}
.category-tab.active {
  border-color: var(--teal);
  color: #ffffff;
  background: linear-gradient(135deg, #087f7a, #11a69e);
  box-shadow: 0 12px 24px rgba(8, 127, 122, 0.2);
}
.menu-grid {
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  align-content: start;
  gap: 14px;
  padding-right: 4px;
}
.dish-card {
  display: flex;
  min-height: 156px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(180deg, #ffffff, #fbfdff);
  border-radius: 8px;
  padding: 14px;
  text-align: left;
  color: var(--ink);
  box-shadow: 0 12px 26px rgba(30, 41, 59, 0.09);
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.dish-card:hover {
  transform: translateY(-2px);
  border-color: rgba(196, 122, 25, 0.48);
  background: #fffaf0;
}
.dish-card strong { font-size: 1rem; line-height: 1.25; }
.dish-card span { color: var(--muted); font-size: 0.86rem; }
.dish-card b { color: #9f5f0f; font-size: 1.08rem; }
.dish-card-img {
  width: 88px;
  height: 88px;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  object-fit: cover;
  overflow: hidden;
  border: 1px solid rgba(30, 41, 59, 0.1);
  border-radius: 8px;
  background: linear-gradient(135deg, #f8fafc, #e8fbf8);
  color: #087f7a;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
}

.pos-layout-compact .pos-shell {
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 12px;
}
.pos-layout-compact .pos-menu-body {
  grid-template-columns: 180px minmax(0, 1fr);
}
.pos-layout-compact .menu-grid {
  grid-template-columns: repeat(auto-fill, minmax(142px, 1fr));
  gap: 10px;
}
.pos-layout-compact .dish-card,
.pos-density-dense .dish-card {
  min-height: 126px;
  padding: 10px;
}
.pos-layout-compact .dish-card-img,
.pos-density-dense .dish-card-img {
  width: 62px;
  height: 62px;
}
.pos-layout-split .pos-shell {
  grid-template-columns: minmax(0, 1fr) minmax(430px, 34vw);
}
.pos-layout-split .pos-cart {
  border-color: rgba(196, 122, 25, 0.24);
  background: linear-gradient(180deg, #ffffff, #fffaf0);
}
.pos-layout-quick .pos-shell {
  grid-template-columns: minmax(0, 1fr) 390px;
}
.pos-layout-quick .pos-menu-body {
  grid-template-columns: 150px minmax(0, 1fr);
}
.pos-layout-quick .menu-grid {
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 8px;
}
.pos-layout-quick .dish-card {
  min-height: 102px;
  padding: 9px;
}
.pos-layout-quick .dish-card-img,
.pos-no-images .dish-card-img {
  display: none;
}
.pos-layout-quick .dish-card strong {
  font-size: 0.9rem;
}
.pos-code-mode .dish-card-codes {
  color: #087f7a;
  font-weight: 850;
}
.pos-theme-warm {
  --bg: #fbf7ef;
  --panel: rgba(255, 255, 255, 0.96);
  --gold: #bc6f18;
  --teal: #7a5b16;
}
.pos-theme-warm .pos-products,
.pos-theme-warm .pos-category-rail {
  background: #fff8eb;
}
.pos-theme-contrast .dish-card,
.pos-theme-contrast .cart-item,
.pos-theme-contrast .category-tab {
  border-color: rgba(15, 23, 42, 0.22);
}
.pos-theme-classic .pos-products,
.pos-theme-classic .pos-category-rail,
.pos-theme-classic .pos-mode-bar {
  background: #ffffff;
}
.pos-sticky-cart .pos-cart {
  position: sticky;
  top: 82px;
  align-self: start;
  max-height: calc(100vh - 96px);
}
.menu-item-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
}
.menu-thumb {
  width: 48px;
  height: 48px;
  aspect-ratio: 1 / 1;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  object-fit: cover;
  overflow: hidden;
  border: 1px solid rgba(30, 41, 59, 0.1);
  border-radius: 8px;
  background: linear-gradient(135deg, #f8fafc, #e8fbf8);
  color: #087f7a;
  font-size: 0.72rem;
  font-weight: 900;
}
.menu-item-cell small {
  display: block;
}
.cart-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 14px; }
.offline-sync-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid rgba(196, 122, 25, 0.2);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 245, 221, 0.9));
}
.offline-sync-panel h3 {
  margin: 0;
  color: #111827;
  font-size: 0.98rem;
}
.offline-sync-panel small {
  display: block;
}
.offline-sync-panel.offline {
  border-color: rgba(220, 38, 38, 0.2);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 240, 243, 0.94));
}
.offline-sync-panel.syncing {
  border-color: rgba(8, 127, 122, 0.18);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(232, 251, 248, 0.94));
}
.shift-widget {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 13px;
  border: 1px solid rgba(8, 127, 122, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(232, 251, 248, 0.92), rgba(255, 250, 240, 0.92));
}
.shift-widget-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.shift-widget h3 {
  margin: 0;
  color: #111827;
  font-size: 1rem;
}
.shift-form {
  display: grid;
  gap: 8px;
}
.shift-fields,
.shift-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.shift-mini-grid div {
  padding: 9px;
  border: 1px solid rgba(30, 41, 59, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}
.shift-mini-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
}
.shift-mini-grid strong {
  color: var(--ink);
  font-size: 0.88rem;
}
.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}
.qty-controls { display: flex; align-items: center; gap: 6px; }
.qty-controls button { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--ink); }
.cart-totals { margin: 16px 0; display: grid; gap: 8px; }
.cart-totals div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cart-totals input { max-width: 130px; }
.cart-totals .grand { padding-top: 10px; border-top: 1px solid var(--line); font-size: 1.2rem; }
.payment-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.scanner-panel {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.72);
}
.scanner-panel[hidden] {
  display: none;
}
.scanner-panel > div {
  width: min(100%, 420px);
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.24);
  border-radius: 8px;
  background: #ffffff;
}
.scanner-panel video {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  background: #111827;
}

.receipt-page { background: #eef2f7; }
.receipt { display: grid; place-items: center; min-height: 100vh; padding: 18px; }
.receipt-paper {
  width: 310px;
  background: #fff;
  color: #111;
  padding: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.receipt-center { text-align: center; }
.receipt-center h1 { font-size: 1.1rem; margin: 0 0 4px; }
.receipt-center p, .receipt p { margin: 2px 0; font-size: 0.78rem; }
.receipt-line { border-top: 1px dashed #111; margin: 8px 0; }
.receipt-row { display: flex; justify-content: space-between; gap: 8px; font-size: 0.8rem; }
.receipt-row.total { font-size: 0.95rem; font-weight: 800; }
.receipt-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.receipt-share-panel {
  width: min(100%, 760px);
  display: grid;
  gap: 12px;
}
.receipt-share-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}
.receipt-email-form,
.public-link-box {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}
.receipt-email-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.public-link-box span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 6px;
}
.receipt-adjustment-panel {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(220, 38, 38, 0.14);
  border-radius: 8px;
  background: #fff7f7;
}
.receipt-adjustment-panel h3 {
  margin: 0;
  font-size: 1rem;
}
.adjustment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.adjustment-grid form {
  padding: 10px;
  border: 1px solid rgba(30, 41, 59, 0.1);
  border-radius: 8px;
  background: #ffffff;
}
.adjustment-history {
  display: grid;
  gap: 8px;
}
.adjustment-history div {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  background: #ffffff;
}
.switch-row {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.qr-preview-box {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(30, 41, 59, 0.1);
  border-radius: 8px;
  background: #f8fafc;
}

.qr-preview-box img {
  width: 112px;
  height: 112px;
  object-fit: contain;
  padding: 8px;
  border-radius: 8px;
  background: #ffffff;
}

.pos-layout-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.pos-layout-preview span {
  min-height: 54px;
  display: grid;
  place-items: center;
  padding: 8px;
  border: 1px solid rgba(30, 41, 59, 0.1);
  border-radius: 8px;
  color: #334155;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  font-size: 0.82rem;
  font-weight: 850;
  text-align: center;
}

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

.report-export-panel {
  margin-bottom: 18px;
}

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

.report-export-card {
  min-height: 230px;
  display: grid;
  align-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(30, 41, 59, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92));
  box-shadow: 0 14px 32px rgba(30, 41, 59, 0.07);
}

.report-export-card h3 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 1rem;
}

.report-export-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

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

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

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

.account-action-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(30, 41, 59, 0.1);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.account-action-card h3,
.account-action-card p {
  margin: 0;
}

.account-action-card h3 {
  color: var(--ink);
  font-size: 1rem;
}

.account-action-card p,
.account-action-card small {
  color: var(--muted);
  line-height: 1.45;
}

.account-action-card > strong {
  color: var(--teal);
  font-size: 1.35rem;
}

.account-action-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.account-statement {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 18px;
}

.account-print-sheet {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.account-print-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  border-bottom: 1px solid rgba(30, 41, 59, 0.1);
  padding-bottom: 14px;
}

.account-print-head h1,
.account-print-head p {
  margin: 0;
}

.account-print-head h1 {
  color: var(--ink);
  font-size: 1.5rem;
}

.account-print-head span {
  display: block;
  color: var(--muted);
  text-align: right;
}

.account-summary-grid,
.account-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.account-summary-grid article,
.account-mode-grid div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(30, 41, 59, 0.1);
  border-radius: 8px;
  background: #f8fafc;
}

.account-summary-grid span,
.account-mode-grid span,
.account-summary-grid small,
.account-mode-grid small {
  color: var(--muted);
}

.account-summary-grid strong,
.account-mode-grid strong {
  color: var(--ink);
  font-size: 1.08rem;
}

.account-print-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.account-transaction-table {
  font-size: 0.9rem;
}

.printer-test-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 16px;
}

.printer-test-box {
  min-height: 360px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.4;
}

.bridge-status-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bridge-status-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(30, 41, 59, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.bridge-status-list code {
  white-space: normal;
  word-break: break-word;
}

.site-footer {
  width: 100%;
  min-height: 82px;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin: auto 0 0;
  padding: 20px max(22px, calc((100% - 1180px) / 2));
  border-top: 1px solid rgba(30, 41, 59, 0.11);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(238, 251, 249, 0.94));
  box-shadow: 0 -16px 34px rgba(30, 41, 59, 0.06);
}

.site-footer strong,
.site-footer span {
  display: block;
}

.site-footer span,
.site-footer p {
  margin: 0;
  color: var(--muted);
}

.site-footer p {
  text-align: right;
}

.site-footer a {
  color: var(--teal);
  font-weight: 800;
}

.receipt-page .site-footer {
  display: none;
}

.kitchen-board { padding: 18px; }
.kitchen-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.kot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.kot-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}
.kot-card h3 { margin: 0; font-size: 1.1rem; }
.kot-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.public-hero {
  min-height: 76vh;
  display: grid;
  align-items: center;
  padding: 32px 22px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.5)),
    radial-gradient(circle at 75% 20%, rgba(8, 127, 122, 0.12), transparent 24rem);
}
.public-hero-inner { width: min(100%, 980px); margin: 0 auto; }
.public-hero h1 { font-size: clamp(2.4rem, 5vw, 5rem); max-width: 820px; }
.public-menu { width: min(100%, 1180px); margin: 0 auto; padding: 24px 22px 60px; }

@media (max-width: 980px) {
  .two-col, .dashboard-grid, .stats-grid, .pos-shell { grid-template-columns: 1fr; }
  .report-export-grid, .printer-test-grid, .account-action-grid, .account-summary-grid, .account-mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pos-layout-compact .pos-shell,
  .pos-layout-split .pos-shell,
  .pos-layout-quick .pos-shell { grid-template-columns: 1fr; }
  .pos-shell { height: auto; }
  .pos-sticky-cart .pos-cart { position: static; max-height: none; }
  .pos-search { grid-template-columns: 1fr; }
  .pos-menu-body { grid-template-columns: 1fr; }
  .pos-layout-compact .pos-menu-body,
  .pos-layout-quick .pos-menu-body { grid-template-columns: 1fr; }
  .pos-category-rail { overflow: visible; }
  .category-tabs {
    height: auto;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
  }
  .category-tab { min-width: 136px; text-align: center; }
  .pos-cart { position: sticky; bottom: 0; }
}

@media (max-width: 640px) {
  .app-topbar { align-items: flex-start; flex-direction: column; }
  .app-main, .pos-shell, .kitchen-board { padding: 12px; }
  .panel, .stat-card, .auth-card { padding: 14px; }
  .pos-search, .payment-grid, .lock-grid, .shift-fields, .offline-sync-panel { grid-template-columns: 1fr; }
  .pos-mode-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .receipt-share-grid, .receipt-email-form { grid-template-columns: 1fr; }
  .adjustment-grid { grid-template-columns: 1fr; }
  .adjustment-history div { grid-template-columns: 1fr; }
  .report-export-grid, .printer-test-grid, .account-action-grid, .account-summary-grid, .account-mode-grid, .account-print-head { grid-template-columns: 1fr; }
  .report-export-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .account-action-buttons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-print-head span { text-align: left; }
  .category-admin-card { grid-template-columns: 1fr; }
  .category-delete-form .btn { width: 100%; }
}

@media print {
  body { background: #fff; }
  .receipt-actions, .site-footer { display: none; }
  .receipt { padding: 0; display: block; }
  .receipt-paper { width: 80mm; box-shadow: none; }
  .app-topbar,
  .account-print-actions,
  .account-statement-page .site-footer {
    display: none !important;
  }
  .account-statement {
    width: 100%;
    padding: 0;
  }
  .account-print-sheet {
    border: 0;
    box-shadow: none;
    padding: 0;
  }
  .account-summary-grid,
  .account-mode-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media screen {
  :root {
    --bg: #f5f7fb;
    --panel: rgba(255, 255, 255, 0.94);
    --panel-strong: #ffffff;
    --ink: #172033;
    --muted: #64748b;
    --gold: #c47a19;
    --gold-2: #9f5f0f;
    --teal: #087f7a;
    --rose: #c2416b;
    --danger: #dc2626;
    --line: rgba(30, 41, 59, 0.13);
    --shadow: 0 18px 48px rgba(30, 41, 59, 0.12);
  }

  body {
    background:
      radial-gradient(circle at top left, rgba(196, 122, 25, 0.12), transparent 32rem),
      radial-gradient(circle at top right, rgba(8, 127, 122, 0.12), transparent 30rem),
      linear-gradient(180deg, #fffdf7 0%, #f5f7fb 44%, #edf4f7 100%);
    color: var(--ink);
  }

  a { color: var(--teal); }
  a:hover { color: var(--gold-2); }

  .auth-card,
  .panel,
  .stat-card,
  .subscription-lock,
  .pos-menu,
  .pos-cart,
  .kot-card {
    background: var(--panel);
    border-color: rgba(30, 41, 59, 0.12);
    box-shadow: var(--shadow);
  }

  .auth-card,
  .panel,
  .stat-card {
    backdrop-filter: blur(18px);
  }

  .auth-page {
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(245, 247, 251, 0.82)),
      radial-gradient(circle at 20% 18%, rgba(196, 122, 25, 0.14), transparent 18rem),
      radial-gradient(circle at 84% 20%, rgba(8, 127, 122, 0.14), transparent 20rem);
  }

  .auth-card h1,
  .panel h2,
  .public-hero h1,
  .cart-head h2,
  .pos-section-title h2,
  .kitchen-head h1 {
    color: #111827;
  }

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

  .eyebrow {
    color: var(--gold-2);
  }

  .form-control,
  .form-select {
    background: #ffffff;
    border: 1px solid rgba(30, 41, 59, 0.2);
    color: #111827;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  }

  .form-control::placeholder,
  .form-control::-webkit-input-placeholder,
  .form-control::-moz-placeholder,
  .form-control:-ms-input-placeholder {
    color: #5f6f86;
    opacity: 1;
  }

  .form-control:focus,
  .form-select:focus {
    background: #ffffff;
    border-color: var(--teal);
    color: #111827;
    box-shadow: 0 0 0 0.22rem rgba(8, 127, 122, 0.16);
  }

  .form-control[readonly] {
    background: #eef3f7;
    color: #334155;
  }

  .form-select option {
    background: #ffffff;
    color: #111827;
  }

  .btn-gold {
    background: linear-gradient(135deg, #c47a19, #f1b84b);
    color: #211406;
    box-shadow: 0 10px 22px rgba(196, 122, 25, 0.22);
  }

  .btn-outline-light {
    border-color: rgba(30, 41, 59, 0.22);
    color: #1f2937;
    background: rgba(255, 255, 255, 0.7);
  }

  .btn-outline-light:hover {
    border-color: var(--teal);
    color: #ffffff;
    background: var(--teal);
  }

  .app-topbar {
    background: rgba(255, 255, 255, 0.88);
    border-bottom-color: rgba(30, 41, 59, 0.12);
    box-shadow: 0 10px 28px rgba(30, 41, 59, 0.08);
  }

  .app-topbar strong {
    color: #111827;
  }

  .app-topbar span {
    color: #64748b;
  }

  .app-topbar nav a {
    color: #1f2937;
    background: #ffffff;
    border-color: rgba(30, 41, 59, 0.14);
  }

  .app-topbar nav a:hover {
    color: #ffffff;
    border-color: var(--teal);
    background: var(--teal);
  }

  .stat-card {
    position: relative;
    overflow: hidden;
  }

  .stat-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--teal));
  }

  .stat-card span {
    color: #64748b;
  }

  .stat-card strong {
    color: #111827;
  }

  .app-table {
    color: #1f2937;
  }

  .app-table th {
    color: #53657d;
    background: #f3f6fa;
    border-color: rgba(30, 41, 59, 0.1);
  }

  .app-table td {
    border-color: rgba(30, 41, 59, 0.09);
  }

  .app-table tbody tr:hover {
    background: rgba(8, 127, 122, 0.05);
  }

  .status-pill {
    background: #ffffff;
    border-color: rgba(30, 41, 59, 0.14);
    color: #334155;
  }

  .status-pill.active,
  .status-pill.completed,
  .status-pill.paid,
  .status-pill.ready {
    color: #04746f;
    background: #e8fbf8;
    border-color: rgba(8, 127, 122, 0.18);
  }

  .status-pill.trial,
  .status-pill.preparing {
    color: #9f5f0f;
    background: #fff5dd;
    border-color: rgba(196, 122, 25, 0.24);
  }

  .status-pill.expired,
  .status-pill.suspended,
  .status-pill.cancelled,
  .status-pill.disabled {
    color: #b4233c;
    background: #fff0f3;
    border-color: rgba(220, 38, 38, 0.18);
  }

  .subscription-lock {
    background: linear-gradient(135deg, #fff7ed, #ffffff);
    border-color: rgba(196, 122, 25, 0.22);
  }

  .lock-grid div {
    background: #ffffff;
    border-color: rgba(30, 41, 59, 0.12);
  }

  .pos-page {
    background:
      linear-gradient(180deg, #fffdf7 0%, #eef6f8 100%);
  }

  .pos-menu,
  .pos-cart {
    background: rgba(255, 255, 255, 0.94);
  }

  .pos-category-rail,
  .pos-products {
    background: #f8fafc;
    border-color: rgba(30, 41, 59, 0.11);
  }

  .category-tab {
    color: #263445;
    background: #ffffff;
    border-color: rgba(30, 41, 59, 0.13);
  }

  .category-tab:hover {
    border-color: rgba(8, 127, 122, 0.32);
    background: #eefbf9;
  }

  .category-tab.active {
    border-color: var(--teal);
    color: #ffffff;
    background: linear-gradient(135deg, #087f7a, #11a69e);
    box-shadow: 0 12px 24px rgba(8, 127, 122, 0.2);
  }

  .dish-card {
    color: #172033;
    background:
      linear-gradient(180deg, #ffffff, #fbfdff);
    border-color: rgba(30, 41, 59, 0.12);
    box-shadow: 0 12px 26px rgba(30, 41, 59, 0.09);
  }

  .dish-card:hover {
    border-color: rgba(196, 122, 25, 0.48);
    background: #fffaf0;
  }

  .dish-card span {
    color: #64748b;
  }

  .dish-card b {
    color: #9f5f0f;
  }

  .cart-item {
    border-bottom-color: rgba(30, 41, 59, 0.1);
  }

  .qty-controls button {
    border-color: rgba(30, 41, 59, 0.16);
    background: #ffffff;
    color: #172033;
  }

  .qty-controls button:hover {
    color: #ffffff;
    background: var(--teal);
  }

  .cart-totals .grand {
    border-top-color: rgba(30, 41, 59, 0.14);
  }

  .code-badge {
    color: #9f5f0f;
    background: #fff5dd;
    border-color: rgba(196, 122, 25, 0.28);
  }

  .edit-details summary {
    color: var(--teal);
  }

  .public-hero {
    background:
      linear-gradient(120deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.5)),
      radial-gradient(circle at 75% 20%, rgba(8, 127, 122, 0.12), transparent 24rem);
  }

  .receipt-page {
    background: #eef2f7;
  }
}

/* Public marketing website */
.marketing-page,
.pricing-page {
  background: #f7fafc;
}

.public-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(30, 41, 59, 0.11);
  backdrop-filter: blur(14px);
  box-shadow: 0 14px 30px rgba(30, 41, 59, 0.08);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.brand-mark img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(8, 127, 122, 0.16);
}

.brand-mark strong,
.brand-mark small {
  display: block;
  line-height: 1.2;
}

.brand-mark small {
  color: var(--muted);
}

.public-nav nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.public-nav nav a,
.nav-install {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid rgba(30, 41, 59, 0.14);
  border-radius: 8px;
  color: #1f2937;
  background: #ffffff;
  font-weight: 750;
}

.nav-install {
  font: inherit;
}

.public-nav nav a:hover,
.nav-install:hover {
  color: #ffffff;
  background: var(--teal);
  border-color: var(--teal);
}

.public-hero.etofa-hero {
  min-height: 72svh;
  align-items: end;
  padding: 72px 24px 58px;
  color: #101827;
  background:
    linear-gradient(90deg, rgba(255, 253, 247, 0.94) 0%, rgba(255, 253, 247, 0.86) 42%, rgba(255, 253, 247, 0.38) 100%),
    url("https://images.unsplash.com/photo-1517248135467-4c7edcad34c4?auto=format&fit=crop&w=1800&q=82") center/cover no-repeat;
}

.menu-hero {
  min-height: 48svh;
  padding: 64px 24px;
  background:
    linear-gradient(90deg, rgba(255, 253, 247, 0.95), rgba(255, 253, 247, 0.5)),
    url("https://images.unsplash.com/photo-1552566626-52f8b828add9?auto=format&fit=crop&w=1800&q=82") center/cover no-repeat;
}

.shopfront-page {
  background:
    linear-gradient(180deg, #fffdf7 0%, #f7fafc 44%, #eef7f5 100%);
}

.shop-hero {
  min-height: 58svh;
  display: grid;
  align-items: end;
  padding: 76px 24px 54px;
  background-size: cover;
  background-position: center;
}

.shop-hero-inner {
  width: min(100%, 1180px);
  margin: 0 auto;
}

.shop-hero h1 {
  max-width: 760px;
  margin: 0;
  color: #111827;
  font-size: 4.3rem;
  line-height: 0.98;
  letter-spacing: 0;
}

.shop-hero p:not(.eyebrow) {
  max-width: 690px;
  margin: 16px 0 0;
  color: #314158;
  font-size: 1.12rem;
  line-height: 1.65;
}

.shop-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.shop-tools,
.shop-category-strip,
.shop-layout {
  width: min(100% - 44px, 1180px);
  margin-inline: auto;
}

.shop-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 16px;
  align-items: end;
  margin-top: 34px;
}

.shop-tools h2,
.shop-section-head h2,
.shop-qr-card h2,
.shop-empty h1 {
  margin: 0;
  color: #111827;
  line-height: 1.15;
  letter-spacing: 0;
}

.shop-category-strip {
  position: sticky;
  top: 72px;
  z-index: 25;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 0;
  background: rgba(247, 250, 252, 0.88);
  backdrop-filter: blur(12px);
}

.shop-category-pill {
  min-height: 40px;
  flex: 0 0 auto;
  padding: 0 13px;
  border: 1px solid rgba(30, 41, 59, 0.13);
  border-radius: 8px;
  color: #334155;
  background: #ffffff;
  font-weight: 850;
}

.shop-category-pill.active {
  color: #ffffff;
  border-color: var(--shop-accent, var(--teal));
  background: var(--shop-accent, var(--teal));
  box-shadow: 0 10px 22px rgba(8, 127, 122, 0.18);
}

.shop-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
  margin-top: 16px;
  margin-bottom: 58px;
}

.shop-menu-sections {
  display: grid;
  gap: 18px;
}

.shop-menu-section,
.shop-qr-card,
.shop-empty section {
  border: 1px solid rgba(30, 41, 59, 0.11);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 40px rgba(30, 41, 59, 0.08);
}

.shop-menu-section {
  padding: 16px;
}

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

.shop-section-head span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 8px;
  color: #0f766e;
  background: #e8fbf8;
  font-weight: 850;
}

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

.shop-dish-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  padding: 11px;
  border: 1px solid rgba(30, 41, 59, 0.1);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.shop-dish-img {
  width: 86px;
  height: 86px;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  object-fit: cover;
  overflow: hidden;
  border: 1px solid rgba(30, 41, 59, 0.1);
  border-radius: 8px;
  color: var(--shop-accent, var(--teal));
  background: linear-gradient(135deg, #f8fafc, #e8fbf8);
  font-size: 0.72rem;
  font-weight: 900;
}

.shop-dish-body {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.shop-dish-body strong {
  display: block;
  color: #111827;
  line-height: 1.25;
}

.shop-dish-body small {
  display: block;
  margin-top: 4px;
  color: #64748b;
  line-height: 1.35;
}

.shop-dish-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.shop-dish-meta b {
  color: #9f5f0f;
}

.shop-dish-meta span,
.shop-dish-meta em {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 8px;
  background: #f3f6fa;
  color: #475569;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 800;
}

.shop-dish-meta em {
  color: var(--shop-accent, var(--teal));
  background: #ecfdf5;
}

.shop-order-link {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  padding: 0 12px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--shop-accent, var(--teal));
  font-weight: 850;
}

.shop-qr-card {
  position: sticky;
  top: 138px;
  display: grid;
  gap: 12px;
  padding: 16px;
}

.shop-qr-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  padding: 12px;
  border: 1px solid rgba(30, 41, 59, 0.1);
  border-radius: 8px;
  background: #ffffff;
}

.shop-empty {
  min-height: 70svh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.shop-empty section {
  width: min(100%, 640px);
  padding: 24px;
}

.shop-open-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 20px;
}

.shop-theme-luxury .shop-hero {
  background-position: center;
}

.shop-theme-luxury .shop-menu-section,
.shop-theme-luxury .shop-qr-card {
  background: linear-gradient(180deg, #ffffff, #fff8ea);
}

.shop-theme-minimal .shop-hero {
  min-height: 46svh;
}

.shop-theme-minimal .shop-dish-card {
  background: #ffffff;
  box-shadow: none;
}

.public-hero-inner {
  width: min(100%, 1180px);
}

.public-hero h1,
.pricing-hero h1 {
  max-width: 780px;
  margin: 0;
  color: #111827;
  font-size: 4.8rem;
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 720px;
  margin: 18px 0 0;
  color: #314158;
  font-size: 1.18rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(30, 41, 59, 0.16);
  color: #172033;
  box-shadow: 0 10px 22px rgba(30, 41, 59, 0.08);
}

.btn-ghost:hover {
  color: #ffffff;
  background: var(--teal);
  border-color: var(--teal);
}

.metric-band {
  width: min(100% - 44px, 1180px);
  margin: -28px auto 0;
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric-band article {
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px;
  border: 1px solid rgba(30, 41, 59, 0.1);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(30, 41, 59, 0.1);
}

.metric-band strong {
  color: var(--teal);
  font-size: 2rem;
  line-height: 1;
}

.metric-band span {
  margin-top: 8px;
  color: var(--muted);
}

.section-wrap {
  width: min(100% - 44px, 1180px);
  margin: 70px auto;
}

.section-heading {
  max-width: 860px;
}

.section-heading.narrow {
  max-width: 720px;
  margin: 0 auto 24px;
  text-align: center;
}

.section-heading h1,
.section-heading h2,
.product-overview h2,
.pricing-teaser h2,
.install-panel h2,
.contact-strip h2,
.terms-panel h2 {
  margin: 0;
  color: #111827;
  font-size: 2.4rem;
  line-height: 1.12;
  letter-spacing: 0;
}

.section-heading p,
.pricing-teaser p,
.install-panel p,
.contact-strip p,
.terms-panel p {
  color: var(--muted);
  line-height: 1.7;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1.05fr) minmax(320px, 0.95fr);
  gap: 22px;
  align-items: stretch;
  margin-top: 26px;
}

.erp-screen {
  min-height: 440px;
  overflow: hidden;
  border: 1px solid rgba(30, 41, 59, 0.13);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 50px rgba(30, 41, 59, 0.12);
}

.screen-top {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  color: #334155;
  background: #f3f7f8;
  border-bottom: 1px solid rgba(30, 41, 59, 0.1);
}

.screen-top span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cbd5e1;
}

.screen-top span:nth-child(1) { background: #c2416b; }
.screen-top span:nth-child(2) { background: #f1b84b; }
.screen-top span:nth-child(3) { background: #087f7a; }
.screen-top strong { margin-left: auto; }

.screen-body {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 190px;
  gap: 12px;
  padding: 14px;
}

.screen-categories,
.screen-products,
.screen-bill {
  min-height: 360px;
  padding: 12px;
  border: 1px solid rgba(30, 41, 59, 0.1);
  border-radius: 8px;
  background: #f8fafc;
}

.screen-categories {
  display: grid;
  align-content: start;
  gap: 9px;
}

.screen-categories b {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, #087f7a, #11a69e);
}

.screen-products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 10px;
}

.screen-products span {
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid rgba(30, 41, 59, 0.1);
  font-weight: 750;
}

.screen-products b {
  color: #9f5f0f;
}

.screen-bill {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  background: linear-gradient(180deg, #fff8ea, #ffffff);
}

.screen-bill strong {
  color: #111827;
  font-size: 1.8rem;
}

.screen-bill em {
  color: var(--teal);
  font-style: normal;
  font-weight: 800;
}

.overview-copy {
  display: grid;
  gap: 12px;
}

.overview-copy article,
.feature-card,
.pricing-card {
  border: 1px solid rgba(30, 41, 59, 0.11);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(30, 41, 59, 0.08);
}

.overview-copy article {
  padding: 18px;
}

.overview-copy b,
.feature-card strong {
  display: block;
  color: #111827;
  font-size: 1.05rem;
}

.overview-copy span,
.feature-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.feature-card {
  min-height: 170px;
  padding: 18px;
}

.feature-card::before {
  content: "";
  display: block;
  width: 42px;
  height: 4px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--teal));
}

.photo-story {
  width: min(100% - 44px, 1180px);
  margin: 70px auto;
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr;
  gap: 14px;
}

.photo-story figure {
  min-height: 300px;
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(30, 41, 59, 0.1);
  background: #e2e8f0;
}

.photo-story img {
  width: 100%;
  height: 100%;
  min-height: 300px;
  display: block;
  object-fit: cover;
}

.photo-story figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 8px;
  color: #111827;
  background: rgba(255, 255, 255, 0.88);
  font-weight: 800;
}

.pricing-teaser,
.install-panel,
.contact-strip,
.terms-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 26px;
  border: 1px solid rgba(30, 41, 59, 0.11);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(30, 41, 59, 0.08);
}

.install-panel {
  background: linear-gradient(135deg, #eefbf9, #ffffff 58%, #fff7e8);
}

.contact-strip {
  margin-bottom: 48px;
  background: linear-gradient(135deg, #ffffff, #f6fbff);
}

.pricing-hero {
  width: min(100% - 44px, 1180px);
  margin: 0 auto;
  padding: 64px 0 28px;
}

.duration-pills {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 26px;
}

.pricing-selection-note {
  max-width: 720px;
  min-height: 50px;
  display: flex;
  align-items: center;
  margin: 20px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(8, 127, 122, 0.14);
  border-radius: 8px;
  color: #07534f;
  background: #e8fbf8;
  font-weight: 750;
}

.duration-pills button {
  min-height: 76px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px;
  border: 1px solid rgba(30, 41, 59, 0.11);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  text-align: left;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.duration-pills button:hover {
  transform: translateY(-2px);
  border-color: rgba(8, 127, 122, 0.28);
  box-shadow: 0 12px 24px rgba(30, 41, 59, 0.08);
}

.duration-pills button.active {
  color: #ffffff;
  border-color: var(--teal);
  background: linear-gradient(135deg, #087f7a, #11a69e);
  box-shadow: 0 16px 30px rgba(8, 127, 122, 0.2);
}

.duration-pills strong,
.duration-pills span {
  display: block;
}

.duration-pills strong {
  color: #111827;
}

.duration-pills button.active strong {
  color: #ffffff;
}

.duration-pills button.active span {
  color: rgba(255, 255, 255, 0.82);
}

.pricing-grid {
  width: min(100% - 44px, 1180px);
  margin: 22px auto 70px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
}

.pricing-card.featured {
  border-color: rgba(8, 127, 122, 0.42);
  box-shadow: 0 22px 54px rgba(8, 127, 122, 0.16);
}

.plan-ribbon {
  position: absolute;
  top: 14px;
  right: 14px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  color: #07534f;
  background: #e8fbf8;
  border: 1px solid rgba(8, 127, 122, 0.18);
  font-size: 0.78rem;
  font-weight: 800;
}

.plan-head h2 {
  margin: 0;
  color: #111827;
  font-size: 2rem;
}

.plan-head p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.selected-price {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid rgba(196, 122, 25, 0.24);
  border-radius: 8px;
  background: linear-gradient(135deg, #fff7e8, #ffffff);
}

.selected-price span,
.selected-price small,
.selected-price em {
  display: block;
}

.selected-price small,
.selected-price em {
  color: var(--muted);
}

.selected-price strong {
  white-space: nowrap;
  color: #111827;
  font-size: 2.15rem;
  line-height: 1;
}

.selected-price em {
  font-style: normal;
}

.selected-price em b {
  color: var(--teal);
}

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

.feature-list li {
  display: flex;
  gap: 8px;
  color: #334155;
  line-height: 1.45;
}

.feature-list li::before {
  content: "";
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--teal);
}

.value-table-wrap {
  margin-top: 0;
}

.value-table td:first-child {
  font-weight: 800;
  color: #111827;
}

.value-table tr.active-value-row td {
  background: #e8fbf8;
  color: #07534f;
  font-weight: 800;
}

.terms-panel {
  background: linear-gradient(135deg, #fff7ed, #ffffff);
}

@media (max-width: 1120px) {
  .screen-body {
    grid-template-columns: 130px minmax(0, 1fr);
  }
  .screen-bill {
    grid-column: 1 / -1;
    min-height: 120px;
  }
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .public-nav {
    align-items: flex-start;
    flex-direction: column;
  }
  .public-nav nav {
    width: 100%;
    justify-content: flex-start;
  }
  .public-hero h1,
  .pricing-hero h1 {
    font-size: 3.4rem;
  }
  .metric-band,
  .overview-grid,
  .feature-grid,
  .photo-story,
  .duration-pills {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .overview-grid {
    align-items: start;
  }
  .pricing-teaser,
  .install-panel,
  .contact-strip,
  .terms-panel {
    align-items: flex-start;
    flex-direction: column;
  }
  .shop-hero h1 {
    font-size: 3.2rem;
  }
  .shop-tools,
  .shop-layout {
    grid-template-columns: 1fr;
  }
  .shop-qr-card {
    position: static;
  }
}

@media (max-width: 640px) {
  .public-nav {
    padding: 12px;
  }
  .public-nav nav a,
  .nav-install {
    flex: 1 1 auto;
    min-width: 112px;
  }
  .public-hero.etofa-hero {
    min-height: 70svh;
    padding: 52px 16px 42px;
  }
  .public-hero h1,
  .pricing-hero h1 {
    font-size: 2.55rem;
    line-height: 1.02;
  }
  .hero-copy {
    font-size: 1rem;
  }
  .hero-actions .btn,
  .pricing-teaser .btn,
  .install-panel .btn,
  .contact-strip .btn,
  .terms-panel .btn {
    width: 100%;
  }
  .metric-band,
  .feature-grid,
  .photo-story,
  .duration-pills {
    width: min(100% - 24px, 1180px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .overview-grid {
    width: min(100% - 24px, 1180px);
    grid-template-columns: 1fr;
  }
  .overview-copy {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .section-wrap,
  .pricing-hero,
  .pricing-grid {
    width: min(100% - 24px, 1180px);
  }
  .section-heading h1,
  .section-heading h2,
  .product-overview h2,
  .terms-panel h2 {
    font-size: 2rem;
  }
  .pricing-teaser,
  .install-panel,
  .contact-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    padding: 16px 12px;
    gap: 10px;
  }
  .pricing-teaser h2,
  .install-panel h2,
  .contact-strip h2 {
    font-size: 1.35rem;
  }
  .erp-screen {
    min-height: auto;
  }
  .screen-body {
    grid-template-columns: 1fr;
  }
  .screen-categories,
  .screen-products,
  .screen-bill {
    min-height: auto;
  }
  .screen-products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .screen-products span {
    min-height: 76px;
  }
  .public-menu .menu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding-right: 0;
  }
  .public-menu .dish-card {
    min-height: 178px;
    padding: 10px;
  }
  .public-menu .dish-card-img {
    width: 72px;
    height: 72px;
  }
  .shop-hero {
    min-height: 56svh;
    padding: 46px 12px 34px;
  }
  .shop-hero h1 {
    font-size: 2.35rem;
    line-height: 1.02;
  }
  .shop-hero p:not(.eyebrow) {
    font-size: 0.98rem;
  }
  .shop-tools,
  .shop-category-strip,
  .shop-layout {
    width: min(100% - 24px, 1180px);
  }
  .shop-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: 10px;
  }
  .shop-tools h2 {
    font-size: 1.35rem;
  }
  .shop-category-strip {
    top: 0;
  }
  .shop-menu-section {
    padding: 10px;
  }
  .shop-menu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .shop-dish-card {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 9px;
  }
  .shop-dish-img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }
  .shop-dish-body strong {
    font-size: 0.92rem;
  }
  .shop-dish-body small,
  .shop-dish-meta span,
  .shop-dish-meta em {
    font-size: 0.74rem;
  }
  .shop-open-form,
  .qr-preview-box,
  .pos-layout-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metric-band article,
  .overview-copy article,
  .feature-card {
    padding: 12px;
  }
  .feature-card p,
  .overview-copy p,
  .metric-band span {
    font-size: 0.86rem;
  }
  .feature-card h3,
  .overview-copy h3 {
    font-size: 1rem;
  }
  .photo-story figure {
    min-height: 168px;
  }
  .photo-story figcaption {
    right: 8px;
    bottom: 8px;
    left: 8px;
    min-height: 32px;
    padding: 0 9px;
    font-size: 0.74rem;
  }
  .price-list div {
    align-items: flex-start;
    flex-direction: column;
  }
  .site-footer {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    padding: 18px 12px;
  }
  .site-footer p {
    text-align: left;
  }
}
