:root {
  --bg: #f8efe6;
  --bg-soft: #fffaf5;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: #ffffff;
  --ink: #13293d;
  --muted: #54606d;
  --accent: #f15a29;
  --accent-dark: #cb4316;
  --accent-soft: rgba(241, 90, 41, 0.12);
  --line: rgba(19, 41, 61, 0.08);
  --success: #2d936c;
  --shadow: 0 18px 45px rgba(19, 41, 61, 0.12);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --font-ui: "Trebuchet MS", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-ui);
  background:
    radial-gradient(circle at top left, rgba(241, 90, 41, 0.18), transparent 28%),
    linear-gradient(180deg, #fff9f1 0%, var(--bg) 48%, #f4e1d4 100%);
  color: var(--ink);
}

body {
  display: flex;
  justify-content: center;
}

a {
  color: inherit;
}

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

.app-shell {
  width: 100%;
}

.browser-locked #welcome-screen,
.browser-locked #register-screen,
.browser-locked #app-screen,
.browser-locked #bottom-nav {
  display: none !important;
}

.browser-locked #install-lock-screen {
  display: grid !important;
}

.standalone-ready #install-lock-screen {
  display: none !important;
}

.app-gradient {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 80% 5%, rgba(241, 90, 41, 0.16), transparent 18%),
    radial-gradient(circle at 15% 25%, rgba(45, 147, 108, 0.12), transparent 22%);
  pointer-events: none;
}

.mobile-frame {
  width: min(100%, 460px);
  min-height: 100vh;
  padding: 18px 18px calc(94px + env(safe-area-inset-bottom));
  position: relative;
}

.screen {
  animation: rise 320ms ease;
}

.screen[hidden] {
  display: none;
}

.splash-screen,
.card-screen,
.app-screen,
.admin-login {
  padding-top: 28px;
}

.install-lock-screen {
  display: grid;
  align-content: center;
  min-height: calc(100vh - 32px);
  gap: 16px;
}

.install-lock-hero {
  display: grid;
  gap: 10px;
}

.install-lock-mark {
  width: 84px;
  height: 84px;
  border-radius: 26px;
}

.install-lock-lead {
  max-width: none;
  font-size: 1.02rem;
}

.splash-screen {
  display: grid;
  align-content: center;
  min-height: calc(100vh - 32px);
  gap: 12px;
}

.hero-mark {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), #ffb347);
  color: white;
  font-size: 1.65rem;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent-dark);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2.2rem, 10vw, 3.4rem);
  line-height: 0.95;
}

h2 {
  font-size: 1.65rem;
}

h3 {
  font-size: 1.2rem;
}

.hero-copy,
.muted-note,
.text-link,
.card p,
.hours-list,
.customer-row small {
  color: var(--muted);
}

.hero-copy {
  line-height: 1.5;
  max-width: 32ch;
}

.primary-btn,
.ghost-btn,
.nav-item {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, opacity 180ms ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--accent), #ff8b4d);
  color: white;
  padding: 15px 20px;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(241, 90, 41, 0.28);
}

.primary-btn.small,
.ghost-btn {
  padding: 11px 16px;
}

.ghost-btn {
  background: var(--accent-soft);
  color: var(--accent-dark);
  text-decoration: none;
}

.primary-btn:hover,
.ghost-btn:hover,
.nav-item:hover {
  transform: translateY(-1px);
}

.stack-form,
.editor-stack,
.offer-stack,
.info-stack,
.customer-list {
  display: grid;
  gap: 14px;
}

.stack-form label,
.menu-editor-row,
.editor-row {
  display: grid;
  gap: 7px;
}

label span {
  font-weight: 700;
  font-size: 0.95rem;
}

input,
textarea,
select {
  width: 100%;
  padding: 14px 15px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
}

textarea {
  resize: vertical;
  min-height: 96px;
}

.topbar,
.section-header,
.points-line,
.bottom-nav,
.customer-row,
.offer-card-top,
.admin-header,
.install-card,
.notify-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-header,
.topbar {
  margin-bottom: 16px;
}

