:root {
  --brand-primary: #256f68;
  --brand-accent: #d99035;
  --brand-surface: #ffffff;
  --bg: #f7f8f6;
  --ink: #171717;
  --muted: #6b7280;
  --soft: #eef1ef;
  --line: rgba(20, 24, 28, 0.1);
  --panel: rgba(255, 255, 255, 0.82);
  --shadow: 0 22px 58px rgba(29, 35, 42, 0.11);
  --soft-shadow: 0 12px 28px rgba(29, 35, 42, 0.08);
  --inset: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

* {
  box-sizing: border-box;
}

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

body {
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--brand-accent) 14%, transparent), transparent 34rem),
    linear-gradient(180deg, #ffffff 0, var(--bg) 440px),
    var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
  margin: 0;
  min-height: 100vh;
  padding:
    env(safe-area-inset-top)
    env(safe-area-inset-right)
    env(safe-area-inset-bottom)
    env(safe-area-inset-left);
}

a {
  color: inherit;
}

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

button,
.button {
  align-items: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent),
    var(--brand-primary);
  border: 1px solid color-mix(in srgb, var(--brand-primary) 76%, #000);
  border-radius: 8px;
  box-shadow:
    0 12px 22px color-mix(in srgb, var(--brand-primary) 24%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  color: white;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 42px;
  padding: 11px 15px;
  text-decoration: none;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease;
}

@media (display-mode: standalone) {
  body {
    overscroll-behavior-y: contain;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }

  input,
  textarea {
    user-select: text;
  }
}

button:hover,
.button:hover {
  box-shadow:
    0 16px 28px color-mix(in srgb, var(--brand-primary) 28%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.8);
  opacity: 0.54;
  transform: none;
}

.button.secondary,
.button.ghost,
.dash-header a,
.restaurant-row a,
.editor-actions a {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.58)),
    white;
  border: 1px solid var(--line);
  box-shadow: var(--inset), 0 10px 22px rgba(31, 36, 41, 0.07);
  color: var(--ink);
}

.button.ghost {
  color: var(--brand-primary);
}

.eyebrow {
  color: var(--brand-primary);
  font-size: 0.73rem;
  font-weight: 860;
  letter-spacing: 0.04em;
  margin: 0 0 7px;
  text-transform: uppercase;
}

.landing {
  align-items: center;
  display: grid;
  gap: 42px;
  grid-template-columns: minmax(0, 1fr) 360px;
  margin: 0 auto;
  max-width: 1160px;
  min-height: 100vh;
  padding: 76px 24px;
}

.landing h1 {
  font-size: clamp(2.5rem, 6vw, 5.8rem);
  line-height: 0.96;
  margin: 0;
  max-width: 920px;
  text-wrap: balance;
}

.landing p {
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.62;
  max-width: 640px;
}

.brand,
.logo-chip {
  align-items: center;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--brand-primary) 92%, white), var(--brand-primary));
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  box-shadow:
    0 14px 30px color-mix(in srgb, var(--brand-primary) 18%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.36);
  color: white;
  display: inline-flex;
  flex: 0 0 auto;
  font-weight: 950;
  justify-content: center;
  overflow: hidden;
}

.brand {
  height: 54px;
  margin-bottom: 30px;
  width: 54px;
}

.logo-chip {
  height: 48px;
  width: 48px;
}

.logo-chip img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.pitch-card,
.guest-header,
.dash-header,
.dish,
.ar-panel,
.cart-panel,
.dash-card,
.metric,
.ticket,
.login-card,
.promo-hero,
.suggestions {
  backdrop-filter: blur(18px) saturate(1.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.76)),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--soft-shadow), var(--inset);
}

.pitch-card {
  align-self: center;
  display: grid;
  gap: 12px;
  overflow: hidden;
  padding: 22px;
}

.pitch-card strong {
  font-size: 1.28rem;
}

.pitch-card a,
.pitch-card span {
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  padding-top: 12px;
  text-decoration: none;
}

.pitch-card small {
  color: var(--brand-primary);
  font-weight: 800;
}

.guest-layout {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) 390px;
  margin: 0 auto;
  max-width: 1280px;
  padding: 24px;
}

.guest-header,
.dash-header {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 16px;
}

.guest-brand {
  align-items: center;
  display: flex;
  gap: 13px;
}

.guest-header h1,
.dash-header h1 {
  font-size: 1.72rem;
  margin: 0;
}

