@font-face { font-family:"Bricolage Grotesque"; src:url("/assets/fonts/bricolage-var.woff2") format("woff2"); font-weight:400 800; font-display:swap; }
@font-face { font-family:"Space Mono"; src:url("/assets/fonts/space-mono-400.woff2") format("woff2"); font-weight:400; font-display:swap; }

.estimate-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:16px; }
.estimate-actions:empty { display:none; }
.estimate-editor { margin-top:20px; }
.estimate-field { display:grid; gap:6px; margin-top:14px; font-size:13px; font-weight:600; }
.estimate-editor textarea { width:100%; min-height:86px; padding:10px; border:1px solid #a9b6c6; border-radius:8px; font-size:16px; font-weight:400; }
.estimate-deposit input { max-width:120px; }
.estimate-document-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:14px; }
.estimate-document-grid select, .estimate-document-grid input { width:100%; min-height:44px; padding:6px 9px; border:1px solid #a9b6c6; border-radius:8px; background:#fff; font-size:16px; }
@media (max-width:620px) { .estimate-document-grid { grid-template-columns:1fr; } }
.estimate-edit-line { border:1px solid #cbd1d6; border-radius:8px; margin:12px 0; padding:14px; min-width:0; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.estimate-edit-line legend { color:var(--dark-muted); font:400 11px "Space Mono",monospace; }
.estimate-edit-line label { display:grid; align-content:end; gap:6px; font-size:13px; min-width:0; }
.estimate-edit-line input, .estimate-edit-line select, .estimate-deposit input { width:100%; min-width:0; min-height:44px; padding:6px 9px; border:1px solid #a9b6c6; border-radius:8px; background:#fff; font-size:16px; }
.estimate-description, .estimate-phase, .estimate-line-footer { grid-column:1/-1; }
.estimate-edit-line .estimate-unit input { border-radius:100px; }
.estimate-line-footer { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; }
.estimate-line-footer output { font:400 12px "Space Mono",monospace; }
[data-tour="estimate"] > h3 { font-family:"Space Mono",monospace; font-weight:400; }
[data-tour="estimate"] > .big-range, .estimate-total { font-family:"Bricolage Grotesque",Inter,sans-serif; letter-spacing:-.035em; }
.estimate-total { margin:16px 0; font-size:20px; }

.trade-workspace {
  display:grid;
  gap:15px;
  margin:16px 0;
  padding:16px;
  border:1px solid #33475d;
  border-radius:14px;
  background:radial-gradient(ellipse at 100% 0%,#25435c 0%,transparent 72%),#101c2c;
  box-shadow:0 12px 24px #091a2b22;
  color:#eef3f9;
  font-family:Inter,sans-serif;
  color-scheme:dark;
  container-type:inline-size;
}
.trade-industry { display:grid; gap:6px; color:#c5d2df; font:400 11px "Space Mono",monospace; letter-spacing:.08em; text-transform:uppercase; }
.trade-workspace select, .trade-workspace input { width:100%; min-width:0; min-height:44px; padding:7px 9px; border:1px solid #63778b; border-radius:8px; background:#101d2a; color:#eef3f9; font:400 16px Inter,sans-serif; }
.trade-workspace input::placeholder { color:#aab8c7; opacity:1; }
.trade-industry select { font-weight:600; letter-spacing:normal; text-transform:none; }
.trade-drawer { padding:12px; border:1px solid #718aa35c; border-radius:11px; background:#ffffff0c; backdrop-filter:blur(10px); }
.trade-drawer summary, .estimate-quick-add h5 { margin:0; color:#fff; font:700 19px/1.2 "Bricolage Grotesque",Inter,sans-serif; letter-spacing:-.035em; }
.trade-drawer summary { display:list-item; cursor:pointer; min-height:34px; padding:6px 0; }
.trade-drawer summary::marker { color:#d0dfef; font-size:.8em; }
.trade-scopes { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr)); gap:7px; margin-top:8px; }
.trade-scope {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  min-width:0;
  min-height:48px;
  padding:8px 10px;
  border:1px solid #60778e;
  border-radius:8px;
  background:#dae7f318;
  color:inherit;
  text-align:left;
  cursor:pointer;
}
.trade-scope:hover { background:#dae7f32e; border-color:#afc5d9; }
.trade-scope strong { display:block; font-size:12px; font-weight:620; overflow-wrap:anywhere; }
.trade-scope small { display:block; margin-top:3px; font:400 11px "Space Mono",monospace; color:#d0dce9; }
.trade-plus { flex:none; color:#d0dce9; font-size:19px; }
.estimate-quick-add { display:grid; gap:10px; min-width:0; }
.trade-quick-field, .trade-quick-readout { display:grid; align-content:start; gap:5px; min-width:0; color:#c5d2df; font-size:12px; }
.trade-quick-values { display:grid; align-items:end; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.trade-workspace .trade-unit-pill { border-radius:100px; }
.trade-quick-total { display:flex; align-items:center; min-height:44px; color:#fff; font:400 14px "Space Mono",monospace; overflow-wrap:anywhere; }
.estimate-quick-add > button { justify-self:start; min-height:44px; }
.trade-workspace :focus-visible { outline:2px solid #dae7f3; outline-offset:2px; }
@container (min-width:375px) {
  .trade-industry { grid-template-columns:auto minmax(0,1fr); align-items:center; gap:12px; }
  .trade-quick-values { grid-template-columns:minmax(0,.75fr) minmax(0,1.1fr) minmax(0,1.1fr) minmax(0,1fr); }
}
/* Quote desk. Brand colors come from theme.css (generated from the client config). */
@font-face { font-family: "Anton"; src: url("/assets/fonts/anton.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  --ink:#070f1a; --navy:#0d2238; --navy-2:#12314d; --gold:#f5b72a; --gold-2:#c89520; --paper:#f6f3ec;
  --text:#e9eef5; --muted:#a9b6c6; --dark-text:#0b1624; --dark-muted:#4c5a6b;
  --card:#fff; --line-d:#e4dfd3; --r:16px; --r-s:10px;
  --display:"Anton",Impact,"Arial Narrow Bold",sans-serif;
  --sans:"Inter",system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  --ok:#1e7a4f; --ok-bg:#e3f3ea; --warn:#8a5a00; --warn-bg:#fff4d6; --bad:#a3302a; --bad-bg:#fbe7e5; --info:#1f4f7a; --info-bg:#e5eef7;
  --shadow:0 1px 2px rgba(7,15,26,.06),0 6px 20px rgba(7,15,26,.06);
}
*,*::before,*::after { box-sizing:border-box; }
html { -webkit-text-size-adjust:100%; }
body { margin:0; font-family:Inter,system-ui,sans-serif; color:var(--dark-text); background:var(--paper); font-size:16px; line-height:1.45; }
a { color:var(--navy-2); }
button, input, select, textarea { font:inherit; color:inherit; }
:focus-visible { outline:3px solid var(--gold); outline-offset:2px; }
.boot { padding:40vh 0 0; text-align:center; color:var(--dark-muted); }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.field .checks label { display:flex; align-items:center; gap:8px; }
.field .checks input { width:auto; min-height:0; }

/* ---------- Login ---------- */
.login { min-height:100vh; min-height:100dvh; display:grid; place-items:center; padding:24px; background:radial-gradient(120% 80% at 50% 0%, var(--navy-2), var(--navy) 55%, var(--ink)); color:var(--text); }
.login-card { width:100%; max-width:380px; text-align:center; }
.login-badge { width:96px; height:96px; border-radius:22px; object-fit:cover; box-shadow:0 10px 30px rgba(0,0,0,.35); border:2px solid rgba(245,183,42,.5); }
.login-badge.brand-initials { display:grid; place-items:center; background:var(--gold); color:var(--ink); font-family:var(--display); font-size:36px; font-weight:400; letter-spacing:.04em; }
.brand-img, .brand .brand-initials { width:38px; height:38px; border-radius:9px; object-fit:cover; flex:none; }
.brand .brand-initials { display:grid; place-items:center; background:var(--gold); color:var(--ink); font-weight:800; font-size:13px; letter-spacing:.04em; }
.login h1 { font-family:"Bricolage Grotesque",Inter,sans-serif; font-weight:700; letter-spacing:-.035em; font-size:34px; margin:18px 0 4px; }
.login h1 span { color:var(--gold); }
.login p.sub { color:var(--muted); margin:0 0 26px; }
.login form { background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.12); border-radius:var(--r); padding:20px; text-align:left; }
.login label, .login .field label { display:block; font-size:14px; font-weight:600; margin-bottom:8px; color:var(--text); }
.login input, .login .field input { width:100%; padding:14px; border-radius:var(--r-s); border:1px solid rgba(255,255,255,.25); background:rgba(7,15,26,.5); color:#fff; font-size:17px; }
.login .btn { width:100%; margin-top:14px; }
.login .err { color:#ffb4ab; font-size:14px; min-height:20px; margin-top:10px; }
.login .fine { color:var(--muted); font-size:13px; margin-top:18px; }
.reset-dialog { width:min(520px, calc(100% - 32px)); max-height:calc(100dvh - 32px); overflow:auto; padding:24px; border:1px solid var(--line-d); border-radius:var(--r); background:var(--card); color:var(--dark-text); }
.reset-dialog::backdrop { background:rgba(7,15,26,.65); }
.reset-dialog label { display:block; font-weight:600; margin-bottom:8px; }
.reset-dialog input { width:100%; padding:12px; border:1px solid var(--dark-muted); border-radius:var(--r-s); background:var(--card); color:var(--dark-text); }
.reset-dialog .btn { margin:8px 8px 0 0; }
.security-account textarea { width:100%; max-width:100%; padding:12px; background:var(--card); color:var(--dark-text); border:1px solid var(--dark-muted); border-radius:var(--r-s); overflow-wrap:anywhere; }
.recovery-codes code { overflow-wrap:anywhere; }
.security-account .field { margin-bottom:16px; }
.security-account #twofa-manual { font-family:ui-monospace,monospace; font-size:13px; }
.security-account form > .btn { margin-top:8px; }

/* ---------- Shell ---------- */
.top { position:sticky; top:0; z-index:20; background:var(--navy); color:var(--text); border-bottom:3px solid var(--gold); padding-top:env(safe-area-inset-top); }
.top-in { max-width:1180px; margin:0 auto; display:flex; align-items:center; gap:12px; padding:10px 16px; }
.brand { display:flex; align-items:center; gap:10px; text-decoration:none; color:inherit; flex:1 1 auto; min-width:0; }
.brand img { width:38px; height:38px; border-radius:9px; object-fit:cover; flex:none; }
.brand b { font-family:var(--display); font-weight:400; font-size:21px; letter-spacing:.02em; text-transform:uppercase; white-space:nowrap; }
.brand b span { color:var(--gold); }
.brand small { display:block; color:var(--muted); font-size:12px; letter-spacing:.06em; text-transform:uppercase; }
.signout { background:none; border:1px solid rgba(255,255,255,.2); color:var(--text); border-radius:999px; padding:10px 14px; font-size:14px; cursor:pointer; flex:none; min-height:44px; }
.badge-dot { background:var(--gold); color:var(--ink); border-radius:999px; font-size:10.5px; font-weight:800; padding:0 6px; margin-left:4px; }
main.view { max-width:1180px; margin:0 auto; padding:16px 14px calc(28px + env(safe-area-inset-bottom)); }
h2.page { font-family:"Bricolage Grotesque",Inter,sans-serif; font-weight:700; font-size:30px; letter-spacing:-.035em; margin:6px 0 2px; color:var(--navy); }
p.lede { margin:0 0 16px; color:var(--dark-muted); }

/* ---------- Bits ---------- */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:46px; padding:10px 18px; border-radius:var(--r-s); border:0; cursor:pointer; font-weight:700; text-decoration:none; }
.btn-gold { background:var(--gold); color:var(--ink); }
.btn-gold:hover { background:#ffc642; }
.btn-navy { background:var(--navy); color:#fff; }
.btn-ghost { background:transparent; border:1.5px solid var(--line-d); color:var(--navy); }
.btn-sm { min-height:36px; padding:6px 12px; font-size:14px; }
.btn[disabled] { opacity:.55; cursor:default; }
.card { background:var(--card); border:1px solid var(--line-d); border-radius:var(--r); box-shadow:var(--shadow); padding:16px; margin-bottom:14px; min-width:0; }
.card h3 { margin:0 0 10px; font-size:13px; letter-spacing:.08em; text-transform:uppercase; color:var(--dark-muted); }
.pill { display:inline-flex; align-items:center; gap:6px; border-radius:999px; padding:3px 10px; font-size:12.5px; font-weight:700; white-space:nowrap; }
.pill::before { content:""; width:7px; height:7px; border-radius:50%; background:currentColor; }
.st-new { background:#fff1c9; color:#7a5200; }
.st-reviewed { background:var(--info-bg); color:var(--info); }
.st-quoted { background:#ece6fb; color:#5a3c9e; }
.st-won { background:var(--ok-bg); color:var(--ok); }
.st-lost { background:#eceae5; color:#5f5a50; }
.tag-example { display:inline-block; font-size:10.5px; font-weight:800; letter-spacing:.08em; padding:2px 6px; border-radius:4px; background:var(--warn-bg); color:var(--warn); border:1px dashed #d9a400; vertical-align:middle; }
.alert { border-radius:var(--r-s); padding:12px 14px; margin-bottom:14px; font-size:14.5px; border:1px solid; }
.alert b { display:block; margin-bottom:2px; }
.alert ul { margin:6px 0 0; padding-left:18px; }
.alert-warn { background:var(--warn-bg); border-color:#f0d48a; color:#5c3d00; }
.alert-bad { background:var(--bad-bg); border-color:#efc1bc; color:#6f1f1a; }
.alert-info { background:var(--info-bg); border-color:#c3d6ea; color:#173a5c; }
.disclaimer { display:flex; gap:10px; align-items:flex-start; background:var(--navy); color:var(--text); border-left:5px solid var(--gold); border-radius:var(--r-s); padding:12px 14px; margin-bottom:14px; font-size:14px; }
.disclaimer strong { color:var(--gold); text-transform:uppercase; letter-spacing:.04em; font-size:13px; display:block; }
.muted { color:var(--dark-muted); }
.small { font-size:13.5px; }
.empty { text-align:center; padding:40px 16px; color:var(--dark-muted); }

/* ---------- Inbox ---------- */
.toolbar { display:flex; flex-direction:column; gap:10px; margin-bottom:14px; }
.filters { display:flex; gap:6px; overflow-x:auto; padding-bottom:4px; scrollbar-width:none; }
.filters::-webkit-scrollbar { display:none; }
.filters button { flex:none; border:1.5px solid var(--line-d); background:#fff; border-radius:999px; padding:10px 16px; font-size:15px; font-weight:600; cursor:pointer; color:var(--dark-muted); min-height:44px; }
.filters button[aria-pressed="true"] { background:var(--navy); border-color:var(--navy); color:#fff; }
.filters button .n { opacity:.7; margin-left:4px; font-weight:500; }
.search { width:100%; padding:12px 14px; border-radius:var(--r-s); border:1.5px solid var(--line-d); background:#fff; }
.req-list { display:grid; gap:10px; }
.demo-notice { border:1px solid #d8dedf; border-radius:10px; padding:9px 12px; margin:0 0 16px; background:#fff; color:var(--dark-muted); font-size:13px; }
.work-queues { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:0 0 18px; }
.work-queue { display:flex; flex-direction:column-reverse; align-items:flex-start; gap:4px; padding:12px; text-align:left; border:1px solid #cbd2d7; border-radius:12px; background:#fff; color:var(--navy); font:inherit; font-weight:650; cursor:pointer; }
.work-queue strong { font-size:23px; line-height:1; }
.work-queue:hover { border-color:var(--navy); }
.work-queue[aria-pressed="true"] { background:#eaf1f6; border-color:var(--navy); box-shadow:inset 0 0 0 1px var(--navy); }
.work-facts { margin:3px 0 8px; overflow-wrap:anywhere; }
.work-action { overflow-wrap:anywhere; }
@media (min-width:640px) { .work-queues { grid-template-columns:repeat(4,minmax(0,1fr)); } }
.req { display:block; text-decoration:none; color:inherit; background:#fff; border:1px solid var(--line-d); border-radius:var(--r); padding:14px; box-shadow:var(--shadow); position:relative; }
.req:hover { border-color:var(--gold-2); }
.req.is-new { border-left:5px solid var(--gold); }
.req-top { display:flex; justify-content:space-between; gap:8px; align-items:flex-start; }
.req-name { font-weight:800; font-size:17px; }
.req-meta { color:var(--dark-muted); font-size:13.5px; margin:2px 0 8px; }
.req-bottom { display:flex; justify-content:space-between; align-items:flex-end; gap:10px; margin-top:6px; }

/* ---------- Detail ---------- */
.back { display:inline-flex; align-items:center; gap:6px; text-decoration:none; font-weight:700; color:var(--navy-2); margin:0 0 10px; min-height:44px; padding:8px 8px 8px 0; font-size:16px; }
.detail-head { display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px; align-items:flex-end; margin-bottom:12px; }
.detail-head h2 { margin:0; }
.detail-grid { display:grid; grid-template-columns:minmax(0,1fr); gap:0 16px; }
.big-range { font-family:var(--display); font-weight:400; font-size:40px; color:var(--navy); letter-spacing:.01em; line-height:1.05; }
.big-range.na { font-size:28px; color:var(--warn); }
.range-sub { color:var(--dark-muted); font-size:13.5px; margin:4px 0 12px; }
table.lines { width:100%; border-collapse:collapse; font-size:14.5px; }
table.lines th { text-align:left; font-size:12px; text-transform:uppercase; letter-spacing:.06em; color:var(--dark-muted); font-weight:700; padding:6px 4px; border-bottom:2px solid var(--line-d); }
table.lines td { padding:10px 4px; border-bottom:1px solid var(--line-d); vertical-align:top; }
table.lines td.num, table.lines th.num { text-align:right; white-space:nowrap; }
table.lines tr.total td { font-weight:800; border-bottom:0; border-top:2px solid var(--navy); }
.line-label { font-weight:700; }
.line-sub { font-size:12.5px; color:var(--dark-muted); }
.line-flag { font-size:12.5px; font-weight:700; }
.flag-measure { color:var(--warn); }
.flag-rate { color:var(--bad); }
.flag-visit { color:var(--info); }
.measure { display:flex; gap:6px; margin-top:6px; align-items:center; flex-wrap:wrap; }
.measure input { width:110px; padding:8px 10px; border:1.5px solid #e2c169; border-radius:8px; background:#fffaf0; }
.measure span { font-size:13px; color:var(--dark-muted); }
ul.assume { margin:10px 0 0; padding-left:18px; color:var(--dark-muted); font-size:13.5px; }
dl.kv { display:grid; grid-template-columns:minmax(96px,auto) minmax(0,1fr); gap:6px 12px; margin:0; font-size:15px; }
dl.kv dt { color:var(--dark-muted); font-size:13.5px; padding-top:1px; }
dl.kv dd { margin:0; overflow-wrap:anywhere; }
.contact-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; }
.message { white-space:pre-wrap; overflow-wrap:anywhere; background:var(--paper); border-radius:var(--r-s); padding:12px; font-size:15px; border:1px solid var(--line-d); }
.autoquote-card .autoquote-range { display:grid; gap:4px; margin:0 0 10px; padding:14px; border-radius:12px; background:var(--navy); color:#fff; }
.autoquote-card .autoquote-range span, .autoquote-card .autoquote-range small { color:rgba(255,255,255,.72); font-size:12.5px; }
.autoquote-card .autoquote-range strong { font-size:clamp(1.4rem, 2.4vw, 1.9rem); letter-spacing:-.03em; }
.autoquote-table-wrap { overflow-x:auto; margin:10px 0; border:1px solid var(--line-d); border-radius:10px; }
.autoquote-table { width:100%; border-collapse:collapse; font-size:13px; }
.autoquote-table th { text-align:left; padding:10px; background:var(--paper); color:var(--dark-muted); font-size:11px; letter-spacing:.06em; text-transform:uppercase; }
.autoquote-table td { padding:10px; border-top:1px solid var(--line-d); vertical-align:top; }
.autoquote-table .num { text-align:right; font-variant-numeric:tabular-nums; }
.autoquote-input { width:5.8rem; min-height:34px; padding:5px 7px; border:1px solid #b8c0c9; border-radius:7px; background:#fff; font:inherit; font-size:13px; text-align:right; }
.autoquote-input:focus { outline:2px solid rgba(18,49,77,.22); border-color:var(--navy-2); }
.autoquote-split-details { margin-top:6px; font-size:11.5px; font-weight:400; }
.autoquote-split-details summary { display:inline-flex; cursor:pointer; color:var(--navy-2); font-weight:700; }
.autoquote-split-fields { display:flex; flex-wrap:wrap; gap:8px; margin-top:7px; padding:8px; border-radius:8px; background:rgba(18,49,77,.045); }
.autoquote-split-fields label { display:grid; gap:3px; color:var(--dark-muted); font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; }
.autoquote-split-fields .autoquote-input { width:5.2rem; min-height:30px; font-size:12px; }
.autoquote-adjusted-row { background:rgba(217,166,79,.07); }
.autoquote-adjusted { display:inline-flex; margin-left:6px; padding:1px 7px; border-radius:99px; color:#1f4f7a; background:#e5eef7; font-size:10px; font-weight:800; text-transform:uppercase; }
.autoquote-edit-hint { margin-right:auto; align-self:center; }
.autoquote-desc { font-weight:650; }
.autoquote-basis { margin-top:4px; color:var(--dark-muted); font-size:11.5px; font-weight:400; }
.autoquote-basis .confidence { display:inline-flex; margin-left:6px; padding:1px 7px; border-radius:99px; font-size:10px; font-weight:800; text-transform:uppercase; }
.autoquote-basis .confidence.high { color:#17795c; background:rgba(23,121,92,.1); }
.autoquote-basis .confidence.medium { color:#9d6f22; background:rgba(217,166,79,.15); }
.autoquote-basis .confidence.low { color:#a43d31; background:rgba(164,61,49,.1); }
.autoquote-summary { display:grid; grid-template-columns:minmax(0,1fr) minmax(12rem,16rem); gap:14px; margin-top:12px; }
.autoquote-assumptions { color:var(--dark-muted); font-size:13px; }
.autoquote-totals { padding:14px; border-radius:12px; background:var(--navy); color:#fff; }
.autoquote-totals div { display:flex; justify-content:space-between; gap:12px; padding:6px 0; font-size:13px; }
.autoquote-totals span { color:rgba(255,255,255,.7); }
.autoquote-totals .grand { border-top:1px solid rgba(255,255,255,.18); margin-top:4px; padding-top:10px; font-size:15px; }
@media (max-width: 760px) { .autoquote-summary { grid-template-columns:1fr; } }
.customer-doc-panel { margin-top:14px; border:1px solid var(--line-d); border-radius:12px; background:var(--paper); overflow:hidden; }
.customer-doc-ready { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 14px; }
.customer-doc-ready strong { display:block; font-size:14px; }
.customer-doc-ready .small { display:block; margin-top:2px; }
.customer-doc-ready .estimate-actions { flex:none; margin-top:0; }
.customer-doc-details { border-top:1px solid var(--line-d); padding:0 14px 14px; }
.customer-doc-details summary { cursor:pointer; padding:11px 0; color:var(--navy-2); font-weight:700; }
.customer-doc-grid { display:grid; grid-template-columns:1.2fr .8fr .55fr; gap:10px; }
.customer-doc-details .field { margin-top:8px; }
.customer-doc-details textarea { width:100%; padding:10px; border:1.5px solid var(--line-d); border-radius:9px; background:#fff; font:inherit; font-size:14px; resize:vertical; }
@media (max-width: 720px) {
  .customer-doc-ready { align-items:flex-start; flex-direction:column; }
  .customer-doc-grid { grid-template-columns:1fr; }
}
.ai-sum { font-size:15.5px; margin:0 0 10px; }
.sec-label { font-size:12.5px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; color:var(--navy-2); margin:14px 0 6px; }
ul.tidy { margin:0; padding-left:18px; }
ul.tidy li { margin:3px 0; }
ol.qs { margin:0; padding-left:20px; }
ol.qs li { margin:6px 0; }
.status-row { display:grid; grid-template-columns:repeat(5,1fr); gap:6px; }
.status-row button { padding:12px 2px; min-height:44px; border-radius:9px; border:1.5px solid var(--line-d); background:#fff; font-weight:700; font-size:13px; cursor:pointer; text-transform:capitalize; }
.status-row button[aria-pressed="true"] { background:var(--navy); color:#fff; border-color:var(--navy); }
textarea.notes { width:100%; min-height:110px; padding:12px; border-radius:var(--r-s); border:1.5px solid var(--line-d); resize:vertical; }
.row-end { display:flex; justify-content:flex-end; gap:8px; margin-top:10px; flex-wrap:wrap; }
.pending { display:flex; align-items:center; gap:10px; color:var(--dark-muted); }
.spinner { width:18px; height:18px; border:3px solid #e6dfcf; border-top-color:var(--gold-2); border-radius:50%; animation:spin 1s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }

/* ---------- Recent quotes feed ---------- */
.recent-quotes { margin:14px 0; padding:12px 14px; border:1px solid var(--line-d); border-radius:var(--r); background:var(--card); box-shadow:var(--shadow); }
.recent-quotes-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:8px; }
.recent-quotes h2 { margin:0; font-size:18px; line-height:1.2; }
.recent-quotes .small { margin:2px 0 0; }
.recent-quotes-table { overflow-x:auto; }
.recent-quotes table { width:100%; min-width:720px; border-collapse:collapse; font-size:13.5px; }
.recent-quotes th { padding:6px 8px; color:var(--dark-muted); font-size:11.5px; letter-spacing:.05em; text-align:left; text-transform:uppercase; border-bottom:1px solid var(--line-d); }
.recent-quotes td { padding:8px; vertical-align:middle; border-bottom:1px solid var(--line-d); }
.recent-quotes tr:last-child td { border-bottom:0; }
.recent-quotes td.num, .recent-quotes th:nth-child(5) { text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums; }
.recent-quotes .lead-scope { max-width:330px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.recent-quotes .lead-status { min-height:36px; padding:5px 8px; border:1px solid var(--line-d); border-radius:8px; background:#fff; font-size:13px; }
.recent-quotes .empty-cell { padding:16px 8px; color:var(--dark-muted); text-align:center; }
@media (max-width:700px) {
  .recent-quotes { padding:10px; }
  .recent-quotes table { min-width:640px; }
}

/* ---------- Settings ---------- */
.set-sec { margin-bottom:14px; }
.rate-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:8px 10px; padding:12px 0; border-bottom:1px solid var(--line-d); }
.rate-row:last-child { border-bottom:0; }
.rate-name { grid-column:1 / -1; display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-weight:700; }
.rate-name .u { font-weight:500; color:var(--dark-muted); font-size:13.5px; }
.rate-name .unset { font-size:11.5px; font-weight:800; color:var(--bad); background:var(--bad-bg); border-radius:4px; padding:2px 6px; letter-spacing:.04em; }
.field label { display:block; font-size:12.5px; font-weight:600; color:var(--dark-muted); margin-bottom:4px; }
.money { position:relative; }
.money input, .field input, .field select { width:100%; padding:11px 12px; border:1.5px solid var(--line-d); border-radius:9px; background:#fff; font-size:16px; }
.money.pre input { padding-left:24px; }
.money.pre::before { content:"$"; position:absolute; left:11px; top:50%; transform:translateY(-50%); color:var(--dark-muted); font-weight:600; }
.money.suf input { padding-right:30px; }
.money.suf::after { content:"%"; position:absolute; right:12px; top:50%; transform:translateY(-50%); color:var(--dark-muted); font-weight:600; }
.money input.is-example { border-style:dashed; border-color:#d9a400; background:#fffaf0; }
.field-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.field .hint { font-size:12px; color:var(--dark-muted); margin-top:4px; }
.town-row, .custom-row { display:grid; gap:8px; align-items:end; padding:10px 0; border-bottom:1px solid var(--line-d); }
.town-row { grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) minmax(0,1fr) auto; }
.custom-row { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
.custom-row .full { grid-column:1 / -1; }
.icon-btn { width:40px; height:44px; border-radius:9px; border:1.5px solid var(--line-d); background:#fff; cursor:pointer; color:var(--bad); font-size:20px; line-height:1; }
.savebar { position:sticky; bottom:calc(env(safe-area-inset-bottom) + 8px); z-index:10; display:flex; align-items:center; justify-content:space-between; gap:10px; background:var(--navy); color:var(--text); border-radius:var(--r); padding:10px 10px 10px 16px; box-shadow:0 10px 30px rgba(7,15,26,.25); }
.savebar span { font-size:14px; }
.confirm-row { display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; }

/* ---------- Log ---------- */
.log { list-style:none; margin:0; padding:0; }
.log li { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:2px 10px; padding:10px 0; border-bottom:1px solid var(--line-d); font-size:14px; }
.log .act { font-weight:700; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:13px; }
.log .when { color:var(--dark-muted); font-size:12.5px; white-space:nowrap; }
.log .det { grid-column:1 / -1; color:var(--dark-muted); font-size:13px; overflow-wrap:anywhere; }

#toast { position:fixed; left:50%; bottom:calc(20px + env(safe-area-inset-bottom)); transform:translate(-50%, 20px); background:var(--ink); color:#fff; padding:11px 16px; border-radius:999px; font-weight:600; font-size:14px; opacity:0; pointer-events:none; transition:.2s; z-index:50; max-width:90vw; }
#toast.show { opacity:1; transform:translate(-50%,0); }
.notfound { padding:20vh 20px; text-align:center; }


.req-amt { font-weight:800; font-size:16px; color:var(--navy); white-space:nowrap; text-align:right; }
.req-amt small { display:block; font-weight:600; font-size:11.5px; color:var(--dark-muted); letter-spacing:.04em; text-transform:uppercase; }
.req-amt.na { color:var(--dark-muted); font-weight:600; }
.quoted-row { display:flex; gap:10px; align-items:end; }
.quoted-row .money { flex:1; }
.quoted-row .btn { flex:none; }
.new-form { background:#fff; border:1px solid var(--line-d); border-radius:var(--r); box-shadow:var(--shadow); padding:16px; }
.new-form .field { margin-bottom:14px; }
.new-quote-more summary { min-height:44px; padding:10px 0; font-weight:650; cursor:pointer; }
.new-form textarea { width:100%; min-height:110px; padding:12px; border-radius:var(--r-s); border:1.5px solid var(--line-d); resize:vertical; }
.quick-estimate-layout + .err { color:var(--bad); font-size:14px; min-height:20px; margin:4px 0 10px; }
.quick-estimate-layout { display:grid; gap:16px; align-items:start; margin-top:16px; }
.quick-estimate-items { margin:0; }
.quick-estimate-layout + .err:empty { display:none; }
.quick-estimate-items > h3 { font:700 22px/1.2 "Bricolage Grotesque",Inter,sans-serif; letter-spacing:-.035em; text-transform:none; color:var(--navy); }
@media (min-width:1024px) {
  .quick-estimate-layout:has(.quick-estimate-items) { grid-template-columns:minmax(250px,.8fr) minmax(0,1.2fr); }
  .quick-estimate-layout .field-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
/* ---------- Desktop ---------- */
@media (min-width: 820px) {
  .brand { flex:0 1 auto; margin-right:auto; }
  main.view { padding:24px 24px 48px; }
  h2.page { font-size:36px; }
  .toolbar { flex-direction:row; align-items:center; justify-content:space-between; }
  .search { max-width:320px; }
  .req-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .detail-grid { grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); align-items:start; }
  .rate-row { grid-template-columns:minmax(0,1.3fr) minmax(0,1fr) minmax(0,1fr); align-items:end; }
  .rate-name { grid-column:auto; align-self:center; }
  .field-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .custom-row { grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) auto; }
  .custom-row .full { grid-column:auto; }
  .set-cols { display:grid; grid-template-columns:minmax(0,1.25fr) minmax(0,1fr); gap:0 16px; align-items:start; }
  .savebar { bottom:16px; }
  #toast { bottom:28px; }
}
@media (min-width: 1100px) { .req-list { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation:none; } #toast { transition:none; } }

.quote-quick { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.6fr) auto; align-items:end; gap:10px; margin:20px 0; padding-bottom:20px; border-bottom:1px solid var(--line-d); }
.quote-quick h4, .quote-quick .quick-scope { grid-column:1/-1; margin:0; }
.quote-quick label { display:grid; gap:4px; min-width:0; font-size:13px; font-weight:600; }
.quote-quick input { min-width:0; width:100%; min-height:44px; padding:8px; border:1px solid var(--dark-muted); border-radius:var(--r-s); font:inherit; font-size:16px; }
.quote-quick .btn { min-height:44px; }
.quote-review:not(:empty) { margin-top:16px; padding:14px; border:1px solid var(--line-d); border-radius:var(--r-s); }
.quote-review h4 { margin:0; }
.quote-review ul { padding:0; list-style:none; }
.quote-review li { padding:8px 0; border-bottom:1px solid var(--line-d); overflow-wrap:anywhere; }
.quote-review label { display:flex; align-items:center; gap:8px; cursor:pointer; }
.quote-review p { margin:4px 0; }
.estimate-actions [hidden] { display:none; }
