/* NEXA Lending — layout and look from the owner's approved design (dark sidebar, light work area). */
:root {
  --bg: #f5f6f8; --panel: #ffffff; --ink: #111827; --muted: #5b6474; --faint: #8b93a1;
  --line: #e4e7ec; --soft: #f1f3f6; --accent: #111827; --accent-ink: #ffffff; --accent-soft: #eef0f4;
  --link: #1f5fd6;
  --good: #1d8a4e; --good-soft: #e6f4ec; --warn: #a76200; --warn-soft: #fdf2e0; --bad: #c2362b; --bad-soft: #fbe9e7;
  --side: #0b1320; --side-2: #16202f; --side-ink: #e9edf3; --side-muted: #8d97a8;
  --radius: 12px; --shadow: 0 1px 2px rgba(16, 24, 40, .05);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141c; --panel: #171d27; --ink: #e9edf3; --muted: #a3acbb; --faint: #737d8d;
    --line: #2a3240; --soft: #1f2632; --accent: #e9edf3; --accent-ink: #0f141c; --accent-soft: #232b38;
    --link: #7aa5f5;
    --good: #4cc38a; --good-soft: #17322a; --warn: #e0a44a; --warn-soft: #382c16; --bad: #f07a6e; --bad-soft: #3b1f1c;
    --side: #080d16; --side-2: #121a27;
    --shadow: none; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font: 600 26px/1.2 var(--serif); margin: 0 0 4px; letter-spacing: -.01em; }
h2 { font: 600 17px/1.3 var(--serif); margin: 0 0 12px; }
h3 { font-size: 12px; margin: 16px 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.serif { font-family: var(--serif); }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }

