:root {
  --charcoal: #14110f;
  --ember: #e85d04;
  --ember-hot: #ff7a1a;
  --ink: #f7f1e8;
  --muted: #b5a89a;
  --surface: #1a1714;
  --card: #221e1a;
  --highlight: #ffd6a8;
  --line: rgba(247, 241, 232, 0.1);
  --danger: #f87171;
  --success: #34d399;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Outfit", "Segoe UI", sans-serif;
  --radius: 18px;
  --store-accent: var(--ember);
  --store-hot: var(--ember-hot);
  --store-bg: var(--charcoal);
  --store-surface: var(--surface);
  --store-card: var(--card);
  --store-ink: var(--ink);
  --store-muted: var(--muted);
  --store-highlight: var(--highlight);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--charcoal);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--ember); text-decoration: none; }
a:hover { color: var(--highlight); }
h1, h2, h3, .brand {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
h1 { font-size: clamp(2rem, 6vw, 4.2rem); margin: 0 0 16px; }
h2 { font-size: 1.4rem; margin: 0 0 10px; }
h3 { font-size: 1.05rem; margin: 0 0 8px; }
p { margin: 0 0 12px; }
.container { width: min(1100px, calc(100% - 32px)); margin: 0 auto; }
.muted { color: var(--muted); }
.small { font-size: 0.82rem; color: var(--muted); }
.kicker {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ember);
  margin: 0 0 8px;
}
.lede { font-size: 1.15rem; color: var(--muted); max-width: 38rem; }

.btn, button.btn, .btn-primary, .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 11px 18px;
  font-family: var(--font-body);
  font-weight: 700;
  border: 0;
  cursor: pointer;
}
.btn-primary, .btn.btn-primary {
  background: var(--ember);
  color: #14110f;
}
.btn-primary:hover { background: var(--ember-hot); color: #14110f; }
.btn-ghost, .btn-login {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-small { padding: 7px 12px; font-size: 0.85rem; }
.btn-link { background: none; border: 0; color: var(--ember); cursor: pointer; padding: 0; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: block;
  position: relative;
}
.store-panel { margin: 0 0 18px; }
.order-history { margin: 0 0 20px; clear: both; }
.order-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.order-list li { margin: 0; padding: 0; display: block; }
.order-list__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--store-card, var(--card));
  border: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  position: static;
}
.order-list__link:hover { color: var(--highlight); border-color: rgba(232, 93, 4, 0.35); }
.stack { display: grid; gap: 12px; }
.stack label, form label { display: grid; gap: 6px; font-size: 0.88rem; color: var(--muted); }
input, textarea, select {
  width: 100%;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
}
.flash { border-radius: 12px; padding: 10px 14px; margin: 0 0 16px; }
.flash.success { background: rgba(52, 211, 153, 0.12); color: #bbf7d0; }
.flash.error { background: rgba(248, 113, 113, 0.12); color: #fecaca; }
.flash.info { background: rgba(232, 93, 4, 0.12); color: var(--highlight); }
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.kpi .label { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; }
.kpi .num { font-family: var(--font-display); font-size: 1.8rem; }
.admin-analytics-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin: 20px 0;
}
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 160px;
  margin-top: 12px;
}
.bar-chart__col {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}
.bar-chart__count { font-size: 0.65rem; color: var(--muted); line-height: 1; }
.bar-chart__bar {
  width: 100%;
  min-height: 2px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--ember), rgba(232, 93, 4, 0.45));
}
.bar-chart__label {
  font-size: 0.58rem;
  color: var(--muted);
  width: 100%;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rank-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
.rank-list li span { color: var(--muted); white-space: nowrap; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.check { display: flex !important; flex-direction: row; align-items: center; gap: 8px; }
.check input { width: auto; }

.mkt-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(20, 17, 15, 0.86);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; }
.brand img { display: block; border-radius: 10px; }
.brand-text { display: flex; flex-direction: column; gap: 0; line-height: 1.05; }
.brand-name { font-family: var(--font-display); font-size: 1.15rem; letter-spacing: -0.03em; }
.brand-by { font-family: var(--font-body); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

.nav-wrap { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; gap: 16px; }
.nav-links { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nav-links a { color: var(--muted); padding: 8px 10px; border-radius: 999px; }
.nav-links a.active, .nav-links a:hover { color: var(--ink); background: rgba(232, 93, 4, 0.12); }

.hero {
  padding: clamp(48px, 10vw, 110px) 0 40px;
  background:
    radial-gradient(700px 320px at 80% 0%, rgba(232, 93, 4, 0.22), transparent 55%),
    radial-gradient(500px 280px at 0% 20%, rgba(255, 214, 168, 0.08), transparent 50%);
}
.hero h1 em { color: var(--ember); font-style: italic; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.feature-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; padding: 0 0 64px; }

/* —— Home SaaS landing —— */
.mkt.is-home .mkt-header {
  background: rgba(20, 17, 15, 0.55);
  border-bottom-color: transparent;
}
.mkt-home { padding: 0; max-width: none; width: 100%; }
.home-hero {
  position: relative;
  min-height: min(100vh, 920px);
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}
.home-hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  z-index: 0;
  animation: home-hero-zoom 18s ease-out forwards;
}
.home-hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(20, 17, 15, 0.35) 0%, rgba(20, 17, 15, 0.55) 42%, rgba(20, 17, 15, 0.92) 100%),
    radial-gradient(ellipse 70% 50% at 20% 80%, rgba(232, 93, 4, 0.22), transparent 60%);
}
.home-hero-copy {
  position: relative;
  z-index: 2;
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 clamp(48px, 8vh, 88px);
  animation: home-rise 0.9s ease-out both;
}
.home-brand {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 8vw, 4.8rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--ink);
  margin: 0;
  text-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
}
.home-by {
  margin: 6px 0 18px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ember-hot);
}
.home-hero-copy h1 {
  font-size: clamp(1.45rem, 3.4vw, 2.35rem);
  font-weight: 600;
  max-width: 18ch;
  margin: 0 0 14px;
  color: var(--highlight);
}
.home-hero-copy .lede {
  max-width: 34rem;
  color: rgba(247, 241, 232, 0.82);
}
.home-section {
  padding: clamp(56px, 9vw, 96px) 0;
}
.home-section-title { margin-bottom: 28px; max-width: 16ch; }
.home-dark {
  background:
    radial-gradient(600px 280px at 90% 20%, rgba(232, 93, 4, 0.12), transparent 55%),
    linear-gradient(180deg, #100e0c, #161310);
}
.home-split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
}
.home-split.reverse { grid-template-columns: 0.95fr 1.05fr; }
.home-copy h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); max-width: 14ch; }
.home-figure {
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  animation: home-rise 1s ease-out 0.15s both;
}
.home-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.home-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
  max-width: 720px;
}
.home-steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(232, 93, 4, 0.16);
  color: var(--ember-hot);
  font-weight: 700;
}
.home-cta {
  background:
    radial-gradient(500px 240px at 10% 50%, rgba(232, 93, 4, 0.18), transparent 60%),
    var(--surface);
  border-top: 1px solid var(--line);
}
.home-cta-inner {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  flex-wrap: wrap;
}
.home-cta h2 { max-width: 16ch; margin-bottom: 10px; }

