:root {
  --ink: #17211b;
  --muted: #66736b;
  --paper: #f8f7f2;
  --panel: #ffffff;
  --line: #e2e0d7;
  --green: #176b50;
  --mint: #e2f1e8;
  --coral: #df654f;
  --gold: #efb83f;
  --blue: #3d668a;
  --shadow: 0 18px 48px rgba(40, 34, 22, .12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.site-header, .app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 56px);
  background: rgba(248, 247, 242, .92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(23, 33, 27, .08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--green), #153b2e);
  box-shadow: 0 8px 20px rgba(15, 111, 79, .22);
  font-size: 13px;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}

.top-nav a:hover { color: var(--ink); }

.button, button {
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(15, 111, 79, .18);
}

.button.secondary, button.secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}

.button.small { min-height: 40px; padding: 0 14px; }
.button.full { width: 100%; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 560px);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: 54px clamp(18px, 5vw, 76px) 44px;
  overflow: hidden;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
}

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

.hero h1 {
  max-width: 780px;
  margin-bottom: 20px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: .96;
  letter-spacing: 0;
}

.hero-lede {
  max-width: 650px;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.55;
  color: #445049;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 28px 0;
}

.proof-row, .logo-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.proof-row span, .logo-strip span {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .7);
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
}

.proof-row strong { color: var(--ink); }

.hero-product { position: relative; }

.screen-frame {
  background: #1b221e;
  color: #fff;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.screen-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.screen-top span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--coral);
}