.cart-pill,
.plan-badge {
  align-items: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent),
    var(--brand-accent);
  border: 1px solid color-mix(in srgb, var(--brand-accent) 78%, #000);
  border-radius: 999px;
  box-shadow: 0 13px 25px color-mix(in srgb, var(--brand-accent) 24%, transparent), var(--inset);
  color: white;
  display: flex;
  font-weight: 950;
  justify-content: center;
  text-decoration: none;
}

.cart-pill {
  height: 42px;
  width: 42px;
}

.plan-badge {
  min-height: 36px;
  padding: 8px 13px;
}

.promo-hero {
  display: grid;
  gap: 18px;
  grid-template-columns: 210px minmax(0, 1fr);
  margin-bottom: 18px;
  overflow: hidden;
  padding: 14px;
}

.promo-hero img {
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.promo-hero:not(:has(img)) {
  grid-template-columns: 1fr;
}

.promo-hero h2,
.suggestions h2 {
  font-size: 1.34rem;
  margin: 0 0 7px;
}

.promo-hero p:last-child {
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.suggestions {
  display: grid;
  gap: 14px;
  margin-bottom: 24px;
  padding: 16px;
}

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

.suggestion-strip button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: none;
  color: var(--ink);
  display: grid;
  gap: 7px;
  justify-items: start;
  min-height: 0;
  padding: 10px;
  text-align: left;
}

.suggestion-strip img {
  aspect-ratio: 4 / 3;
  border-radius: 7px;
  object-fit: cover;
  width: 100%;
}

.suggestion-strip span {
  font-weight: 800;
}

.suggestion-strip strong {
  color: var(--brand-primary);
}

.category {
  margin-bottom: 26px;
}

.category h2 {
  font-size: 1.16rem;
  letter-spacing: 0;
  margin: 0 0 12px;
}

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

.dish {
  display: grid;
  grid-template-columns: 142px minmax(0, 1fr);
  overflow: hidden;
}

.dish img {
  filter: saturate(1.04) contrast(1.02);
  height: 100%;
  min-height: 206px;
  object-fit: cover;
  width: 100%;
}

.dish div {
  padding: 16px;
}

.dish p {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 11px;
}

.dish p span,
.feature-pills span {
  background: color-mix(in srgb, var(--brand-primary) 10%, white);
  border: 1px solid color-mix(in srgb, var(--brand-primary) 16%, transparent);
  border-radius: 999px;
  color: var(--brand-primary);
  font-size: 0.7rem;
  font-weight: 850;
  padding: 5px 8px;
}

.dish h3 {
  font-size: 1.12rem;
  line-height: 1.14;
  margin: 0 0 8px;
}

.dish small,
.privacy-note {
  color: var(--muted);
  display: block;
  line-height: 1.45;
}

.dish-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding: 0 !important;
}

.dish-actions strong {
  font-size: 1.02rem;
  margin-right: auto;
}

.dish-actions button {
  min-height: 38px;
  padding: 9px 12px;
}

.dish-actions button[data-ar],
.service-note {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.62)),
    color-mix(in srgb, var(--brand-accent) 12%, white);
  border: 1px solid color-mix(in srgb, var(--brand-accent) 18%, transparent);
  box-shadow: var(--inset), 0 10px 18px color-mix(in srgb, var(--brand-accent) 10%, transparent);
  color: color-mix(in srgb, var(--brand-accent) 72%, #111);
}

.service-note {
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 840;
  padding: 8px 10px;
}

.guest-side {
  align-content: start;
  display: grid;
  gap: 18px;
  position: sticky;
  top: 18px;
}

.ar-panel,
.cart-panel,
.dash-card,
.metric,
.ticket {
  padding: 18px;
}

.ar-panel h2,
.cart-panel h2 {
  font-size: 1.34rem;
  margin: 0 0 14px;
}

.model-box {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.15)),
    linear-gradient(135deg, color-mix(in srgb, var(--brand-primary) 8%, white), color-mix(in srgb, var(--brand-accent) 10%, white));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--inset), inset 0 -22px 45px rgba(30, 35, 42, 0.06);
  height: 320px;
  overflow: hidden;
}

model-viewer {
  height: 100%;
  width: 100%;
}

.ar-button {
  background: var(--brand-primary);
  border-radius: 8px;
  bottom: 16px;
  color: white;
  font-weight: 850;
  left: 50%;
  min-height: 42px;
  position: absolute;
  transform: translateX(-50%);
}

.cart-panel,
.settings-form {
  display: grid;
  gap: 14px;
}

