/* =====================================================
   Pursaklar.RED — Mahalle Panosu
   Aesthetic: warm parchment + crimson + mustard + sage
   Fonts: Fraunces (serif, characterful) · Geist (sans, modern)
   ===================================================== */

:root {
  /* Brand */
  --red: #C8102E;
  --red-deep: #9A0B22;
  --red-soft: #F8D5DA;
  --mustard: #E2A93B;
  --mustard-soft: #FBEACB;
  --sage: #6F9968;
  --sage-soft: #D7E8D2;
  --cream: #F5EBD9;
  --cream-2: #EFE2C8;
  --paper: #FBF6EA;
  --ink: #1F1A17;
  --ink-soft: #5A4D43;
  --ink-mute: #8C7B6D;
  --line: rgba(31,26,23,.12);
  --line-strong: rgba(31,26,23,.25);

  /* Type */
  --display: 'Fraunces', 'Times New Roman', serif;
  --sans: 'Geist', system-ui, -apple-system, sans-serif;
  --mono: 'Geist Mono', 'JetBrains Mono', monospace;

  /* Layout */
  --radius: 18px;
  --radius-sm: 10px;
  --radius-lg: 28px;
  --shadow-1: 0 1px 2px rgba(31,26,23,.06), 0 6px 16px -8px rgba(31,26,23,.18);
  --shadow-2: 0 2px 4px rgba(31,26,23,.08), 0 14px 32px -10px rgba(31,26,23,.22);
  --shadow-3: 0 4px 10px rgba(200,16,46,.18), 0 24px 50px -16px rgba(200,16,46,.32);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html {
  background: var(--cream);
  font-family: var(--sans);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Grain overlay (subtle paper texture) */
.grain {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: .35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.12 0 0 0 0 0.10 0 0 0 0 0.09 0 0 0 0.55 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ===================== APP SHELL ===================== */
.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(226,169,59,.12), transparent 60%),
    radial-gradient(80% 40% at 100% 100%, rgba(200,16,46,.08), transparent 60%),
    var(--cream);
  padding-bottom: 90px;
}

@media (min-width: 700px) {
  .app {
    max-width: 520px;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    box-shadow: 0 0 60px rgba(31,26,23,.08);
  }
}

/* ===================== TOPBAR ===================== */
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 18px 8px;
  padding-top: max(18px, env(safe-area-inset-top));
}
.brand { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.brand-mark {
  width: 44px; height: 44px;
  background: var(--red);
  border-radius: 12px;
  display: grid; place-items: center;
  position: relative;
  box-shadow: var(--shadow-1), inset 0 0 0 1px rgba(255,255,255,.08);
  transform: rotate(-3deg);
}
.brand-mark::after {
  content: ""; position: absolute; inset: 4px;
  border: 1.5px solid var(--paper);
  border-radius: 8px;
  pointer-events: none;
}
.brand-p {
  font-family: var(--display);
  font-weight: 800;
  font-style: italic;
  font-size: 28px;
  color: var(--paper);
  line-height: 1;
  position: relative;
  top: -2px;
}
.brand-dot {
  position: absolute;
  width: 10px; height: 10px;
  background: var(--mustard);
  border-radius: 50%;
  top: 6px; right: 6px;
  box-shadow: 0 0 0 2px var(--red);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-text strong {
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  font-variation-settings: "SOFT" 30, "opsz" 32;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-text strong .dot { color: var(--red); }
.brand-text small {
  font-size: 11px;
  font-family: var(--mono);
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.iconbtn {
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 12px;
  display: grid; place-items: center;
  cursor: pointer;
  position: relative;
  transition: transform .15s ease, background .2s ease, color .2s ease;
}
.iconbtn:hover { background: var(--cream-2); }
.iconbtn:active { transform: scale(.94); }
.bell-dot {
  position: absolute; top: 9px; right: 9px;
  width: 8px; height: 8px; background: var(--red);
  border-radius: 50%;
  border: 2px solid var(--paper);
}

/* ===================== ROLE BAR ===================== */
.role-bar {
  position: relative;
  display: flex; gap: 0;
  margin: 12px 18px 18px;
  padding: 5px;
  background: var(--paper);
  border-radius: 16px;
  border: 1px solid var(--line);
}
.role {
  flex: 1;
  background: transparent;
  border: none;
  padding: 9px 6px;
  border-radius: 12px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 13px;
  color: var(--ink-soft);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer;
  position: relative;
  z-index: 2;
  transition: color .25s ease;
}
.role-emoji { font-size: 14px; }
.role.active { color: var(--ink); font-weight: 600; }
.role-glide {
  position: absolute;
  top: 5px; bottom: 5px;
  width: calc((100% - 10px) / 3);
  background: var(--ink);
  border-radius: 12px;
  z-index: 1;
  transition: transform .35s cubic-bezier(.5,1.5,.5,1);
  box-shadow: var(--shadow-1);
}
.role-bar[data-active="seller"] .role-glide { transform: translateX(100%); }
.role-bar[data-active="courier"] .role-glide { transform: translateX(200%); }

/* ===================== VIEWS ===================== */
.view {
  display: none;
  padding: 0 18px;
  animation: viewIn .35s ease;
}
.view.active { display: block; }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ===================== HERO ===================== */
.hero { padding: 8px 0 24px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--red);
  background: var(--paper);
  padding: 5px 10px;
  border-radius: 100px;
  border: 1px solid var(--line);
}
.hero-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 38px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 12px 0 8px;
  font-variation-settings: "SOFT" 40, "opsz" 60;
  color: var(--ink);
}
.hero-title em {
  font-style: italic;
  font-weight: 800;
  color: var(--red);
  font-variation-settings: "SOFT" 100, "opsz" 30;
  text-decoration: underline wavy var(--mustard);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}
.hero-sub {
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0 0 20px;
  max-width: 38ch;
}

/* Search */
.search-wrap {
  position: relative;
  margin-bottom: 14px;
}
.search-ico {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--ink-mute);
  pointer-events: none;
}
#searchInput {
  width: 100%;
  font: 500 15px var(--sans);
  padding: 14px 50px 14px 44px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
#searchInput:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(200,16,46,.1);
}
#searchInput::placeholder { color: var(--ink-mute); font-weight: 400; }
.search-kbd {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 11px;
  background: var(--cream-2);
  color: var(--ink-soft);
  padding: 3px 7px;
  border-radius: 6px;
  border: 1px solid var(--line);
}

