/* Baloot 31.23: complete shared visual system, independent of legacy palettes. */
:root,:root[data-theme="emerald"]{--theme-bg:#edf8f3;--theme-surface:#fff;--theme-primary:#059669;--theme-primary-soft:#dff7eb;--theme-sidebar:#063d35;--theme-sidebar-active:#087b5e;--theme-accent:#6ee7b7;--theme-border:#cfe7dc;--theme-text:#113e34;--theme-muted:#5b7c70;--canvas-glow:#b6efd5;--hero-start:#064e3b;--hero-end:#059669}
:root[data-theme="classic"]{--theme-bg:#eef4ff;--theme-surface:#fff;--theme-primary:#2563eb;--theme-primary-soft:#e2ecff;--theme-sidebar:#142a54;--theme-sidebar-active:#22447d;--theme-accent:#93c5fd;--theme-border:#d4e1f5;--theme-text:#172c50;--theme-muted:#617494;--canvas-glow:#c7dcff;--hero-start:#183b78;--hero-end:#2563eb}
:root[data-theme="earthy"]{--theme-bg:#f2f0e5;--theme-surface:#fffdf6;--theme-primary:#52734c;--theme-primary-soft:#e6eddf;--theme-sidebar:#293d2a;--theme-sidebar-active:#4c6645;--theme-accent:#d9c58e;--theme-border:#dedfc9;--theme-text:#30402d;--theme-muted:#7a8069;--canvas-glow:#dbe6c7;--hero-start:#304c31;--hero-end:#6f8d52}
:root[data-theme="sunset"]{--theme-bg:#fff0f0;--theme-surface:#fffafb;--theme-primary:#c85772;--theme-primary-soft:#ffe2e7;--theme-sidebar:#4e2239;--theme-sidebar-active:#873e5f;--theme-accent:#f9b6c3;--theme-border:#f1d5dc;--theme-text:#552839;--theme-muted:#966b79;--canvas-glow:#ffd5c6;--hero-start:#772d52;--hero-end:#d87673}
:root[data-theme="midnight"]{--theme-bg:#0d1724;--theme-surface:#172638;--theme-primary:#34d399;--theme-primary-soft:#163c38;--theme-sidebar:#08121e;--theme-sidebar-active:#153d3a;--theme-accent:#6ee7b7;--theme-border:#2a4053;--theme-text:#e4f4ed;--theme-muted:#a0bbba;--canvas-glow:#0c4038;--hero-start:#102b36;--hero-end:#126b58}
:root[data-theme]{--primary:var(--theme-primary);--card:var(--theme-surface);--bg:var(--theme-bg);--text:var(--theme-text);--muted:var(--theme-muted);--border:var(--theme-border);--ui-radius:22px;--ui-shadow:0 10px 32px #073e3010;--ui-ease:cubic-bezier(.2,.8,.2,1);color-scheme:light}
:root[data-theme="midnight"]{color-scheme:dark}
:root[data-theme] body,:root[data-theme] .app{color:var(--theme-text)!important;background:radial-gradient(ellipse at 8% 0%,var(--canvas-glow),transparent 45%),var(--theme-bg)!important;background-attachment:fixed!important;transition:background-color .3s,color .3s}
:root[data-theme] .enterpriseSidebar{background:linear-gradient(165deg,var(--theme-sidebar),color-mix(in srgb,var(--theme-sidebar) 84%,#000))!important;border-left:1px solid #ffffff14;box-shadow:-10px 0 40px #073e3015;padding-top:24px}
:root[data-theme] .sideLogo{background:linear-gradient(140deg,var(--theme-accent),var(--theme-primary))!important;color:var(--theme-sidebar)!important;border-radius:14px}
:root[data-theme] .sideNav{gap:9px;padding-top:12px}
:root[data-theme] .sideNavBtn{border-radius:14px!important;min-height:48px;font-size:15px!important;color:#e6fff0bc;transition:background .18s,transform .18s}
:root[data-theme] .sideNavBtn:hover{background:#ffffff10!important;color:#fff;transform:translateX(-3px)}
:root[data-theme] .sideNavBtn.active{background:linear-gradient(100deg,var(--theme-sidebar-active),color-mix(in srgb,var(--theme-primary) 55%,var(--theme-sidebar)))!important;box-shadow:inset -3px 0 var(--theme-accent),0 7px 18px #0002!important;color:#fff!important}
:root[data-theme] .sideStatus{border-radius:16px;background:#ffffff08;border-color:#ffffff17;padding:16px}
:root[data-theme] .enterpriseHeader{background:var(--theme-surface)!important;border-bottom:1px solid var(--theme-border)!important;box-shadow:0 4px 18px #103b3008;padding:14px 28px!important;min-height:82px;color:var(--theme-text)!important}
:root[data-theme] .enterpriseHeader h1{color:var(--theme-text)!important;font-weight:800;font-size:22px}
:root[data-theme] .breadcrumb{color:var(--theme-muted)!important;font-size:13px}
:root[data-theme] .tag,:root[data-theme] .userBadge{background:var(--theme-primary-soft)!important;color:var(--theme-text)!important;border:1px solid var(--theme-border);border-radius:12px}
:root[data-theme] .heroPanel{position:relative;overflow:hidden;background:linear-gradient(115deg,var(--hero-start),var(--hero-end))!important;border:1px solid #ffffff1a!important;box-shadow:0 16px 34px #054d3c18!important;border-radius:26px!important;padding:30px 32px!important;min-height:144px;color:#fff!important;margin-bottom:24px}
:root[data-theme] .heroPanel:after{content:"";position:absolute;width:230px;height:230px;border:40px solid #ffffff0c;border-radius:50%;left:-60px;top:-95px;pointer-events:none}
:root[data-theme] .heroPanel h2{color:#fff!important;font-size:clamp(23px,2vw,30px)!important;font-weight:800;letter-spacing:-.4px}
:root[data-theme] .heroPanel p,:root[data-theme] .heroPanel .muted{color:#e7fff3d9!important;font-size:15px!important;line-height:1.9}
:root[data-theme] .card,:root[data-theme] .dashboardWidget,:root[data-theme] .kpi,:root[data-theme] .moduleTile,:root[data-theme] .biPanel,:root[data-theme] .biAdvanced{background:var(--theme-surface)!important;border:1px solid var(--theme-border)!important;border-radius:var(--ui-radius)!important;color:var(--theme-text)!important;box-shadow:var(--ui-shadow)!important;min-width:0;transition:border-color .2s,box-shadow .2s}
:root[data-theme] .card{padding:22px}:root[data-theme] .card h2,:root[data-theme] .card h3,:root[data-theme] .card h4{color:var(--theme-text)!important}
:root[data-theme] .moduleTile{padding:26px!important;min-height:180px!important;border-top:4px solid var(--theme-primary)!important}
:root[data-theme] .moduleTile:hover{box-shadow:0 18px 36px #073e3018!important;border-color:var(--theme-primary)!important;transform:translateY(-4px)}
:root[data-theme] .moduleIcon{background:var(--theme-primary-soft)!important;color:var(--theme-primary)!important;border-radius:16px;min-width:55px;min-height:55px}
:root[data-theme] .moduleTile strong{font-size:21px}:root[data-theme] .moduleTile small,:root[data-theme] .muted{color:var(--theme-muted)!important}
:root[data-theme] button{font-weight:650;border-radius:12px!important;min-height:41px;background:var(--theme-primary-soft);color:var(--theme-text);transition:background .18s,box-shadow .18s,transform .18s}
:root[data-theme] button:hover:not(:disabled){filter:none;box-shadow:0 5px 15px #073e3010}
:root[data-theme] button:active:not(:disabled){transform:scale(.98)}
:root[data-theme] button:disabled{opacity:.5;cursor:not-allowed;box-shadow:none}
:root[data-theme] .primaryBtn,:root[data-theme] #openPeriod,:root[data-theme] #importBtn,:root[data-theme] .finRefreshBtn,:root[data-theme] .loginBtn{background:linear-gradient(125deg,var(--theme-primary),color-mix(in srgb,var(--theme-primary) 70%,var(--hero-start)))!important;color:#fff!important;border:1px solid transparent!important;box-shadow:0 6px 16px color-mix(in srgb,var(--theme-primary) 20%,transparent)!important}
:root[data-theme] .secondaryBtn{background:var(--theme-surface)!important;border:1px solid var(--theme-border)!important;color:var(--theme-primary)!important}
:root[data-theme] input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),:root[data-theme] select,:root[data-theme] textarea{background:color-mix(in srgb,var(--theme-surface) 68%,var(--theme-bg))!important;border:1px solid var(--theme-border)!important;border-radius:12px!important;min-height:45px;color:var(--theme-text)!important;font-size:14px!important;transition:background .18s,border-color .18s,box-shadow .18s}
:root[data-theme] input:focus,:root[data-theme] select:focus,:root[data-theme] textarea:focus{border-color:var(--theme-primary)!important;box-shadow:0 0 0 4px color-mix(in srgb,var(--theme-primary) 14%,transparent)!important;background:var(--theme-surface)!important}
:root[data-theme] input::placeholder,:root[data-theme] textarea::placeholder{color:var(--theme-muted);opacity:.75}
:root[data-theme] button:focus-visible,:root[data-theme] a:focus-visible{outline:3px solid var(--theme-primary);outline-offset:3px}
:root[data-theme] .toolbar label,:root[data-theme] .formgrid label{font-size:14px!important;font-weight:650;color:var(--theme-muted)!important}
:root[data-theme] .tabs,:root[data-theme] .finTabs,:root[data-theme] .sysTabs{gap:7px;padding:7px!important;border-radius:17px!important;background:color-mix(in srgb,var(--theme-surface) 70%,var(--theme-bg))!important;border:1px solid var(--theme-border)!important;margin-bottom:22px}
:root[data-theme] .tabs button,:root[data-theme] .finTab,:root[data-theme] .sysTab{background:transparent!important;color:var(--theme-muted)!important;min-height:44px;padding:10px 16px!important}
:root[data-theme] .tabs button.active,:root[data-theme] .finTab.active,:root[data-theme] .sysTab.active{background:var(--theme-primary)!important;color:var(--theme-surface)!important;box-shadow:0 5px 14px color-mix(in srgb,var(--theme-primary) 20%,transparent)!important}
:root[data-theme] .tableWrap{border:1px solid var(--theme-border);border-radius:16px;scrollbar-width:thin;scrollbar-color:var(--theme-border) transparent}
:root[data-theme] th{background:var(--theme-primary-soft)!important;color:var(--theme-text)!important;font-weight:750;padding:15px 13px!important;border-bottom:1px solid var(--theme-border)!important}
:root[data-theme] td{color:var(--theme-text)!important;border-bottom:1px solid var(--theme-border)!important;padding:13px!important}
:root[data-theme] tbody tr{background:transparent!important;transition:background .15s}:root[data-theme] tbody tr:hover{background:var(--theme-primary-soft)!important}
:root[data-theme] .kpi{position:relative;overflow:hidden;border-bottom:3px solid var(--theme-primary)!important;padding:22px!important}
:root[data-theme] .kpi span{color:var(--theme-muted)!important;font-size:14px!important}:root[data-theme] .kpi b{color:var(--theme-text)!important;font-variant-numeric:tabular-nums;font-size:clamp(22px,2vw,30px)}
:root[data-theme] .kpi.primary{background:linear-gradient(120deg,var(--hero-start),var(--hero-end))!important}:root[data-theme] .kpi.primary b,:root[data-theme] .kpi.primary span{color:#fff!important}
:root[data-theme] .finFilterGroup,:root[data-theme] .finWidgetChooser,:root[data-theme] .permissionGroup,:root[data-theme] .referrerField,:root[data-theme] .statementQuickNav,:root[data-theme] .finQualityKpis>div,:root[data-theme] .raasActionDates span{background:var(--theme-primary-soft)!important;border-color:var(--theme-border)!important;color:var(--theme-text)!important;border-radius:14px!important}
:root[data-theme] .financeRank,:root[data-theme] .finClusterCard,:root[data-theme] .raasActionCard{background:var(--theme-surface)!important;border-color:var(--theme-border)!important;color:var(--theme-text)!important;border-radius:16px!important}
:root[data-theme] .finPanelHead p,:root[data-theme] .finDashMeta,:root[data-theme] .finChartLegend,:root[data-theme] .emptyState{color:var(--theme-muted)!important}
:root[data-theme] .finHorizontalBars strong,:root[data-theme] .finWaterfall strong,:root[data-theme] .finQualityKpis b,:root[data-theme] .financeRank strong{color:var(--theme-text)!important}
:root[data-theme] .modalOverlay{backdrop-filter:blur(8px);background:#061f2c88!important}
:root[data-theme] .activeView{animation:ui-enter .28s ease-out}
@keyframes ui-enter{from{opacity:0;transform:translateY(9px)}to{opacity:1;transform:translateY(0)}}
:root[data-theme] .themeChoice{background:var(--theme-surface)!important;border:2px solid var(--theme-border)!important;padding:16px!important;border-radius:16px!important}
:root[data-theme] .themeChoice.selected{border-color:var(--theme-primary)!important;background:var(--theme-primary-soft)!important}
/* Authoritative layout rules: old responsive grid rules must not override saved spans. */
:root[data-theme] #finDashboardGrid{display:grid!important;grid-template-columns:repeat(12,minmax(0,1fr))!important;gap:22px!important;align-items:start!important;grid-auto-flow:row}
:root[data-theme] #finDashboardGrid>.dashboardWidget{min-width:0!important;width:auto!important;max-width:100%!important;grid-column:span 6;overflow:hidden;container-type:inline-size}
:root[data-theme] #finDashboardGrid>[data-widget="monthly"],:root[data-theme] #finDashboardGrid>[data-widget="clusters"]{grid-column:span 12}
:root[data-theme] .dashboardWidget table{width:100%;min-width:0!important;table-layout:auto}
:root[data-theme] .dashboardWidget td,:root[data-theme] .dashboardWidget th{overflow-wrap:anywhere;white-space:normal}
:root[data-theme] .dashboardWidget .tableWrap{max-width:100%;overflow:auto}
:root[data-theme] .dashboardWidget svg:not(.headerIcon){max-width:100%}
:root[data-theme] .layoutStudio{border:1px solid var(--theme-primary)!important;border-radius:18px!important;box-shadow:0 12px 28px #073e3018;background:var(--theme-surface)!important;padding:17px!important;gap:10px;top:85px;z-index:85}
:root[data-theme] .layoutStudio small{color:var(--theme-muted)!important}
:root[data-theme] #finDashboardGrid.layoutEditing>.dashboardWidget{padding-top:85px!important;outline:2px dashed color-mix(in srgb,var(--theme-primary) 45%,transparent)!important}
:root[data-theme] .layoutEditing .widgetControls{background:var(--theme-primary-soft)!important;border:1px solid var(--theme-border);padding:8px;border-radius:12px;top:12px!important;flex-wrap:wrap}
:root[data-theme] .widgetControls button{background:var(--theme-surface)!important;color:var(--theme-text)!important;border:1px solid var(--theme-border);min-height:32px!important;font-size:12px!important;border-radius:8px!important}
:root[data-theme] [data-act="drag"]{min-width:105px!important;touch-action:none;user-select:none;cursor:grab!important}
:root[data-theme] .widgetResizeHandle{color:var(--theme-primary)!important;background:var(--theme-primary-soft)!important;min-height:32px;z-index:10;touch-action:none}
:root[data-theme] .layoutEditing .finPanelHead,:root[data-theme] .layoutEditing .dashboardCardHead,:root[data-theme] .layoutEditing .coverageRankingHead{cursor:grab;touch-action:none}
:root[data-theme] .widgetDragging{opacity:.3!important;outline:2px solid var(--theme-primary)!important}
:root[data-theme] .widgetDropTarget{outline:3px solid var(--theme-primary)!important;outline-offset:4px;box-shadow:0 0 0 8px var(--theme-primary-soft)!important;border-color:var(--theme-primary)!important;position:relative}
:root[data-theme] .widgetDropTarget:after{content:"رها کنید — جایگزینی و تنظیم اندازه";position:absolute;inset:0;display:grid;place-items:center;background:color-mix(in srgb,var(--theme-primary-soft) 90%,transparent);color:var(--theme-text);font-size:16px;font-weight:800;z-index:30;border:2px dashed var(--theme-primary);border-radius:20px;pointer-events:none}
.layoutDragActive{user-select:none;cursor:grabbing}.layoutDragGhost{position:fixed;top:0;left:0;z-index:10000;pointer-events:none;max-width:300px;padding:16px 22px;border-radius:14px;background:var(--theme-primary);color:#fff;box-shadow:0 16px 40px #073e3040;direction:rtl;font-weight:750}
@container (max-width:500px){.finPanelHead,.coverageRankingHead{flex-wrap:wrap!important;gap:12px!important}.finPanelHead h2{font-size:16px!important}.finHorizontalBars>div{grid-template-columns:minmax(60px,1fr) 2fr auto!important}.finHorizontalBars small{grid-column:1/-1}.finQualityKpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}.widgetControlTitle{display:none!important}}
@media(max-width:980px){:root[data-theme] #finDashboardGrid>.dashboardWidget{grid-column:span 12!important}.enterpriseHeader h1{font-size:18px!important}}
@media(max-width:700px){:root[data-theme] .heroPanel{padding:22px!important;min-height:125px}.heroPanel h2{font-size:23px!important}:root[data-theme] .card{padding:16px}.layoutStudio{top:104px!important}.layoutStudio>div{width:100%}.widgetControlTitle{display:none!important}:root[data-theme] .layoutEditing .widgetResizeHandle{display:block!important}.widgetControls button{padding:4px 6px!important}:root[data-theme] #finDashboardGrid.layoutEditing>.dashboardWidget{padding-top:115px!important}.enterpriseHeader{padding:12px!important}.enterpriseSidebar .sideNav{padding-top:0;gap:3px}.sideNavBtn{min-height:40px!important}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

:root[data-theme] .sideNavBtn{background:transparent!important;color:#e5fff2cc!important;border:0!important;box-shadow:none!important}
:root[data-theme] .sideNavBtn.active{color:#fff!important}
:root[data-theme] .finDashHeader,:root[data-theme] .finDashboardHeader,:root[data-theme] .financeDashboardTools,:root[data-theme] .finDashMeta{background:var(--theme-surface)!important;border-color:var(--theme-border)!important;color:var(--theme-text)!important}
/* Legacy per-page ID backgrounds previously hid the selected canvas theme. */
:root[data-theme] .appView,:root[data-theme] #financeView{background:transparent!important}
:root[data-theme] .financeCommandCenter>.finDashMeta{background:var(--theme-surface)!important;border-color:var(--theme-border)!important;border-radius:22px!important;padding:24px!important;box-shadow:var(--ui-shadow)!important}
:root[data-theme] .financeCommandCenter>.finDashMeta:before{background:linear-gradient(135deg,var(--hero-start),var(--theme-primary))!important;box-shadow:0 5px 14px color-mix(in srgb,var(--theme-primary) 20%,transparent)!important}
:root[data-theme] .finDashMeta b,:root[data-theme] .finDashMeta span{color:var(--theme-text)!important}
:root[data-theme] .financeCommandKpis .kpi{height:auto!important;min-height:128px!important;border-radius:20px!important}
:root[data-theme] .financeCommandKpis .kpi b{font-size:clamp(19px,1.65vw,27px)!important}
:root[data-theme] .financeCommandKpis .kpi:before{background:var(--theme-primary)!important;border-radius:50%}
:root[data-theme] .loginScreen{background:radial-gradient(ellipse at 20% 20%,var(--canvas-glow),transparent 55%),var(--theme-bg)!important}
:root[data-theme] .loginCard{background:var(--theme-surface)!important;border:1px solid var(--theme-border)!important;color:var(--theme-text)!important;border-radius:28px!important;box-shadow:0 24px 60px #073e3020!important}
:root[data-theme] .financeCommandKpis{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:14px!important}
:root[data-theme] .financeCommandCenter .finLayoutGroup{background:var(--theme-primary-soft)!important;border-color:var(--theme-border)!important}
@media(max-width:700px){:root[data-theme] .financeCommandKpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
/* 31.24: accessible eye control, signed behavior and scrollable reports. */
:root[data-theme] .passwordField input{padding-left:58px!important}
:root[data-theme] #toggleLoginPassword{width:42px;min-width:42px;padding:9px!important;display:grid;place-items:center;border:0!important;background:transparent!important;color:var(--theme-primary)!important}
#toggleLoginPassword svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.behaviorValue{white-space:nowrap;font-variant-numeric:tabular-nums}.behaviorEarly{color:var(--theme-primary,#059669)}.behaviorLate{color:#dc5667}
:root[data-theme] #finDashboardGrid>.dashboardWidget{overflow:auto!important}
:root[data-theme] .tableWrap,:root[data-theme] .appTableScroll{max-width:100%;max-height:65vh;overflow:auto!important;overscroll-behavior:auto!important;scrollbar-width:thin;scrollbar-color:var(--theme-primary) var(--theme-primary-soft);border-radius:14px}
:root[data-theme] .chartBox,:root[data-theme] .chartWrap,:root[data-theme] .chartContainer,:root[data-theme] .chartScroll,:root[data-theme] .finHorizontalBars,:root[data-theme] .coverageRankingList{overflow:auto;overscroll-behavior:auto;max-width:100%;scrollbar-width:thin}
:root[data-theme] .tableWrap::-webkit-scrollbar,:root[data-theme] .appTableScroll::-webkit-scrollbar,:root[data-theme] .dashboardWidget::-webkit-scrollbar{width:9px;height:9px}
:root[data-theme] .tableWrap::-webkit-scrollbar-thumb,:root[data-theme] .appTableScroll::-webkit-scrollbar-thumb,:root[data-theme] .dashboardWidget::-webkit-scrollbar-thumb{background:var(--theme-primary);border-radius:9px;border:2px solid var(--theme-surface)}
.weekdayBars{display:grid;gap:7px;margin:16px 0}.weekdayBars button{display:grid;grid-template-columns:75px minmax(70px,1fr) 65px 90px;align-items:center;gap:10px;text-align:right;background:transparent!important;padding:8px}.weekdayBars i{height:14px;overflow:hidden;border-radius:8px;background:var(--theme-primary-soft)}.weekdayBars i b{display:block;height:100%;background:var(--theme-primary);border-radius:8px}.weekdayBars small{color:var(--theme-muted)}
@container (max-width:480px){.weekdayBars button{grid-template-columns:65px minmax(40px,1fr) 60px}.weekdayBars small{grid-column:1/-1;text-align:left}}
.weekdayBars{max-height:340px;overflow:auto;overscroll-behavior:auto;scrollbar-width:thin}
#finInvoiceWeekdays .tableWrap{max-height:350px}
/* v31.26: readable financial exceptions and responsive command toolbar. */
#finFinanceAlerts .accountReviewAlert,#allocationReviewStatement .accountReviewAlert{display:grid!important;grid-template-columns:32px minmax(0,1fr) auto!important;gap:12px!important;align-items:center!important;width:100%!important;min-width:0;padding:16px!important;margin:8px 0!important;text-align:right!important;background:var(--theme-primary-soft)!important;border:1px solid var(--theme-border)!important;border-radius:14px!important;color:var(--theme-text)!important;font:inherit!important;cursor:pointer;white-space:normal!important;transition:box-shadow .18s,transform .18s}#finFinanceAlerts .accountReviewAlert:hover,#allocationReviewStatement .accountReviewAlert:hover{box-shadow:0 5px 16px #00000012;transform:translateY(-1px)}.accountReviewIcon{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:#d897251f;color:#a06b0d;font-weight:800}.accountReviewBody{display:flex!important;flex-direction:column;gap:4px;min-width:0}.accountReviewBody b{font-size:14px!important}.accountReviewBody>span{font-size:12px!important;line-height:1.8!important;white-space:normal!important;overflow-wrap:break-word}.accountReviewBody small{font-size:11px!important;color:var(--theme-muted)!important}.accountReviewAmount{display:flex!important;flex-direction:column;text-align:left;align-items:flex-end;gap:3px;min-width:100px}.accountReviewAmount b{font-size:14px!important;white-space:nowrap!important;direction:ltr}.accountReviewAmount small,.accountReviewAmount>span{font-size:11px!important;white-space:nowrap!important}#finFinanceAlerts{display:flex!important;flex-direction:column!important;gap:6px!important}#finFinanceAlerts>button{width:100%;min-width:0}#allocationReviewStatement{margin:10px 0}.finDashMeta{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:20px!important;flex-wrap:wrap!important}.financeDashboardTools{display:flex!important;gap:12px!important;align-items:center!important;justify-content:flex-end!important;flex:1 1 650px!important;flex-wrap:wrap!important;min-width:0!important}.finFilterGroup,.finLayoutGroup{display:flex!important;flex-wrap:wrap!important;gap:8px!important;width:auto!important;align-items:center!important}.finLayoutGroup{flex:1 1 480px!important;background:transparent!important;padding:0!important}.finFilterGroup label{min-width:125px!important}.finRefreshBtn{flex:0 0 auto!important}.referrerReportIntro{font-size:12px;color:var(--theme-muted);line-height:1.9;margin-bottom:12px}.referrerReportIntro summary{cursor:pointer;font-weight:700;color:var(--theme-primary)}.referrerPerformanceTable{min-width:1000px}.referrerPerformanceTable td small{display:block;font-size:11px;color:var(--theme-muted)}.collectionReportSetup{display:flex;flex-direction:column;align-items:flex-start;gap:15px;max-width:700px}.collectionReportSetup label{min-width:220px}.collectionReportSetup p{line-height:2}.collectionReportSetup small{color:var(--theme-muted)}#collectionReportError{color:#b63f39;line-height:1.8}.asOfTable table{min-width:1150px}.asOfTable .smartTableTools{position:sticky;right:0} @container (max-width:520px){#finFinanceAlerts .accountReviewAlert{grid-template-columns:28px minmax(0,1fr)!important}.accountReviewAmount{grid-column:2;align-items:flex-start;text-align:right}}@media(max-width:700px){.financeDashboardTools{justify-content:flex-start!important}.finFilterGroup{width:100%!important}.finFilterGroup label{flex:1}.finLayoutGroup{flex-basis:100%!important}.finLayoutGroup button{flex:1 1 160px}#allocationReviewStatement .accountReviewAlert{grid-template-columns:28px minmax(0,1fr)!important}#allocationReviewStatement .accountReviewAmount{grid-column:2;align-items:flex-start;text-align:right}}
:root[data-theme] #finDashboardGrid>[data-widget="referrerPerformance"]{grid-column:span 12}:root[data-theme] .dashboardWidget .referrerPerformanceTable{min-width:1050px!important}:root[data-theme] .dashboardWidget .referrerPerformanceTable td,:root[data-theme] .dashboardWidget .referrerPerformanceTable th{white-space:nowrap;overflow-wrap:normal}.referrerPerformanceTable small{white-space:normal}
/* v31.27: fixed-height flex bases must never become vertical empty toolbar space. */
:root[data-theme] .financeCommandCenter>.finDashMeta{display:grid!important;grid-template-columns:minmax(220px,1fr) auto auto!important;align-items:center!important;gap:12px 16px!important;padding:16px 18px!important;min-height:0!important;height:auto!important}
:root[data-theme] .financeCommandCenter>.finDashMeta>.financeDashboardTools{display:contents!important;flex-direction:row!important;flex:none!important;min-height:0!important;height:auto!important}
:root[data-theme] .financeCommandCenter>.finDashMeta>div:first-child{min-height:44px;padding-right:48px;min-width:0}
:root[data-theme] .financeCommandCenter .finFilterGroup{grid-column:2;grid-row:1;display:flex!important;flex-direction:row!important;flex:none!important;align-items:center!important;gap:10px!important;padding:8px 10px!important;min-height:0!important;height:auto!important;width:auto!important;margin:0!important}
:root[data-theme] .financeCommandCenter .finFilterGroup label{min-width:125px;flex:0 1 auto}.financeCommandCenter .finFilterGroup select{width:100%}
:root[data-theme] .financeCommandCenter .finLayoutGroup{grid-column:1/-1;grid-row:2;display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;flex:none!important;gap:8px!important;align-items:center!important;justify-content:flex-start!important;width:100%!important;height:auto!important;min-height:0!important;margin:0!important;padding:12px 0 0!important;background:transparent!important;border:0!important;border-top:1px solid var(--theme-border)!important;box-shadow:none!important}
:root[data-theme] .financeCommandCenter .finLayoutGroup button{flex:0 1 auto!important;min-height:40px;height:auto;margin:0!important}
:root[data-theme] .financeCommandCenter .finRefreshBtn{grid-column:3;grid-row:1;flex:none!important;align-self:center;margin:0!important;min-height:40px}
@media(max-width:850px){:root[data-theme] .financeCommandCenter>.finDashMeta{grid-template-columns:minmax(0,1fr) auto!important}:root[data-theme] .financeCommandCenter>.finDashMeta>div:first-child{grid-column:1/-1;grid-row:1}:root[data-theme] .financeCommandCenter .finFilterGroup{grid-column:1;grid-row:2;width:100%!important}:root[data-theme] .financeCommandCenter .finFilterGroup label{flex:1;min-width:0!important}:root[data-theme] .financeCommandCenter .finFilterGroup select{min-width:0!important}:root[data-theme] .financeCommandCenter .finRefreshBtn{grid-column:2;grid-row:2}:root[data-theme] .financeCommandCenter .finLayoutGroup{grid-row:3}}
@media(max-width:480px){:root[data-theme] .financeCommandCenter>.finDashMeta{grid-template-columns:minmax(0,1fr)!important;padding:14px!important}:root[data-theme] .financeCommandCenter .finFilterGroup{grid-column:1;grid-row:2}:root[data-theme] .financeCommandCenter .finLayoutGroup{grid-column:1;grid-row:3}:root[data-theme] .financeCommandCenter .finLayoutGroup button{flex:1 1 calc(50% - 4px)!important}:root[data-theme] .financeCommandCenter .finRefreshBtn{grid-column:1;grid-row:4;justify-self:end}}
@media(max-width:480px){:root[data-theme] .financeCommandCenter .finLayoutGroup button{min-width:0!important;max-width:100%;white-space:normal!important;line-height:1.6;justify-content:center;text-align:center}}

.collectionInstallmentSetup{border:1px solid #bce2d2;border-radius:12px;padding:16px;margin:12px 0;background:#f4faf7}.collectionInstallmentSetup legend{font-weight:bold;color:#006e50}.collectionInstallmentSetup label{display:block}
#collectionEqualCountLabel[hidden]{display:none!important}
#collectionInvoiceChoices{max-height:240px;overflow:auto;border:1px solid #cce5dc;padding:10px;border-radius:10px}#collectionInvoiceChoices label{display:block;padding:6px}#collectionInvoiceChoices input{width:auto;display:inline-block}.collectionPlanMetrics{display:grid;gap:8px;padding:12px;background:#e9f8f2;border-radius:10px;margin:10px 0}.collectionPlanMetrics small{line-height:1.8}#collectionPreview{margin:15px 0}
.collectionInvoiceRow{display:grid;gap:6px;padding:12px;border-bottom:1px solid #cce5dc}.collectionInvoiceRow label{padding:0!important}.collectionInvoiceRow small{font-size:13px}.collectionDetailOverlay{z-index:20000!important;overflow:auto}.collectionDetailOverlay .invoiceDetailCard{max-width:1100px;margin:30px auto}#collectionSelectionTotal{padding:12px;background:#def4e8;border-radius:8px;margin-bottom:10px}.liquidityCard{margin:18px 0;padding:20px}.liquidityCard header{display:flex;justify-content:space-between;gap:10px}.liquidityMetrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px}.liquidityMetrics article{padding:15px;background:#e9f7f0;border-radius:12px}.liquidityMetrics b{display:block;font-size:22px;margin-top:8px}.liquidityCard label{display:block;margin:12px 0}.liquidityFlow{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}.liquidityFlow input{max-width:200px}.liquidityCard details{margin-top:18px}.liquidityCard td,.liquidityCard th{padding:9px}
/* Customer payment setup: full-width controls and compact invoice grid. */
.invoiceDetailCard:has(.collectionReportSetup){width:min(1320px,96vw)!important;max-width:1320px!important}
.collectionReportSetup{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch!important;gap:14px!important;width:100%!important;max-width:none!important}
.collectionReportSetup>p,.collectionReportSetup>small,.collectionReportSetup>fieldset,.collectionReportSetup>#collectionPreview,.collectionReportSetup>#collectionReportError{grid-column:1/-1}
.collectionReportSetup label{min-width:0!important;width:100%;font-size:13px}.collectionReportSetup label input,.collectionReportSetup label select{width:100%;box-sizing:border-box}.collectionReportSetup>button{align-self:end;justify-self:start}
.collectionInstallmentSetup{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:0!important}.collectionInstallmentSetup>small{grid-column:1/-1;line-height:1.8}.collectionReportSetup p{margin:0;line-height:1.8}
#collectionPreview{margin:4px 0!important;width:100%;min-width:0}#collectionPreview h3{margin:8px 0 12px}
#collectionSelectionTotal{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-bottom:12px;padding:14px 18px}#collectionSelectionTotal span{display:block;color:var(--theme-muted);font-size:12px;margin-bottom:5px}#collectionSelectionTotal b{display:block;font-size:17px;direction:ltr;text-align:right}
#collectionInvoiceChoices{max-height:none!important;padding:0!important;overflow:hidden!important}.collectionSelectionToolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 14px;background:#f5faf8;border-bottom:1px solid #d7e7df}.collectionSelectionToolbar>div{display:flex;gap:8px}.collectionSelectionToolbar>span{font-size:13px;color:var(--theme-muted)}
.collectionInvoiceTableWrap{max-height:420px;overflow:auto}.collectionInvoiceTable{border-collapse:separate;border-spacing:0;width:100%;min-width:970px;font-size:13px}.collectionInvoiceTable th{position:sticky;top:0;z-index:2;background:#e9f4ee;font-size:12px;text-align:right;white-space:nowrap}.collectionInvoiceTable th,.collectionInvoiceTable td{padding:12px 14px;border-bottom:1px solid #e1ebe5;vertical-align:middle}.collectionInvoiceTable tbody tr:nth-child(even){background:#f7faf8}.collectionInvoiceTable tbody tr:hover{background:#edf8f1}.collectionInvoiceTable td:first-child,.collectionInvoiceTable th:first-child{width:50px;text-align:center}.collectionInvoiceTable input[type=checkbox]{width:18px!important;height:18px;accent-color:#00845d;margin:0;cursor:pointer}.collectionInvoiceTable .tableDrillLink{width:auto!important;padding:0!important;background:transparent!important;box-shadow:none!important;border:0!important;border-radius:0!important;text-align:right!important;white-space:nowrap;text-decoration:underline;text-underline-offset:4px}.collectionInvoiceTable .tableDrillLink small{display:block;font-size:10px;text-decoration:none;margin-top:5px}.collectionDate,.collectionMoney{white-space:nowrap;font-variant-numeric:tabular-nums}.collectionMoney{direction:ltr;text-align:right}.collectionCategory{min-width:180px;max-width:310px}.collectionCategory b{font-weight:600}.collectionCategory small{display:block;font-size:11px;line-height:1.8;margin-top:5px}
.collectionPlanMetrics{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px!important;padding:16px!important}.collectionPlanMetrics>small{grid-column:1/-1}.collectionPlanMetrics>b,.collectionPlanMetrics>span{font-size:14px;line-height:1.8}.collectionSuggestBar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:12px}.collectionScheduleWrap{max-height:300px;overflow:auto;margin:10px 0}.collectionScheduleWrap table{width:100%;border-collapse:collapse}.collectionScheduleWrap th,.collectionScheduleWrap td{padding:10px 14px;text-align:right;border-bottom:1px solid #d9e7df}.collectionScheduleWrap th{background:#e9f4ee;position:sticky;top:0}
@media(max-width:850px){.collectionReportSetup,.collectionInstallmentSetup{grid-template-columns:repeat(2,minmax(0,1fr))}.collectionPlanMetrics{grid-template-columns:repeat(2,minmax(0,1fr))}#collectionSelectionTotal{gap:10px;padding:12px}#collectionSelectionTotal b{font-size:14px}}
@media(max-width:540px){.collectionReportSetup,.collectionInstallmentSetup{grid-template-columns:minmax(0,1fr)}#collectionSelectionTotal{grid-template-columns:minmax(0,1fr)}.collectionSelectionToolbar{align-items:flex-start;flex-direction:column}.collectionPlanMetrics{grid-template-columns:minmax(0,1fr)}.collectionInvoiceTableWrap{max-height:360px}}

#rpGroupTable:not(.showHistoryDetails) .groupHistoryDetail{display:none}