/* ---------- app frame ---------- */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(to right, var(--side) 236px, var(--bg) 236px); }
.side { background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.logo { padding: 24px 28px 18px; display: block; }
.logo img { display: block; width: 100%; max-width: 172px; height: auto; margin: 0 auto; }
.tagline img { display: block; width: 110px; height: auto; margin: 0 auto; opacity: .95; }
.brand img { display: block; width: 150px; height: auto; }
.side nav { display: flex; flex-direction: column; gap: 2px; padding: 4px 10px; }
.side nav a { display: flex; align-items: center; gap: 12px; color: var(--side-ink); padding: 10px 12px; border-radius: 8px; font-size: 14.5px; }
.side nav a:hover { background: var(--side-2); text-decoration: none; }
.side nav a.active { background: #26303f; color: #fff; }
.side nav a .soon.count { color: #fff; background: #b45309; border-color: #b45309; letter-spacing: 0; font-weight: 700; }
.side nav a .soon { margin-left: auto; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--side-muted); border: 1px solid #2b3647; border-radius: 99px; padding: 1px 6px; }
.today { margin: auto 10px 0; padding: 16px 10px 8px; border-top: 1px solid #1f2a3a; }
.today h4 { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--side-ink); }
.today div { display: flex; justify-content: space-between; font-size: 13px; color: var(--side-muted); padding: 4px 0; }
.today div b { color: var(--side-ink); font-weight: 600; }
.tagline { text-align: center; padding: 18px 10px 22px; line-height: 1.1; }
.tagline small { display: block; font-size: 9.5px; letter-spacing: .22em; color: var(--side-muted); margin-top: 10px; line-height: 1.7; }

.top { display: flex; align-items: center; gap: 14px; padding: 12px 24px; border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 5; }
.search { flex: 1; max-width: 640px; position: relative; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 38px; background: var(--soft); }
.chip { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; background: var(--panel); color: var(--ink); font-size: 13px; line-height: 1.25; white-space: nowrap; }
.chip:hover { text-decoration: none; background: var(--soft); }
.chip .dot { width: 9px; height: 9px; border-radius: 99px; background: var(--faint); flex: none; }
.chip .dot.on { background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); }
.chip small { display: block; color: var(--muted); font-size: 11.5px; }
.bell { position: relative; color: var(--ink); padding: 6px; border-radius: 8px; }
.bell:hover { background: var(--soft); }
.bell .count { position: absolute; top: 0; right: 0; background: var(--bad); color: #fff; font-size: 10px; font-weight: 700; border-radius: 99px; padding: 0 5px; line-height: 16px; }
.user { display: flex; align-items: center; gap: 10px; margin-left: auto; position: relative; }
.avatar { width: 38px; height: 38px; border-radius: 99px; background: #6b7280; color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 14px; flex: none; }
.avatar.lg { width: 82px; height: 82px; font: 600 28px var(--serif); background: var(--soft); color: var(--ink); }
.user b { display: block; font-size: 13.5px; }
.user small { color: var(--muted); font-size: 12px; }
.menu { position: absolute; right: 0; top: 48px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 6px; min-width: 180px; z-index: 20; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: none; border-radius: 6px; color: var(--ink); font-weight: 500; }
.menu a:hover, .menu button:hover { background: var(--soft); text-decoration: none; }

main { padding: 20px 24px 60px; min-width: 0; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-side { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.stack > * + * { margin-top: 16px; }
.sep { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

/* ---------- stat strip ---------- */
.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; gap: 12px; align-items: center; min-width: 0; }
.stat .ib { width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 10px; display: grid; place-items: center; flex: none; }
.stat .ib svg { width: 22px; height: 22px; }
.stat .n { font: 600 24px/1.1 var(--serif); letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat .l { color: var(--muted); font-size: 13px; }

/* ---------- forms ---------- */
label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; font-weight: 500; }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ink); outline-offset: -1px; border-color: transparent; }
textarea { min-height: 72px; resize: vertical; }
.field { margin-bottom: 12px; min-width: 0; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: var(--ink); margin-bottom: 8px; }
.check input { width: auto; margin-top: 3px; }
button, .btn { font: inherit; font-weight: 500; border-radius: 8px; padding: 9px 14px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
button:hover, .btn:hover { background: var(--soft); text-decoration: none; }
button.primary, .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
button.primary:hover, .btn.primary:hover { filter: brightness(1.15); background: var(--accent); }
button.danger { color: var(--bad); }
button.big { padding: 13px 22px; font-size: 16px; }
button.block, .btn.block { width: 100%; }
button:disabled { opacity: .45; cursor: default; }
button.icon { padding: 8px; }
.dispos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.dispos button { justify-content: flex-start; font-weight: 500; padding: 10px 14px; gap: 14px; }
.dispos button.on { border-color: var(--ink); background: var(--accent-soft); font-weight: 650; box-shadow: inset 0 0 0 1px var(--ink); }

/* ---------- tables & lists ---------- */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--soft); }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.empty { color: var(--faint); padding: 18px 0; text-align: center; }

/* ---------- badges, notices ---------- */
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 6px; background: var(--soft); color: var(--muted); white-space: nowrap; }
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.blue { background: var(--accent-soft); color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.notice { border-radius: 8px; padding: 10px 12px; font-size: 13.5px; margin-bottom: 12px; }
.notice.good { background: var(--good-soft); color: var(--good); }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.bad { background: var(--bad-soft); color: var(--bad); }
.notice.info { background: var(--accent-soft); color: var(--ink); }
.bar { height: 8px; background: var(--soft); border-radius: 99px; overflow: hidden; }
.bar > div { height: 100%; background: var(--ink); border-radius: 99px; }

/* ---------- power dialer ---------- */
.pd { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.pd-main > * + * { margin-top: 16px; }
.pd-side > * + * { margin-top: 16px; }
.pd-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pd-head .ib { width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 10px; display: grid; place-items: center; }
.pd-head h1 { margin: 0; }
.pd-head .controls { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pd-head .controls select { width: auto; min-width: 200px; }
.lead-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; }
.who { display: flex; gap: 18px; align-items: flex-start; }
.lead-name { font: 600 25px/1.2 var(--serif); }
.phone-row { display: flex; gap: 8px; align-items: center; margin: 10px 0 8px; flex-wrap: wrap; }
.phone-row .num { border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; font-size: 16px; font-variant-numeric: tabular-nums; display: inline-flex; gap: 8px; align-items: center; }
.meta { font-size: 13.5px; display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.kv h3 { margin-top: 0; }
.kv-row { display: grid; grid-template-columns: 18px 124px minmax(0, 1fr); gap: 8px; padding: 4px 0; font-size: 13.5px; align-items: start; }
.kv-row .k { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kv-row .k { color: var(--muted); }
.kv-row svg { color: var(--muted); width: 16px; height: 16px; margin-top: 2px; }
.kv-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }
.kv-cols > div + div { border-left: 1px solid var(--line); padding-left: 22px; }
.equity { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.house { aspect-ratio: 4 / 3; border-radius: 10px; background: linear-gradient(160deg, var(--soft), var(--line)); display: grid; place-items: center; text-align: center; padding: 10px; color: var(--muted); font-size: 12.5px; }
.house.has-map { padding: 0; overflow: hidden; }
.house + a { display: inline-block; margin-top: 6px; }
.house + a[hidden] { display: none; }
.house iframe { width: 100%; height: 100%; border: 0; display: block; }
.house > a { display: block; width: 100%; height: 100%; }
.house-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.house svg { width: 44px; height: 44px; stroke-width: 1.3; color: var(--faint); margin-bottom: 6px; }
.big-num { font: 600 24px/1.15 var(--serif); }
.big-num.xl { font-size: 28px; }
.lbl { color: var(--muted); font-size: 13px; margin-top: 10px; }
.lbl:first-child { margin-top: 0; }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
.trio > div + div { border-left: 1px solid var(--line); padding-left: 14px; }
.trio .big-num { font-size: 19px; overflow-wrap: anywhere; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs button { border: 0; padding: 5px 9px; font-size: 13px; color: var(--muted); border-radius: 6px; }
.tabs button.on { color: var(--ink); background: var(--soft); font-weight: 600; box-shadow: inset 0 -2px 0 var(--ink); }
.act { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: start; }
.act:last-child { border-bottom: 0; }
.act .ic { width: 36px; height: 36px; border-radius: 99px; background: var(--soft); display: grid; place-items: center; }
.act .ic svg { width: 16px; height: 16px; }
.act .when { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.callnow { display: flex; flex-direction: column; }
.callnow button.ghost { flex: none; padding: 8px; font-size: 13.5px; }
.callnow button { flex: 1; border-radius: 10px; padding: 16px; font-size: 17px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.actions .wide { grid-column: 1 / -1; }
.actions > * { white-space: nowrap; padding-left: 8px; padding-right: 8px; }
.oncall { display: flex; align-items: center; gap: 10px; }
.oncall .dot { width: 10px; height: 10px; border-radius: 99px; background: var(--good); box-shadow: 0 0 0 4px var(--good-soft); }
.nba li { display: flex; gap: 10px; align-items: flex-start; }
.nba li svg { margin-top: 2px; color: var(--muted); }

/* ---------- intelligence ---------- */
.src { display: inline-block; font-size: 11px; font-weight: 600; color: var(--muted); background: var(--soft); border-radius: 4px; padding: 1px 6px; white-space: nowrap; }
a.src:hover { text-decoration: none; color: var(--ink); }
.src.smp { background: repeating-linear-gradient(45deg, var(--warn-soft), var(--warn-soft) 6px, transparent 6px, transparent 12px); color: var(--warn); }
.notice.sample { background: repeating-linear-gradient(45deg, var(--warn-soft), var(--warn-soft) 10px, var(--panel) 10px, var(--panel) 20px); color: var(--warn); border: 1px solid var(--warn); }
.tbl td, .tbl th { padding: 7px 8px; font-size: 13px; }
.tbl tr.off td { color: var(--faint); }
.intel .tbl td { white-space: nowrap; }
.intel .tbl td.why, .intel .tbl td.small { white-space: normal; min-width: 200px; }
.vrange { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.mini { border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
svg.spark, .trend svg.spark { width: 100%; height: 48px; display: block; margin: 6px 0; }
svg.spark polyline { fill: none; stroke: var(--ink); stroke-width: 1.8; vector-effect: non-scaling-stroke; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-bottom: 12px; }
.photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; display: block; }
.photos figure { margin: 0; }
.refi-out { border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-top: 12px; }
.refi-out .big-num { font-size: 19px; }

/* ---------- calendar ---------- */
.day { margin-bottom: 18px; }
.day h3 { margin: 0 0 6px; }

/* ---------- facts (profile) ---------- */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.fact .k { font-size: 12px; color: var(--muted); }
.fact .v { font-weight: 600; }
.fact.stale .v { color: var(--warn); }

/* ---------- sign in ---------- */
.signin { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--side); }
.signin .card { width: 100%; max-width: 420px; padding: 28px; }
.brand { padding: 0 0 18px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand img { filter: invert(1); } }
.brand span { color: var(--muted); font-family: system-ui, sans-serif; font-size: 13px; letter-spacing: .25em; }
.gbtn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); font-weight: 600; font-size: 15px; }
.gbtn:hover { background: var(--soft); text-decoration: none; }

#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px; font-weight: 500; opacity: 0; transition: opacity .2s; pointer-events: none; max-width: calc(100% - 32px); z-index: 30; }
#toast.show { opacity: 1; }
#toast.err { background: var(--bad); color: #fff; }
code { word-break: break-all; font-size: 11.5px; }

/* ---------- responsive ---------- */
@media (max-width: 1500px) and (min-width: 1101px) {
  .kv-cols { grid-template-columns: minmax(0, 1fr); }
  .kv-cols > div + div { border-left: 0; padding-left: 0; }
}
@media (max-width: 1380px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lead-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1100px) {
  .pd { grid-template-columns: minmax(0, 1fr); }
  /* One column: Call Now sits right under the borrower, then the outcome buttons. */
  .pd-main, .pd-side { display: contents; }
  .pd > * > * { order: 5; margin-top: 0 !important; }
  .pd .o-lead { order: 1; } .pd .o-actions { order: 2; } .pd .o-outcome { order: 3; } .pd .o-form { order: 3; }
  .dispos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); background: var(--bg); }
  .side { position: static; height: auto; flex-direction: row; align-items: center; overflow-x: auto; }
  .logo { padding: 10px 14px; }
  .logo img { width: 92px; }
  .side nav { flex-direction: row; padding: 6px 4px; }
  .side nav a { white-space: nowrap; padding: 8px 10px; font-size: 13.5px; }
  .side nav a .soon, .today, .tagline { display: none; }
  .top { padding: 10px 16px; flex-wrap: wrap; position: static; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .chip.dialer small, .user .chip > div, .user .chip > svg { display: none; }
  .user { margin-left: auto; }
  main { padding: 16px 16px 48px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g2, .g3, .g-side, .fields, .facts, .kv-cols, .equity { grid-template-columns: minmax(0, 1fr); }
  .kv-cols > div + div { border-left: 0; padding-left: 0; }
  .dispos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pd-head .controls { margin-left: 0; width: 100%; }
  .pd-head .controls select { flex: 1 1 100%; min-width: 0; }
  .who { flex-direction: column; gap: 10px; }
  .avatar.lg { width: 56px; height: 56px; font-size: 20px; }
  .house { aspect-ratio: auto; padding: 18px; }
  .house.has-map { aspect-ratio: 4 / 3; padding: 0; }
  table { display: block; overflow-x: auto; }
}

.trend { min-width: 180px; }
.trend svg.spark { height: 36px; margin: 4px 0; }
.trend svg.spark polyline { fill: none; stroke: var(--ink); stroke-width: 1.8; vector-effect: non-scaling-stroke; }
/* Build 25: web-search cost meter and top-bar alert */
.meter { height: 10px; border-radius: 99px; background: var(--soft); overflow: hidden; border: 1px solid var(--line); }
.meter span { display: block; height: 100%; background: var(--good); }
.meter span.warn { background: var(--warn); }
.meter span.bad { background: var(--bad); }
.costchip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.costchip.bad { background: var(--bad-soft, #fde8e8); color: var(--bad); border-color: transparent; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 14px; }
.srctag { font-size: 10.5px; padding: 1px 6px; vertical-align: 1px; }
.srcval .small { font-weight: 400; margin-top: 2px; }
.badge.info { background: var(--soft); color: var(--ink); }
input[type=checkbox], input[type=radio] { width: auto; flex: none; margin-top: 3px; }
/* Build 28: computer calling */
.sp-controls { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; background: var(--soft); display: grid; gap: 10px; }
.sp-state { display: flex; align-items: center; gap: 8px; }
.sp-state .dot { width: 9px; height: 9px; border-radius: 99px; background: var(--faint); }
.sp-state .dot.on { background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); }
.meter.mini { width: 90px; height: 8px; margin-left: auto; }
.keypad { display: grid; grid-template-columns: repeat(3, 56px); gap: 6px; }
.keypad button { padding: 8px 0; font-size: 16px; }
button.warnbtn { background: var(--warn-soft); color: var(--warn); }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; margin-bottom: 10px; }
/* Build 33: AI notes on calls */
.ai-live .transcript { max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 8px; font-size: 13px; display: grid; gap: 4px; }
.ai-live .tl.borrower b { color: var(--good); }
.ai-live .tl.officer b { color: var(--muted); }
/* Build 41: messages split by type, one per row */
.acts .act { padding: 12px 0; }
.act .msg { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--soft); border-radius: 8px; padding: 8px 10px; margin: 4px 0; font-size: 13.5px; }
.act.skipped { opacity: .55; }
.act-scroll { max-height: 520px; overflow: auto; }
.reminders ul { margin: 6px 0 0; padding-left: 18px; }
.reminders li { margin: 2px 0; }

/* ---------- Prospect dialer (realtors, loan officers): queue | call | profile ---------- */
.pdx { display: grid; grid-template-columns: 290px minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.pdx-center > * + * { margin-top: 16px; }
.pdx-queue { padding: 14px; position: sticky; top: 76px; max-height: calc(100vh - 96px); display: flex; flex-direction: column; gap: 10px; }
.pdx-count { background: var(--accent-soft); border-radius: 8px; padding: 1px 8px; font-weight: 600; font-size: 13px; }
.pdx-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.pdx-tabs button { border: 0; background: none; padding: 8px 6px; font-size: 13px; border-bottom: 2px solid transparent; border-radius: 0; gap: 4px; }
.pdx-tabs button span { background: var(--soft); border-radius: 6px; padding: 0 5px; font-size: 11.5px; }
.pdx-tabs button.on { border-bottom-color: var(--ink); font-weight: 650; }
.pdx-list { overflow-y: auto; margin: 0 -14px; }
.pdx-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-top: 1px solid var(--line); cursor: pointer; }
.pdx-item:hover { background: var(--soft); }
.pdx-item.on { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--ink); }
.pdx-when { font-size: 11.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.pdx-when i { width: 7px; height: 7px; border-radius: 9px; background: var(--good); display: inline-block; }
.pdx-when i.cb { background: var(--warn); }
.pdx-chip { display: inline-block; font-size: 11.5px; padding: 2px 8px; border-radius: 6px; background: #e8f0fe; color: #1a56db; white-space: nowrap; }
.pdx-chip.soft { background: var(--soft); color: var(--muted); }
.pdx-callbtn { width: 36px; height: 36px; border-radius: 99px; padding: 0; justify-content: center; color: #1a56db; flex: none; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.pdx-av { border-radius: 12px; background: var(--soft); color: var(--ink); display: grid; place-items: center; font-weight: 600; overflow: hidden; flex: none; }
.pdx-av img { width: 100%; height: 100%; object-fit: cover; }
.pdx-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; }
.pdx-dot { width: 10px; height: 10px; border-radius: 9px; background: var(--faint); display: inline-block; }
.pdx-dot.dial { background: var(--warn); } .pdx-dot.live { background: var(--good); }
.pdx-switch { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.pdx-hero { display: grid; grid-template-columns: 220px minmax(0, 1fr) 150px; gap: 20px; }
.pdx-photo .pdx-av { border-radius: 14px; }
.pdx-org { font-size: 17px; color: var(--muted); margin-top: 2px; }
.pdx-bio { font-size: 14px; margin: 6px 0 10px; }
.pdx-round { width: 42px; height: 42px; border-radius: 99px; padding: 0; justify-content: center; font-size: 16px; }
.pdx-stats { background: var(--soft); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.pdx-stats b { display: block; font-size: 19px; } .pdx-stats span { font-size: 12px; color: var(--muted); }
.pdx-ctlrow { display: flex; justify-content: center; gap: 26px; flex-wrap: wrap; }
.pdx-ctl { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: none; font-size: 13px; padding: 0; }
.pdx-ctl .c { width: 52px; height: 52px; border-radius: 99px; background: var(--soft); display: grid; place-items: center; }
.pdx-ctl.on .c { background: var(--warn-soft); color: var(--warn); }
.pdx-endbtn { width: 64px; height: 64px; border-radius: 99px; background: var(--good); color: #fff; border: 0; justify-content: center; padding: 0; }
.pdx-endbtn.end { background: var(--bad); transform: rotate(135deg); }
.pdx-timer { font-weight: 650; margin-top: 10px; }
.pdx-wave { display: flex; gap: 3px; justify-content: center; align-items: center; height: 40px; }
.pdx-wave i { width: 3px; height: 4px; border-radius: 2px; background: #1a56db; transition: height .2s; }
.pdx-tabs2 { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 12px; overflow-x: auto; }
.pdx-tabs2 button { border: 0; background: none; border-radius: 0; padding: 10px 12px; border-bottom: 2px solid transparent; white-space: nowrap; }
.pdx-tabs2 button.on { border-bottom-color: #1a56db; color: #1a56db; font-weight: 650; }
.pdx-notes { border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.pdx-editor { flex: 1; min-height: 70px; outline: none; padding: 4px; }
.pdx-editor:empty::before { content: attr(data-ph); color: var(--faint); }
.pdx-notes select { width: auto; align-self: flex-start; }
.pdx-toolbar { display: flex; gap: 4px; border-top: 1px solid var(--line); padding-top: 6px; margin-top: 6px; }
button.xs { padding: 3px 8px; font-size: 13px; }
.pdx-sugg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pdx-sugg-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.pdx-sugg-card p { margin: 6px 0 0; }
.pdx-right { padding: 14px; position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow-y: auto; }
.pdx-contact > div { display: flex; gap: 10px; align-items: center; margin: 7px 0; font-size: 14px; min-width: 0; }
.pdx-soc { width: 30px; height: 30px; border-radius: 8px; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; text-decoration: none; }
.pdx-company { display: flex; gap: 12px; align-items: center; }
.pdx-logo { width: 48px; height: 48px; border-radius: 99px; background: #f6c445; color: #3b2a00; display: grid; place-items: center; font-weight: 800; flex: none; }
.pdx-listings { display: flex; gap: 8px; overflow-x: auto; }
.pdx-listing { min-width: 130px; max-width: 150px; border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.pdx-listing-img { height: 60px; border-radius: 8px; background: var(--soft); display: grid; place-items: center; font-size: 26px; margin-bottom: 6px; }
.pdx-chart { width: 100%; max-width: 260px; } .pdx-chart rect { fill: #1a56db; } .pdx-chart text { font-size: 9px; fill: var(--muted); }
@media (max-width: 1350px) { .pdx { grid-template-columns: 260px minmax(0, 1fr); } .pdx-right { grid-column: 1 / -1; position: static; max-height: none; } }
@media (max-width: 900px) { .pdx { grid-template-columns: minmax(0, 1fr); } .pdx-queue { position: static; max-height: 360px; } .pdx-hero { grid-template-columns: minmax(0, 1fr); } .pdx-photo .pdx-av { width: 120px !important; height: 120px !important; } .pdx-sugg-grid { grid-template-columns: minmax(0, 1fr); } }
.sched-banner { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; margin-bottom: 12px; font-size: 13.5px; }
.sched-banner:empty { display: none; }
.sched-banner select { width: auto; padding: 4px 8px; }
#dial-schedule input[type=time], #dial-schedule select { width: auto; }
/* Build 82: aged leads · 5 lines */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; border-radius: 0; background: var(--panel); padding: 7px 12px; font-size: 13px; }
.seg button.on { background: var(--ink); color: var(--panel); }
.aged-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 12px; align-items: start; }
.aged-ai-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.aged-ai.empty { display: flex; align-items: center; justify-content: center; min-height: 110px; border-style: dashed; }
.aged-next { border: 2px solid var(--accent, #3b82f6); }
.aged-human select, .aged-human input, .aged-human textarea { width: 100%; margin-top: 4px; }
@media (max-width: 900px) { .aged-grid, .aged-ai-grid { grid-template-columns: minmax(0, 1fr); } }

/* Build 87: finer, more corporate sidebar (owner 2026-10-22) */
@media (min-width: 901px) { .app { grid-template-columns: 224px minmax(0, 1fr); background: linear-gradient(to right, var(--side) 224px, var(--bg) 224px); } }
.side { font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; border-right: 1px solid #1a2433; }
.logo { padding: 22px 30px 14px; }
.logo img { max-width: 138px; }
.side nav { gap: 1px; padding: 2px 12px 8px; }
.side nav .nav-group { font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #6b778a; padding: 14px 10px 5px; }
.side nav .nav-group:first-child { padding-top: 4px; }
.side nav a { gap: 10px; padding: 6px 10px; border-radius: 6px; font-size: 12.75px; font-weight: 450; letter-spacing: .005em; color: #b8c1ce; position: relative; }
.side nav a .i { width: 16px; height: 16px; opacity: .75; }
.side nav a:hover { background: #121b29; color: #fff; }
.side nav a.active { background: #172234; color: #fff; font-weight: 550; }
.side nav a.active::before { content: ''; position: absolute; left: -12px; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: #7aa7ff; }
.side nav a.active .i { opacity: 1; }
.side nav a .nav-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side nav a .soon { font-size: 8.5px; font-weight: 600; letter-spacing: .1em; border: 0; padding: 0; color: #5d6879; }
.side nav a .soon.count { font-size: 10px; padding: 0 6px; border-radius: 4px; line-height: 16px; background: #9a4a0a; border-color: #9a4a0a; font-variant-numeric: tabular-nums; }
.today { margin: auto 12px 0; padding: 14px 10px 6px; border-top: 1px solid #1a2433; }
.today h4 { font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #6b778a; margin-bottom: 6px; }
.today div { font-size: 11.75px; color: #8d97a8; padding: 3px 0; }
.today div b { font-weight: 500; color: #dfe5ee; font-variant-numeric: tabular-nums; }
.tagline { padding: 14px 10px 18px; }
.tagline img { width: 72px; opacity: .55; }
.tagline small { font-size: 7.5px; letter-spacing: .32em; color: #5d6879; margin-top: 8px; }
@media (max-width: 900px) { .side nav .nav-group { display: none; } .side nav a { font-size: 13px; } .side nav a.active::before { display: none; } }

/* Loans & Applications (build 102) */
.loan-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .loan-grid { grid-template-columns: 1fr; } }
.wstat { display: grid; gap: 2px; min-width: 110px; }
.wstat b { font-size: 22px; line-height: 1.1; }
