@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap');

/* Reset equivalent to the Tailwind preflight layer this project previously imported.
   Keep in sync with the rules the layout below depends on. */
*, ::before, ::after { box-sizing: border-box; margin: 0; padding: 0; border: 0 solid; }
html { line-height: 1.5; tab-size: 4; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }
a { color: inherit; text-decoration: inherit; }
img, svg, video, canvas, audio, iframe, object { display: block; vertical-align: middle; }
button, input, select, textarea { font: inherit; font-feature-settings: inherit; font-variation-settings: inherit; color: inherit; border-radius: 0; background-color: transparent; opacity: 1; }
::file-selector-button { font: inherit; }
::placeholder { color: rgb(156, 163, 175); opacity: 1; }
table { border-collapse: collapse; }
[hidden] { display: none; }

:root {
  font-family: 'DM Sans', sans-serif;
  color: #16233a;
  background: #f3f6f9;
  font-synthesis: none;
  --navy-950: #071b2e;
  --navy-900: #0b263f;
  --navy-800: #123653;
  --navy-700: #184968;
  --teal-700: #087f78;
  --teal-600: #0b9389;
  --teal-100: #d9f3ef;
  --blue-100: #e7f0fb;
  --blue-700: #275f9e;
  --ink: #15243a;
  --muted: #65748a;
  --line: #dfe6ed;
  --surface: #ffffff;
  --canvas: #f3f6f9;
  --danger: #b23b43;
  --danger-bg: #fcebed;
  --amber: #a86612;
  --amber-bg: #fff3d8;
  --green: #227a55;
  --green-bg: #e4f5ec;
  --shadow: 0 1px 2px rgba(18, 38, 63, .04), 0 6px 20px rgba(18, 38, 63, .04);
}

