/* Summit Ridge Roofing Command Center (concept) by Summit Oak AI
   Brand tokens taken from the Summit Ridge concept site (portfolio/summit-ridge-roofing/css/style.css):
   charcoal #1A1D21, slate #3A4048, accent red #C8362F to ember #E8743B, Oswald + Inter. */

:root {
  --bg: #0F1114;
  --bg-2: #14171B;
  --surface: #181B20;
  --surface-2: #1E2228;
  --surface-3: #252A31;
  --charcoal: #1A1D21;
  --slate: #3A4048;
  --line: rgba(255,255,255,.07);
  --line-2: rgba(255,255,255,.12);
  --text: #EDEFF1;
  --text-2: #C3C9CF;
  --dim: #8E979F;
  --faint: #626B74;
  --accent: #E8743B;
  --accent-red: #C8362F;
  --accent-soft: rgba(232,116,59,.12);
  --grad: linear-gradient(135deg, #C8362F 0%, #E8743B 100%);
  /* data / status colors: charts and chips only */
  --ok: #46B98A;
  --ok-soft: rgba(70,185,138,.13);
  --info: #6AA8E0;
  --info-soft: rgba(106,168,224,.13);
  --warn: #E2B04A;
  --warn-soft: rgba(226,176,74,.14);
  --muted-soft: rgba(255,255,255,.06);
  --font-head: "Oswald", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 14px;
  --r-sm: 10px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; }
p { margin: 0; }
svg { display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

/* ---------- shell ---------- */
.app {
  position: relative;
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  grid-template-rows: 64px minmax(0, 1fr);
  overflow: hidden;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(200,54,47,.07), transparent 60%),
    var(--bg);
}

.top {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(15,17,20,.85);
  backdrop-filter: blur(12px);
  min-width: 0;
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark { width: 28px; height: 28px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1; min-width: 0; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 17px; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.brand-sub { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); margin-top: 4px; white-space: nowrap; }
.top-meta { display: flex; align-items: center; gap: 14px; font-size: 12.5px; color: var(--text-2); min-width: 0; }
.top-date { white-space: nowrap; }
.live { display: inline-flex; align-items: center; gap: 7px; color: var(--text); font-weight: 500; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(70,185,138,.5); animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(70,185,138,.5); } 70% { box-shadow: 0 0 0 7px rgba(70,185,138,0); } 100% { box-shadow: 0 0 0 0 rgba(70,185,138,0); } }
.pill-concept { padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--dim); font-size: 11.5px; white-space: nowrap; }