/* Quick actions */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.quick {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 10px;
  text-align: left;
  cursor: pointer;
  position: relative;
  transition: transform .15s ease, box-shadow .2s ease;
  display: flex; flex-direction: column; gap: 6px;
  min-height: 92px;
}
.quick:hover { box-shadow: var(--shadow-1); }
.quick:active { transform: scale(.97); }
.quick-icon {
  font-size: 22px;
  width: 36px; height: 36px;
  background: var(--cream);
  border-radius: 10px;
  display: grid; place-items: center;
}
.quick[data-action="voice"] .quick-icon { background: var(--red-soft); }
.quick[data-action="repeat"] .quick-icon { background: var(--mustard-soft); }
.quick[data-action="nearby"] .quick-icon { background: var(--sage-soft); }
.quick-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.quick-tag, .quick-sub {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.quick-tag {
  position: absolute;
  top: 8px; right: 8px;
  background: var(--red);
  color: var(--paper);
  padding: 2px 6px;
  border-radius: 100px;
}

/* ===================== SECTIONS ===================== */
.section-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 26px 0 14px;
}
.section-head h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: -0.02em;
  margin: 0;
  font-variation-settings: "SOFT" 30, "opsz" 36;
}
.section-link, .section-meta {
  font-size: 12px;
  font-family: var(--mono);
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.section-link { color: var(--red); }

/* ===================== CATEGORY STICKERS ===================== */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.cat {
  position: relative;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 16px 14px 14px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: transform .15s ease, box-shadow .2s ease;
  overflow: hidden;
}
.cat::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 17px;
  background: linear-gradient(180deg, transparent 60%, rgba(31,26,23,.04));
  pointer-events: none;
}
.cat:hover { box-shadow: var(--shadow-2); }
.cat:active { transform: scale(.98); }