.section-header.compact {
  margin-bottom: 12px;
}

.chip-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 14px;
}

.chip {
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  border-radius: 999px;
  padding: 10px 14px;
  white-space: nowrap;
  cursor: pointer;
}

.chip.active {
  background: var(--ink);
  color: white;
}

.menu-grid {
  display: grid;
  gap: 14px;
}

.card,
.menu-card,
.offer-card {
  background: var(--surface);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.56);
  box-shadow: var(--shadow);
  border-radius: var(--radius-lg);
}

.card,
.offer-card {
  padding: 18px;
}

.menu-card {
  padding: 0;
  overflow: hidden;
}

.menu-image {
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(135deg, rgba(241, 90, 41, 0.88), rgba(255, 179, 71, 0.72)),
    #f7d9c5;
  display: grid;
  place-items: end start;
  padding: 16px;
  color: white;
  font-weight: 800;
  background-size: cover;
  background-position: center;
}

.menu-body {
  padding: 16px;
  display: grid;
  gap: 10px;
}

.pill-new,
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.18);
}

.badge {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.menu-name-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.price-tag {
  font-weight: 800;
  color: var(--accent-dark);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.progress-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(19, 41, 61, 0.08);
  overflow: hidden;
  margin-top: 14px;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--success), #7bdcb5);
  border-radius: inherit;
  transition: width 220ms ease;
}

.qr-card {
  display: grid;
  gap: 16px;
  justify-items: center;
  margin-top: 16px;
  text-align: center;
}

.qr-render {
  width: min(240px, 70vw);
  aspect-ratio: 1;
  background: white;
  border-radius: 24px;
  padding: 12px;
  display: grid;
  place-items: center;
}

.qr-render svg {
  width: 100%;
  height: 100%;
}

.qr-code-caption {
  font-weight: 700;
  color: var(--ink);
}

.install-card,
.notify-card {
  gap: 12px;
  margin-bottom: 16px;
}

.install-steps {
  display: grid;
  gap: 8px;
}

.install-lock-panel,
.install-note {
  display: grid;
  gap: 14px;
}

.install-lock-panel-top,
.install-steps-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.install-step-list {
  display: grid;
  gap: 10px;
}

.install-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.install-step:first-child {
  border-top: 0;
  padding-top: 0;
}

.install-step:last-child {
  padding-bottom: 0;
}

.install-step-index {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 800;
}

.install-step p {
  margin: 5px 0 0;
  line-height: 1.45;
}

.install-lock-notes {
  display: grid;
  gap: 12px;
}

.offer-card {
  display: grid;
  gap: 12px;
}

.offer-card .text-link {
  font-weight: 700;
  text-decoration: none;
}

.hours-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.hours-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.text-link {
  display: inline-block;
  margin-top: 10px;
  font-weight: 700;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(calc(100% - 24px), 430px);
  background: rgba(19, 41, 61, 0.92);
  padding: 10px;
  border-radius: 24px;
  box-shadow: 0 16px 30px rgba(19, 41, 61, 0.22);
  gap: 6px;
}

.nav-item {
  flex: 1;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  padding: 12px 10px;
  font-weight: 700;
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.13);
  color: white;
}

.admin-body {
  width: 100%;
}

.admin-shell {
  width: min(1120px, 100%);
  padding: 24px;
}

.admin-grid {
  display: grid;
  gap: 18px;
}

.admin-form {
  margin-top: 10px;
}

.menu-editor-row {
  padding: 14px;
  border-radius: 18px;
  background: rgba(248, 239, 230, 0.7);
  border: 1px solid var(--line);
}

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

.customer-row {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(248, 239, 230, 0.7);
  gap: 10px;
}

.customer-row-side {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.badge-muted {
  background: rgba(19, 41, 61, 0.08);
  color: var(--muted);
}

.status-good {
  color: var(--success);
  font-weight: 700;
}

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

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