@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/inter-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 800; font-display: swap; src: url('/fonts/inter-latin-800-normal.woff2') format('woff2'); }
:root {
  --navy: #1d295b;
  --navy-2: #2a3a78;
  --topbar: #1d295b;
  --heading: #1d295b;
  --accent: #e08232;
  --accent-soft: #fbeadb;
  --accent-ink: #9a4f12;
  --bg: #f5f4f0;
  --surface: #ffffff;
  --panel: #fbfaf7;
  --hover: #faf9f6;
  --chip: #f0eee8;
  --chip2: #eeece6;
  --off: #e6e3dc;
  --text: #1c2430;
  --muted: #65707d;
  --ph: #8a929c;
  --line: #e2e0d9;
  --line2: #efede7;
  --line3: #d6d3ca;
  --ok: #2f7d4f;
  --ok-soft: #e3f2e8;
  --warn: #a5620c;
  --warn-soft: #fbf0dc;
  --info: #2a5f8f;
  --info-soft: #e3eef8;
  --danger: #b03a2e;
  --danger-soft: #f9e5e2;
  --purple: #6a3fa0;
  --purple-soft: #ece4f7;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(19, 41, 61, .06), 0 2px 8px rgba(19, 41, 61, .05);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01";
  color: var(--text);
}
html[data-theme="dark"] {
  color-scheme: dark;
  --topbar: #0f1530;
  --navy: #33458f;
  --navy-2: #3f53a6;
  --heading: #e8ebf4;
  --accent-soft: #3b2a1a;
  --accent-ink: #f0a868;
  --bg: #12151c;
  --surface: #1a1f29;
  --panel: #1d232e;
  --hover: #1f2530;
  --chip: #252c38;
  --chip2: #2a303b;
  --off: #2e3542;
  --text: #dfe3ea;
  --muted: #9aa3ae;
  --ph: #6b7480;
  --line: #2c3340;
  --line2: #232934;
  --line3: #3a4250;
  --ok: #6cc08e;
  --ok-soft: #18301f;
  --warn: #e3a752;
  --warn-soft: #36290f;
  --info: #82b3e3;
  --info-soft: #172739;
  --danger: #f08a7e;
  --danger-soft: #3a1c19;
  --purple: #b99be6;
  --purple-soft: #2c2140;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 2px 8px rgba(0, 0, 0, .25);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); font-size: 15px; line-height: 1.5; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .4em; color: var(--heading); }
h1 { font-size: 1.6rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }
a { color: var(--info); }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.hidden { display: none !important; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 16px; }

/* top bar */
.topbar { background: var(--topbar); color: #fff; padding: 0 24px; display: flex; align-items: center; gap: 24px; height: 58px; }
.topbar a { color: #cfd8e1; text-decoration: none; font-weight: 500; padding: 6px 2px; border-bottom: 2px solid transparent; }
.topbar a.active, .topbar a:hover { color: #fff; border-color: var(--accent); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; color: #fff; }
.logo { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 7px; background: var(--accent); color: #fff; font-weight: 700; font-size: .85rem; letter-spacing: .5px; }
.brand-row { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--navy); margin: 28px 0 20px; }
.topbar .who { color: #cfd8e1; font-size: .9rem; }

main { max-width: 1180px; margin: 0 auto; padding: 28px 24px 80px; }
main.narrow { max-width: 760px; }
main.tiny { max-width: 420px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card.center { text-align: center; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.grid2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }

/* buttons & inputs */
button, .btn { font: inherit; font-weight: 500; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); padding: 8px 14px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
button:hover { border-color: var(--line3); }
button.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
button.primary:hover { background: var(--navy-2); }
button.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
button.danger { color: var(--danger); }
button.danger.solid { background: var(--danger); border-color: var(--danger); color: #fff; }
button.link { border: 0; background: none; padding: 0; color: var(--info); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.sm { padding: 4px 10px; font-size: .85rem; }
.icon-btn { border: 0; background: none; font-size: 1.4rem; line-height: 1; padding: 2px 8px; color: var(--muted); }

label.field { display: block; }
label.field > span.lab { display: block; font-weight: 500; font-size: .9rem; margin-bottom: 4px; }
.req { color: var(--danger); margin-left: 2px; }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=number], input[type=password], select, textarea {
  font: inherit; width: 100%; padding: 9px 11px; border: 1px solid var(--line3); border-radius: 8px; background: var(--surface); color: var(--text);
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.choice { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; font-weight: 400; cursor: pointer; }
.choice input { margin-top: 4px; accent-color: var(--navy); }
.fields { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px 16px; }
.fields > * { grid-column: span 6; }
.fields > .half { grid-column: span 3; }
.fields > .third { grid-column: span 2; }
@media (max-width: 640px) { .fields > .half, .fields > .third { grid-column: span 6; } }
.sensitive-tag { font-size: .72rem; font-weight: 500; color: var(--muted); background: var(--line2); border-radius: 4px; padding: 1px 6px; margin-left: 6px; }
.form-error { color: var(--danger); font-size: .9rem; margin-top: 8px; }

/* status pills */
.pill { display: inline-block; font-size: .78rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--chip); color: var(--muted); white-space: nowrap; }
.pill.invited { background: var(--chip); color: var(--muted); }
.pill.in_progress { background: var(--info-soft); color: var(--info); }
.pill.submitted { background: var(--warn-soft); color: var(--warn); }
.pill.docs_signed { background: var(--purple-soft); color: var(--purple); }
.pill.active { background: var(--ok-soft); color: var(--ok); }
.pill.archived { background: var(--chip); color: var(--muted); }
.pill.signed { background: var(--ok-soft); color: var(--ok); }
.pill.sent, .pill.viewed { background: var(--info-soft); color: var(--info); }
.pill.declined, .pill.voided { background: var(--danger-soft); color: var(--danger); }

/* progress bar */
.bar { height: 7px; background: var(--chip); border-radius: 99px; overflow: hidden; min-width: 80px; }
.bar .fill { height: 100%; background: var(--accent); border-radius: 99px; transition: width .3s; }

/* tables */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); }
td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: var(--hover); }
.client-cell strong { display: block; color: var(--navy); }
.table-card { padding: 0; overflow-x: auto; }

/* filter chips */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 16px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 13px; font-size: .88rem; cursor: pointer; }
.chip b { margin-left: 4px; color: var(--muted); }
.chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.chip.on b { color: #cfd8e1; }

/* tracker */
.tracker { list-style: none; display: flex; padding: 0; margin: 8px 0; counter-reset: s; }
.tracker li { flex: 1; position: relative; text-align: center; font-size: .8rem; color: var(--muted); min-width: 0; }
.tracker li::before { content: ""; position: absolute; top: 14px; left: -50%; width: 100%; height: 3px; background: var(--line); z-index: 0; }
.tracker li:first-child::before { display: none; }
.tracker li.done::before, .tracker li.current::before { background: var(--accent); }
.tracker .dot { position: relative; z-index: 1; display: grid; place-items: center; width: 30px; height: 30px; margin: 0 auto 6px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line3); font-weight: 600; font-size: .8rem; }
.tracker li.done .dot { background: var(--accent); border-color: var(--accent); color: #fff; }
.tracker li.current .dot { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.tracker li.current { color: var(--navy); font-weight: 600; }
.tracker .lbl { display: block; padding: 0 2px; }
.tracker.compact .dot { width: 22px; height: 22px; font-size: .7rem; }
.tracker.compact li::before { top: 10px; }
@media (max-width: 640px) { .tracker .lbl { font-size: .68rem; } }

/* definition list */
dl.kv { display: grid; grid-template-columns: minmax(140px, 38%) 1fr; gap: 6px 14px; margin: 0; }
dl.kv dt { color: var(--muted); font-size: .88rem; }
dl.kv dd { margin: 0; word-break: break-word; white-space: pre-wrap; }
.sub-block { border-left: 3px solid var(--line); padding-left: 12px; margin: 6px 0; }
.section-title { margin: 18px 0 8px; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.section-title:first-child { margin-top: 0; }
.masked { font-family: ui-monospace, Consolas, monospace; letter-spacing: .1em; }

/* doc list */
.doc { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.doc:last-child { border-bottom: 0; }
.doc .name { flex: 1; min-width: 140px; }
.doc select { width: auto; padding: 4px 8px; font-size: .85rem; }

/* activity */
.activity { list-style: none; padding: 0; margin: 0; max-height: 420px; overflow-y: auto; }
.activity li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
.activity time { color: var(--muted); font-size: .8rem; display: block; }

/* modal */
.modal-wrap { position: fixed; inset: 0; background: rgba(19, 41, 61, .45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--surface); border-radius: 12px; width: min(560px, 100%); max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.modal-head { display: flex; align-items: center; padding: 18px 22px 0; }
.modal-head h2 { flex: 1; margin: 0; }
.modal-body { padding: 16px 22px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 0 22px 20px; }
.linkbox { display: flex; gap: 8px; }
.linkbox input { font-family: ui-monospace, Consolas, monospace; font-size: .82rem; }
.callout { background: var(--accent-soft); border-radius: 8px; padding: 12px 14px; font-size: .9rem; }
.callout.info { background: var(--info-soft); }
.callout.danger { background: var(--danger-soft); }

#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--navy); color: #fff; padding: 10px 18px; border-radius: 8px; opacity: 0; transition: .2s; pointer-events: none; z-index: 60; }
#toast.show { opacity: 1; transform: translateX(-50%); }
#toast.error { background: var(--danger); }

/* ---------- client portal ---------- */
body.portal .topbar { justify-content: space-between; }
.wizard { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; }
@media (max-width: 820px) { .wizard { grid-template-columns: 1fr; } .steps { display: none; } }
.steps { list-style: none; padding: 0; margin: 0; position: sticky; top: 20px; }
.steps li button { width: 100%; justify-content: flex-start; border: 0; background: none; padding: 9px 10px; border-radius: 8px; color: var(--muted); text-align: left; }
.steps li button:hover { background: var(--chip); }
.steps li.on button { background: var(--surface); color: var(--navy); font-weight: 600; box-shadow: var(--shadow); }
.steps .num { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line3); font-size: .75rem; flex: none; }
.steps li.complete .num { background: var(--ok); border-color: var(--ok); color: #fff; }
.save-state { font-size: .85rem; color: var(--muted); }
.notfound-box { margin-top: 8px; padding: 10px 12px; border-radius: 8px; background: var(--danger-soft); border: 1px solid var(--danger); display: grid; gap: 4px; }
.nf-high { color: var(--danger); font-weight: 700; }
.check-out { font-size: .78rem; background: var(--hover); padding: 8px 10px; border-radius: 6px; white-space: pre-wrap; max-height: 260px; overflow: auto; }
.share-msg { border-left: 4px solid var(--accent); }
.share-files li { gap: 10px; }
main.narrow-wide { max-width: 1080px; margin: 0 auto; padding: 24px 16px; }
.pkg-tree { margin: 8px 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); max-height: 360px; overflow: auto; }
.pkg-dir { font-weight: 600; margin-top: 4px; }
.pkg-file { padding: 2px 0; font-weight: 400; }
.pkg-file a { text-decoration: none; }
.pkg-drop { text-align: center; }
.pkg-share { margin-bottom: 14px; }
.pf-busy { opacity: .55; pointer-events: none; transition: opacity .2s; }
.dropzone.small { padding: 10px; margin-top: 6px; }
.section-desc { color: var(--text, var(--text)); font-weight: 600; font-size: .98rem; line-height: 1.45; margin: 4px 0 14px; }
/* dashboard */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); padding: 14px 16px; }
.tile-v { font-size: 1.6rem; font-weight: 700; color: var(--navy); line-height: 1.1; }
.tile-l { font-size: .85rem; color: var(--muted); margin-top: 4px; }
.tile-s { font-size: .75rem; color: var(--muted); }
.attention { list-style: none; margin: 0; padding: 0; }
.attention li { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-top: 1px solid var(--line, var(--line)); cursor: pointer; border-radius: 8px; }
.attention li:first-child { border-top: 0; }
.attention li:hover { background: var(--hover); }
.attention li.high .att-icon { background: var(--danger-soft); }
.att-icon { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: var(--chip); }
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; align-items: flex-start; }
.board-col { flex: 0 0 236px; background: var(--chip); border-radius: 12px; padding: 10px; min-height: 120px; }
.board-col.over { outline: 2px dashed var(--accent); background: var(--accent-soft); }
.board-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; margin: 2px 2px 10px; font-size: .9rem; }
.board-card { background: var(--surface); border-radius: 10px; box-shadow: var(--shadow); padding: 10px 12px; margin-bottom: 8px; cursor: grab; display: grid; gap: 3px; }
.board-card:hover { outline: 1px solid var(--accent); }
.board-empty { text-align: center; padding: 18px 0; }
.pf-ok { color: var(--ok); font-weight: 600; }
.pf-bad { color: var(--danger); font-weight: 600; }
.nav-search input { width: 200px; padding: 6px 10px; border-radius: 8px; border: 0; font-size: .85rem; }
.entered-by { font-size: .72rem; color: var(--muted); margin-top: 1px; }
.up { color: var(--ok); }
.down { color: var(--danger); }
.prov-table td { vertical-align: top; }
.prov-table tr.selected td { background: var(--ok-soft); }
.prov-table tr.passed td { opacity: .55; }
.table-scroll { overflow-x: auto; }
.nowrap { white-space: nowrap; }
.nowrap .sm { margin-left: 4px; }
.sm-select { width: auto; padding: 4px 6px; font-size: .82rem; }
.versions li { padding: 6px 0; }
.archived-row td { opacity: .6; }
/* message thread */
.thread { max-height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.msg { max-width: 82%; padding: 8px 12px; border-radius: 12px; background: var(--chip); }
.msg.mine { align-self: flex-end; background: var(--accent-soft); }
.msg-meta { font-size: .72rem; color: var(--muted); margin-bottom: 2px; }
.msg-body { white-space: pre-wrap; }
/* client: contact card + next step */
.contact-card { display: flex; gap: 14px; align-items: center; }
.avatar { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #fff; font-weight: 700; }
.next-box { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: var(--accent-soft); }
.req-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line, var(--line)); border-radius: 10px; margin-bottom: 8px; }
.req-row.over { border: 1.5px dashed var(--accent); background: var(--accent-soft); }
/* who entered what, assignments */
.by-tag { margin-left: 6px; font-size: .7rem; font-weight: 500; color: var(--muted); background: var(--chip); padding: 1px 6px; border-radius: 6px; }
.assign-dot { margin-left: auto; flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--accent); color: var(--accent); font-size: .66rem; font-weight: 700; }
.assign-tag { margin-left: auto; flex: none; font-size: .68rem; font-weight: 700; padding: 1px 7px; border-radius: 8px; background: var(--accent); color: #fff; }
.assign-bar { padding: 10px 14px; margin-bottom: 14px; border-radius: 10px; border: 1.5px solid var(--accent); background: var(--surface); font-size: .9rem; }
.sec-picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 10px; margin-top: 4px; }
/* live editing */
.live-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 14px; border-radius: 10px; background: var(--accent-soft); font-size: .9rem; }
.live-bar.hidden { display: none; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); flex: none; box-shadow: 0 0 0 3px rgba(46, 125, 80, .2); }
.who-dot { margin-left: auto; flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: .68rem; font-weight: 700; }
.save-state.err { color: var(--danger); }
.wizard-nav { display: flex; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.repeat-row { border: 1px solid var(--line); border-radius: 8px; padding: 14px; margin-bottom: 10px; background: var(--hover); }
.repeat-row .row-head { display: flex; align-items: center; margin-bottom: 10px; font-weight: 600; font-size: .9rem; color: var(--navy); }
.hero { margin-bottom: 18px; }
.hero h1 { margin-bottom: 4px; }
.mobile-progress { display: none; margin-bottom: 14px; }
@media (max-width: 820px) { .mobile-progress { display: block; } }
.deal-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: var(--surface); box-shadow: var(--shadow); }
.deal-card + .deal-card { margin-top: 14px; }
/* admin: collapsible deal rows */
.deal-row { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.deal-row + .deal-row { margin-top: 10px; }
.deal-row-head { width: 100%; display: grid; grid-template-columns: 18px minmax(180px, 2fr) minmax(150px, 1.2fr) minmax(150px, 1.2fr) auto; gap: 14px; align-items: center;
  padding: 12px 16px; background: none; border: 0; text-align: left; cursor: pointer; border-radius: var(--radius); }
.deal-row-head:hover { background: var(--hover); }
.deal-row .chev { transition: transform .15s; color: var(--muted); }
.deal-row.open .chev { transform: rotate(90deg); }
.deal-row.open .deal-row-head { border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
.deal-row-body { display: none; padding: 0 12px 12px; }
.deal-row.open .deal-row-body { display: block; }
.deal-row-body .deal-card { border: 0; box-shadow: none; padding: 12px 4px 0; }
.drh-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.stage-bar { display: flex; gap: 3px; margin-top: 4px; }
.stage-bar span { flex: 1; height: 5px; border-radius: 3px; background: var(--off); }
.stage-bar span.on { background: var(--accent); }
@media (max-width: 760px) { .deal-row-head { grid-template-columns: 18px 1fr; } .drh-stage, .drh-pf, .drh-badges { grid-column: 2; justify-content: flex-start; } }
.missing-list { margin: 8px 0 0; padding-left: 18px; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.qr { display: block; margin: 10px auto; border: 1px solid var(--line); border-radius: 8px; }
code.secret { display: block; text-align: center; font-size: .95rem; letter-spacing: .12em; background: var(--line2); padding: 8px; border-radius: 6px; word-break: break-all; }
#nav { gap: 22px; flex: 1; }
a.btn { color: var(--text); }
a.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
a.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; padding: 8px 14px; font-size: 1rem; }
a.btn.sm { padding: 5px 12px; font-size: .88rem; white-space: nowrap; }
.crumb { margin-bottom: 14px; font-size: .9rem; }
.crumb a { text-decoration: none; }
.todo-list { list-style: none; padding: 0; margin: 0; }
.todo { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.todo:last-child { border-bottom: 0; }
.todo-main { flex: 1; min-width: 0; }
.todo-main a { text-decoration: none; color: var(--navy); }
.todo-main .bar { max-width: 220px; margin-top: 6px; }
.deal-card a { text-decoration: none; color: var(--navy); }
.form-block { border: 1px solid var(--line); border-radius: 8px; padding: 14px; background: var(--hover); }
.form-block + .form-block { margin-top: 12px; }
.form-block.archived { opacity: .7; }
.form-block .linkbox input { font-size: .78rem; padding: 6px 9px; }

.brand-logo { height: 32px; width: auto; display: block; }
.brand-sub { color: #c9d0e6; font-weight: 500; font-size: .9rem; padding-left: 12px; margin-left: 2px; border-left: 1px solid rgba(255,255,255,.25); }
.brand-row img { height: 34px; width: auto; }
.file-row { padding: 2px 0; }
.file-row a { font-weight: 500; }
pre.email-body { white-space: pre-wrap; word-break: break-word; background: var(--bg); border-radius: 8px; padding: 12px; font-size: .85rem; max-height: 50vh; overflow: auto; }
.upload-list { list-style: none; padding: 0; margin: 0 0 8px; }
.upload-list li { display: flex; gap: 10px; align-items: center; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; background: var(--surface); font-size: .9rem; }
.upload-list li .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropzone { display: block; border: 1.5px dashed var(--line3); border-radius: 8px; padding: 14px; text-align: center; color: var(--muted); font-size: .9rem; cursor: pointer; background: var(--surface); }
.dropzone:hover, .dropzone.over { border-color: var(--accent); color: var(--text); }
.dropzone input { display: none; }
.code-input { font-size: 1.6rem; letter-spacing: .5em; text-align: center; font-family: ui-monospace, Consolas, monospace; max-width: 260px; margin: 0 auto; display: block; }
.warn-box { background: var(--warn-soft); border: 1px solid var(--warn); border-radius: 8px; padding: 12px 14px; font-size: .9rem; }

.switcher { display: flex; align-items: center; gap: 8px; color: #c9d0e6; font-size: .85rem; }
.switcher select { width: auto; padding: 5px 10px; font-size: .9rem; background: #2a3a78; color: #fff; border-color: #3d4f94; }
button.company-pick { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 16px 18px; text-align: left; border-radius: 10px; box-shadow: var(--shadow); }
button.company-pick:hover { border-color: var(--accent); }

.from-doc { display: inline-block; margin-left: 8px; font-size: .72rem; font-weight: 500; color: var(--accent-ink); background: var(--accent-soft); border-radius: 4px; padding: 1px 6px; }
.doc-mismatch { font-size: .8rem; color: var(--danger); margin-top: 2px; }
.doc-match { font-size: .75rem; color: var(--muted); margin-top: 2px; }

.doc-row { grid-column: span 6; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; background: var(--surface); }
.doc-row.has { border-color: var(--ok); background: var(--ok-soft); }
.doc-row-head { display: flex; align-items: center; gap: 10px; }
.doc-check { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line3); font-size: .75rem; flex: none; color: #fff; }
.doc-row.has .doc-check { background: var(--ok); border-color: var(--ok); }
.doc-name { flex: 1; font-size: .92rem; }
.doc-row .upload-list { margin: 8px 0 0 30px; }
.doc-row .upload-list li { padding: 4px 8px; }
.fields > .doc-row + .doc-row { margin-top: -6px; }
.steps-check .step-row { padding: 3px 0; font-size: .9rem; }
.steps-check .section-title { margin-top: 12px; }

.doc-row.na { background: var(--hover); }
.doc-row.na .doc-check { background: var(--line3); border-color: var(--line3); }
.na-toggle { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); cursor: pointer; white-space: nowrap; }

.pf-box { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-top: 12px; background: var(--panel); }
.pf-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; margin-top: 10px; }
.pf-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.pf-kpi .pf-val { font-weight: 600; color: var(--navy); }
.pf-kpi.good .pf-val { color: var(--ok); }
.pf-kpi.bad .pf-val { color: var(--danger); }
.pf-table { margin-top: 8px; font-size: .85rem; }
.pf-table td, .pf-table th { padding: 6px 8px; vertical-align: top; }
.doc-row.over { border: 1.5px dashed var(--accent); background: var(--accent-soft); }
.test-btn { border-style: dashed; }

/* theme toggle (in every top bar) */
.theme-toggle { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .3); background: transparent; color: #fff;
  display: inline-flex; align-items: center; gap: 7px; font-size: 13px; cursor: pointer; white-space: nowrap; font-weight: 500; }
.theme-toggle:hover { border-color: rgba(255, 255, 255, .6); background: rgba(255, 255, 255, .06); }
.theme-toggle .dot { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid #fff; background: transparent; }
html[data-theme="dark"] .theme-toggle .dot { background: #fff; }
html[data-theme="dark"] img.brand-logo { filter: none; }
html[data-theme="dark"] input, html[data-theme="dark"] select, html[data-theme="dark"] textarea { background: var(--surface); color: var(--text); border-color: var(--line3); }

/* top bars (design round 1-2): WFDC wordmark, nav with orange underline, theme pill, search, avatar */
.tb { height: 56px; gap: 14px; padding: 0 24px; position: sticky; top: 0; z-index: 30; }
.tb-mark { font-weight: 800; letter-spacing: .06em; font-size: 17px; color: #fff; }
.tb-sub { font-size: 12px; color: rgba(255, 255, 255, .7); margin-left: -6px; align-self: flex-end; padding-bottom: 18px; }
.tb-divider { width: 1px; height: 20px; background: rgba(255, 255, 255, .25); }
.tb-co { font-size: 14px; color: #fff; }
.tb-user { font-size: 14px; color: rgba(255, 255, 255, .85); }
.tb-nav { display: flex; align-self: stretch; margin-left: 26px; gap: 2px; }
.tb-nav a { display: flex; align-items: center; padding: 0 12px; border-bottom: 3px solid transparent; border-top: 3px solid transparent; color: rgba(255, 255, 255, .78); font-size: 14px; font-weight: 500; }
.tb-nav a:hover { color: #fff; border-bottom-color: rgba(224, 130, 50, .5); }
.tb-nav a.active { color: #fff; font-weight: 600; border-bottom-color: var(--accent); }
.tb-nav.hidden { display: none; }
.tb-search input { width: 300px; height: 34px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .1); color: #fff; padding: 0 12px; font-size: 13px; }
.tb-search input::placeholder { color: rgba(255, 255, 255, .6); }
.tb-search input:focus { outline: none; background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .35); }
.tb-me { position: relative; }
.tb-avatar { width: 32px; height: 32px; border-radius: 50%; background: #fff; color: var(--topbar); border: 0; font-weight: 700; font-size: 12px; cursor: pointer; padding: 0; }
.tb-menu { display: none; position: absolute; right: 0; top: 42px; min-width: 200px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); padding: 6px; z-index: 40; }
.tb-me.open .tb-menu { display: grid; }
.tb-menu-name { padding: 8px 10px; font-weight: 600; color: var(--heading); border-bottom: 1px solid var(--line2); margin-bottom: 4px; }
.tb-menu a, .tb-menu button { display: block; text-align: left; padding: 8px 10px; border-radius: 6px; color: var(--text); background: none; border: 0; font-size: 14px; cursor: pointer; text-decoration: none; }
.tb-menu a:hover, .tb-menu button:hover { background: var(--hover); }
@media (max-width: 1100px) { .tb-search input { width: 180px; } }
@media (max-width: 760px) { .tb-sub, .tb-user { display: none; } }   /* the rest of the phone top bar is in mobile.css */

/* admin pages use the full width (design 1a/1b) */
body:not(.portal) main { max-width: 1440px; }
/* dashboard (design 1a) */
.dash-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.dash-head h1 { flex: 1; margin: 0; font-size: 24px; font-weight: 650; }
.dash-head .choice { margin: 0; font-size: 14px; }
.btn, a.btn { height: 36px; display: inline-flex; align-items: center; }
.dtiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.dtile { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.dtile-l { font-size: 13px; color: var(--muted); }
.dtile-v { font-size: 28px; font-weight: 650; color: var(--heading); font-variant-numeric: tabular-nums; line-height: 1.15; }
.dtile-s { font-size: 12px; color: var(--muted); min-height: 1em; }
.dash-mid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; margin-bottom: 20px; }
.dcard { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.dcard-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.dcard-head h2 { font-size: 16px; font-weight: 650; margin: 0; flex: none; }
.dcard-head .grow { flex: 1; }
.dcard-head > h2 + .muted:not(.grow) { margin-left: auto; }
.att-grid { display: grid; grid-template-columns: 1fr 1fr; }
.att-item { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border: 0; border-bottom: 1px solid var(--line2); background: none; text-align: left; cursor: pointer; color: var(--text); font: inherit; }
.att-item:hover { background: var(--hover); }
.att-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.att-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.att-label { font-size: 14px; font-weight: 550; }
.att-client { font-size: 13px; color: var(--muted); }
.att-age { font-size: 12px; color: var(--muted); flex: none; }
.rem-card { background: var(--info-soft); border-radius: 10px; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; align-items: flex-start; }
.rem-title { font-weight: 650; color: var(--info); }
.rem-card .link { font-weight: 600; font-size: 14px; padding: 0; }
.dcard.pipe .dcard-head { border-bottom: 0; }
.seg { display: flex; background: var(--chip); border-radius: 8px; padding: 3px; gap: 2px; }
.seg button { padding: 5px 14px; border-radius: 6px; font-size: 13px; color: var(--muted); background: none; border: 0; cursor: pointer; height: auto; }
.seg button.on { background: var(--surface); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); font-weight: 600; color: var(--heading); }
.stage-strip { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ss-cell { padding: 10px 12px; border: 0; border-right: 1px solid var(--line); background: none; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 2px; font: inherit; color: var(--text); border-radius: 0; height: auto; }
.ss-cell:last-child { border-right: 0; }
.ss-cell:hover { background: var(--hover); }
.ss-cell.on { background: var(--accent-soft); box-shadow: inset 0 -3px 0 var(--accent); }
.ss-l { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-cell.on .ss-l { color: var(--accent-ink); font-weight: 600; }
.ss-v { font-size: 15px; font-weight: 650; color: var(--heading); }
.ss-v span { font-weight: 400; color: var(--muted); font-size: 13px; }
.pt-row { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.6fr) 80px 100px minmax(0, 1.5fr) 70px minmax(0, 1.4fr); align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line2); font-size: 14px; cursor: pointer; gap: 0; }
.pt-row:hover { background: var(--hover); }
.pt-row:last-child { border-bottom: 0; border-radius: 0 0 10px 10px; }
.pt-head { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 10px 18px; border-bottom: 1px solid var(--line); background: var(--hover); cursor: default; }
.pt-row .num { text-align: right; font-variant-numeric: tabular-nums; }
.pt-row .strong { font-weight: 550; }
.pt-row .pfc { padding-left: 24px; }
.pt-deal { display: flex; flex-direction: column; min-width: 0; }
.pt-deal strong { color: var(--heading); font-weight: 600; }
.pt-caret { border: 1px solid var(--line); background: var(--card); width: 22px; height: 22px; padding: 0; margin-right: 8px; border-radius: 6px; cursor: pointer; color: var(--heading); font-size: 12px; line-height: 1; vertical-align: 1px; }
.pt-caret:hover { border-color: var(--accent); color: var(--accent); }
.pt-sub { background: var(--hover); }
.pt-sub .pt-deal { padding-left: 22px; }
.pt-sub .pt-deal strong { font-weight: 500; }
.pt-deal span { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-stage { display: flex; flex-direction: column; gap: 6px; padding-right: 20px; font-size: 13px; }
.pt-empty { padding: 24px 18px; text-align: center; }
.segbar { display: flex; gap: 2px; }
.segbar span { flex: 1; height: 4px; border-radius: 2px; background: var(--off); }
.segbar span.done { background: #e08232; }
.segbar span.cur { background: #f0b27c; }
.av-sm { width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.av-xs { width: 20px; height: 20px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 9px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.flags { display: flex; gap: 6px; flex-wrap: wrap; }
.flag { font-size: 12px; padding: 2px 8px; border-radius: 999px; font-weight: 550; white-space: nowrap; }
.flag-accent { background: var(--accent-soft); color: var(--accent-ink); }
.flag-warn { background: var(--warn-soft); color: var(--warn); }
.flag-info { background: var(--info-soft); color: var(--info); }
.flag-ok { background: var(--ok-soft); color: var(--ok); }
.flag-muted { background: var(--chip2); color: var(--muted); }
.flag-danger { background: var(--danger-soft); color: var(--danger); }
.pboard { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 8px; padding: 12px; background: var(--hover); border-radius: 0 0 10px 10px; }
.pb-col { display: flex; flex-direction: column; gap: 8px; min-height: 220px; border-radius: 8px; }
.pb-col.over { outline: 2px dashed var(--accent); background: var(--accent-soft); }
.pb-card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 4px; cursor: grab; font-size: 12px; }
.pb-card strong { font-size: 13px; color: var(--heading); }
.pb-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 2px; font-size: 11px; }
@media (max-width: 1100px) { .dtiles { grid-template-columns: repeat(3, 1fr); } .dash-mid { grid-template-columns: 1fr; } .att-grid { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .stage-strip, .pboard { overflow-x: auto; grid-template-columns: repeat(9, 150px); } .ptable { overflow-x: auto; } .pt-row { min-width: 900px; } .dtiles { grid-template-columns: repeat(2, 1fr); } }
.ss-cell { align-items: flex-start; justify-content: flex-start; }
.tb-avatar { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; }

/* client page (design 1b) */
.cd-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.crumbs { font-size: 13px; color: var(--muted); }
.cd-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cd-title h1 { font-size: 24px; font-weight: 650; margin: 0; }
.cd-sub { font-size: 14px; color: var(--muted); flex: 1; }
.cd-title button, .cd-title .btn { height: 34px; }
.onb-card { margin-top: 12px; }
.cd-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.cd-main, .cd-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cd-main > .card, .cd-side > .card { margin: 0; }
.side-card h2 { font-size: 15px; }
.side-link .linkbox input { font-family: ui-monospace, Consolas, monospace; font-size: 12px; background: var(--hover); }
.kv-tight { grid-template-columns: 80px 1fr; row-gap: 4px; font-size: 14px; }
.notes-box { margin-top: 10px; background: var(--hover); border-radius: 8px; padding: 10px 12px; font-size: 13px; white-space: pre-wrap; }
.people li { gap: 10px; align-items: center; }
.av-md { width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.act-dots { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.act-dots li { display: flex; gap: 10px; align-items: baseline; font-size: 13px; }
.act-dots li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--line3); flex: none; transform: translateY(-2px); }
.act-text { flex: 1; min-width: 0; }
.act-age { color: var(--muted); font-size: 12px; flex: none; }
.danger-card h2 { color: var(--danger); }
/* deals card + rows */
.deals-card { padding: 0; overflow: hidden; }
.deals-card .dcard-head { border-bottom: 1px solid var(--line); }
.deal-row { border: 0; border-radius: 0; border-bottom: 1px solid var(--line); background: var(--surface); }
.deal-row:last-child { border-bottom: 0; }
.deal-row + .deal-row { margin-top: 0; }
.deal-row-head { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 0; grid-template-columns: none; }
.deal-row.open .deal-row-head { background: var(--hover); border-bottom: 1px solid var(--line); border-radius: 0; }
.deal-row .chev { font-size: 12px; width: 10px; color: var(--muted); }
.drh-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.drh-main b { font-weight: 650; color: var(--heading); font-size: 16px; }
.drh-main span { font-size: 13px; color: var(--muted); }
.deal-row-head .flags { flex: none; justify-content: flex-end; max-width: 330px; }
.drh-stage { width: 190px; display: flex; flex-direction: column; gap: 5px; font-size: 13px; flex: none; }
.drh-pf { width: 170px; font-size: 13px; text-align: right; flex: none; }
.deal-row-body { padding: 0; }
/* opened deal */
.deal-open { border-bottom: 0; }
.deal-top { padding: 16px 18px 0; display: flex; flex-direction: column; gap: 14px; }
.btrack { display: flex; padding: 4px 0 6px; }
.bt-step { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; }
.bt-line { position: absolute; top: 13px; left: 50%; width: 100%; height: 2px; background: var(--line); }
.bt-line.done { background: #e08232; }
.bt-dot { position: relative; width: 28px; height: 28px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line3); color: var(--muted); font-size: 13px; display: flex; align-items: center; justify-content: center; }
.bt-step.done .bt-dot { background: #e08232; border-color: #e08232; color: #fff; font-weight: 700; }
.bt-step.cur .bt-dot { border: 2px solid #e08232; color: var(--accent-ink); font-weight: 700; }
.bt-label { font-size: 12px; text-align: center; color: var(--muted); line-height: 1.25; padding: 0 4px; }
.bt-step.done .bt-label { color: var(--text); }
.bt-step.cur .bt-label { color: var(--heading); font-weight: 650; }
.deal-meta { display: flex; gap: 8px; align-items: center; }
.deal-meta .grow { flex: 1; }
.stage-sel { width: auto; height: 34px; }
.deal-tabs { display: flex; gap: 2px; padding: 0 18px; border-bottom: 1px solid var(--line); margin-top: 8px; overflow-x: auto; }
.dtab { padding: 10px 14px; font-size: 14px; color: var(--muted); border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px; background: none; border-radius: 0; display: flex; gap: 6px; align-items: center; cursor: pointer; height: auto; white-space: nowrap; }
.dtab:hover { color: var(--heading); }
.dtab.on { font-weight: 650; color: var(--heading); border-bottom-color: #e08232; }
.dtab-n { font-size: 11px; background: var(--accent-soft); color: var(--accent-ink); border-radius: 999px; padding: 1px 7px; font-weight: 700; }
.dtab.on .dtab-n { background: #e08232; color: #fff; }
.tab-pane { padding: 18px; min-height: 260px; }
.stack-lg { display: flex; flex-direction: column; gap: 18px; }
.sec-h { font-size: 15px; font-weight: 650; color: var(--heading); margin: 0 0 8px; }
.note-bar { border-radius: 8px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; font-size: 14px; }
.note-bar > div { flex: 1; }
.note-bar.warn { background: var(--warn-soft); }
.note-bar.warn b { color: var(--warn); }
.mini-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mini-kpi { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.mk-l { font-size: 12px; color: var(--muted); }
.mk-v { font-size: 18px; font-weight: 650; color: var(--heading); }
.mk-s { font-size: 12px; color: var(--muted); }
.ov-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; }
.ov-grid h3 { font-size: 15px; font-weight: 650; margin: 0 0 8px; }
.ov-head { display: flex; align-items: center; }
.ov-head h3 { margin: 0; }
.kv-lines { grid-template-columns: 150px 1fr; row-gap: 0; font-size: 14px; margin-top: 8px; }
.kv-lines dt, .kv-lines dd { padding: 7px 0; border-bottom: 1px solid var(--line2); margin: 0; }
.kv-lines dt { color: var(--muted); }
.agreements .doc { padding: 8px 0; border-bottom: 1px solid var(--line2); }
.hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13px; }
.hist li { display: grid; grid-template-columns: 66px 1fr; gap: 10px; }
.hist-d { color: var(--muted); }
.step-stage { font-size: 14px; font-weight: 650; color: var(--heading); margin: 12px 0 4px; display: flex; gap: 8px; align-items: center; }
.cat-h { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 4px 0; }
.pd-row { display: flex; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line2); font-size: 14px; }
.pd-row .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wfdc-only { background: var(--navy); color: #fff; font-size: 11px; }
.msg-pane { display: flex; flex-direction: column; gap: 10px; }
.thread-tall { max-height: 460px; }
/* pro forma (design 1b → Pro forma tab) */
.pf-pane { display: flex; flex-direction: column; gap: 14px; }
.pf-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pf-head .grow { flex: 1; }
.pf-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pf-actions .btn, .pf-actions button { height: 34px; }
.pf-kpis6 { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.pfk { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.pfk-l { font-size: 12px; color: var(--muted); }
.pfk-v { font-size: 18px; font-weight: 650; color: var(--heading); line-height: 1.2; }
.pfk-s { font-size: 12px; color: var(--muted); }
.pfk.bad .pfk-v { color: var(--danger); }
.pf-alert { background: var(--danger-soft); border-radius: 8px; padding: 12px 14px; font-size: 14px; display: grid; gap: 4px; }
.pf-alert-t { font-weight: 650; color: var(--danger); }
.open-items { width: 100%; }
.open-items th { text-transform: uppercase; font-size: 12px; letter-spacing: .04em; color: var(--muted); font-weight: 500; }
.pf-toggles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pf-tog { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 14px; text-align: left; cursor: pointer; height: auto; }
.pf-tog .grow { flex: 1; }
.pf-tog .chev { font-size: 11px; color: var(--muted); transition: transform .15s; }
.pf-tog.on { border-color: #e08232; }
.pf-tog.on .chev { transform: rotate(90deg); }
@media (max-width: 1200px) { .cd-grid { grid-template-columns: 1fr; } .pf-kpis6 { grid-template-columns: repeat(3, 1fr); } .deal-row-head .flags { display: none; } }
@media (max-width: 800px) { .ov-grid, .mini-kpis, .pf-toggles { grid-template-columns: 1fr; } .drh-stage, .drh-pf { display: none; } }

.deal-row-head { font-weight: 400; }
.stage-sel { height: 34px; padding: 0 10px; line-height: 32px; font-size: 14px; }
.ag-row { padding: 8px 0; border-bottom: 1px solid var(--line2); }
.ag-line { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.ag-line .grow { flex: 1; }
.ag-more { margin-top: 8px; }
.ag-more .doc { flex-wrap: wrap; }
.tab-sec .section-title { font-size: 15px; font-weight: 650; color: var(--heading); text-transform: none; letter-spacing: 0; }

/* send deal modal (design 3e) */
.modal.modal-wide { width: min(960px, 100%); }
.modal-wide .modal-body { padding: 0; }
.modal-wide .modal-head { padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-wide .modal-actions { border-top: 1px solid var(--line); padding: 14px 22px; }
.send-modal { display: grid; grid-template-columns: 1fr 1fr; min-height: 420px; }
.sm-left { padding: 18px 22px; display: flex; flex-direction: column; gap: 10px; border-right: 1px solid var(--line); }
.sm-right { padding: 18px 22px; display: flex; flex-direction: column; gap: 8px; background: var(--panel); max-height: 62vh; overflow-y: auto; }
.cap { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.sm-rcpt { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.sm-rcpt input { margin-top: 3px; }
.sm-rcpt > span { display: flex; flex-direction: column; }
.sm-inc > span { display: flex; flex-direction: column; }
.sm-sub { margin-top: 8px; font-size: 14px; }
.sp-tree { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.sp-row { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--line2); font-size: 13px; cursor: pointer; margin: 0; }
.sp-tree > :last-child .sp-row:last-child, .sp-tree > .sp-row:last-child { border-bottom: 0; }
.sp-row .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-doc { display: flex; gap: 8px; align-items: center; font-size: 14px; margin: 2px 0; }
@media (max-width: 800px) { .send-modal { grid-template-columns: 1fr; } .sm-left { border-right: 0; border-bottom: 1px solid var(--line); } }
/* financier deal room (design 3a–3d) */
main.narrow-wide { max-width: 1080px; padding: 32px 24px 40px; }
main.room-center { max-width: none; min-height: calc(100vh - 56px); display: flex; align-items: center; justify-content: center; padding: 24px; }
.room-card { width: 460px; max-width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.room-card.narrow { width: 400px; padding: 28px; gap: 10px; }
.room-card h1 { font-size: 24px; font-weight: 650; margin: 0; }
.room-card .muted { font-size: 14px; margin: 0; }
.room-form { display: flex; flex-direction: column; gap: 14px; }
.room-lab { font-size: 14px; font-weight: 600; margin-top: 6px; }
.room-code { height: 56px; border: 1.5px solid var(--line3); border-radius: 8px; text-align: center; font-family: ui-monospace, Consolas, monospace; font-size: 26px; letter-spacing: .5em; color: var(--text); background: var(--surface); }
.room-err { font-size: 13px; color: var(--danger); font-weight: 550; min-height: 0; }
.room-err:empty { display: none; }
.room-wide { height: 44px; width: 100%; font-size: 15px; }
.room-small { font-size: 13px; color: var(--muted); }
.room-small.center { text-align: center; }
.link.strong, a.strong { font-weight: 600; }
.room-foot { border-top: 1px solid var(--line2); padding-top: 12px; font-size: 12px; color: var(--muted); text-align: center; }
.room { display: flex; flex-direction: column; gap: 20px; }
.room-hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.room-hero.no-map { grid-template-columns: 1fr; }
.rh-main { padding: 26px 28px; display: flex; flex-direction: column; gap: 18px; }
.rh-main h1 { font-size: 30px; font-weight: 650; margin: 0 0 4px; }
.rh-main .muted { font-size: 14px; }
.rh-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line2); padding-top: 16px; }
.rs { display: flex; flex-direction: column; gap: 2px; }
.rs-l { font-size: 12px; color: var(--muted); }
.rs-v { font-size: 17px; font-weight: 650; color: var(--heading); }
.rs-v.accent { color: #e08232; }
.rh-msg { background: var(--accent-soft); border-radius: 8px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.rh-msg-t { font-size: 12px; font-weight: 700; color: var(--accent-ink); letter-spacing: .04em; }
.rh-msg-b { font-size: 14px; white-space: pre-wrap; }
.rh-map { background: repeating-linear-gradient(135deg, var(--chip) 0 10px, var(--chip2) 10px 20px); display: flex; align-items: center; justify-content: center; min-height: 260px; border-left: 1px solid var(--line); text-decoration: none; }
.rh-map span { font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: var(--muted); background: var(--surface); padding: 4px 10px; border-radius: 4px; }
.room-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.room-col { display: flex; flex-direction: column; gap: 20px; }
.room-card-p { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.room-card-p h2 { font-size: 17px; font-weight: 650; margin: 0; }
.room-card-p h3 { font-size: 14px; font-weight: 650; margin: 10px 0 0; color: var(--heading); }
.room-card-p p { font-size: 14px; margin: 0; }
.room-kv { display: grid; grid-template-columns: 150px 1fr; font-size: 14px; }
.room-kv .k { color: var(--muted); padding: 7px 0; border-bottom: 1px solid var(--line2); }
.room-kv .v { padding: 7px 0; border-bottom: 1px solid var(--line2); }
.room-kv.strong-v .v { font-weight: 550; }
.docs-head { display: flex; align-items: center; gap: 10px; }
.docs-head > div { flex: 1; display: flex; flex-direction: column; }
.tr { border: 1px solid var(--line); border-radius: 8px; max-height: 360px; overflow: auto; }
.tr-row { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border: 0; border-bottom: 1px solid var(--line2); font-size: 14px; width: 100%; background: none; text-align: left; color: var(--text); border-radius: 0; height: auto; font-weight: 400; }
.tr > :last-child, .tr > div:last-child > :last-child { border-bottom: 0; }
.tr-row:hover { background: var(--hover); }
.tr-dir { cursor: pointer; }
.tr-chev { width: 12px; color: var(--muted); font-size: 11px; flex: none; }
.tr-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
b.tr-name { font-weight: 650; }
.tr-size { font-size: 12px; color: var(--muted); min-width: 56px; text-align: right; flex: none; }
.xb { width: 32px; height: 20px; border-radius: 4px; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; font-family: ui-monospace, Consolas, monospace; flex: none; }
.x-pdf { background: var(--danger-soft); color: var(--danger); }
.x-xls { background: var(--ok-soft); color: var(--ok); }
.x-kmz { background: var(--info-soft); color: var(--info); }
.x-doc { background: var(--info-soft); color: var(--info); }
.x-img { background: var(--purple-soft); color: var(--purple); }
.x-dir { background: var(--chip2); color: var(--muted); }
.room-extra { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 4px 0; }
.chip-tag { font-size: 11px; padding: 1px 8px; border-radius: 999px; background: var(--chip2); color: var(--muted); font-weight: 600; }
.room-contact { flex-direction: row; align-items: center; gap: 14px; padding: 20px 22px; font-size: 14px; }
.room-contact b { color: var(--heading); }
.av-lg { width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.room-bar { display: none; }
@media (max-width: 760px) {
  main.narrow-wide { padding: 20px 16px 96px; }
  .room-hero, .room-grid { grid-template-columns: 1fr; }
  .rh-map { display: none; }
  .rh-main { padding: 0; background: var(--bg); gap: 14px; }
  .room-hero { background: none; border: 0; }
  .rh-main h1 { font-size: 24px; }
  .rh-main .muted { font-size: 13px; }
  .rh-stats { grid-template-columns: 1fr 1fr; gap: 8px; border: 0; padding: 0; }
  .rs { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
  .rs-l { font-size: 11px; }
  .room-card-p { padding: 16px; }
  .room-contact { display: none; }
  .room-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px; background: var(--surface); border-top: 1px solid var(--line); z-index: 20; }
  .room-bar .btn { height: 48px; justify-content: center; font-size: 15px; }
  .room-card { padding: 24px; }
}
.room a { text-decoration: none; }
.room a:hover { text-decoration: underline; }
.rs { min-width: 0; padding-right: 10px; }
.rs-v { overflow-wrap: anywhere; }
.rh-map span { max-width: 90%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-kv .v { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .room-grid { grid-template-columns: minmax(0, 1fr); }
  .room-col { order: -1; }
  .room-kv { grid-template-columns: 120px minmax(0, 1fr); }
  .rs { padding-right: 12px; }
}
.room-wide { justify-content: center; display: inline-flex; align-items: center; }

/* client dashboard (design 2a / 2b / 2c) */
body.portal main { max-width: 1200px; padding: 36px 28px 40px; }
.cdash { display: flex; flex-direction: column; gap: 24px; }
.cdash.onboarding { max-width: 760px; margin: 0 auto; }
.cd-hello h1 { font-size: 26px; font-weight: 650; margin: 0 0 4px; }
.cd-hello p { font-size: 15px; margin: 0; }
.row-end { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.row-end .grow { flex: 1; min-width: 240px; }
.row-end .btn { height: 38px; }
.cd-cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.cd-maincol { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.cd-sidecol { display: flex; flex-direction: column; gap: 16px; }
.cd-sec { font-size: 16px; font-weight: 650; margin: 4px 0 0; }
.ctodo-card { padding: 0; overflow: hidden; }
.ctodo-head { padding: 14px 20px; border-bottom: 1px solid var(--line); font-size: 16px; font-weight: 650; color: var(--heading); }
.ctodo-head .muted { font-weight: 400; font-size: 14px; }
.ctodo { display: flex; align-items: center; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--line2); }
.ctodo:last-child { border-bottom: 0; }
.ctodo-main { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ctodo-main a { text-decoration: none; color: var(--text); }
.ctodo-main b { font-size: 15px; font-weight: 600; }
.ctodo-main span { font-size: 13px; color: var(--muted); }
.ctag { font-size: 12px; padding: 2px 9px; border-radius: 999px; font-weight: 600; white-space: nowrap; }
.t-warn { background: var(--warn-soft); color: var(--warn); }
.t-accent { background: var(--accent-soft); color: var(--accent-ink); }
.t-info { background: var(--info-soft); color: var(--info); }
.t-ok { background: var(--ok-soft); color: var(--ok); }
a.btn.cta-orange { background: #e08232; border-color: #e08232; color: #fff; min-width: 110px; justify-content: center; height: 34px; font-weight: 600; }
a.btn.cta-orange:hover { background: #c96f23; }
a.btn.cta-orange.lg { height: 40px; font-size: 15px; padding: 0 20px; }
a.btn.cta-outline { min-width: 110px; justify-content: center; height: 34px; font-weight: 600; }
.cproj { padding: 20px; display: flex; flex-direction: column; gap: 16px; margin: 0; }
.cproj-head { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.cproj-head .grow { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 200px; }
.cproj-head a { text-decoration: none; }
.cproj-head b { font-size: 18px; font-weight: 650; color: var(--heading); }
.ctrack { display: flex; }
.ct-step { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; }
.ct-line { position: absolute; top: 11px; left: 50%; width: 100%; height: 2px; background: var(--line); }
.ct-line.done { background: #e08232; }
.ct-dot { position: relative; width: 24px; height: 24px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line3); color: var(--muted); font-size: 12px; display: flex; align-items: center; justify-content: center; }
.ct-step.done .ct-dot { background: #e08232; border-color: #e08232; color: #fff; font-weight: 700; }
.ct-step.cur .ct-dot { border: 2px solid #e08232; color: var(--accent-ink); font-weight: 700; }
.ct-label { font-size: 11.5px; text-align: center; color: var(--muted); line-height: 1.25; padding: 0 3px; }
.ct-step.done .ct-label { color: var(--text); }
.ct-step.cur .ct-label { color: var(--heading); font-weight: 650; }
.cproj-mobile { display: none; flex-direction: column; gap: 8px; }
.next-row { display: flex; align-items: center; gap: 16px; background: var(--accent-soft); border-radius: 8px; padding: 12px 14px; font-size: 14px; }
.next-row .grow { flex: 1; }
.next-row b { color: var(--accent-ink); }
.next-row .btn { white-space: nowrap; }
.cd-done { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
.cd-done-t { font-weight: 650; }
.cd-done a { text-decoration: none; }
.ccontact { padding: 18px; display: flex; flex-direction: column; gap: 12px; margin: 0; }
.ccontact-who { display: flex; gap: 12px; align-items: center; }
.ccontact-who > div { display: flex; flex-direction: column; }
.ccontact-who b { font-size: 15px; color: var(--heading); }
.ccontact-lines { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.ccontact-lines a { text-decoration: none; }
/* onboarding (2b) */
.onb { padding: 22px 24px; display: flex; flex-direction: column; gap: 18px; margin: 0; }
.onb-steps { display: flex; }
.os { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; }
.os-line { position: absolute; top: 15px; left: 50%; width: 100%; height: 2px; background: var(--line); }
.os-line.done { background: #e08232; }
.os-dot { position: relative; width: 32px; height: 32px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line3); color: var(--muted); display: flex; align-items: center; justify-content: center; }
.os.done .os-dot { background: #e08232; border-color: #e08232; color: #fff; font-weight: 700; }
.os.cur .os-dot { border: 2px solid #e08232; color: var(--accent-ink); font-weight: 700; }
.os-label { font-size: 14px; color: var(--muted); }
.os.cur .os-label { color: var(--heading); font-weight: 650; }
.onb-form { border-top: 1px solid var(--line2); padding-top: 18px; display: flex; align-items: center; gap: 18px; }
.onb-form .grow { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.onb-form b { font-size: 16px; font-weight: 650; }
.onb-bar { display: flex; align-items: center; gap: 10px; }
.onb-bar .bar { flex: 1; height: 6px; background: var(--line2); border-radius: 3px; overflow: hidden; }
.onb-bar .bar span { display: block; height: 100%; background: #e08232; }
.contact-inline { display: flex; gap: 14px; align-items: center; padding: 4px; font-size: 14px; }
.contact-inline > div { display: flex; flex-direction: column; }
.contact-inline a { text-decoration: none; }
p.center { text-align: center; }
@media (max-width: 860px) {
  body.portal main { padding: 22px 16px 32px; }
  .cd-cols { grid-template-columns: 1fr; }
  .cd-sidecol { order: 2; }
  .row-end > .btn { display: none; }
  .ctodo { gap: 10px; }
  .ctodo .ctag { display: none; }
  a.btn.cta-orange, a.btn.cta-outline { min-width: 0; height: 40px; }
  .cproj .ctrack { display: none; }
  .cproj-mobile { display: flex; }
  .next-row { background: none; padding: 0; flex-direction: column; align-items: stretch; gap: 10px; }
  .next-row b { display: none; }
  .next-row .btn { justify-content: center; height: 40px; background: var(--surface); color: var(--heading); border: 1px solid var(--line); }
  .cd-done { display: none; }
  .onb-form { flex-direction: column; align-items: stretch; }
}
.rh-map { position: relative; flex-direction: column; padding: 0; overflow: hidden; }
.site-svg { width: 100%; height: 100%; min-height: 260px; display: block; }
.site-poly { fill: rgba(224, 130, 50, .22); stroke: #e08232; stroke-width: 2; stroke-linejoin: round; }
.site-line { fill: none; stroke: #e08232; stroke-width: 2; }
.site-pt { fill: var(--navy); }
.site-cap { position: absolute; left: 12px; top: 12px; font-size: 12px; background: var(--surface); padding: 4px 10px; border-radius: 6px; color: var(--text); box-shadow: var(--shadow); }
.site-btns { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 6px; }
.site-btns .btn { background: var(--surface); }

/* real WFDC logo in the top bars */
.tb-logo { height: 28px; width: auto; display: block; }
button, input, select, textarea { font-family: inherit; }
.ico { width: 1.05em; height: 1.05em; vertical-align: -0.17em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-right: .3em; flex: none; }
/* styled confirm */
.modal.modal-ask { width: min(440px, 100%); }
.ask-text { margin: 0; font-size: 15px; line-height: 1.5; }
.struct-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 10px; }

/* deal room values editor */
.re-tabs { padding: 14px 22px 0; }
.room-edit { display: flex; flex-direction: column; gap: 6px; padding: 12px 22px 18px; }
.room-edit > .room-card-p { border: 0; padding: 4px 0; }
.re-legend { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 4px; }
.re-sec { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; margin: 14px 0 2px; }
.re-row { display: grid; grid-template-columns: 26px 190px 1fr; gap: 10px; align-items: start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.re-row.re-edited { border-color: #e8a33d; background: color-mix(in srgb, #e8a33d 7%, var(--surface)); }
.re-row.re-hidden { opacity: .55; }
.re-row.re-hidden .re-val input, .re-row.re-hidden .re-val textarea { text-decoration: line-through; }
.re-show { padding-top: 9px; margin: 0; }
.re-label { font-size: 14px; font-weight: 600; padding-top: 8px; }
.re-val input, .re-val textarea { width: 100%; }
.re-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.re-mismatch { width: 100%; font-size: 13px; color: #9a5b00; }
.src-chip { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 999px; background: var(--chip); color: var(--text); text-decoration: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
a.src-chip:hover { text-decoration: underline; }
.src-chip.src-doc { background: color-mix(in srgb, #2f6fdb 14%, var(--surface)); color: #2a5fbf; }
.src-chip.src-model { background: color-mix(in srgb, #1f9d6b 14%, var(--surface)); color: #17805a; }
.src-chip.src-wfdc { background: color-mix(in srgb, #7a4fd0 14%, var(--surface)); color: #6a43b8; }
.src-chip.src-edit { background: color-mix(in srgb, #e8a33d 22%, var(--surface)); color: #8a5300; }
html[data-theme="dark"] .src-chip.src-doc { color: #8fb4ff; }
html[data-theme="dark"] .src-chip.src-model { color: #6fd6a8; }
html[data-theme="dark"] .src-chip.src-wfdc { color: #c3a6ff; }
html[data-theme="dark"] .src-chip.src-edit { color: #f2c27a; }
html[data-theme="dark"] .re-mismatch { color: #f2c27a; }
@media (max-width: 700px) { .re-row { grid-template-columns: 26px 1fr; } .re-val { grid-column: 1 / -1; } }

/* deal room investment summary sections */
.room-lede { font-size: 15px !important; line-height: 1.55; color: var(--text); }
.room-sec { border-top: 1px solid var(--line); padding-top: 12px; }
.room-sec h3 { margin: 0 0 8px !important; font-size: 12px !important; text-transform: uppercase; letter-spacing: .07em; color: var(--muted) !important; }
.room-sec .room-kv .v { font-variant-numeric: tabular-nums; font-weight: 550; }

/* deal room: confidentiality notice, watermark, preview panel, satellite map */
.nda-badge { align-self: flex-start; font-size: 12px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--chip); color: var(--heading); }
.nda-text { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; background: var(--panel); display: flex; flex-direction: column; gap: 8px; }
.nda-text p { margin: 0; font-size: 14px; line-height: 1.5; }
.wm { position: fixed; inset: -20%; display: flex; flex-wrap: wrap; gap: 90px 70px; align-content: center; justify-content: center; transform: rotate(-24deg); pointer-events: none; z-index: 40; user-select: none; }
.wm span { font-size: 15px; font-weight: 600; color: var(--heading); opacity: .055; white-space: nowrap; }
.pv-panel .wm { position: absolute; z-index: 2; }
.pv-wrap { position: fixed; inset: 0; background: rgba(19, 41, 61, .45); z-index: 60; display: flex; justify-content: flex-end; }
.pv-panel { position: relative; overflow: hidden; width: min(880px, 100%); height: 100%; background: var(--surface); display: flex; flex-direction: column; box-shadow: -10px 0 40px rgba(0, 0, 0, .25); }
.pv-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.pv-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-frame { flex: 1; border: 0; width: 100%; background: #525659; }
.pv-img { flex: 1; overflow: auto; display: grid; place-items: center; background: var(--panel); }
.pv-img img { max-width: 100%; }
.site-svg.sat { background: #23302a; }
.site-svg.sat .site-poly { fill: rgba(232, 163, 61, .18); stroke: #ffb547; stroke-width: 2.5; }
.site-svg.sat .site-line { stroke: #ffb547; }

.receipts { margin-top: 10px; font-size: 14px; }
.receipts summary { cursor: pointer; font-weight: 600; color: var(--heading); }

/* deal room cover image */
.room-hero.has-cover .rh-main { padding-top: 0; }
.rh-cover { margin: 0 -28px 4px; height: 200px; overflow: hidden; border-radius: 10px 0 0 0; position: relative; }
.room-hero.no-map .rh-cover { border-radius: 10px 10px 0 0; }
.rh-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.re-cover { display: flex; gap: 14px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.re-cover img { width: 180px; height: 90px; object-fit: cover; border-radius: 6px; background: var(--chip); }
.re-cover .ph { width: 180px; height: 90px; border-radius: 6px; background: var(--chip); display: grid; place-items: center; font-size: 12px; color: var(--muted); }

/* client sign-in: step dots + phone input */
.step-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 6px; }
.step-dots span { width: 28px; height: 4px; border-radius: 2px; background: var(--line); }
.step-dots span.on { background: var(--accent, #e07b1f); }
.phone-input { font-size: 20px; text-align: center; letter-spacing: .03em; padding: 10px; }

/* fill out for client: bulk intake */
.ik { padding: 18px 22px; gap: 12px; }
.ik-drop { border: 2px dashed var(--line); border-radius: 10px; padding: 26px; display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; background: var(--panel); }
.ik-drop.over { border-color: var(--accent, #e07b1f); background: color-mix(in srgb, #e07b1f 6%, var(--panel)); }
.ik-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.ik-list:empty { display: none; }
.ik-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) 120px; gap: 10px; align-items: center; padding: 7px 12px; border-bottom: 1px solid var(--line); }
.ik-row:last-child { border-bottom: 0; }
.ik-head { background: var(--panel); font-weight: 600; }
.ik-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.ik-row select { width: 100%; }
.ik-warn { color: #9a5b00; font-weight: 600; }
.ik-filled { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 700px) { .ik-row { grid-template-columns: 1fr; } }

.pf-off { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; background: var(--panel); }

/* deals known by their town */
.place-tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #b85f12; background: color-mix(in srgb, #e07b1f 12%, var(--surface)); border-radius: 4px; padding: 1px 6px; margin-right: 7px; vertical-align: 2px; }
html[data-theme="dark"] .place-tag { color: #f2b06b; }

/* phases & other income editor */
.st-edit { padding: 12px 22px 18px; display: flex; flex-direction: column; gap: 14px; }
.st-sec { display: flex; flex-direction: column; gap: 8px; }
.st-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.st-chip { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; }
.st-phase { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; background: var(--panel); }
.st-name { font-weight: 650; width: 280px; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px 12px; }
.st-f { display: flex; flex-direction: column; gap: 3px; margin: 0; font-size: 12px; color: var(--muted); }
.st-f input, .st-f select { width: 100%; }
.w-sm { width: 110px; } .w-xs { width: 64px; }

/* pro forma build progress */
.pf-progress { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.pf-pbar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.pf-pfill { height: 100%; width: 0; background: var(--accent, #e07b1f); transition: width .8s ease; }
.pf-busy .pf-progress { opacity: 1; }

/* company card */
.co-card { display: flex; flex-direction: column; gap: 10px; }
.co-head { display: flex; flex-direction: column; gap: 2px; }
.co-head b { font-size: 16px; color: var(--heading); }
.co-people { display: flex; flex-wrap: wrap; gap: 6px; }
.co-chip { font-size: 13px; padding: 3px 10px; border-radius: 999px; background: var(--chip); }
.co-chip span { color: var(--muted); }
.co-bg { margin: 0; font-size: 14px; line-height: 1.55; }
.co-bg.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.co-src { font-size: 12px; }
/* tidy history */
.hist-stage { font-weight: 600; }
.hist-note { font-size: 12px; color: var(--muted); margin-top: 2px; cursor: pointer; }
.hist-note.clamp1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.hist li > span:last-child { min-width: 0; }
.hist-group { cursor: pointer; }

/* floating job progress */
.jobs { position: fixed; right: 18px; bottom: 18px; z-index: 70; display: flex; flex-direction: column; gap: 10px; width: min(360px, calc(100vw - 36px)); }
.job { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.job-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.job-fill { height: 100%; width: 3%; background: var(--accent, #e07b1f); transition: width .9s ease; }
.job-done .job-fill { background: #1f9d6b; }
.job-fail .job-fill { background: var(--danger); }
.job .icon-btn { height: 24px; width: 24px; }

.pf-alert.pf-alert-soft { background: var(--panel); border-color: var(--line); }
.pf-alert.pf-alert-soft .pf-alert-t { color: var(--heading); }

/* quick edit for assumed figures */
.nf-edit { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.nf-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.nf-row > b { min-width: 140px; }
.nf-ctl { display: inline-flex; gap: 6px; align-items: center; margin-left: auto; }
.nf-in { width: 120px; }

/* email threads */
.mail-list { display: flex; flex-direction: column; gap: 8px; }
.mt { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; cursor: pointer; background: var(--surface); }
.mt:hover { border-color: color-mix(in srgb, var(--accent, #e07b1f) 40%, var(--line)); }
.mt-head { display: flex; gap: 10px; align-items: baseline; }
.mt-who { font-weight: 650; min-width: 140px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-subj { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-at { white-space: nowrap; }
.mt-prev { margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-body { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 8px; cursor: auto; }
.mt-text { white-space: pre-wrap; font-size: 14px; margin: 6px 0; }
.open-items td .nf-ctl { margin-left: 0; }

/* live now + deal rooms */
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #1f9d6b; margin-right: 6px; box-shadow: 0 0 0 0 rgba(31,157,107,.6); animation: livepulse 1.8s infinite; vertical-align: 1px; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(31,157,107,.55); } 70% { box-shadow: 0 0 0 8px rgba(31,157,107,0); } 100% { box-shadow: 0 0 0 0 rgba(31,157,107,0); } }
.live-card { margin-bottom: 16px; border-color: color-mix(in srgb, #1f9d6b 40%, var(--line)); }
.live-list { display: flex; flex-direction: column; }
.live-row { display: grid; grid-template-columns: 84px minmax(0, 1.2fr) minmax(0, 1.6fr) 90px; gap: 12px; align-items: center; padding: 9px 18px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.live-row:hover { background: var(--panel); }
.live-kind { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #17805a; }
.live-kind.financier { color: #2a5fbf; }
.live-who, .live-what { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-badge { display: inline-flex; align-items: center; gap: 2px; margin-left: 10px; padding: 3px 10px; border-radius: 999px; background: rgba(31,157,107,.18); color: #b7f0d6 !important; font-size: 12px; font-weight: 600; text-decoration: none; }
.live-pill { display: inline-flex; align-items: center; margin-left: 8px; font-size: 11px; font-weight: 600; color: #17805a; }
.eg-deal { padding: 0; margin-bottom: 12px; overflow: hidden; }
.eg-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 18px; background: none; border: 0; text-align: left; cursor: pointer; font: inherit; color: inherit; height: auto; }
.eg-head:hover { background: var(--panel); }
.eg-stat { font-size: 13px; color: var(--muted); } .eg-stat b { color: var(--heading); font-size: 15px; }
.eg-body { border-top: 1px solid var(--line); padding: 4px 8px 10px; }
.eg-r { cursor: pointer; } .eg-r:hover td { background: var(--panel); }
.eg-docrow td { padding: 0 12px; border: 0; }
.eg-docs { padding: 4px 0 12px; }
.seg-sm button { padding: 3px 10px; font-size: 12px; }
@media (max-width: 760px) { .live-row { grid-template-columns: 1fr; gap: 2px; } }
.tb-nav a, .live-badge { white-space: nowrap; }

.eg-last b { color: var(--heading); }

/* deal tags + good fits */
.tag-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.tag-chip { font-size: 12px; padding: 2px 9px; border-radius: 999px; background: var(--chip); color: var(--text); white-space: nowrap; }
.tag-chip.t-product { background: color-mix(in srgb, #2f6fdb 12%, var(--surface)); }
.tag-chip.t-capital { background: color-mix(in srgb, #e08232 14%, var(--surface)); }
.tag-chip.t-market { background: color-mix(in srgb, #1f9d6b 12%, var(--surface)); }
.fits { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; background: var(--panel); display: flex; flex-direction: column; gap: 8px; }
.fit-list { display: flex; flex-direction: column; gap: 6px; }
.fit { display: flex; align-items: center; gap: 12px; padding: 8px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.fit-main { flex: 1; min-width: 0; }
.pref-checks { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 6px; }
.pref-checks .choice { margin: 0; font-size: 13px; }

/* workbook preview */
.wv-wrap { position: fixed; inset: 0; z-index: 65; background: rgba(19,41,61,.5); display: flex; padding: 24px; }
.wv { flex: 1; min-width: 0; background: var(--surface); border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.wv-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.wv-head select { max-width: 340px; }
.wv-tabs { display: flex; gap: 2px; padding: 6px 10px 0; border-bottom: 1px solid var(--line); overflow-x: auto; background: var(--panel); flex: none; }
.wv-tab { height: 32px; padding: 0 14px; border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0; background: none; font-size: 13px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.wv-tab.on { background: var(--surface); border-color: var(--line); color: var(--heading); font-weight: 650; margin-bottom: -1px; }
.wv-grid { flex: 1; overflow: auto; }
.wv-t { border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 12px; font-variant-numeric: tabular-nums; }
.wv-t td, .wv-t th { border-right: 1px solid var(--line2); border-bottom: 1px solid var(--line2); padding: 2px 6px; height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #1b1b1b; background: #fff; }
html[data-theme="dark"] .wv-t td:not([style*="background"]) { background: #fff; }
.wv-t thead th { position: sticky; top: 0; z-index: 2; background: #f1f1f1; color: #666; font-weight: 500; text-align: center; }
.wv-t .wv-rh { position: sticky; left: 0; z-index: 1; background: #f1f1f1; color: #666; font-weight: 500; text-align: center; }
.wv-t .wv-corner { left: 0; z-index: 3; }
.wv-t .wv-fc { z-index: 3; }
.wv-t td.wv-bb { border-bottom: 1px solid #555; }
@media (max-width: 760px) { .wv-wrap { padding: 0; } .wv { border-radius: 0; } }

/* upload + document-reading progress */
.up-prog { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; margin-top: 6px; }
.up-prog .bar { grid-column: 1 / -1; }
.up-prog .up-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.read-card { border: 1px solid var(--line); background: var(--info-soft); border-radius: 10px; padding: 12px 14px; margin: 0 0 14px; display: flex; flex-direction: column; gap: 8px; }
.read-card .bar { height: 9px; }

/* bulk upload + sorting */
.bulk { margin: 0 0 16px; }
.bulk-drop { padding: 22px 16px; border-width: 2px; }
.bulk-status { display: flex; flex-direction: column; gap: 4px; }
.unsorted { margin-top: 10px; border: 1px solid var(--warn-line, #e6c27a); background: var(--warn-soft, #fff8e8); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.unsorted-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.unsorted-row .nm { flex: 1; min-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.move-sel { height: 30px; min-height: 30px; font-size: 13px; padding: 0 6px; max-width: 220px; }
.sort-chip { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--info-soft); color: var(--info); white-space: nowrap; }
.mark-na { display: flex; justify-content: flex-end; margin: 4px 0 8px; }

/* internal notes + pinned emails */
.notes-panel { display: flex; flex-direction: column; gap: 10px; }
.note-add { display: flex; flex-direction: column; gap: 6px; }
.note-add textarea { width: 100%; resize: vertical; }
.notes-list { display: flex; flex-direction: column; gap: 8px; }
.note { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--surface); }
.note.pinned { border-color: var(--accent, #e08232); background: color-mix(in srgb, var(--accent, #e08232) 7%, var(--surface)); }
.note-head { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.note-body { white-space: pre-wrap; margin-top: 4px; font-size: 14px; }
.mt-pin { margin-right: 4px; }

.dup-chip { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--warn-soft, #fff3d6); color: var(--warn, #9a6200); white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }

/* compare to their model */
.cmp { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; background: var(--panel); }
.cmp summary { cursor: pointer; list-style: revert; }
.cmp-t { margin-top: 8px; width: 100%; }
.cmp-t td.num, .cmp-t th:nth-child(n+2):nth-child(-n+4) { text-align: right; white-space: nowrap; }
.cmp-bad td { background: color-mix(in srgb, #e08232 10%, transparent); }
.cmp-ok { color: var(--ok, #2e7d4f); }

/* open on phone */
.qr-box { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.qr { background: #fff; padding: 10px; border-radius: 10px; border: 1px solid var(--line); }
.qr svg { width: 220px; height: 220px; display: block; }

/* phones: page picker above the progress bar */
.mobile-progress .step-jump { width: 100%; height: 46px; font-size: 16px; font-weight: 600; margin-bottom: 8px; border-radius: 10px; }

.ai-preview { width: 100%; font: inherit; line-height: 1.5; }

/* dashboard: upcoming dates */
.up-list { display: flex; flex-direction: column; max-height: 340px; overflow: auto; }
.up-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; align-items: center; text-align: left; border: 0; border-top: 1px solid var(--line); background: none; padding: 9px 18px; border-radius: 0; }
.up-row:hover { background: var(--chip); }
.up-date { font-weight: 650; font-size: 13px; color: var(--heading); }
.up-what { font-size: 13.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-when { color: var(--muted); white-space: nowrap; }
.up-row.near .up-when { color: var(--heading); font-weight: 600; }
.up-row.soon .up-when { color: #c4661f; font-weight: 700; }
.up-row.late .up-when { color: var(--danger, #c0392b); font-weight: 700; }

/* terms side by side */
.tg { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; background: var(--panel); margin-bottom: 14px; display: flex; flex-direction: column; gap: 8px; }
.tg-t td.num, .tg-t th:not(:first-child) { text-align: right; white-space: nowrap; }
.tg-t td.tg-best { font-weight: 700; color: var(--ok, #2e7d4f); }

/* projects: phase deals as one */
.proj { border-top: 1px solid var(--line); padding: 12px 18px 4px; background: color-mix(in srgb, var(--accent, #e08232) 4%, var(--surface)); }
.proj-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.proj-name { font-size: 16px; color: var(--heading); }
.proj-seg { margin: 10px 0 8px; flex-wrap: wrap; }
.proj-panel { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.proj-t { table-layout: fixed; width: 100%; }
.proj-t th:first-child, .proj-t td:first-child { width: 150px; }
.proj-t td.num { text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proj-t th:not(:first-child) { text-align: right; white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }
.proj-t .proj-sub { font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 11px; color: var(--muted); }
.proj-t td:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proj-t .proj-total { background: var(--chip); font-weight: 600; }
.proj-t .proj-bundle { background: color-mix(in srgb, #1f9d6b 10%, var(--surface)); font-weight: 600; }
.proj-deals { margin: 0 -18px; border-top: 1px dashed var(--line); }
.proj-chips { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.proj-chips .choice { margin: 0; }
.proj-star { color: #c4661f; }

.wfdc-strip { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: var(--panel); margin-bottom: 8px; }

/* project phase bar */
.pbar-wrap { margin: 10px 0 12px; user-select: none; }
.pbar-brk, .pbar { display: grid; gap: 4px; }
.pbar-brk { margin-bottom: 4px; }
.pbar-b { border: 0; border-top: 2px solid var(--line); background: none; padding: 3px 0 0; font-size: 12px; color: var(--muted); cursor: pointer; border-radius: 0; }
.pbar-b:hover, .pbar-b.on { color: var(--accent); border-top-color: var(--accent); }
.pbar-seg { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 9px 12px; border: 1px solid var(--line); background: var(--card); border-radius: 8px; cursor: pointer; min-width: 0; text-align: left; }
.pbar-seg b { font-size: 13px; font-weight: 600; color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pbar-seg span { font-size: 12px; color: var(--muted); }
.pbar-seg:hover { border-color: var(--accent); }
.pbar-seg.on { background: var(--accent); border-color: var(--accent); }
.pbar-seg.on b, .pbar-seg.on span { color: #fff; }
.pbar-foot { display: flex; align-items: center; margin-top: 6px; }
.proj-t th.proj-cur, .proj-t td.proj-cur { background: var(--hover); font-weight: 650; border-left: 2px solid var(--line); }

/* confidentiality agreement (client portal) */
.nda-card { max-width: 760px; margin: 0 auto; }
.nda-step { text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.nda-text { max-height: 340px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; background: var(--hover); font-size: 14px; line-height: 1.55; margin: 12px 0 16px; }
.nda-text b { display: block; margin-top: 10px; color: var(--heading); }
.nda-text div:first-child b { margin-top: 0; }
.nda-text p { margin: 2px 0 0; }
.nda-form { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr; gap: 12px; }
.nda-sigline { min-height: 44px; border-bottom: 1px solid var(--line); margin: 8px 0 12px; padding: 4px 2px; font: italic 28px/1.3 'Segoe Script', 'Brush Script MT', cursive; color: var(--heading); }
.nda-agree { margin: 4px 0 12px; }
@media (max-width: 700px) { .nda-form { grid-template-columns: 1fr; } }

/* Public policy pages (/privacy, /sms-terms) */
.legal { max-width: 760px; margin: 28px auto 60px; padding: 0 16px; line-height: 1.6; }
.legal h1 { margin-bottom: 4px; }
.legal h2 { font-size: 1.05rem; margin: 26px 0 6px; }
.legal ul { padding-left: 20px; }
.legal li { margin: 4px 0; }
.sms-consent { text-align: left; margin: 0; line-height: 1.45; }
.site-foot { text-align: center; font-size: 12px; color: var(--muted); padding: 28px 16px 22px; }
.site-foot a { color: var(--muted); }
@media print { .site-foot { display: none; } }

/* Staff assistant (admin): floating button + chat panel */
.ai-dock { position: fixed; right: 20px; bottom: 20px; z-index: 900; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.ai-dock.hidden { display: none; }
.ai-fab { background: var(--navy); color: #fff; border: none; border-radius: 999px; padding: 12px 20px; font-weight: 600; box-shadow: 0 6px 20px rgba(20, 30, 60, .25); }
.ai-fab:hover { background: var(--navy-2); }
.ai-panel { display: none; width: 420px; max-width: calc(100vw - 32px); height: min(620px, calc(100vh - 110px)); background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 16px 48px rgba(20, 30, 60, .22); flex-direction: column; overflow: hidden; }
.ai-dock.open .ai-panel { display: flex; }
.ai-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.ai-head .spacer { flex: 1; }
.ai-x { border: none; background: none; font-size: 22px; line-height: 1; padding: 0 4px; color: var(--muted); }
.ai-list { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ai-msg { max-width: 88%; padding: 9px 12px; border-radius: 12px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.ai-msg.user { align-self: flex-end; background: var(--navy); color: #fff; border-bottom-right-radius: 4px; }
.ai-msg.assistant { align-self: flex-start; background: var(--bg); border-bottom-left-radius: 4px; white-space: normal; }
.ai-msg.note { align-self: center; background: none; color: var(--muted); font-size: 12px; text-align: center; }
.ai-msg.error { color: var(--danger, #b42318); }
.ai-msg.thinking { color: var(--muted); font-style: italic; }
.ai-text p { margin: 0 0 6px; } .ai-text p:last-child { margin-bottom: 0; }
.ai-text ul { margin: 2px 0 6px; padding-left: 18px; } .ai-text li { margin: 2px 0; }
.ai-empty { margin: auto 6px; text-align: center; } .ai-empty p { margin: 0 0 10px; }
.ai-prop { align-self: stretch; border: 1px solid var(--accent); background: var(--accent-soft); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 5px; font-size: 14px; }
.ai-prop.done { border-color: var(--line); background: var(--bg); }
.ai-prop-title { font-weight: 600; }
.ai-prop-change { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
.ai-prop-field { color: var(--muted); }
.ai-prop-vals s { color: var(--muted); }
.ai-prop-actions { display: flex; gap: 8px; align-items: center; margin-top: 4px; flex-wrap: wrap; }
.ai-prop-status { font-size: 13px; color: var(--muted); }
.ai-compose { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); align-items: flex-end; }
.ai-input { flex: 1; resize: none; min-height: 42px; max-height: 140px; }
@media (max-width: 640px) { .ai-dock { right: 12px; bottom: 12px; } .ai-panel { height: calc(100vh - 90px); } }
@media print { .ai-dock { display: none; } }

.ai-tools { display: flex; gap: 6px; padding: 8px 10px 0; flex-wrap: wrap; align-items: center; border-top: 1px solid var(--line); }
.ai-tools + .ai-compose { border-top: none; }
.ai-tray { display: flex; gap: 8px; padding: 8px 10px 0; flex-wrap: wrap; border-top: 1px solid var(--line); }
.ai-tray + .ai-tools { border-top: none; }
.ai-thumb { position: relative; width: 64px; height: 48px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.ai-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ai-thumb button { position: absolute; top: 1px; right: 1px; border: none; background: rgba(0, 0, 0, .55); color: #fff; width: 18px; height: 18px; padding: 0; border-radius: 50%; font-size: 13px; line-height: 18px; justify-content: center; }
.ai-shots { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.ai-shots img { max-width: 160px; max-height: 110px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .35); }
.ai-shots-note { font-size: 12px; opacity: .8; margin-bottom: 4px; }
.ai-panel.drop { outline: 3px dashed var(--accent); outline-offset: -6px; }
.ai-dock.capturing { visibility: hidden; }
.ai-tray.hidden, .ai-dock input.hidden { display: none; }

.ai-reqs { display: flex; flex-direction: column; gap: 10px; }
.ai-reqs-head { display: flex; justify-content: space-between; align-items: center; }
.ai-req { border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.ai-req-top { display: flex; justify-content: space-between; gap: 8px; }
.ai-req-status { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); }
.ai-req-status.done { background: #e3f4e8; color: #1f6b3a; }
.ai-req-status.declined { background: var(--bg); color: var(--muted); }

/* Questions for the team (admin) */
.q-card { margin-bottom: 14px; display: flex; flex-direction: column; gap: 8px; }
.q-card.q-done { opacity: .85; }
.q-text { margin: 0; font-size: 1.08rem; }
.q-context { color: var(--muted); font-size: 14px; } .q-context p { margin: 0 0 4px; }
.q-options { display: flex; flex-wrap: wrap; gap: 8px; }
.q-opt { text-align: left; white-space: normal; }
.q-opt:hover { border-color: var(--navy); }
.q-form { display: flex; flex-direction: column; gap: 8px; }
.q-answer { background: var(--bg); border-radius: 8px; padding: 10px 12px; }
.q-answered summary { cursor: pointer; margin: 8px 0 12px; font-weight: 600; }
.q-badge { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 700; }
.q-badge.hidden { display: none; }

/* Watch my screen: drawing overlay + toolbar (admin assistant) */
.ai-draw { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 880; cursor: crosshair; touch-action: none; }
.ai-draw.passive { pointer-events: none; }
.ai-watchbar { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 950; display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; box-shadow: 0 8px 28px rgba(20, 30, 60, .22); }
.ai-watchbar.capturing { visibility: hidden; }
.ai-wb { border-radius: 999px; padding: 5px 12px; font-size: 13px; }
.ai-wb.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.ai-wb.stop { color: #b42318; }
.ai-live { font-size: 12px; font-weight: 700; color: #b42318; padding: 0 6px 0 2px; display: inline-flex; align-items: center; gap: 6px; }
.ai-live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #e5322d; animation: ai-pulse 1.4s infinite; }
@keyframes ai-pulse { 50% { opacity: .3; } }
.ai-watch-btn.on { background: #fdecea; border-color: #e5322d; color: #b42318; }
@media print { .ai-draw, .ai-watchbar { display: none; } }

.ai-status { color: var(--muted); font-style: italic; font-size: 13px; }
.ai-status::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 7px; animation: ai-pulse 1.2s infinite; vertical-align: 1px; }
.ai-text + .ai-status { margin-top: 6px; }
