/* Financial position workspace. Deliberately scoped: navigation and other CRM screens are unchanged. */
.finance-detail-page{--fd-ink:#172d3c;--fd-muted:#657786;--fd-line:#dfe7ec;--fd-teal:#137e76;max-width:1440px;margin:0 auto;color:var(--fd-ink);font-size:14px;line-height:1.5}
.finance-detail-page *{box-sizing:border-box}
.finance-detail-page .finance-detail-breadcrumbs{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 22px;color:var(--fd-muted);font-size:12px}
.finance-detail-page .finance-detail-back{color:var(--fd-muted);text-decoration:none;font-weight:500}
.finance-detail-page .finance-detail-back:hover{color:var(--fd-teal)}
.finance-detail-page .finance-detail-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:24px}
.finance-detail-page .finance-detail-header>div,.finance-detail-page .finance-detail-payment-identity>div{min-width:0}
.finance-detail-page .finance-detail-subtitle,.finance-detail-page .finance-allocation-amount{overflow-wrap:anywhere}
.finance-detail-page .finance-detail-header h1{margin:4px 0 6px;font-size:clamp(25px,2.1vw,34px);font-weight:700;letter-spacing:-.035em;line-height:1.2;overflow-wrap:anywhere}
.finance-detail-page .finance-detail-kicker{margin:0;font-size:11px;line-height:1.5;letter-spacing:.1em;text-transform:uppercase;font-weight:700;color:var(--fd-muted)}
.finance-detail-page .finance-detail-subtitle{margin:0;color:var(--fd-muted);font-size:14px}
.finance-detail-page .finance-detail-summary{position:relative;border:1px solid #cce0df;border-radius:18px;background:linear-gradient(115deg,#f4fbfa 0%,#fff 76%);padding:24px 28px;margin-bottom:26px;box-shadow:0 5px 18px #183d4a05}
.finance-detail-page .finance-detail-summary-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:24px}
.finance-detail-page .finance-detail-summary-heading .badge-row{margin:0;gap:8px}
.finance-detail-page .finance-summary-detail{display:grid;grid-template-columns:minmax(0,1.3fr) repeat(2,minmax(0,1fr));gap:24px;margin:0}
.finance-detail-page .finance-summary-detail .finance-metric{display:grid;grid-template-columns:minmax(0,1fr);justify-content:start;align-items:start;gap:6px;min-width:0;padding:0;margin:0;background:transparent;border:0;border-radius:0;box-shadow:none}
.finance-detail-page .finance-summary-detail .finance-metric+.finance-metric{border-left:1px solid #d8e7e5;padding-left:28px}
.finance-detail-page .finance-summary-detail .metric-label{max-width:none;font-size:12px;color:var(--fd-muted);margin:0;letter-spacing:0;text-transform:none;font-weight:500}
.finance-detail-page .finance-summary-detail .finance-metric-value{font-size:clamp(23px,2.1vw,32px);line-height:1.2;font-weight:650;letter-spacing:-.035em;text-align:left;white-space:nowrap;overflow-wrap:normal;word-break:normal;color:var(--fd-ink)}
.finance-detail-page .finance-summary-detail .finance-metric:first-child .finance-metric-value{font-size:clamp(29px,2.8vw,40px)}
.finance-detail-page .finance-summary-detail .finance-metric-primary .finance-metric-value{color:var(--fd-teal)}
.finance-detail-page .finance-detail-progress-row{display:flex;align-items:center;gap:14px;margin-top:25px}
.finance-detail-page .finance-detail-progress{height:6px;flex:1;overflow:hidden;border-radius:8px;background:#e3edec}
.finance-detail-page .finance-detail-progress>span{display:block;height:100%;border-radius:8px;background:#198a80}
.finance-detail-page .finance-detail-progress-label{font-size:12px;font-weight:650;color:var(--fd-teal);min-width:34px;text-align:right}
.finance-detail-page .finance-detail-summary-footer{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-top:16px;color:var(--fd-muted);font-size:12px}
.finance-detail-page .finance-detail-primary-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;align-items:center}
.finance-detail-page .btn{min-height:38px;padding:8px 13px;border-radius:9px;font-size:12px;line-height:1.45;font-weight:600;white-space:normal;text-align:center;box-shadow:none}
.finance-detail-page .btn-outline-primary{color:#256761;border-color:#bed8d4;background:#fff}
.finance-detail-page .btn-outline-secondary{color:#516778;border-color:#dbe4ea;background:#fff}
.finance-detail-page .btn:hover{transform:none}
.finance-detail-page .finance-detail-more{position:relative}
.finance-detail-page .finance-detail-more>summary{cursor:pointer;min-height:38px;padding:9px 12px;border-radius:9px;color:#536c79;list-style:none;font-weight:600}
.finance-detail-page .finance-detail-more>summary:after{content:'⌄';margin-left:8px}
.finance-detail-page .finance-detail-more-menu{position:absolute;right:0;top:calc(100% + 6px);z-index:20;display:grid;gap:6px;min-width:220px;padding:10px;border:1px solid var(--fd-line);border-radius:12px;background:#fff;box-shadow:0 12px 34px #1e3b4e20}
.finance-detail-page .finance-detail-grid{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:24px;align-items:start}
.finance-detail-page .finance-detail-main,.finance-detail-page .finance-detail-side{display:grid;gap:20px;min-width:0}
.finance-detail-page .finance-detail-card,.finance-detail-page .finance-detail-grid .panel{margin:0;padding:22px 24px;border:1px solid var(--fd-line);border-radius:15px;background:#fff;box-shadow:0 2px 6px #1c3b4c03;min-width:0}
.finance-detail-page .finance-detail-grid .section-space{margin-top:0}
.finance-detail-page .finance-detail-grid .panel-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 18px}
.finance-detail-page .finance-detail-grid h2,.finance-detail-page .finance-detail-grid .section-title{font-size:16px;line-height:1.3;font-weight:650;letter-spacing:-.015em;margin:0 0 16px;color:var(--fd-ink)}
.finance-detail-page .finance-detail-grid .panel-heading h2{margin:0}
.finance-detail-page .finance-detail-count{display:inline-flex;align-items:center;justify-content:center;min-width:25px;height:25px;padding:0 7px;background:#eff4f7;border-radius:7px;color:#5f7485;font-size:12px;font-weight:600;flex-shrink:0}
.finance-detail-page .record-list{gap:0}
.finance-detail-page .finance-allocation{border:0;border-radius:0;padding:17px 0;background:transparent;box-shadow:none}
.finance-detail-page .finance-allocation:first-child{padding-top:2px}
.finance-detail-page .finance-allocation+.finance-allocation{border-top:1px solid #e9eef2}
.finance-detail-page .finance-allocation .record-top{align-items:flex-start;gap:12px}
.finance-detail-page .finance-allocation .record-title{font-size:14px;font-weight:650;margin:0 0 4px}
.finance-detail-page .finance-detail-payment-identity{display:flex;align-items:center;gap:12px;min-width:0}
.finance-detail-page .finance-detail-payment-icon{display:flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:11px;background:#eaf6f3;color:#188579;flex-shrink:0}
.finance-detail-page .finance-allocation .record-subtitle{font-size:12px;color:var(--fd-muted);margin:5px 0;overflow-wrap:anywhere}
.finance-detail-page .finance-allocation-amount{font-size:21px;font-weight:650;letter-spacing:-.025em;color:var(--fd-teal);white-space:normal}
.finance-detail-page .finance-cancel-payment-trigger{padding:6px 0;min-height:30px;margin-top:4px;color:#778590;font-size:11px;text-decoration:none;border:0;background:none;font-weight:500}
.finance-detail-page .finance-cancel-payment-trigger:hover{color:#a34e4e;text-decoration:underline}
.finance-detail-page .finance-detail-context .info-list{display:block;margin:0}
.finance-detail-page .finance-detail-context .info-list dt{display:block;margin:16px 0 4px;color:var(--fd-muted);font-size:11px;font-weight:500;text-transform:none;letter-spacing:0}
.finance-detail-page .finance-detail-context .info-list dt:first-child{margin-top:0}
.finance-detail-page .finance-detail-context .info-list dd{display:block;margin:0;color:var(--fd-ink);font-size:13px;font-weight:500;overflow-wrap:anywhere}
.finance-detail-page .finance-detail-context .info-list dd a{color:#287a74;text-decoration:none;line-height:1.5}
.finance-detail-page .finance-detail-context .info-list dd a:hover{text-decoration:underline}
.finance-detail-page .finance-detail-context .btn{display:flex;margin-top:20px;width:100%;align-items:center;justify-content:center}
.finance-detail-page .finance-detail-basis p{margin:0;font-size:13px;color:#5b6f7e;overflow-wrap:anywhere}
.finance-detail-page .finance-detail-description-action{color:var(--fd-teal);padding:8px 0;margin-top:8px;font-size:12px;text-decoration:none;background:none;border:0}
.finance-detail-page .finance-detail-description-action:hover{text-decoration:underline}
.finance-detail-page .finance-detail-history,.finance-detail-page .finance-detail-followup{padding:0}
.finance-detail-page .finance-detail-history>summary,.finance-detail-page .finance-detail-followup>summary{display:flex;align-items:center;gap:10px;padding:20px 24px;cursor:pointer;font-size:14px;font-weight:650;list-style:none}
.finance-detail-page .finance-detail-history>summary:after,.finance-detail-page .finance-detail-followup>summary:after{content:'⌄';margin-left:auto;color:#7e939f;font-weight:400}
.finance-detail-page .finance-detail-history[open]>summary:after,.finance-detail-page .finance-detail-followup[open]>summary:after{transform:rotate(180deg)}
.finance-detail-page .finance-detail-history-body{padding:0 24px 20px}
.finance-detail-page .finance-detail-history-body .timeline{margin:0;font-size:12px}
.finance-detail-page .finance-detail-history-body .timeline li{padding-bottom:16px}
.finance-detail-page .finance-detail-followup .panel,.finance-detail-page .finance-cancelled-payments .panel{padding:0 24px 22px;border:0;box-shadow:none;background:transparent}
.finance-detail-page .finance-detail-followup .panel-heading{display:none}
.finance-detail-page .finance-detail-followup .record-subtitle,.finance-detail-page .finance-detail-followup .form-text{font-size:12px}
.finance-detail-page .financial-source-documents .panel>p,.finance-detail-page .financial-source-documents .panel-heading p{font-size:12px;color:var(--fd-muted);line-height:1.5}
.finance-detail-page .expense-closing-document-list{display:grid;gap:12px}
.finance-detail-page .expense-closing-document{display:grid;gap:12px;padding:16px;border:1px solid #e4eaef;border-radius:11px;background:#f9fbfc;min-width:0}
.finance-detail-page .expense-closing-document strong{font-size:14px;overflow-wrap:anywhere}
.finance-detail-page .expense-closing-document .record-subtitle{font-size:11px;margin:5px 0 0;overflow-wrap:anywhere}
.finance-detail-page .expense-closing-document-actions{display:flex;gap:7px;flex-wrap:wrap}
.finance-detail-page .expense-closing-document-actions .btn:last-child:not(:first-child){color:#72838e}
.finance-detail-page .finance-source-attach{margin-top:16px;border-top:1px solid #e9eef2;padding-top:14px}
.finance-detail-page .finance-source-attach>summary{cursor:pointer;font-weight:600;font-size:12px;color:#287a74;list-style:none}
.finance-detail-page .finance-source-attach>summary:before{content:'+';font-size:17px;line-height:1;vertical-align:-1px;margin-right:8px}
.finance-detail-page .finance-source-attach[open]>summary:before{content:'−'}
.finance-detail-page .expense-document-link-editor{margin-top:14px;display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
.finance-detail-page .expense-document-link-editor select{width:100%;min-width:0;font-size:12px;white-space:nowrap}
.finance-detail-page .finance-detail-timezone{margin:18px 2px 0;font-size:11px;color:#83939f}
.finance-detail-page .long-text,.finance-detail-page .record-body{white-space:pre-wrap;overflow-wrap:anywhere}
.finance-detail-page .finance-detail-side .inline-note{font-size:12px;padding:12px;margin-top:12px}
@media(max-width:1180px){.finance-detail-page .finance-detail-grid{grid-template-columns:minmax(0,1fr) 290px;gap:18px}.finance-detail-page .finance-detail-summary{padding:22px}.finance-detail-page .finance-summary-detail{gap:18px}.finance-detail-page .finance-summary-detail .finance-metric+.finance-metric{padding-left:18px}}
@media(max-width:900px){.finance-detail-page .finance-detail-grid{grid-template-columns:minmax(0,1fr)}.finance-detail-page .finance-detail-side{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}.finance-detail-page .finance-detail-summary-footer{align-items:flex-start}.finance-detail-page .finance-detail-summary-footer>span{padding-top:9px}}
@media(max-width:560px){.finance-detail-page .finance-detail-breadcrumbs{gap:8px;margin-bottom:18px;font-size:11px}.finance-detail-page .finance-detail-header{margin-bottom:18px}.finance-detail-page .finance-detail-subtitle{font-size:12px}.finance-detail-page .finance-detail-summary{padding:20px 18px;border-radius:14px;margin-bottom:18px}.finance-detail-page .finance-detail-summary-heading{align-items:flex-start;gap:10px;margin-bottom:20px}.finance-detail-page .finance-detail-summary-heading .badge-row{justify-content:flex-end}.finance-detail-page .finance-summary-detail{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 14px}.finance-detail-page .finance-summary-detail .finance-metric:first-child{grid-column:1/-1}.finance-detail-page .finance-summary-detail .finance-metric+.finance-metric{border:0;padding-left:0}.finance-detail-page .finance-summary-detail .finance-metric-value{font-size:23px}.finance-detail-page .finance-summary-detail .finance-metric:first-child .finance-metric-value{font-size:34px}.finance-detail-page .finance-detail-progress-row{margin-top:19px}.finance-detail-page .finance-detail-summary-footer{flex-direction:column;gap:12px;align-items:stretch}.finance-detail-page .finance-detail-summary-footer>span{padding-top:0}.finance-detail-page .finance-detail-primary-actions{justify-content:flex-start;gap:8px}.finance-detail-page .finance-detail-more-menu{left:0;right:auto;max-width:calc(100vw - 60px)}.finance-detail-page .finance-detail-main,.finance-detail-page .finance-detail-side{gap:16px;grid-template-columns:minmax(0,1fr)}.finance-detail-page .finance-detail-card,.finance-detail-page .finance-detail-grid .panel{padding:20px 18px;border-radius:13px}.finance-detail-page .finance-detail-history,.finance-detail-page .finance-detail-followup{padding:0}.finance-detail-page .finance-detail-history>summary,.finance-detail-page .finance-detail-followup>summary{padding:18px}.finance-detail-page .finance-detail-history-body{padding:0 18px 18px}.finance-detail-page .finance-detail-followup .panel,.finance-detail-page .finance-cancelled-payments .panel{padding:0 18px 18px}.finance-detail-page .finance-allocation .record-top{flex-wrap:wrap}.finance-detail-page .finance-allocation-heading-side{margin-left:auto}.finance-detail-page .finance-allocation-amount{font-size:20px}.finance-detail-page .expense-closing-document{padding:13px}.finance-detail-page .expense-closing-document-actions .btn{flex:1 1 120px;min-height:40px}.finance-detail-page .expense-closing-document-actions .btn:last-child{flex:0 1 auto}.finance-detail-page .form-control,.finance-detail-page .form-select{max-width:100%}.finance-detail-page .card-action-row{flex-wrap:wrap}}
@media(max-width:560px){.finance-detail-page .btn,.finance-detail-page .expense-closing-document-actions .btn,.finance-detail-page .finance-detail-more>summary{min-height:44px;font-size:13px}.finance-detail-page .finance-detail-context .info-list dt,.finance-detail-page .finance-source-attach>summary{font-size:12px}.finance-detail-page .finance-source-attach>summary{min-height:44px;padding:10px 0}.finance-detail-page .finance-allocation .record-title{overflow-wrap:anywhere}}
@media(max-width:767px){.finance-detail-page .finance-summary-detail{grid-template-columns:minmax(0,1fr);gap:18px}.finance-detail-page .finance-summary-detail .finance-metric{gap:5px}.finance-detail-page .finance-summary-detail .finance-metric+.finance-metric{padding:16px 0 0;border-left:0;border-top:1px solid #d8e7e5}.finance-detail-page .finance-summary-detail .finance-metric-value{font-size:24px}.finance-detail-page .finance-summary-detail .finance-metric:first-child .finance-metric-value{font-size:32px}.finance-detail-page .finance-summary-detail .metric-label{font-size:12px;line-height:1.45}}
@media(prefers-reduced-motion:reduce){.finance-detail-page *{transition:none!important;animation:none!important}}