.cat:nth-child(6n+1) { transform: rotate(-1.2deg); }
.cat:nth-child(6n+2) { transform: rotate(.8deg); }
.cat:nth-child(6n+3) { transform: rotate(-.5deg); }
.cat:nth-child(6n+4) { transform: rotate(1deg); }
.cat:nth-child(6n+5) { transform: rotate(-.8deg); }
.cat:nth-child(6n+6) { transform: rotate(.6deg); }
.cat:hover { transform: rotate(0) scale(1.02); }

.cat-head { display: flex; justify-content: space-between; align-items: flex-start; }
.cat-emoji { font-size: 28px; line-height: 1; }
.cat-count {
  font-family: var(--mono);
  font-size: 11px;
  background: var(--ink);
  color: var(--paper);
  padding: 3px 8px;
  border-radius: 100px;
  font-weight: 600;
}
.cat-count.zero { background: var(--ink-mute); }
.cat-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
  display: block;
  margin: 12px 0 4px;
  letter-spacing: -0.01em;
}
.cat-hint {
  font-size: 11px;
  color: var(--ink-mute);
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.cat[data-tone="food"]    { background: var(--red-soft); border-color: rgba(200,16,46,.2); }
.cat[data-tone="drink"]   { background: var(--mustard-soft); border-color: rgba(226,169,59,.3); }
.cat[data-tone="retail"]  { background: #E8DECF; }
.cat[data-tone="service"] { background: var(--sage-soft); border-color: rgba(111,153,104,.3); }
.cat[data-tone="pending"] { background: var(--paper); opacity: .7; }

/* ===================== FEATURED STRIP ===================== */
.strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  margin: 0 -18px;
  padding: 4px 18px 12px;
  scrollbar-width: none;
}
.strip::-webkit-scrollbar { display: none; }

.vendor-card {
  flex: 0 0 78%;
  scroll-snap-align: start;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
  position: relative;
  overflow: hidden;
}
.vendor-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }

.vendor-card .vc-art {
  height: 100px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  margin: -8px -8px 12px;
  display: grid; place-items: center;
  font-size: 36px;
  position: relative;
  overflow: hidden;
}
.vendor-card .vc-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.18), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(0,0,0,.18), transparent 50%);
}
.vendor-card .vc-art.v2 { background: linear-gradient(135deg, var(--mustard), #C68A1F); }
.vendor-card .vc-art.v3 { background: linear-gradient(135deg, var(--sage), #4A6E45); }
.vendor-card .vc-art.v4 { background: linear-gradient(135deg, #2B2B2B, #0E0E0E); }
.vendor-card .vc-art.v5 { background: linear-gradient(135deg, #5A4033, #2A1C12); }

.vc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.vc-name { font-family: var(--display); font-weight: 600; font-size: 16px; }
.vc-rating {
  font-family: var(--mono);
  font-size: 11px;
  background: var(--ink);
  color: var(--paper);
  padding: 2px 7px;
  border-radius: 100px;
  font-weight: 600;
}
.vc-meta {
  display: flex; gap: 8px;
  font-size: 12px;
  color: var(--ink-mute);
  margin-top: 2px;
}
.vc-meta .open-pill {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  color: var(--sage);
  display: inline-flex; align-items: center; gap: 4px;
}
.vc-meta .open-pill::before {
  content: ""; width: 6px; height: 6px;
  background: var(--sage); border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(111,153,104,.2);
}
.vc-tags {
  display: flex; gap: 4px; flex-wrap: wrap;
  margin-top: 8px;
}
.vc-tag {
  font-family: var(--mono);
  font-size: 10px;
  background: var(--cream-2);
  color: var(--ink-soft);
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: 0.04em;
}

/* ===================== RECENT LIST ===================== */
.recent-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.recent-list li {
  display: flex; align-items: center; gap: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background .2s ease;
}
.recent-list li:hover { background: var(--cream-2); }
.recent-thumb {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--red), var(--mustard));
  display: grid; place-items: center;
  color: var(--paper);
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}
.recent-info { flex: 1; min-width: 0; }
.recent-info strong {
  display: block; font-size: 14px; font-weight: 600;
  font-family: var(--display);
  font-variation-settings: "opsz" 18;
}
.recent-info small { font-size: 11px; color: var(--ink-mute); font-family: var(--mono); }
.recent-status {
  font-family: var(--mono);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--sage-soft);
  color: var(--sage);
  font-weight: 600;
}

/* ===================== APP FOOTER ===================== */
.appfoot {
  text-align: center;
  padding: 32px 0 20px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ===================== DASHBOARDS ===================== */
.dash { padding: 6px 0 24px; }
.dash-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 16px;
  margin-bottom: 18px;
}
.dash-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 30px;
  line-height: 1.1;
  margin: 8px 0 0;
  letter-spacing: -0.02em;
  font-variation-settings: "SOFT" 30, "opsz" 50;
}
.dash-title em { color: var(--red); font-style: italic; font-weight: 700; }
.dash-state {
  display: flex; align-items: center; gap: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 6px 10px 6px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
}
.state-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ink-mute);
}
.state-dot.open { background: var(--sage); box-shadow: 0 0 0 3px rgba(111,153,104,.2); }

.switch {
  position: relative;
  width: 36px; height: 20px;
  display: inline-block;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; inset: 0;
  background: var(--ink-mute);
  border-radius: 100px;
  cursor: pointer;
  transition: background .2s;
}
.slider::before {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: var(--paper);
  border-radius: 50%;
  transition: transform .25s cubic-bezier(.5,1.5,.5,1);
}
.switch input:checked + .slider { background: var(--red); }
.switch input:checked + .slider::before { transform: translateX(16px); }

/* KPI grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.kpi {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 14px;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}
.kpi-label {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
}
.kpi-value {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 26px;
  margin: 4px 0;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 36;
}
.kpi-trend {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
}
.kpi-trend.up { color: var(--sage); }
.kpi-trend.down { color: var(--red); }
.kpi::after {
  content: "";
  position: absolute;
  right: -20px; top: -20px;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--cream-2), transparent 70%);
  opacity: .6;
}

/* Dash panel grid */
.dash-grid {
  display: grid;
  gap: 12px;
}
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  position: relative;
  overflow: hidden;
}
.panel > header {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 12px;
}
.panel h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 16px;
  margin: 0;
  letter-spacing: -0.01em;
}
.panel header a {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
}

