.fin-workspace { min-width: 0; }
/* The main content is its own stacking context (normally below the sidebar).
   Promote that context only while a financing editor or preview is open. */
.dashboard-main:has(#financing-workspace > .confirm-overlay) { z-index:1500; }
.fin-tabs, .fin-toolbar, .fin-inline, .fin-template-picker { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin-bottom:18px; }
.fin-toolbar { justify-content:space-between; }
.fin-toolbar h2 { margin:0; }
.fin-toolbar > div:last-child { display:flex; flex-wrap:wrap; gap:8px; }
.fin-tabs .active { background:#dceacb; border-color:#85ae60; }
.fin-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:12px 0; }
.fin-metrics > div { display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:58px; padding:12px 14px; border-radius:12px; background:#e4edf9; }
.fin-metrics > div:nth-child(2) { background:#fff0d9; }
.fin-metrics > div:nth-child(3) { background:#def0f1; }
.fin-metrics > div:nth-child(4) { background:#e3edcf; }
.fin-metrics strong { font-size:1.5rem; line-height:1; flex-shrink:0; }
.fin-metrics span { text-align:right; font-size:.85rem; line-height:1.2; }
.fin-cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr)); gap:18px; }
.fin-card { display:grid; align-content:start; gap:14px; padding:20px; border:1px solid #cbd9e6; border-left:5px solid #84a5cc; background:white; border-radius:14px; min-width:0; overflow-wrap:anywhere; }
.fin-card.missing { border-left-color:#d59b38; }
.fin-card.ready, .fin-card.done { border-left-color:#76a451; }
.fin-card-title { border:0; background:none; color:inherit; text-align:left; padding:0; font:inherit; font-size:1.1rem; font-weight:700; cursor:pointer; }
.fin-card dl { margin:0; }
.fin-card dl > div { display:grid; grid-template-columns:105px 1fr; gap:8px; margin:6px 0; }
.fin-card dd, .fin-facts dd { margin:0; }
.fin-card dt, .fin-facts dt { opacity:.75; }
.fin-status { display:inline-block; width:fit-content; border-radius:20px; padding:6px 12px; background:#e7eff9; font-size:.85rem; }
.fin-status.missing { background:#fff0d9; }
.fin-status.ready,.fin-status.done { background:#e3edcf; }
.fin-overdue { color:#a02825; font-weight:700; }
.fin-field { display:grid; gap:7px; min-width:0; }
.fin-money-input { position:relative; display:block; }
.fin-workspace .fin-money-input input[name="investment"] { padding-right:40px; font-variant-numeric:tabular-nums; }
.fin-money-symbol { position:absolute; right:14px; top:50%; transform:translateY(-50%); color:#526b82; pointer-events:none; }
.fin-workspace input:not([type=checkbox]):not([type=hidden]), .fin-workspace select, .fin-workspace textarea { box-sizing:border-box; max-width:100%; width:100%; padding:10px; border:1px solid #bbcbd9; border-radius:8px; background:white; color:inherit; font:inherit; }
.fin-workspace textarea { resize:vertical; }
.fin-filters, .fin-form-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr)); align-items:end; gap:16px; margin:20px 0; }
.fin-editor { width:min(1100px,calc(100vw - 32px)); max-width:1100px; max-height:calc(100dvh - 32px); overflow-y:auto; grid-template-columns:minmax(0,1fr); }
.fin-editor > * { min-width:0; }
.fin-bank-editor { max-width:960px; }
.fin-bank-intro { margin:10px 0 0; max-width:720px; color:#526b82; line-height:1.5; font-size:.95rem; }
.fin-bank-section { padding:20px; margin-bottom:16px; border:1px solid #d5e0ea; border-radius:12px; background:#f8fafc; }
.fin-bank-section-heading { display:flex; align-items:flex-start; gap:12px; margin-bottom:18px; }
.fin-bank-section-heading > span { display:grid; place-items:center; flex:0 0 34px; height:34px; border-radius:9px; background:#e2edf7; color:#245681; font-size:.8rem; font-weight:700; }
.fin-bank-section-heading h3 { margin:0 0 5px; font-size:1.05rem; }
.fin-bank-section-heading p { margin:0; color:#526b82; font-size:.9rem; line-height:1.4; }
.fin-bank-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; align-items:start; }
.fin-bank-fields .fin-field > span { font-weight:600; font-size:.9rem; }
.fin-bank-fields small { color:#526b82; font-size:.8rem; line-height:1.4; }
.fin-bank-fields .fin-field:has([name="requiredDocuments"]) { grid-column:1 / -1; }
.fin-bank-document-hint { display:flex; align-items:flex-start; gap:12px; padding:16px; margin:4px 0 20px; border-radius:10px; background:#eaf2de; color:#355329; }
.fin-bank-document-hint p { margin:0; font-size:.9rem; line-height:1.5; }
.fin-bank-document-hint span { display:block; margin-top:4px; }
.fin-bank-archive { display:flex; align-items:flex-start; gap:10px; margin:18px 0; }
.fin-bank-archive input { margin-top:3px; }
.fin-bank-archive small { display:block; color:#526b82; margin-top:4px; }
.fin-bank-card > p { margin:0; }
.fin-bank-card-focus { color:#526b82; font-size:.9rem; white-space:pre-wrap; }
.fin-bank-card-actions { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; padding-top:14px; border-top:1px solid #dce5ed; align-self:end; }
.fin-bank-card-actions > button { min-width:0; min-height:44px; padding:9px 8px; font-size:.85rem; }
.fin-bank-card-actions > button > span { min-width:0; text-align:left; overflow-wrap:normal; }
.fin-bank-card-actions [data-fin-action="edit"] { white-space:nowrap; }
@media(max-width:600px) {
  .fin-bank-editor { padding:18px 14px; }
  .fin-bank-section { padding:16px 12px; }
  .fin-bank-fields { grid-template-columns:minmax(0,1fr); gap:16px; }
  .fin-bank-editor .fin-editor-footer > div { width:100%; justify-content:flex-end; }
}
.fin-editor fieldset { border:0; padding:0; min-width:0; }
.fin-workspace details { padding:16px; border:1px solid #cbd9e6; border-radius:12px; margin:16px 0; }
.fin-workspace summary { cursor:pointer; font-weight:700; margin-bottom:12px; }
.fin-check-item { display:grid; grid-template-columns:1.4fr 1fr 1fr; gap:10px; align-items:center; border-bottom:1px solid #e0e7ed; padding:12px 0; }
.fin-check-item small, .fin-document small { display:block; margin-top:5px; opacity:.75; }
.fin-check-item select:last-child { grid-column:1 / -1; }
.fin-step { display:grid; gap:8px; margin:16px 0; }
.fin-facts { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr)); gap:18px; }
.fin-facts > div { min-width:0; overflow-wrap:anywhere; }
.fin-facts dd,.fin-notes { white-space:pre-wrap; }
.fin-document { display:flex; justify-content:space-between; gap:12px; align-items:center; padding:12px 0; border-bottom:1px solid #e0e7ed; overflow-wrap:anywhere; }
.fin-document > div { min-width:0; }
.fin-document > div:last-child { display:flex; gap:8px; }
.fin-upload { display:flex; flex-wrap:wrap; align-items:end; gap:12px; padding:20px 0 0; }
.fin-detail > p { overflow-wrap:anywhere; }
.fin-workspace [hidden] { display:none !important; }
.fin-case-editor { max-width:1080px; }
.fin-editor-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:20px; }
.fin-editor-head h2 { margin:0; }
.fin-editor-head .eyebrow { margin:0 0 6px; }
.fin-editor-nav { display:flex; flex-wrap:wrap; gap:8px; padding-bottom:18px; border-bottom:1px solid #dce4eb; }
.fin-editor-nav .active { background:#dceacb; border-color:#85ae60; }
.fin-form-section { padding:20px 0; }
.fin-form-section h3 { margin:0 0 8px; }
.fin-form-section > .fin-field { margin:18px 0; }
.fin-case-editor .fin-form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; }
.fin-editor-footer { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; padding:18px 0 0; border-top:1px solid #dce4eb; }
.fin-editor-footer > span { font-size:.85rem; color:#526b82; max-width:360px; }
.fin-editor-footer > div { display:flex; gap:8px; flex-wrap:wrap; }
.fin-next-action { display:flex; align-items:center; justify-content:space-between; gap:18px; background:#eaf2de; border:1px solid #b7cf95; padding:18px; border-radius:12px; margin:20px 0; }
.fin-next-action h3 { margin:4px 0 8px; }
.fin-next-action p { margin:6px 0; }
.fin-next-action > button { flex-shrink:0; }
.fin-start-guide { background:#edf4fa; }
.fin-start-guide li { padding:5px 0; }
.fin-product-picker legend { padding:0; margin-bottom:7px; }
.fin-product-picker > details { margin:0; padding:12px; background:#fff; }
.fin-product-picker summary { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:4px 12px; margin-bottom:0; }
.fin-product-picker summary::after { content:'⌄'; grid-column:2; grid-row:1 / span 2; font-size:1.3rem; }
.fin-product-picker summary small { color:#526b82; font-size:.8rem; font-weight:400; }
.fin-product-actions { display:flex; flex-wrap:wrap; gap:8px; margin:14px 0; }
.fin-product-options { display:grid; grid-template-columns:1fr; gap:7px; }
.fin-product-choice { display:flex; align-items:center; gap:10px; min-height:44px; padding:10px; border:1px solid #dce4eb; border-radius:8px; cursor:pointer; }
.fin-product-choice:has(input:checked) { background:#edf5e4; border-color:#a2bf7d; }
.fin-product-choice input { flex-shrink:0; width:18px; height:18px; accent-color:#467731; }
.fin-product-icon { width:22px; height:22px; flex-shrink:0; color:#245681; }
.fin-product-links { display:flex; flex-wrap:wrap; gap:8px; }
.fin-product-links > button { display:inline-flex; align-items:center; gap:7px; }
.fin-project-picker legend { margin-bottom:7px; padding:0; }
.fin-project-picker-row { display:grid; grid-template-columns:minmax(0,1fr) 44px; align-items:start; gap:8px; }
.fin-project-picker details { margin:0; padding:12px; background:#fff; }
.fin-project-picker summary { margin-bottom:0; }
.fin-project-picker summary small,.fin-project-choice small { display:block; font-size:.8rem; font-weight:400; color:#526b82; margin-top:5px; }
.fin-project-picker .fin-product-options { margin-top:12px; }
.fin-project-jump { display:flex; align-items:center; justify-content:center; min-height:68px; padding:8px; }
.fin-project-card .fin-card-title { display:flex; align-items:center; gap:10px; }
.fin-project-add { align-content:center; justify-items:center; text-align:center; min-height:220px; border:2px dashed #a8bfd5; color:#245681; cursor:pointer; background:#f7fbff; }
.fin-project-add > span { font-size:2.5rem; }
.fin-project-select { display:flex; align-items:center; gap:8px; padding:10px; background:#edf5e4; border-radius:8px; }
.fin-project-select input { width:18px; height:18px; }
.fin-project-intro { margin:12px 0 20px; color:#526b82; }
.fin-project-lookup { display:grid; grid-template-columns:minmax(0,1fr) 44px; gap:8px; align-items:end; }
.fin-project-lookup > button { min-height:44px; padding:8px; font-size:1.4rem; }
.fin-lookup-editor { border:1px solid #b6ce9d; border-radius:10px; padding:16px; margin:16px 0; background:#f1f7e9; }
.fin-lookup-editor h3 { margin-bottom:12px; }
.fin-lookup-editor .fin-inline { margin:12px 0 0; }
.fin-project-editor > form > fieldset > .fin-field { margin:16px 0; }
.fin-project-documents { margin:20px 0; }
.fin-project-documents h3 { margin-bottom:12px; }
.fin-project-dropzone { display:grid; gap:10px; text-align:center; justify-items:center; padding:24px 16px; border:2px dashed #9db8d4; border-radius:12px; background:#f4f9fd; cursor:pointer; }
.fin-project-dropzone.is-dragging { border-color:#678f39; background:#edf5df; }
.fin-project-dropzone.is-busy { opacity:.7; cursor:wait; }
.fin-project-dropzone input[type=file] { width:100%; min-width:0; }
.fin-project-file-queue { list-style:none; padding:0; margin:14px 0; }
.fin-project-file-queue li { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 0; border-bottom:1px solid #e1e7ee; }
.fin-project-file-queue li > span { min-width:0; overflow-wrap:anywhere; }
.fin-icon { width:21px; height:21px; flex:0 0 21px; vertical-align:middle; }
.fin-workspace .fin-icon-button { display:inline-flex; justify-content:center; align-items:center; width:44px; height:44px; padding:10px; flex-shrink:0; }
.fin-labeled-button,.fin-editor-nav button { display:inline-flex; align-items:center; justify-content:center; gap:8px; }
.fin-editor-head { margin-bottom:14px; }
.fin-editor-nav { padding:10px 0 22px; margin-bottom:8px; row-gap:12px; }
.fin-editor-nav button { min-height:46px; }
.fin-doc-actions { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin:18px 0; }
.fin-case-dropzone { display:grid; justify-items:center; gap:10px; padding:28px 18px; border:2px dashed #9db8d4; border-radius:14px; background:linear-gradient(135deg,#edf5fc,#eef5e4); text-align:center; cursor:pointer; margin:20px 0; }
.fin-case-dropzone > .fin-icon { width:38px; height:38px; color:#386b89; }
.fin-case-dropzone > strong { font-size:1.15rem; }
.fin-case-dropzone > small { color:#526b82; }
.fin-case-dropzone input { max-width:400px !important; background:#fff; }
.fin-case-dropzone.is-dragging { background:#e3efce; border-color:#668d3d; box-shadow:0 0 0 4px #dae8ca; }
.fin-table-scroll { max-width:100%; overflow-x:auto; border:1px solid #cbd9e6; border-radius:12px; margin:18px 0; }
.fin-workspace .fin-document-table { border-collapse:collapse; width:100%; min-width:590px; font-size:.9rem; }
.fin-workspace .fin-document-table th,.fin-workspace .fin-document-table td { padding:12px 10px; text-align:left; vertical-align:middle; border-bottom:1px solid #dce5ed; }
.fin-document-table thead { background:#dfebf5; }
.fin-document-table tbody tr:nth-child(even) { background:#edf4f8; }
.fin-document-table tbody tr:nth-child(odd) { background:#fff; }
.fin-document-table .fin-document { display:table-row; }
.fin-document-table td:nth-last-child(4) { min-width:150px; overflow-wrap:anywhere; max-width:280px; }
.fin-document-tools { display:flex; gap:6px; }
.fin-workspace .fin-project-document-table th:last-child { text-align:right; }
.fin-project-document-table .fin-document-tools { justify-content:flex-end; align-items:center; }
.fin-project-document-table .project-material-move { display:flex; align-items:center; gap:6px; margin:0; min-width:0; flex:none; white-space:nowrap; }
.fin-project-document-table .project-material-move select { margin:0; min-height:38px; }
.project-material-rename { display:flex; align-items:center; gap:5px; min-width:180px; }
.project-material-rename input { width:100%; min-width:100px; margin:0; }
.project-material-rename>span { flex:none; color:#526b82; font-size:.85rem; }
.fin-client-review { margin:24px 0; padding:18px; border:1px solid #b8cda6; background:#f4f8ee; border-radius:12px; }
.fin-client-review h3 { display:flex; align-items:center; gap:8px; }
.fin-client-review .fin-toolbar { align-items:flex-start; }
.fin-client-review .fin-toolbar p { margin-bottom:0; }
.fin-client-facts { padding:12px; background:#fff; border-radius:8px; line-height:1.6; }
.fin-review-list { display:grid; gap:16px; margin:18px 0; }
.fin-review-list small { display:block; font-weight:400; color:#526b82; margin:5px 0; }
.fin-review-file { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 0; border-bottom:1px solid #dce5ed; }
.fin-review-file > span { min-width:0; overflow-wrap:anywhere; }
.fin-review-file small { display:block; color:#526b82; }
.fin-mail-overlay { z-index:1600; }
.fin-mail-editor { max-width:760px; }
.fin-mail-editor .fin-field { margin:16px 0; }
.fin-mail-editor textarea { min-height:260px; }
.fin-workspace [data-fin-status="interest"] { --fin-status-bg:#e7eef8; --fin-status-ink:#2e527d; --fin-status-line:#8aa5c7; }
.fin-workspace [data-fin-status="purchase"] { --fin-status-bg:#f0e8fb; --fin-status-ink:#68408f; --fin-status-line:#ad91cb; }
.fin-workspace [data-fin-status="documents"] { --fin-status-bg:#fff0d4; --fin-status-ink:#8d4b00; --fin-status-line:#d69b3d; }
.fin-workspace [data-fin-status="ready"] { --fin-status-bg:#d8f2ed; --fin-status-ink:#136551; --fin-status-line:#68ad9d; }
.fin-workspace [data-fin-status="bank"] { --fin-status-bg:#dcedfc; --fin-status-ink:#195f91; --fin-status-line:#7aaed5; }
.fin-workspace [data-fin-status="questions"] { --fin-status-bg:#ffe2e2; --fin-status-ink:#a02626; --fin-status-line:#ce6b6b; }
.fin-workspace [data-fin-status="approved"] { --fin-status-bg:#e6f3c5; --fin-status-ink:#4c661b; --fin-status-line:#9eb868; }
.fin-workspace [data-fin-status="financed"] { --fin-status-bg:#ccebd7; --fin-status-ink:#1f633a; --fin-status-line:#6da87f; }
.fin-workspace [data-fin-status="completed"] { --fin-status-bg:#285e45; --fin-status-ink:#fff; --fin-status-line:#285e45; }
.fin-workspace [data-fin-status="cancelled"] { --fin-status-bg:#e8e8ec; --fin-status-ink:#545760; --fin-status-line:#a2a4ad; }
.fin-workspace [data-fin-status] { background:var(--fin-status-bg,#e7eef8); color:var(--fin-status-ink,#2e527d); border-color:var(--fin-status-line,#8aa5c7); }
.fin-status-field legend,.fin-responsible-picker legend { font-weight:600; margin-bottom:7px; padding:0; }
.fin-workspace .fin-status-trigger { display:flex; justify-content:space-between; align-items:center; gap:8px; min-height:44px; width:100%; padding:7px 10px; border:1px solid #bbcbd9; border-radius:8px; background:#fff; color:inherit; text-align:left; cursor:pointer; }
.fin-status-summary,.fin-status-badges { display:inline-flex; align-items:center; flex-wrap:wrap; gap:5px; min-width:0; }
.fin-status-summary .fin-status { font-size:.8rem; padding:4px 7px; }
.fin-status-trigger > svg { flex-shrink:0; }
.fin-status-trigger[aria-expanded=true] > svg { transform:rotate(180deg); }
.fin-status-menu { position:fixed; inset:auto; margin:0; padding:6px; min-width:0; box-sizing:border-box; border:1px solid #aabccc; border-radius:10px; background:#fff; color:#102849; box-shadow:0 10px 30px #10284930; overflow:hidden; }
.fin-status-menu:popover-open { display:flex; flex-direction:column; }
.fin-status-options { display:grid; grid-template-columns:1fr; gap:4px; padding:3px; margin:0; min-height:0; overflow-y:auto; overscroll-behavior:contain; }
.fin-status-option { display:flex; align-items:center; gap:9px; padding:7px 9px; border:1px solid; border-radius:6px; cursor:pointer; min-height:36px; font-size:.9rem; }
.fin-status-option:has(input:checked) { font-weight:700; box-shadow:inset 0 0 0 1px currentColor; }
.fin-status-option:hover { filter:brightness(.94); outline:1px solid currentColor; outline-offset:-1px; }
.fin-status-option:has(input:focus-visible) { outline:2px solid #245681; outline-offset:1px; }
.fin-workspace .fin-status-option input[type=checkbox] { width:16px; height:16px; flex:0 0 16px; margin:0; accent-color:#245681; padding:0; }
.fin-status-footer { display:flex; align-items:center; justify-content:space-between; gap:8px; flex-shrink:0; padding:7px 3px 0; margin-top:5px; border-top:1px solid #dce5ed; }
.fin-status-footer small { color:#526b82; }
.fin-status-footer > button { padding:6px 10px; }
.fin-editor .fin-responsible-picker { margin:16px 0; padding:10px; border:1px solid #cbd9e6; border-radius:9px; background:#f6f9fc; }
.fin-responsible-picker legend small { font-size:.75rem; font-weight:400; color:#526b82; margin-left:6px; }
.fin-responsible-choices { display:flex; flex-wrap:wrap; gap:6px; }
.fin-responsible-choice { display:flex; align-items:center; gap:7px; padding:7px 10px; border:1px solid #cbd9e6; border-radius:7px; background:#fff; min-width:0; cursor:pointer; min-height:34px; }
.fin-responsible-choice:has(input:checked) { border-color:#84a75e; background:#edf5e4; }
.fin-responsible-choice input { flex-shrink:0; width:16px; height:16px; margin:0; }
.fin-responsible-choice .fin-icon { width:16px; height:16px; flex-basis:16px; }
.fin-responsible-choice span { overflow-wrap:anywhere; min-width:0; font-size:.85rem; }
.fin-responsible-choice small { display:block; margin-top:2px; color:#526b82; font-size:.75rem; }
@media(pointer:coarse) { .fin-status-option,.fin-responsible-choice { min-height:44px; } }
.fin-bank-picker { min-width:0; }
.fin-bank-picker .fin-lookup-editor .fin-field { margin:12px 0; }
.fin-case-editor .fin-responsibility-grid { align-items:start; }
.fin-case-card { position:relative; border-left:1px solid #cbd9e6; padding-left:25px; grid-template-rows:auto auto auto auto 1fr auto auto; }
.fin-case-card::before { content:""; position:absolute; top:-1px; bottom:-1px; left:-1px; width:7px; border-radius:14px 0 0 14px; background:var(--fin-card-stripe,#98a9b9); }
.fin-card-types { display:flex; flex-wrap:wrap; gap:7px; }
.fin-card-type { display:inline-flex; align-items:center; gap:6px; border:1px solid var(--fin-type-color); background:color-mix(in srgb,var(--fin-type-color) 12%,white); color:#102849; border-radius:8px; padding:5px 8px; font-size:.8rem; min-width:0; }
.fin-card-type .fin-product-icon { width:18px; height:18px; color:var(--fin-type-color); }
.fin-case-card dl > div { grid-template-columns:100px minmax(0,1fr); }
.fin-case-card dd { min-width:0; }
.fin-card-documents > p { margin:8px 0 0; }
.fin-card-documents > small { color:#526b82; }
.fin-card-tools { display:flex; flex-wrap:wrap; gap:8px; align-self:end; padding-top:12px; border-top:1px solid #dce5ed; }
.fin-card-tools [data-fin-action="delete"] { margin-left:auto; color:#a52d2d; border-color:#edc4c4; background:#fff6f6; }
.fin-card-tools [data-fin-action="delete"]:hover { background:#ffe5e5; }
.fin-delete-overlay { z-index:1400; }
.fin-delete-dialog { grid-template-columns:minmax(0,1fr); max-height:calc(100dvh - 40px); overflow:auto; overflow-wrap:anywhere; }
.fin-delete-dialog h2 { margin:0; }
.fin-delete-dialog p { margin:4px 0; line-height:1.5; }
.fin-delete-actions { display:flex; flex-wrap:wrap; gap:10px; justify-content:flex-end; margin-top:12px; }
.fin-delete-actions .fin-delete-confirm { background:#a52d2d; border-color:#a52d2d; color:#fff; }
@media(max-width:700px) {
  .fin-case-editor .fin-form-grid { grid-template-columns:1fr; }
  .fin-editor-nav button { flex:1 1 140px; }
  .fin-next-action { flex-direction:column; align-items:stretch; }
  .fin-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .fin-metrics > div { padding:10px 12px; }
  .fin-tabs { gap:8px; }
  .fin-tabs button { flex:1 1 145px; }
  .fin-workspace button { min-height:44px; }
  .fin-check-item { grid-template-columns:1fr; }
  .fin-document { align-items:start; flex-direction:column; }
  .fin-overlay { padding:8px; }
  .fin-editor { width:calc(100vw - 16px); padding:16px; }
}

/* Compact financing landing page; other admin headings and bank cards retain their layout. */
.dashboard-main.financing-main { padding-top:18px; }
.financing-main > .dashboard-heading.compact-admin-heading h1 { font-size:.8rem; line-height:normal; letter-spacing:.03em; }
.fin-tabs { gap:8px; margin-bottom:12px; }
.fin-filter-toggle { display:inline-flex; align-items:center; justify-content:center; gap:5px; min-width:44px; min-height:44px; padding:8px; }
.fin-filter-toggle.has-filters { border-color:#789f54; background:#e7f0da; }
.fin-filter-toggle > span { font-size:.75rem; font-weight:700; }
.fin-filters:not(.fin-filter-panel) { margin:10px 0; }
.fin-filter-panel { padding:16px; margin:0 0 14px; border:1px solid #cbd9e6; border-radius:12px; background:#f4f8fc; }
.fin-filter-actions { display:flex; flex-wrap:wrap; gap:8px; grid-column:1 / -1; }
.fin-product-cards { grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr)); gap:12px; }
.fin-product-card { grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:8px 12px; padding:14px; border-left-color:var(--fin-type-color,#84a5cc); border-radius:10px; }
.fin-product-card .fin-card-title { display:flex; align-items:center; gap:8px; font-size:.95rem; }
.fin-product-card .fin-product-icon { color:var(--fin-type-color,#245681); }
.fin-product-tools { display:flex; gap:5px; }
.fin-product-description { grid-column:1 / -1; color:#526b82; font-size:.85rem; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; }
@media(max-width:700px) {
  .dashboard-main.financing-main { padding-top:12px; }
  .fin-filter-panel { padding:12px; gap:12px; }
}

/* Three focused document views instead of one long editor. */
.fin-document-tabs { display:flex; gap:4px; border-bottom:1px solid #bbccdc; margin:12px 0 16px; }
.fin-document-tabs > button { flex:1 1 0; display:flex; justify-content:center; align-items:center; gap:7px; padding:9px 8px; border:1px solid transparent; border-bottom:3px solid transparent; border-radius:7px 7px 0 0; background:#f3f6f9; color:#526b82; cursor:pointer; font:inherit; font-size:.85rem; min-width:0; min-height:40px; }
.fin-document-tabs > button.active { border-bottom-color:#245681; background:#e9f1f9; color:#173f65; font-weight:700; }
.fin-document-tabs > button:hover { background:#e5edf4; }
.fin-document-tabs .fin-icon { width:18px; height:18px; flex-basis:18px; }
.fin-document-tabs ~ [role=tabpanel] { min-width:0; }
.fin-doc-actions { margin:12px 0; }
.fin-check-help { font-size:.8rem; color:#526b82; margin:8px 0 12px; }
.fin-checklist-compact { display:grid; gap:7px; }
.fin-workspace .fin-check-group { padding:0; margin:0; border-radius:8px; overflow:hidden; }
.fin-check-group > summary { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:6px 12px; padding:9px 12px; margin:0; font-size:.85rem; background:#f3f7fa; }
.fin-check-group > summary > span::before { content:'▸'; display:inline-block; margin-right:7px; }
.fin-check-group[open] > summary > span::before { content:'▾'; }
.fin-check-group > summary small { font-weight:400; color:#526b82; margin-left:auto; }
.fin-check-group[open] > summary { border-bottom:1px solid #dbe4eb; }
.fin-check-row { display:flex; align-items:center; gap:10px; padding:7px 12px; min-height:34px; border-bottom:1px solid #e2e9ef; background:#fff; cursor:pointer; font-size:.85rem; line-height:1.3; }
.fin-check-row:last-child { border-bottom:0; }
.fin-check-row:hover { background:#f5f9fc; }
.fin-check-row.is-received { background:#f1f7eb; }
.fin-check-name { flex:1; min-width:0; overflow-wrap:anywhere; }
.fin-check-state { color:#8d4b00; font-size:.75rem; white-space:nowrap; }
.fin-check-row.is-received .fin-check-state { color:#386c2c; }
.fin-check-row.is-waived .fin-check-state { color:#657080; }
.fin-check-row input[type=checkbox] { width:16px; height:16px; flex:0 0 16px; margin:0; accent-color:#5b8b3d; }
.fin-workspace .fin-check-settings { padding:10px 12px; margin:12px 0 0; }
.fin-check-settings > summary { font-size:.85rem; margin:0; }
.fin-check-settings[open] > summary { margin-bottom:12px; }
.fin-check-settings .fin-template-picker { gap:8px; font-size:.85rem; }
.fin-client-review { margin:0; padding:0; border:0; background:transparent; }
.fin-review-toolbar { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:8px; margin-bottom:10px; font-size:.85rem; }
.fin-review-hint { font-size:.8rem; color:#526b82; margin:6px 0 10px; }
.fin-review-match-table { border:1px solid #cbd9e6; border-radius:8px; overflow:hidden; margin-bottom:10px; }
.fin-review-match-heading,.fin-review-match-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.2fr) 36px; gap:8px; align-items:center; padding:6px 9px; font-size:.85rem; }
.fin-review-match-heading { background:#e8f0f7; font-weight:600; }
.fin-review-match-row + .fin-review-match-row { border-top:1px solid #e0e7ed; }
.fin-review-match-row > span { min-width:0; overflow-wrap:anywhere; }
.fin-workspace .fin-review-match-row select { padding:6px 8px; font-size:.85rem; }
.fin-review-match-row .fin-icon-button { width:36px; height:36px; min-height:36px; padding:7px; }
.fin-client-review > details { padding:10px 12px; margin:12px 0 0; }
.fin-client-review > details > summary { font-size:.85rem; margin:0; }
.fin-client-review > details[open] > summary { margin-bottom:10px; }
.fin-review-file { padding:6px 0; font-size:.85rem; }
.fin-review-file > button { padding:6px 9px; }
@media(max-width:500px) {
  .fin-document-tabs > button { flex-direction:column; gap:3px; font-size:.75rem; padding:7px 3px; }
  .fin-review-match-heading { display:none; }
  .fin-review-match-row { grid-template-columns:minmax(0,1fr) 44px; }
  .fin-review-match-row > span { grid-column:1 / -1; }
}
@media(pointer:coarse) {
  .fin-check-row { min-height:44px; }
  .fin-review-match-row { grid-template-columns:minmax(0,1fr) minmax(0,1.2fr) 44px; }
  .fin-review-match-row .fin-icon-button { width:44px; height:44px; min-height:44px; }
}
@media(pointer:coarse) and (max-width:500px) { .fin-review-match-row { grid-template-columns:minmax(0,1fr) 44px; } }

/* Wide case editor and actionable workflow. */
.fin-case-editor .fin-editor-nav { flex-wrap:nowrap; overflow-x:auto; gap:6px; scrollbar-width:thin; }
.fin-case-editor .fin-editor-nav > button { flex:0 0 auto; white-space:nowrap; }
.fin-workflow-editor { max-width:1080px; }
.fin-workflow-progress { display:grid; grid-template-columns:auto minmax(80px,1fr); align-items:center; gap:8px 16px; margin-bottom:8px; font-size:.85rem; }
.fin-workflow-progress > small { grid-column:1 / -1; color:#526b82; }
.fin-workflow-progress progress { width:100%; height:8px; accent-color:#6c963e; }
.fin-workflow-contact { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:8px; padding:8px 10px; background:#edf4fa; border-radius:8px; font-size:.85rem; }
.fin-workspace .fin-workflow-group { padding:0; margin:8px 0; border-radius:9px; overflow:hidden; }
.fin-workflow-group > summary { display:flex; justify-content:space-between; gap:12px; margin:0; padding:10px 12px; background:#f0f5fa; font-size:.9rem; }
.fin-workflow-group > summary > span { display:flex; gap:10px; align-items:center; }
.fin-workflow-group > summary > span > small { font-size:.75rem; color:#526b82; }
.fin-workflow-group > summary > small { color:#526b82; font-weight:400; }
.fin-workflow-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:10px; padding:7px 10px; border-top:1px solid #e2e9ef; font-size:.85rem; }
.fin-workflow-row.is-done { background:#f1f7eb; }
.fin-workflow-row > label { display:flex; gap:9px; align-items:center; cursor:pointer; min-width:0; }
.fin-workflow-row input[type=checkbox] { width:17px; height:17px; flex-shrink:0; accent-color:#648d3e; }
.fin-workflow-row > button { display:flex; align-items:center; gap:6px; padding:6px 9px; min-height:34px; font-size:.8rem; }
.fin-workflow-row .fin-icon { width:16px; height:16px; flex-basis:16px; }
.fin-workspace .fin-workflow-legacy { margin:8px; padding:8px; font-size:.8rem; }
.fin-workflow-legacy > p { white-space:pre-wrap; margin:6px 0; }
.fin-workflow-docs-overlay { z-index:1200; }
.fin-workflow-attachment { display:flex; align-items:center; gap:8px; padding:7px 0; border-bottom:1px solid #e2e9ef; font-size:.85rem; }
.fin-workflow-attachment input { flex:0 0 17px; width:17px; height:17px; }
.fin-workflow-attachment small { display:block; color:#526b82; }
.fin-workflow-attachments { max-height:260px; overflow:auto; }
@media(max-width:700px) {
 .fin-case-editor .fin-editor-nav { flex-wrap:wrap; overflow:visible; }
 .fin-case-editor .fin-editor-nav > button { flex:1 1 140px; white-space:normal; }
 .fin-workflow-row { grid-template-columns:minmax(0,1fr); gap:6px; }
 .fin-workflow-row > button { justify-self:end; }
}
@media(pointer:coarse) { .fin-workflow-row > label,.fin-workflow-row > button { min-height:44px; } }

.fin-workflow-overlay,.fin-workflow-docs-overlay,.fin-mail-overlay { padding:8px; }
.fin-workflow-group > summary > span::before { content:'▸'; }
.fin-workflow-group[open] > summary > span::before { content:'▾'; }

.fin-card-progress { display:grid; gap:6px; }
.fin-card-progress > div { display:flex; align-items:center; justify-content:space-between; gap:8px; color:#526b82; font-size:.8rem; }
.fin-card-progress strong { color:#123f62; white-space:nowrap; }
.fin-card-progress progress { display:block; width:100%; height:7px; border:0; border-radius:8px; overflow:hidden; background:#e3edf1; accent-color:#268775; }
.fin-card-progress progress::-webkit-progress-bar { background:#e3edf1; border-radius:8px; }
.fin-card-progress progress::-webkit-progress-value { background:#268775; border-radius:8px; }
.fin-card-progress progress::-moz-progress-bar { background:#268775; border-radius:8px; }

.project-tasks-filters,.project-task-tools { display:flex; flex-wrap:wrap; gap:12px; align-items:end; }
.project-tasks-filters { margin:16px 0; }
.project-tasks-filters label,.project-task-tools > label { display:grid; gap:5px; font-size:.85rem; }
.project-tasks-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,360px),1fr)); gap:16px; }
.project-task-card { display:grid; gap:10px; align-content:start; min-width:0; padding:16px; border:1px solid #cddfe7; border-left:5px solid #2b779e; border-radius:12px; background:#f5fafc; overflow-wrap:anywhere; }
.project-task-card.is-completed { border-left-color:#268775; background:#f0f8f4; }
.project-task-heading { display:flex; align-items:start; justify-content:space-between; gap:10px; }
.project-task-card p { margin:0; }
.project-task-card small { color:#526b82; }
.project-task-tools select { max-width:100%; }
.project-task-tools > label { min-width:0; }
.project-task-tools .project-task-complete { display:flex; align-items:center; gap:8px; min-height:44px; margin-left:auto; }
.project-task-complete input { width:18px; height:18px; }

.project-task-heading .badge { flex-shrink:0; white-space:nowrap; }
.project-tasks-panel > .section-head { flex-wrap:wrap; }
.project-tasks-panel > .section-head h3 { flex:1 1 220px; }
.project-tasks-filters input,.project-tasks-filters select,.project-task-tools select { min-height:38px; padding:7px 10px; border:1px solid #cbd9e6; border-radius:8px; background:#fff; color:#123f62; font:inherit; }
.project-tasks-filters input { max-width:100%; box-sizing:border-box; }

.fin-project-category-bar { display:flex; align-items:flex-end; gap:10px; margin:18px 0; border-bottom:2px solid #bfd4df; }
.fin-project-category-tabs { display:flex; gap:5px; min-width:0; flex:1; overflow-x:auto; }
.fin-project-category-tabs > button { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:44px; flex-shrink:0; padding:9px 16px; border:1px solid #d4e0e8; border-bottom:0; border-radius:10px 10px 0 0; background:#edf4f7; color:#38576f; font:inherit; font-weight:600; cursor:pointer; }
.fin-project-category-tabs > button.active { background:#0b365d; color:#fff; border-color:#0b365d; }
.fin-project-category-tabs > button small { border-radius:12px; padding:1px 7px; background:#ffffff70; color:#163b53; font-size:.75rem; }
.fin-project-category-tabs > button:hover:not(.active) { background:#dcecf2; color:#153c5a; }
.fin-project-category-tabs > button:focus-visible { outline:2px solid #268775; outline-offset:-3px; }
.fin-project-category-tools { display:flex; gap:6px; padding-bottom:5px; flex-shrink:0; }
.fin-category-overlay { z-index:1450; padding:12px; }
.fin-category-editor { width:min(500px,100%); max-width:500px; }
.fin-category-editor form { min-width:0; }
.fin-category-editor fieldset { display:grid; gap:14px; margin:0; padding:0; border:0; min-width:0; }
.fin-category-actions { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.fin-category-actions [data-fin-action="category-delete"] { color:#a52d2d; }
.fin-category-delete-confirm { border:1px solid #edc4c4; border-radius:10px; padding:12px; background:#fff6f6; }
.fin-category-delete-confirm p { margin:0 0 10px; }
@media(max-width:700px) { .fin-project-category-tabs > button { padding:9px 12px; } .fin-project-category-bar { gap:6px; } }

.fin-project-card { overflow:hidden; }
.fin-project-cover { height:128px; position:relative; margin:-20px -20px 0 -20px; background:#e4eff0; border-bottom:1px solid #d4e2e7; }
.fin-project-cover > img { width:100%; height:100%; display:block; object-fit:cover; }
.fin-project-cover-empty { height:100%; display:flex; align-items:center; justify-content:center; gap:10px; color:#63838a; font-size:.85rem; background:linear-gradient(125deg,#e5f0f1,#f3f8f1); }
.fin-project-cover-empty .fin-icon { width:28px; height:28px; }
.fin-project-cover-tools { position:absolute; top:8px; right:8px; display:flex; gap:6px; opacity:0; transition:opacity .15s; }
.fin-project-cover:hover .fin-project-cover-tools,.fin-project-cover:focus-within .fin-project-cover-tools { opacity:1; }
.fin-cover-tool { display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px; border:1px solid #cbd9e6; border-radius:8px; background:#fffffff0; color:#123c5b; cursor:pointer; box-shadow:0 2px 8px #123c5b20; }
.fin-cover-tool[data-project-media="delete"] { color:#a52d2d; }
.fin-project-card-actions { display:flex; justify-content:flex-end; gap:6px; margin-top:auto; }
.fin-project-card-actions > button { flex:0 0 auto; }
.fin-project-card-actions [data-fin-action="delete"] { color:#a52d2d; }
.fin-project-card { cursor:pointer; }
.fin-project-card:focus-within { outline:2px solid #268775; outline-offset:2px; }
.fin-project-media-overlay,.fin-project-offer-overlay { z-index:1200; padding:8px; }
.fin-project-media-dialog { max-width:560px; }
.fin-project-media-preview { width:100%; max-height:220px; object-fit:contain; border-radius:10px; background:#edf4f6; }
.fin-project-media-dialog .fin-inline { margin-bottom:0; }
.fin-project-offer-dialog { max-width:1100px; }
.fin-project-offer-dialog fieldset { display:grid; gap:16px; }
.fin-offer-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:24px; align-items:start; }
.fin-offer-grid > section,.fin-offer-grid > aside { display:grid; gap:14px; min-width:0; }
.fin-offer-grid > aside { padding:16px; border:1px solid #cbdfe4; border-radius:12px; background:#f4f9fa; }
.fin-offer-grid h3 { margin:0; font-size:1rem; }
.fin-offer-information { display:grid; gap:10px; max-height:220px; overflow:auto; margin:0; }
.fin-offer-information dt { font-size:.75rem; color:#526b7b; font-weight:bold; }
.fin-offer-information dd { margin:3px 0 0; white-space:pre-wrap; overflow-wrap:anywhere; font-size:.85rem; }
.fin-offer-attachments { margin:0; padding-left:24px; max-height:220px; overflow:auto; }
.fin-offer-attachments li { padding:8px 0; border-bottom:1px solid #dce7ec; overflow-wrap:anywhere; font-size:.85rem; }
.fin-offer-attachments small { display:block; margin-top:4px; color:#526b7b; }
.fin-offer-attachments .is-ready { color:#147662; }
@media(hover:none),(pointer:coarse) { .fin-project-cover-tools { opacity:1; } .fin-cover-tool { min-width:44px; min-height:44px; } }
@media(max-width:700px) { .fin-offer-grid { grid-template-columns:minmax(0,1fr); gap:16px; } .fin-project-cover { height:120px; } }

/* Project overview: one heading, one compact category/search row. */
.dashboard-main.projects-main { padding-top:18px; }
.projects-main > .dashboard-heading.compact-admin-heading h1 { font-size:.8rem; line-height:normal; letter-spacing:.03em; }
.fin-project-save-status { color:#526b7b; font-size:.8rem; line-height:normal; text-align:right; }
.projects-main .fin-project-category-bar { margin:4px 0 14px; align-items:center; }
.fin-project-search { position:relative; display:block; flex:0 1 30%; max-width:500px; min-width:140px; margin:0; }
.fin-project-search > .fin-icon { position:absolute; left:12px; top:50%; transform:translateY(-50%); color:#526b7b; pointer-events:none; }
.fin-workspace .fin-project-search #fin-search { padding-left:38px; min-height:44px; }
.projects-main .fin-project-category-tools { align-items:center; padding-bottom:0; }
.projects-main .fin-project-category-tools > button { white-space:nowrap; }
.projects-main .fin-project-category-tabs { align-self:stretch; }
@media(max-width:900px) {
  .projects-main .fin-project-category-bar { flex-wrap:wrap; }
  .projects-main .fin-project-category-tabs { flex-basis:100%; }
  .fin-project-search { flex:1 1 140px; max-width:50%; }
  .projects-main .fin-project-category-tools { margin-left:auto; }
}
@media(max-width:500px) {
  .fin-project-search { max-width:none; }
  .projects-main .fin-project-category-tools { gap:4px; }
  .projects-main .fin-project-category-tools .fin-icon-button { min-width:34px; width:34px; padding:6px; }
}

.fin-unit-field { grid-column:1 / -1; }
.fin-workspace input[data-fin-investment]:disabled { background:#edf0f3; color:#8a959e; border-color:#d6dee5; cursor:not-allowed; }

.fin-borrowers { margin:12px 0; min-width:0; }
.fin-borrowers > details { margin:8px 0; padding:10px 12px; }
.fin-borrower-choices { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr)); gap:6px; max-height:220px; overflow:auto; margin-top:10px; }
.fin-borrower-choices > label { display:flex; align-items:center; gap:8px; padding:6px; }
.fin-borrower-summary { display:flex; flex-wrap:wrap; gap:6px; margin:10px 0; }
.fin-borrower-summary > span { padding:5px 9px; border-radius:12px; background:#e5f0ed; font-size:.82rem; }
.fin-document-target { display:grid; grid-template-columns:minmax(180px,320px) minmax(0,1fr); gap:12px; align-items:end; margin:10px 0 14px; }
.fin-document-target small { color:#526b7b; }
.fin-initial-scan { display:grid; gap:6px; padding:0; list-style:none; }
.fin-initial-scan li { display:flex; flex-wrap:wrap; gap:6px 14px; padding:8px 10px; border-radius:8px; background:#eef4f6; }
@media(max-width:600px) { .fin-document-target { grid-template-columns:1fr; } }

/* Investment offer recipient selection and durable sent offer receipts. */
.fin-offer-client-picker{margin:0 10px;display:grid;gap:6px;min-width:0;position:relative}
.fin-offer-client-picker>span{font-size:.85rem;font-weight:600}
.fin-offer-picker-head{display:flex;gap:6px;min-width:0}.fin-offer-picker-head>button:first-child{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 18px;align-items:center;gap:8px;text-align:left;width:100%;min-height:42px;padding:9px 10px;border:1px solid #bdcfdc;border-radius:7px;background:#fff;color:#1a3e57;cursor:pointer}
.fin-offer-picker-head>button:first-child>span{overflow:hidden;text-overflow:ellipsis}.fin-offer-picker-head small{text-align:right;direction:ltr;overflow:hidden;text-overflow:ellipsis}
.fin-offer-picker-head svg{width:18px;height:18px}.fin-offer-picker-panel{border:1px solid #bdcfdc;border-radius:8px;overflow:hidden;background:#fff}.fin-offer-picker-panel[hidden],.fin-offer-client-list [hidden],.fin-offer-search[hidden]{display:none!important}
.fin-offer-search{display:grid;gap:5px;padding:10px;font-size:.8rem}.fin-offer-search input{width:100%;box-sizing:border-box}.fin-offer-client-list{max-height:240px;overflow:auto;overscroll-behavior:contain}
.fin-offer-client-list>button{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;border:0;border-bottom:1px solid #e6ebee;background:#fff;padding:10px 12px;text-align:left;color:#193c53;cursor:pointer}.fin-offer-client-list>button:nth-child(even){background:#f1f3f5}.fin-offer-client-list>button[aria-selected=true]{box-shadow:inset 3px 0 #238675}.fin-offer-client-list>button:hover,.fin-offer-client-list>button:focus-visible{background:#e5f1ed;outline:2px solid #5e998e;outline-offset:-2px}.fin-offer-client-list small{text-align:right;margin-left:auto;direction:ltr;overflow-wrap:anywhere;min-width:0}.fin-offer-client-list span{min-width:0;overflow-wrap:anywhere}
.fin-offer-settings{display:grid;gap:12px}.fin-offer-settings>label{display:flex;align-items:center;gap:10px;padding:10px;background:#f1f4f6;border-radius:7px}.fin-offer-settings input{width:18px;height:18px}
.fin-offer-confirm{padding:16px;border:1px solid #d7b061;background:#fff8e9;border-radius:9px}
.fin-offer-preview-overlay{z-index:10040;padding:16px}
.fin-offer-sent-overlay{z-index:10045;padding:16px}
.fin-offer-sent-dialog{width:min(580px,100%);max-height:calc(100dvh - 32px);overflow:auto;border-top:5px solid #38866c}
.fin-offer-sent-dialog header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.fin-offer-sent-dialog h2{display:flex;align-items:center;gap:10px;margin:0;color:#1c6952;font-size:21px}
.fin-offer-sent-dialog h2 svg{flex:none;width:25px;height:25px}
.fin-offer-sent-dialog>p{margin:20px 0;line-height:1.65;overflow-wrap:anywhere}
.fin-offer-sent-dialog footer{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px;margin-top:22px}
.fin-offer-preview-dialog{width:min(1080px,100%);height:calc(100dvh - 32px);max-height:calc(100dvh - 32px);padding:0;display:flex;flex-direction:column;min-width:0;overflow:hidden}
.fin-offer-preview-dialog>header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:18px 22px;border-bottom:1px solid #d2dfe7;flex:none}
.fin-offer-preview-dialog>header>div{min-width:0}.fin-offer-preview-dialog h2{display:flex;align-items:center;gap:9px;margin:0;font-size:20px}.fin-offer-preview-dialog h2 svg{width:24px;height:24px}.fin-offer-preview-dialog header p{margin:7px 0;color:#526c7d;font-size:13px;overflow-wrap:anywhere}.fin-offer-preview-dialog header small{color:#526c7d;overflow-wrap:anywhere}
.fin-offer-preview-content{flex:1;min-height:0;display:flex;flex-direction:column;background:#edf2f5;overflow:auto}.fin-offer-preview-content>p{padding:20px}.fin-offer-preview-content>iframe{width:100%;height:100%;min-height:0;flex:1;border:0;background:#fff}
@media(max-width:600px){.fin-offer-preview-overlay{padding:8px}.fin-offer-preview-dialog{height:calc(100dvh - 16px);max-height:calc(100dvh - 16px)}.fin-offer-preview-dialog>header{padding:14px;gap:10px}.fin-offer-preview-dialog h2{font-size:18px}}
.fin-offer-receipt-overlay{z-index:10050;padding:16px}.fin-offer-receipt-dialog{width:min(950px,100%);max-height:calc(100dvh - 32px);overflow:auto}.fin-offer-receipt-dialog header{display:flex;align-items:center;justify-content:space-between;gap:12px}.fin-offer-receipt-dialog h2{margin:0}.fin-offer-receipt-dialog dl{display:grid;grid-template-columns:auto minmax(0,1fr);gap:6px 12px;overflow-wrap:anywhere}.fin-offer-receipt-dialog dd{margin:0}.fin-offer-receipt-files{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}.fin-offer-receipt-files button{white-space:normal;overflow-wrap:anywhere}.fin-offer-receipt-dialog iframe{width:100%;height:65dvh;border:1px solid #d2dfe7;background:#fff}.fin-offer-receipt-dialog pre{white-space:pre-wrap}
@media(max-width:600px){.fin-offer-client-picker{margin:0 6px}.fin-offer-picker-head>button:first-child{grid-template-columns:minmax(0,1fr) 18px}.fin-offer-picker-head small{grid-column:1;grid-row:2;text-align:left}.fin-offer-picker-head svg{grid-column:2;grid-row:1 / span 2}.fin-offer-client-list>button{gap:6px;font-size:12px}.fin-offer-client-list small{font-size:11px;max-width:53%}.fin-offer-receipt-overlay{padding:8px}}

.fin-offer-picker-head>button:first-child>svg{grid-column:3}.fin-offer-picker-head>button:first-child:not(:has(small))>span{grid-column:1 / 3}
@media(max-width:600px){.fin-offer-picker-head>button:first-child>svg{grid-column:2}.fin-offer-picker-head>button:first-child:not(:has(small))>span{grid-column:1}}

.fin-project-offer-dialog .dc-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
@media(max-width:600px){.fin-project-offer-dialog .dc-fields{grid-template-columns:minmax(0,1fr)}}

.fin-project-offer-dialog .fin-editor-head>.fin-inline{flex:none;flex-wrap:nowrap;gap:8px;margin:0}.fin-project-offer-dialog .fin-editor-head>div:first-child{min-width:0}

/* Structured project editor and shared material sections. */
.fin-project-editor{max-width:1120px}.fin-project-editor fieldset{display:grid;gap:18px}.project-editor-section{display:grid;gap:16px;padding:20px;border:1px solid #d7e4e9;border-radius:10px;background:#fff}.project-editor-section h3{margin:0;color:#163e59}.project-rich-field{display:grid;gap:8px;min-width:0}.project-rich-field>label{font-weight:600}.project-rich-editor{min-height:170px;max-height:480px;overflow:auto;border:1px solid #b8ced9;border-radius:8px;background:#f7fafc;padding:14px;line-height:1.7;outline-offset:2px}.project-rich-editor p{margin:0 0 12px}.project-rich-tools summary{cursor:pointer;font-size:13px;color:#3d6a7b}.project-rich-tools .communication-format-toolbar{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0}.project-material-cabinet{padding:20px;border:1px solid #d7e4e9;border-radius:10px;background:#fff}.project-material-cabinet h3{margin:0}.project-material-tabs{display:flex;flex-wrap:wrap;gap:6px;border-bottom:1px solid #d4e2e7;margin:14px 0;padding-bottom:10px}.project-material-tabs button{padding:10px 14px;border:1px solid #ccdce3;border-radius:7px;background:#f3f6f8;color:#284d63;font:inherit;cursor:pointer}.project-material-tabs button[aria-selected=true]{background:#dff0e9;border-color:#69a28c;color:#185c4c;font-weight:bold}.project-material-tabs span{font-size:11px;border-radius:20px;padding:2px 6px;background:#fff}.project-material-new{display:flex;align-items:end;flex-wrap:wrap;gap:10px;margin:12px 0;padding:14px;background:#eef5f7}.project-material-new label{display:grid;gap:6px;flex:1}.project-material-cabinet .fin-project-dropzone{margin-top:16px}.project-video-preview{width:100%;max-height:70dvh;background:#111d28}
@media(max-width:600px){.project-editor-section,.project-material-cabinet{padding:14px}.project-material-tabs button{padding:9px 11px}.project-rich-editor{min-height:150px}}

.project-material-move{display:grid;gap:3px;font-size:11px;min-width:110px}.project-material-move select{max-width:160px;font-size:12px;padding:6px}

.project-rich-tools{padding:0!important;margin:0!important;border:0!important;background:transparent!important}.project-editor-section>.fin-form-grid{margin:0;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.project-editor-section:has(.project-rich-field){grid-template-columns:minmax(0,1fr);align-items:start}
@media(max-width:700px){.project-editor-section>.fin-form-grid,.project-editor-section:has(.project-rich-field){grid-template-columns:minmax(0,1fr)}}

.fin-project-contact { background:#f2f7fa; border:1px solid #b9cddc; border-radius:8px; padding:16px; }
.fin-project-editor form,.fin-project-editor fieldset,.fin-project-editor .project-editor-section,.fin-project-editor .project-material-cabinet { min-width:0; max-width:100%; }
.fin-project-editor fieldset { grid-template-columns:minmax(0,1fr); }
.fin-project-contact > p,.fin-offer-protection > p { color:#526b7b; margin:8px 0 12px; }
.fin-project-contact .fin-form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.fin-project-contact .fin-field,.fin-project-contact input,.fin-project-contact textarea { min-width:0; max-width:100%; }
@media(max-width:600px) { .fin-project-contact .fin-form-grid { grid-template-columns:minmax(0,1fr); } }
.fin-offer-protection { margin-top:16px; padding:14px; background:#fff8e8; border:1px solid #dcc188; border-radius:8px; }
.fin-offer-protection > label { display:flex; align-items:flex-start; gap:10px; }
.fin-offer-protection input { flex:0 0 auto; width:18px; height:18px; margin:2px 0 0; }

.project-access-toggle { width: 100%; margin-top: 6px; }
.project-access-locked { background: #edf0f3; color: #647184; border-color: #d3dae2; box-shadow: none; }
.project-access-locked h3 { color: #647184; }
.project-access-locked .btn-secondary { background: #f7f8fa; color: #53647b; }
.project-access-dialog { max-width: 460px; width: calc(100vw - 28px); max-height: calc(100dvh - 28px); overflow: auto; padding: 22px; }
.project-access-dialog > label { display: grid; gap: 8px; }
.project-access-dialog textarea { width: 100%; border: 1px solid #cbd9e6; border-radius: 8px; padding: 10px; }
.project-access-options { display: grid; gap: 5px; max-height: 45dvh; overflow-y: auto; padding: 6px 0; }
.project-access-options label { display: flex; align-items: center; gap: 9px; padding: 8px; border-radius: 7px; background: #f4f8fc; overflow-wrap: anywhere; }
.project-access-options input { flex-shrink: 0; }
.project-access-dialog footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; margin-top: 16px; }

.project-access-overlay { z-index: 2400; }
.project-access-dropdown-overlay { background: transparent; backdrop-filter: none; display: block; }
.project-access-dropdown-overlay .project-access-selection { position: fixed; margin: 0; box-shadow: 0 12px 40px #102d5438; border: 1px solid #cbd9e6; }

.project-access-locked .fin-project-cover { filter: grayscale(1); opacity: .55; }
.project-access-locked { cursor: pointer; }
.project-access-locked:focus-visible { outline: 2px solid #6f849d; outline-offset: 3px; }

.project-access-summary{margin:12px 0;padding:12px 14px;border:1px solid #dce5ed;border-radius:8px;background:#f5f8fb;overflow-wrap:anywhere}
.project-access-summary p{margin:0;line-height:1.5;white-space:pre-wrap}
