:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #f7f4ee;
  --paper: #fffdf8;
  --panel: #ffffff;
  --soft: #f6f1e8;
  --text: #171412;
  --muted: #716a60;
  --faint: #9b9285;
  --line: #e3dccf;
  --line-strong: #cfc5b6;
  --accent: #087568;
  --accent-dark: #064f48;
  --accent-soft: #dff3ee;
  --gold: #ad741f;
  --danger: #b42318;
  --danger-soft: #fee7e4;
  --shadow: 0 18px 44px rgba(45, 36, 25, 0.12);
  --shadow-soft: 0 8px 24px rgba(45, 36, 25, 0.07);
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 0 0, rgba(8, 117, 104, 0.12), transparent 30rem),
    linear-gradient(180deg, #fffaf1 0, var(--bg) 19rem);
  color: var(--text);
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: 0.65; }
a { color: inherit; }

.icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  flex: 0 0 auto;
  vertical-align: -3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(207, 197, 182, 0.72);
  background: rgba(255, 253, 248, 0.92);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-weight: 850;
  text-decoration: none;
}

.brand-mark, .avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: #20201d;
  color: #fff;
  box-shadow: var(--shadow-soft);
}

.brand-mark .icon {
  width: 26px;
  height: 26px;
}

.brand span:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand strong {
  overflow: hidden;
  max-width: 36ch;
  font-size: 20px;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.workspace-label {
  color: var(--muted);
  font-size: 14px;
}

.avatar {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(8, 117, 104, 0.24);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 850;
}

.button, .text-button, .icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  padding: 0 15px;
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.button:hover, .text-button:hover, .icon-button:hover {
  border-color: #20201d;
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

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

.button.primary:hover { background: var(--accent-dark); }
.button.danger { border-color: var(--danger); color: var(--danger); }
.button.small, .text-button.small { min-height: 34px; padding: 0 11px; font-size: 13px; font-weight: 760; }
.button.full { width: 100%; }
.text-button { border-color: transparent; background: transparent; }
.icon-button { width: 40px; min-height: 40px; padding: 0; }

.workspace, .home-shell, .guest-shell, .login-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 30px 22px 54px;
}

.page-intro, .home-hero, .guest-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 20px;
}

.page-intro h1, .home-hero h1, .guest-hero h1, .login-story h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 0.98;
}

.page-intro p, .home-hero p, .guest-hero p, .login-story p {
  max-width: 560px;
  font-size: 17px;
  line-height: 1.6;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.muted, .filter-hint, .login-note, .card-description, .guest-footnote, .home-location, .guest-location {
  color: var(--muted);
}

.title-dot { color: var(--accent); }

.live-label, .badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  padding: 6px 11px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.live-label i, .badge i {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: currentColor;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0 12px;
}

.stat {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 92px;
  padding: 16px;
  border: 1px solid rgba(227, 220, 207, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.stat strong {
  display: block;
  margin-top: 2px;
  font-size: 28px;
}

.tabs, .guest-menu-tabs, .category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 0 18px;
  scrollbar-width: thin;
}

.tab, .guest-menu-tabs button, .category-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--muted);
  padding: 0 14px;
  white-space: nowrap;
  font-weight: 800;
}

.tab.selected, .guest-menu-tabs button.selected, .category-tabs button.selected {
  border-color: #20201d;
  background: #20201d;
  color: #fff;
}

.tab span {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 12px;
}

.section-heading, .filter-bar, .card-top, .card-actions, .dialog-head, .dialog-actions, .form-row, .price-line, .guest-controls, .guest-location, .category-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.section-heading { margin: 10px 0 16px; }
.section-heading h2 { margin: 0; font-size: 28px; }
.section-heading p, .category-title p { margin: 5px 0 0; }
.filter-bar { margin-bottom: 16px; }

.search-field {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 390px;
}

.search-field .icon {
  position: absolute;
  left: 12px;
  color: var(--faint);
}

.search-field input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  padding: 10px 12px 10px 40px;
  outline: none;
}

.search-field, .form input, .form select, .form textarea, .filter-bar select, .url-field input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 10px 12px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.search-field:focus-within, .form input:focus, .form select:focus, .form textarea:focus, .filter-bar select:focus, .url-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(8, 117, 104, 0.12);
}

.search-field input::placeholder { color: var(--faint); }

.filter-bar select { max-width: 260px; }

.card-grid, .dish-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 16px;
}

.record-card, .dish-card, .settings-card, .login-form-panel, .qr-paper {
  border: 1px solid rgba(227, 220, 207, 0.96);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
}