/* Order queue */
.order-queue { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.order-queue li {
  display: flex; align-items: center; gap: 10px;
  padding: 10px;
  background: var(--cream);
  border-radius: 12px;
  border: 1px dashed var(--line-strong);
}
.oq-id {
  font-family: var(--mono);
  font-size: 11px;
  background: var(--ink);
  color: var(--paper);
  padding: 3px 7px;
  border-radius: 6px;
  font-weight: 600;
}
.oq-name { flex: 1; font-size: 13px; font-weight: 500; }
.oq-status {
  font-family: var(--mono);
  font-size: 10px;
  padding: 3px 7px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}
.oq-status.prep { background: var(--mustard-soft); color: #8B5A0F; }
.oq-status.ready { background: var(--sage-soft); color: var(--sage); }
.oq-status.cook { background: var(--red-soft); color: var(--red); }

/* Chart */
.chart { width: 100%; height: 120px; display: block; }
.chart-foot {
  display: flex; gap: 16px;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-mute);
}
.chart-foot strong { color: var(--ink); font-weight: 600; }
.dot-r { display: inline-block; width: 8px; height: 8px; background: var(--red); border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.dot-y { display: inline-block; width: 8px; height: 8px; background: var(--ink-mute); border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.legend {
  font-family: var(--mono);
  font-size: 10px;
  background: var(--red-soft);
  color: var(--red);
  padding: 2px 7px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Menu list */
.menu-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.menu-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  background: var(--cream);
  border-radius: 10px;
  font-size: 13px;
}
.menu-list .ml-emoji { font-size: 18px; }
.menu-list .ml-name { flex: 1; font-weight: 500; }
.menu-list .ml-price {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--red);
}
.menu-list .ml-toggle {
  width: 28px; height: 16px;
  background: var(--ink-mute);
  border-radius: 100px;
  position: relative;
  cursor: pointer;
  transition: background .2s;
}
.menu-list .ml-toggle.on { background: var(--sage); }
.menu-list .ml-toggle::after {
  content: ""; position: absolute;
  top: 2px; left: 2px;
  width: 12px; height: 12px;
  background: var(--paper);
  border-radius: 50%;
  transition: transform .2s;
}
.menu-list .ml-toggle.on::after { transform: translateX(12px); }

/* Insight */
.insight {
  display: flex; gap: 12px;
  background: linear-gradient(135deg, var(--mustard-soft), var(--cream));
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed rgba(226,169,59,.5);
}
.insight-badge {
  width: 36px; height: 36px;
  background: var(--paper);
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}
.insight strong {
  display: block; font-size: 14px; font-weight: 600;
  font-family: var(--display);
  font-variation-settings: "opsz" 18;
  margin-bottom: 2px;
}
.insight p { font-size: 12px; color: var(--ink-soft); margin: 0; }

/* Delivery */
.delivery-card .route-badge {
  font-family: var(--mono);
  font-size: 10px;
  background: var(--ink);
  color: var(--paper);
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.06em;
}
.delivery-body { padding: 8px 4px; }
.stop {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 0;
}
.stop-ico {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}
.stop-ico.pickup { background: var(--mustard); color: var(--ink); }
.stop-ico.drop { background: var(--red); color: var(--paper); }
.stop strong { display: block; font-size: 14px; }
.stop small { font-size: 11px; color: var(--ink-mute); font-family: var(--mono); }
.stop-time {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-mute);
  background: var(--cream-2);
  padding: 3px 7px;
  border-radius: 100px;
}
.route-line {
  width: 2px;
  height: 22px;
  background: repeating-linear-gradient(to bottom, var(--ink-mute) 0 4px, transparent 4px 8px);
  margin-left: 17px;
}
.delivery-actions { display: flex; gap: 8px; margin-top: 12px; }

/* Package list */
.package-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.package-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--cream);
  border-radius: 12px;
  border: 1px dashed var(--line-strong);
}
.package-list .pkg-ico {
  width: 32px; height: 32px;
  background: var(--paper);
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: 16px;
  flex-shrink: 0;
}
.package-list strong { font-size: 13px; display: block; }
.package-list small { font-size: 11px; color: var(--ink-mute); font-family: var(--mono); }
.package-list .pkg-dist {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink);
  font-weight: 600;
}

