/* =====================================================================
   A. S. BOOKBINDING ERP — V38.46 PERSONAL BUDGET & MAASER CENTER
   A private, user-specific personal finance workspace. It is deliberately
   separated from company books and only posts to company expenses after
   an explicit user action.
   ===================================================================== */
#personalFinance{--pf-green:#147a55;--pf-blue:#176fbe;--pf-red:#b42318;--pf-purple:#6c4fb1;--pf-amber:#a96708;--pf-soft:#f4f8fb}
.pf-private-banner{display:flex;align-items:flex-start;gap:11px;padding:12px 14px;border:1px solid #cdddea;border-left:4px solid #326f9d;background:#f4f9fd;border-radius:9px;color:#30475c;font-size:12px;line-height:1.45}
.pf-private-banner b{display:block;color:#163d5d;margin-bottom:2px}.pf-private-icon{display:grid;place-items:center;width:30px;height:30px;border-radius:8px;background:#dceefb;color:#185f91;font-size:15px;flex:0 0 auto}
.pf-tabs{display:flex;gap:5px;align-items:center;overflow-x:auto;padding:6px;background:#eef3f7;border:1px solid #dbe4ec;border-radius:10px;margin-top:14px;scrollbar-width:thin}
.pf-tabs button{white-space:nowrap;min-height:36px!important;padding:7px 12px!important;border:1px solid transparent!important;background:transparent!important;color:#4b6074!important;border-radius:7px!important;font-size:11px!important;font-weight:750!important}
.pf-tabs button:hover{background:#fff!important}.pf-tabs button.active{background:#fff!important;color:#0f5f9e!important;border-color:#cbd9e4!important;box-shadow:0 2px 8px rgba(15,35,55,.07)!important}
.pf-summary-grid{display:grid;grid-template-columns:repeat(6,minmax(150px,1fr));gap:10px;margin:14px 0}
.pf-kpi{background:#fff;border:1px solid #dbe4ec;border-radius:10px;padding:13px 14px;box-shadow:0 1px 2px rgba(15,35,55,.03);min-width:0;position:relative;overflow:hidden}
.pf-kpi::after{content:"";position:absolute;inset:auto 0 0;height:3px;background:#b8c8d6}.pf-kpi.income::after{background:var(--pf-green)}.pf-kpi.personal::after{background:var(--pf-red)}.pf-kpi.business::after{background:var(--pf-purple)}.pf-kpi.maaser::after{background:var(--pf-amber)}.pf-kpi.cashflow::after{background:var(--pf-blue)}.pf-kpi.review::after{background:#64748b}
.pf-kpi small{display:block;color:#718195;font-size:9px;font-weight:850;text-transform:uppercase;letter-spacing:.08em;margin-bottom:5px}.pf-kpi strong{display:block;font-size:21px;line-height:1.15;color:#152d43;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pf-kpi span{display:block;color:#7b8998;font-size:10px;margin-top:5px}
.pf-layout-2{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(300px,.75fr);gap:14px}.pf-layout-even{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.pf-stack{display:grid;gap:14px}
.pf-panel{background:#fff;border:1px solid #dbe4ec;border-radius:10px;padding:14px;box-shadow:0 1px 3px rgba(15,35,55,.035);min-width:0}.pf-panel h2,.pf-panel h3{margin:0}.pf-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}.pf-panel-head p{margin:3px 0 0;color:#718195;font-size:10px;line-height:1.4}.pf-panel-head .toolbar{flex:0 0 auto}
.pf-filterbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:10px;background:#f6f9fb;border:1px solid #dfe7ee;border-radius:9px;margin:12px 0}.pf-filterbar label{font-size:10px;font-weight:750;color:#53677a}.pf-filterbar input,.pf-filterbar select{min-height:36px!important;height:36px!important}.pf-filterbar .search{flex:1;min-width:220px}
.pf-status{display:inline-flex;align-items:center;gap:5px;padding:3px 7px;border-radius:999px;background:#edf2f6;color:#53677a;font-size:9px;font-weight:800;white-space:nowrap}.pf-status::before{content:"";width:6px;height:6px;border-radius:50%;background:#8a98a7}.pf-status.synced{background:#e6f6ef;color:#146646}.pf-status.synced::before{background:#20a36b}.pf-status.local{background:#fff4df;color:#8d5b08}.pf-status.local::before{background:#d88b0b}.pf-status.warning{background:#fff0ee;color:#9f2e24}.pf-status.warning::before{background:#d04437}
.pf-table-wrap{overflow:auto;border:1px solid #dce5ec;border-radius:8px;max-height:62vh}.pf-table{width:100%;min-width:920px;border-collapse:separate;border-spacing:0;margin:0!important}.pf-table thead th{position:sticky;top:0;z-index:2;background:#edf3f7;color:#40566a;font-size:9px;text-transform:uppercase;letter-spacing:.05em;border-bottom:1px solid #d1dde6}.pf-table td{font-size:11px;vertical-align:middle}.pf-table tbody tr:hover{background:#f7fbfe}.pf-table tbody tr.selected{background:#eaf5fd}.pf-table .pf-description{min-width:260px;max-width:440px}.pf-table .pf-description b{display:block;color:#1c344a}.pf-table .pf-description small{display:block;color:#8190a0;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pf-table .pf-amount{font-weight:850;text-align:right;white-space:nowrap}.pf-table .pf-amount.positive{color:#147a55}.pf-table .pf-amount.negative{color:#b42318}.pf-table .pf-actions{white-space:nowrap}.pf-table .pf-actions button{min-height:29px!important;padding:4px 7px!important;font-size:9px!important}
.pf-class-pill{display:inline-flex;align-items:center;padding:4px 7px;border-radius:999px;background:#edf2f6;color:#4d6072;font-size:9px;font-weight:800;white-space:nowrap}.pf-class-pill.income{background:#e3f5ec;color:#126a48}.pf-class-pill.personal_expense{background:#feeceb;color:#9f2f26}.pf-class-pill.business_expense{background:#f0eafb;color:#65439c}.pf-class-pill.transfer{background:#e7f1fb;color:#205f90}.pf-class-pill.maaser_payment{background:#fff3d8;color:#88600d}.pf-class-pill.uncategorized{background:#eef1f4;color:#667482}
.pf-bulkbar{position:sticky;top:0;z-index:8;display:flex;align-items:center;gap:6px;flex-wrap:wrap;background:#122c45;color:#fff;border-radius:9px;padding:9px 10px;margin:10px 0;box-shadow:0 8px 24px rgba(15,35,55,.15)}.pf-bulkbar b{font-size:11px;margin-right:5px}.pf-bulkbar button,.pf-bulkbar select{min-height:32px!important;height:32px!important;font-size:9px!important}.pf-bulkbar button{background:#fff!important;color:#17324a!important;border-color:#d4e0e9!important}.pf-bulkbar button:hover{background:#e9f4fc!important}.pf-bulkbar .pf-bulk-business{background:#eee7fa!important;color:#5d3e92!important}.pf-bulkbar .pf-bulk-personal{background:#feeceb!important;color:#942a22!important}.pf-bulkbar .pf-bulk-income{background:#e2f5ec!important;color:#126a48!important}.pf-bulkbar .pf-bulk-maaser{background:#fff2d4!important;color:#815806!important}.pf-bulkbar .pf-count{margin-left:auto;font-size:10px;color:#d5e3ee}
.pf-empty{display:grid;place-items:center;min-height:180px;text-align:center;color:#718195;padding:24px}.pf-empty .pf-empty-icon{display:grid;place-items:center;width:54px;height:54px;border-radius:14px;background:#edf4f8;color:#3f718f;font-size:24px;margin-bottom:10px}.pf-empty b{color:#324b60}.pf-empty p{max-width:480px;font-size:11px;line-height:1.5;margin:5px auto 12px}
.pf-bars{display:grid;gap:10px}.pf-bar-row{display:grid;grid-template-columns:minmax(120px,1fr) minmax(140px,2fr) 90px;gap:10px;align-items:center;font-size:10px}.pf-bar-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pf-bar-track{height:9px;border-radius:99px;background:#e8eef3;overflow:hidden}.pf-bar-fill{height:100%;border-radius:99px;background:#477fa6}.pf-bar-value{text-align:right;font-weight:800}
.pf-account-grid,.pf-category-grid,.pf-rule-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:10px}.pf-card{border:1px solid #dbe4ec;border-radius:9px;padding:12px;background:#fff;min-width:0}.pf-card:hover{border-color:#b6cad9}.pf-card-head{display:flex;justify-content:space-between;gap:10px}.pf-card h3{font-size:13px;margin:0}.pf-card p{font-size:10px;color:#718195;margin:4px 0 0;line-height:1.4}.pf-card .pf-card-value{font-size:18px;font-weight:850;color:#15354f;margin-top:9px}.pf-card-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:10px;padding-top:9px;border-top:1px solid #edf1f4}.pf-card-footer small{color:#8291a0}.pf-card-footer button{min-height:29px!important;padding:4px 7px!important;font-size:9px!important}
.pf-budget-grid{display:grid;gap:8px}.pf-budget-row{display:grid;grid-template-columns:minmax(170px,1.3fr) 110px 110px 110px minmax(160px,1.4fr) 80px;gap:9px;align-items:center;padding:9px 10px;border:1px solid #e0e7ed;border-radius:8px;background:#fff;font-size:10px}.pf-budget-progress{height:9px;background:#e8eef3;border-radius:99px;overflow:hidden}.pf-budget-progress span{display:block;height:100%;background:#3382b8;border-radius:99px}.pf-budget-progress span.over{background:#bd3b31}.pf-budget-row strong{text-align:right}.pf-budget-row .negative{color:#b42318}
.pf-maaser-hero{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:10px;padding:14px;background:linear-gradient(135deg,#fffaf0,#f8f2df);border:1px solid #ead9a9;border-radius:10px}.pf-maaser-stat small{display:block;color:#856e3e;font-size:9px;text-transform:uppercase;font-weight:850;letter-spacing:.06em}.pf-maaser-stat strong{display:block;font-size:22px;color:#4e3c17;margin-top:5px}.pf-maaser-formula{margin-top:12px;padding:10px 12px;border-radius:8px;background:#fff;border:1px solid #eadfbe;color:#5c4c2b;font-size:11px;line-height:1.5}.pf-halacha-note{padding:10px 12px;border-left:4px solid #a77b23;background:#fffaf0;border-radius:6px;color:#6c5424;font-size:10px;line-height:1.5}
.pf-import-drop{display:grid;place-items:center;min-height:145px;border:2px dashed #b8cbd9;border-radius:11px;background:#f7fafc;text-align:center;padding:18px;cursor:pointer}.pf-import-drop:hover{border-color:#4a91bf;background:#f0f8fd}.pf-import-drop input{display:none}.pf-import-drop b{color:#1f4e70}.pf-import-drop span{font-size:10px;color:#738596;margin-top:5px}.pf-import-support{display:flex;gap:5px;flex-wrap:wrap;justify-content:center;margin-top:8px}.pf-import-support span{background:#eaf1f6;border:1px solid #d4e0e9;padding:3px 6px;border-radius:5px;color:#52697c;font-size:8px;font-weight:800}.pf-import-preview{max-height:52vh;overflow:auto;border:1px solid #dce5ec;border-radius:8px;margin-top:10px}.pf-import-preview table{min-width:980px;margin:0}.pf-import-preview input,.pf-import-preview select{min-height:30px!important;height:30px!important;font-size:9px!important;padding:4px 6px!important}.pf-import-duplicate{background:#fff5e9!important;color:#815608}.pf-import-warning{padding:9px 11px;background:#fff6e7;border:1px solid #efd8ad;border-radius:7px;color:#76531d;font-size:10px;line-height:1.45;margin:9px 0}
.pf-split-total{display:flex;justify-content:space-between;gap:10px;padding:10px 12px;background:#edf5fb;border:1px solid #cfe0ec;border-radius:8px;margin-bottom:10px}.pf-split-total strong{font-size:17px}.pf-split-row{display:grid;grid-template-columns:120px minmax(150px,1fr) minmax(160px,1.3fr) 110px 38px;gap:8px;align-items:end;padding:9px;border:1px solid #dfe7ee;border-radius:8px;margin-bottom:7px}.pf-split-row .field{margin:0}.pf-split-row button{min-height:36px!important}
.pf-settings-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:10px}.pf-setting-card{border:1px solid #dbe4ec;border-radius:9px;padding:12px;background:#fff}.pf-setting-card h3{font-size:13px;margin:0 0 5px}.pf-setting-card p{font-size:10px;line-height:1.45;color:#718195;margin:0 0 10px}
.pf-bill-overdue{color:#b42318;font-weight:800}.pf-bill-due{color:#a96708;font-weight:800}.pf-bill-paid{color:#147a55;font-weight:800}
.pf-source-badge{display:inline-flex;padding:3px 6px;border-radius:5px;background:#edf3f7;color:#5b6e80;font-size:8px;font-weight:750;white-space:nowrap}
.pf-print-report{display:none}
@media(max-width:1550px){.pf-summary-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:1100px){.pf-layout-2,.pf-layout-even{grid-template-columns:1fr}.pf-maaser-hero{grid-template-columns:repeat(2,1fr)}.pf-budget-row{grid-template-columns:1fr 90px 90px}.pf-budget-row>*:nth-child(4),.pf-budget-row>*:nth-child(5){grid-column:auto}.pf-summary-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:720px){.pf-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));overflow:visible}.pf-tabs button{white-space:normal;min-width:0;line-height:1.2}.pf-summary-grid{grid-template-columns:1fr 1fr}.pf-kpi strong{font-size:18px}.pf-filterbar{display:grid;grid-template-columns:1fr 1fr}.pf-filterbar .search{grid-column:1/-1;min-width:0}.pf-bulkbar{position:static}.pf-bulkbar .pf-count{width:100%;margin-left:0}.pf-maaser-hero{grid-template-columns:1fr 1fr}.pf-split-row{grid-template-columns:1fr 1fr}.pf-split-row .field:nth-child(3){grid-column:1/-1}.pf-budget-row{grid-template-columns:1fr 85px}.pf-budget-row .pf-budget-progress{grid-column:1/-1}.pf-tabs{border-radius:7px}.pf-private-banner{font-size:11px}}
@media(max-width:460px){.pf-summary-grid,.pf-maaser-hero{grid-template-columns:1fr}.pf-filterbar{grid-template-columns:1fr}.pf-filterbar .search{grid-column:auto}.pf-split-row{grid-template-columns:1fr}.pf-split-row .field:nth-child(3){grid-column:auto}.pf-panel{padding:10px}.pf-panel-head{display:grid}.pf-panel-head .toolbar{width:100%;display:grid;grid-template-columns:1fr 1fr}}
@media print{#personalFinance .professional-page-head,#personalFinance .pf-tabs,#personalFinance .pf-filterbar,#personalFinance .no-print,#personalFinance .pf-bulkbar,#personalFinance button{display:none!important}#personalFinance{display:block!important}.pf-panel{box-shadow:none;border-color:#cbd5df;break-inside:avoid}.pf-summary-grid{grid-template-columns:repeat(3,1fr)}.pf-table-wrap{max-height:none;overflow:visible}.pf-table{min-width:0}.pf-print-report{display:block}}

/* V38.46 QuickBooks-style Home shortcut: owner-only private area. */
.pf-home-shortcut{border-color:#b8cbe0;background:linear-gradient(180deg,#f7fbff,#eef6ff)}
.pf-home-shortcut .qb-section-label{color:#183d63}
.pf-home-shortcut .qb-flow-node.personal-finance .qb-flow-icon{background:#173e65;color:#fff;border-color:#173e65;font-size:12px;font-weight:800}
.pf-home-shortcut .qb-flow-node.personal-finance:hover{border-color:#5b83aa;background:#fff}

.pf-he{display:inline-block;direction:rtl;unicode-bidi:isolate;font-style:normal}

/* ========================================================================== 
   V38.46 PROFESSIONAL PERSONAL FINANCE WORKBENCH
   Document-first review, reconciliation, zero-based plans and Maaser audit.
   ========================================================================== */
#personalFinance{--pf-navy:#12395b;--pf-navy-2:#0b2944;--pf-blue:#256b9b;--pf-sky:#eaf4fb;--pf-gold:#a9791d;--pf-green:#147a55;--pf-red:#b42318;--pf-ink:#162536;--pf-muted:#66788a;--pf-line:#d8e3ec;--pf-soft:#f5f8fb}
#personalFinance .pf-pro-page-intro{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;padding:18px 20px;border:1px solid #cbdce9;border-radius:13px;background:linear-gradient(135deg,#f8fbfe 0%,#edf5fb 58%,#fffaf0 100%);box-shadow:0 8px 24px rgba(18,57,91,.06);margin-bottom:14px}
#personalFinance .pf-pro-page-intro h2{margin:4px 0 5px;font-size:23px;letter-spacing:-.02em;color:var(--pf-navy-2)}
#personalFinance .pf-pro-page-intro p{max-width:820px;margin:0;color:var(--pf-muted);line-height:1.55}
#personalFinance .pf-pro-eyebrow{font-size:9px;letter-spacing:.14em;font-weight:900;color:var(--pf-blue)}

.pf-pro-import-modal{padding:10px!important;align-items:center!important}
.pf-pro-import-modal .modalbox{width:min(1780px,99vw)!important;max-width:99vw!important;height:min(950px,97vh);max-height:97vh!important;padding:0!important;overflow:hidden!important;border-radius:15px!important;box-shadow:0 28px 90px rgba(7,25,43,.36)}
.pf-pro-import-modal .modalhead{height:58px;margin:0!important;padding:13px 16px!important;background:linear-gradient(90deg,var(--pf-navy-2),var(--pf-navy));color:#fff;border:0!important;position:relative!important;top:auto!important}
.pf-pro-import-modal .modalhead h2{font-size:16px;letter-spacing:.01em;color:#fff}
.pf-pro-import-modal .modalhead button{background:#ffffff18!important;color:#fff!important;border-color:#ffffff2b!important;min-width:38px!important}
.pf-pro-import-modal #modalBody{height:calc(100% - 58px);overflow:hidden!important;background:#eef3f7}
.pf-pro-import-head{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:10px 15px;background:#fff;border-bottom:1px solid var(--pf-line);min-height:58px}
.pf-pro-import-head>div:first-child{display:grid;gap:3px}.pf-pro-import-head b{font-size:14px;color:var(--pf-ink)}.pf-pro-import-head span{font-size:10px;color:var(--pf-muted)}
.pf-pro-import-metrics{display:flex!important;gap:7px!important}.pf-pro-import-metrics>span{display:grid;min-width:94px;padding:7px 10px;border-radius:8px;background:var(--pf-soft);border:1px solid var(--pf-line);text-align:right}.pf-pro-import-metrics small{font-size:8px;text-transform:uppercase;font-weight:850;letter-spacing:.07em;color:var(--pf-muted)}.pf-pro-import-metrics b{font-size:14px;color:var(--pf-navy)}
.pf-pro-workbench{display:grid;grid-template-columns:minmax(420px,.9fr) minmax(620px,1.1fr);gap:10px;height:100%;min-height:0;padding:10px;background:#edf2f6}
.pf-pro-import-head+.pf-pro-workbench{height:calc(100% - 58px)}
.pf-pro-source-pane,.pf-pro-review-pane{min-width:0;min-height:0;border:1px solid #cfdbe5;background:#fff;border-radius:11px;overflow:hidden;box-shadow:0 3px 14px rgba(17,49,75,.05)}
.pf-pro-source-pane{display:flex;flex-direction:column}.pf-pro-review-pane{overflow:auto;position:relative}
.pf-pro-pane-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 12px;background:linear-gradient(180deg,#fff,#f2f6f9);border-bottom:1px solid var(--pf-line);min-height:54px}
.pf-pro-pane-head>div:first-child{display:grid;gap:2px;min-width:0}.pf-pro-pane-head b{font-size:12px;color:var(--pf-ink)}.pf-pro-pane-head small{font-size:9px;color:var(--pf-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:520px}
.pf-pro-source-view{flex:1;min-height:0;height:100%;background:#dce4ea;overflow:auto;position:relative}
.pf-pro-source-view iframe{display:block;width:100%;height:100%;min-height:650px;border:0;background:#fff}
.pf-pro-image-stage{height:100%;min-height:620px;display:grid;place-items:center;padding:16px;background:repeating-linear-gradient(45deg,#e9eef2,#e9eef2 14px,#e3e9ee 14px,#e3e9ee 28px);overflow:auto}
.pf-pro-image-stage img{max-width:100%;height:auto;max-height:none;box-shadow:0 5px 25px rgba(0,0,0,.2);background:#fff}
.pf-pro-text-source{margin:0;padding:18px;min-height:100%;white-space:pre-wrap;word-break:break-word;background:#fff;color:#28394a;font:11px/1.55 ui-monospace,SFMono-Regular,Consolas,monospace}
.pf-pro-sheet{height:100%;overflow:auto;background:#fff}.pf-pro-sheet table{border-collapse:collapse;min-width:100%;font-size:10px}.pf-pro-sheet th,.pf-pro-sheet td{padding:7px 9px;border:1px solid #dce5ec;white-space:nowrap}.pf-pro-sheet th{position:sticky;top:0;background:#eaf1f6;z-index:2}
.pf-pro-missing-doc{min-height:100%;display:grid;place-items:center;align-content:center;text-align:center;padding:30px;color:var(--pf-muted)}.pf-pro-missing-doc b{font-size:16px;color:var(--pf-ink)}.pf-pro-missing-doc p{max-width:380px;line-height:1.5}

.pf-pro-oneclick{position:sticky;top:0;z-index:9;display:flex;flex-wrap:wrap;gap:6px;align-items:center;padding:9px 10px;background:#f8fbfd;border-bottom:1px solid var(--pf-line);box-shadow:0 3px 10px rgba(20,55,85,.04)}
.pf-pro-oneclick:before{content:'ONE-CLICK CLASSIFY';font-size:8px;font-weight:900;letter-spacing:.09em;color:var(--pf-muted);margin-right:3px}
.pf-pro-oneclick button{min-height:31px!important;padding:5px 9px!important;font-size:9px!important}
.pf-pro-match-card{margin:10px;border:1px solid #cfe0eb;background:#f6fafc;border-radius:9px;padding:10px;display:grid;grid-template-columns:1.3fr 1fr auto;gap:12px;align-items:center}
.pf-pro-match-card>div{display:grid;gap:2px;min-width:0}.pf-pro-match-card small{font-size:8px;color:var(--pf-muted);text-transform:uppercase;font-weight:850;letter-spacing:.06em}.pf-pro-match-card b{font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pf-pro-match-card span{font-size:9px;color:var(--pf-muted)}.pf-pro-match-actions{display:flex!important;flex-direction:row;gap:5px}
.pf-pro-import-table{margin:0 10px 10px;border:1px solid var(--pf-line);border-radius:8px;overflow:auto;max-height:calc(97vh - 350px);background:#fff}
.pf-pro-import-table table{min-width:1020px;margin:0;border-collapse:separate;border-spacing:0}.pf-pro-import-table thead th{position:sticky;top:0;z-index:4;background:#e9f0f5;border-bottom:1px solid #c7d6e2}.pf-pro-import-table tbody tr{cursor:pointer}.pf-pro-import-table tbody tr:hover{background:#f4f9fc}.pf-pro-import-table tr.pf-pro-focused{outline:2px solid #3888bd;outline-offset:-2px;background:#edf7fd!important}.pf-pro-import-table input,.pf-pro-import-table select{height:30px!important;min-height:30px!important;font-size:9px!important;padding:4px 6px!important}
.pf-pro-savebar{position:sticky;bottom:0;z-index:10;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;background:#fff;border-top:1px solid var(--pf-line);box-shadow:0 -5px 16px rgba(20,55,85,.08)}
.pf-pro-savebar>div:first-child{display:grid;gap:2px}.pf-pro-savebar b{font-size:11px}.pf-pro-savebar span{font-size:9px;color:var(--pf-muted)}

.pf-pro-statement-summary{display:grid;grid-template-columns:repeat(4,minmax(110px,1fr));gap:7px;padding:10px}.pf-pro-statement-summary>div{display:grid;gap:4px;padding:9px 10px;background:#f4f8fb;border:1px solid var(--pf-line);border-radius:8px}.pf-pro-statement-summary small{font-size:8px;text-transform:uppercase;font-weight:850;color:var(--pf-muted);letter-spacing:.06em}.pf-pro-statement-summary b{font-size:11px;color:var(--pf-navy)}
.pf-pro-reconcile-card{margin:0 10px 10px;padding:13px;border:1px solid #c7ddcf;background:linear-gradient(145deg,#f6fcf8,#fff);border-radius:10px}.pf-pro-reconcile-card h3{margin:0 0 4px;font-size:14px;color:#125a42}.pf-pro-reconcile-card>p{margin:0 0 10px;font-size:9px;color:#60776d;line-height:1.45}.pf-pro-reconcile-grid{display:grid;grid-template-columns:repeat(2,minmax(140px,1fr));gap:8px}.pf-pro-reconcile-grid label{display:grid;gap:4px;font-size:8px;font-weight:850;text-transform:uppercase;color:#60776d}.pf-pro-reconcile-grid input{background:#fff!important}
.pf-pro-recon-result{display:grid;grid-template-columns:repeat(4,minmax(105px,1fr));gap:6px;margin:10px 0}.pf-pro-recon-result span{display:grid;gap:3px;padding:8px;background:#fff;border:1px solid #d8e6dd;border-radius:7px;font-size:8px;color:#65756c}.pf-pro-recon-result b{font-size:11px;color:#184f3d}
.pf-pro-compare-transactions{margin:0 10px 10px;border:1px solid var(--pf-line);border-radius:8px;overflow:auto}.pf-pro-compare-transactions table{width:100%;min-width:650px;margin:0}.pf-pro-compare-transactions thead th{position:sticky;top:0;background:#eaf1f6}
.pf-pro-standalone-document{height:100%;display:flex;flex-direction:column}.pf-pro-standalone-document .pf-pro-source-view{min-height:0}.pf-pro-standalone-document .pf-pro-source-view iframe{min-height:calc(97vh - 125px)}

.pf-pro-review-bulk{display:flex;flex-wrap:wrap;gap:6px;align-items:center;padding:10px 12px;background:#fff;border:1px solid var(--pf-line);border-radius:9px;margin-bottom:10px}.pf-pro-review-bulk b{margin-right:auto;color:var(--pf-navy)}
.pf-pro-progress-ring{--p:0;display:grid;place-items:center;width:82px;height:82px;border-radius:50%;background:conic-gradient(var(--pf-green) calc(var(--p)*1%),#dce7e1 0);position:relative}.pf-pro-progress-ring:after{content:'';position:absolute;width:63px;height:63px;background:#fff;border-radius:50%}.pf-pro-progress-ring>*{z-index:1}.pf-pro-progress-ring b{font-size:15px;color:var(--pf-green)}
.pf-pro-done{border-color:#a9d8c3!important;background:#f2fbf7!important}.pf-pro-focused{outline:2px solid #4a91bf}.pf-pro-found{animation:pfProFound 1.8s ease}.pf-pro-excluded{opacity:.56;background:#f7f7f7}@keyframes pfProFound{0%,100%{box-shadow:none}40%{box-shadow:inset 0 0 0 3px #d89b22;background:#fff8dd}}

.pf-pro-financial-intelligence{display:grid;grid-template-columns:repeat(4,minmax(160px,1fr));gap:9px;margin:0 0 12px}.pf-pro-financial-intelligence>div{display:grid;gap:4px;padding:13px 14px;border-radius:11px;border:1px solid #cbdbe7;background:linear-gradient(160deg,#fff,#f4f8fb);box-shadow:0 4px 14px rgba(16,54,84,.05)}.pf-pro-financial-intelligence small{font-size:8px;text-transform:uppercase;font-weight:900;letter-spacing:.08em;color:var(--pf-muted)}.pf-pro-financial-intelligence b{font-size:18px;color:var(--pf-navy)}.pf-pro-financial-intelligence span{font-size:9px;color:var(--pf-muted)}
.pf-pro-month-close{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:11px 13px;margin:0 0 12px;border-radius:10px;background:linear-gradient(90deg,#102f4b,#1f587f);color:#fff;box-shadow:0 5px 16px rgba(14,46,72,.16)}.pf-pro-month-close>div:first-child{display:grid;gap:3px}.pf-pro-month-close b{font-size:12px}.pf-pro-month-close span{font-size:9px;color:#d3e5f1}.pf-pro-month-close button{background:#ffffff13!important;color:#fff!important;border-color:#ffffff35!important}.pf-pro-month-close button:hover{background:#ffffff22!important}

.pf-pro-plan-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px}.pf-pro-plan-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(290px,.8fr);gap:12px}.pf-pro-money-plan,.pf-pro-safe-spend{border:1px solid var(--pf-line);border-radius:11px;background:#fff;padding:14px}.pf-pro-money-plan h3,.pf-pro-safe-spend h3{margin:0 0 5px;color:var(--pf-navy);font-size:15px}.pf-pro-money-plan>p,.pf-pro-safe-spend>p{font-size:9px;color:var(--pf-muted)}
.pf-pro-safe-spend{background:linear-gradient(145deg,#eef9f4,#fff);border-color:#bcdccb}.pf-pro-safe-spend>strong{display:block;font-size:30px;color:var(--pf-green);letter-spacing:-.03em;margin:9px 0}.pf-pro-safe-breakdown{display:grid;gap:6px}.pf-pro-safe-breakdown span{display:flex;justify-content:space-between;padding:7px 8px;border-radius:7px;background:#fff;border:1px solid #d5e7dc;font-size:9px}.pf-pro-safe-breakdown b{color:#245845}
.pf-pro-goal-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:10px}.pf-pro-goal-card{display:grid;gap:10px;padding:13px;border:1px solid var(--pf-line);border-radius:11px;background:#fff;box-shadow:0 3px 13px rgba(20,52,78,.05)}.pf-pro-goal-copy{display:grid;grid-template-columns:38px 1fr;gap:10px}.pf-pro-goal-copy b{display:block;color:var(--pf-ink)}.pf-pro-goal-copy span{display:block;font-size:9px;color:var(--pf-muted);margin-top:3px}.pf-pro-goal-icon{width:38px;height:38px;border-radius:10px;display:grid;place-items:center;background:#edf5fb;color:var(--pf-blue);font-weight:900}.pf-pro-goal-track{height:8px;background:#e5ebf0;border-radius:99px;overflow:hidden}.pf-pro-goal-track span{display:block;height:100%;background:linear-gradient(90deg,#2978a8,#55a48a);border-radius:99px}.pf-pro-goal-foot{display:flex;justify-content:space-between;align-items:center;font-size:9px;color:var(--pf-muted)}.pf-pro-idea-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(205px,1fr));gap:8px}.pf-pro-idea{padding:11px;border:1px dashed #b9cbd8;border-radius:9px;background:#f8fbfd}.pf-pro-idea b{display:block;color:var(--pf-navy);font-size:11px}.pf-pro-idea span{font-size:9px;color:var(--pf-muted);line-height:1.45}

.pf-pro-audit-summary{display:grid;grid-template-columns:repeat(4,minmax(130px,1fr));gap:8px;margin:10px 0}.pf-pro-audit-summary span{display:grid;gap:4px;padding:10px;border:1px solid #dfd5b7;background:#fffaf0;border-radius:8px;font-size:8px;text-transform:uppercase;font-weight:850;color:#806a37}.pf-pro-audit-summary b{font-size:14px;color:#513d12;text-transform:none}
.pf-pro-maaser-audit,.pf-pro-receipt-vault{margin-top:12px}.pf-pro-view-in-history{margin-right:5px!important}
.pf-pro-bill-fields{display:grid;grid-template-columns:repeat(3,minmax(150px,1fr));gap:8px}.pf-pro-bill-workbench{display:grid;grid-template-columns:minmax(380px,.9fr) minmax(500px,1.1fr);gap:10px;min-height:70vh}.pf-pro-bill-workbench .pf-pro-source-view{height:70vh}

@media(max-width:1250px){
 .pf-pro-workbench,.pf-pro-bill-workbench{grid-template-columns:minmax(360px,.8fr) minmax(520px,1.2fr)}
 .pf-pro-financial-intelligence{grid-template-columns:repeat(2,1fr)}
 .pf-pro-match-card{grid-template-columns:1fr 1fr}.pf-pro-match-actions{grid-column:1/-1}
}
@media(max-width:900px){
 #personalFinance .pf-pro-page-intro{display:grid}
 .pf-pro-import-modal .modalbox{width:100vw!important;max-width:100vw!important;height:100vh;max-height:100vh!important;border-radius:0!important}
 .pf-pro-import-modal .modalhead{height:54px}
 .pf-pro-import-modal #modalBody{height:calc(100% - 54px)}
 .pf-pro-import-head{min-height:70px}.pf-pro-import-head+.pf-pro-workbench{height:calc(100% - 70px)}
 .pf-pro-workbench,.pf-pro-bill-workbench{grid-template-columns:1fr;overflow:auto;height:100%;padding:8px}
 .pf-pro-source-pane{min-height:44vh}.pf-pro-source-view{height:44vh;flex:none}.pf-pro-source-view iframe{min-height:44vh}.pf-pro-image-stage{min-height:44vh}
 .pf-pro-review-pane{overflow:visible}.pf-pro-import-table{max-height:48vh}
 .pf-pro-plan-grid{grid-template-columns:1fr}.pf-pro-bill-fields{grid-template-columns:1fr 1fr}
 .pf-pro-statement-summary,.pf-pro-recon-result,.pf-pro-audit-summary{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:600px){
 .pf-pro-import-head{display:grid;gap:7px}.pf-pro-import-metrics{display:grid!important;grid-template-columns:repeat(3,1fr)}.pf-pro-import-metrics>span{min-width:0;text-align:left}
 .pf-pro-import-head+.pf-pro-workbench{height:calc(100% - 102px)}
 .pf-pro-oneclick{display:grid;grid-template-columns:1fr 1fr}.pf-pro-oneclick:before{grid-column:1/-1}.pf-pro-oneclick button{width:100%}
 .pf-pro-match-card{grid-template-columns:1fr}.pf-pro-match-actions{display:grid!important;grid-template-columns:1fr 1fr}
 .pf-pro-savebar{display:grid}.pf-pro-savebar .toolbar{display:grid;grid-template-columns:1fr 1fr;width:100%}.pf-pro-savebar button{width:100%}
 .pf-pro-financial-intelligence{grid-template-columns:1fr 1fr}.pf-pro-financial-intelligence b{font-size:15px}
 .pf-pro-month-close{display:grid}.pf-pro-month-close .toolbar{display:grid;grid-template-columns:1fr 1fr}.pf-pro-month-close button:first-child{grid-column:1/-1}
 .pf-pro-statement-summary,.pf-pro-reconcile-grid,.pf-pro-recon-result,.pf-pro-audit-summary{grid-template-columns:1fr 1fr}
 .pf-pro-bill-fields{grid-template-columns:1fr}
}
@media(max-width:420px){
 .pf-pro-financial-intelligence,.pf-pro-statement-summary,.pf-pro-reconcile-grid,.pf-pro-recon-result,.pf-pro-audit-summary{grid-template-columns:1fr}
 .pf-pro-import-metrics{grid-template-columns:1fr 1fr}.pf-pro-import-metrics>span:first-child{grid-column:1/-1}
 .pf-pro-source-pane{min-height:38vh}.pf-pro-source-view{height:38vh}.pf-pro-source-view iframe,.pf-pro-image-stage{min-height:38vh}
}
@media print{
 .pf-pro-month-close,.pf-pro-oneclick,.pf-pro-savebar,.pf-pro-page-intro button,.pf-pro-pane-head .toolbar{display:none!important}
 .pf-pro-financial-intelligence{grid-template-columns:repeat(4,1fr)}
 .pf-pro-audit-summary{grid-template-columns:repeat(4,1fr)}
 .pf-pro-workbench{display:block;height:auto;padding:0}.pf-pro-source-pane{page-break-after:always}.pf-pro-source-view{height:auto;min-height:800px}
}

/* Modal lives outside #personalFinance, so repeat the professional tokens here. */
#modal.pf-pro-import-modal{--pf-navy:#12395b;--pf-navy-2:#0b2944;--pf-blue:#256b9b;--pf-sky:#eaf4fb;--pf-gold:#a9791d;--pf-green:#147a55;--pf-red:#b42318;--pf-ink:#162536;--pf-muted:#66788a;--pf-line:#d8e3ec;--pf-soft:#f5f8fb;z-index:10050!important}
.pf-pro-goal-track i{display:block;height:100%;background:linear-gradient(90deg,#2978a8,#55a48a);border-radius:99px}
.pf-pro-money-plan .pf-pro-plan-grid>div{display:grid;gap:4px;padding:11px;border:1px solid var(--pf-line);border-radius:9px;background:var(--pf-soft)}
.pf-pro-money-plan .pf-pro-plan-grid>div small{font-size:8px;text-transform:uppercase;letter-spacing:.07em;font-weight:900;color:var(--pf-muted)}
.pf-pro-money-plan .pf-pro-plan-grid>div strong{font-size:17px;color:var(--pf-navy)}
.pf-pro-money-plan .pf-pro-plan-grid>div span{font-size:9px;line-height:1.4;color:var(--pf-muted)}
.pf-pro-money-plan .pf-pro-plan-grid>div.ready{border-color:#b9dbc9;background:#f2fbf6}.pf-pro-money-plan .pf-pro-plan-grid>div.ready strong{color:var(--pf-green)}
.pf-pro-money-plan .pf-pro-plan-grid>div.over{border-color:#e5c0bc;background:#fff5f3}.pf-pro-money-plan .pf-pro-plan-grid>div.over strong{color:var(--pf-red)}
#modal.pf-pro-import-modal .modalhead{background:linear-gradient(90deg,#0b2944,#12395b)!important;color:#fff!important}
#modal.pf-pro-import-modal .modalhead h2{color:#fff!important}
#modal.pf-pro-import-modal .modalhead::after{display:none!important}
#modal.pf-pro-import-modal .modalhead>button{background:#ffffff18!important;color:#fff!important;border:1px solid #ffffff2b!important}

/* V38.46 Smart Statement & Bill Intelligence */
.pf3837-source-loading{display:grid;place-items:center;min-height:420px;padding:30px;color:#41566b;font-weight:800;background:linear-gradient(135deg,#f8fbfd,#e8eff5)}
.pf3837-pdf-viewer{display:grid;gap:18px;padding:14px;background:#cfd8df;min-width:max-content}
.pf3837-pdf-page{position:relative;margin:0 auto;background:#fff;box-shadow:0 5px 22px rgba(16,39,63,.25);line-height:0}
.pf3837-pdf-page canvas{display:block;max-width:none}
.pf3837-pdf-overlay,.pf3837-image-overlay{position:absolute;inset:0;pointer-events:none}
.pf3837-source-line{position:absolute!important;display:block!important;min-width:2px!important;min-height:3px!important;padding:0!important;margin:0!important;border:0!important;border-radius:2px!important;background:transparent!important;box-shadow:none!important;opacity:0;pointer-events:none!important;transition:background .15s ease,opacity .15s ease,box-shadow .15s ease}
.pf3837-source-line.pf3837-source-highlight{opacity:1;background:rgba(255,215,64,.48)!important;box-shadow:0 0 0 2px rgba(213,132,0,.82),0 0 14px rgba(255,184,0,.7)!important;animation:pf3837Pulse 1.2s ease 2}
@keyframes pf3837Pulse{0%,100%{filter:none}50%{filter:brightness(1.13)}}
.pf3837-sheet{height:100%;overflow:auto;background:#fff}.pf3837-sheet table{border-collapse:collapse;min-width:100%;font-size:11px}.pf3837-sheet th,.pf3837-sheet td{padding:7px 9px;border:1px solid #dce5ec;white-space:nowrap}.pf3837-sheet th{position:sticky;top:0;background:#e9f0f5;z-index:2}.pf3837-sheet tr.pf3837-source-highlight{background:#fff4b8!important;outline:3px solid #d58b00;outline-offset:-3px}
.pf3837-text-viewer{height:100%;overflow:auto;background:#fff;font:11px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace;padding:10px}.pf3837-text-viewer>div{display:grid;grid-template-columns:44px 1fr;gap:8px;padding:2px 5px;border-radius:3px}.pf3837-text-viewer>div>span{color:#91a0ae;text-align:right;user-select:none}.pf3837-text-viewer code{white-space:pre-wrap;word-break:break-word;color:#27394a}.pf3837-text-viewer>div.pf3837-source-highlight{background:#fff0a8;outline:2px solid #d58b00}
.pf3837-image-viewer{position:relative;display:inline-block;min-width:100%;line-height:0;background:#dce4ea}.pf3837-image-viewer img{display:block;max-width:100%;height:auto;margin:auto}.pf3837-image-viewer .pf3837-image-overlay{width:100%;height:100%}
.pf3837-facts{margin:0 10px 10px;border:1px solid #cbdbe7;border-radius:9px;background:#fff;overflow:hidden;flex:0 0 auto}.pf3837-facts>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;background:#edf4f8;color:#17344f;font-weight:900;cursor:pointer}.pf3837-facts>summary span{font-size:9px;color:#657b8f;text-transform:uppercase;letter-spacing:.05em}.pf3837-facts-grid{display:grid;grid-template-columns:repeat(4,minmax(145px,1fr));gap:8px;padding:10px}.pf3837-facts-grid label{display:grid;gap:4px;padding:7px;border:1px solid #dce6ed;border-radius:7px;background:#fafcfd;min-width:0}.pf3837-facts-grid label>span{display:flex;align-items:center;justify-content:space-between;gap:5px;font-size:9px;font-weight:850;color:#3a5369;text-transform:uppercase;letter-spacing:.03em}.pf3837-facts-grid label>span button{height:20px!important;min-height:20px!important;padding:1px 5px!important;font-size:8px!important;background:#fff9df!important;border-color:#e4c773!important;color:#76540b!important}.pf3837-facts-grid input{height:31px!important;min-height:31px!important;font-size:11px!important;padding:5px 7px!important}.pf3837-facts-grid small{font-size:8px;color:#75889a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pf3837-facts-grid .pf3837-missing{border-style:dashed;background:#fcfcfc}.pf3837-confidence-note{padding:8px 11px;border-top:1px solid #e1e9ef;background:#fffaf0;color:#6e5421;font-size:9px}.pf3837-match-card{border-top:3px solid #dfaa2f}.pf3837-match-card>div:nth-child(2){min-width:220px}.pf-pro-import-table tr.pf-pro-focused{outline:3px solid #1680bf!important;outline-offset:-3px!important;background:#dff2ff!important;box-shadow:inset 5px 0 0 #1680bf}.pf-pro-import-table tr.pf-pro-focused td{border-top-color:#75b7df!important;border-bottom-color:#75b7df!important}
@media(max-width:1300px){.pf3837-facts-grid{grid-template-columns:repeat(3,minmax(140px,1fr))}}
@media(max-width:900px){.pf3837-facts-grid{grid-template-columns:repeat(2,minmax(135px,1fr))}.pf3837-pdf-viewer{padding:8px}.pf3837-source-loading{min-height:300px}}
@media(max-width:520px){.pf3837-facts-grid{grid-template-columns:1fr}.pf3837-facts>summary{align-items:flex-start}.pf3837-match-card{display:grid!important}.pf3837-match-card>div{min-width:0!important}}
/* V38.46 strict amount validation */
.pf3837-amount-audit{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:8px 10px;padding:9px 11px;border-radius:8px;border:1px solid;font-size:10px;line-height:1.35}
.pf3837-amount-audit b{font-size:11px}.pf3837-amount-audit span{display:inline-flex;align-items:center;gap:4px}
.pf3837-amount-audit.ok{background:#eefaf3;border-color:#a9d7bd;color:#155e3d}.pf3837-amount-audit.warning{background:#fff9e8;border-color:#e4cb7b;color:#6d5311}.pf3837-amount-audit.error{background:#fff0ef;border-color:#e5aaa4;color:#8e2119}
@media(max-width:600px){.pf3837-amount-audit{display:grid;gap:5px}}