.record-card {
  min-height: 230px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
  overflow: visible;
}

.record-card:hover {
  border-color: rgba(8, 117, 104, 0.38);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.record-card:has(.actions-menu[open]),
.record-card:focus-within {
  z-index: 40;
}

.record-card.is-inactive { opacity: 0.68; }

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-soft), #fff7e4);
  color: var(--accent-dark);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.card-icon .icon { width: 25px; height: 25px; }
.card-icon.with-image img, .dish-photo { width: 100%; height: 100%; object-fit: cover; }
.record-card h3, .dish-card h3, .dish-card h4 { margin: 0; }
.record-card h3 { font-size: 20px; }
.card-description { margin: 0; line-height: 1.5; }

.badge.active { border-color: #b7edd7; background: #eefcf5; color: #047857; }
.badge.inactive, .warning-chip { border-color: var(--danger-soft); background: #fff4f2; color: var(--danger); }

.hours, .card-counts, .assignment, .chips, .allergens, .qr-id {
  color: var(--muted);
  font-size: 13px;
}

.hours, .assignment {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.card-counts, .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.context-label {
  color: var(--gold);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.chips span, .vegetarian, .dish-label, .warning-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  padding: 5px 9px;
}

.price-line strong { font-size: 18px; }
.card-actions { margin-top: auto; padding-top: 10px; }
.actions-menu { position: relative; }
.actions-menu summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  appearance: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
  list-style: none;
  white-space: nowrap;
}
.actions-menu summary::-webkit-details-marker { display: none; }
.actions-menu[open] { z-index: 50; }

.actions-popover {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 60;
  min-width: 190px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.08);
}

.actions-menu[open] > .actions-popover {
  display: grid;
  gap: 3px;
}

.actions-popover button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  justify-content: flex-start;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}

.actions-popover button .icon {
  width: 15px;
  height: 15px;
}

.actions-popover button:hover { background: var(--soft); }
.actions-popover .danger-text { color: var(--danger); }
.actions-popover .danger-text:hover { background: var(--danger-soft); }

.empty-state, .unavailable, .loading {
  grid-column: 1 / -1;
  padding: 38px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  text-align: center;
}

.workspace-note {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-top: 20px;
  color: var(--muted);
  font-size: 14px;
}

.form { display: grid; gap: 14px; }
.form label, .field-label { display: grid; gap: 6px; color: var(--text); font-weight: 750; font-size: 13.5px; }
.form textarea { resize: vertical; }
.form-error, .error { min-height: 20px; color: var(--danger); font-size: 13.5px; font-weight: 600; }

.multi-field { display: grid; gap: 6px; }
.multi-select summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  padding: 10px 14px;
  font-size: 14px;
  list-style: none;
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.multi-select summary::-webkit-details-marker { display: none; }
.multi-select summary:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(8, 117, 104, 0.16);
}
.multi-chevron .icon {
  width: 14px;
  height: 14px;
  transition: transform 180ms ease;
  transform: rotate(90deg);
}
.multi-select[open] .multi-chevron .icon {
  transform: rotate(270deg);
}
.multi-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
  max-height: 180px;
  overflow-y: auto;
}
.multi-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: all 130ms ease;
}
.multi-option:hover {
  border-color: var(--line-strong);
  background: #faf7f2;
}
.multi-option.is-checked {
  border-color: rgba(8, 117, 104, 0.45);
  background: var(--accent-soft);
  color: var(--accent-dark);
}
.multi-option input { accent-color: var(--accent); width: 16px; height: 16px; }
.empty-multi { grid-column: 1 / -1; margin: 6px 0; font-size: 13px; }
.selection-count strong { color: var(--accent-dark); }
.field-hint { color: var(--muted); font-size: 12px; line-height: 1.35; }

.toggle-card {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}
.toggle-card:hover {
  border-color: var(--line-strong);
  background: #f2ece1;
}
.toggle-text { display: grid; gap: 2px; }
.toggle-label { font-size: 14px; font-weight: 750; color: var(--text); }
.toggle-hint { font-size: 12px; color: var(--muted); line-height: 1.35; }
.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex: 0 0 auto;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: #cfc6b8;
  border-radius: 999px;
  transition: 200ms ease;
}
.toggle-slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
  transition: 200ms ease;
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--accent);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.settings-card, .login-form-panel { padding: 24px; }
.settings-divider { border: 0; border-top: 1px solid var(--line); margin: 8px 0 0; padding-top: 12px; }
.settings-divider h3, .login-form-panel h2 { margin: 0; }

