/* ============================================================
   Sales Companion — oil & lubricants · web-simulated iOS demo
   Light iOS system UI · orange + amber · powered by Abeille
   ============================================================ */

:root {
  --brand:       #e8590c;         /* brand orange */
  --brand-dk:    #b8450a;
  --brand-dker:  #6b2805;
  --tint:        #b84a0b;         /* interactive orange (legible on white) */
  --tint-2:      #f97316;
  --accent:      #fbbf24;         /* accent amber */
  --accent-dk:   #f59e0b;
  --sky:         #fdba74;         /* soft secondary for glows */
  --yellow:      #ffe600;         /* semantic: favourites, prospects, ideas */
  --yellow-dk:   #f5c400;

  --bg-grouped:  #f6f4f1;         /* systemGroupedBackground w/ warm cast */
  --bg-elevated: #ffffff;
  --fill-quaternary: rgba(132,124,116,.08);
  --separator:   rgba(84,70,56,.18);
  --separator-opaque: #ebe5de;

  --label:       #1c1712;
  --label-2:     rgba(66,54,42,.6);
  --label-3:     rgba(66,54,42,.34);

  --red:         #e5484d;
  --steel:       #3178b8;

  --nav-h: 44px;
  --tab-h: 64px;

  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display',
          'Helvetica Neue', 'Segoe UI', Roboto, system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  color: var(--label);
  background: #d9d2ca;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font-family: inherit; cursor: pointer; }
/* no text selection in the app chrome; form fields stay editable/selectable */
html, body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea, select { -webkit-user-select: text; user-select: text; }

/* ---------- Desktop stage + device frame ---------- */
.stage {
  height: 100%; display: grid; place-items: center;
  background:
    radial-gradient(1000px 700px at 50% -10%, #fff0e0, transparent 60%),
    linear-gradient(160deg, #ede8e2, #d8cfc5);
  padding: 24px;
}
.device {
  position: relative;
  width: 390px; height: 844px;
  background: var(--bg-grouped);
  border-radius: 55px;
  box-shadow:
    0 0 0 13px #1a1a1c,
    0 0 0 15px #2c2c2e,
    0 40px 90px -20px rgba(0,0,0,.55);
  overflow: hidden;
  isolation: isolate;                 /* forces a stacking context so the blur is clipped */
  display: flex; flex-direction: column;
}

@media (max-width: 480px) {
  .stage { padding: 0; }
  .device { width: 100vw; height: 100dvh; border-radius: 0; box-shadow: none; }
}

/* ---------- Status bar ---------- */
.statusbar {
  height: 54px; flex-shrink: 0; position: relative; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; padding-top: 12px;
  font-weight: 600; font-size: 15px; color: var(--label);
}
.sb-island {
  position: absolute; top: 11px; left: 50%; transform: translateX(-50%);
  width: 118px; height: 33px; background: #000; border-radius: 20px;
}
.sb-time { font-variant-numeric: tabular-nums; letter-spacing: .3px; }
.sb-right { display: flex; align-items: center; gap: 6px; }
.sb-ico { fill: var(--label); }
.sb-batt {
  width: 24px; height: 12px; border: 1px solid rgba(0,0,0,.35); border-radius: 3px;
  position: relative; display: inline-block; padding: 1.5px;
}
.sb-batt::after { content:''; position:absolute; right:-3px; top:3.5px; width:2px; height:5px; background:rgba(0,0,0,.35); border-radius:0 2px 2px 0; }
.sb-batt-fill { display:block; width:100%; height:100%; background: var(--label); border-radius: 1.5px; }

/* ---------- Screen host (nav stack) ---------- */
.screen-host { position: relative; flex: 1; overflow: hidden; }
.screen {
  position: absolute; inset: 0; background: var(--bg-grouped);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--tab-h) + 24px);
  transition: transform .4s cubic-bezier(.32,.72,0,1), opacity .3s ease;
  will-change: transform;
}
.screen::-webkit-scrollbar { display: none; }
.screen.push-enter { transform: translateX(100%); box-shadow: -8px 0 24px rgba(0,0,0,.12); }
.screen.push-active { transform: translateX(0); box-shadow: -8px 0 24px rgba(0,0,0,.12); }
.screen.push-behind { transform: translateX(-25%); }
.screen.push-behind::after {
  content:''; position:absolute; inset:0; background:rgba(0,0,0,.06); pointer-events:none;
}
.screen.fade-swap { animation: fadeSwap .28s ease; }
@keyframes fadeSwap { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.screen.plain { background: var(--bg-elevated); }

/* ---------- Nav bars ---------- */
.nav-large { padding: 4px 20px 6px; }
.nav-large h1 {
  font-size: 27px; font-weight: 800; letter-spacing: .37px; color: var(--label);
  line-height: 1.1;
}
.nav-large .nav-sub { font-size: 15px; color: var(--label-2); margin-top: 2px; }
.home-head { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.brand-favicon {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  box-shadow: 0 2px 8px -2px rgba(0,0,0,.25), 0 0 0 3px rgba(251,191,36,.35);
}

.nav-bar {
  position: sticky; top: 0; z-index: 20;
  height: var(--nav-h); display: flex; align-items: center; gap: 4px;
  padding: 0 8px;
  background: rgba(251,249,246,.82); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: .5px solid var(--separator);
}
.nav-back {
  display: flex; align-items: center; gap: 3px; background: none; border: 0;
  color: var(--tint); font-size: 17px; padding: 6px 8px;
}
.nav-back svg { width: 12px; height: 20px; }
.nav-title {
  position: absolute; left: 50%; transform: translateX(-50%);
  font-size: 17px; font-weight: 600; color: var(--label);
  max-width: 55%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav-action { margin-left: auto; background: none; border: 0; color: var(--tint); padding: 6px 10px; display: flex; align-items: center; }
.nav-action svg { width: 22px; height: 22px; }

/* ---------- Search bar ---------- */
.searchbar { padding: 8px 16px 6px; }
.searchbar .field {
  display: flex; align-items: center; gap: 6px;
  background: rgba(90,74,58,.10); border-radius: 10px; padding: 8px 10px;
  color: var(--label-2);
}
.searchbar .field svg { width: 16px; height: 16px; fill: var(--label-2); flex-shrink: 0; }
.searchbar input {
  flex: 1; border: 0; background: none; outline: none; font-size: 17px; color: var(--label);
}
.searchbar input::placeholder { color: var(--label-2); }

/* ---------- Country filter chips ---------- */
.chip-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px 6px; scroll-snap-type: x proximity; }
.chip-scroll::-webkit-scrollbar { display: none; }
.fchip {
  flex: 0 0 auto; scroll-snap-align: start; white-space: nowrap;
  background: var(--bg-elevated); border: .5px solid var(--separator); color: var(--label);
  border-radius: 100px; padding: 8px 14px; font-size: 14px; font-weight: 500;
  transition: all .15s;
}
.fchip.on { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 4px 12px -4px rgba(232,89,12,.5); }
.filter-note {
  font-size: 12.5px; color: var(--label-2); padding: 6px 20px 2px;
}

/* ---------- Grouped lists ---------- */
.group-title {
  font-size: 13px; font-weight: 400; text-transform: uppercase; letter-spacing: .5px;
  color: var(--label-2); padding: 18px 20px 6px;
}
.group-title.fav { color: var(--tint); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.group-title.fav svg { width: 13px; height: 13px; fill: var(--tint); }

.inset {
  background: var(--bg-elevated); margin: 0 16px; border-radius: 12px; overflow: hidden;
  border: .5px solid var(--separator);
}
.cell {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 11px 16px; background: none; border: 0; text-align: left;
  position: relative; min-height: 56px;
  transition: background .12s;
}
.cell:active { background: rgba(0,0,0,.04); }
.cell + .cell::before {
  content: ''; position: absolute; top: 0; left: 60px; right: 0; height: .5px; background: var(--separator);
}
.cell .avatar-sm {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff;
  background: linear-gradient(135deg, var(--tint-2), var(--brand-dk));
}
.cell .avatar-sm svg { width: 20px; height: 20px; }
.cell .avatar-sm.flag { background: linear-gradient(135deg,#f8f3ec,#ebe0d3); font-size: 20px; }
.cell .cell-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cell .cell-title { display: block; font-size: 17px; color: var(--label); font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell .cell-sub { display: block; font-size: 13px; color: var(--label-2); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell .star {
  width: 34px; height: 34px; border: 0; background: none; color: var(--label-3);
  display: grid; place-items: center; flex-shrink: 0;
}
.cell .star.on { color: var(--yellow-dk); }
.cell .star svg { width: 21px; height: 21px; }
.cell .chevron { color: var(--label-3); flex-shrink: 0; }
.cell .chevron svg { width: 8px; height: 14px; }

/* category tint on avatars */
.cat-Automotive { background: linear-gradient(135deg,#fb923c,#c2410c) !important; }
.cat-Heavy-duty { background: linear-gradient(135deg,#57534e,#292524) !important; }
.cat-Industrial { background: linear-gradient(135deg,#64748b,#1e293b) !important; }
.cat-Specialty { background: linear-gradient(135deg,#eab308,#a16207) !important; }
.cat-Services { background: linear-gradient(135deg,#22a35a,#166534) !important; }

.mini-offer {
  font-size: 12px; font-weight: 700; color: var(--brand-dk);
  background: rgba(232,89,12,.12); border-radius: 100px; padding: 3px 8px; flex-shrink: 0; white-space: nowrap;
}
.status-dot {
  font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 100px; flex-shrink: 0;
}
.status-dot.active { color: var(--brand-dk); background: rgba(232,89,12,.14); }
.status-dot.at-risk { color: #b23a3f; background: rgba(229,72,77,.14); }
.status-dot.prospect { color: #9a6b00; background: rgba(245,196,0,.2); }
.status-dot.big { display: inline-block; margin-top: 6px; font-size: 12px; }

.empty-note { text-align: center; color: var(--label-2); padding: 40px; font-size: 15px; }

/* ---------- HOME ---------- */
.home-hero {
  margin: 8px 16px 4px; border-radius: 18px; overflow: hidden; position: relative;
  background: linear-gradient(150deg, #d9530b, #b8450a 60%, #6b2805);
  padding: 22px 20px; color: #fff;
}
.home-hero .hero-badge { position: absolute; right: -14px; top: -12px; opacity: .9; transform: rotate(6deg); }
.home-hero .hero-badge .hero-mark { width: 120px; height: 120px; }
.home-hero h2 { font-size: 24px; font-weight: 800; letter-spacing: -.4px; line-height: 1.12; position: relative; }
.home-hero h2 em { color: var(--accent); font-style: normal; }
.home-hero p { font-size: 14px; color: rgba(255,255,255,.85); margin-top: 8px; max-width: 26ch; position: relative; }

/* Abeille ask pill */
.ask-shell { position: relative; margin: 14px 16px 4px; border-radius: 100px; }
.ask-shell::before {
  content:''; position:absolute; inset:-5px; border-radius:inherit; z-index:0;
  background: conic-gradient(from 0deg, var(--brand), var(--sky), var(--accent), var(--tint-2), var(--brand));
  filter: blur(11px); opacity:.45; animation: glowBreathe 3.2s ease-in-out infinite;
}
@keyframes glowBreathe { 0%,100% { opacity:.3; filter: blur(9px); } 50% { opacity:.65; filter: blur(14px); } }
.ask-bar {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 10px;
  background: #fff; border-radius: 100px; padding: 7px 7px 7px 10px;
  box-shadow: 0 4px 14px -6px rgba(0,0,0,.18);
}
.ask-orb {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: conic-gradient(from 0deg, var(--brand), var(--sky), var(--accent), var(--tint-2), var(--brand));
  box-shadow: 0 0 0 3px rgba(232,89,12,.16);
  animation: orbFloat 3.6s ease-in-out infinite;
}
.ask-orb i { width: 11px; height: 11px; border-radius: 50%; background: radial-gradient(circle at 35% 32%, #fff, transparent 70%); animation: orbPulse 2.2s ease-in-out infinite; }
@keyframes orbFloat { 0%,100%{transform:translateY(0) scale(1);} 50%{transform:translateY(-1px) scale(1.05);} }
@keyframes orbPulse { 0%,100%{opacity:.8;transform:scale(.85);} 50%{opacity:1;transform:scale(1.1);} }
.ask-bar input { flex: 1; border: 0; outline: none; background: none; font-size: 16px; color: var(--label); }
.ask-bar input::placeholder { color: var(--label-2); }
.ask-mic, .ask-send {
  width: 36px; height: 36px; border-radius: 50%; border: 0; flex-shrink: 0;
  display: grid; place-items: center; background: rgba(90,74,58,.10); color: var(--label-2);
}
.ask-send { background: var(--brand); color: #fff; }
.ask-mic svg, .ask-send svg { width: 17px; height: 17px; }
.ask-shell.listening .ask-orb { animation: orbListen 1s ease-in-out infinite; }
@keyframes orbListen { 0%,100%{box-shadow:0 0 0 3px rgba(232,89,12,.25);} 50%{box-shadow:0 0 0 4px rgba(232,89,12,.3), 0 0 0 12px rgba(232,89,12,0);} }

/* news list */
.news-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 16px; }
.news-cell .ntag {
  font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
  padding: 3px 8px; border-radius: 100px;
}
.ntag.amber { color: #9a6b00; background: rgba(245,196,0,.24); }
.ntag.steel { color: #24547f; background: rgba(49,120,184,.14); }
.ntag.green { color: var(--brand-dk); background: rgba(232,89,12,.14); }
.news-cell .news-title { font-size: 16px; font-weight: 600; line-height: 1.3; color: var(--label); }
.news-cell .news-meta { font-size: 12px; color: var(--label-2); }

/* horizontal cards */
.h-scroll { display: flex; gap: 12px; overflow-x: auto; padding: 4px 16px 8px; scroll-snap-type: x mandatory; }
.h-scroll::-webkit-scrollbar { display: none; }
.top-card {
  flex: 0 0 150px; scroll-snap-align: start; background: var(--bg-elevated);
  border-radius: 14px; padding: 14px; border: .5px solid var(--separator); text-align: left;
}
.top-card .tc-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: rgba(232,89,12,.12); color: var(--brand-dk); margin-bottom: 10px; }
.top-card .tc-ico svg { width: 20px; height: 20px; }
.top-card .tc-flag { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: rgba(90,74,58,.08); font-size: 22px; margin-bottom: 10px; }
.top-card .tc-name { display: block; font-size: 15px; font-weight: 600; line-height: 1.25; }
.top-card .tc-meta { font-size: 12px; color: var(--label-2); margin-top: 4px; }

.home-foot { display: flex; justify-content: center; padding: 22px 16px 8px; }
.powered { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--label-2); }
.powered b { color: var(--brand-dk); font-weight: 700; }
.powered .powered-logo { width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0; }

.cell-price { color: var(--brand-dk); font-weight: 700; }

/* Prepare a visit CTA */
.prep-shell { margin: 12px 16px 2px; }
.prep-btn {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left;
  background: var(--bg-elevated); border: .5px solid var(--separator); border-radius: 16px;
  padding: 14px 16px; box-shadow: 0 6px 16px -10px rgba(0,0,0,.2);
}
.prep-btn:active { filter: brightness(.98); }
.prep-btn .prep-ico {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0; display: grid; place-items: center;
  background: linear-gradient(150deg, var(--accent), var(--accent-dk)); color: var(--brand-dker);
}
.prep-btn .prep-ico svg { width: 22px; height: 22px; }
.prep-btn .prep-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.prep-btn .prep-title { font-size: 16px; font-weight: 700; color: var(--label); }
.prep-btn .prep-sub { font-size: 12.5px; color: var(--label-2); margin-top: 1px; }

/* Abeille visit briefing */
.ai-brief { margin: 0 16px; background: var(--bg-elevated); border: .5px solid var(--separator); border-radius: 16px; overflow: hidden; }
.ai-brief-head {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  font-size: 13px; font-weight: 700; color: var(--brand-dk);
  background: linear-gradient(100deg, rgba(232,89,12,.12), rgba(251,191,36,.06));
  border-bottom: .5px solid var(--separator); text-transform: uppercase; letter-spacing: .3px;
}
.ai-brief-head .ai-orb {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: conic-gradient(from 0deg, var(--brand), var(--sky), var(--accent), var(--tint-2), var(--brand));
}
.ai-brief-head .ai-orb i { width: 8px; height: 8px; border-radius: 50%; background: radial-gradient(circle at 35% 32%, #fff, transparent 70%); }
.ai-brief-body { padding: 14px 16px; font-size: 14px; line-height: 1.5; color: var(--label); }
.ai-brief-body b { font-weight: 700; }
.ai-brief-body ul { margin: 4px 0 0; padding-left: 18px; }
.ai-brief-body li { margin-bottom: 8px; }
.ai-brief-body li:last-child { margin-bottom: 0; }

/* ---------- COMPETITORS ---------- */
.comp-intro { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--label-2); padding: 12px 20px 2px; line-height: 1.4; }
.comp-intro svg { width: 18px; height: 18px; stroke: var(--label-2); flex-shrink: 0; margin-top: 1px; }
.avatar-sm.comp, .avatar-lg.comp { color: #fff; font-weight: 800; letter-spacing: .2px; }
.avatar-sm.comp { font-size: 13px; }
.avatar-lg.comp { border-radius: 26px; }
.avatar-lg.comp .comp-mark { font-size: 26px; font-weight: 800; color: #fff; }
.comp-steel { background: linear-gradient(135deg,#4a90d9,#2a5e94) !important; }
.comp-amber { background: linear-gradient(135deg,#f5c400,#d99a00) !important; }
.comp-red { background: linear-gradient(135deg,#f2686c,#d13a3f) !important; }
.comp-green { background: linear-gradient(135deg,#2fb56a,#006f51) !important; }
.comp-magenta { background: linear-gradient(135deg,#e5007e,#a3005a) !important; }
.comp-violet { background: linear-gradient(135deg,#8b5cf6,#5b21b6) !important; }
.mini-offer.neutral { color: var(--label-2); background: rgba(90,74,58,.1); }
.feat-check.up { background: rgba(232,89,12,.14); color: var(--brand-dk); }
.feat-check.down { background: rgba(245,196,0,.22); color: #9a6b00; }
.offer-cell.watch {
  background: linear-gradient(100deg, rgba(229,72,77,.12), rgba(245,196,0,.08));
  border-color: rgba(229,72,77,.35);
}
.offer-cell.watch .watch-ico { flex-shrink: 0; color: #d13a3f; }
.offer-cell.watch .watch-ico svg { width: 24px; height: 24px; }

/* ---------- PRODUCT DETAIL ---------- */
.detail-hero { padding: 8px 20px 18px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.avatar-lg {
  width: 96px; height: 96px; border-radius: 26px; position: relative; margin-bottom: 14px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--tint-2), var(--brand-dk));
  box-shadow: 0 14px 30px -12px rgba(184,69,10,.6);
}
.avatar-lg .pico svg { width: 46px; height: 46px; color: #fff; }
.avatar-lg.flag { border-radius: 50%; background: linear-gradient(135deg,#f8f3ec,#e6d8c8); }
.avatar-lg.flag span { font-size: 44px; }
.detail-hero .eyebrow { font-size: 13px; color: var(--tint); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.detail-hero h1 { font-size: 26px; font-weight: 800; letter-spacing: -.4px; margin: 4px 0 8px; }
.detail-hero .desc { font-size: 15px; color: var(--label-2); line-height: 1.5; max-width: 34ch; }

.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 4px 16px 6px; }
.metric {
  background: var(--bg-elevated); border-radius: 14px; padding: 14px 16px; border: .5px solid var(--separator);
}
.metric .k { font-size: 12px; color: var(--label-2); text-transform: uppercase; letter-spacing: .3px; }
.metric .v { font-size: 22px; font-weight: 700; margin-top: 3px; color: var(--label); }
.metric .v.small { font-size: 16px; }

.flag-wrap { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 16px 6px; }
.flag-pill { font-size: 13px; background: var(--bg-elevated); border: .5px solid var(--separator); border-radius: 100px; padding: 6px 12px; }

.offer-cell {
  margin: 10px 16px 6px; border-radius: 14px; padding: 14px 16px;
  background: linear-gradient(100deg, rgba(232,89,12,.16), rgba(251,191,36,.08));
  border: .5px solid rgba(232,89,12,.4); display: flex; align-items: center; gap: 12px;
}
.offer-cell .pct { font-size: 22px; font-weight: 800; white-space: nowrap; color: var(--brand-dk); }
.offer-cell .ot { font-size: 13px; color: var(--label-2); flex: 1; }
.offer-cell .ot b { color: var(--label); }
.offer-cell .details { font-size: 13px; color: var(--tint); font-weight: 700; }

.feat-cell { min-height: 48px; }
.feat-check { width: 26px; height: 26px; border-radius: 50%; background: rgba(232,89,12,.14); color: var(--brand-dk); display: grid; place-items: center; flex-shrink: 0; }
.feat-check svg { width: 15px; height: 15px; }

/* action buttons */
.actions { padding: 12px 16px 0; display: flex; flex-direction: column; gap: 10px; }
.act-primary { display: grid; grid-template-columns: 1fr; gap: 10px; }
.btn-fill {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--brand); color: #fff; border: 0; border-radius: 14px;
  padding: 15px; font-size: 17px; font-weight: 600;
  box-shadow: 0 8px 18px -8px rgba(232,89,12,.6);
}
.btn-fill.big { width: 100%; }
.btn-fill.danger { background: var(--red); box-shadow: 0 8px 18px -8px rgba(229,72,77,.6); }
.btn-fill:active { filter: brightness(.95); }
.btn-fill svg { width: 20px; height: 20px; }
.btn-tinted {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: rgba(184,74,11,.12); color: var(--tint); border: 0; border-radius: 14px;
  padding: 14px; font-size: 16px; font-weight: 600;
}
.btn-tinted:active { filter: brightness(.96); }
.btn-tinted svg { width: 19px; height: 19px; }
.act-secondary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 13px; color: var(--label); background: rgba(90,74,58,.10); border-radius: 100px; padding: 6px 12px; }

/* ---------- CLIENT DETAIL ---------- */
.client-card {
  margin: 8px 16px 4px; background: var(--bg-elevated); border-radius: 18px;
  border: .5px solid var(--separator); padding: 18px;
}
.client-top { display: flex; align-items: center; gap: 14px; }
.client-card .avatar-lg { width: 66px; height: 66px; margin: 0; }
.client-card .avatar-lg span { font-size: 32px; }
.client-id h1 { font-size: 22px; font-weight: 800; line-height: 1.1; }
.client-id .eyebrow { font-size: 12.5px; color: var(--label-2); margin-top: 2px; text-transform: none; letter-spacing: 0; }
.client-card .bm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; margin-top: 16px; padding-top: 16px; border-top: .5px solid var(--separator); }
.client-card .bm .k { font-size: 11px; color: var(--label-2); text-transform: uppercase; letter-spacing: .3px; }
.client-card .bm .v { font-size: 14px; font-weight: 500; margin-top: 2px; }

.terms-inset { padding: 4px 0; }
.term-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; position: relative; }
.term-row + .term-row::before { content:''; position:absolute; top:0; left:16px; right:16px; height:.5px; background: var(--separator); }
.term-row.col { flex-direction: column; align-items: flex-start; gap: 8px; }
.term-row .tk { font-size: 14px; color: var(--label-2); }
.term-row .tv { font-size: 16px; font-weight: 600; }
.term-row .tv.gold { color: var(--brand-dk); }
.term-prods { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-prod { font-size: 12px; background: rgba(232,89,12,.1); color: var(--brand-dk); border-radius: 8px; padding: 4px 9px; font-weight: 500; }

/* interactions timeline */
.timeline { margin: 0 16px; padding: 4px 0; }
.tl-item { display: flex; gap: 12px; padding: 4px 0 14px; position: relative; }
.tl-item::before { content:''; position:absolute; left: 6px; top: 16px; bottom: -4px; width: 2px; background: var(--separator); }
.tl-item:last-child::before { display: none; }
.tl-dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; margin-top: 3px; z-index: 1; border: 3px solid var(--bg-grouped); }
.tl-dot.meeting { background: var(--brand); }
.tl-dot.call { background: var(--steel); }
.tl-dot.email { background: var(--yellow-dk); }
.tl-body { flex: 1; background: var(--bg-elevated); border: .5px solid var(--separator); border-radius: 12px; padding: 10px 13px; }
.tl-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.tl-type { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--tint); }
.tl-date { font-size: 12px; color: var(--label-2); }
.tl-note { font-size: 13.5px; line-height: 1.4; color: var(--label); }

/* ---------- OFFER SIMULATOR ---------- */
.offer-block {
  margin: 12px 16px 0; background: var(--bg-elevated); border-radius: 16px;
  border: .5px solid var(--separator); padding: 16px;
}
.thermo-block { padding-bottom: 18px; }
.ob-label { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--label-2); font-weight: 600; }
.ob-row { display: flex; align-items: center; justify-content: space-between; }
.ob-val { font-size: 20px; font-weight: 800; color: var(--brand-dk); font-variant-numeric: tabular-nums; }

.select-field { position: relative; margin-top: 8px; }
.select-field select {
  width: 100%; appearance: none; -webkit-appearance: none; border: .5px solid var(--separator);
  background: var(--bg-grouped); border-radius: 12px; padding: 12px 36px 12px 14px;
  font-size: 16px; color: var(--label); font-family: inherit; outline: none;
}
.sel-chevron { position: absolute; right: 14px; top: 50%; transform: translateY(-50%) rotate(90deg); color: var(--label-3); pointer-events: none; }
.sel-chevron svg { width: 8px; height: 14px; }
.client-hint { display: none; font-size: 13px; color: var(--label-2); margin-top: 10px; padding: 8px 12px; background: rgba(232,89,12,.07); border-radius: 10px; }
.client-hint b { color: var(--brand-dk); }

.svc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.svc-tile {
  display: flex; align-items: center; gap: 8px; text-align: left;
  background: var(--bg-grouped); border: 1.5px solid transparent; border-radius: 12px; padding: 10px;
  color: var(--label); position: relative; transition: all .15s;
}
.svc-tile .svc-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: rgba(90,74,58,.08); color: var(--label-2); flex-shrink: 0; }
.svc-tile .svc-ico svg { width: 17px; height: 17px; }
.svc-tile .svc-name { font-size: 12.5px; font-weight: 500; line-height: 1.2; }
.svc-tile .svc-check { position: absolute; top: 8px; right: 8px; width: 16px; height: 16px; opacity: 0; color: var(--brand); }
.svc-tile.on { background: rgba(232,89,12,.08); border-color: var(--brand); }
.svc-tile.on .svc-ico { background: var(--brand); color: #fff; }
.svc-tile.on .svc-check { opacity: 1; }

/* slider */
.slider { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 100px; margin: 16px 0 8px; background: rgba(90,74,58,.14); outline: none; }
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 2px 8px rgba(0,0,0,.25); cursor: pointer; }
.slider::-moz-range-thumb { width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 2px 8px rgba(0,0,0,.25); cursor: pointer; }
.slider-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--label-2); }

/* thermometer */
.thermo { margin-top: 14px; }
.thermo-track { position: relative; height: 14px; border-radius: 100px; background: linear-gradient(90deg, #94a3b8, #2f9e6e 40%, #fbbf24 66%, #f97316 84%, #e5484d); overflow: visible; }
.thermo-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 100px; background: rgba(255,255,255,.55); mix-blend-mode: overlay; width: 40%; transition: width .2s ease; }
.thermo-avg { position: absolute; top: -4px; bottom: -4px; width: 2px; background: rgba(33,26,20,.5); }
.thermo-marker { position: absolute; top: 50%; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid var(--brand-dk); transform: translate(-50%,-50%); box-shadow: 0 2px 8px rgba(0,0,0,.25); transition: left .2s ease; }
.thermo-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--label-2); margin-top: 10px; }
.thermo-verdict { margin-top: 12px; font-size: 13.5px; font-weight: 600; line-height: 1.4; padding: 10px 12px; border-radius: 10px; }
.thermo-verdict.cool { color: #475569; background: rgba(100,116,139,.12); }
.thermo-verdict.mid { color: var(--brand-dk); background: rgba(232,89,12,.1); }
.thermo-verdict.warm { color: #9a6b00; background: rgba(245,196,0,.16); }
.thermo-verdict.hot { color: #b23a3f; background: rgba(229,72,77,.12); }
.thermo-fill.cool { background: rgba(100,116,139,.15); }
.thermo-marker { border-color: var(--brand-dk); }

.cta-sub { display: flex; justify-content: center; margin-top: 12px; }

/* ---------- Tab bar ---------- */
.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 25;
  height: calc(var(--tab-h) + 20px); padding-bottom: 20px;
  display: flex; align-items: stretch;
  background: rgba(251,249,246,.85); backdrop-filter: saturate(180%) blur(22px);
  border-radius: 0 0 55px 55px;       /* match phone corners; fallback if the blur layer escapes clipping */
  border-top: .5px solid var(--separator);
}
.tabbar-item {
  flex: 1; background: none; border: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px; color: #978d82; padding-top: 8px;
}
.tabbar-item.active { color: var(--brand); }
.tabbar-item { padding-left: 2px; padding-right: 2px; }
.tabbar-ico { width: 26px; height: 26px; display: grid; place-items: center; }
.tabbar-ico svg { width: 25px; height: 25px; }
.tabbar-label { font-size: 9.5px; font-weight: 500; letter-spacing: 0; white-space: nowrap; }

/* ---------- Field-report FAB ---------- */
.field-fab {
  position: absolute; right: 16px; bottom: calc(var(--tab-h) + 34px); z-index: 45;
  width: 60px; height: 60px; border-radius: 50%; border: 0;
  background: transparent; isolation: isolate;
  color: var(--brand-dker); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  box-shadow: 0 10px 24px -6px rgba(0,0,0,.35), 0 0 0 4px rgba(251,191,36,.25);
  animation: fabPulse 3s ease-in-out infinite;
}
.field-fab:active { transform: scale(.94); }
/* button face + animated halo behind it (negative z-index keeps both under the icon/label) */
.field-fab::after { content:''; position:absolute; inset:0; border-radius:50%; z-index:-1; background: linear-gradient(150deg, var(--accent), var(--accent-dk)); }
.field-fab::before {
  content:''; position:absolute; inset:-12px; border-radius:50%; z-index:-2; pointer-events:none;
  background: conic-gradient(from 0deg, var(--accent), var(--sky), var(--brand), var(--accent-dk), var(--accent));
  filter: blur(12px); animation: fabHalo 2.6s ease-in-out infinite;
}
@keyframes fabHalo { 0%,100% { opacity:.35; transform: scale(.9); } 50% { opacity:.8; transform: scale(1.15); } }
.fab-ico svg { width: 24px; height: 24px; }
.fab-label { font-size: 8.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .2px; line-height: 1.05; text-align: center; }
@keyframes fabPulse { 0%,100%{ box-shadow: 0 10px 24px -6px rgba(0,0,0,.35), 0 0 0 4px rgba(251,191,36,.25);} 50%{ box-shadow: 0 10px 24px -6px rgba(0,0,0,.35), 0 0 0 10px rgba(251,191,36,0);} }

.home-indicator {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%);
  width: 140px; height: 5px; border-radius: 3px; background: #000; z-index: 40; opacity: .85;
}

/* ---------- Bottom sheet ---------- */
.sheet-scrim {
  position: absolute; inset: 0; background: rgba(0,0,0,.4); z-index: 50;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.sheet-scrim.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 51;
  height: 88%; background: var(--bg-elevated);
  border-radius: 16px 16px 0 0; transform: translateY(100%);
  transition: transform .42s cubic-bezier(.32,.72,0,1);
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 -10px 40px rgba(0,0,0,.2);
}
.sheet.open { transform: translateY(0); }
.sheet.report-sheet { height: auto; max-height: 78%; }
.sheet-grabber { width: 40px; height: 5px; border-radius: 3px; background: rgba(66,54,42,.28); margin: 8px auto 4px; flex-shrink: 0; }
.sheet-head {
  display: flex; align-items: center; padding: 6px 16px 12px; border-bottom: .5px solid var(--separator);
}
.sheet-head h3 { font-size: 17px; font-weight: 600; flex: 1; text-align: center; }
.sheet-head .sheet-close { background: rgba(90,74,58,.1); border: 0; color: var(--label-2); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; }
.sheet-head .sheet-close svg { width: 15px; height: 15px; }
.sheet-body { flex: 1; overflow-y: auto; padding: 16px; background: var(--bg-grouped); }
.sheet-body::-webkit-scrollbar { display: none; }

.msg { display: flex; margin-bottom: 10px; }
.msg .b { max-width: 80%; padding: 9px 14px; border-radius: 20px; font-size: 15px; line-height: 1.4; }
.msg.user { justify-content: flex-end; }
.msg.user .b { background: var(--brand); color: #fff; border-bottom-right-radius: 6px; }
.msg.bot .b { background: var(--bg-elevated); color: var(--label); border: .5px solid var(--separator); border-bottom-left-radius: 6px; }
.msg.bot .b.muted { color: var(--label-2); font-size: 13px; }
.msg .b b { font-weight: 700; }
.typing span { display:inline-block; width:7px; height:7px; border-radius:50%; background: var(--label-3); margin:0 2px; animation: blink 1.2s infinite; }
.typing span:nth-child(2){animation-delay:.2s;} .typing span:nth-child(3){animation-delay:.4s;}
@keyframes blink { 0%,80%,100%{opacity:.25;} 40%{opacity:1;} }

.hist-cell { background: var(--bg-elevated); border-radius: 12px; padding: 13px 15px; margin-bottom: 8px; border: .5px solid var(--separator); }
.hist-cell .q { font-size: 15px; }
.hist-cell .when { font-size: 12px; color: var(--label-2); margin-top: 4px; }

.sheet-foot { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: .5px solid var(--separator); background: var(--bg-elevated); }
.sheet-foot input { flex: 1; border: .5px solid var(--separator); border-radius: 100px; padding: 9px 14px; font-size: 15px; outline: none; }
.sheet-foot button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.sheet-foot button svg { width: 16px; height: 16px; }

/* ---------- Field report sheet ---------- */
.report-intro { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--label-2); padding: 4px 4px 14px; }
.report-intro svg { width: 20px; height: 20px; color: var(--brand); flex-shrink: 0; }
.report-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.report-tile {
  background: var(--bg-elevated); border: .5px solid var(--separator); border-radius: 16px;
  padding: 16px 8px; display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: transform .12s;
}
.report-tile:active { transform: scale(.94); }
.report-tile .rt-ico { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.report-tile .rt-ico svg { width: 26px; height: 26px; }
.report-tile .rt-name { font-size: 12px; font-weight: 600; line-height: 1.2; color: var(--label); text-align: center; }
.report-tile.amber .rt-ico { background: linear-gradient(150deg,#ffd21e,#e0a400); }
.report-tile.red .rt-ico { background: linear-gradient(150deg,#f2686c,#d13a3f); }
.report-tile.green .rt-ico { background: linear-gradient(150deg,#2fb56a,#009f4d); }
.report-tile.yellow .rt-ico { background: linear-gradient(150deg,#ffe600,#f5c400); color: var(--brand-dker); }
.report-tile.steel .rt-ico { background: linear-gradient(150deg,#4a90d9,#2a5e94); }

.report-form { display: flex; flex-direction: column; gap: 14px; }
.rf-head { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; color: #fff; }
.rf-head.amber { background: linear-gradient(150deg,#ffd21e,#e0a400); color: var(--brand-dker); }
.rf-head.red { background: linear-gradient(150deg,#f2686c,#d13a3f); }
.rf-head.green { background: linear-gradient(150deg,#2fb56a,#009f4d); }
.rf-head.yellow { background: linear-gradient(150deg,#ffe600,#f5c400); color: var(--brand-dker); }
.rf-head.steel { background: linear-gradient(150deg,#4a90d9,#2a5e94); }
.rf-head .rt-ico { width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; }
.rf-head .rt-ico svg { width: 26px; height: 26px; }
.rf-title { font-size: 17px; font-weight: 700; }
.rf-hint { font-size: 12.5px; opacity: .9; margin-top: 2px; }
.rf-field label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--label-2); font-weight: 600; margin-bottom: 6px; }
.rf-field select, .rf-field textarea {
  width: 100%; border: .5px solid var(--separator); background: var(--bg-elevated); border-radius: 12px;
  padding: 12px 14px; font-size: 15px; font-family: inherit; color: var(--label); outline: none; resize: none;
}
.rf-actions { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.rf-field input[type="text"] {
  width: 100%; border: .5px solid var(--separator); background: var(--bg-elevated); border-radius: 12px;
  padding: 12px 14px; font-size: 15px; font-family: inherit; color: var(--label); outline: none;
}
.rf-optional { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--label-3); }
.rf-ticket-note {
  display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--tint); font-weight: 500;
  background: rgba(184,74,11,.08); border: .5px solid rgba(184,74,11,.2); border-radius: 12px; padding: 11px 13px;
}
.rf-ticket-note svg { width: 18px; height: 18px; stroke: var(--tint); flex-shrink: 0; }

/* iOS toast */
.ios-toast {
  position: absolute; left: 50%; bottom: calc(var(--tab-h) + 44px); transform: translateX(-50%) translateY(10px);
  background: rgba(33,26,20,.94); color: #fff; font-size: 14px; font-weight: 500;
  padding: 10px 18px; border-radius: 100px; z-index: 60; opacity: 0; transition: all .28s;
  backdrop-filter: blur(10px); white-space: nowrap; max-width: 80%;
}
.ios-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* theme overrides: keep "good" states green so they don't read as warnings on an orange brand */
.status-dot.active { color: #1f7a54; background: rgba(47,158,110,.14); }
.thermo-verdict.mid { color: #1f7a54; background: rgba(47,158,110,.12); }