/* ---------- nav ---------- */
.nav {
  display: flex; flex-direction: column; gap: 4px;
  padding: 18px 12px;
  border-right: 1px solid var(--line);
  background: rgba(20,23,27,.6);
  min-height: 0;
}
.nav-btn {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 0; border-radius: 10px;
  background: transparent;
  color: var(--dim);
  font-size: 14px; font-weight: 500; text-align: left;
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.nav-btn svg { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-btn:hover { color: var(--text); background: var(--muted-soft); }
.nav-btn[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.nav-btn[aria-current="page"] svg { color: var(--accent); }
.nav-btn[aria-current="page"]::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); }
.nav-count { margin-left: auto; font-style: normal; font-size: 11.5px; font-weight: 600; color: var(--dim); background: var(--muted-soft); padding: 2px 8px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.nav-count--hot { color: var(--accent); background: var(--accent-soft); }
.nav { overflow-y: auto; }
.nav-foot { margin-top: auto; padding: 14px 12px 4px; font-size: 11.5px; color: var(--faint); display: flex; flex-direction: column; gap: 8px; }
.nav-foot-h { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; color: var(--faint); }
.src-mini { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.src-mini li { display: flex; align-items: center; gap: 8px; color: var(--dim); font-size: 12px; }
.src-mini li span:last-child { margin-left: auto; color: var(--faint); font-size: 11px; font-variant-numeric: tabular-nums; }
.lbl-short { display: none; }
.nav-foot strong { color: var(--dim); font-weight: 600; }

/* ---------- main ---------- */
.main { overflow-y: auto; overflow-x: clip; min-width: 0; padding: 28px 30px 24px; outline: none; scroll-behavior: smooth; }
.view { max-width: 1400px; margin: 0 auto; animation: viewIn .35s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; flex-wrap: wrap; }
.view-head h1 { font-family: var(--font-head); font-weight: 600; font-size: 30px; letter-spacing: .01em; line-height: 1.1; }
.view-note { max-width: 440px; color: var(--dim); font-size: 13px; }
.eyebrow { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); margin-bottom: 6px; font-weight: 600; }
.eyebrow--hot { color: var(--accent); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2 { font-size: 14px; font-weight: 600; color: var(--text); }
.card-sub { font-size: 12px; color: var(--faint); white-space: nowrap; }
.link-btn { border: 0; background: none; color: var(--accent); font-size: 12.5px; font-weight: 500; cursor: pointer; padding: 4px 2px; white-space: nowrap; }
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { position: relative; display: flex; flex-direction: column; gap: 4px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 15px 16px 12px; cursor: pointer; transition: border-color .2s var(--ease), background .2s var(--ease); min-width: 0; }
.kpi:hover { border-color: var(--line-2); background: var(--surface-2); }
.kpi-label { font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-val { font-family: var(--font-head); font-weight: 500; font-size: 32px; line-height: 1.1; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.kpi-val small { font-size: 15px; color: var(--dim); margin-left: 3px; font-weight: 400; }
.kpi-sub { font-size: 11.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-spark { height: 24px; margin-top: 6px; }
.kpi-spark svg { width: 100%; height: 24px; overflow: visible; }
.kpi--hot .kpi-val { color: var(--accent); }

/* ---------- overview grid ---------- */
.grid-ov { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); grid-template-areas: "chart feed" "stages feed" "crews sources"; gap: 16px; }
.card-chart { grid-area: chart; }
.card-feed { grid-area: feed; display: flex; flex-direction: column; }
.card-stages { grid-area: stages; }
.card-crews { grid-area: crews; }
.card-sources { grid-area: sources; }

.chart svg { width: 100%; height: auto; }
.chart .ax { font-size: 10px; fill: var(--faint); font-family: var(--font-body); }
.chart .val { font-size: 10.5px; fill: var(--text-2); font-family: var(--font-body); font-weight: 600; }

.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.feed li { display: grid; grid-template-columns: 26px minmax(0,1fr) auto; gap: 10px; align-items: start; padding: 9px 8px; border-radius: 10px; transition: background 1.2s var(--ease); }
.feed li.flash { background: var(--accent-soft); transition: none; }
.feed-ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--muted-soft); color: var(--text-2); }
.feed-ic svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feed-ic.k-text { color: var(--info); background: var(--info-soft); }
.feed-ic.k-ok { color: var(--ok); background: var(--ok-soft); }
.feed-ic.k-warn { color: var(--warn); background: var(--warn-soft); }
.feed-ic.k-hot { color: var(--accent); background: var(--accent-soft); }
.feed-txt { font-size: 13px; color: var(--text-2); }
.feed-txt b { color: var(--text); font-weight: 600; }
.feed-time { font-size: 11px; color: var(--faint); white-space: nowrap; padding-top: 2px; }

.stages { display: flex; flex-direction: column; gap: 10px; }
.stage-row { display: grid; grid-template-columns: 130px minmax(0,1fr) 34px; align-items: center; gap: 12px; font-size: 13px; color: var(--text-2); }
.stage-bar { height: 8px; border-radius: 6px; background: var(--muted-soft); overflow: hidden; }
.stage-bar i { display: block; height: 100%; border-radius: 6px; background: var(--slate); transition: width .6s var(--ease); }
.stage-row.is-open .stage-bar i { background: var(--accent); }
.stage-n { text-align: right; font-family: var(--font-head); font-size: 16px; color: var(--text); font-variant-numeric: tabular-nums; }

.mini-crews { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mini-crews button { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 110px auto; gap: 14px; align-items: center; padding: 10px; border: 1px solid transparent; border-radius: 10px; background: var(--bg-2); text-align: left; cursor: pointer; transition: border-color .2s var(--ease); }
.mini-crews button:hover { border-color: var(--line-2); }
.mc-name { font-weight: 600; font-size: 13px; }
.mc-where { display: block; color: var(--dim); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prog { height: 6px; border-radius: 6px; background: var(--muted-soft); overflow: hidden; }
.prog i { display: block; height: 100%; background: var(--ok); border-radius: 6px; transition: width .8s var(--ease); }

/* ---------- chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 500; white-space: nowrap; background: var(--muted-soft); color: var(--text-2); transition: box-shadow .6s var(--ease); }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.chip.s-ok { color: var(--ok); background: var(--ok-soft); }
.chip.s-info { color: var(--info); background: var(--info-soft); }
.chip.s-warn { color: var(--warn); background: var(--warn-soft); }
.chip.s-hot { color: var(--accent); background: var(--accent-soft); }
.chip.s-mute { color: var(--dim); }
.flash-ring { box-shadow: 0 0 0 2px var(--accent); }

/* ---------- board ---------- */
.board-wrap { overflow-x: auto; margin: 0 -30px; padding: 0 30px 8px; scrollbar-width: thin; }
.board { display: grid; grid-template-columns: repeat(5, minmax(240px, 1fr)); gap: 12px; min-width: 1240px; }
.col { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.col-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 6px; }
.col-head h2 { font-size: 13px; font-weight: 600; }
.col-head span { font-family: var(--font-head); font-size: 15px; color: var(--dim); font-variant-numeric: tabular-nums; }
.col.is-open .col-head h2::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px; border-radius: 50%; background: var(--accent); vertical-align: middle; }
.est { width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; display: flex; flex-direction: column; gap: 7px; transition: border-color .2s var(--ease), transform .2s var(--ease), box-shadow .6s var(--ease); }
.est:hover { border-color: var(--line-2); transform: translateY(-1px); }
.est-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.est-name { font-weight: 600; font-size: 13.5px; }
.est-sq { font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.est-addr { font-size: 12px; color: var(--dim); }
.est-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.est-meta { font-size: 11.5px; color: var(--faint); }
.adj { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--warn); background: var(--warn-soft); padding: 6px 8px; border-radius: 8px; }
.adj svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- crews ---------- */
.days { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.day { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; text-align: left; transition: border-color .2s var(--ease), background .2s var(--ease); min-width: 0; }
.day:hover { border-color: var(--line-2); }
.day[aria-pressed="true"] { border-color: rgba(232,116,59,.55); background: var(--surface-2); }
.day-name { font-size: 12px; font-weight: 600; color: var(--text); }
.day-wx { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--dim); }
.day-wx svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.day-hold { font-size: 10.5px; font-weight: 600; color: var(--warn); letter-spacing: .04em; text-transform: uppercase; }
.day-ok { font-size: 10.5px; color: var(--faint); }

.crew-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.crew { width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; cursor: pointer; display: flex; flex-direction: column; gap: 10px; transition: border-color .2s var(--ease); min-width: 0; }
.crew:hover { border-color: var(--line-2); }
.crew.is-hold { border-color: rgba(226,176,74,.35); }
.crew.is-open { cursor: default; background: transparent; border-style: dashed; }
.crew-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.crew-name { font-family: var(--font-head); font-size: 17px; font-weight: 500; letter-spacing: .02em; }
.crew-lead { font-size: 12px; color: var(--faint); }
.crew-roof { display: flex; gap: 10px; align-items: flex-start; }
.crew-roof svg { width: 18px; height: 18px; flex: none; margin-top: 2px; fill: none; stroke: var(--dim); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.crew-addr { font-size: 13.5px; font-weight: 500; }
.crew-type { font-size: 12px; color: var(--dim); }
.crew-row { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--dim); }
.crew-row .prog { flex: 1; }
.hold-note { font-size: 12px; color: var(--warn); }

/* ---------- storm ---------- */
.storm-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 16px; margin-bottom: 16px; }
.event-dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; margin: 0 0 16px; }
.event-dl dt { font-size: 11.5px; color: var(--faint); margin-bottom: 2px; }
.event-dl dd { margin: 0; font-family: var(--font-head); font-size: 19px; font-weight: 500; }
.funnel { display: flex; flex-direction: column; gap: 8px; }
.fn-row { display: grid; grid-template-columns: 82px minmax(0, 1fr) 30px; gap: 10px; align-items: center; font-size: 12px; color: var(--dim); }
.fn-bar { height: 8px; border-radius: 6px; background: var(--muted-soft); overflow: hidden; }
.fn-bar i { display: block; height: 100%; border-radius: 6px; transition: width .6s var(--ease); }
.fn-n { text-align: right; color: var(--text); font-family: var(--font-head); font-size: 14px; font-variant-numeric: tabular-nums; }

.suburbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sub { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); cursor: pointer; transition: border-color .2s var(--ease), background .2s var(--ease); min-width: 0; }
.sub:hover { border-color: var(--line-2); }
.sub[aria-pressed="true"] { border-color: rgba(232,116,59,.6); background: var(--surface-2); }
.sub-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub-n { font-family: var(--font-head); font-size: 26px; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; }
.sub-meta { font-size: 11.5px; color: var(--faint); }
.sub-bar { height: 4px; border-radius: 4px; background: var(--muted-soft); overflow: hidden; }
.sub-bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }

.leads { display: flex; flex-direction: column; }
.lead { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) 90px 80px 130px; gap: 14px; align-items: center; width: 100%; text-align: left; padding: 11px 10px; border: 0; border-top: 1px solid var(--line); background: transparent; cursor: pointer; border-radius: 0; transition: background .2s var(--ease); }
.lead:first-child { border-top: 0; }
.lead:hover { background: var(--muted-soft); }
.lead.flash { background: var(--accent-soft); }
.lead-name { font-weight: 600; font-size: 13.5px; }
.lead-src { display: block; font-size: 11.5px; color: var(--faint); font-weight: 400; }
.lead-addr { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead-hail, .lead-when { font-size: 12px; color: var(--dim); white-space: nowrap; }
.lead .chip { justify-self: start; }
.leads-head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) 90px 80px 130px; gap: 14px; padding: 0 10px 8px; font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .1em; }

/* ---------- drawer ---------- */
.scrim { position: absolute; inset: 0; background: rgba(5,6,8,.6); z-index: 40; animation: fadeIn .25s var(--ease); }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100%); z-index: 50; background: var(--surface); border-left: 1px solid var(--line-2); box-shadow: -30px 0 60px rgba(0,0,0,.45); display: flex; flex-direction: column; animation: slideIn .32s var(--ease); }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 22px 22px 16px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-family: var(--font-head); font-size: 23px; font-weight: 500; line-height: 1.15; }
.icon-btn { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface-2); cursor: pointer; }
.icon-btn:hover { background: var(--surface-3); }
.icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 22px 28px; display: flex; flex-direction: column; gap: 20px; }
.d-sec h3 { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); margin-bottom: 10px; font-weight: 600; }
.d-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin: 0; }
.d-grid dt { font-size: 11.5px; color: var(--faint); }
.d-grid dd { margin: 2px 0 0; font-size: 13.5px; color: var(--text); }
.d-callout { padding: 12px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); font-size: 13px; color: var(--text-2); }
.d-callout b { color: var(--text); }
.d-callout.warn { border-color: rgba(226,176,74,.3); }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.timeline li { position: relative; padding: 0 0 14px 20px; font-size: 13px; color: var(--text-2); }
.timeline li::before { content: ""; position: absolute; left: 3px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--slate); }
.timeline li::after { content: ""; position: absolute; left: 6px; top: 16px; bottom: 0; width: 1px; background: var(--line-2); }
.timeline li:last-child::after { display: none; }
.timeline li.now::before { background: var(--accent); }
.timeline small { display: block; font-size: 11.5px; color: var(--faint); }
.sms { display: flex; flex-direction: column; gap: 8px; }
.bubble { max-width: 88%; padding: 9px 12px; border-radius: 14px; font-size: 13px; line-height: 1.4; }
.bubble.out { align-self: flex-end; background: rgba(232,116,59,.16); color: var(--text); border-bottom-right-radius: 4px; }
.bubble.in { align-self: flex-start; background: var(--surface-3); color: var(--text); border-bottom-left-radius: 4px; }
.bubble small { display: block; font-size: 10.5px; color: var(--faint); margin-top: 3px; }