/* ===================== BUTTONS ===================== */
.btn {
  border: none;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  padding: 11px 18px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
}
.btn:active { transform: scale(.97); }
.btn.primary {
  background: var(--red);
  color: var(--paper);
  box-shadow: var(--shadow-3);
}
.btn.primary:hover { background: var(--red-deep); }
.btn.ghost {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn.ghost:hover { background: var(--cream-2); }
.btn.full { width: 100%; }

/* ===================== OVERLAYS ===================== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(31,26,23,.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  animation: fadeIn .25s ease;
}
.overlay.open { display: flex; }
.overlay:not(.center):not(.center .sheet) { align-items: flex-end; }

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

.sheet {
  width: 100%;
  max-width: 520px;
  background: var(--paper);
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  padding: 28px 22px 22px;
  animation: sheetUp .4s cubic-bezier(.3,1.2,.4,1);
  border-top: 3px solid var(--red);
  box-shadow: 0 -20px 60px rgba(31,26,23,.3);
}
@keyframes sheetUp {
  from { transform: translateY(100%); }
  to   { transform: none; }
}
.sheet.narrow { padding-bottom: 28px; }
.sheet.center { text-align: center; border-top-left-radius: 28px; border-top-right-radius: 28px; }
.overlay.center { align-items: center; }
.overlay.center .sheet {
  border-radius: 28px;
  border-top: 3px solid var(--red);
  margin: 0 18px;
  max-width: 380px;
  animation: sheetPop .35s cubic-bezier(.3,1.5,.4,1);
}
@keyframes sheetPop {
  from { opacity: 0; transform: scale(.85) translateY(20px); }
  to   { opacity: 1; transform: none; }
}

.sheet-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 34px; height: 34px;
  border: none;
  background: var(--cream-2);
  color: var(--ink);
  border-radius: 10px;
  font-size: 22px;
  font-weight: 300;
  cursor: pointer;
  display: grid; place-items: center;
  z-index: 5;
  transition: transform .15s ease;
}
.sheet-close:hover { transform: rotate(90deg); }

/* Vendor sheet */
.sheet-head { padding-right: 30px; }
.vendor-hero {
  height: 140px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  display: grid; place-items: center;
  font-size: 60px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}
.vendor-hero::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.2), transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(0,0,0,.2), transparent 50%);
}
.vendor-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 26px;
  margin: 0 0 4px;
  letter-spacing: -0.02em;
}
.vendor-meta {
  display: flex; gap: 14px; align-items: center;
  font-size: 12px;
  color: var(--ink-mute);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.vendor-meta strong { color: var(--ink); }
.vendor-meta .open-pill {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--sage);
  display: inline-flex; align-items: center; gap: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.vendor-meta .open-pill::before {
  content: ""; width: 6px; height: 6px;
  background: var(--sage); border-radius: 50%;
}

.menu-section h4 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  margin: 18px 0 8px;
}
.menu-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px;
  background: var(--cream);
  border-radius: 14px;
  margin-bottom: 6px;
  border: 1px solid transparent;
  transition: border-color .2s ease;
}
.menu-item:hover { border-color: var(--line); }
.menu-item .mi-emoji {
  width: 44px; height: 44px;
  background: var(--paper);
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 22px;
  flex-shrink: 0;
}
.menu-item .mi-info { flex: 1; min-width: 0; }
.menu-item .mi-info strong {
  display: block; font-size: 14px; font-weight: 600;
  font-family: var(--display);
  font-variation-settings: "opsz" 18;
}
.menu-item .mi-info small { font-size: 11px; color: var(--ink-mute); }
.menu-item .mi-price {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 13px;
  color: var(--red);
  margin-right: 8px;
}
.add-btn {
  width: 36px; height: 36px;
  background: var(--ink);
  color: var(--paper);
  border: none;
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
  display: grid; place-items: center;
  transition: transform .15s ease, background .2s ease;
}
.add-btn:hover { background: var(--red); transform: rotate(90deg); }