.login-shell {
  min-height: calc(100vh - 79px);
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  align-items: center;
  gap: 34px;
}

.login-story { display: grid; gap: 18px; }
.light { color: var(--accent); }

.login-illustration {
  position: relative;
  min-height: 300px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(8, 117, 104, 0.12) 1px, transparent 1px),
    linear-gradient(rgba(173, 116, 31, 0.12) 1px, transparent 1px),
    linear-gradient(135deg, rgba(8, 117, 104, 0.08), rgba(255, 255, 255, 0.84));
  background-size: 32px 32px, 32px 32px, auto;
  overflow: hidden;
}

.login-illustration > .icon {
  position: absolute;
  right: 34px;
  bottom: 28px;
  width: 120px;
  height: 120px;
  color: rgba(8, 117, 104, 0.22);
}

.float-tag {
  position: absolute;
  left: 24px;
  top: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
  box-shadow: var(--shadow);
}

.story-foot { color: var(--muted); margin: 0; }

/* ── Modern Dialog / Modal UI ── */
dialog#editor-dialog,
dialog.app-dialog,
dialog {
  position: fixed;
  inset: 0;
  z-index: 999;
  margin: auto;
  padding: 0;
  border: 1px solid rgba(227, 220, 207, 0.95);
  border-radius: 16px;
  background: #ffffff;
  color: var(--text);
  width: min(620px, calc(100vw - 32px));
  max-height: min(90vh, 840px);
  overflow: hidden;
  box-shadow: 0 25px 65px -12px rgba(25, 20, 15, 0.28), 0 8px 24px rgba(0, 0, 0, 0.08);
  animation: dialogPop 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

dialog::backdrop {
  background: rgba(18, 15, 12, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: backdropFade 180ms ease-out;
}

@keyframes dialogPop {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

.dialog-card {
  display: flex;
  flex-direction: column;
  max-height: min(90vh, 840px);
  background: #ffffff;
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fffdf8 0%, #ffffff 100%);
}

.dialog-head .eyebrow {
  margin-bottom: 4px;
}

.dialog-head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -0.01em;
  color: var(--text);
}

.dialog-subtitle {
  margin: 5px 0 0;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.45;
}

.dialog-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--muted);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  cursor: pointer;
  transition: all 160ms ease;
}

.dialog-close:hover {
  border-color: var(--line-strong);
  background: #ebe3d5;
  color: var(--text);
  transform: rotate(90deg);
}

.dialog-body {
  padding: 22px 24px 26px;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dialog-form {
  display: grid;
  gap: 16px;
}

.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

/* ── QR Modal Styles ── */
.qr-modal-body {
  display: grid;
  gap: 18px;
}

.qr-preview-wrapper {
  display: flex;
  justify-content: center;
  padding: 8px 0;
}

.qr-paper {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 9px;
  padding: 22px 28px;
  border: 1px solid rgba(207, 197, 182, 0.85);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #faf6ee 100%);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
  max-width: 320px;
  width: 100%;
  position: relative;
}

.qr-paper-brand {
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.12em;
  color: var(--gold);
  text-transform: uppercase;
}

.qr-canvas-frame {
  padding: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.qr-canvas-frame canvas {
  display: block;
  border-radius: 6px;
  max-width: 220px !important;
  width: 100% !important;
  height: auto !important;
}

.qr-paper-tag {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text);
}

.qr-paper-code {
  font-size: 11.5px;
  font-weight: 750;
  font-family: monospace;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--muted);
}

.qr-modal-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--soft);
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

.url-copy-box {
  display: grid;
  gap: 6px;
}

.url-input-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.url-input-group input {
  flex: 1;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  background: var(--soft);
  color: var(--text);
  font-family: monospace;
}

.url-copy-btn {
  white-space: nowrap;
  min-height: 42px;
  padding: 0 16px;
  font-weight: 750;
  flex: 0 0 auto;
}

.url-copy-btn.copied {
  background: #047857;
  border-color: #047857;
  color: #fff;
}

.local-note-banner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 14px;
  border-radius: 10px;
  background: #fffbe8;
  border: 1px solid #f2e29f;
  color: #7a5a07;
  font-size: 12.5px;
  line-height: 1.45;
}

/* ── Delete Modal Styles ── */
.delete-modal-body {
  display: grid;
  gap: 16px;
}

.danger-callout {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border-radius: 12px;
  background: #fff4f2;
  border: 1px solid #fedcd7;
}