.foot { max-width: 1400px; margin: 28px auto 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--faint); }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  .grid-ov { grid-template-columns: minmax(0, 1fr); grid-template-areas: "chart" "feed" "stages" "crews" "sources"; }
  .storm-top { grid-template-columns: minmax(0, 1fr); }
  .lead, .leads-head { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.3fr) 80px 120px; }
  .lead-hail, .leads-head .h-hail { display: none; }
}
@media (max-width: 768px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; }
  .top { padding: 10px 16px; flex-wrap: wrap; row-gap: 6px; }
  .top-date { display: none; }
  .top-meta { gap: 10px; }
  .nav { grid-row: 3; flex-direction: row; gap: 2px; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); background: rgba(20,23,27,.96); }
  .nav-btn { flex: 1; flex-direction: column; gap: 4px; padding: 8px 2px; font-size: 11px; text-align: center; justify-content: center; min-width: 0; }
  .lbl-long { display: none; }
  .lbl-short { display: inline; }
  .nav-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .nav-btn[aria-current="page"]::before { left: 30%; right: 30%; top: -6px; bottom: auto; width: auto; height: 2px; border-radius: 0 0 3px 3px; }
  .nav-count { position: absolute; top: 3px; right: calc(50% - 26px); margin: 0; font-size: 9.5px; padding: 1px 5px; }
  .nav-foot { display: none; }
  .main { padding: 20px 16px 18px; }
  .view-head h1 { font-size: 25px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 13px 13px 10px; }
  .kpi-val { font-size: 27px; }
  .board-wrap { margin: 0 -16px; padding: 0 16px 8px; }
  .board { grid-template-columns: repeat(5, 252px); min-width: 0; width: max-content; }
  .days { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .crew-grid { grid-template-columns: minmax(0, 1fr); }
  .suburbs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lead { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .leads-head { display: none; }
  .lead-addr { grid-column: 1; grid-row: 2; }
  .lead-when { grid-column: 2; grid-row: 2; justify-self: end; }
  .lead .chip { grid-column: 2; grid-row: 1; justify-self: end; }
  .mini-crews button { grid-template-columns: minmax(0, 1fr) 70px; }
  .mini-crews .chip { display: none; }
  .stage-row { grid-template-columns: 112px minmax(0,1fr) 28px; }
  .card { padding: 15px; }
}
@media (max-width: 400px) {
  .pill-concept { font-size: 10.5px; padding: 4px 8px; }
  .brand-name { font-size: 15px; }
}

/* ---------- round 2: sources ---------- */
.sdot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; transition: box-shadow .6s var(--ease); }
.sdot.busy { background: var(--info); box-shadow: 0 0 0 4px rgba(106,168,224,.2); }
.sources { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.sources li { display: grid; grid-template-columns: 30px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 8px 6px; border-radius: 10px; transition: background 1.2s var(--ease); }
.sources li.flash { background: var(--muted-soft); transition: none; }
.src-ic { width: 30px; height: 30px; border-radius: 9px; background: var(--bg-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--text-2); }
.src-ic svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.src-name { font-size: 13px; font-weight: 600; }
.src-desc { display: block; font-size: 11.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.src-state { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--dim); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- inbox ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.fbtn { padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--dim); font-size: 12.5px; cursor: pointer; }
.fbtn:hover { color: var(--text); }
.fbtn[aria-pressed="true"] { background: var(--surface-2); color: var(--text); border-color: rgba(232,116,59,.55); }
.card-flush { padding: 6px; }
.convos { display: flex; flex-direction: column; }
.convo { display: grid; grid-template-columns: 10px 34px minmax(0,1fr) auto; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 12px; border: 0; border-top: 1px solid var(--line); background: transparent; cursor: pointer; transition: background .2s var(--ease); }
.convo:first-child { border-top: 0; }
.convo:hover { background: var(--muted-soft); }
.convo.flash { background: var(--accent-soft); }
.udot { width: 8px; height: 8px; border-radius: 50%; background: transparent; }
.convo.unread .udot { background: var(--accent); }
.ch-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--bg-2); border: 1px solid var(--line); color: var(--text-2); }
.ch-ic svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cv-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.cv-name { font-size: 13.5px; font-weight: 500; white-space: nowrap; }
.convo.unread .cv-name { font-weight: 700; }
.cv-ch { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .1em; }
.cv-prev { display: block; font-size: 12.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.convo.unread .cv-prev { color: var(--text-2); }
.cv-link { display: block; font-size: 11.5px; color: var(--faint); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.cv-time { font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.act { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2); font-size: 13px; font-weight: 500; cursor: pointer; }
.act:hover { background: var(--surface-3); }
.act.primary { background: var(--grad); border-color: transparent; color: #fff; }
.act:disabled { opacity: .45; cursor: default; }
.bubble.note { align-self: center; max-width: 100%; background: transparent; border: 1px dashed var(--line-2); color: var(--dim); font-size: 12px; text-align: center; }

/* ---------- financials ---------- */
.kpis-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpi-delta { color: var(--ok); }
.kpi-delta.down { color: var(--warn); }
.grid-fin { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); grid-template-areas: "rev lines" "ar exp" "jobs exp"; gap: 16px; align-items: start; }
.fin-rev { grid-area: rev; } .fin-lines { grid-area: lines; } .fin-ar { grid-area: ar; } .fin-exp { grid-area: exp; } .fin-jobs { grid-area: jobs; }
.lines { display: flex; flex-direction: column; gap: 14px; }
.line-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; font-size: 13px; }
.line-row .lr-amt { font-family: var(--font-head); font-size: 16px; font-variant-numeric: tabular-nums; }
.line-row .lr-meta { font-size: 11.5px; color: var(--faint); grid-column: 1 / -1; }
.line-row .lr-bar { grid-column: 1 / -1; height: 6px; border-radius: 6px; background: var(--muted-soft); overflow: hidden; }
.line-row .lr-bar i { display: block; height: 100%; border-radius: 6px; background: var(--accent); }
.line-row:not(:first-child) .lr-bar i { background: var(--slate); }
.aging { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.age { display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 10px 11px; border-radius: 11px; border: 1px solid var(--line); background: var(--bg-2); cursor: pointer; min-width: 0; }
.age:hover { border-color: var(--line-2); }
.age[aria-pressed="true"] { border-color: rgba(232,116,59,.6); background: var(--surface-2); }
.age-l { font-size: 11.5px; color: var(--dim); }
.age-amt { font-family: var(--font-head); font-size: 18px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.age-n { font-size: 11px; color: var(--faint); }
.age.b3 .age-amt, .age.b2 .age-amt { color: var(--warn); }
.age-bar { height: 3px; border-radius: 3px; margin-top: 4px; }
.inv-list, .exp-list { display: flex; flex-direction: column; }
.inv, .exp { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; width: 100%; text-align: left; padding: 10px 8px; border: 0; border-top: 1px solid var(--line); background: transparent; cursor: pointer; transition: background .2s var(--ease); }
.inv:hover, .exp:hover { background: var(--muted-soft); }
.inv.flash, .exp.flash { background: var(--accent-soft); }
.inv-name, .exp-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inv-amt, .exp-amt { font-family: var(--font-head); font-size: 15px; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.inv-meta, .exp-meta { font-size: 11.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inv .chip, .exp .chip { justify-self: end; }
.recon { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; padding: 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.recon-ring { width: 46px; height: 46px; flex: none; }
.recon-txt { font-size: 13px; color: var(--text-2); }
.recon-txt b { font-family: var(--font-head); font-size: 18px; font-weight: 500; color: var(--text); }
.jm { display: flex; flex-direction: column; gap: 12px; }
.jm-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 2fr) 56px; gap: 12px; align-items: center; font-size: 12.5px; }
.jm-name { font-weight: 600; font-size: 13px; }
.jm-name small { display: block; font-weight: 400; color: var(--faint); font-size: 11.5px; }
.jm-bar { display: flex; height: 10px; border-radius: 6px; overflow: hidden; background: var(--muted-soft); }
.jm-bar i { display: block; height: 100%; }
.jm-pct { text-align: right; font-family: var(--font-head); font-size: 16px; color: var(--ok); font-variant-numeric: tabular-nums; }
.jm-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 11.5px; color: var(--faint); margin-top: 2px; }
.jm-legend span { display: inline-flex; align-items: center; gap: 6px; }
.jm-legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

@media (max-width: 1280px) {
  .kpis-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  .grid-fin { grid-template-columns: minmax(0, 1fr); grid-template-areas: "rev" "lines" "ar" "exp" "jobs"; }
}
@media (max-width: 768px) {
  .kpis-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aging { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .convo { grid-template-columns: 8px 30px minmax(0,1fr) auto; gap: 10px; padding: 11px 8px; }
  .convo .cv-right .chip { display: none; }
  .jm-row { grid-template-columns: minmax(0, 1fr) 50px; }
  .jm-bar { grid-column: 1 / -1; grid-row: 2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