/* Order tracking */
.tracking {
  text-align: center;
  padding: 20px 0;
}
.tracking-icon {
  width: 80px; height: 80px;
  margin: 0 auto 16px;
  background: var(--red-soft);
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 36px;
  animation: pulse 2s ease infinite;
  position: relative;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200,16,46,.3); }
  50%      { box-shadow: 0 0 0 12px rgba(200,16,46,0); }
}
.tracking h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  margin: 0 0 4px;
}
.tracking p { color: var(--ink-soft); margin: 0 0 18px; font-size: 14px; }
.timeline {
  display: flex; gap: 0;
  margin: 20px 0;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 14px; left: 14px; right: 14px;
  height: 2px;
  background: var(--line);
}
.tl-step {
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 1;
}
.tl-dot {
  width: 28px; height: 28px;
  background: var(--paper);
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  margin: 0 auto 6px;
  display: grid; place-items: center;
  font-size: 12px;
  color: var(--ink-mute);
}
.tl-step.done .tl-dot {
  background: var(--sage);
  border-color: var(--sage);
  color: var(--paper);
}
.tl-step.active .tl-dot {
  background: var(--red);
  border-color: var(--red);
  color: var(--paper);
  animation: pulse 2s ease infinite;
}
.tl-label {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
}
.tl-step.done .tl-label, .tl-step.active .tl-label { color: var(--ink); font-weight: 600; }

/* ===================== DRAWER ===================== */
.drawer {
  position: fixed;
  top: 0; right: 0;
  width: 100%;
  max-width: 420px;
  height: 100vh;
  background: var(--paper);
  border-left: 1px solid var(--line);
  box-shadow: -20px 0 40px rgba(31,26,23,.2);
  z-index: 110;
  transform: translateX(100%);
  transition: transform .4s cubic-bezier(.3,1.1,.3,1);
  display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.drawer-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}
.drawer-head h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  margin: 0;
  letter-spacing: -0.02em;
}
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.drawer-foot {
  padding: 16px 20px max(16px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--cream);
}

