/* ArriviGo design system — mobile-first. Ink / warm paper / brass. */
:root {
  --ink: #101418;
  --ink-2: #2a323b;
  --paper: #faf8f4;
  --card: #ffffff;
  --line: #e7e2d8;
  --brass: #c9a557;
  --brass-deep: #a8853d;
  --green: #1fa97c;
  --red: #d5484a;
  --muted: #7a7f87;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(16,20,24,.05), 0 10px 30px rgba(16,20,24,.05);
  /* type scale */
  --fs-hero: clamp(28px, 7vw, 40px);
  --fs-h1: 24px;
  --fs-h2: 19px;
  --fs-body: 16px;
  --fs-sub: 14px;
  --fs-cap: 12.5px;
  --sp: 16px;
  --tabbar-h: 62px;
  --font-body: -apple-system, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-display: var(--font-body);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--paper); color: var(--ink);
  line-height: 1.55; font-size: var(--fs-body);
  padding-bottom: env(safe-area-inset-bottom);
}
body.has-tabbar { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 8px); }
h1, h2, .hero h1, .logo, .price-big, .price, .stat b, .cell b, .receipt .cell b { font-family: var(--font-display); }
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }

.wrap { max-width: 680px; margin: 0 auto; padding: 0 16px; }
.wrap.wide { max-width: 1080px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,248,244,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.logo { font-weight: 800; letter-spacing: .12em; font-size: 17px; display: flex; align-items: center; gap: 7px; }
.logo .tick { color: var(--brass); font-weight: 900; }
.nav-links { display: flex; gap: 14px; align-items: center; font-size: 14px; font-weight: 600; }
.nav-links a.cta { background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 999px; }

/* ---------- buttons / forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--ink); color: #fff; border: 0; cursor: pointer;
  font: inherit; font-weight: 700; font-size: 15px;
  padding: 13px 20px; border-radius: 12px; width: 100%;
}
.btn.brass { background: linear-gradient(135deg, var(--brass), var(--brass-deep)); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn.small { width: auto; padding: 10px 16px; min-height: 42px; font-size: 13px; border-radius: 10px; }
.btn.green { background: var(--green); }
.btn.danger { background: var(--red); }
.btn:active { transform: translateY(1px); }
label { display: block; font-size: 13px; font-weight: 700; margin: 14px 0 5px; color: var(--ink-2); }
input, select, textarea {
  width: 100%; font: inherit; font-size: 16px;
  padding: 12px 13px; border: 1.5px solid var(--line); border-radius: 11px;
  background: var(--card); color: var(--ink); outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--brass); }
textarea { min-height: 92px; resize: vertical; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
body.theme-daylight .card { border-color: transparent; }
.stack > * + * { margin-top: 14px; }
.muted { color: var(--muted); font-size: 13.5px; }
.pill { display: inline-block; font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: #eee9df; color: var(--ink-2); }
.pill.gold { background: #f4ead2; color: var(--brass-deep); }
.pill.green { background: #dcf3ea; color: #157a5a; }
.pill.red { background: #fbe2e2; color: #a53434; }
.pill.blue { background: #e3ecf7; color: #2b5d92; }

/* ---------- hero ---------- */
.hero { padding: 40px 0 26px; text-align: left; }
.hero h1 { font-size: clamp(30px, 7.5vw, 46px); line-height: 1.08; letter-spacing: -.02em; font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--brass-deep); }
.hero p.lead { margin-top: 12px; font-size: 17px; color: var(--ink-2); max-width: 34ch; }
.hero .btn { margin-top: 20px; }
.promo { margin-top: 26px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--ink); }
.promo video { width: 100%; aspect-ratio: 16/9; object-fit: cover; }