@keyframes home-hero-zoom {
  from { transform: scale(1.06); }
  to { transform: scale(1); }
}
@keyframes home-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 860px) {
  .home-hero { min-height: 88vh; }
  .home-split, .home-split.reverse { grid-template-columns: 1fr; }
  .home-split.reverse .home-figure { order: -1; }
  .home-brand { font-size: clamp(2.2rem, 12vw, 3.4rem); }
}

.mkt-footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 28px;
  background: #100e0c;
}
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.footer-brand .brand { margin-bottom: 14px; }
.footer-tagline {
  margin: 0;
  color: var(--muted);
  max-width: 34ch;
  font-size: 0.95rem;
}
.footer-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-title {
  margin: 0 0 4px;
  font-weight: 700;
  color: var(--ink);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.footer-col a {
  color: var(--muted);
  font-size: 0.95rem;
  width: fit-content;
}
.footer-col a:hover { color: var(--highlight); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-bottom p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}
.footer-mark {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ember) !important;
}

@media (max-width: 860px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; padding-bottom: 48px; }
.page-intro, .page-body { padding: 36px 0 48px; }
.auth-page { max-width: 440px; margin: 40px auto 80px; }
.prose { max-width: 680px; }

.store { background: var(--store-bg); color: var(--store-ink); padding-bottom: 96px; }
.store h1 {
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  margin: 0 0 18px;
  line-height: 1.15;
}
.store .store-main > h1 { padding-top: 4px; }
.store-top {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px;
  background: color-mix(in srgb, var(--store-bg) 88%, black);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.store-brand { display: flex; align-items: center; gap: 10px; color: inherit; font-weight: 700; }
.store-brand img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; }
.cart-pill { background: var(--store-accent); color: #14110f; border-radius: 999px; padding: 8px 12px; font-weight: 700; }
.menu-cat { margin-bottom: 28px; }
.menu-grid { display: grid; gap: 12px; }
.menu-card {
  display: grid; grid-template-columns: 96px 1fr; gap: 12px;
  background: var(--store-card); border-radius: 16px; padding: 10px; color: inherit;
}
.menu-photo {
  border-radius: 12px; width: 96px; height: 96px; overflow: hidden;
  background: linear-gradient(135deg, #221e1a, #3a2418);
}
.menu-photo img {
  width: 100%; height: 100%; object-fit: contain; display: block;
  background: #1a1714;
}
.store-hero { margin: 0 0 18px; border-radius: 18px; overflow: hidden; position: relative; }
.store-hero-img {
  width: 100%; aspect-ratio: 16/7; object-fit: cover; display: block;
  max-height: 220px;
}
.store-hero-copy {
  position: absolute; inset: auto 0 0 0; padding: 16px;
  background: linear-gradient(transparent, rgba(16,14,12,0.88));
}
.product-hero {
  border-radius: 18px; overflow: hidden; margin-bottom: 14px;
  background: #1a1714; aspect-ratio: 1; max-height: 360px;
}
.product-hero img { width: 100%; height: 100%; object-fit: contain; display: block; }
.special-thumb { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.price { color: var(--store-accent); font-weight: 700; }
.store-dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--store-surface);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
}
.store-dock a, .store-dock button {
  background: none; border: 0; color: var(--store-muted);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font: inherit; font-size: 0.72rem; font-weight: 600; padding: 8px;
}
.store-dock span { font-size: 1.1rem; }
.store-main { padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); max-width: 720px; margin: 0 auto; }
.pwa-banner {
  position: fixed; left: 12px; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom));
  z-index: 40;
  background: var(--store-card); border-radius: 14px; padding: 12px 14px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}