.compact-form,
.dish-editor,
.table-editor {
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--inset);
}

.compact-form {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 120px auto;
  margin-bottom: 10px;
  padding: 10px;
}

.compact-form input {
  min-height: 40px;
}

.editor-list {
  display: grid;
  gap: 12px;
}

.dish-editor {
  display: grid;
  gap: 0;
  grid-template-columns: 180px minmax(0, 1fr);
  overflow: hidden;
}

.dish-editor > img {
  background: var(--soft);
  height: 100%;
  min-height: 240px;
  object-fit: cover;
  width: 100%;
}

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

.editor-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.editor-actions,
.editor-fields .wide-field {
  grid-column: 1 / -1;
}

button.danger {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent),
    #b83b36;
  border-color: #96302c;
  box-shadow: 0 12px 22px rgba(184, 59, 54, 0.16), var(--inset);
}

.table-editor {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.9fr);
  padding: 14px;
}

.table-editor > div {
  display: grid;
  gap: 10px;
}

.table-editor small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.cart-panel label,
.settings-form label,
.dish-editor label,
.table-editor label {
  color: var(--muted);
  display: grid;
  gap: 7px;
  font-size: 0.9rem;
}

.settings-form label small,
.dish-editor label small,
.table-editor label small {
  color: color-mix(in srgb, var(--muted) 88%, white);
  font-size: 0.78rem;
  line-height: 1.35;
}

.cart-panel input,
.cart-panel textarea,
.login-card input,
.settings-form input,
.settings-form textarea,
.settings-form select,
.settings-form input[type="file"],
.compact-form input,
.dish-editor input,
.dish-editor textarea,
.dish-editor select,
.dish-editor input[type="file"],
.table-editor input {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: inset 0 1px 2px rgba(30, 35, 42, 0.05);
  min-height: 42px;
  padding: 10px;
}

.settings-form input[type="color"] {
  min-height: 46px;
  padding: 5px;
}

.cart-panel textarea,
.settings-form textarea,
.dish-editor textarea {
  min-height: 84px;
  resize: vertical;
}

.cart-line,
.cart-total,
.table-row,
.menu-row,
.customer-row,
.order-row,
.restaurant-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 11px 0;
}

.menu-row span,
.restaurant-row div:not(.row-actions) {
  min-width: 0;
}

.menu-row strong {
  margin-left: auto;
  white-space: nowrap;
}

.menu-row em:empty {
  display: none;
}

.row-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.row-actions form {
  margin: 0;
}

.row-actions button {
  min-height: 40px;
  padding: 10px 12px;
}

.dashboard,
.kitchen {
  margin: 0 auto;
  max-width: 1260px;
  padding: 24px;
}

.dash-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dash-header nav form {
  margin: 0;
}

.dash-header nav button {
  min-height: 40px;
  padding: 10px 12px;
}

.dash-header a,
.restaurant-row a,
.editor-actions a,
.row-actions a {
  border-radius: 8px;
  font-weight: 850;
  padding: 10px 12px;
  text-decoration: none;
}

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

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

.metric::after {
  background: linear-gradient(180deg, var(--brand-accent), transparent);
  content: "";
  height: 48px;
  opacity: 0.45;
  position: absolute;
  right: 16px;
  top: 16px;
  width: 3px;
}

.metric span {
  color: var(--muted);
  display: block;
}

.metric strong {
  display: block;
  font-size: 1.9rem;
  margin-top: 8px;
}

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

.dash-card.wide {
  grid-column: 1 / -1;
}

.dash-card h2 {
  margin-top: 0;
}

.dash-card h3 {
  color: var(--brand-primary);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  margin: 18px 0 8px;
  text-transform: uppercase;
}

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

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

.wide-field,
.switch-field,
.grid-form button {
  grid-column: 1 / -1;
}

.switch-field {
  align-items: center;
  display: flex !important;
  flex-direction: row;
}

.switch-field input {
  min-height: auto;
  width: auto;
}

.table-row a {
  background: color-mix(in srgb, var(--brand-primary) 8%, white);
  border: 1px solid color-mix(in srgb, var(--brand-primary) 14%, transparent);
  border-radius: 999px;
  color: var(--brand-primary);
  font-weight: 800;
  padding: 6px 10px;
  text-decoration: none;
}

.menu-row em,
.customer-row em {
  color: var(--brand-primary);
  font-style: normal;
  font-weight: 850;
}

