@font-face { font-family: "Roboto"; src: url("../assets/fonts/Roboto.ttf") format("truetype"); font-weight: 100 900; font-stretch: 75% 100%; font-display: swap; }
:root {
  --bg: #F5F3EE; --ink: #1F2329; --blue: #1D4E9E; --navy: #0F2A55; --light: #DCE6F2; --pale: #EDF2F8;
  --grey: #5B6270; --mute: #8A909B; --line: #D5D9E0; --gold: #E0B04A; --white: #fff; --ok: #1E7A4C; --okbg: #E3F3EA; --warn: #8A5A00; --warnbg: #FBF1D9;
  --r: 14px; --shadow: 0 1px 2px rgba(15,42,85,.06), 0 6px 20px rgba(15,42,85,.07);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; line-height: 1.4; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- shared bits ---------- */
.demo-strip { background: var(--navy); color: #DDE6F3; font-size: 11.5px; letter-spacing: .02em; padding: 7px 14px; text-align: center; }
.demo-strip b { color: var(--gold); letter-spacing: .12em; }
.brand { display: flex; align-items: baseline; gap: 8px; text-decoration: none; color: var(--ink); }
.brand .logo { font-weight: 800; font-size: 22px; letter-spacing: .02em; }
.brand .by { font-size: 12px; color: var(--blue); font-weight: 600; }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 10px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.pill.demo { background: var(--warnbg); color: var(--warn); border: 1px solid #EBD39A; }
.pill.blue { background: var(--pale); color: var(--blue); }
.pill.ok { background: var(--okbg); color: var(--ok); }
.pill.gold { background: #FBF1D9; color: #7A5500; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--blue); }
.btn { border: 0; border-radius: 12px; padding: 13px 18px; font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .06s, background .15s; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover { background: #173F82; }
.btn.navy { background: var(--navy); color: #fff; }
.btn.ghost { background: #fff; color: var(--blue); border: 1.5px solid var(--blue); }
.btn.soft { background: var(--pale); color: var(--blue); }
.btn.small { padding: 8px 12px; font-size: 13px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.card { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); }
.foot { color: var(--mute); font-size: 11.5px; text-align: center; padding: 18px 16px 28px; }
.foot b { color: var(--blue); letter-spacing: .1em; }

/* ---------- shopper (phone-first) ---------- */
.app { max-width: 480px; margin: 0 auto; padding-bottom: 104px; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--bg); position: sticky; top: 0; z-index: 20; border-bottom: 1px solid rgba(213,217,224,.6); }
.hero { position: relative; margin: 12px 16px 0; border-radius: var(--r); overflow: hidden; aspect-ratio: 16 / 10; background: #E9E6DF; box-shadow: var(--shadow); }
.hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero .scanned { position: absolute; left: 10px; bottom: 10px; background: rgba(255,255,255,.95); border-radius: 10px; padding: 6px 10px; font-size: 12px; font-weight: 600; display: flex; gap: 6px; align-items: center; }
.hero .scanned::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #2DB36B; box-shadow: 0 0 0 3px rgba(45,179,107,.2); }
.head { padding: 16px 18px 4px; }
.head h1 { margin: 6px 0 4px; font-size: 24px; line-height: 1.15; letter-spacing: -.01em; }
.head .meta { color: var(--grey); font-size: 13px; }
.tagline { font-weight: 700; color: var(--navy); font-size: 13px; margin-top: 8px; }
.tagline span { color: var(--blue); }

.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px 16px 4px; }
.fit-banner { margin: 12px 16px 0; padding: 12px 14px; border-radius: 12px; background: var(--pale); border: 1px solid var(--light); font-size: 13.5px; display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.fit-banner b { color: var(--navy); }
.fit-banner .links { display: flex; gap: 6px; flex-shrink: 0; }
.notice { margin: 10px 16px 0; padding: 10px 12px; border-radius: 10px; background: var(--warnbg); color: var(--warn); font-size: 13px; }

.section-title { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 18px 8px; }
.section-title h2 { font-size: 16px; margin: 0; }
.section-title small { color: var(--mute); font-size: 12px; }
.items { margin: 0 16px; padding: 4px 0; }
.cat { padding: 12px 16px 4px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); font-weight: 700; }
.row { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 16px; border-top: 1px solid #EEF0F3; align-items: center; }
.cat + .row { border-top: 0; }
.row .nm { font-weight: 600; font-size: 14.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.row .sp { color: var(--grey); font-size: 12.5px; grid-column: 1; }
.row .pr { font-weight: 700; font-size: 14.5px; text-align: right; grid-row: 1; grid-column: 2; font-variant-numeric: tabular-nums; }
.row .sw { grid-column: 2; grid-row: 2; justify-self: end; }
.swap-btn { background: none; border: 1px solid var(--light); color: var(--blue); border-radius: 8px; font-size: 12px; font-weight: 700; padding: 3px 9px; }
.tag { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; border-radius: 6px; padding: 2px 6px; }
.tag.swapped { background: #FBF1D9; color: #7A5500; }
.tag.fitted { background: var(--pale); color: var(--blue); }
.dot { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); display: inline-block; flex-shrink: 0; }

.totals { margin: 14px 16px 0; padding: 16px; }
.totals .line { display: flex; justify-content: space-between; font-size: 14px; color: var(--grey); padding: 3px 0; }
.totals .big { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; }
.totals .big b { font-size: 28px; color: var(--blue); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.disclaimer { font-size: 11.5px; color: var(--mute); margin-top: 8px; }

.bottombar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(255,255,255,.97); backdrop-filter: blur(8px); border-top: 1px solid var(--line); }
.bottombar .inner { max-width: 480px; margin: 0 auto; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 12px; }
.bottombar .t small { display: block; font-size: 11px; color: var(--mute); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.bottombar .t b { font-size: 22px; color: var(--ink); font-variant-numeric: tabular-nums; }
.bottombar .btn { flex: 1; }
.flash { animation: flash .6s ease; }
@keyframes flash { 0% { color: var(--gold); } 100% { color: inherit; } }

/* bottom sheet */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; background: rgba(15,42,85,.45); display: none; align-items: flex-end; justify-content: center; }
.sheet-wrap.open { display: flex; }
.sheet { background: var(--bg); width: 100%; max-width: 480px; max-height: 92vh; overflow: auto; border-radius: 20px 20px 0 0; padding: 8px 18px calc(22px + env(safe-area-inset-bottom)); animation: up .22s ease; }
@keyframes up { from { transform: translateY(40px); opacity: .3; } to { transform: none; opacity: 1; } }
.sheet .grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 4px auto 10px; }
.sheet h3 { margin: 4px 0 4px; font-size: 20px; }
.sheet p.sub { margin: 0 0 14px; color: var(--grey); font-size: 13.5px; }
.sheet .close { float: right; background: none; border: 0; font-size: 26px; line-height: 1; color: var(--mute); padding: 2px 4px; }
.field { display: block; margin-bottom: 12px; }
.field span { display: block; font-size: 12.5px; font-weight: 700; color: var(--grey); margin-bottom: 5px; }
.field input, .field select { width: 100%; border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 13px 14px; font-size: 16px; }
.field input:focus, .field select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29,78,158,.15); }
.field .hint { font-size: 12px; color: var(--mute); margin-top: 4px; }
.field.err input { border-color: #C0392B; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg { display: inline-flex; background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: 3px; margin-bottom: 12px; }
.seg button { border: 0; background: none; padding: 6px 14px; border-radius: 7px; font-weight: 700; font-size: 13px; color: var(--grey); }
.seg button.on { background: var(--navy); color: #fff; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--grey); margin: 4px 0 14px; }
.check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--blue); flex-shrink: 0; }

.opt { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.opt.on { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29,78,158,.12); }
.opt[disabled] { opacity: .5; background: #F7F7F7; cursor: not-allowed; }
.opt .o-nm { font-weight: 600; font-size: 14.5px; }
.opt .o-sub { font-size: 12px; color: var(--grey); }
.opt .o-pr { margin-left: auto; text-align: right; font-weight: 700; font-size: 14px; white-space: nowrap; }
.opt .o-pr small { display: block; font-weight: 600; font-size: 12px; }
.up { color: #B4471F; } .down { color: var(--ok); }
.radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); flex-shrink: 0; position: relative; }
.opt.on .radio { border-color: var(--blue); }
.opt.on .radio::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--blue); }

/* before / after */
.ba-tot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; background: #fff; border-radius: 14px; padding: 14px; box-shadow: var(--shadow); margin-bottom: 12px; }
.ba-tot .col small { display: block; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); font-weight: 700; }
.ba-tot .col b { font-size: 20px; font-variant-numeric: tabular-nums; }
.ba-tot .col.after b { color: var(--blue); }
.ba-tot .col.after { text-align: right; }
.ba-tot .arrow { color: var(--gold); font-size: 22px; font-weight: 800; }
.ba-tot .delta { grid-column: 1 / -1; text-align: center; font-size: 13px; font-weight: 700; border-top: 1px solid #EEF0F3; padding-top: 8px; }
.ba-dims { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; font-size: 12.5px; }
.ba-dims div { background: #fff; border-radius: 10px; padding: 8px 10px; border: 1px solid var(--line); }
.ba-dims div b { display: block; font-size: 13.5px; }
.ba-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; font-size: 13px; box-shadow: var(--shadow); }
.ba-table th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--mute); padding: 9px 10px; background: #FAFAF8; }
.ba-table td { padding: 9px 10px; border-top: 1px solid #EEF0F3; vertical-align: top; }
.ba-table td.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ba-table tr.chg td { background: #FFFBF0; }
.ba-table .q { color: var(--mute); font-size: 11.5px; display: block; }
.notes { margin: 12px 0; padding: 0; list-style: none; }
.notes li { position: relative; padding: 6px 0 6px 22px; font-size: 13px; color: var(--ink); }
.notes li::before { content: "✓"; position: absolute; left: 2px; top: 6px; color: var(--blue); font-weight: 800; }
.sticky-actions { position: sticky; bottom: -22px; background: var(--bg); padding: 12px 0 2px; display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }

.done { text-align: center; padding: 10px 4px; }
.done .tick { width: 64px; height: 64px; border-radius: 50%; background: var(--okbg); color: var(--ok); display: grid; place-items: center; font-size: 32px; margin: 8px auto 10px; font-weight: 800; }
.done .code { display: inline-block; background: #fff; border: 1.5px dashed var(--blue); border-radius: 10px; padding: 6px 14px; font-weight: 800; letter-spacing: .08em; color: var(--navy); margin: 8px 0; }
.next { text-align: left; background: #fff; border-radius: 12px; padding: 12px 14px; margin: 12px 0; font-size: 13.5px; }
.next ol { margin: 6px 0 0; padding-left: 20px; } .next li { margin: 4px 0; }
.toast { position: fixed; left: 50%; top: 64px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 13.5px; z-index: 60; opacity: 0; transition: opacity .2s; pointer-events: none; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; }

/* ---------- dashboard (desktop-first, responsive) ---------- */
.dash { max-width: 1280px; margin: 0 auto; padding: 0 28px 40px; }
.dash-top { display: flex; justify-content: space-between; align-items: center; padding: 18px 0 8px; gap: 16px; flex-wrap: wrap; }
.dash-top .right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dash h1 { font-size: 28px; margin: 4px 0 2px; letter-spacing: -.01em; }
.dash .lede { color: var(--grey); font-size: 14px; margin: 0 0 18px; }
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { padding: 16px 18px; }
.kpi small { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); font-weight: 700; }
.kpi b { display: block; font-size: 28px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 12.5px; color: var(--grey); }
.kpi.navy { background: var(--navy); color: #fff; }
.kpi.navy small { color: var(--gold); } .kpi.navy span { color: #AFC3E0; }
.dgrid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 18px; margin-bottom: 18px; align-items: start; }
.panel { padding: 18px 20px; }
.panel h2 { font-size: 16px; margin: 0 0 2px; }
.panel .ph { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.panel .ph small { color: var(--mute); font-size: 12.5px; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); padding: 8px 10px; border-bottom: 1px solid var(--line); font-weight: 700; white-space: nowrap; }
table.t td { padding: 11px 10px; border-bottom: 1px solid #EEF0F3; vertical-align: top; }
table.t td.n, table.t th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.t tr.cur td { background: #FAFBFD; }
table.t .s { color: var(--grey); font-size: 12px; display: block; }
.bar { height: 6px; background: var(--pale); border-radius: 6px; overflow: hidden; margin-top: 5px; width: 90px; margin-left: auto; }
.bar i { display: block; height: 100%; background: var(--blue); }
.insight { background: linear-gradient(160deg, #0F2A55, #1D4E9E); color: #fff; padding: 20px; }
.insight .eyebrow { color: var(--gold); }
.insight h3 { margin: 8px 0 6px; font-size: 19px; line-height: 1.25; }
.insight p { color: #D6E1F2; font-size: 13.5px; margin: 0 0 12px; }
.insight .meter { background: rgba(255,255,255,.15); border-radius: 8px; height: 10px; overflow: hidden; margin: 8px 0 4px; }
.insight .meter i { display: block; height: 100%; background: var(--gold); }
.insight .cta { background: var(--gold); color: var(--navy); }
.insight .alt { font-size: 12.5px; color: #C8D6EC; margin-top: 10px; }
.insight .alt ul { margin: 4px 0 0; padding-left: 18px; }
.history { font-size: 12.5px; color: var(--grey); margin-top: 14px; }
.history div { padding: 4px 0; border-top: 1px dashed var(--line); }
.leads td .nm { font-weight: 700; }
.swaps { display: flex; flex-wrap: wrap; gap: 4px; }
.swaps span { background: #FBF1D9; color: #6B4A00; font-size: 11.5px; padding: 2px 7px; border-radius: 6px; }
.status { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.status.new { background: var(--pale); color: var(--blue); }
.status.contacted { background: #EEE9FA; color: #5B3FA8; }
.status.sold { background: var(--okbg); color: var(--ok); }
.lead-detail td { background: #FBFAF7; }
.lead-detail .li { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; font-size: 12.5px; max-width: 640px; }
.lead-detail .li div:nth-child(even) { text-align: right; font-variant-numeric: tabular-nums; }
.linkbtn { background: none; border: 0; color: var(--blue); font-weight: 700; font-size: 12.5px; padding: 0; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters button { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 700; color: var(--grey); }
.filters button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.modal-wrap { position: fixed; inset: 0; background: rgba(15,42,85,.45); display: none; align-items: center; justify-content: center; z-index: 80; padding: 16px; }
.modal-wrap.open { display: flex; }
.modal { background: var(--bg); border-radius: 18px; max-width: 460px; width: 100%; padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal h3 { margin: 0 0 6px; font-size: 20px; }
.modal p { color: var(--grey); font-size: 13.5px; margin: 0 0 14px; }
.credit { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 13.5px; margin-bottom: 14px; }
.credit b { color: var(--navy); }
.modal .row2 { display: flex; gap: 10px; justify-content: flex-end; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(3, 1fr); } .dgrid { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .dash { padding: 0 14px 30px; } .kpis { grid-template-columns: 1fr 1fr; } .kpi b { font-size: 22px; }
  .tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; } table.t { min-width: 720px; }
}
.dgrid > *, .panel, .tablewrap { min-width: 0; }
.tablewrap { overflow-x: auto; }
@media (max-width: 640px) { .kpis .kpi.navy { grid-column: span 2; } }