* { box-sizing: border-box; }
body { min-width: 320px; min-height: 100vh; background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3, strong { color: var(--ink); }
h1, h2, h3 { font-family: 'Manrope', sans-serif; }
.icon { flex: none; }

.app-shell { min-height: 100vh; display: flex; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 256px; z-index: 30; display: flex; flex-direction: column; color: #dfe9f0; background: linear-gradient(180deg, var(--navy-950), var(--navy-900)); transition: transform .25s ease; }
.brand { height: 76px; display: flex; align-items: center; gap: 11px; padding: 0 22px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-mark { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 10px 10px 10px 3px; background: var(--teal-600); color: white; font-family: 'Manrope'; font-size: 13px; font-weight: 800; letter-spacing: -.3px; }
.brand strong { display: block; color: white; font-family: 'Manrope'; font-size: 16px; }
.brand small { display: block; margin-top: 1px; color: #8fa5b6; font-size: 10px; letter-spacing: .06em; }
.branch-card { margin: 18px 16px 13px; padding: 12px 14px; border: 1px solid rgba(255,255,255,.09); border-radius: 9px; background: rgba(255,255,255,.045); }
.branch-card small { display: block; color: #7692a7; font-size: 9px; font-weight: 700; letter-spacing: .13em; }
.branch-card strong { display: block; margin-top: 5px; color: #f4f8fa; font-size: 13px; }
.branch-card span { color: #8fa5b6; font-size: 10px; }
.nav-list { flex: 1; overflow-y: auto; padding: 6px 10px 16px; }
.nav-heading { display: block; padding: 8px 12px 7px; color: #68849a; font-size: 9px; font-weight: 700; letter-spacing: .15em; }
.nav-section { margin-top: 10px; }
.nav-item { width: 100%; height: 38px; display: flex; align-items: center; gap: 11px; padding: 0 11px; border: 0; border-radius: 7px; color: #aebdca; background: transparent; text-align: left; font-size: 12.5px; transition: .18s ease; }
.nav-item:hover { color: white; background: rgba(255,255,255,.06); }
.nav-item.active { color: white; background: rgba(13, 154, 143, .2); box-shadow: inset 3px 0 var(--teal-600); }
.nav-item b { min-width: 20px; margin-left: auto; padding: 2px 5px; border-radius: 10px; color: white; background: var(--teal-600); font-size: 9px; text-align: center; }
.nav-divider { height: 1px; margin: 10px 12px 3px; background: rgba(255,255,255,.07); }
.sidebar-footer { display: flex; align-items: center; gap: 9px; padding: 14px 20px; border-top: 1px solid rgba(255,255,255,.08); color: #89a1b4; }
.sidebar-footer strong { display: block; color: #c8d5df; font-size: 10px; }
.sidebar-footer small { font-size: 9px; }
.main-shell { min-width: 0; flex: 1; margin-left: 256px; }
.topbar { height: 76px; position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 0 34px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.95); backdrop-filter: blur(12px); }
.global-search { width: min(400px, 34vw); display: flex; align-items: center; gap: 9px; color: #8b98a8; }
.global-search input { width: 100%; border: 0; outline: none; color: var(--ink); background: transparent; font-size: 12.5px; }
.top-actions { display: flex; align-items: center; gap: 14px; }
.demo-switcher { display: flex; align-items: center; gap: 8px; padding: 5px 7px 5px 10px; border: 1px solid #b9dcd9; border-radius: 8px; background: #eef9f7; }
.demo-switcher span { color: var(--teal-700); font-size: 8px; font-weight: 800; letter-spacing: .1em; white-space: nowrap; }
.demo-switcher select { max-width: 144px; border: 0; outline: 0; color: var(--navy-800); background: transparent; font-size: 11px; font-weight: 700; }
.notification { position: relative; width: 36px; padding: 0 !important; }
.notification i { position: absolute; top: 7px; right: 7px; width: 6px; height: 6px; border: 1.5px solid white; border-radius: 50%; background: #e05b61; }
.user-chip { display: flex; align-items: center; gap: 9px; padding-left: 14px; border-left: 1px solid var(--line); }
.user-chip strong { display: block; font-size: 11.5px; }
.user-chip small { display: block; color: var(--muted); font-size: 9.5px; }
.avatar { width: 38px; height: 38px; display: inline-grid; place-items: center; flex: none; border-radius: 10px; color: var(--navy-700); background: #dce9f1; font-size: 11px; font-weight: 700; }
.avatar-small { width: 31px; height: 31px; border-radius: 8px; font-size: 9px; }
.mobile-menu { display: none !important; }
.content { max-width: 1600px; margin: 0 auto; padding: 28px 34px 48px; }
.page-header { display: flex; justify-content: space-between; gap: 24px; align-items: flex-end; margin-bottom: 25px; }
.eyebrow { display: block; margin-bottom: 5px; color: var(--teal-700); font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.page-header h1, .detail-title h1 { margin-bottom: 4px; color: #10243d; font-size: 25px; letter-spacing: -.045em; }
.page-header p, .detail-title p { margin: 0; color: var(--muted); font-size: 12px; }
.page-actions { display: flex; gap: 9px; }
.btn { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 13px; border: 1px solid transparent; border-radius: 7px; font-size: 11.5px; font-weight: 700; transition: .17s ease; white-space: nowrap; }
.btn:disabled { opacity: .45; cursor: default; }
.btn-primary { color: white; background: var(--navy-800); }
.btn-primary:hover { background: var(--navy-700); transform: translateY(-1px); }
.btn-teal { color: white; background: var(--teal-700); }
.btn-secondary { color: #31465d; border-color: #d3dde6; background: white; }
.btn-secondary:hover { border-color: #aab9c7; background: #f8fafc; }
.btn-ghost { color: #50637a; background: transparent; }
.btn-ghost:hover { background: #edf2f6; }
.btn-danger { color: white; background: var(--danger); }
.danger-text { color: var(--danger); }
.card { border: 1px solid #e0e7ed; border-radius: 11px; background: var(--surface); box-shadow: var(--shadow); }
.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.metric-card { min-height: 120px; display: flex; align-items: center; gap: 14px; padding: 18px; }
.metric-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: none; border-radius: 9px; color: #386589; background: var(--blue-100); }
.metric-teal { color: var(--teal-700); background: var(--teal-100); }
.metric-amber { color: var(--amber); background: var(--amber-bg); }
.metric-green { color: var(--green); background: var(--green-bg); }
.metric-red { color: var(--danger); background: var(--danger-bg); }
.metric-purple { color: #6555a4; background: #eeeafc; }
.metric-copy span { display: block; color: var(--muted); font-size: 10.5px; font-weight: 600; }
.metric-copy strong { display: block; margin: 2px 0 3px; font-family: 'Manrope'; font-size: 21px; letter-spacing: -.04em; }
.metric-copy small { color: #718096; font-size: 9.5px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(330px, .85fr); gap: 14px; margin-top: 14px; }
.bottom-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(330px, .8fr); gap: 14px; margin-top: 14px; }
.card-head { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 19px; border-bottom: 1px solid #e9eef2; }
.card-head h2, .section-head h2, .review-panel h2 { margin: 0 0 2px; font-size: 14px; letter-spacing: -.02em; }
.card-head p, .section-head p, .review-panel p { margin: 0; color: var(--muted); font-size: 10.5px; }
.card-head .input { width: 125px; }
.input { width: 100%; height: 37px; padding: 0 11px; border: 1px solid #cfd9e2; border-radius: 7px; outline: none; color: var(--ink); background: white; font-size: 11.5px; }
.input:focus { border-color: var(--teal-600); box-shadow: 0 0 0 3px rgba(11,147,137,.1); }
.textarea { min-height: 82px; padding-top: 10px; resize: vertical; }
.bar-chart { height: 230px; display: flex; align-items: flex-end; justify-content: space-around; gap: 20px; padding: 30px 35px 12px; border-bottom: 1px dashed #e5ebf0; }
.bar-group { height: 100%; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.bar-group strong { margin-bottom: 7px; font-family: 'Manrope'; font-size: 12px; }
.bar-track { width: 35px; height: 150px; display: flex; align-items: flex-end; border-radius: 6px 6px 2px 2px; background: #f1f4f7; }
.bar { width: 100%; min-height: 14px; display: block; border-radius: 6px 6px 2px 2px; background: var(--navy-700); transition: height .4s ease; }
.bar-teal { background: var(--teal-600); }.bar-amber { background: #d49a43; }.bar-red { background: #c7666c; }
.bar-group small { margin-top: 8px; color: var(--muted); font-size: 9.5px; text-align: center; }
.chart-footer { display: flex; gap: 40px; padding: 14px 20px; color: var(--muted); font-size: 10px; }
.chart-footer b { margin-right: 4px; color: var(--ink); }
.task-list { padding: 4px 12px 10px; }
.task-item { width: 100%; display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; padding: 12px 5px; border: 0; border-bottom: 1px solid #edf1f4; background: transparent; text-align: left; }
.task-item:last-child { border-bottom: 0; }
.task-item:hover { background: #f8fafb; }
.task-item strong { display: block; font-size: 11px; }
.task-item small { color: var(--muted); font-size: 9.5px; }
.task-item > span { padding: 4px 7px; border-radius: 5px; color: var(--blue-700); background: var(--blue-100); font-size: 8.5px; font-weight: 700; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 10px 14px; color: #79889a; background: #f8fafb; font-size: 8.5px; font-weight: 700; letter-spacing: .07em; text-align: left; white-space: nowrap; }
td { padding: 12px 14px; border-top: 1px solid #e9eef2; color: #405168; font-size: 10.5px; vertical-align: middle; }
td strong { font-size: 10.5px; }
.click-row { cursor: pointer; }
.click-row:hover td { background: #f8fbfc; }
.cell-sub { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }
.ref { color: var(--blue-700); font-weight: 700; white-space: nowrap; }
.activity-icon { width: 23px; height: 23px; display: inline-grid; place-items: center; margin-right: 8px; border-radius: 6px; color: var(--green); background: var(--green-bg); vertical-align: middle; }
.activity-icon .icon { width: 13px; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; padding: 12px; }
.quick-grid button { min-height: 103px; display: flex; flex-direction: column; align-items: flex-start; padding: 13px; border: 0; border-right: 1px solid #e9eef2; border-bottom: 1px solid #e9eef2; background: transparent; text-align: left; }
.quick-grid button:nth-child(2n) { border-right: 0; }.quick-grid button:nth-child(n+3) { border-bottom: 0; }
.quick-grid button:hover { background: #f7fafb; }
.quick-grid button span { width: 29px; height: 29px; display: grid; place-items: center; margin-bottom: 8px; border-radius: 7px; color: var(--teal-700); background: var(--teal-100); }
.quick-grid button strong { font-size: 10.5px; }.quick-grid button small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.portfolio-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 14px; padding: 17px 0; border: 1px solid #dfe7ed; border-radius: 10px; background: linear-gradient(95deg, #f9fbfc, white); }
.portfolio-strip > div { padding: 0 20px; border-right: 1px solid var(--line); }
.portfolio-strip > div:last-child { border-right: 0; }
.portfolio-strip span { display: block; color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .08em; }
.portfolio-strip strong { display: block; margin: 4px 0 2px; font-family: 'Manrope'; font-size: 18px; }
.portfolio-strip small { color: var(--muted); font-size: 9px; }.portfolio-strip .danger { color: var(--danger); }
.table-toolbar { min-height: 64px; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.table-search { width: 290px; position: relative; }
.table-search .icon { position: absolute; top: 10px; left: 10px; color: #8795a5; }
.table-search .input { padding-left: 34px; }
.table-toolbar > .input { width: 165px; }
.result-count { margin-left: auto; color: var(--muted); font-size: 10px; }
.person-cell { display: flex; align-items: center; gap: 8px; }.person-cell strong, .person-cell small { display: block; }.person-cell small { color: var(--muted); font-size: 9px; }
.stage-number { width: 20px; height: 20px; display: inline-grid; place-items: center; margin-right: 6px; border-radius: 50%; color: var(--teal-700); background: var(--teal-100); font-size: 9px; font-weight: 800; }
.status { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 12px; font-size: 7.8px; font-weight: 800; letter-spacing: .035em; white-space: nowrap; }
.status i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-blue { color: var(--blue-700); background: var(--blue-100); }
.status-green { color: var(--green); background: var(--green-bg); }
.status-red { color: var(--danger); background: var(--danger-bg); }
.status-amber { color: var(--amber); background: var(--amber-bg); }
.status-gray { color: #657181; background: #edf1f4; }
.pagination { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9.5px; }
.pagination div { display: flex; gap: 6px; }
.workflow-summary { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 14px; }
.workflow-summary > div { position: relative; padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.workflow-summary span { width: 20px; height: 20px; position: absolute; top: 10px; right: 10px; display: grid; place-items: center; border-radius: 50%; color: var(--teal-700); background: var(--teal-100); font-size: 8px; font-weight: 800; }
.workflow-summary strong { display: block; font-family: 'Manrope'; font-size: 20px; }.workflow-summary small { display: block; color: var(--muted); font-size: 8.5px; }
.customer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); }
.customer-card { min-height: 220px; display: flex; flex-direction: column; align-items: flex-start; padding: 20px; border: 0; background: white; text-align: left; }
.customer-card:hover { background: #f8fbfc; }.customer-card > div strong { display: block; margin-top: 10px; font-size: 12px; }.customer-card > div small { color: var(--muted); font-size: 9.5px; }
.customer-card dl { width: 100%; display: grid; grid-template-columns: 70px 1fr; gap: 5px; margin: 14px 0; font-size: 9px; }.customer-card dt { color: var(--muted); }.customer-card dd { margin: 0; color: var(--ink); }
.back-link { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 16px; padding: 0; border: 0; color: #567087; background: transparent; font-size: 10.5px; }
.back-link .icon { transform: rotate(180deg); }
.detail-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.detail-title { display: flex; align-items: center; gap: 13px; }.detail-title .avatar { width: 48px; height: 48px; font-size: 13px; }.detail-state { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }.detail-state small { color: var(--muted); font-size: 9.5px; }
.workflow-card { padding: 18px 20px 20px; }
.workflow-top { display: flex; align-items: flex-start; justify-content: space-between; }
.workflow-top h2 { margin: 0; font-size: 13px; }.workflow-top p, .workflow-top > span { margin: 2px 0 0; color: var(--muted); font-size: 9.5px; }
.tracker { display: grid; grid-template-columns: repeat(7, 1fr); margin-top: 20px; }
.tracker > div { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.tracker > div::before, .tracker > div::after { content: ''; position: absolute; top: 13px; width: 50%; height: 2px; background: #dce4ea; }
.tracker > div::before { left: 0; }.tracker > div::after { right: 0; }.tracker > div:first-child::before, .tracker > div:last-child::after { display: none; }
.tracker > div.done::before, .tracker > div.done::after, .tracker > div.current::before { background: var(--teal-600); }
.tracker > div > span { width: 27px; height: 27px; z-index: 1; display: grid; place-items: center; border: 2px solid #dce4ea; border-radius: 50%; color: #8c9aa8; background: white; font-size: 9px; font-weight: 800; }
.tracker > div.done > span { border-color: var(--teal-600); color: white; background: var(--teal-600); }.tracker > div.current > span { border-color: var(--teal-600); color: var(--teal-700); box-shadow: 0 0 0 4px var(--teal-100); }
.tracker strong { margin-top: 8px; font-size: 8.5px; }.tracker small { color: #8a98a7; font-size: 7.5px; }
.detail-tabs { display: flex; gap: 23px; margin: 18px 0 13px; border-bottom: 1px solid var(--line); }
.detail-tabs button { position: relative; padding: 0 1px 10px; border: 0; color: #718095; background: transparent; font-size: 10.5px; font-weight: 700; }
.detail-tabs button.active { color: var(--navy-800); }.detail-tabs button.active::after { content: ''; position: absolute; inset: auto 0 -1px; height: 2px; background: var(--teal-600); }
.detail-tabs b { margin-left: 5px; padding: 2px 5px; border-radius: 7px; color: var(--teal-700); background: var(--teal-100); font-size: 8px; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 14px; align-items: start; }
.detail-main { display: grid; gap: 14px; }.detail-main .card { padding: 19px; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.verified { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 5px; color: var(--green); background: var(--green-bg); font-size: 8.5px; font-weight: 700; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px 25px; }
.info span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 9px; }.info strong { font-size: 11px; font-weight: 600; }
.loan-highlight { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 18px; border: 1px solid #dfe8ed; border-radius: 8px; background: #f8fbfc; }
.loan-highlight > div { padding: 14px; border-right: 1px solid #dfe8ed; }.loan-highlight > div:last-child { border: 0; }.loan-highlight span { display: block; color: var(--muted); font-size: 8.5px; }.loan-highlight strong { display: block; margin-top: 3px; font-family: 'Manrope'; font-size: 13px; }
.review-panel { display: grid; gap: 12px; }.review-panel .card { padding: 17px; }.review-panel .eyebrow { margin-bottom: 7px; }.review-panel > .card > p { line-height: 1.55; }
.review-actions { display: grid; gap: 7px; margin-top: 15px; }.review-actions .btn { width: 100%; }
.permission-note { display: flex; gap: 8px; margin-top: 13px; padding: 10px; border-radius: 7px; color: #496279; background: #edf3f7; }.permission-note p { margin: 0; font-size: 9.5px; line-height: 1.5; }
.review-panel h3 { margin: 0 0 14px; font-size: 12px; }
.summary-list { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin: 0; font-size: 9.5px; }.summary-list dt { color: var(--muted); }.summary-list dd { margin: 0; color: var(--ink); font-weight: 600; text-align: right; }
.prototype-note { display: flex; gap: 8px; padding: 12px; border: 1px solid #d5e5e5; border-radius: 8px; color: var(--teal-700); background: #f0f8f7; }.prototype-note p { margin: 0; color: #526b72; font-size: 8.7px; line-height: 1.5; }
.document-list > div { display: flex; align-items: center; gap: 11px; padding: 12px 0; border-bottom: 1px solid #e8edf1; }.document-list > div:last-child { border: 0; }.doc-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 7px; color: var(--blue-700); background: var(--blue-100); }.document-list > div > div { flex: 1; }.document-list strong, .document-list small { display: block; }.document-list strong { font-size: 10.5px; }.document-list small { margin-top: 2px; color: var(--muted); font-size: 8.5px; }
.risk { display: inline-flex; padding: 4px 7px; border-radius: 5px; font-size: 8px; font-weight: 800; text-transform: uppercase; }.risk-low { color: var(--green); background: var(--green-bg); }.risk-moderate { color: var(--amber); background: var(--amber-bg); }.risk-elevated { color: var(--danger); background: var(--danger-bg); }
.assessment-note { display: flex; gap: 11px; margin-top: 20px; padding: 13px; border-left: 3px solid var(--teal-600); background: #f4f9fa; }.assessment-note strong { font-size: 10px; }.assessment-note p { margin: 3px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.timeline > div { display: flex; gap: 12px; position: relative; padding-bottom: 20px; }.timeline > div:not(:last-child)::before { content: ''; position: absolute; left: 13px; top: 27px; bottom: 0; width: 1px; background: var(--line); }
.timeline-icon { width: 27px; height: 27px; z-index: 1; display: grid; place-items: center; flex: none; border-radius: 50%; color: var(--green); background: var(--green-bg); }.timeline-icon .icon { width: 13px; }.timeline-icon.bad { color: var(--danger); background: var(--danger-bg); }.timeline-icon.warn { color: var(--amber); background: var(--amber-bg); }
.timeline-copy { flex: 1; }.timeline-copy > div { display: flex; align-items: center; gap: 8px; }.timeline-copy strong { font-size: 10.5px; }.timeline-copy p { margin: 4px 0; color: #455970; font-size: 9.5px; }.timeline-copy small { color: var(--muted); font-size: 8.5px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(6, 20, 33, .62); backdrop-filter: blur(3px); }
.modal { width: min(520px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; overflow: hidden; border-radius: 13px; background: white; box-shadow: 0 22px 70px rgba(0,0,0,.25); animation: modal-in .2s ease; }
.modal-wide { width: min(790px, 100%); }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.99); } }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 21px; border-bottom: 1px solid var(--line); }.modal-header h2 { margin: 0; font-size: 16px; }
.modal-body { overflow-y: auto; padding: 21px; }
.modal-footer { display: flex; align-items: center; justify-content: space-between; padding: 13px 20px; border-top: 1px solid var(--line); background: #fafbfc; }.modal-footer > div { display: flex; gap: 7px; }
.modal-steps { display: flex; align-items: center; justify-content: center; padding: 14px; border-bottom: 1px solid var(--line); background: #fafcfd; }
.modal-steps > span { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 9.5px; font-weight: 700; }.modal-steps > span b { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid #c9d3dc; border-radius: 50%; color: var(--muted); font-size: 8px; }.modal-steps > span.active { color: var(--teal-700); }.modal-steps > span.active b, .modal-steps > span.done b { border-color: var(--teal-600); color: white; background: var(--teal-600); }.modal-steps > i { width: 70px; height: 1px; margin: 0 10px; background: #d6dfe7; }
.form-section + .form-section { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }.form-section h3 { margin: 0 0 2px; font-size: 12px; }.form-section > p { margin: 0 0 16px; color: var(--muted); font-size: 9.5px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }.form-grid .field:has(.textarea) { grid-column: 1 / -1; }
.field { display: grid; gap: 6px; color: #42536a; font-size: 9.5px; font-weight: 600; }.field small { color: var(--danger); font-size: 8.5px; font-weight: 500; }.field .hint { color: var(--muted); }.field-error .input { border-color: var(--danger); }
.upload-zone { display: flex; flex-direction: column; align-items: center; padding: 18px; border: 1px dashed #aac5c8; border-radius: 8px; color: var(--teal-700); background: #f7fbfb; }.upload-zone strong { margin-top: 7px; font-size: 10.5px; }.upload-zone small { margin: 2px 0 10px; color: var(--muted); font-size: 8.5px; }
.attachment-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }.attachment-chips span { display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px; border-radius: 5px; color: #43576e; background: #edf2f5; font-size: 8.5px; }.attachment-chips .icon { width: 12px; }
.doc-menu { position: fixed; z-index: 170; display: grid; gap: 2px; min-width: 214px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: 0 16px 34px rgba(11, 38, 63, .2); animation: modal-in .16s ease; }
.doc-option { display: flex; align-items: center; gap: 9px; padding: 8px 9px; border-radius: 7px; text-align: left; color: var(--ink); cursor: pointer; }.doc-option:hover { background: #eef8f7; }.doc-option span:last-child { display: grid; }.doc-option strong { font-size: 10px; font-weight: 700; }.doc-option small { color: var(--muted); font-size: 8.5px; }
.doc-option-icon { width: 27px; height: 27px; display: grid; place-items: center; flex: none; border-radius: 7px; color: var(--teal-700); background: var(--teal-100); }
.hidden-file-input { position: fixed; top: -1px; left: -10000px; width: 1px; height: 1px; }
.camera-stage { position: relative; overflow: hidden; min-height: 232px; border-radius: 9px; color: #cfe0e6; background: var(--navy-900); }
.camera-feed { display: none; width: 100%; height: 232px; object-fit: cover; }.camera-feed.camera-live { display: block; }
.camera-waiting { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 9.5px; }.camera-stage.is-live .camera-waiting { display: none; }
.camera-hint { position: absolute; right: 8px; bottom: 8px; left: 8px; display: none; align-items: center; gap: 6px; padding: 7px 9px; border-radius: 7px; color: #eaf4f6; background: rgba(7, 27, 46, .74); font-size: 8.5px; }.camera-hint .icon { width: 14px; }.camera-stage.is-live .camera-hint { display: flex; }
.camera-error { display: grid; justify-items: center; gap: 5px; padding: 30px 18px; border-radius: 9px; color: var(--amber); background: var(--amber-bg); text-align: center; }.camera-error small { color: #6b5a3f; font-size: 9px; line-height: 1.5; }
.camera-note { margin: 12px 0 0; color: var(--muted); font-size: 8.7px; line-height: 1.5; }
.spinner.spinner-dark { border-color: rgba(207, 224, 230, .3); border-top-color: #cfe0e6; }
.decision-body > p { color: var(--muted); font-size: 10.5px; line-height: 1.55; text-align: center; }
.confirm-icon { width: 50px; height: 50px; display: grid; place-items: center; margin: 0 auto 12px; border-radius: 50%; color: var(--green); background: var(--green-bg); }.confirm-icon.destructive { color: var(--danger); background: var(--danger-bg); }
.decision-summary { display: grid; grid-template-columns: 1fr 1fr; margin: 17px 0; border: 1px solid var(--line); border-radius: 7px; }.decision-summary > div { padding: 10px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }.decision-summary > div:nth-child(2n) { border-right: 0; }.decision-summary span, .decision-summary strong { display: block; }.decision-summary span { color: var(--muted); font-size: 8.5px; }.decision-summary strong { margin-top: 2px; font-size: 10.5px; }
.decision-body > .field + .field { margin-top: 12px; }
.simulation-warning, .notice { display: flex; gap: 10px; color: var(--teal-700); background: #eef8f7; }.simulation-warning { margin-top: 13px; padding: 10px; border-radius: 7px; }.simulation-warning p { margin: 0; color: #4f666d; font-size: 8.7px; line-height: 1.5; }
.toast { position: fixed; z-index: 150; right: 25px; bottom: 24px; display: flex; align-items: center; gap: 10px; padding: 12px 15px; border: 1px solid #b5d8c7; border-radius: 9px; color: #295942; background: white; box-shadow: 0 12px 35px rgba(14,42,58,.18); font-size: 10.5px; font-weight: 600; animation: modal-in .2s ease; }.toast span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--green); }
.notice { align-items: center; margin-bottom: 14px; padding: 13px 16px; border: 1px solid #cce2e0; border-radius: 9px; }.notice strong { display: block; font-size: 10.5px; }.notice p { margin: 2px 0 0; color: #597075; font-size: 9px; }
.report-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.report-chart { min-height: 360px; }.line-art { padding: 25px 25px 15px; color: var(--teal-600); }.line-art svg { width: 100%; height: 225px; overflow: visible; }.line-art .area { fill: url(#area); stroke: none; }.line-art .line { fill: none; stroke: currentColor; stroke-width: 3; }.axis { display: flex; justify-content: space-between; color: var(--muted); font-size: 8.5px; }
.donut-wrap { display: flex; align-items: center; justify-content: center; gap: 30px; padding: 44px 20px; }.donut { width: 150px; height: 150px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--teal-600) 0 96.2%, #d49a43 96.2% 98.7%, #ca656b 98.7%); }.donut::before { content: ''; width: 105px; height: 105px; position: absolute; border-radius: 50%; background: white; }.donut span { z-index: 1; text-align: center; }.donut strong { display: block; font-family: 'Manrope'; font-size: 20px; }.donut small { color: var(--muted); font-size: 9px; }
.legend { display: grid; gap: 12px; }.legend span { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 7px; color: var(--muted); font-size: 9.5px; }.legend i { width: 7px; height: 7px; border-radius: 50%; }.legend .green { background: var(--teal-600); }.legend .amber { background: #d49a43; }.legend .red { background: #ca656b; }
.reason-cell { max-width: 240px; line-height: 1.45; }
.settings-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }.settings-layout > .card { padding: 20px; }
.role-list > div { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--line); }.role-list strong, .role-list small { display: block; }.role-list strong { font-size: 10.5px; }.role-list small, .role-list > div > span { color: var(--muted); font-size: 9px; }
.settings-form { max-width: 500px; display: grid; gap: 14px; }.settings-form .btn { width: fit-content; }
.security-card { color: var(--teal-700); background: #f3faf9; }.security-card h3 { margin: 10px 0 5px; font-size: 12px; }.security-card p { margin: 0; color: #526a70; font-size: 9.5px; line-height: 1.6; }
.empty { min-height: 230px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 25px; text-align: center; }.empty-icon { width: 45px; height: 45px; display: grid; place-items: center; border-radius: 50%; color: #70869b; background: #edf2f5; }.empty h3 { margin: 10px 0 3px; font-size: 12px; }.empty p { max-width: 300px; margin: 0; color: var(--muted); font-size: 9.5px; line-height: 1.5; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, .92fr) minmax(560px, 1.08fr); background: white; }
.login-brand-panel { min-height: 100vh; display: flex; flex-direction: column; justify-content: space-between; padding: 42px 50px 38px; color: white; background: radial-gradient(circle at 82% 18%, rgba(11,147,137,.28), transparent 28%), linear-gradient(145deg, var(--navy-950), var(--navy-800)); }
.login-brand { display: flex; align-items: center; gap: 12px; }.login-brand .brand-mark { width: 44px; height: 44px; font-size: 14px; }.login-brand strong { display: block; color: white; font-family: 'Manrope'; font-size: 18px; }.login-brand small { display: block; margin-top: 2px; color: #8faabd; font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.login-intro { max-width: 580px; margin: 70px 0; }.login-kicker { color: #60d0c6; font-size: 9px; font-weight: 800; letter-spacing: .16em; }.login-intro h1 { max-width: 540px; margin: 15px 0; color: white; font-size: clamp(30px, 3.1vw, 48px); line-height: 1.08; letter-spacing: -.045em; }.login-intro > p { max-width: 510px; color: #b9cbd7; font-size: 13px; line-height: 1.7; }
.login-workflow { display: grid; grid-template-columns: repeat(7, 1fr); margin-top: 38px; }.login-workflow > div { position: relative; text-align: center; }.login-workflow > div:not(:last-child)::after { content: ''; position: absolute; top: 13px; left: calc(50% + 16px); right: calc(-50% + 16px); height: 1px; background: rgba(102,211,201,.35); }.login-workflow span { width: 27px; height: 27px; position: relative; z-index: 1; display: inline-grid; place-items: center; border: 1px solid rgba(102,211,201,.55); border-radius: 50%; color: #89e0d8; background: var(--navy-900); font-size: 9px; font-weight: 800; }.login-workflow small { display: block; margin-top: 8px; color: #91aabd; font-size: 7.5px; line-height: 1.3; }
.demo-banner { display: flex; align-items: center; gap: 12px; padding: 13px 15px; border: 1px solid rgba(87,205,195,.25); border-radius: 9px; color: #6cd2c9; background: rgba(11,147,137,.1); }.demo-banner strong, .demo-banner small { display: block; }.demo-banner strong { color: #c7f4ef; font-size: 9px; letter-spacing: .08em; }.demo-banner small { margin-top: 2px; color: #88a7b8; font-size: 8.5px; }
.login-form-panel { display: grid; place-items: center; padding: 40px; background: #f5f8fa; }.login-card { width: min(620px, 100%); padding: 38px; border: 1px solid #dfe7ed; border-radius: 15px; background: white; box-shadow: 0 22px 60px rgba(13,38,61,.09); }.login-card > h2 { margin: 2px 0 7px; font-size: 26px; letter-spacing: -.04em; }.login-card > p, .account-selector p { color: var(--muted); font-size: 10.5px; line-height: 1.5; }.login-mobile-brand { display: none; }
.login-form { display: grid; gap: 15px; margin-top: 25px; }.password-field { position: relative; }.password-field .input { padding-right: 70px; }.password-field .btn { position: absolute; top: 1px; right: 2px; min-height: 35px; padding: 0 10px; color: var(--teal-700); }.login-submit { width: 100%; min-height: 42px; margin-top: 2px; }.spinner { width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.4); border-top-color: white; border-radius: 50%; animation: spin .7s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } }
.login-error { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid #f1c5c8; border-radius: 7px; color: var(--danger); background: var(--danger-bg); font-size: 9.5px; }
.account-selector { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }.account-selector p { margin: 2px 0 12px; }.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }.account-option { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 9px; border: 1px solid #dfe6ed; border-radius: 8px; background: white; text-align: left; transition: .16s ease; }.account-option:hover { border-color: #8ac8c2; background: #f4faf9; }.account-option > span { min-width: 0; }.account-option strong, .account-option small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.account-option strong { font-size: 9.5px; }.account-option small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.login-footnote { display: flex; gap: 9px; margin-top: 18px; padding: 11px; border-radius: 7px; color: #557083; background: #f1f5f7; font-size: 8.5px; line-height: 1.5; }.login-footnote b { color: var(--navy-800); }
.session-label { padding: 5px 7px; border-radius: 5px; color: var(--teal-700); background: var(--teal-100); font-size: 8px; font-weight: 800; letter-spacing: .08em; }.session-summary { display: flex; align-items: center; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 9px; background: #f8fafb; }.session-summary strong, .session-summary span, .session-summary small { display: block; }.session-summary strong { font-size: 12px; }.session-summary span { margin-top: 2px; color: var(--teal-700); font-size: 10px; font-weight: 700; }.session-summary small { margin-top: 2px; color: var(--muted); font-size: 9px; }.control-actions { display: flex; gap: 8px; margin-top: 18px; }.accounts-card { margin-top: 14px; }.accounts-card .role-list { padding: 0 20px 12px; }.status-change { display: inline-block; margin-bottom: 4px; padding: 3px 6px; border-radius: 4px; color: #50657a; background: #edf2f5; font-size: 8px; }
.sidebar-scrim { display: none; }
/* ---- Lead pipeline additions ---- */
.pipeline-summary { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; padding: 16px 19px; }
.pipeline-summary button { position: relative; padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: white; text-align: left; transition: .17s ease; }
.pipeline-summary button:hover { border-color: #8ac8c2; background: #f6fbfa; }
.pipeline-summary button.active { border-color: var(--teal-600); background: #eef8f7; box-shadow: inset 0 0 0 1px var(--teal-600); }
.pipeline-summary span { width: 20px; height: 20px; position: absolute; top: 10px; right: 10px; display: grid; place-items: center; border-radius: 50%; color: var(--teal-700); background: var(--teal-100); font-size: 8px; font-weight: 800; }
.pipeline-summary strong { display: block; font-family: 'Manrope'; font-size: 20px; }
.pipeline-summary small { display: block; color: var(--muted); font-size: 8.5px; }
.lead-pipeline-card { margin-top: 14px; }
.lead-tracker { grid-template-columns: repeat(4, 1fr); }
.chip { display: inline-flex; align-items: center; padding: 3px 6px; border-radius: 5px; color: #43576e; background: #edf2f5; font-size: 8.5px; font-weight: 700; white-space: nowrap; }
.due-soon { color: var(--amber); font-weight: 700; }
.due-overdue { color: var(--danger); font-weight: 700; }
.muted-cell { color: var(--muted); }
@media (max-width: 920px) { .pipeline-summary { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 650px) { .pipeline-summary { grid-template-columns: repeat(2, 1fr); } .lead-tracker { grid-template-columns: repeat(2, 1fr); } .lead-tracker > div::before, .lead-tracker > div::after { display: none; } }


@media (max-width: 1180px) {
  .metrics-grid, .report-metrics { grid-template-columns: repeat(2, 1fr); }
  .customer-grid { grid-template-columns: repeat(3, 1fr); }
  .workflow-summary { grid-template-columns: repeat(4, 1fr); }
  .topbar { padding: 0 22px; }
  .content { padding-left: 22px; padding-right: 22px; }
  .user-chip > div { display: none; }
}

@media (max-width: 920px) {
  .login-shell { grid-template-columns: 1fr; }.login-brand-panel { display: none; }.login-form-panel { min-height: 100vh; padding: 30px; }.login-mobile-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 30px; }.login-mobile-brand strong { font-family: 'Manrope'; font-size: 16px; }
  .sidebar { transform: translateX(-100%); }.sidebar-open { transform: translateX(0); }.sidebar-scrim { position: fixed; inset: 0; z-index: 25; display: block; background: rgba(5,19,31,.45); }
  .main-shell { margin-left: 0; }
  .mobile-menu { display: inline-flex !important; }
  .global-search { width: 270px; }
  .dashboard-grid, .bottom-grid, .detail-layout, .settings-layout { grid-template-columns: 1fr; }
  .review-panel { grid-template-columns: 1fr 1fr; }.review-panel .prototype-note { grid-column: 1 / -1; }
  .customer-grid { grid-template-columns: repeat(2, 1fr); }
  .portfolio-strip { grid-template-columns: 1fr 1fr; }.portfolio-strip > div:nth-child(2) { border-right: 0; }.portfolio-strip > div:nth-child(-n+2) { padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
}

@media (max-width: 650px) {
  .login-form-panel { padding: 0; place-items: stretch; }.login-card { min-height: 100vh; padding: 28px 20px; border: 0; border-radius: 0; box-shadow: none; }.account-grid { grid-template-columns: 1fr; }
  .topbar { height: 64px; padding: 0 12px; }.global-search { display: none; }.demo-switcher span, .notification, .user-chip { display: none !important; }.demo-switcher select { max-width: 170px; }
  .content { padding: 20px 13px 35px; }
  .page-header { align-items: flex-start; flex-direction: column; }.page-actions { width: 100%; }.page-actions .btn { flex: 1; }
  .metrics-grid, .report-metrics { grid-template-columns: 1fr 1fr; gap: 8px; }.metric-card { min-height: 104px; padding: 13px; }.metric-icon { display: none; }.metric-copy strong { font-size: 18px; }
  .portfolio-strip { grid-template-columns: 1fr; }.portfolio-strip > div { padding: 12px 18px !important; margin: 0 !important; border-right: 0; border-bottom: 1px solid var(--line); }
  .workflow-summary { grid-template-columns: repeat(2, 1fr); }
  .customer-grid { grid-template-columns: 1fr; }
  .table-toolbar { flex-wrap: wrap; }.table-search { width: 100%; }.table-toolbar > .input { flex: 1; }
  .tracker { overflow-x: auto; justify-content: flex-start; }.tracker > div { min-width: 92px; }
  .detail-header { align-items: flex-start; gap: 15px; }.detail-title .avatar { display: none; }.detail-state { align-items: flex-start; }
  .detail-tabs { gap: 16px; overflow-x: auto; }.detail-tabs button { white-space: nowrap; }
  .review-panel { grid-template-columns: 1fr; }.review-panel .prototype-note { grid-column: auto; }
  .info-grid { grid-template-columns: 1fr 1fr; }.loan-highlight { grid-template-columns: 1fr 1fr; }.loan-highlight > div:nth-child(2) { border-right: 0; }.loan-highlight > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .form-grid { grid-template-columns: 1fr; }.form-grid .field:has(.textarea) { grid-column: auto; }
  .modal-backdrop { padding: 0; place-items: end center; }.modal { width: 100%; max-height: 94vh; border-radius: 14px 14px 0 0; }.modal-footer { gap: 8px; }.modal-footer > div { flex-wrap: wrap; justify-content: flex-end; }
  .quick-grid { grid-template-columns: 1fr 1fr; }
  .donut-wrap { flex-direction: column; }
}