.order-row {
  align-items: flex-start;
}

.order-row div,
.restaurant-row div {
  display: grid;
  gap: 4px;
}

.order-row span,
.order-row small,
.restaurant-row small {
  color: var(--muted);
}

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

.kitchen-summary {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}

.kitchen-summary article,
.empty-state {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.76)),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--soft-shadow), var(--inset);
  padding: 18px;
}

.kitchen-summary span,
.ticket small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
  text-transform: uppercase;
}

.kitchen-summary strong {
  display: block;
  font-size: 2.2rem;
  margin-top: 8px;
}

.ticket {
  border-left: 6px solid var(--brand-accent);
  display: grid;
  gap: 10px;
}

.ticket div {
  display: flex;
  justify-content: space-between;
}

.ticket p {
  color: var(--muted);
  min-height: 74px;
}

.ticket button {
  width: 100%;
}

.empty-state {
  grid-column: 1 / -1;
}

.empty-state h2 {
  margin: 0 0 8px;
}

.empty-state p {
  color: var(--muted);
  margin-bottom: 16px;
}

.login-card {
  display: grid;
  gap: 16px;
  margin: 80px auto;
  max-width: 420px;
  padding: 24px;
}

.login-card form,
.login-card label {
  display: grid;
  gap: 10px;
}

.theme-classic {
  --bg: #f8f7f3;
}

.theme-mediterranean {
  --bg: #f5f9fb;
}

.theme-nocturne {
  --bg: #f7f7fb;
}

@media (max-width: 980px) {
  .landing,
  .guest-layout {
    grid-template-columns: 1fr;
  }

  .guest-side {
    position: static;
  }

  .dish-grid,
  .metrics,
  .dash-grid,
  .ticket-grid {
    grid-template-columns: 1fr;
  }

  .dash-card.wide,
  .wide-field,
  .switch-field,
  .grid-form button {
    grid-column: auto;
  }
}

@media (max-width: 620px) {
  html {
    scroll-padding-top: 12px;
  }

  .landing,
  .guest-layout,
  .dashboard,
  .kitchen {
    padding: 12px;
  }

  .landing {
    display: block;
    min-height: auto;
    padding-top: 34px;
  }

  .landing h1 {
    font-size: 3.05rem;
    line-height: 0.98;
  }

  .landing p {
    font-size: 1rem;
  }

  .actions {
    display: grid;
  }

  .pitch-card {
    margin-top: 22px;
  }

  .guest-layout {
    gap: 14px;
  }

  .guest-header,
  .dash-header {
    align-items: stretch;
    border-radius: 8px;
    gap: 12px;
    margin-bottom: 12px;
    position: sticky;
    top: env(safe-area-inset-top);
    z-index: 20;
  }

  .guest-header {
    align-items: center;
    flex-direction: row;
  }

  .dash-header nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin: 0 -4px;
    overflow-x: auto;
    padding: 2px 4px 6px;
    scrollbar-width: none;
  }

  .dash-header nav::-webkit-scrollbar {
    display: none;
  }

  .dash-header nav a,
  .dash-header nav button {
    white-space: nowrap;
  }

  .cart-line,
  .cart-total,
  .table-row,
  .menu-row,
  .customer-row,
  .order-row,
  .restaurant-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .cart-line,
  .cart-total,
  .menu-row,
  .order-row {
    flex-direction: row;
  }

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

  .guest-brand {
    align-items: flex-start;
  }

  .promo-hero,
  .suggestion-strip,
  .grid-form,
  .compact-form,
  .dish-editor,
  .editor-fields,
  .table-editor {
    grid-template-columns: 1fr;
  }

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

  .dish img {
    min-height: 196px;
  }

  .dish div,
  .ar-panel,
  .cart-panel,
  .dash-card,
  .metric,
  .ticket {
    padding: 14px;
  }

  .model-box {
    height: 260px;
  }

  .guest-side {
    bottom: 0;
    margin: 0 -12px;
    position: sticky;
    z-index: 15;
  }

  .cart-panel {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    box-shadow: 0 -18px 36px rgba(29, 35, 42, 0.12), var(--inset);
    max-height: 72vh;
    overflow: auto;
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
  }

  .suggestion-strip {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
  }

  .suggestion-strip button {
    flex: 0 0 72%;
    scroll-snap-align: start;
  }

  .promo-hero img {
    min-height: 164px;
  }

  input,
  select,
  textarea,
  button,
  .button {
    font-size: 16px;
  }
}