.pwa-banner[hidden] { display: none !important; }
.pwa-banner-actions { display: flex; gap: 8px; flex-shrink: 0; }
.demo-kit-grid {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px;
}
.demo-kit-grid img {
  border-radius: 12px; object-fit: cover; background: #1a1714;
  border: 1px solid var(--line);
}
.owner-product-row {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid var(--line); color: inherit;
}
.owner-product-row img {
  width: 48px; height: 48px; border-radius: 10px; object-fit: contain; background: #1a1714;
}
.cart-list { list-style: none; padding: 0; }
.cart-line { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.search-bar { display: flex; gap: 8px; margin: 0 0 18px; }
.cat-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 14px;
  margin: 0 0 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.cat-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: var(--store-card);
  color: var(--store-ink);
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
}
.cat-chip:hover { color: var(--store-highlight); border-color: rgba(232, 93, 4, 0.35); }
.cat-chip.is-active {
  background: rgba(232, 93, 4, 0.18);
  border-color: rgba(232, 93, 4, 0.55);
  color: var(--store-highlight);
}
.cat-chip__n {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--store-muted);
  background: rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 1px 6px;
}
.cat-chip.is-active .cat-chip__n { color: var(--store-highlight); }
.filter-note { margin: -6px 0 14px; font-size: 0.86rem; }
.special-card { display: flex; justify-content: space-between; gap: 12px; align-items: center; background: var(--store-card); padding: 14px; border-radius: 16px; margin-bottom: 16px; }

.ops { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
.ops-side { background: var(--surface); border-right: 1px solid var(--line); padding: 18px 14px; }
.ops-side nav { display: grid; gap: 4px; margin-top: 18px; }
.ops-side a { color: var(--muted); padding: 8px 10px; border-radius: 10px; }
.ops-side a.active, .ops-side a:hover { background: rgba(232, 93, 4, 0.14); color: var(--ink); }
.ops-main { padding: 24px; min-width: 0; overflow-x: clip; }
.ops h1 { font-size: clamp(1.45rem, 2.5vw, 1.9rem); margin: 0 0 12px; }
.ops h2 { font-size: 1.1rem; margin: 0 0 8px; }
.ops .section-head { margin-bottom: 8px; }
.ops .section-head h1 { margin: 0; }
.board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 28px;
  align-items: start;
}
.board-col {
  background: var(--surface);
  border-radius: 16px;
  padding: 12px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.board-col header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.board-col header h2 {
  font-size: 0.92rem;
  text-transform: capitalize;
  margin: 0;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0;
}
.board-col-body { display: flex; flex-direction: column; gap: 10px; }
.order-card {
  background: var(--card);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.order-card p { margin: 0; }
.order-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.order-actions form { margin: 0; }
.order-actions .btn-small { padding: 7px 12px; font-size: 0.8rem; }
.completed-list { margin-top: 4px; clear: both; }
.badge { background: rgba(232, 93, 4, 0.16); color: var(--highlight); border-radius: 999px; padding: 2px 8px; font-size: 0.75rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); }

@media (max-width: 1100px) {
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .ops { grid-template-columns: 1fr; }
  .ops-side {
    position: sticky;
    top: 0;
    z-index: 25;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 10px 12px;
  }
  .ops-side .brand { margin-bottom: 8px; }
  .ops-side nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 4px;
    margin-top: 0;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .ops-side a { white-space: nowrap; flex: 0 0 auto; }
  .ops-main { padding: 16px; }
  .board {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding-bottom: 8px;
    scroll-snap-type: x proximity;
  }
  .board-col {
    flex: 0 0 min(280px, 82vw);
    scroll-snap-align: start;
  }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