.danger-callout-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #fee7e4;
  color: var(--danger);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.danger-callout-icon .icon {
  width: 20px;
  height: 20px;
}

.delete-copy {
  margin: 0;
  font-size: 15px;
  font-weight: 750;
  color: #781c15;
  line-height: 1.35;
}

.delete-consequence {
  margin: 6px 0 0;
  font-size: 13.5px;
  color: #a1352e;
  line-height: 1.45;
}

.delete-warning-note {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
}

.button.danger-btn {
  background: var(--danger);
  border-color: var(--danger);
  color: #ffffff;
  font-weight: 750;
}

.button.danger-btn:hover {
  background: #911c13;
  border-color: #911c13;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(180, 35, 24, 0.25);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  max-width: 360px;
  border-radius: 8px;
  background: #20201d;
  color: #fff;
  padding: 12px 14px;
  box-shadow: var(--shadow);
}
.toast.error { background: var(--danger); }

.home-shell, .guest-page { min-height: calc(100vh - 79px); }
.home-hero, .guest-hero { align-items: flex-start; padding: 34px 0 12px; }
.home-hero h1 em { color: var(--accent); font-style: normal; }
.guest-location { margin-bottom: 16px; }
.guest-location span { display: inline-flex; align-items: center; gap: 7px; }

.guest-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(8, 117, 104, 0.18);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  padding: 12px 14px;
}

.guest-menu-heading { display: grid; gap: 4px; margin-top: 4px; }
.guest-menu-heading h2 { margin: 0; font-size: 30px; }
.guest-controls { margin: 16px 0; }
.guest-category { margin: 24px 0; }
.category-title { margin: 0 0 11px; }
.category-title h3 { margin: 0; font-size: 22px; }
.category-title span { color: var(--accent); font-size: 15px; }

.dish-card {
  display: grid;
  grid-template-columns: 1fr 94px;
  gap: 14px;
  min-height: 152px;
  padding: 16px;
}

.dish-copy { display: grid; align-content: start; gap: 8px; }
.dish-copy p, .dish-copy small { margin: 0; color: var(--muted); line-height: 1.45; }
.dish-copy strong { margin-top: 2px; color: var(--accent-dark); font-size: 18px; }
.dish-photo, .dish-placeholder {
  width: 94px;
  height: 94px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-soft), #fff7e4);
}
.dish-placeholder { display: grid; place-items: center; color: var(--accent-dark); }
.dish-placeholder .icon { width: 28px; height: 28px; }

.footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 22px 30px;
  color: var(--muted);
  font-size: 14px;
}

.loader {
  width: 34px;
  height: 34px;
  margin: 0 auto 12px;
  border-radius: 999px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  animation: spin 900ms linear infinite;
}

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

@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-shell { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .header-inner, .page-intro, .section-heading, .filter-bar, .guest-hero, .guest-controls, .form-row, .qr-modal-status {
    align-items: stretch;
    flex-direction: column;
  }

  .brand strong { max-width: 58vw; font-size: 17px; }
  .workspace-label, .avatar { display: none; }
  .header-right { align-self: stretch; }
  .header-right .button, .header-right .text-button { width: 100%; }
  .search-field, .filter-bar select { max-width: none; }
  .url-field { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
  .header-inner { padding: 12px; }
  .workspace, .home-shell, .guest-shell, .login-shell { padding: 22px 12px 38px; }
  .page-intro h1, .home-hero h1, .guest-hero h1, .login-story h1 { font-size: 36px; }
  .stats, .card-grid, .dish-grid, .multi-options { grid-template-columns: 1fr; }
  .card-actions, .dialog-actions, .price-line, .footer {
    align-items: stretch;
    flex-direction: column;
  }
  .card-actions .button, .card-actions details, .card-actions summary, .dialog-actions .button, .qr-buttons a { width: 100%; }
  .dish-card { grid-template-columns: 1fr; }
  .dish-photo, .dish-placeholder { width: 100%; height: 160px; }
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.18) 42%, rgba(8, 117, 104, 0.08)),
    radial-gradient(circle at 88% 12%, rgba(173, 116, 31, 0.12), transparent 22rem);
}

.site-header {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.header-inner {
  min-height: 78px;
}

.header-right .button {
  min-width: 128px;
  font-weight: 800;
}

.workspace {
  padding-top: 34px;
}

.page-intro {
  position: relative;
  min-height: 196px;
  align-items: center;
  padding: 28px;
  border: 1px solid rgba(227, 220, 207, 0.92);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 253, 248, 0.66)),
    linear-gradient(90deg, rgba(8, 117, 104, 0.1), transparent 58%);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.page-intro::after {
  content: "";
  position: absolute;
  right: 28px;
  bottom: -74px;
  width: 220px;
  height: 220px;
  border: 28px solid rgba(8, 117, 104, 0.08);
  border-radius: 50%;
}

