/* V20.1 Jenny Payment Tracking only. All styles scoped to #finance. */
#finance{min-width:0;--fin-region:84px;--fin-textbook:198px;--fin-line:#e8eaf2;--fin-ink:#2b3248;--fin-muted:#8791a4}
#finance *{box-sizing:border-box}
#finance .fin-top{display:flex;justify-content:space-between;align-items:start;gap:12px;margin-bottom:15px}
#finance .fin-eyebrow{font-size:9px;font-weight:900;letter-spacing:.7px;color:#7a6cc5}
#finance h2{font-size:25px;letter-spacing:-.5px;margin:4px 0 5px;color:var(--fin-ink)}
#finance .fin-caption{font-size:10px;color:var(--fin-muted);line-height:1.5}
#finance .fin-top-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:end}
#finance .fin-button{font-size:11px;padding:9px 12px;border-radius:8px;white-space:nowrap}
#finance .fin-small{font-size:10px;padding:6px 9px;border-radius:7px}
#finance .fin-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:14px}
#finance .fin-kpi{border:1px solid var(--fin-line);background:white;border-radius:11px;padding:13px;min-width:0}
#finance .fin-kpi small{display:block;font-size:10px;color:#8a93a5;margin-bottom:4px;font-weight:700}
#finance .fin-kpi strong{font-size:18px;color:#30364d;font-weight:850;white-space:nowrap;display:block;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums}
#finance .fin-kpi-balance strong{color:#bb7535}
#finance .fin-kpi .fin-caption{margin-top:4px}
#finance .fin-panel{background:white;border:1px solid var(--fin-line);border-radius:13px;overflow:visible;box-shadow:0 5px 16px rgba(39,37,68,.03)}
#finance .fin-panel-head{padding:14px 15px;display:flex;justify-content:space-between;align-items:center;gap:10px;border-bottom:1px solid #f0f1f5}
#finance .fin-panel-head b{font-size:14px;color:#353a54}
#finance .fin-filters{display:grid;grid-template-columns:minmax(100px,1.05fr) minmax(92px,.85fr) minmax(164px,1.2fr) minmax(110px,.87fr) minmax(164px,1.35fr) auto;gap:8px;padding:9px 13px 10px;align-items:end}
#finance .fin-filter-field{min-width:0}
#finance .fin-filter-field>label{display:block;font-size:9px;font-weight:850;letter-spacing:.4px;color:#8a92a7;margin-bottom:4px}
#finance .fin-filter-field select,#finance .fin-filter-field input{width:100%;min-width:0;padding:8px 9px;min-height:34px;font-size:11px;border-radius:8px}
#finance .fin-book-details{position:relative}
#finance .fin-book-details summary{height:34px;border:1px solid #dfe3eb;border-radius:8px;padding:9px;color:#5c6478;font-size:11px;cursor:pointer;list-style:none;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;background:white}
#finance .fin-book-details summary::-webkit-details-marker{display:none}
#finance .fin-book-options{position:absolute;z-index:35;left:0;top:37px;background:white;border:1px solid #ddd9f3;border-radius:9px;box-shadow:0 12px 28px #30285824;padding:5px;min-width:205px;width:max-content;max-width:min(280px,calc(100vw - 40px));max-height:240px;overflow:auto}
#finance .fin-book-options label{display:flex;gap:9px;align-items:center;font-size:11px;color:#414b61;padding:5px 7px;cursor:pointer;white-space:nowrap;line-height:1.25}
#finance .fin-book-options input[type=checkbox]{appearance:auto;accent-color:var(--primary);width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;flex:0 0 16px;margin:0;padding:0;vertical-align:middle}
#finance .fin-reset-button{min-height:34px;padding:7px 10px;white-space:nowrap;align-self:end}
#finance .fin-search{width:100%;min-height:34px;padding:8px 10px;font-size:11px}
#finance .fin-toolbar{background:#fcfcff;border-top:1px solid #f0f1f5;border-bottom:1px solid #f0f1f5;padding:7px 13px;display:flex;align-items:center;justify-content:space-between;gap:8px;color:#8991a5;font-size:10px}
#finance .fin-freeze-hint{color:#6855bb;font-weight:750;text-align:end}
#finance .fin-scroll{overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;position:relative;height:auto;max-height:min(61vh,540px);min-height:0;-webkit-overflow-scrolling:touch;background:white}
#finance .fin-table{min-width:1230px;width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed;background:white;font-size:11px}
#finance .fin-table th,#finance .fin-table td{padding:8px 10px;border-right:1px solid #eceef4;border-bottom:1px solid #eceef4;min-height:46px;height:49px;vertical-align:middle;white-space:nowrap;background:white;text-align:left}
#finance .fin-table th{position:sticky;top:0;z-index:10;background:#f7f8fc;color:#7b869b;height:42px;font-size:10px;font-weight:850}
#finance .fin-table .fin-region{width:var(--fin-region);min-width:var(--fin-region);max-width:var(--fin-region);position:sticky;left:0;z-index:7;background:#fcfbff}
#finance .fin-table .fin-textbook{width:var(--fin-textbook);min-width:var(--fin-textbook);max-width:var(--fin-textbook);position:sticky;left:var(--fin-region);z-index:6;background:#fcfbff;box-shadow:5px 0 9px -7px #24223f80}
#finance .fin-table thead .fin-region{z-index:23;background:#eeeaff;color:#5c50b6}
#finance .fin-table thead .fin-textbook{z-index:22;background:#eeeaff;color:#5c50b6}
#finance .fin-row{cursor:pointer}
#finance .fin-row:hover td,#finance .fin-row:hover .fin-region,#finance .fin-row:hover .fin-textbook{background:#faf9ff}
#finance .fin-row.fin-open td,#finance .fin-row.fin-open .fin-region,#finance .fin-row.fin-open .fin-textbook{background:#f4f1ff}
#finance .fin-code{font-weight:850;color:#303953}
#finance .fin-book-tag{background:#f1eeff;color:#6554bf;border-radius:5px;padding:4px 6px;font-weight:800;font-size:10px;display:block;white-space:normal;overflow-wrap:anywhere;line-height:1.45;max-width:100%}
#finance .fin-region-label{font-weight:850;color:#333c58;font-size:12px}
#finance .fin-smallmute{display:block;font-size:9px;color:#a3a9b8;margin-top:2px}
#finance .fin-chevron{display:inline-block;margin-right:6px;color:#9186c7;font-weight:900}
#finance .fin-row.fin-open .fin-chevron{transform:rotate(90deg)}
#finance .fin-num{font-weight:700;font-variant-numeric:tabular-nums}
#finance .fin-due{color:#b47438;font-weight:850}
#finance .fin-pill{display:inline-block;padding:4px 8px;border-radius:99px;font-weight:850;font-size:9px}
#finance .fin-pill-PAID{background:#e8f8ed;color:#288058}
#finance .fin-pill-PARTIAL{background:#fff2df;color:#a5752e}
#finance .fin-pill-UNPAID{background:#f1f2f6;color:#848c9f}
#finance .fin-sort{font:inherit;background:none;border:0;padding:0;white-space:nowrap;color:inherit;font-weight:850}
#finance .fin-sort:hover{color:var(--primary)}
#finance .fin-expanded>td{white-space:normal;padding:0!important;background:#f6f5fb}
#finance .fin-detail-anchor{position:sticky;left:0;padding:9px 12px;width:var(--fin-visible-width,680px);max-width:none}
#finance .fin-detail{border:1px solid #e0ddef;background:#fff;border-radius:10px;padding:14px;min-width:0}
#finance .fin-detail-head{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:13px}
#finance .fin-detail-head b{font-size:13px}
#finance .fin-detail-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
#finance .fin-facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
#finance .fin-fact{background:#fafafd;border:1px solid #eff0f6;padding:9px;border-radius:8px;min-width:0}
#finance .fin-fact small{font-size:9px;color:#929bad;display:block;margin-bottom:4px}
#finance .fin-fact b{display:block;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums}
#finance .fin-progress{height:5px;border-radius:99px;background:#eceaf4;overflow:hidden;margin-top:12px}
#finance .fin-progress-bar{height:100%;background:var(--primary)}
#finance .fin-progress-caption{display:flex;justify-content:space-between;color:#9ca2b1;font-size:9px;margin:6px 0 12px}
#finance .fin-pay-panel{border-top:1px solid #eeeef5;padding:13px 0 2px}
#finance .fin-pay-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:10px;font-size:11px}
#finance .fin-empty-pay{border:1px dashed #e1dff0;background:#fbfbfd;border-radius:8px;text-align:center;padding:18px 10px;font-size:11px;color:#9299ad}
#finance .fin-bottom{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 14px;background:#fafbfe;border-top:1px solid #edeef4;color:#99a0af;font-size:9px;flex-wrap:wrap}
#finance .fin-error{padding:13px;background:#fff5eb;color:#9b5720;border:1px solid #f3d8bb;border-radius:9px;font-size:11px;margin-bottom:13px}
#finance .fin-form-back{position:fixed;inset:0;z-index:90;background:#1517308c;display:grid;place-items:center;padding:14px;overflow:auto}
#finance .fin-form-dialog{background:white;border-radius:14px;width:min(570px,100%);max-height:min(92vh,900px);overflow:auto;box-shadow:0 22px 70px #1517304d}
#finance .fin-form-header{padding:15px 18px;border-bottom:1px solid #ecedf4;display:flex;justify-content:space-between;align-items:start;gap:12px}
#finance .fin-form-header b{font-size:16px}
#finance .fin-form-content{padding:16px 18px}
#finance .fin-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
#finance .fin-form-field{min-width:0;display:block}
#finance .fin-form-field.fin-wide{grid-column:1/-1}
#finance .fin-form-field>label{display:block;color:#626d85;font-size:10px;font-weight:850;margin-bottom:5px}
#finance .fin-form-field input:not([type=checkbox]),#finance .fin-form-field select,#finance .fin-form-field textarea{width:100%;max-width:100%;min-width:0;border:1px solid #dfe3ee;border-radius:8px;background:white;font-size:12px;padding:10px;color:#35405a}
#finance .fin-form-field textarea{min-height:68px;resize:vertical}
#finance .fin-choice-row{display:flex;align-items:center;gap:6px}
#finance .fin-choice-row select{flex:1}
#finance .fin-choice-row .btn{flex:0 0 auto}
#finance .fin-subject-list{display:flex;gap:7px;flex-wrap:wrap}
#finance .fin-subject-list label{display:inline-flex;align-items:center;gap:6px;border-radius:7px;background:#f5f3fd;padding:8px;font-size:11px;color:#4c5470}
#finance .fin-subject-list input{accent-color:var(--primary)}
#finance .fin-custom-row{display:flex;align-items:center;gap:6px;margin-top:8px}
#finance .fin-custom-row input{min-width:0;flex:1}
#finance .fin-form-footer{padding:12px 18px 16px;display:flex;justify-content:flex-end;gap:8px;border-top:1px solid #f0f1f6}
#finance .fin-inline-error{font-size:11px;color:#bd4f51;margin:8px 0 0}
#finance .fin-csv{white-space:nowrap}
#finance .fin-delete-button{color:#a83d44;border-color:#f0d1d3;white-space:nowrap}
#finance .fin-delete-button:hover{background:#fff2f2;color:#8c232b}
#finance .fin-spinner{font-weight:800;color:#7e6bc7}
@media(max-width:1200px){#finance .fin-filters{grid-template-columns:repeat(4,minmax(0,1fr))}#finance .fin-search-field{grid-column:span 3}}
@media(max-width:940px){#finance .fin-filters{grid-template-columns:repeat(2,minmax(0,1fr))}#finance .fin-search-field{grid-column:span 1}#finance .fin-facts{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){
 #finance{--fin-region:64px;--fin-textbook:165px}
 #finance h2{font-size:20px}
 #finance .fin-top{align-items:center}
 #finance .fin-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
 #finance .fin-kpi{padding:10px}
 #finance .fin-kpi strong{font-size:17px}
 #finance .fin-panel-head{padding:11px}
 #finance .fin-filters{gap:8px;padding:9px 10px}
 #finance .fin-search-field{grid-column:span 2}
 #finance .fin-toolbar{padding:9px 8px}
 #finance .fin-scroll{height:auto;max-height:55vh;min-height:0}
 #finance .fin-table th,#finance .fin-table td{padding:8px 6px;height:45px}
 #finance .fin-table thead th{font-size:9px;height:41px}
 #finance .fin-region-label{font-size:11px}
 #finance .fin-book-tag{font-size:9px}
 #finance .fin-detail-anchor{padding:7px}
 #finance .fin-detail{padding:10px}
 #finance .fin-fact{padding:8px}
 #finance .fin-fact b{font-size:11px}
 #finance .fin-form-grid{grid-template-columns:1fr}
 #finance .fin-form-field.fin-wide{grid-column:auto}
 #finance .fin-form-content{padding:12px}
 #finance .fin-form-footer{padding:10px 12px}
}