.cart-line {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}
.cart-line:last-child { border-bottom: none; }
.cart-thumb {
  width: 44px; height: 44px;
  background: var(--cream-2);
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 22px;
}
.cart-info { flex: 1; min-width: 0; }
.cart-info strong { display: block; font-size: 14px; font-weight: 600; }
.cart-info small { font-size: 11px; color: var(--ink-mute); font-family: var(--mono); }
.qty {
  display: flex; align-items: center; gap: 4px;
  background: var(--cream-2);
  padding: 4px;
  border-radius: 100px;
}
.qty button {
  width: 24px; height: 24px;
  border: none;
  background: var(--paper);
  border-radius: 50%;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink);
  transition: background .15s ease;
}
.qty button:hover { background: var(--red); color: var(--paper); }
.qty span { font-family: var(--mono); font-size: 12px; min-width: 18px; text-align: center; font-weight: 600; }

.cart-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-mute);
}
.cart-empty .ce-art {
  width: 80px; height: 80px;
  background: var(--cream-2);
  border-radius: 50%;
  margin: 0 auto 14px;
  display: grid; place-items: center;
  font-size: 36px;
}
.cart-empty strong { display: block; font-family: var(--display); font-size: 18px; color: var(--ink); margin-bottom: 4px; }

.totals { display: grid; gap: 6px; margin-bottom: 12px; font-size: 13px; }
.totals > div { display: flex; justify-content: space-between; color: var(--ink-soft); }
.totals strong { font-family: var(--mono); font-weight: 600; color: var(--ink); }
.totals .grand {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
}
.totals .grand strong { color: var(--red); font-family: var(--display); font-weight: 700; font-size: 22px; }

/* ===================== TOAST ===================== */
.toast-stack {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex; flex-direction: column; gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  background: var(--ink);
  color: var(--paper);
  padding: 10px 18px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  display: flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow-2);
  animation: toastIn .4s cubic-bezier(.3,1.5,.4,1);
  white-space: nowrap;
  pointer-events: auto;
}
.toast.danger { background: var(--red); }
.toast.success { background: var(--sage); }
.toast.exit { animation: toastOut .3s ease forwards; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px) scale(.9); }
  to   { opacity: 1; transform: none; }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateY(20px) scale(.9); }
}

/* ===================== BOTTOM NAV ===================== */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 520px;
  display: flex;
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding: 6px 0 max(6px, env(safe-area-inset-bottom));
  z-index: 50;
  box-shadow: 0 -4px 20px rgba(31,26,23,.06);
}
.bnav {
  flex: 1;
  background: transparent;
  border: none;
  padding: 8px 4px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  color: var(--ink-mute);
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  position: relative;
  transition: color .2s ease;
}
.bnav-ico { font-size: 20px; line-height: 1; }
.bnav.active { color: var(--red); font-weight: 600; }
.bnav.active::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 30px; height: 3px;
  background: var(--red);
  border-radius: 0 0 4px 4px;
}
.bnav-badge {
  position: absolute;
  top: 4px; right: calc(50% - 22px);
  background: var(--red);
  color: var(--paper);
  font-size: 9px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 100px;
  display: grid; place-items: center;
  padding: 0 4px;
  border: 2px solid var(--paper);
}
.bnav-badge.hidden { display: none; }

/* ===================== INSTALL ART ===================== */
.install-art {
  width: 96px; height: 96px;
  margin: 0 auto 14px;
  background: var(--red);
  border-radius: 24px;
  display: grid; place-items: center;
  transform: rotate(-6deg);
  box-shadow: var(--shadow-3);
}
.install-mark {
  font-family: var(--display);
  font-weight: 800;
  font-style: italic;
  font-size: 56px;
  color: var(--paper);
  line-height: 1;
}
.install-art::after {
  content: ""; position: absolute;
  width: 14px; height: 14px;
  background: var(--mustard);
  border-radius: 50%;
  margin-top: -60px;
  margin-left: 40px;
  box-shadow: 0 0 0 3px var(--red);
}
.install-actions { display: flex; gap: 8px; margin-top: 18px; }
.install-actions .btn { flex: 1; }

/* ===================== SCROLLBARS ===================== */
*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 3px; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 360px) {
  .hero-title { font-size: 32px; }
  .quick-actions { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
  .quick { padding: 10px 8px; min-height: 84px; }
  .quick-label { font-size: 11px; }
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