.screen-top span:nth-child(2) { background: var(--gold); }
.screen-top span:nth-child(3) { background: #6fd490; }
.screen-top p { margin: 0 0 0 12px; color: #b8c5bd; font-size: 13px; }

.metric-grid, .stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.metric-grid article, .stat-grid article {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  padding: 16px;
}

.metric-grid small, .stat-grid span { display: block; color: #aebbb3; margin-bottom: 8px; }
.metric-grid strong, .stat-grid strong { display: block; font-size: 26px; }
.metric-grid em, .stat-grid em { display: block; margin-top: 8px; font-style: normal; color: #9bd9af; font-size: 13px; }

.order-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.order-board div {
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: 14px;
}

.order-board p {
  margin: 10px 0 0;
  padding: 10px;
  border-radius: 8px;
  background: #f1eee6;
  color: #445049;
  font-size: 13px;
}

.automation-strip {
  margin-top: 12px;
  border-radius: 8px;
  padding: 14px;
  background: var(--mint);
  color: var(--green);
  font-weight: 700;
}

.logo-strip {
  padding: 18px clamp(18px, 5vw, 76px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  justify-content: center;
}

.section, .flow-section, .pilot, .cta-section {
  padding: 78px clamp(18px, 5vw, 76px);
}

.section-heading {
  max-width: 820px;
  margin-bottom: 30px;
}

.section-heading h2, .pilot h2, .cta-section h2 {
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.05;
  margin-bottom: 16px;
}

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

.feature-grid article, .timeline article, .pilot-card, .panel, .cart-panel, .menu-panel, .member-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 8px 28px rgba(40, 34, 22, .06);
}

.feature-grid p, .timeline p, .pilot p, .muted { color: var(--muted); line-height: 1.55; }
.icon { color: var(--coral); font-weight: 800; }

.flow-section { background: #fff; }
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.timeline strong {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--mint);
  color: var(--green);
}

.pilot {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 30px;
  align-items: center;
}

.pilot-card li { margin: 12px 0; color: #445049; }
.cta-section { text-align: center; background: #173629; color: #fff; }
.cta-section p { color: #c4d6cd; }
.cta-section .hero-actions { justify-content: center; }
footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 26px clamp(18px, 5vw, 76px);
  color: var(--muted);
}

.app-body, .dashboard-body { background: #f5f2ea; }
.order-shell { padding: 24px clamp(16px, 3vw, 40px) 48px; }
.customer-hero {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}
.customer-hero > div:first-child {
  background: #173629;
  color: #fff;
  border-radius: 12px;
  padding: clamp(24px, 4vw, 44px);
}
.customer-hero h1 { font-size: clamp(38px, 5vw, 64px); margin-bottom: 10px; }
.customer-hero p { color: #d2e0d9; max-width: 660px; line-height: 1.55; }
.member-card strong { display: block; font-size: 28px; margin: 16px 0; }
.order-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.toolbar { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
label { color: var(--muted); font-weight: 700; font-size: 13px; }
select, input {
  width: 100%;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  min-height: 42px;
  padding: 0 12px;
  color: var(--ink);
}
.category-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.category-tabs button, .panel-head button, .side-nav button, .dashboard-main button:not(.button) {
  min-height: 38px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}
.category-tabs button.active, .side-nav button.active { background: var(--green); color: #fff; border-color: var(--green); }
.menu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.menu-card { overflow: hidden; padding: 0; }
.dish-art {
  height: 130px;
  background: linear-gradient(135deg, #ffefd1, #f7b6a7 45%, #8f4d3e);
  display: flex;
  align-items: end;
  padding: 12px;
  color: #fff;
  font-weight: 800;
}
.menu-card:nth-child(2n) .dish-art { background: linear-gradient(135deg, #dff3e7, #7fbfa2 45%, #325c8f); }
.menu-card:nth-child(3n) .dish-art { background: linear-gradient(135deg, #fff0b8, #f2b84b 42%, #76522a); }
.menu-content { padding: 16px; }
.menu-content p { color: var(--muted); min-height: 44px; }
.menu-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.menu-foot button { min-height: 38px; padding: 0 12px; }
.cart-panel { position: sticky; top: 88px; }
.cart-head, .panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.cart-head h2, .panel h2 { margin: 0; }
.cart-items.empty { color: var(--muted); border: 1px dashed var(--line); padding: 16px; border-radius: 8px; }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-line small { color: var(--muted); }
.reward-box {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin: 16px 0;
  padding: 14px;
  border-radius: 8px;
  background: var(--mint);
}
.reward-box p { margin: 4px 0 0; color: var(--green); font-size: 13px; }
.switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.switch span {
  display: block;
  width: 48px;
  height: 28px;
  border-radius: 99px;
  background: #b8c5bd;
  position: relative;
  margin-top: 6px;
}
.switch span:before {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  top: 3px;
  left: 3px;
  border-radius: 50%;
  background: #fff;
  transition: transform .18s ease;
}
.switch input:checked + span { background: var(--green); }
.switch input:checked + span:before { transform: translateX(20px); }
.totals p { display: flex; justify-content: space-between; margin: 9px 0; color: var(--muted); }
.totals .grand { color: var(--ink); font-size: 20px; padding-top: 12px; border-top: 1px solid var(--line); }
.status-card { margin-top: 16px; padding: 16px; border-radius: 8px; background: #fff7df; border: 1px solid #efd68f; }
.status-card p { color: #76522a; }
.status-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.status-steps span { padding: 8px; border-radius: 8px; background: #fff; text-align: center; color: var(--muted); font-size: 12px; font-weight: 800; }
.status-steps span.active { background: var(--gold); color: var(--ink); }

.dashboard-body { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px;
  background: #17211b;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.sidebar .brand-mark { background: #fff; color: var(--green); }
.side-nav { display: grid; gap: 8px; }
.side-nav button { justify-content: flex-start; width: 100%; color: #c7d2cb; background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.08); }
.sidebar-link { margin-top: auto; color: #dff3e7; font-weight: 800; }
.dashboard-main { padding: 24px clamp(16px, 3vw, 38px) 48px; }
.dashboard-top { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.dashboard-top h1 { margin: 0; font-size: clamp(30px, 4vw, 46px); }
.admin-view { display: none; }
.admin-view.active { display: block; }
.dashboard-main .stat-grid { grid-template-columns: repeat(4, 1fr); margin-bottom: 18px; }
.dashboard-main .stat-grid article { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.dashboard-main .stat-grid span { color: var(--muted); }
.dashboard-main .stat-grid em { color: var(--green); }
.dashboard-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; margin-bottom: 18px; }
.panel.wide { min-width: 0; }
.kanban { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kanban-col { background: #f5f2ea; border-radius: 8px; padding: 12px; min-height: 260px; }
.kanban-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin-top: 10px; }
.kanban-card small { color: var(--muted); display: block; margin-top: 5px; }
.message-list { display: grid; gap: 10px; }
.message-list p { padding: 14px; background: #f5f2ea; border-radius: 8px; margin: 0; }
.message-list span { display: block; color: var(--muted); margin-top: 5px; }
.bar-list p { margin: 14px 0; }
.bar-list span { display: block; margin-bottom: 8px; color: #445049; }
.bar-list b { display: block; height: 10px; border-radius: 99px; background: linear-gradient(90deg, var(--green), var(--gold)); }
.loop-card { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.loop-card span { display: grid; place-items: center; min-height: 76px; background: var(--mint); color: var(--green); border-radius: 8px; font-weight: 800; }
.table { display: grid; gap: 8px; }
.table-row { display: grid; grid-template-columns: 1.1fr .9fr .9fr .8fr .8fr; gap: 10px; align-items: center; padding: 12px; border-radius: 8px; background: #f8f6f0; }
.table-row.header { background: #173629; color: #fff; font-weight: 800; }
.badge { display: inline-flex; justify-content: center; padding: 6px 9px; border-radius: 99px; background: var(--mint); color: var(--green); font-size: 12px; font-weight: 800; }
.customer-list { display: grid; gap: 8px; }
.customer-list button { justify-content: space-between; color: var(--ink); background: #f8f6f0; border: 1px solid var(--line); box-shadow: none; }
.profile-card { display: grid; gap: 12px; }
.profile-card p { margin: 0; padding: 12px; background: #f8f6f0; border-radius: 8px; display: flex; justify-content: space-between; gap: 10px; }
.settings-list { display: grid; gap: 14px; }
.phone-mock {
  max-width: 430px;
  background: #e8efe8;
  border-radius: 24px;
  padding: 18px;
  border: 10px solid #17211b;
}
.phone-mock p {
  width: 82%;
  margin: 0 0 12px auto;
  padding: 12px;
  border-radius: 12px 12px 4px 12px;
  background: #d6ffd9;
}
.product-admin, .outlet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.admin-card { background: #f8f6f0; border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
.admin-card p { color: var(--muted); }

@media (max-width: 980px) {
  .hero, .pilot, .order-layout, .customer-hero, .dashboard-grid { grid-template-columns: 1fr; }
  .feature-grid, .timeline, .metric-grid, .order-board, .dashboard-main .stat-grid, .product-admin, .outlet-grid { grid-template-columns: repeat(2, 1fr); }
  .cart-panel { position: static; }
  .dashboard-body { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .side-nav { grid-template-columns: repeat(3, 1fr); }
  .dashboard-top { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 680px) {
  .top-nav { display: none; }
  .site-header, .app-header { min-height: 64px; }
  .hero { padding-top: 34px; min-height: auto; }
  .feature-grid, .timeline, .metric-grid, .order-board, .menu-grid, .toolbar, .dashboard-main .stat-grid, .kanban, .product-admin, .outlet-grid { grid-template-columns: 1fr; }
  .screen-frame { border-radius: 12px; padding: 12px; }
  .section, .flow-section, .pilot, .cta-section { padding-top: 54px; padding-bottom: 54px; }
  footer { flex-direction: column; }
  .side-nav { grid-template-columns: repeat(2, 1fr); }
  .table-row { grid-template-columns: 1fr; }
  .loop-card { grid-template-columns: repeat(2, 1fr); }
}