.page-intro > * {
  position: relative;
  z-index: 1;
}

.page-intro .live-label {
  align-self: flex-start;
  margin-top: 6px;
}

.stats {
  margin-top: 18px;
}

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

.stat::after {
  content: "";
  position: absolute;
  inset: auto -24px -34px auto;
  width: 94px;
  height: 94px;
  border-radius: 50%;
  background: rgba(8, 117, 104, 0.06);
}

.tabs {
  position: sticky;
  top: 79px;
  z-index: 12;
  margin: 4px -6px 6px;
  padding: 12px 6px;
  background: linear-gradient(180deg, rgba(247, 244, 238, 0.97), rgba(247, 244, 238, 0.86));
  backdrop-filter: blur(14px);
}

.tab {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.tab:not(.selected):hover,
.guest-menu-tabs button:not(.selected):hover,
.category-tabs button:not(.selected):hover {
  border-color: rgba(8, 117, 104, 0.42);
  color: var(--accent-dark);
  background: #fff;
}

.section-content {
  padding-top: 10px;
}

.section-heading {
  padding: 4px 0 2px;
}

.section-heading .button.primary {
  min-width: 148px;
  box-shadow: 0 12px 24px rgba(8, 117, 104, 0.16);
}

.filter-bar {
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(227, 220, 207, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.record-card {
  position: relative;
  overflow: visible;
}

.record-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(90deg, var(--accent), rgba(173, 116, 31, 0.72));
  opacity: 0;
  transition: opacity 160ms ease;
}

.record-card:hover::before {
  opacity: 1;
}

.record-card h3 {
  line-height: 1.15;
}

.card-meta {
  display: grid;
  gap: 8px;
}

.card-actions {
  border-top: 1px solid rgba(227, 220, 207, 0.8);
}

.badge {
  min-height: 30px;
}

.badge.active i,
.live-label i {
  box-shadow: 0 0 0 4px rgba(4, 120, 87, 0.12);
}

.actions-popover {
  animation: pop 120ms ease-out;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}


.form label {
  font-size: 14px;
}

.form input,
.form select,
.form textarea,
.multi-select summary {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.checkbox-field {
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 10px 12px;
}

.login-shell {
  position: relative;
}

.login-form-panel {
  position: relative;
  border-color: rgba(8, 117, 104, 0.22);
  box-shadow: var(--shadow);
}

.login-form-panel::before {
  content: "";
  display: block;
  height: 4px;
  margin: -24px -24px 20px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(90deg, var(--accent), var(--gold));
}

.login-note {
  margin-bottom: 0;
  font-size: 14px;
}

.login-illustration {
  box-shadow: var(--shadow-soft);
}

.home-hero,
.guest-hero {
  position: relative;
  margin-bottom: 18px;
  padding: 42px 0 22px;
}

.home-hero::after,
.guest-hero::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 84px;
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
}

.guest-menu-tabs {
  margin-top: 4px;
}

.guest-menu-heading {
  padding: 18px 0 6px;
  border-top: 1px solid rgba(227, 220, 207, 0.86);
}

.guest-controls {
  position: sticky;
  top: 79px;
  z-index: 10;
  padding: 12px 0;
  background: linear-gradient(180deg, rgba(247, 244, 238, 0.97), rgba(247, 244, 238, 0.86));
  backdrop-filter: blur(14px);
}

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

.dish-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 99px;
  background: rgba(8, 117, 104, 0.24);
}

.dish-card h4 {
  font-size: 18px;
  line-height: 1.2;
}

.guest-footnote {
  margin-top: 30px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  line-height: 1.55;
}

.unavailable,
.loading {
  max-width: 680px;
  margin: 70px auto;
}

@media (max-width: 760px) {
  .page-intro {
    min-height: auto;
    padding: 22px;
  }

  .tabs,
  .guest-controls {
    top: 0;
  }

  .filter-bar {
    padding: 10px;
  }
}

@media (max-width: 540px) {
  .brand {
    gap: 10px;
  }

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

  .page-intro {
    padding: 18px;
  }

  .section-heading .button.primary {
    width: 100%;
  }

  .tabs {
    margin-left: -12px;
    margin-right: -12px;
    padding-left: 12px;
    padding-right: 12px;
  }
}
