/* Flat interface: clear surfaces, borders and accessible contrast. */
:root {
  --neo-bg: #e9edf3;
  --neo-ink: #202b3b;
  --neo-muted: #4b586b;
  --neo-line: #c5cdd9;
  --neo-control: #748298;
  --neo-red: #c7192b;
  --neo-raised:none;
  --neo-small:none;
  --neo-inset:none;
  background: var(--neo-bg);
  color: var(--neo-ink);
}
body, .brand-bar, .sidebar-collapsed .cabinet-sidebar, .sidebar-collapsed .shell {
  background: var(--neo-bg);
  color: var(--neo-ink);
}
.brand-bar { border: 0; }
.brand-bar .brand { color: var(--neo-red); }
.brand-bar .brand>span { color: var(--neo-ink); }
.sidebar-collapsed .shell {
  border: 1px solid #f7f9fc;
  border-right: 0;
  border-bottom: 0;
  box-shadow:none;
  min-height: calc(100vh - 76px);
}
main { padding: 38px 38px 44px; }
h1,h2,h3 { color: var(--neo-ink); }
.muted, label, .metric small, .app-head small, .stage-labels,
.text-button, .avatar, .avatar small, .aside-bottom,
.product p, .news-item small, .message, .detail p, .detail small,
.eyebrow, .cabinet-label, .online { color: var(--neo-muted); }
.title-row { margin-bottom: 30px; }
.summary { border-color: var(--neo-line); padding: 25px 0; }
.metric { border-color: var(--neo-line); }
.metric strong { color: var(--neo-ink); }
.application, .product, .conversation, .loan-option, .queue-table {
  background: var(--neo-bg);
  border: 1px solid #f5f7fb;
  border-radius: 18px;
  box-shadow:none;
}
.application { margin-bottom: 24px; padding: 26px; }
.products { gap: 24px; }
.product { padding: 25px; }
.product .arrow { color: var(--neo-red); }
.application .app-symbol {
  background: var(--neo-bg);
  color: #42546d;
  border: 1px solid #f7f9fc;
  box-shadow:none;
  border-radius: 12px;
}
.message, .detail, .news-item, footer { border-color: var(--neo-line); }
.application .progress { height: 6px; }
.application .progress i {
  height: 6px;
  background: #d1d8e2;
  box-shadow:none;
}
.application .progress i.done { background: #9ba9bb; box-shadow:none; }
.application .progress i.current { background: var(--status-color); box-shadow:none; }
.application.status-submitted { --status-color:#3267b9; --status-ink:#204c94; }
.application.status-review { --status-color:#7b44bc; --status-ink:#653595; }
.application.status-needs_info { --status-color:#aa6810; --status-ink:#83500b; }
.application.status-approved { --status-color:#25804d; --status-ink:#1c613a; }
.application.status-rejected { --status-color:#bf3549; --status-ink:#9c2538; }
.application.status-funded { --status-color:#197d73; --status-ink:#145f58; }
.application .stage-labels .current { color: var(--status-ink); }
.badge { font-size:11px; font-weight:600; border:1px solid transparent; }
.badge.submitted { color:#204c94; background:#dfeaff; border-color:#b7cbed; }
.badge.review { color:#653595; background:#ece2ff; border-color:#cfbae8; }
.badge.needs_info { color:#83500b; background:#ffedcf; border-color:#dfc292; }
.badge.approved { color:#1c613a; background:#dcf1e3; border-color:#accfb9; }
.badge.rejected { color:#9c2538; background:#fbe0e5; border-color:#dfb4bd; }
.badge.funded { color:#145f58; background:#d6eeeb; border-color:#a9cdc7; }
button { transition: background .18s, box-shadow .18s, transform .18s; }
.primary {
  background:var(--neo-red); color:#fff; border:1px solid #b91124;
  box-shadow:none;
  border-radius:11px; font-weight:600;
}
.primary:hover { background:#ac1425; color:#fff; box-shadow:none; }
.primary:active { background:#a41222; box-shadow:none; transform:translateY(1px); }
.secondary {
  background:var(--neo-bg); color:#344258; border:1px solid #9ca9bb;
  box-shadow:none; border-radius:10px; font-weight:600;
}
.secondary:hover { background:#e0e6ef; border-color:#69798f; }
.secondary:active { box-shadow:none; transform:translateY(1px); }
.text-button { font-weight:500; border-radius:7px; }
.text-button:hover { color:var(--neo-red); background:#dde3ed; }
button:disabled { opacity:1; color:#5d6674; background:#d7dde6; border-color:#aab4c3; box-shadow:none; cursor:not-allowed; }
:is(button,a,input,select,textarea,summary):focus-visible {
  outline:3px solid #ad1425;
  outline-offset:3px;
}
.sidebar-collapsed .cabinet-sidebar nav { gap:13px; }
.sidebar-collapsed .cabinet-sidebar nav button {
  background:var(--neo-bg); color:#46546a;
  border:1px solid #f5f7fb; box-shadow:none;
  width:40px; height:40px; padding:9px; border-radius:11px;
}
.sidebar-collapsed .cabinet-sidebar nav button:hover { background:#dfe5ee; color:#28374e; }
.sidebar-collapsed .cabinet-sidebar nav button.active {
  color:#b91428; background:#f4e4e8; border-color:#ce9ca6;
  box-shadow:none;
}
.sidebar-collapsed .cabinet-sidebar nav button.active:hover { background:#efdae0; color:#a40d20; }
.sidebar-collapsed .cabinet-sidebar nav button:focus-visible { outline:3px solid #ad1425; }
.sidebar-collapsed .cabinet-sidebar nav button>span { background:#28364b; color:#fff; box-shadow:none; }
.avatar { border-color:var(--neo-line); }
input,select,textarea,.chat-composer textarea,.edit-plan textarea {
  background:var(--neo-bg); color:var(--neo-ink);
  border:1px solid var(--neo-control); border-radius:10px;
  box-shadow:none;
  font-size:13px;
}
input,select { min-height:44px; }
input::placeholder,textarea::placeholder { color:#4b586b; opacity:1; }
input:focus,select:focus,textarea:focus { border-color:#ad1425; }
input[type=checkbox] { width:17px; height:17px; min-height:0; box-shadow:none; accent-color:var(--neo-red); }
input:disabled,textarea:disabled { color:#58667a; background:#dfe4ec; opacity:1; }
.empty {
  background:var(--neo-bg); box-shadow:none;
  border:1px solid #c3ccd9; color:var(--neo-muted); border-radius:14px;
}
.queue-toolbar { gap:24px; }
.queue-tabs { gap:7px; }
.queue-tabs button {
  border:1px solid transparent; border-radius:9px; color:#4d5c71;
  background:transparent; font-size:12px;
}
.queue-tabs button.current {
  color:#a81124; background:#f1e3e8; border-color:#ca9da7;
  box-shadow:none;
}
.queue-tabs span { color:inherit; }
.queue-table th { color:#4c5c72; background:#dfe5ee; font-weight:600; padding-top:19px; padding-bottom:19px; }
.queue-table td { border-color:var(--neo-line); color:var(--neo-ink); }
.queue-table td small { color:var(--neo-muted); }
.queue-table .empty { box-shadow:none; }
.bank-case { background:#e4e9f1; box-shadow:none; border:1px solid #cbd3df; border-radius:14px; }
.bank-case dt,.bank-case .case-plan small { color:var(--neo-muted); }
.bank-case .application { box-shadow:none; }
.case-plan { border-color:var(--neo-line); }
.advisor-layout { gap:30px; }
.conversation-bar { border-color:var(--neo-line); }
.conversation-bar strong { color:var(--neo-ink); font-size:14px; }
.conversation-bar small,.chat-footnote,.plan-title span,.plan-facts dt,
.plan-missing,.plan-placeholder p,.loan-fit,.loan-payment small,
.loan-option dt,.loan-reason,.plan-note,.thinking span,.chat-message small,
.chat-message.user small,.edit-plan summary { color:var(--neo-muted); }
.conversation-bar .advisor-avatar { box-shadow:none; border-color:#d0a7a4; }
.chat-message>div { color:var(--neo-ink); }
.chat-message.user { background:#e1e7f0; box-shadow:none; border:1px solid #c5cedb; }
.chat-composer { margin-top:8px; }
.chat-composer textarea { border-color:var(--neo-control); background:var(--neo-bg); }
.chat-composer button { border-radius:10px; }
.financing-plan { padding:18px 20px; border:1px solid #f5f7fb; border-radius:16px; box-shadow:none; background:var(--neo-bg); }
.plan-placeholder,.plan-facts>div { border-color:var(--neo-line); }
.plan-placeholder>span { color:#566a84; }
.plan-facts dd { color:var(--neo-ink); }
.edit-plan summary { font-weight:500; border-radius:6px; }
.plan-missing { font-size:12px; }
.loan-comparison { gap:24px; }
.loan-option.preferred { border:1px solid #c78a94; box-shadow:none; }
.preferred .loan-fit { color:#b41327; font-weight:600; }
.loan-option dl>div { border-color:var(--neo-line); }
.loan-option dd,.loan-payment,.eligibility { color:var(--neo-ink); }
dialog,.error-dialog {
  background:var(--neo-bg); color:var(--neo-ink);
  border:1px solid #f9fbff; border-radius:22px;
  box-shadow:none;
}
dialog::backdrop,.error-dialog::backdrop { background:#23324b69; }
.dialog-heading small,.estimate,.consent { color:var(--neo-muted); }
.estimate { background:#e1e7ef; box-shadow:none; border:1px solid #c6cfdd; }
.icon,.error-close { color:#4b5b71; border-radius:9px; }
.error-close { background:var(--neo-bg); border:1px solid #b4bfcd; box-shadow:none; }
.error-close:hover { background:#dce3ec; color:var(--neo-ink); }
.error-dialog p,.approval-dialog #approval-description,.approval-terms,
.approval-notice,.rejection-dialog .approval-notice { color:var(--neo-muted); }
.error-illustration,.approval-illustration,.rejection-dialog .approval-illustration { background:transparent; }
.approval-label { color:#1c613a; background:#dcf1e3; border:1px solid #accfb9; }
.rejection-dialog .approval-label { color:#9c2538; background:#fbe0e5; border-color:#dfb4bd; }
.approval-amount { color:var(--neo-ink); }
.rejection-dialog .approval-terms { background:#e1e7ef; box-shadow:none; border:1px solid #c5cfdb; color:#425269; }
.advisor-error,#form-error { color:#a81124; }
#toast { background:#26364e; color:#fff; box-shadow:none; }
@media(max-width:1100px) {
  main { padding:28px; }
  .advisor-layout { gap:22px; }
  .financing-plan { padding:16px; }
}
@media(max-width:700px) {
  main { padding:24px 20px 32px; }
  .sidebar-collapsed .cabinet-sidebar { padding-left:8px; padding-right:8px; }
  .sidebar-collapsed .shell { min-height:calc(100vh - 64px); }
  .application { padding:20px; }
  .application,.product,.conversation,.loan-option,.queue-table { box-shadow:none; }
  .queue-tabs { gap:4px; }
  .queue-tabs button { padding:10px 8px; }
  .error-dialog .error-actions { gap:12px; }
}
@media(forced-colors:active) {
  button,input,select,textarea,.application,.conversation,.queue-table,.badge { border:1px solid ButtonText!important; box-shadow:none; }
  .sidebar-collapsed .cabinet-sidebar nav button.active { outline:2px solid Highlight; }
}
/* Readable type and a clear, underlined brand symbol. */
:root { --neo-muted:#354255; }
body { font-size:15px; }
.brand-bar .brand { gap:14px; }
.brand-symbol { width:37px; height:44px; flex:none; color:#ef182e; }
.brand-bar .brand>span,.bank-workspace .brand-bar .brand>span { font-size:19px; font-weight:850; letter-spacing:-.5px; }
small,.muted,label,.message,.detail p,.detail small,.metric small,.app-head small,.stage-labels,.badge,
.queue-table th,.queue-table td small,.conversation-bar small,.chat-footnote,.plan-title span,.plan-facts dt,
.plan-missing,.plan-placeholder p,.loan-fit,.loan-payment small,.loan-option dl>div,.loan-reason,.plan-note,
.thinking span,.chat-message small,.edit-plan summary,.approval-label,.approval-notice,.approval-dialog #approval-description { font-size:13px; line-height:1.6; }
.primary,.secondary,.text-button,.queue-tabs button,.starter-prompts button,.loan-option button,input,select,textarea,.chat-composer textarea,.edit-plan textarea { font-size:15px; }
.chat-message>div,.plan-facts dd,.case-plan p,.error-dialog p,.approval-terms,.rejection-dialog .approval-terms { font-size:15px; }
.conversation-bar strong { font-size:16px; }
.queue-table th,.queue-tabs button { color:#354255; }
.analytics { display:grid; grid-template-columns:1fr 1fr; gap:36px; margin:30px 0 40px; padding:28px 0; border-top:1px solid var(--neo-line); border-bottom:1px solid var(--neo-line); }
.analytics h2 { font-size:20px; margin:0 0 22px; }
.status-visual { display:flex; gap:26px; align-items:center; }
.status-donut { width:156px; height:156px; flex:none; border-radius:50%; padding:19px; box-shadow:none; }
.status-donut>div { width:100%; height:100%; border-radius:50%; background:var(--neo-bg); display:flex; align-items:center; justify-content:center; flex-direction:column; }
.status-donut strong { font-size:32px; line-height:1.2; }
.status-donut span { font-size:13px; color:var(--neo-muted); }
.status-visual ul { list-style:none; padding:0; margin:0; flex:1; }
.status-visual li { display:flex; align-items:center; gap:9px; font-size:13px; padding:5px 0; color:var(--neo-muted); }
.status-visual li i { width:9px; height:9px; border-radius:50%; flex:none; }
.status-visual li strong { margin-left:auto; color:var(--neo-ink); }
.analytics-products>p { font-size:13px; color:var(--neo-muted); margin:-14px 0 20px; }
.chart-row { margin:18px 0; }
.chart-row>div:first-child { display:flex; flex-wrap:wrap; justify-content:space-between; gap:6px; font-size:13px; margin-bottom:9px; }
.chart-track { height:12px; border-radius:7px; box-shadow:none; background:#d7dee8; overflow:hidden; }
.chart-track i { display:block; height:100%; background:#c7192b; border-radius:7px; }
@media(max-width:1100px) { .analytics { grid-template-columns:1fr; gap:32px; } .status-visual { max-width:520px; } }
@media(max-width:550px) { .brand-bar .brand>span,.bank-workspace .brand-bar .brand>span { font-size:17px; } .brand-symbol { width:30px; height:36px; } .status-visual { gap:16px; flex-wrap:wrap; } .status-donut { width:130px; height:130px; } .status-visual ul { min-width:170px; } }
/* Compact analytics leave room for the application list. */
.analytics { grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:26px; margin:16px 0 22px; padding:18px 0; }
.analytics h2 { font-size:18px; margin-bottom:16px; }
.analytics-toolbar { grid-column:1 / -1; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:14px; }
.analytics .analytics-toolbar h2 { margin:0; }
.analytics-switch { display:flex; gap:8px; flex-wrap:wrap; }
.analytics-switch button { padding:9px 13px; }
.analytics-switch button[aria-pressed="true"] { background:#f1e3e8; color:#962137; border-color:#b87e8b; box-shadow:none; }
.analytics-table { width:100%; border-collapse:collapse; font-size:13px; }
.analytics-table th,.analytics-table td { padding:11px 0; border-bottom:1px solid var(--neo-line); text-align:left; }
.analytics-table tbody th { font-weight:400; }
.analytics-line-panel { grid-column:1 / -1; min-width:0; overflow-x:auto; padding:26px; background:var(--neo-bg); border:1px solid #f5f7fb; border-radius:20px; box-shadow:none; }
.analytics-line-panel + .analytics-line-panel { margin-top:8px; }
.analytics-line { display:block; width:100%; min-width:600px; height:auto; overflow:visible; margin:22px 0 16px; border-radius:14px; background:var(--neo-bg); box-shadow:none; }
.analytics-line text { font:13px "Segoe UI",sans-serif; fill:var(--neo-ink); }
.analytics-grid { stroke:var(--neo-line); stroke-width:1; stroke-dasharray:3 5; }
.analytics-line rect { fill:#94a7bd; stroke:#8095af; stroke-width:.5; }
.analytics-line polyline { stroke:var(--neo-red); stroke-linecap:round; }
.analytics-line circle { fill:var(--neo-bg); stroke:var(--neo-red); stroke-width:2.5; }
.analytics-line circle:focus { outline:2px solid var(--neo-ink); outline-offset:4px; }
.analytics-line-values { font-size:15px; margin-top:4px; border-top:1px solid var(--neo-line); }
.analytics-line-values summary { cursor:pointer; padding:16px 0 0; color:var(--neo-muted); }
.analytics-combo-legend { display:flex; flex-wrap:wrap; gap:18px; font-size:14px; margin:10px 0 0; }
.analytics-combo-legend span { display:flex; align-items:center; gap:7px; }
.analytics-combo-legend i { width:12px; height:12px; background:#94a7bd; border:1px solid #8095af; border-radius:3px; box-shadow:none; }
.analytics-combo-legend span:last-child i { height:3px; width:20px; background:var(--neo-red); border:0; box-shadow:none; }
@media(max-width:700px) { .analytics-line-panel { padding:18px; border-radius:16px; } }
.analytics-table td,.analytics-table thead th:last-child { text-align:right; padding-left:12px; }
.status-visual { gap:16px; }
.status-donut { width:106px; height:106px; padding:13px; }
.status-donut strong { font-size:25px; }
.status-visual li { padding:2px 0; font-size:13px; }
.chart-row { margin:11px 0; }
.chart-track { height:9px; }
.analytics-products>p { margin:-10px 0 14px; }
.summary { padding:18px 0; }
.profile-trigger { width:42px; height:42px; padding:0; border-radius:50%; border:1px solid #a1adbd; background:var(--neo-bg); color:var(--neo-ink); box-shadow:none; font-size:19px; overflow:hidden; cursor:pointer; }
.profile-trigger img { width:100%; height:100%; object-fit:cover; }
.profile-settings { max-width:760px; }
.profile-settings form { display:grid; gap:18px; margin-bottom:36px; }
.profile-settings label { display:grid; gap:8px; }
.profile-settings button { justify-self:start; }
.document-row { display:flex; gap:14px; align-items:center; padding:18px 0; border-bottom:1px solid var(--neo-line); }
.document-row>span { flex:1; overflow-wrap:anywhere; }
.document-row small { display:block; }
.repayments { margin-top:18px; border-top:1px solid var(--neo-line); padding-top:14px; }
.repayments summary { cursor:pointer; font-size:14px; font-weight:600; }
.repayment-months { max-height:280px; overflow:auto; }
.repayment-months>div { display:flex; flex-wrap:wrap; align-items:center; gap:12px; padding:10px 0; border-bottom:1px solid var(--neo-line); font-size:14px; }
.repayment-months small { margin-right:auto; }
.paid-label { color:#1c613a; }
@media(max-width:760px) { .analytics { grid-template-columns:1fr; } .document-row { flex-wrap:wrap; } }
/* Calm profile composition with compact, purposeful upload controls. */
.profile-settings { max-width:1000px; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:40px; }
.profile-settings h2 { font-size:20px; margin:0 0 24px; }
.profile-settings form { gap:20px; }
.profile-settings input:not([type=file]) { box-shadow:none; border-color:#98a4b5; }
.profile-settings .muted { line-height:1.7; margin:0; }
.profile-files { border-left:1px solid var(--neo-line); padding-left:32px; }
.profile-personal, .profile-files { min-width:0; }
.profile-files dd { margin:4px 0 16px; overflow-wrap:anywhere; }
.avatar-upload { display:flex; align-items:center; gap:18px; }
.profile-preview { width:76px; height:76px; border-radius:50%; background:#dce3ed; color:#425269; display:grid; place-items:center; font-size:30px; overflow:hidden; flex:none; }
.profile-preview img { width:100%; height:100%; object-fit:cover; }
.file-pick { position:relative; cursor:pointer; padding:12px 15px; border:1px solid #a9b4c3; border-radius:10px; background:#f0f3f7; color:#26364b; font-size:14px; }
.file-pick input[type=file] { position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; min-height:0; }
.file-pick:focus-within { outline:3px solid #ad1425; outline-offset:3px; }
.file-selection,.document-upload>span { font-size:13px; font-weight:400; color:#4b586b; overflow-wrap:anywhere; }
.document-upload { min-height:126px; display:flex!important; flex-direction:column; justify-content:center; align-items:center; text-align:center; border-style:dashed; margin-bottom:18px; }
.document-upload:hover,.file-pick:hover { background:#e3e9f1; }
.profile-settings .primary { box-shadow:none; }
.repayment-totals { display:flex; gap:32px; padding:17px 0 0; margin-top:15px; border-top:1px solid var(--neo-line); }
.repayment-totals small { display:block; color:var(--neo-muted); }
.repayment-totals strong { display:block; font-size:20px; margin-top:5px; }
.repayment-months>div>span:first-child { min-width:170px; }
@media(max-width:800px) { .profile-settings { grid-template-columns:1fr; gap:26px; } .profile-files { border-left:0; border-top:1px solid var(--neo-line); padding:26px 0 0; } }
@media(max-width:480px) { .repayment-totals { gap:18px; flex-wrap:wrap; } }
/* Rounded summary surface shared by both cabinets. */
.summary {
  border:1px solid #f7f9fc;
  border-radius:20px;
  padding:20px 24px;
  background:var(--neo-bg);
  box-shadow:none;
  overflow:hidden;
}
@media(max-width:600px) { .summary { border-radius:17px; padding:18px 16px; } }
/* Each funded loan carries its own repayment chart. */
.credit-repayment-chart { display:flex; align-items:center; gap:24px; margin-top:20px; padding-top:20px; border-top:1px solid var(--neo-line); }
.repayment-ring { width:104px; height:104px; padding:12px; border-radius:50%; flex:none; background:conic-gradient(#197d73 0deg var(--paid-angle),#c4cedb var(--paid-angle) 360deg); }
.repayment-ring>div { width:100%; height:100%; border-radius:50%; background:var(--neo-bg); display:flex; flex-direction:column; align-items:center; justify-content:center; }
.repayment-ring strong { font-size:24px; line-height:1.2; color:var(--neo-ink); }
.repayment-ring span { font-size:12px; color:var(--neo-muted); }
.credit-repayment-chart .repayment-totals { border:0; padding:0; margin:0; flex:1; flex-wrap:wrap; gap:18px 32px; }
.repayment-key { display:inline-block; width:9px; height:9px; border-radius:50%; margin-right:7px; }
.repayment-key.paid { background:#197d73; }
.repayment-key.remaining { background:#8495ab; }
@media(max-width:480px) { .credit-repayment-chart { gap:16px; } .repayment-ring { width:88px; height:88px; padding:10px; } .credit-repayment-chart .repayment-totals strong { font-size:18px; } }
.credit-details { margin-top:20px; padding-top:15px; border-top:1px solid var(--neo-line); }
.credit-details summary { cursor:pointer; font-weight:600; font-size:14px; }
.credit-facts { display:grid; grid-template-columns:1fr 1fr; gap:0 28px; margin:16px 0 0; }
.credit-facts>div { padding:11px 0; border-bottom:1px solid var(--neo-line); }
.credit-facts dt { font-size:13px; color:var(--neo-muted); }
.credit-facts dd { margin:5px 0 0; font-size:15px; overflow-wrap:anywhere; }
.payment-view-switch { display:flex; gap:10px; margin:18px 0; }
.payment-view-switch button { padding:9px 16px; font-size:14px; }
.payment-view-switch button[aria-pressed=true] { color:#145f58; background:#d6eeeb; box-shadow:none; border-color:#85aaa5; }
.chart-legend { display:flex; gap:20px; font-size:13px; }
.monthly-chart-panel>p { margin:12px 0; font-size:13px; }
.monthly-chart-scroll { overflow-x:auto; padding-top:70px; }
.monthly-bars { display:flex; min-width:100%; gap:10px; padding:0 6px 12px; }
.monthly-bar { position:relative; flex:1 0 42px; max-width:64px; text-align:center; border-radius:5px; }
.bar-plot { height:130px; display:flex; align-items:flex-end; justify-content:center; gap:3px; border-bottom:1px solid #9aa9bc; }
.bar-plot i { display:block; width:12px; border-radius:4px 4px 0 0; }
.bar-planned { background:#8495ab; }
.bar-paid { background:#197d73; }
.monthly-bar>span { display:block; font-size:12px; color:var(--neo-muted); margin-top:9px; white-space:nowrap; }
.bar-tooltip { position:absolute; bottom:100%; left:0; width:170px; text-align:left; z-index:2; padding:10px; border-radius:8px; background:#26364b; color:white; font-size:12px; line-height:1.6; visibility:hidden; pointer-events:none; }
.monthly-bar:last-child .bar-tooltip { left:auto; right:0; }
.monthly-bar:hover .bar-tooltip,.monthly-bar:focus .bar-tooltip { visibility:visible; }
[hidden] { display:none!important; }
@media(max-width:550px) { .credit-facts { grid-template-columns:1fr; } }
/* Keep the profile control on the same centre line as navigation. */
.sidebar-collapsed .cabinet-sidebar .aside-bottom { display:flex; justify-content:center; align-items:center; width:100%; }
.sidebar-collapsed .cabinet-sidebar .profile-trigger { display:grid; place-items:center; flex:0 0 40px; width:40px; height:40px; min-width:40px; min-height:40px; margin:0; padding:0; box-sizing:border-box; border-radius:50%; line-height:1; font-family:inherit; font-size:18px; font-weight:600; text-align:center; }
.profile-trigger img { display:block; border-radius:50%; }
.advisor-workspace { display:grid; grid-template-columns:190px minmax(0,1fr); gap:26px; align-items:start; }
.plan-history { position:sticky; top:98px; min-width:0; padding:18px 12px; border:1px solid #f7f9fc; border-radius:16px; background:var(--neo-bg); box-shadow:none; }
.plan-history h2 { font-size:18px; margin:0 8px 6px; }
.plan-history>p { font-size:13px; margin:0 8px 15px; }
.plan-history-list { display:grid; gap:8px; max-height:calc(100vh - 235px); overflow:auto; }
.plan-history-item { display:block; width:100%; text-align:left; padding:12px; background:transparent; border:1px solid transparent; border-radius:10px; color:var(--neo-ink); cursor:pointer; }
.plan-history-item strong { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; font-size:14px; line-height:1.5; font-weight:600; }
.plan-history-item small { display:block; font-size:12px; margin-top:5px; color:var(--neo-muted); }
.plan-history-item:hover { background:#dfe5ee; }
.plan-history-item.selected { background:#f1e3e8; border-color:#c997a2; box-shadow:none; }
.advisor-main { min-width:0; }
@media(max-width:1250px) { .advisor-workspace .advisor-layout { grid-template-columns:1fr; } .advisor-workspace .advisor-heading { align-items:flex-start; gap:16px; flex-wrap:wrap; } .advisor-workspace .advisor-heading h1 { font-size:27px; } }
@media(max-width:700px) { .advisor-workspace { grid-template-columns:1fr; gap:22px; } .plan-history { position:static; } .plan-history-list { display:flex; overflow-x:auto; max-height:160px; } .plan-history-item { flex:0 0 175px; } }
/* Dock the plan list directly beside the permanent navigation rail. */
@media(min-width:701px) {
  main:has(.advisor-workspace) { padding-left:0; padding-top:0; }
  .advisor-workspace { grid-template-columns:214px minmax(0,1fr); gap:24px; }
  .plan-history { top:76px; height:calc(100vh - 76px); padding:30px 12px 20px; border-radius:0; border:0; border-right:1px solid #c5cdd9; box-shadow:none; }
  .plan-history-list { max-height:calc(100vh - 190px); }
  .advisor-main { padding-top:30px; }
}
@media(min-width:701px) {
  body.sidebar-collapsed .shell main:has(.advisor-workspace) { padding-top:0; padding-left:0; }
  .plan-history { background:#e0e6ef; border-right:2px solid #8e9db1; border-left:1px solid #b2bece; border-top:1px solid #a5b2c4; box-shadow:none; }
}
@media(min-width:701px) {
  .plan-history { border-radius:20px 0 0 20px; border-bottom:1px solid #a5b2c4; }
}
@media(min-width:701px) { .plan-history { border-radius:20px; } }
.plan-history-row { position:relative; min-width:0; }
.plan-history-row .plan-history-item { padding-right:32px; }
.plan-more { position:absolute; right:4px; top:9px; width:29px; height:29px; padding:0; display:grid; place-items:center; border:0; border-radius:7px; background:transparent; color:#354255; cursor:pointer; font-size:22px; line-height:1; }
.plan-more:hover { background:#cbd5e3; }
.pin-mark { color:#9c2538; font-size:10px; }
.plan-context-menu { position:fixed; z-index:1000; padding:6px; min-width:170px; border:1px solid #9aa9bd; border-radius:11px; background:#eef2f7; box-shadow:none; }
.plan-context-menu button { width:100%; border:0; padding:11px 15px; border-radius:7px; background:transparent; color:#202b3b; text-align:left; font:inherit; cursor:pointer; }
.plan-context-menu button:hover { background:#d8e1ed; }
@media(max-width:700px) { .plan-history-row { flex:0 0 175px; } }
.plan-history-list { display:block; }
.plan-group { margin-bottom:14px; }
.plan-group>summary { display:flex; align-items:center; gap:6px; padding:9px 6px; cursor:pointer; font-size:13px; font-weight:600; color:#354255; list-style:none; border-radius:7px; }
.plan-group>summary::-webkit-details-marker { display:none; }
.plan-group>summary::before { content:'›'; width:10px; font-size:18px; line-height:1; transition:transform .15s; }
.plan-group[open]>summary::before { transform:rotate(90deg); }
.plan-group>summary:hover { background:#d3dde9; }
.plan-group>summary small { margin-left:auto; font-size:12px; font-weight:400; }
.plan-group-items { display:grid; gap:6px; }
.pin-icon { display:inline-block; width:15px; height:15px; flex:none; color:#a42a40; vertical-align:-2px; margin-right:4px; }
.plan-group-empty { padding:6px 12px; margin:0; font-size:12px; line-height:1.6; color:var(--neo-muted); }
@media(max-width:700px) { .plan-history-list { display:block; max-height:260px; } .plan-group-items { display:flex; overflow-x:auto; } }
/* Isolate nested plan navigation from the global sidebar and centred pages. */
.plan-history { width:auto; min-width:0; left:auto; right:auto; bottom:auto; display:block; }
body.sidebar-collapsed .shell main:has(.advisor-workspace) { max-width:none; width:100%; margin:0; }
@media(min-width:701px) { .advisor-workspace { grid-template-columns:214px minmax(0,1fr); } .plan-history { width:100%; } .advisor-main { min-width:0; } }
/* Plan history scrolls independently; its base joins the page edge. */
@media(min-width:701px) {
  body.sidebar-collapsed .shell main:has(.advisor-workspace) { padding-bottom:0; }
  .advisor-main { padding-bottom:44px; }
  .plan-history { align-self:stretch; height:auto; min-height:calc(100dvh - 76px); border-radius:20px 20px 0 0; display:flex; flex-direction:column; overflow:hidden; }
  .plan-history-list { flex:1; min-height:0; max-height:none; overflow-y:scroll; overflow-x:hidden; scrollbar-gutter:stable; scrollbar-width:thin; scrollbar-color:#7b8da6 #d6dfeb; overscroll-behavior:contain; padding-right:5px; }
  .plan-history-list::-webkit-scrollbar { width:8px; }
  .plan-history-list::-webkit-scrollbar-track { background:#d6dfeb; border-radius:6px; }
  .plan-history-list::-webkit-scrollbar-thumb { background:#7b8da6; border-radius:6px; border:2px solid #d6dfeb; }
  .plan-history-list::-webkit-scrollbar-thumb:hover { background:#526780; }
}
.analytics-period { display:flex; align-items:center; gap:7px; flex-wrap:wrap; width:100%; }
.analytics-period>span { color:var(--neo-muted); font-size:13px; margin-right:8px; }
.analytics-period button { padding:8px 12px; font-size:13px; }
.analytics-period button[aria-pressed="true"] { color:var(--neo-red); border-color:#bf8f9a; background:#eee3e8; box-shadow:none; }
.analytics-soft-panel { min-width:0; padding:22px; border:1px solid #f8faff; border-radius:22px; background:var(--neo-bg); box-shadow:none; }
.soft-chart-heading { display:flex; align-items:start; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.analytics .soft-chart-heading h2 { margin:0; font-size:17px; }
.soft-chart-heading>strong { font-size:19px; font-weight:650; }
.analytics-soft-panel>p { font-size:12px; margin:10px 0 0; }
.soft-chart-scroll { overflow-x:auto; padding:28px 3px 4px; }
.soft-chart { display:grid; grid-template-columns:repeat(var(--columns),minmax(82px,1fr)); min-width:calc(var(--columns)*82px); gap:10px; position:relative; padding:0 10px; }
.soft-chart::after { content:none; }
.soft-chart-column { min-width:0; text-align:center; border-radius:8px; outline-offset:2px; }
.soft-chart-plot { height:135px; position:relative; display:flex; align-items:end; justify-content:center; padding-top:24px; }
.soft-bar { display:block; width:46px; max-width:75%; min-height:0; border-radius:11px 11px 0 0; background:linear-gradient(100deg,#e9c4ca,#c98290); border:1px solid #f4dfe3; box-shadow:none; }
.soft-bar.tone-1 { background:linear-gradient(100deg,#cbd6e4,#93a5be); border-color:#e4eaf2; }
.soft-bar.tone-2 { background:linear-gradient(100deg,#c5bcd7,#9c8bb7); border-color:#e4dced; }
.soft-bar.tone-3 { background:linear-gradient(100deg,#e2a8b3,#bd667a); border-color:#f2cbd4; }
.soft-chart-value { position:absolute; top:-12px; left:50%; transform:translateX(-50%); white-space:nowrap; font-size:11px; color:var(--neo-ink); }
.soft-chart-label { display:block; height:32px; padding-top:15px; white-space:nowrap; font-size:12px; color:var(--neo-muted); }
.soft-bar.soft-bar-stacked { display:flex; flex-direction:column-reverse; overflow:hidden; background:transparent; border:0; }
.soft-bar-segment { display:block; flex:none; width:100%; background-image:linear-gradient(90deg,#ffffff30,transparent 45%,#00000012); box-shadow:none; }
.soft-bar-segment + .soft-bar-segment { border-bottom:1px solid #ffffff65; }
@media(max-width:950px) { .analytics:has(.analytics-soft-panel) { grid-template-columns:1fr; } }

.soft-bar.tone-4 { background:linear-gradient(100deg,#c7dccc,#8eb39b); border-color:#e0eee4; }
.soft-bar.tone-5 { background:linear-gradient(100deg,#ead7b6,#c6a472); border-color:#f5e8d2; }
.soft-bar.tone-6 { background:linear-gradient(100deg,#b9dcd9,#7eafad); border-color:#dceeed; }
.soft-bar.tone-7 { background:linear-gradient(100deg,#d4c7e8,#aa91c5); border-color:#eae0f5; }
.soft-bar.tone-8 { background:linear-gradient(100deg,#ecd0be,#cc9d84); border-color:#f7e5d8; }
.soft-bar.tone-9 { background:linear-gradient(100deg,#c5dbea,#8fb6ce); border-color:#e0edf5; }
.soft-bar.tone-10 { background:linear-gradient(100deg,#d7ddbc,#abb783); border-color:#eaf0d9; }
.soft-bar.tone-11 { background:linear-gradient(100deg,#e3c6da,#b48fa9); border-color:#f2e0ec; }
.soft-status-legend { list-style:none; padding:16px 0 0; margin:14px 0 0; border-top:1px solid var(--neo-line); display:grid; gap:8px; }
.soft-status-legend li,.analytics-tooltip li { display:flex; align-items:center; gap:8px; font-size:12px; color:var(--neo-ink); }
.soft-status-legend i,.analytics-tooltip li i { width:8px; height:8px; border-radius:50%; flex:none; }
.soft-status-legend strong,.analytics-tooltip li b { margin-left:auto; }
.soft-status-legend-shared { grid-column:1 / -1; display:flex; flex-wrap:wrap; gap:12px 24px; margin:0; padding:16px 0 0; }
.analytics-tooltip { position:fixed; z-index:1100; width:270px; max-width:calc(100vw - 24px); padding:18px; border:1px solid #f8faff; border-radius:16px; background:var(--neo-bg); box-shadow:none; pointer-events:none; color:var(--neo-ink); }
.analytics-tooltip-date { display:block; font-size:14px; text-transform:capitalize; }
.analytics-tooltip-total { display:flex; flex-direction:column; gap:6px; font-size:12px; color:var(--neo-muted); margin-top:12px; }
.analytics-tooltip-total>b { font-size:20px; color:var(--neo-ink); }
.analytics-tooltip ul { list-style:none; margin:14px 0 0; padding:12px 0 0; border-top:1px solid var(--neo-line); display:grid; gap:8px; }
.overview-credits { margin:28px 0; }
.credit-summary-row { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:20px; margin:14px 0; border:1px solid #f5f7fb; border-radius:16px; background:var(--neo-bg); box-shadow:none; }
.credit-summary-row small { display:block; margin-top:7px; color:var(--neo-muted); font-size:12px; }
@media(max-width:700px) { .credit-summary-row { flex-wrap:wrap; } }

/* Full credit workspace */
.credit-detail-link { margin-top:18px; }
.credit-page { max-width:1100px; margin:auto; }
.credit-page-heading { margin-top:28px; gap:20px; }
.credit-page-heading .badge { white-space:nowrap; }
.credit-page h1:focus { outline:none; }
.credit-page .summary { flex-wrap:wrap; gap:20px 0; }
.credit-page .metric { min-width:180px; }
.credit-page .metric strong { font-size:clamp(20px,2.2vw,30px); }
.credit-page-payments,.credit-page-history { margin-top:32px; border-top:1px solid var(--neo-line); padding-top:16px; }
.credit-page-history article { border-left:2px solid var(--neo-line); padding:4px 0 4px 20px; margin:18px 0; }
.credit-page-history small { color:var(--neo-muted); }
.credit-page-history p { margin:6px 0; }
@media(max-width:550px) { .credit-page-heading { flex-wrap:wrap; }.credit-page .metric { padding-left:0; border:0; width:100%; }.credit-page .summary { display:grid; } }
/* Rounded status labels and dimensional credit navigation. */
.badge { border-radius:999px; padding:8px 13px; }
.secondary.credit-detail-link { display:inline-flex; align-items:center; justify-content:space-between; gap:22px; min-height:48px; padding:8px 10px 8px 18px; border:1px solid #f7f9fc; border-radius:16px; color:var(--neo-ink); background:linear-gradient(135deg,#f1f4f8,var(--neo-bg)); box-shadow:none; font-size:14px; font-weight:600; }
.credit-detail-arrow { display:grid; place-items:center; width:30px; height:30px; border-radius:10px; background:var(--neo-bg); color:var(--neo-red); box-shadow:none; font-size:20px; }
.secondary.credit-detail-link:hover { background:#eef2f7; border-color:#d1d9e4; transform:translateY(-1px); }
.secondary.credit-detail-link:active { transform:translateY(1px); box-shadow:none; }
.secondary.credit-detail-link:focus-visible { outline:2px solid var(--neo-red); outline-offset:4px; }
@media(prefers-reduced-motion:reduce) { .secondary.credit-detail-link:hover,.secondary.credit-detail-link:active { transform:none; } }

.product-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.product-calculator { margin-top:40px; padding-top:24px; border-top:1px solid var(--neo-line); }
.product-calculator .section-top { margin-bottom:22px; }
.product-calculator h2 { margin-bottom:8px; }
.calculator-layout { display:grid; grid-template-columns:1fr 1fr; gap:60px; }
.calculator-fields { max-width:520px; }
.calculator-fields label { margin-bottom:18px; }
.calculator-fields input[type=range] { padding:0; accent-color:var(--neo-red,#d5102c); box-shadow:none; cursor:pointer; }
.calculator-range-labels { display:flex; justify-content:space-between; gap:12px; font-size:13px; }
.calculator-result { border-left:1px solid var(--neo-line); padding-left:40px; }
.calculator-result>small { color:var(--neo-muted); }
.calculator-payment { display:block; font-size:38px; letter-spacing:-1px; margin:12px 0 24px; }
.calculator-result dl>div { display:flex; justify-content:space-between; gap:20px; margin:16px 0; font-size:14px; }
.calculator-result dt { color:var(--neo-muted); }.calculator-result dd { margin:0; text-align:right; }
.calculator-result .primary { margin-top:15px; }
.calculator-note { max-width:900px; margin-top:24px; line-height:1.8; }
.product-info-heading { margin-top:30px; gap:24px; }
.product-info-columns { display:grid; grid-template-columns:1fr 1fr; gap:60px; }
.product-info-columns p,.product-info-columns li { font-size:15px; line-height:1.8; }
.product-info-columns ul,.product-info-columns ol { padding-left:20px; }
.product-info-columns h2:not(:first-child) { margin-top:28px; }
@media(max-width:750px) { .calculator-layout,.product-info-columns { grid-template-columns:1fr; gap:24px; }.calculator-result { border-left:0; border-top:1px solid var(--neo-line); padding:24px 0 0; }.product-info-heading { flex-wrap:wrap; }.product-info .summary { flex-wrap:wrap; gap:20px; }.product-info .metric { border:0; padding:0; min-width:150px; }.calculator-payment { font-size:32px; } }

.product-comparison { margin-top:40px; padding-top:24px; border-top:1px solid var(--neo-line); }
.product-comparison .section-top { gap:20px; flex-wrap:wrap; }
.comparison-table-scroll { overflow-x:auto; border-radius:12px; }
.comparison-table-scroll table { width:100%; min-width:760px; border-collapse:collapse; font-size:14px; text-align:left; }
.comparison-table-scroll caption { text-align:left; padding:0 0 16px; }
.comparison-table-scroll th,.comparison-table-scroll td { padding:18px 16px; border-bottom:1px solid var(--neo-line); vertical-align:top; line-height:1.6; width:25%; }
.comparison-table-scroll thead th { color:var(--neo-text,#192d45); font-size:16px; }
.comparison-table-scroll tbody th { font-weight:500; color:var(--neo-muted); }
.comparison-chart-heading { margin:30px 0 18px; display:flex; justify-content:space-between; align-items:center; gap:16px; flex-wrap:wrap; }
.comparison-metrics { display:flex; gap:10px; flex-wrap:wrap; }
.comparison-metrics [aria-pressed=true] { color:#bd1230; border-color:#cc8291; background:#f6e6eb; }
.comparison-chart { display:grid; gap:24px; margin:24px 0; }
.comparison-bar-heading { display:flex; justify-content:space-between; gap:16px; font-size:15px; margin-bottom:10px; }
.comparison-track { height:24px; border-radius:7px; background:#dce2ec; box-shadow:none; overflow:hidden; }
.comparison-bar { height:100%; border-radius:7px; background:#c71432; transition:width .65s cubic-bezier(.22,.68,0,1); animation:comparison-enter .75s both; animation-delay:var(--row-delay); transform-origin:left; }
.comparison-chart-row:nth-child(2) .comparison-bar { background:#566e8d; }.comparison-chart-row:nth-child(3) .comparison-bar { background:#8699b0; }
.comparison-chart-row small { display:block; color:var(--neo-muted); margin-top:5px; }
@keyframes comparison-enter { from { transform:scaleX(0); opacity:.4; } to { transform:scaleX(1); opacity:1; } }
@media(max-width:750px) { .product-calculator .section-top { flex-wrap:wrap; gap:14px; }.comparison-bar-heading { font-size:13px; }.comparison-metrics { gap:8px; } }
@media(prefers-reduced-motion:reduce) { .comparison-bar { animation:none; transition:none; } }

.status-donut.segmented-donut { position:relative; padding:0; background:none; box-shadow:none; width:140px; height:140px; overflow:visible; }
.segmented-donut svg { display:block; width:100%; height:100%; overflow:visible; }
.status-donut.segmented-donut>.donut-center { position:absolute; left:30%; top:30%; width:40%; height:40%; background:none; pointer-events:none; }
.donut-segment { transition:transform .22s ease,filter .22s ease; }
.donut-segment.segment-active { transform:translate(var(--segment-x),var(--segment-y)); filter:none; }
[data-donut-segment] { cursor:help; outline:none; }
[data-donut-segment]:focus-visible { stroke-width:18; }
.donut-tooltip { position:fixed; z-index:1000; max-width:calc(100vw - 16px); padding:12px 16px; border-radius:10px; background:#203149; color:white; font-size:13px; line-height:1.6; pointer-events:none; box-shadow:none; }
@media(prefers-reduced-motion:reduce) { .donut-segment { transition:none; } }

/* Keep geometry stable; connect each arc to its legend entry. */
.donut-segment.segment-active { transform:none; filter:brightness(1.12); }
[data-donut-segment]:focus-visible { stroke-width:14; }
.status-visual [data-status-legend] { border-radius:6px; padding:5px 8px; transition:background .18s,color .18s,opacity .18s; cursor:help; }
.status-visual.status-highlighted .donut-segment:not(.segment-active) { opacity:.3; }
.status-visual.status-highlighted [data-status-legend]:not(.legend-active) { opacity:.45; }
.status-visual [data-status-legend].legend-active { background:#d5dfec; color:#172d48; box-shadow:none; }
.status-visual [data-status-legend]:focus-visible { outline:2px solid #7188a6; outline-offset:2px; }
.donut-segment { transition:opacity .18s,filter .18s; }
/* Lift only the selected arc, without changing its size or share. */
.donut-segment.segment-active { transform:translateY(-4px); filter:brightness(1.08) drop-shadow(0 4px 3px #23324b44); }
.donut-segment { transition:transform .2s ease,opacity .18s ease,filter .18s ease; }
@media(prefers-reduced-motion:reduce) { .donut-segment { transition:none; } }
/* Shared hover/focus lift for vertical and horizontal charts. */
.soft-bar,.monthly-bar .bar-plot,.chart-track,.comparison-track { translate:0 0; transition:translate .2s ease,filter .2s ease; }
.soft-chart-column:hover .soft-bar,.soft-chart-column:focus-visible .soft-bar,
.monthly-bar:hover .bar-plot,.monthly-bar:focus-visible .bar-plot,
.chart-row:hover .chart-track,.chart-row:focus-visible .chart-track,
.comparison-chart-row:hover .comparison-track,.comparison-chart-row:focus-visible .comparison-track {
 translate:0 -4px; filter:brightness(1.07) drop-shadow(0 4px 3px #23324b44);
}
.chart-row,.comparison-chart-row { outline-offset:5px; border-radius:6px; }
@media(prefers-reduced-motion:reduce) {
 .soft-bar,.monthly-bar .bar-plot,.chart-track,.comparison-track { transition:none; }
}
/* Make the upward movement clearly visible on every chart. */
.soft-chart-column:hover .soft-bar,.soft-chart-column:focus-visible .soft-bar,
.monthly-bar:hover .bar-plot,.monthly-bar:focus-visible .bar-plot,
.chart-row:hover .chart-track,.chart-row:focus-visible .chart-track,
.comparison-chart-row:hover .comparison-track,.comparison-chart-row:focus-visible .comparison-track {
 translate:0 -8px; filter:brightness(1.08) drop-shadow(0 7px 4px #23324b55);
}

/* The stacked graph uses the same individual-segment emphasis as the donut. */
.soft-bar-stacked { overflow:visible!important; }
.soft-bar-segment { position:relative; translate:0 0; transition:translate .2s ease,filter .2s ease,opacity .2s ease; cursor:help; }
.soft-chart-column:has(.soft-bar-segment:hover) .soft-bar,
.soft-chart-column:has(.soft-bar-segment:focus-visible) .soft-bar { translate:0 0; filter:none; }
.soft-bar-stacked:has(.soft-bar-segment:hover) .soft-bar-segment:not(:hover),
.soft-bar-stacked:has(.soft-bar-segment:focus-visible) .soft-bar-segment:not(:focus-visible) { opacity:.35; }
.soft-bar-segment:hover,.soft-bar-segment:focus-visible { translate:0 -8px; z-index:2; filter:brightness(1.08) drop-shadow(0 5px 3px #23324b55); outline:2px solid #ffffffa0; outline-offset:1px; }
@media(prefers-reduced-motion:reduce) { .soft-bar-segment { transition:none; } }

.summary.overview-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; }
.overview-metrics .metric { min-width:0; padding:24px; border:1px solid #ffffffb3; border-radius:20px; background:var(--neo-bg); box-shadow:none; }
.overview-metrics .metric strong { display:block; font-size:clamp(21px,2.5vw,28px); overflow-wrap:anywhere; }
@media(max-width:700px) { .summary.overview-metrics { grid-template-columns:1fr; gap:16px; }.overview-metrics .metric { padding:20px; } }
.summary.overview-metrics { overflow:visible; }

.profile-settings { max-width:1200px; grid-template-columns:minmax(0,1.5fr) minmax(260px,1fr); }
#profile-form fieldset { min-width:0; border:0; border-top:1px solid var(--neo-line); padding:20px 0 0; margin:0; display:grid; gap:18px; }
#profile-form legend { padding:0 14px 0 0; font-size:16px; font-weight:600; }
.profile-field-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
#profile-form input { min-width:0; }
@media(max-width:800px) { .profile-settings { grid-template-columns:1fr; } }
@media(max-width:480px) { .profile-field-grid { grid-template-columns:1fr; } }

.support-workspace { display:grid; grid-template-columns:minmax(0,1fr) 280px; gap:32px; align-items:start; }
.support-conversation { padding:24px; min-width:0; }.support-conversation .conversation-bar { padding:0 0 18px; }
.support-messages { height:380px; overflow-y:auto; overscroll-behavior:contain; padding:18px 4px; display:flex; flex-direction:column; gap:16px; }
.support-messages .chat-message { max-width:90%; flex:none; margin:0; }.support-messages .chat-message.user { align-self:flex-end; }
.support-messages .chat-message>div { white-space:pre-wrap; overflow-wrap:anywhere; }.support-messages .secondary { margin-top:12px; }
.support-topics { display:flex; flex-wrap:wrap; gap:8px; margin:14px 0 24px; }.support-topics .secondary { font-size:12px; padding:10px 12px; }
.support-composer { display:flex; gap:12px; align-items:end; }.support-composer textarea { width:100%; resize:vertical; padding:12px; min-height:74px; max-height:180px; margin-top:8px; }.support-composer .primary { flex:none; }
.support-help { position:static; width:auto; padding:20px 0; background:none; border:0; box-shadow:none; }.support-help h2 { margin-top:0; }.support-help p { font-size:14px; }
@media(max-width:900px) { .support-workspace { grid-template-columns:1fr; }.support-help { border-top:1px solid var(--neo-line); }.support-messages { height:350px; } }
@media(max-width:550px) { .support-conversation { padding:18px; }.support-composer { flex-wrap:wrap; }.support-messages .chat-message { max-width:100%; } }

/* Alignment and consistent control geometry. */
.credit-detail-arrow svg { width:18px; height:18px; }
.chat-composer textarea { resize:none; min-height:96px; padding:16px 68px 16px 16px; }
.chat-composer button { width:40px; height:40px; right:14px; bottom:18px; color:#fff; }
.chat-composer button svg { display:block; width:21px; height:21px; }
.title-row { gap:20px; }.title-row>div { min-width:0; }
.products { align-items:stretch; }.product-actions { margin-top:auto; min-height:48px; }
.product-actions .secondary { min-height:44px; }
.profile-field-grid input { width:100%; }.profile-field-grid label { min-width:0; }
.form-grid>label { min-width:0; }
.analytics-soft-panel { display:flex; flex-direction:column; }.analytics-soft-panel .soft-status-legend { margin-top:auto; padding-top:16px; }
.support-help { min-width:0; }.support-conversation { width:100%; }
@media(max-width:700px) { .title-row { flex-wrap:wrap; }.title-row .primary { flex-shrink:0; }.products { gap:20px; } }

.support-desk { grid-template-columns:250px minmax(0,1fr); }
.support-ticket-list { position:static; width:auto; min-width:0; background:transparent; padding:0; border:0; box-shadow:none; }
.support-ticket { display:grid; width:100%; gap:8px; text-align:left; margin:0 0 12px; padding:16px; }
.support-ticket small { overflow-wrap:anywhere; color:var(--neo-muted); }.support-ticket span { font-size:12px; }
.support-ticket.selected { outline:none; border-color:var(--neo-control); box-shadow:none; background:var(--neo-bg); }
.support-ticket:focus-visible { outline:2px solid var(--neo-red); outline-offset:-4px; }
.support-ticket-list>h2 { margin:0 0 16px; padding:0; }
.support-ticket:last-child { margin-bottom:0; }
.support-desk .conversation-bar { justify-content:space-between; }
@media(max-width:800px) { .support-desk { grid-template-columns:1fr; }.support-ticket-list { display:flex; gap:12px; overflow-x:auto; }.support-ticket-list h2 { display:none; }.support-ticket { flex:0 0 220px; } }
/* Keep desktop plan navigation bounded so its list can actually scroll. */
@media(min-width:701px) {
 .advisor-workspace .plan-history { position:sticky; top:76px; align-self:start; height:calc(100dvh - 76px); min-height:0; max-height:calc(100dvh - 76px); display:flex; flex-direction:column; overflow:hidden; }
 .plan-history>h2,.plan-history>p { flex-shrink:0; }
 .plan-history .plan-history-list { flex:1 1 0; min-height:0; max-height:none; overflow-y:auto; overflow-x:hidden; overscroll-behavior-y:contain; }
}
/* Rounded stacked columns, with each segment still free to lift on hover. */
.soft-bar-stacked>.soft-bar-segment:last-child { border-radius:14px 14px 0 0; }
.soft-bar-stacked>.soft-bar-segment:first-child { border-radius:0; }
.soft-bar-stacked>.soft-bar-segment:only-child { border-radius:14px 14px 0 0; }
/* Desktop consultant is a viewport workspace, not a growing document. */
@media(min-width:1251px) {
 body:has(.advisor-workspace) { overflow:hidden; }
 body.sidebar-collapsed .shell:has(.advisor-workspace) { height:calc(100dvh - 76px); min-height:0; overflow:hidden; }
 body.sidebar-collapsed .shell main:has(.advisor-workspace) { height:100%; padding-bottom:0; }
 .advisor-workspace { height:100%; min-height:0; }
 .advisor-workspace .plan-history { position:relative; top:0; height:100%; min-height:0; max-height:100%; }
 .advisor-workspace .advisor-main { height:100%; min-height:0; display:flex; flex-direction:column; padding-bottom:24px; }
 .advisor-workspace .advisor-heading { flex:none; }
 .advisor-workspace .advisor-layout { flex:1 1 0; min-height:0; align-items:stretch; }
 .advisor-layout>.conversation { display:flex; flex-direction:column; min-height:0; height:100%; }
 .advisor-layout .conversation-bar,.advisor-layout .starter-prompts,.advisor-layout .chat-composer,.advisor-layout .chat-footnote,.advisor-layout .advisor-error { flex-shrink:0; }
 .advisor-layout .messages { flex:1 1 0; min-height:0; max-height:none; overflow-y:auto; overscroll-behavior:contain; }
 .advisor-layout>.financing-plan { height:100%; min-height:0; max-height:100%; overflow-y:auto; overscroll-behavior:contain; scrollbar-gutter:stable; }
}
/* At narrower widths the page scrolls, while the plan panel stays bounded. */
@media(min-width:701px) and (max-width:1250px) {
 .advisor-layout>.financing-plan { max-height:calc(100dvh - 120px); overflow-y:auto; overscroll-behavior:contain; }
}

/* Calm, transparent suggestions. */
.starter-prompts .secondary { background:transparent; border:1px solid var(--neo-line); box-shadow:none; font-weight:500; }
.starter-prompts .secondary:hover { background:#d5dfeb60; box-shadow:none; }
/* Readable plan titles and a clear, single selected state. */
@media(min-width:1251px) { .advisor-workspace { grid-template-columns:250px minmax(0,1fr); } }
.plan-history-row .plan-history-item { padding:14px 38px 14px 12px; border-radius:12px; }
.plan-history-item strong { -webkit-line-clamp:3; font-size:14px; line-height:1.5; overflow-wrap:anywhere; }
.plan-history-item small { line-height:1.5; font-size:12px; }
.plan-history-item.selected { background:#d3deec; border-color:#a5b6cc; box-shadow:none; }
.plan-history-row .plan-more { top:14px; right:5px; }
.plan-group-items { gap:6px; }.plan-group { margin-bottom:20px; }
/* Both ends of each stacked column use the same rounded profile. */
.soft-bar-stacked>.soft-bar-segment:first-child { border-radius:0; }
.soft-bar-stacked>.soft-bar-segment:only-child { border-radius:14px 14px 0 0; }
.credit-summary-row { min-height:110px; }.credit-summary-row>div { min-width:0; }
/* Alternative comparison: vertical columns on the same zero-based scale. */
.comparison-view-switch { display:flex; gap:8px; }
.comparison-view-switch [aria-pressed=true] { background:#f1dfe5; color:#991d33; border-color:#c994a0; }
.comparison-chart[data-view=columns] { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:end; gap:24px; }
.comparison-chart[data-view=columns] .comparison-chart-row { display:flex; flex-direction:column; min-width:0; }
.comparison-chart[data-view=columns] .comparison-bar-heading { min-height:70px; flex-direction:column; justify-content:start; gap:8px; }
.comparison-chart[data-view=columns] .comparison-track { height:200px; width:100%; background:transparent; box-shadow:none; border-radius:0; display:flex; align-items:end; justify-content:center; overflow:visible; border-bottom:1px solid var(--neo-line); }
.comparison-chart[data-view=columns] .comparison-bar { width:60%!important; max-width:100px; height:var(--comparison-height,0%); border-radius:14px 14px 0 0; transition:height .6s ease; animation:none; }
.comparison-chart[data-view=columns] .comparison-chart-row small { min-height:40px; }
/* Support fits the desktop window; messages and ticket list scroll independently. */
@media(min-width:901px) {
 body:has(.support-desk) { overflow:hidden; }
 body.sidebar-collapsed .shell:has(.support-desk) { height:calc(100dvh - 76px); min-height:0; overflow:hidden; }
 .shell main:has(.support-desk) { height:100%; display:flex; flex-direction:column; min-height:0; }
 main:has(.support-desk)>.title-row { flex:none; margin-bottom:24px; }
 .support-desk { flex:1 1 0; min-height:0; align-items:stretch; }
 .support-ticket-list { max-height:100%; min-height:0; overflow-y:auto; overscroll-behavior:contain; padding:16px; scrollbar-gutter:stable; }
 .support-desk .support-conversation { display:flex; flex-direction:column; height:100%; min-height:0; }
 .support-desk .support-messages { flex:1 1 0; min-height:0; height:auto; }
 .support-desk .conversation-bar,.support-desk .support-topics,.support-desk #support-form { flex:none; }
 .support-desk .support-composer textarea { resize:none; }
}
@media(max-width:600px) { .comparison-chart[data-view=columns] { gap:12px; }.comparison-chart[data-view=columns] .comparison-bar-heading { font-size:12px; min-height:90px; } }
.soft-bar.soft-bar-stacked { border-radius:14px 14px 0 0; }

/* Hide the scrollbar chrome, preserving wheel, touch and keyboard scrolling. */
.chat-composer textarea { scrollbar-width:none; overflow-y:auto; }
.chat-composer textarea::-webkit-scrollbar { display:none; }
.plan-history-heading { display:flex; justify-content:space-between; align-items:center; gap:8px; flex:none; margin-bottom:10px; }
.plan-history-heading h2 { margin:0 0 0 8px; }
.plan-notifications-toggle { position:relative; background:transparent; color:var(--neo-ink); border:0; border-radius:10px; width:36px; height:36px; padding:7px; cursor:pointer; }
.plan-notifications-toggle:hover { background:#b7c7dc55; }.plan-notifications-toggle svg { width:21px; height:21px; }
.plan-notification-count:not(:empty) { position:absolute; right:0; top:0; font-size:10px; background:#bb203a; color:#fff; border-radius:10px; min-width:16px; padding:2px; }
.plan-search-label { flex:none; margin:0 2px 14px; }.plan-search-label input { margin:0; width:100%; min-height:40px; font-size:13px; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.rename-plan-dialog,.plan-notifications-dialog { width:min(480px,calc(100vw - 32px)); }
.plan-notifications-list { display:grid; gap:10px; max-height:55dvh; overflow:auto; }
.plan-notification-item { display:grid; gap:6px; padding:15px; text-align:left; border:1px solid var(--neo-line); border-radius:12px; background:var(--neo-bg); color:var(--neo-ink); }
.plan-notification-item span,.plan-notification-item small { color:var(--neo-muted); }.rename-error { color:var(--neo-red); }

.support-composer .support-send { width:48px; height:48px; padding:12px; display:inline-flex; align-items:center; justify-content:center; border-radius:12px; }
.support-send svg { display:block; width:24px; height:24px; }

/* Consistent circular send controls in both conversations. */
.chat-composer button.primary,
.support-composer button.support-send {
  width:44px;
  height:44px;
  min-width:44px;
  min-height:44px;
  flex:0 0 44px;
  padding:0;
  border-radius:50%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:0;
}
.chat-composer button.primary svg,
.support-composer button.support-send svg {
  display:block;
  width:22px;
  height:22px;
  flex:none;
}

.plan-placeholder>.plan-placeholder-icon { display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px; color:var(--neo-muted); }
.plan-placeholder-icon svg { display:block; width:32px; height:32px; }

.advisor-key-point {
  background:rgb(199 25 43 / 16%);
  color:inherit;
  border-radius:6px;
  padding:2px 5px;
  text-decoration:none;
  -webkit-box-decoration-break:clone;
  box-decoration-break:clone;
}

.advisor-next-step { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:8px 4px; color:var(--neo-muted); font-size:12px; line-height:1.5; }
.plan-change { display:flex; align-items:center; gap:8px; border-top:1px solid var(--neo-line); padding:8px 4px; font-size:12px; }
.plan-change>span { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.plan-change button { flex:none; }
.chat-message.user .edit-message { display:block; margin:4px 0 -4px auto; padding:4px 0; font-size:11px; opacity:0; }
.chat-message.user:hover .edit-message,.chat-message.user:focus-within .edit-message { opacity:1; }
.plan-unread-dot { display:inline-block; width:6px; height:6px; border-radius:50%; background:var(--neo-red); margin-left:6px; vertical-align:middle; }
@media(hover:none) { .chat-message.user .edit-message { opacity:1; } }

.overview-metrics button.metric { cursor:pointer; text-align:left; color:var(--neo-ink); font:inherit; transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease; }
.overview-metrics button.metric:hover { transform:translateY(-4px); border-color:var(--neo-control); box-shadow:none; }
.overview-metrics button.metric:active { transform:translateY(-1px); }
.overview-metrics button.metric:focus-visible { outline:2px solid var(--neo-red); outline-offset:4px; }
.overview-metrics button.metric small { display:block; }
.business-tools { margin-top:20px; border-top:1px solid var(--neo-line); padding-top:16px; }
.business-tools summary { cursor:pointer; font-size:13px; font-weight:600; }
.business-tool-actions { display:grid; gap:10px; margin-top:16px; }
.business-dialog { width:min(820px,calc(100vw - 32px)); max-height:calc(100dvh - 40px); overflow:auto; padding:28px; }
.business-dialog .dialog-heading { gap:16px; }
.business-dialog .dialog-heading h2 { margin:0; }
.business-dialog textarea { width:100%; padding:12px; margin-top:8px; resize:vertical; min-height:80px; }
.business-dialog section:empty { display:none; }
.business-dialog section { margin-top:24px; }
.business-dialog [role=alert] { color:var(--neo-red); }
.tool-table-scroll { overflow-x:auto; }
.tool-table { width:100%; border-collapse:collapse; font-size:13px; margin:16px 0; }
.tool-table th,.tool-table td { padding:12px; border-bottom:1px solid var(--neo-line); text-align:left; line-height:1.5; }
.tool-table th { font-weight:600; }
.idea-risk { padding:12px 0; border-bottom:1px solid var(--neo-line); }
.idea-risk h4 { margin:0 0 6px; }
.idea-risk p { margin:6px 0; }
.application-documents { padding-top:18px; margin-top:18px; border-top:1px solid var(--neo-line); }
.document-request { display:grid; gap:8px; padding:14px 0; border-bottom:1px solid var(--neo-line); }
.document-request small { color:var(--neo-muted); }
.document-request button { justify-self:start; max-width:100%; overflow-wrap:anywhere; }
.document-request p { margin:0; font-size:13px; }
.application-documents>button { margin-top:14px; }
@media(max-width:550px) { .business-dialog { padding:20px; }.tool-table th,.tool-table td { padding:9px; } }
@media(prefers-reduced-motion:reduce) { .overview-metrics button.metric:hover,.overview-metrics button.metric:active { transform:none; } }

.ai-consent-dialog { width:min(850px,calc(100vw - 32px)); max-height:calc(100dvh - 40px); padding:32px; overflow:auto; }
.ai-consent-layout { display:grid; grid-template-columns:210px minmax(0,1fr); gap:28px; align-items:center; }
.ai-consent-art img { display:block; width:100%; height:auto; max-height:380px; object-fit:contain; }
.ai-consent-eyebrow { color:var(--neo-red); font-size:10px; letter-spacing:1.2px; font-weight:600; margin:0 0 14px; }
.ai-consent-copy h2 { margin:0 0 18px; font-size:27px; line-height:1.25; letter-spacing:-.6px; }
.ai-consent-copy>p { font-size:13px; line-height:1.65; }
.ai-consent-copy .muted { font-size:11px; }
.ai-consent-check { display:flex; align-items:flex-start; gap:10px; font-size:12px; line-height:1.6; margin-top:18px; }
.ai-consent-check input { flex:none; width:17px; height:17px; margin:2px 0 0; accent-color:var(--neo-red); }
.ai-consent-copy .actions { gap:10px; }
.ai-consent-copy .ai-consent-once { margin-bottom:0; }
.ai-web-mode { align-self:flex-start; font-size:11px; padding:4px; color:var(--neo-muted); }
.ai-sources { margin-top:12px; border-top:1px solid var(--neo-line); padding-top:8px; font-size:12px; }
.ai-sources summary { cursor:pointer; color:var(--neo-muted); }
.ai-sources ol { padding-left:20px; margin:10px 0 0; }
.ai-sources li { padding:4px 0; }
.ai-sources small { display:block; font-size:10px; line-height:1.5; color:var(--neo-muted); }
.ai-sources a { color:var(--neo-ink); text-decoration:underline; text-underline-offset:3px; overflow-wrap:anywhere; }
.ai-source-status { color:var(--neo-muted); font-size:11px; line-height:1.5; margin-top:10px; }
@media(max-width:600px) { .ai-consent-dialog { padding:22px; }.ai-consent-layout { grid-template-columns:1fr; gap:14px; }.ai-consent-art img { height:110px; width:auto; margin:auto; }.ai-consent-copy h2 { font-size:23px; }.ai-consent-copy .actions { flex-direction:column; align-items:stretch; justify-content:center; }.ai-consent-copy .primary { justify-content:center; } }

/* Employee focus and cash-flow inspector. */
.bank-focus{display:flex;align-items:center;justify-content:space-between;gap:28px;padding:28px 30px;margin:28px 0 32px;border-left:3px solid var(--neo-red);border-radius:0 18px 18px 0;background:var(--neo-bg);box-shadow:none;color:var(--neo-ink)}
.bank-eyebrow{font-size:10px;letter-spacing:.16em;font-weight:700;color:var(--neo-muted)}
.bank-focus h2{margin:10px 0;font-size:24px;letter-spacing:-.6px}.bank-focus p{margin:0 0 10px;font-size:15px;overflow-wrap:anywhere}.bank-focus small{color:var(--neo-muted);line-height:1.6}.bank-focus .primary{flex-shrink:0;min-height:46px}.bank-focus-done{font-size:44px;color:var(--neo-muted);padding:0 14px}
.bank-cashflow{padding:0 0 24px;margin:0 0 24px;border-bottom:1px solid var(--neo-line);color:var(--neo-ink)}.bank-cashflow>strong{display:block;font-size:28px;font-variant-numeric:tabular-nums;letter-spacing:-1px;margin:10px 0}.bank-cashflow p,.bank-cashflow small{color:var(--neo-muted);font-size:12px;line-height:1.6}.bank-cashflow p{margin:0 0 16px}.bank-coverage{display:flex;justify-content:space-between;gap:12px;margin-bottom:10px;font-size:13px}.bank-coverage b{font-size:18px;font-variant-numeric:tabular-nums}
.bank-focus .primary{transition:transform .18s ease,box-shadow .18s ease}.bank-focus .primary:hover{transform:translateY(-2px)}.bank-focus .primary:focus-visible{outline:2px solid var(--neo-red);outline-offset:5px}
@media(max-width:700px){.bank-focus{align-items:flex-start;flex-direction:column;padding:22px 18px;gap:20px}.bank-focus .primary{width:100%}.bank-focus h2{font-size:22px}.bank-cashflow>strong{font-size:25px}}
@media(prefers-reduced-motion:reduce){.bank-focus .primary{transition:none}.bank-focus .primary:hover{transform:none}}

.bank-list-options{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:0 0 18px;color:var(--neo-muted);font-size:12px}.bank-list-options label{display:flex;align-items:center;gap:12px;margin:0}.bank-list-options select{width:auto;min-width:200px;margin:0;font-size:13px;min-height:42px}.queue-table .bank-received{margin-top:8px;color:var(--neo-muted);font-size:11px;font-variant-numeric:tabular-nums}
@media(max-width:700px){.bank-list-options{align-items:flex-start;flex-direction:column}.bank-list-options label{justify-content:space-between;width:100%}.bank-list-options select{min-width:0;max-width:75%}}

/* Flat surfaces in both themes. */
:root { --neo-bg:#f6f7f9; --neo-ink:#202b3b; --neo-muted:#596579; --neo-line:#dfe3e9; --neo-red:#ef3124; --surface:#fff; }
[data-theme=dark] { --neo-bg:#161b23; --surface:#202731; }
.brand-bar,.sidebar-collapsed .cabinet-sidebar { background:var(--surface); }
.brand-bar { border-bottom:0; }
.sidebar-collapsed .shell { border-color:var(--neo-line); }
:is(.application,.product,.conversation,.loan-option,.queue-table,.financing-plan,dialog,.error-dialog,.overview-metrics .metric,.analytics-soft-panel,.plan-history,.profile-preview,.credit-summary-row,.theme-menu) { background:var(--surface); border:1px solid var(--neo-line); }
[data-theme=dark] :is(.application,.product,.conversation,.loan-option,.queue-table,.financing-plan,dialog,.error-dialog,.overview-metrics .metric,.analytics-soft-panel,.plan-history,.profile-preview,.credit-summary-row,.theme-menu) { background:var(--surface); }
:is(input,select,textarea) { border-color:var(--neo-line); }

.brand-bar .brand .brand-symbol{width:40px;height:40px;object-fit:contain;flex:none}