/* ---------- vertical grid ---------- */
.vgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 18px; }
.vcard {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 12px; display: flex; flex-direction: column; gap: 4px; min-height: 108px;
}
.vcard .ic { font-size: 24px; }
.vcard b { font-size: 14px; line-height: 1.25; }
.vcard span { font-size: 12px; color: var(--muted); line-height: 1.35; }
.vcard.lux { border-top: 3px solid var(--brass); }
.vcard.any { grid-column: 1 / -1; border-top: 3px solid var(--ink); background: linear-gradient(180deg, #fff, #fdf9f0); min-height: 0; }
@media (min-width: 760px) { .vgrid { grid-template-columns: repeat(3, 1fr); } .vcard.any { grid-column: 1 / -1; } }

/* ---------- steps ---------- */
.steps { counter-reset: s; margin-top: 8px; }
.steps li { list-style: none; display: flex; gap: 12px; padding: 10px 0; align-items: flex-start; }
.steps li::before {
  counter-increment: s; content: counter(s);
  min-width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800;
}

/* ---------- timeline ---------- */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding: 9px 0 9px 6px; }
.tl-item::before {
  content: ""; position: absolute; left: -21px; top: 15px;
  width: 12px; height: 12px; border-radius: 50%; background: var(--card); border: 2.5px solid var(--muted);
}
.tl-item.k-outreach_sent::before, .tl-item.k-question::before { border-color: var(--ink); }
.tl-item.k-reply::before { border-color: #2b5d92; }
.tl-item.k-quote::before { border-color: var(--brass); background: var(--brass); }
.tl-item.k-payment::before, .tl-item.k-booked::before, .tl-item.k-completed::before { border-color: var(--green); background: var(--green); }
.tl-item.k-escalation::before { border-color: var(--red); background: var(--red); }
.tl-item .t { font-size: 11.5px; color: var(--muted); }
.tl-item b { font-size: 14.5px; }
.tl-item .body { font-size: 13.5px; color: var(--ink-2); margin-top: 2px; white-space: pre-wrap; }
.tl-item .actor { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.tl-item .actor.assistant { color: var(--brass-deep); }
.tl-item .actor.supplier { color: #2b5d92; }
.tl-item .actor.iain { color: var(--red); }
.waiting { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13.5px; padding: 10px 0 0 6px; }
.dotpulse { display: inline-flex; gap: 3px; }
.dotpulse i { width: 6px; height: 6px; border-radius: 50%; background: var(--brass); animation: dp 1.2s infinite; }
.dotpulse i:nth-child(2) { animation-delay: .2s; } .dotpulse i:nth-child(3) { animation-delay: .4s; }
@keyframes dp { 0%,60%,100% { opacity: .25 } 30% { opacity: 1 } }

/* ---------- quotes ---------- */
.quote-card { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 14px; background: var(--card); display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.quote-card.best { border-color: var(--brass); background: #fffdf6; }
.quote-card .price { font-size: 20px; font-weight: 800; }
.quote-card .price small { font-size: 12px; color: var(--muted); font-weight: 600; }

/* ---------- stats receipt ---------- */
.receipt { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.receipt .cell { background: #f4f1e9; border-radius: 11px; padding: 10px 6px; }
.receipt .cell b { font-size: 19px; display: block; }
.receipt .cell span { font-size: 11px; color: var(--muted); }

/* ---------- tables (admin) ---------- */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; background: var(--card); border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: #f6f3ec; }
tr:last-child td { border-bottom: 0; }
.tablewrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- chat bubbles (admin takeover) ---------- */
.chat { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; }
.bub { max-width: 82%; padding: 9px 12px; border-radius: 14px; font-size: 13.5px; white-space: pre-wrap; }
.bub.out { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 4px; }
.bub.in { align-self: flex-start; background: #edeae2; border-bottom-left-radius: 4px; }
.bub .en { display: block; font-size: 11px; opacity: .7; margin-top: 4px; border-top: 1px dashed rgba(255,255,255,.25); padding-top: 3px; }
.bub.in .en { border-top-color: rgba(0,0,0,.15); }

/* ---------- misc ---------- */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.statgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 760px) { .statgrid { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.stat b { font-size: 22px; display: block; }
.stat span { font-size: 12px; color: var(--muted); }
.footer { margin: 48px 0 32px; text-align: center; color: var(--muted); font-size: 12.5px; }
.flash { background: #dcf3ea; color: #157a5a; padding: 10px 14px; border-radius: 11px; font-size: 14px; font-weight: 600; }
.section-t { margin: 26px 0 10px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.price-big { font-size: 34px; font-weight: 800; }
.price-big small { font-size: 14px; color: var(--muted); font-weight: 600; }
details summary { cursor: pointer; font-weight: 700; font-size: 14px; padding: 6px 0; }
.admin-nav { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0; font-size: 13px; font-weight: 700; }
.admin-nav a { padding: 7px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); white-space: nowrap; }
.admin-nav a.on { background: var(--ink); color: #fff; }

/* ================= Grab/Gojek-grade shell (v3) ================= */

/* branded header band the content curves out of */
.apphead {
  position: relative;
  background: linear-gradient(135deg, #14324a 0%, #0f2336 60%, #101822 100%);
  color: #fff; padding: 18px 0 46px;
}
body.theme-daylight .apphead { background: linear-gradient(135deg, #1c3a52, #122a3d); }
.apphead::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 26px;
  background: var(--paper); border-radius: 22px 22px 0 0;
}
.apphead .wrap { position: relative; z-index: 2; }
.apphead .ah-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.apphead .ah-logo { font-weight: 800; letter-spacing: .12em; font-size: 15px; color: #fff; }
.apphead .ah-set { color: rgba(255,255,255,.85); font-size: 22px; line-height: 1; }
.apphead .greet { font-size: 13px; color: rgba(255,255,255,.7); font-weight: 600; }
@media (max-width: 899px) { .nav:has(+ .apphead) { display: none; } }
@media (min-width: 900px) {
  .apphead { border-radius: var(--radius); margin-top: 14px; padding: 22px 0 40px; }
  .apphead .ah-top { display: none; }   /* top nav already shows the brand on desktop */
  .apphead::after { border-radius: 22px 22px 0 0; }
}
.apphead .greet b { color: #fff; }
.apphead h1 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; color: #fff; }
.apphead .brasstip { color: var(--brass); }

/* the ask pill — overlaps the header edge like Grab's search bar */
.ask-pill {
  position: relative; z-index: 3; margin: 14px 0 -30px;
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border-radius: 16px; padding: 15px 18px;
  box-shadow: 0 10px 30px rgba(16,24,38,.16); cursor: pointer;
  font-size: 16px; color: var(--muted); font-weight: 600; border: 0;
}
.ask-pill .lead-ic { font-size: 19px; }
.ask-pill .mic {
  margin-left: auto; width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 17px;
  background: linear-gradient(135deg, var(--brass), var(--brass-deep));
}
.ask-pill:active { transform: scale(.99); }

/* signature service grid — 4 across, crisp icon tiles */
.svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px 2px; margin: 6px 0; }
@media (min-width: 620px) { .svc-grid { grid-template-columns: repeat(6, 1fr); gap: 10px 4px; } }
.svc {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 10px 2px; text-decoration: none; color: var(--ink);
}
.svc .tile {
  width: 58px; height: 58px; border-radius: 17px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(16,24,38,.10); background: #eef1f5;
}
.svc .tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.svc .tile .emo { font-size: 27px; }   /* fallback before icons render */
.svc .lbl { font-size: 11.5px; font-weight: 600; line-height: 1.2; text-align: center; color: var(--ink-2); max-width: 72px; }
.svc:active .tile { transform: scale(.94); }
.svc .tile, .svc:active .tile { transition: transform .12s; }

/* promo / feature banner */
.promo-band {
  display: flex; align-items: center; gap: 14px; border-radius: 18px; padding: 16px 18px;
  background: linear-gradient(120deg, #241f12, #3a2f16); color: #fff; box-shadow: var(--shadow);
}
body.theme-daylight .promo-band { background: linear-gradient(120deg, #14324a, #1c4a68); }
.promo-band .pb-ic { font-size: 30px; }
.promo-band b { font-size: 15.5px; display: block; }
.promo-band span { font-size: 12.5px; color: rgba(255,255,255,.78); }

/* section label — tighter, Grab-like */
.sec { display: flex; justify-content: space-between; align-items: baseline; margin: 22px 2px 10px; }
.sec h2 { font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.sec a { font-size: 12.5px; font-weight: 700; color: var(--brass-deep); }

.desktop-only { display: none !important; }
.mobile-only { display: inline-flex; }
@media (min-width: 900px) {
  .desktop-only { display: contents !important; }
  .mobile-only { display: none !important; }
}


/* bottom tab bar — the app's spine on mobile */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  display: flex; align-items: stretch; justify-content: space-around;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--card); /* fallback for no color-mix support */
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; font-size: 10.5px; font-weight: 700; color: var(--muted); letter-spacing: .01em;
}
.tabbar a .ti { font-size: 21px; line-height: 1; }
.tabbar a.on { color: var(--ink); }
.tabbar a.on .ti { transform: scale(1.06); }
.tabbar a.ask-tab .ti {
  width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brass), var(--brass-deep)); color: #171207;
  font-size: 22px; margin-top: -18px; box-shadow: 0 6px 18px rgba(201,165,87,.45);
  border: 3px solid var(--paper);
}
@media (min-width: 900px) { .tabbar { display: none; } body.has-tabbar { padding-bottom: 0; } }

/* the one big ask box — the app's front door */
.askbox {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 999px;
  padding: 15px 20px; box-shadow: var(--shadow); cursor: pointer;
  font-size: 16.5px; color: var(--muted); font-weight: 600;
}
.askbox .mic { margin-left: auto; font-size: 20px; color: var(--brass-deep); }
.askbox:active { transform: scale(.995); }

/* page headers */
.page-h { padding: 22px 0 12px; }
.page-h h1 { font-size: var(--fs-h1); letter-spacing: -.015em; }
.page-h .sub { color: var(--muted); font-size: var(--fs-sub); margin-top: 3px; }

/* ---------- stepped wizard ---------- */
.stepper { display: flex; gap: 6px; margin: 14px 0 18px; }
.stepper i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.stepper i.on { background: var(--brass); }
.wstep { display: none; }
.wstep.on { display: block; animation: stepin .25s ease; }
@keyframes stepin { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.wizard-foot {
  position: sticky; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 24px);
  display: flex; gap: 10px; margin-top: 18px; z-index: 85;
  padding-top: 10px;
  background: linear-gradient(transparent, var(--paper) 45%);
}
@media (min-width: 900px) { .wizard-foot { bottom: 12px; } }
.wizard-foot .btn.back { width: auto; padding-inline: 18px; }
.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .choice-grid { grid-template-columns: repeat(3, 1fr); } }
.choice {
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 16px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 5px;
  font-weight: 700; font-size: 14.5px; line-height: 1.3; min-height: 86px;
}
.choice .ic { font-size: 26px; }
.choice small { font-weight: 500; color: var(--muted); font-size: 12px; line-height: 1.35; }
.choice.sel { border-color: var(--brass); background: color-mix(in srgb, var(--brass) 7%, var(--card)); }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg button {
  font: inherit; font-weight: 700; font-size: 14px; cursor: pointer;
  padding: 11px 16px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--card); color: var(--ink);
}
.seg button.sel { border-color: var(--brass); background: color-mix(in srgb, var(--brass) 10%, var(--card)); }

/* ---------- trip tracker (request page) ---------- */
.tracker { display: flex; align-items: flex-start; margin: 16px 0 4px; }
.tracker .tstep { flex: 1; text-align: center; position: relative; font-size: 11px; font-weight: 700; color: var(--muted); }
.tracker .tstep::before {
  content: ""; display: block; width: 12px; height: 12px; border-radius: 50%;
  background: var(--line); margin: 0 auto 6px; position: relative; z-index: 2;
  border: 2.5px solid var(--paper);
}
.tracker .tstep::after {
  content: ""; position: absolute; top: 5px; left: -50%; width: 100%; height: 3px;
  background: var(--line); z-index: 1;
}
.tracker .tstep:first-child::after { display: none; }
.tracker .tstep.done { color: var(--green); }
.tracker .tstep.done::before, .tracker .tstep.done::after { background: var(--green); }
.tracker .tstep.on { color: var(--ink); }
.tracker .tstep.on::before { background: var(--brass); box-shadow: 0 0 0 5px color-mix(in srgb, var(--brass) 25%, transparent); }
.tracker .tstep.on::after { background: var(--green); }

/* trips list */
.trip-card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.trip-bar { height: 5px; border-radius: 3px; background: var(--line); margin-top: 12px; overflow: hidden; }
.trip-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--green), var(--brass)); }
.trip-next { margin-top: 9px; font-size: 13.5px; font-weight: 700; color: var(--brass-deep); }

/* simple tabs */
.tabs { display: flex; gap: 6px; background: var(--line); border-radius: 999px; padding: 4px; margin-bottom: 12px; }
.tabs button {
  flex: 1; font: inherit; font-weight: 700; font-size: 13.5px; cursor: pointer;
  padding: 12px 0; min-height: 44px; border: 0; border-radius: 999px; background: transparent; color: var(--muted);
}
.tabs button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 4px rgba(16,20,24,.12); }
.tabpane { display: none; }
.tabpane.on { display: block; }

/* ---------- one-payment value band ---------- */
.onepay-band { border-left: 3px solid var(--brass); }
.onepay-badge { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .02em; padding: 5px 11px; border-radius: 999px; background: #f4ead2; color: var(--brass-deep); }
body.dark .onepay-badge { background: #2e2716; color: var(--brass); }

/* ---------- themes ---------- */
.hero-photo {
  background-size: cover; background-position: center right;
  border-bottom: 1px solid var(--line);
}
.hero-on-photo { padding: 72px 0 64px; max-width: 560px; }
.hero-on-photo h1 { text-shadow: 0 1px 24px rgba(0,0,0,.12); }
@media (min-width: 900px) { .hero-on-photo { padding: 120px 0 96px; } }
body.dark .nav { background: rgba(12,15,19,.9); }
body.dark .nav-links a.cta { background: linear-gradient(135deg, var(--brass), var(--brass-deep)); color: #171207; }
body.dark .btn { background: #232a32; color: var(--ink); }
body.dark .btn.brass { background: linear-gradient(135deg, var(--brass), var(--brass-deep)); color: #171207; }
body.dark .btn.ghost { border-color: var(--line); color: var(--ink); background: transparent; }
body.dark .btn.green { background: var(--green); color: #06130e; }
body.dark .vcard.any { background: linear-gradient(180deg, var(--card), #1a1712); }
body.dark .receipt .cell { background: #1a2026; }
body.dark .bub.in, body.dark .chatbox .bub.assistant { background: #232a32; color: var(--ink); }
body.dark input, body.dark select, body.dark textarea { background: #10151a; color: var(--ink); border-color: var(--line); }
body.dark .serp-title { color: #8ab4f8; }
body.dark .serp-url { color: #57bb8a; }
body.dark .pill { background: #232a32; color: var(--ink-2); }
body.dark .pill.gold { background: #2e2716; color: var(--brass); }
body.dark .pill.green { background: #16352c; color: #57bb8a; }
body.dark .pill.red { background: #3a2022; color: #e08a8c; }
body.dark .pill.blue { background: #1c2a3a; color: #8ab4f8; }
body.theme-midnight .section-t { color: var(--brass); }
/* dark fixes for v2 components + chat (from UX review) */
body.dark .btn.danger { background: var(--red); color: #fff; }
body.dark .bub.out, body.dark .chatbox .bub.user { background: #2a3440; color: var(--ink); border-bottom-right-radius: 4px; }
body.dark .bub.out .en { border-top-color: rgba(255,255,255,.15); }
body.dark .quote-card.best { background: #241f12; }
body.dark .serp-bar { background: #232a32; color: var(--ink); }
body.dark .tabs { background: #10151a; }
body.dark .tabs button.on { background: #232a32; color: var(--ink); box-shadow: none; }
body.dark .steps li::before { background: #2a3440; color: var(--ink); }
body.dark th { background: #161c22; color: var(--muted); }
body.dark .flash { background: #16352c; color: #57bb8a; }
body.dark .admin-nav a.on { background: var(--brass); color: #171207; }
body.dark .choice.sel, body.dark .seg button.sel { background: #241f12; }
body.theme-midnight .luxband {
  background-image: linear-gradient(rgba(12,15,19,.55), rgba(12,15,19,.75)), var(--band-img, none);
  background-size: cover; border-radius: var(--radius); padding: 14px; margin: 0 -14px;
}

/* ---------- supplier search (SERP look) ---------- */
.serp-box { position: relative; }
.serp-box input { padding-left: 42px; border-radius: 999px; box-shadow: var(--shadow); border-color: var(--card); }
.serp-box input:focus { border-color: var(--brass); }
.serp-glass { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 18px; }
.serp-result { display: flex; gap: 10px; padding: 12px 6px; border-bottom: 1px solid var(--line); }
.serp-check { padding-top: 4px; }
.serp-check input { width: 18px; height: 18px; accent-color: var(--brass-deep); }
.serp-url { font-size: 12px; color: #1a7a4f; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.serp-title { font-size: 18px; color: #1a0dab; font-weight: 500; line-height: 1.25; margin: 1px 0; }
.serp-title:hover { text-decoration: underline; cursor: pointer; }
.serp-snippet { font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.serp-stars { color: #e7711b; font-weight: 700; }
.serp-bar {
  position: sticky; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px); margin-top: 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--ink); color: #fff; border-radius: 999px; padding: 10px 10px 10px 18px;
  font-size: 14px; font-weight: 700; box-shadow: 0 8px 30px rgba(16,20,24,.35);
}
.serp-bar .btn { width: auto; }

/* ---------- chat widgets (mission chat + helpdesk) ---------- */
.chatbox { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; padding: 4px 0; }
.chatbox .bub.user { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 4px; }
.chatbox .bub.assistant { align-self: flex-start; background: #f0ece2; color: var(--ink); border-bottom-left-radius: 4px; }
.chat-input { display: flex; gap: 6px; margin-top: 8px; }
.chat-input input { flex: 1; }
.chat-input .btn { width: auto; }
.help-fab {
  position: fixed; right: 16px; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 14px); z-index: 90;
  width: 54px; height: 54px; border-radius: 50%; border: 0; cursor: pointer;
  background: linear-gradient(135deg, var(--brass), var(--brass-deep)); color: #fff;
  font-size: 24px; box-shadow: 0 8px 24px rgba(16,20,24,.3);
}
@media (min-width: 900px) { .help-fab { bottom: 16px; } }
.help-panel {
  position: fixed; right: 12px; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 78px); z-index: 91;
  width: min(360px, calc(100vw - 24px));
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 16px 48px rgba(16,20,24,.28); padding: 14px; display: none;
}
.help-panel.open { display: block; }
@media (min-width: 900px) { .help-panel { bottom: 80px; } }
.typing { font-size: 12px; color: var(--muted); padding: 2px 6px; display: none; }

/* Ari proactive add-on chips */
.chip.suggest {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 13px; border-radius: 999px; cursor: pointer;
  background: linear-gradient(135deg, rgba(201,165,87,.14), rgba(201,165,87,.06));
  border: 1.5px solid var(--brass); color: var(--brass-deep);
  font-weight: 650; font-size: 13.5px; line-height: 1;
}
.chip.suggest:hover { background: var(--brass); color: #fff; }

/* ===== WhatsApp-style mission chat (.wa scope) ===== */
.wa { display:flex; flex-direction:column; }
.wa-head {
  display:flex; align-items:center; gap:10px; padding:9px 12px; margin:-2px -2px 0;
  background:#075e54; color:#fff; border-radius:12px 12px 0 0;
}
.wa-av { width:38px; height:38px; border-radius:50%; background:#25d366; color:#083c34;
  display:flex; align-items:center; justify-content:center; font-weight:800; font-size:17px; flex-shrink:0; }
.wa-name { font-weight:650; font-size:15px; line-height:1.1; }
.wa-status { font-size:11.5px; opacity:.85; display:flex; align-items:center; gap:5px; }
.wa-dot { width:7px; height:7px; border-radius:50%; background:#8ef5b0; display:inline-block; }
.wa-icon { background:none; border:none; font-size:18px; cursor:pointer; padding:6px; color:inherit; opacity:.9; }
.wa-head .wa-icon { color:#fff; }

/* wallpaper */
.wa .chatbox {
  background-color:#e5ddd5;
  background-image:
    radial-gradient(rgba(0,0,0,.035) 1px, transparent 1px),
    radial-gradient(rgba(0,0,0,.03) 1px, transparent 1px);
  background-size:22px 22px, 34px 34px;
  background-position:0 0, 11px 17px;
  padding:12px 10px; gap:3px; border-radius:0; min-height:300px;
}
.wa .bub {
  position:relative; max-width:80%; padding:6px 9px 5px; border-radius:8px; font-size:14px;
  line-height:1.35; box-shadow:0 1px .5px rgba(0,0,0,.13); margin-bottom:2px; white-space:normal;
}
.wa .bub .wa-text { white-space:pre-wrap; }
.wa .bub.assistant, .wa .bub.in { align-self:flex-start; background:#fff; color:#111b21; border-top-left-radius:2px; }
.wa .bub.user, .wa .bub.out { align-self:flex-end; background:#d9fdd3; color:#111b21; border-top-right-radius:2px; }
/* little tail */
.wa .bub.assistant::before, .wa .bub.in::before {
  content:""; position:absolute; top:0; left:-7px; border:7px solid transparent;
  border-top-color:#fff; border-right:0;
}
.wa .bub.user::before, .wa .bub.out::before {
  content:""; position:absolute; top:0; right:-7px; border:7px solid transparent;
  border-top-color:#d9fdd3; border-left:0;
}
.wa-meta { float:right; font-size:10.5px; color:#667781; margin:6px 0 -2px 8px; user-select:none; white-space:nowrap; }
.wa-tick { color:#53bdeb; margin-left:3px; font-size:11px; }
.wa .chat-input { background:#f0f0f0; border-radius:0 0 12px 12px; padding:8px; gap:6px; align-items:center; margin:0 -2px -2px; }
.wa .chat-input input { border-radius:22px; background:#fff; border:none; }
.wa-send { width:42px; height:42px; border-radius:50%; border:none; background:#075e54; color:#fff;
  font-size:17px; cursor:pointer; flex-shrink:0; }
.wa .typing { padding:4px 12px; font-size:12px; color:#075e54; }
/* dark theme */
body.dark .wa .chatbox { background-color:#0b141a; background-image:radial-gradient(rgba(255,255,255,.03) 1px,transparent 1px),radial-gradient(rgba(255,255,255,.025) 1px,transparent 1px); }
body.dark .wa .bub.assistant, body.dark .wa .bub.in { background:#202c33; color:#e9edef; }
body.dark .wa .bub.assistant::before, body.dark .wa .bub.in::before { border-top-color:#202c33; }
body.dark .wa .bub.user, body.dark .wa .bub.out { background:#005c4b; color:#e9edef; }
body.dark .wa .bub.user::before, body.dark .wa .bub.out::before { border-top-color:#005c4b; }
body.dark .wa-meta { color:#8696a0; }
body.dark .wa .chat-input { background:#1f2c34; }
body.dark .wa .chat-input input { background:#2a3942; color:#e9edef; }
