/* Vazirmatn-FD is hosted locally in this Blazor application's wwwroot (no CDN). */
@font-face{font-family:"Vazirmatn";src:url("/fonts/vazirmatn/Vazirmatn-FD-Regular.woff2") format("woff2");font-style:normal;font-weight:400;font-display:swap}
@font-face{font-family:"Vazirmatn";src:url("/fonts/vazirmatn/Vazirmatn-FD-Medium.woff2") format("woff2");font-style:normal;font-weight:500;font-display:swap}
@font-face{font-family:"Vazirmatn";src:url("/fonts/vazirmatn/Vazirmatn-FD-SemiBold.woff2") format("woff2");font-style:normal;font-weight:600;font-display:swap}
@font-face{font-family:"Vazirmatn";src:url("/fonts/vazirmatn/Vazirmatn-FD-Bold.woff2") format("woff2");font-style:normal;font-weight:700 900;font-display:swap}
:root{--ink:#273840;--muted:#6e7b80;--accent:#507f7b;--line:#e2e8e8;--surface:#f5f7f7;--paper:#fff;--dark:#26343a}
*{box-sizing:border-box}body{margin:0;background:var(--surface);color:var(--ink);font-family:Vazirmatn,Tahoma,sans-serif;font-size:14px}button,input,select{font:inherit}a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}
.shell{display:flex;min-height:100vh}.side{width:248px;background:var(--dark);color:#e9f0f0;display:flex;flex-direction:column;padding:18px 11px;flex-shrink:0}.brand{color:#fff;display:flex;gap:10px;align-items:center;padding:5px 12px 22px;font-weight:750;font-size:17px}.brand small{display:block;font-weight:400;color:#b5c3c5;font-size:11px}.brand-mark,.auth-logo{display:grid;place-items:center;background:#d9c396;color:#2e3739;border-radius:11px;width:36px;height:36px;font-weight:900;font-size:21px}
.side nav{display:grid;gap:4px}.side nav a{display:flex;align-items:center;gap:12px;padding:12px 13px;color:#d6e0e0;border-radius:9px;border-right:3px solid transparent}.side nav a:hover,.side nav a.active{color:#fff;background:#3b4b50;border-right-color:#d4bd8c;text-decoration:none}.side-foot{margin-top:auto;padding:20px 13px;color:#aab9bb;font-size:11px}
.workspace{flex:1;min-width:0}.header{height:63px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 24px}.header-title{font-weight:650}.header-actions{display:flex;gap:13px;align-items:center}.header-actions form{margin:0}.content{padding:24px 26px;max-width:1800px;margin:auto}.page-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}h1{font-size:21px;margin:0 0 6px}h2{font-size:16px;margin:0 0 15px}h3{font-size:14px;margin:0}.muted{color:var(--muted);font-size:12px}.page-heading .muted{margin:0}.filters{background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px;display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin-bottom:20px}.filters>div{min-width:190px}.filters .filter-hint{flex:1;color:var(--muted);font-size:12px;min-width:180px;padding:10px 0}label{display:block;font-size:12px;font-weight:550;margin:0 0 7px}select,input,.field{background:#fff;border:1px solid #d9e0e1;border-radius:7px;padding:10px 11px;width:100%;outline:none;color:var(--ink);min-height:40px}input:focus,select:focus{border-color:#7fa8a3;box-shadow:0 0 0 2px #a2c4c13b}.section-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.section-title h2{margin:0}.section-title span{color:var(--muted);font-size:12px}
.report-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.report-card{background:var(--paper);border:1px solid var(--line);border-radius:13px;padding:16px;min-width:0;min-height:280px}.report-head{display:flex;justify-content:space-between;align-items:start;gap:8px;margin-bottom:14px}.report-category{display:inline-block;background:#f3f5f5;color:#617477;padding:3px 7px;border-radius:5px;font-size:10px;margin-top:7px}.report-meta{display:flex;justify-content:space-between;color:var(--muted);font-size:11px;margin-bottom:11px}.report-notice{background:#f9f7f3;border:1px dashed #e5dcc7;padding:24px 13px;text-align:center;border-radius:10px;color:#6b624c}.report-notice span{font-weight:700}.report-notice p{font-size:13px}.report-notice small{display:block;color:#8c806a}.table-shell{max-height:310px;overflow:auto;border:1px solid var(--line);border-radius:7px;scrollbar-width:thin}table{width:100%;border-collapse:collapse;white-space:nowrap;text-align:right;font-size:12px}th,td{padding:9px 11px;border-bottom:1px solid #eff1f1}th{position:sticky;top:0;background:#f6f8f8;font-weight:650}tr:hover td{background:#fafcfc}.pagination{display:flex;align-items:center;justify-content:flex-end;gap:12px;font-size:11px;color:var(--muted);padding-top:9px}.quiet{background:#fff;border:1px solid #dce3e4;border-radius:7px;padding:6px 10px;cursor:pointer;color:var(--ink);font-size:12px}.quiet:hover{border-color:#92aca9}.quiet:disabled{opacity:.4;cursor:default}.primary{background:#527e79;border:0;border-radius:8px;padding:11px 19px;color:white;cursor:pointer;margin-top:12px}.primary:hover{background:#3f6865}.primary:disabled{opacity:.55}.wide{width:100%}.notice{padding:12px 15px;border:1px solid #e2e7e7;background:#fff;border-radius:9px}.error{color:#9b4a40;background:#fff8f7;border-color:#f0d4d0}.skeleton{margin:13px 0;height:35px;background:linear-gradient(110deg,#f1f4f4,#e8eded,#f1f4f4);border-radius:8px}.skeleton.short{width:65%}.chart-wrap{padding:8px 1px 5px}.chart-wrap svg{height:110px;max-width:100%}.chart-caption{text-align:center;color:#7a8688;font-size:10px}
.auth-wrap{display:grid;place-items:center;min-height:calc(100vh - 135px)}.auth-card{background:#fff;border:1px solid var(--line);padding:32px;border-radius:15px;width:min(430px,100%);box-shadow:0 6px 24px #283b3b0d}.auth-logo{margin-bottom:18px}.auth-card h1{font-size:20px}.auth-card form label{margin-top:15px}.auth-help{text-align:center;font-size:12px;margin-top:20px}.two-col{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.panel{background:#fff;border:1px solid var(--line);padding:20px;border-radius:12px;min-width:0}.panel form{display:grid;gap:8px}.panel form label{margin-top:7px}.panel h2:not(:first-child){margin-top:27px}
@media(max-width:1100px){.report-grid{grid-template-columns:1fr}}@media(max-width:750px){.shell{display:block}.side{width:100%;height:auto;padding:9px}.brand{padding:7px;font-size:14px}.side nav{display:flex;overflow-x:auto}.side nav a{white-space:nowrap;padding:9px}.side-foot{display:none}.header{padding:0 13px;height:54px}.content{padding:13px}.two-col{grid-template-columns:1fr}.report-card{padding:12px}.filters>div{flex:1;min-width:140px}}

/* Independent admin access matrix */
.permission-list{display:flex;flex-direction:column;gap:0;max-height:560px;overflow:auto}
.permission-line{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 8px;border-bottom:1px solid var(--line,#e5e7eb)}
.permission-line small{display:block;direction:ltr;text-align:right;color:var(--muted,#6b7280);margin-top:4px}
.permission-line input[type="checkbox"]{width:19px;height:19px;accent-color:#71908a;cursor:pointer}
.row-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:12px 0}


/* 01.02 – analytical dashboard: sales and trade balances, responsive RTL */
.featured-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;align-items:stretch;direction:rtl;margin-bottom:24px}
.featured-report{min-height:0;padding:0;overflow:hidden;border-radius:15px;box-shadow:0 2px 9px #24343c09}
.feature-head{min-height:87px;padding:17px 19px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.feature-heading{display:flex;align-items:center;gap:11px;min-width:0}
.feature-symbol{display:grid;place-items:center;flex-shrink:0;width:43px;height:43px;border-radius:11px;background:#e7f4eb;color:#128044;font-weight:800;font-size:27px}
.feature-heading h3{font-size:17px;font-weight:750;margin:0;line-height:1.7}
.feature-heading p{font-size:12px;color:var(--muted);margin:1px 0 0}
.feature-actions{display:flex;align-items:center;gap:8px}
.feature-actions .quiet{padding:9px 12px;white-space:nowrap}
.feature-refresh{color:#167c50}
.feature-state{min-height:240px;padding:36px 20px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:12px}
.feature-state .notice{max-width:100%}
.feature-state .skeleton{width:80%}.feature-state .skeleton.short{width:48%}
.feature-updated{font-size:10px;color:#8b9799;text-align:left;padding:0 19px 10px;margin:5px 0}
.feature-limit{font-size:11px;color:#866647;background:#fff9ee;padding:10px 14px;margin:12px 18px;border-radius:7px}
.sales-kpis{padding:20px 18px 8px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
.sales-kpi{min-width:0;background:#f5f7f8;border-radius:11px;padding:14px 11px;display:flex;align-items:flex-start;flex-direction:column;gap:5px}
.sales-kpi>span{font-size:11px;color:#667780}
.sales-kpi>strong{font-size:clamp(14px,1.25vw,19px);font-weight:780;max-width:100%;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.sales-kpi>small{font-size:10px;color:#64757b;max-width:100%}
.sales-kpi.kpi-total{background:#eaf8ee}
.sales-kpi.kpi-best{background:#edf8f2}
.sales-kpi.kpi-low{background:#fff1f0}
.sales-chart-heading{display:flex;justify-content:space-between;font-size:11px;color:#687a7c;padding:9px 22px 0}
.sales-chart-scroll{padding:0 18px 7px;overflow-x:auto;scrollbar-width:thin}
.sales-chart{min-width:540px;display:flex;gap:10px;align-items:flex-end;direction:rtl;padding-top:18px}
.sales-column{flex:1;min-width:47px;display:flex;flex-direction:column;align-items:center;gap:10px}
.sales-bar-track{height:218px;width:100%;position:relative;border-bottom:1px solid #dae4e5;background:repeating-linear-gradient(to top,transparent 0,transparent 42px,#e9eeef 43px,#e9eeef 44px)}
.sales-bar{position:absolute;bottom:0;right:18%;width:64%;background:linear-gradient(180deg,#24b971,#8cdeb0);border-radius:7px 7px 0 0;min-height:3px}
.sales-bar.negative{background:linear-gradient(180deg,#e27e79,#f3c4bd)}
.sales-bar-value{position:absolute;right:0;left:0;text-align:center;font-size:10px;color:#2e4546;font-weight:750;white-space:nowrap}
.sales-month{font-size:11px;font-weight:600;color:#566970;white-space:nowrap;min-height:26px}
.sales-recap{margin:16px 18px 12px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:1px solid var(--line);border-radius:9px;overflow:hidden}
.sales-recap>div{display:flex;flex-direction:column;gap:7px;align-items:center;padding:11px 7px;background:#fafbfb;min-width:0}
.sales-recap>div+div{border-right:1px solid var(--line)}
.sales-recap span{font-size:11px;color:#65777d}
.sales-recap strong{font-size:12px;font-weight:750;overflow-wrap:anywhere;text-align:center}
.sales-details{margin:0 18px 14px;max-height:260px}
.sales-details td[dir=ltr]{text-align:right;font-variant-numeric:tabular-nums}
.balance-kpis{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:20px 18px 16px}
.balance-kpi{border-radius:10px;padding:16px;display:flex;flex-direction:column;align-items:flex-start;gap:7px;min-width:0}
.balance-kpi.debtor{background:#e9f8ed}
.balance-kpi.creditor{background:#eef1f3}
.balance-kpi span{font-size:13px;font-weight:700}
.balance-kpi strong{font-size:clamp(16px,1.7vw,24px);font-weight:800;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;max-width:100%}
.balance-kpi small{font-size:11px;color:#5f7378}
.balance-distribution{margin:0 18px 9px;border-radius:6px;background:#e1e6e8;display:flex;direction:rtl;overflow:hidden;height:24px}
.distribution-debt,.distribution-credit{height:100%;display:flex;align-items:center;justify-content:center;overflow:hidden;white-space:nowrap;font-size:10px;font-weight:800}
.distribution-debt{background:#18a866;color:white}
.distribution-credit{background:#9caab2;color:#fff}
.balance-legend{display:flex;gap:20px;justify-content:center;align-items:center;font-size:11px;color:#637376;padding:3px 0 14px}
.legend-square{width:9px;height:9px;border-radius:2px;display:inline-block;margin-left:4px}
.legend-debtor{background:#18a866}.legend-creditor{background:#9caab2}
.balance-tools{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:9px;padding:14px 18px 10px;border-top:1px solid var(--line)}
.balance-search{flex:1;min-width:160px;max-width:420px;min-height:35px;font-size:12px;padding:7px 10px}
.balance-filter{display:flex;gap:3px;background:#f4f6f6;border-radius:8px;padding:3px}
.balance-filter button{cursor:pointer;border:0;background:transparent;border-radius:6px;color:#617074;font-size:11px;padding:6px 8px}
.balance-filter button.active{background:#fff;color:#176b56;box-shadow:0 1px 4px #00000012;font-weight:750}
.balance-table{margin:0 18px;max-height:350px;min-height:0;border-radius:8px}
.balance-table table{font-size:11px}
.balance-table th{background:#f2f5f6;z-index:1}
.balance-table td{white-space:nowrap}
.balance-table .balance-account-name{white-space:normal;min-width:120px}
.balance-table .money-cell{font-weight:700;font-variant-numeric:tabular-nums}
.balance-pill{display:inline-block;font-size:10px;font-weight:700;border-radius:5px;padding:4px 10px}
.balance-pill.is-debtor{background:#e6f8ea;color:#187443}
.balance-pill.is-creditor{background:#fff0ee;color:#af4940}
.balance-empty{text-align:center;padding:20px 8px}
.balance-pager{margin:13px 18px 10px;display:flex;align-items:center;justify-content:space-between;gap:11px;flex-wrap:wrap}
.pager-size,.pager-buttons{display:flex;align-items:center;gap:8px;color:#65777a;font-size:11px}
.pager-size select{min-height:32px;width:66px;font-size:11px;padding:3px 5px}
.pager-buttons .quiet{padding:6px 9px}
.report-secondary-title{margin:4px 0 12px}
@media(max-width:1380px){.featured-grid{grid-template-columns:1fr}.sales-kpi strong{font-size:18px}.balance-kpi strong{font-size:22px}}
@media(max-width:750px){.feature-head{padding:13px}.feature-heading h3{font-size:15px}.feature-heading p{font-size:11px}.sales-kpis{grid-template-columns:repeat(2,minmax(0,1fr));padding:12px}.sales-kpi strong{font-size:15px}.sales-chart-scroll{padding:0 10px}.sales-recap{margin:12px;grid-template-columns:1fr}.sales-recap>div+div{border-right:0;border-top:1px solid var(--line)}.balance-kpis{padding:12px;gap:8px}.balance-kpi{padding:12px}.balance-kpi strong{font-size:15px}.balance-distribution{margin:0 12px 9px}.balance-tools{padding:12px}.balance-table{margin:0 12px}.balance-pager{margin:12px}.feature-updated{padding:0 12px 10px}}

.balance-table.expanded{max-height:520px}.balance-table td[dir=ltr]{font-variant-numeric:tabular-nums;text-align:right}

/* Main dashboard header and non-scrolling navigation. */
html{font-family:"Vazirmatn",Tahoma,sans-serif}
body,button,input,select,textarea{font-family:"Vazirmatn",Tahoma,sans-serif}
.shell{align-items:flex-start}
.side{position:sticky;top:0;height:100vh;min-height:0;align-self:flex-start;overflow:hidden;overscroll-behavior:contain}
.side nav{overflow:visible;min-height:0;align-content:start;gap:2px}
.side nav a{font-size:12px;white-space:normal;padding:10px 11px;min-height:38px}
.side-foot{margin-top:auto}
.workspace{min-height:100vh;align-self:stretch}
.header{position:sticky;top:0;z-index:30;min-height:65px;height:auto;padding:8px 20px;gap:15px;box-shadow:0 1px 3px #1e3b440a}
.header-primary{display:flex;align-items:center;flex:1;min-width:0}
.header-dashboard-filters{display:flex;align-items:end;flex-wrap:wrap;gap:12px}
.header-filter{display:flex;align-items:center;gap:8px}
.header-filter label{white-space:nowrap;margin:0;color:#536b72;font-weight:600}
.header-filter select{width:auto;min-width:160px;max-width:245px;min-height:36px;padding:6px 10px;font-size:12px}
.header-actions{margin-inline-start:auto;flex-shrink:0;gap:11px}
.content{padding:15px 20px}
@media (min-width:751px) and (max-height:530px){
 .side{padding-top:8px;padding-bottom:8px}
 .brand{padding-bottom:9px}
 .side nav a{min-height:32px;padding:5px 9px}
 .side-foot{display:none}
}
@media(max-width:950px){
 .header{padding:8px 12px}
 .header-dashboard-filters{gap:8px}
 .header-filter select{min-width:115px;max-width:185px}
}
@media(max-width:750px){
 .shell{display:block}
 .side{position:relative;top:auto;height:auto;width:100%;overflow:visible;padding:8px 9px}
 .side nav{display:flex;flex-wrap:wrap;gap:4px;overflow:visible}
 .side nav a{font-size:11px;padding:7px 9px;min-height:32px;white-space:normal}
 .header{top:0;flex-wrap:wrap;min-height:55px;padding:8px 10px}
 .header-primary{order:2;flex:1 1 100%}
 .header-actions{order:1;flex:1 1 100%;justify-content:flex-end}
 .header-dashboard-filters{width:100%;gap:8px}
 .header-filter{flex:1;min-width:135px}
 .header-filter select{flex:1;min-width:80px;max-width:none}
 .content{padding:10px 12px}
}


/* 01.03 – sales spans the entire row; interactive four-group balances below. */
.featured-grid{grid-template-columns:minmax(0,1fr);gap:16px}
.featured-grid>.sales-overview{grid-column:1/-1}
.featured-grid>.balances-overview{grid-column:1/-1}
.balances-two-panel{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);direction:rtl;min-width:0;align-items:stretch}
.balance-chart-panel,.balance-detail-panel{min-width:0;padding:18px 18px 12px}
.balance-chart-panel{border-inline-end:1px solid var(--line)}
.balance-chart-panel h4,.balance-detail-panel h4{margin:0 0 12px;font-weight:750;font-size:14px}
.balance-chart-totals{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.balance-total{display:flex;align-items:flex-start;flex-direction:column;gap:5px;padding:11px 13px;border-radius:10px;min-width:0}
.balance-total.debtor{background:#eaf8ef}.balance-total.creditor{background:#f2f4f6}
.balance-total span{font-size:11px;color:#51686a}
.balance-total strong{font-weight:750;font-size:clamp(13px,1.2vw,19px);overflow-wrap:anywhere;max-width:100%;font-variant-numeric:tabular-nums}
.balance-total small{font-size:10px;color:#6d8185}
.balance-four-chart{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:26px 3px 2px;direction:rtl}
.balance-chart-option{min-width:0;cursor:pointer;border:1px solid transparent;border-radius:10px;background:transparent;color:var(--ink);padding:8px 4px;display:flex;flex-direction:column;align-items:stretch;gap:9px;transition:background .15s,border-color .15s}
.balance-chart-option:hover{background:#f4f8f7;border-color:#dde8e5}
.balance-chart-option.selected{background:#edf7f3;border-color:#8bb9aa;box-shadow:inset 0 0 0 1px #8bb9aa}
.balance-chart-option:focus-visible{outline:2px solid #4b9c7b;outline-offset:2px}
.balance-chart-track{height:210px;position:relative;border-bottom:1px solid #dbe4e6;background:repeating-linear-gradient(to top,transparent 0,transparent 41px,#e6edef 42px,#e6edef 43px);display:block;width:100%}
.balance-chart-amount{position:absolute;bottom:83%;left:0;right:0;text-align:center;font-size:10px;color:#33494c;font-weight:750;white-space:nowrap}
.balance-chart-bar{position:absolute;bottom:0;width:68%;right:16%;border-radius:6px 6px 0 0;transition:height .2s ease}
.balance-chart-bar.trade-debt{background:linear-gradient(180deg,#14875f,#4cb88d)}
.balance-chart-bar.other-debt{background:linear-gradient(180deg,#a3b0ba,#c4cbd0)}
.balance-chart-bar.trade-credit{background:linear-gradient(180deg,#168f98,#67c5c2)}
.balance-chart-bar.other-credit{background:linear-gradient(180deg,#626d78,#929da6)}
.balance-chart-option.selected .balance-chart-bar{box-shadow:0 0 0 2px #325b50}
.balance-chart-label{font-size:11px;text-align:center;min-height:37px;line-height:1.7;font-weight:650}
.balance-chart-help{font-size:11px;color:#7f9292;text-align:center;margin:12px 0 0}
.balance-detail-head{display:flex;align-items:start;justify-content:space-between;gap:9px;border-bottom:1px solid var(--line);padding-bottom:11px;margin-bottom:12px}
.balance-detail-head h4{margin-bottom:4px}
.balance-detail-head span{font-size:11px;color:var(--muted)}
.balance-selected-total{display:flex;align-items:end;flex-direction:column;gap:4px}
.balance-selected-total strong{font-size:17px;font-weight:750;white-space:nowrap;font-variant-numeric:tabular-nums}
.balance-selected-total small{font-size:10px;color:var(--muted)}
.balance-detail-search{display:flex;align-items:center;gap:7px;margin-bottom:11px}
.balance-detail-search .balance-search{max-width:none;min-width:0;flex:1}
.balance-group-table{margin:0;max-height:348px;border-radius:8px;overflow:auto;scrollbar-width:thin}
.balance-group-table table{font-size:11px}
.balance-group-table th{background:#f2f5f6}
.balance-group-table td{white-space:nowrap}
.balance-group-table .balance-account-name{white-space:normal;min-width:120px}
.balance-group-table .money-cell{font-weight:700;font-variant-numeric:tabular-nums}
.balance-detail-panel .balance-pager{margin:13px 0 5px}
@media(max-width:1040px){.balances-two-panel{grid-template-columns:minmax(0,1fr)}.balance-chart-panel{border-inline-end:0;border-bottom:1px solid var(--line)}}
@media(max-width:750px){.balance-chart-panel,.balance-detail-panel{padding:12px}.balance-chart-track{height:170px}.balance-chart-label{font-size:10px}.balance-chart-amount{font-size:9px}.balance-four-chart{gap:3px;padding-top:12px}.balance-selected-total strong{font-size:13px}.balance-total strong{font-size:14px}}


/* 01.04 – Stage-by-stage dashboard: returned receivable documents, two compact grids. */
.returned-documents-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));direction:rtl;gap:15px;margin-top:16px;margin-bottom:18px}
.returned-card{display:flex;flex-direction:column;padding:0;overflow:hidden;min-height:0;border-radius:13px;box-shadow:0 2px 10px #24343c08}
.returned-debtor{border-top:3px solid #e68d88}
.returned-creditor{border-top:3px solid #4fba9a}
.returned-head{padding:12px 15px;min-height:69px;display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fcfdfd;border-bottom:1px solid var(--line)}
.returned-head-title{display:flex;align-items:center;gap:11px;min-width:0}
.returned-icon{flex-shrink:0;width:35px;height:35px;border-radius:9px;display:grid;place-items:center;font-size:20px;font-weight:700}
.returned-debtor .returned-icon{background:#fff0ee;color:#bd4f4a}
.returned-creditor .returned-icon{background:#e9f7f0;color:#23775a}
.returned-heading{min-width:0}.returned-heading h3{font-weight:750;font-size:13px;line-height:1.6;margin:0}
.returned-heading p{margin:2px 0 0;font-size:11px;color:var(--muted)}
.returned-head-actions{display:flex;align-items:center;gap:7px;flex-shrink:0}
.returned-status{border-radius:20px;padding:5px 11px;font-size:10px;font-weight:750;white-space:nowrap}
.returned-debtor .returned-status{background:#fff1ef;color:#b45146}
.returned-creditor .returned-status{background:#eaf8f1;color:#237a57}
.returned-reload{padding:5px 9px;min-height:29px;font-size:15px}
.returned-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:10px 15px;border-bottom:1px solid #eef1f0}
.returned-summary>div{min-width:0;display:flex;align-items:center;justify-content:space-between;gap:8px}
.returned-summary span{font-size:10px;color:#687b80}
.returned-summary strong{font-size:12px;white-space:nowrap;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.returned-summary small{font-size:10px;font-weight:400;color:#77898e}
.returned-tools{padding:10px 15px}
.returned-search{min-height:35px;border:1px solid #dae3e3;width:100%;font-size:11px;padding:7px 11px}
.returned-table-shell{overflow:auto;scrollbar-width:thin;max-height:348px;min-height:135px;flex:1;border-top:1px solid #f2e8d9;border-bottom:1px solid var(--line)}
.returned-table{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0;font-size:11px;direction:rtl}
.returned-table th{position:sticky;top:0;z-index:2;background:#ffe1ac;color:#624325;font-weight:750;padding:10px 11px;text-align:right;border-bottom:1px solid #efc784}
.returned-table th:nth-child(1){width:52%}
.returned-table th:nth-child(2){width:23%;text-align:center}
.returned-table th:nth-child(3){width:25%;text-align:left}
.returned-table td{padding:9px 11px;vertical-align:middle;border-bottom:1px solid #e9e9e9;font-size:11px}
.returned-table tbody tr:nth-child(even){background:#fbfbfa}
.returned-table tbody tr:hover{background:#f3f8f6}
.returned-table .returned-name{white-space:normal;overflow-wrap:anywhere;line-height:1.8;color:#40565c}
.returned-table .returned-mobile{text-align:center;white-space:nowrap;font-variant-numeric:tabular-nums;color:#516a75}
.returned-table .returned-money{text-align:left;white-space:nowrap;font-variant-numeric:tabular-nums;font-weight:750;color:#303b42}
.returned-empty{padding:22px;text-align:center;color:var(--muted);font-size:12px}
.returned-placeholder{min-height:230px;padding:28px;display:flex;justify-content:center;align-items:center;flex-direction:column;gap:10px}
.returned-placeholder .notice{max-width:100%}
.returned-placeholder .skeleton{width:80%}
.returned-placeholder .skeleton.short{width:48%}
.returned-placeholder p{margin:0;font-size:11px}
.returned-footer{padding:10px 13px;display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.returned-pagination{display:flex;align-items:center;gap:8px;font-size:10px;color:#64777d}
.returned-pagination button{font-size:10px;padding:5px 9px}
.returned-time{font-size:10px;color:#8b9799}
.returned-card .feature-limit{margin:0 14px 12px;font-size:10px}
@media(max-width:1100px){.returned-documents-grid{grid-template-columns:1fr}}
@media(max-width:750px){.returned-documents-grid{gap:11px;margin-top:12px}.returned-head{padding:10px 12px}.returned-heading h3{font-size:12px}.returned-heading p{font-size:10px}.returned-summary{padding:9px 11px;gap:6px}.returned-summary>div{align-items:start;flex-direction:column;gap:3px}.returned-table td,.returned-table th{padding:8px 6px;font-size:10px}.returned-tools{padding:9px 11px}.returned-footer{padding:9px 11px}.returned-table-shell{max-height:310px}}


/* 01.05 – Independent treasury report panels (cheques received / paid). */
.cheques-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));direction:rtl;gap:15px;margin:16px 0 18px;align-items:stretch}
.cheque-month-card{min-width:0;min-height:0;overflow:hidden;padding:0;border-radius:13px;box-shadow:0 2px 10px #24343c08}
.cheque-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:13px 15px;background:#fcfdfd;border-bottom:1px solid var(--line)}
.cheque-head-title{min-width:0;display:flex;flex-direction:column;gap:2px}
.cheque-head-title h3{font-weight:750;font-size:14px;line-height:1.6;margin:0}
.cheque-head-title small{font-size:10px;color:var(--muted)}
.cheque-head-controls{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.cheque-year-switch{border:1px solid #dbe5e5;border-radius:8px;display:flex;padding:3px;gap:3px;background:#f3f6f6}
.cheque-year-switch button{border:0;background:transparent;padding:7px 10px;font-size:11px;color:#60787a;cursor:pointer;white-space:nowrap;border-radius:6px;min-height:31px}
.cheque-year-switch button.active{background:#fff;color:#246f59;font-weight:750;box-shadow:0 1px 5px #00000013}
.cheque-year-switch button:disabled{opacity:.5;cursor:wait}
.cheque-status-select{width:auto;min-width:130px;max-width:190px;font-size:11px;min-height:36px;padding:6px 9px}
.cheque-refresh{min-width:32px;padding:6px 8px;font-size:16px}
.cheque-kpi-strip{padding:12px 15px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.cheque-kpi-strip>div{min-width:0;background:#f6f8f8;border-radius:9px;display:flex;flex-direction:column;gap:6px;padding:12px 11px}
.cheque-received .cheque-kpi-strip>div:nth-child(2){background:#eaf7f1}
.cheque-paid .cheque-kpi-strip>div:nth-child(2){background:#f0f3f6}
.cheque-kpi-strip span{font-size:10px;color:#687a7f}
.cheque-kpi-strip strong{font-size:clamp(12px,1.2vw,17px);font-weight:750;max-width:100%;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.cheque-kpi-strip strong small{font-weight:450;font-size:10px}
.cheque-chart-heading{display:flex;justify-content:space-between;gap:8px;font-size:10px;color:#7b9094;padding:9px 18px 3px}
.cheque-chart-scroll{overflow-x:auto;scrollbar-width:thin;margin:0 12px;padding:0 3px 10px}
.cheque-chart{min-width:610px;display:flex;align-items:end;gap:6px;direction:rtl;padding-top:14px}
.cheque-chart-month{display:flex;flex:1;min-width:43px;flex-direction:column;align-items:center;gap:6px;cursor:pointer;border:1px solid transparent;border-radius:8px;background:transparent;color:inherit;padding:3px 2px}
.cheque-chart-month:hover,.cheque-chart-month.chosen{background:#f3f8f6;border-color:#c7dbd3}
.cheque-chart-month:focus-visible{outline:2px solid #2c896b;outline-offset:2px}
.cheque-chart-track{height:220px;position:relative;display:block;width:100%;border-bottom:1px solid #dbe5e6;background:repeating-linear-gradient(to top,transparent 0,transparent 42px,#e7eeef 43px,#e7eeef 44px)}
.cheque-bar{position:absolute;right:17%;width:66%;bottom:0;display:block;background:linear-gradient(180deg,#149e73,#7fd1b3);border-radius:5px 5px 0 0;transition:height .22s}
.cheque-paid .cheque-bar{background:linear-gradient(180deg,#3382a0,#8dbdd0)}
.cheque-bar.negative{background:linear-gradient(180deg,#c96862,#efb0ab)}
.cheque-bar-number{position:absolute;left:0;right:0;bottom:4px;text-align:center;color:#3a5155;font-size:9px;font-weight:720;white-space:nowrap;pointer-events:none}
.cheque-month-label{font-size:10px;color:#5f7376;white-space:nowrap;min-height:25px}
.cheque-selected-month{border-top:1px solid var(--line);padding:11px 15px;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:9px;font-size:11px}
.cheque-selected-month>strong{font-size:13px;font-weight:750}
.cheque-last-update{font-size:10px;color:#8e9a9c}
.cheque-no-data{font-size:11px;text-align:center;margin:0 0 10px}
.cheque-state{min-height:280px;display:flex;flex-direction:column;gap:12px;align-items:center;justify-content:center;padding:22px;text-align:center;font-size:12px}
.cheque-state .skeleton{width:75%}.cheque-state .skeleton.short{width:40%}
.cheque-state .notice{max-width:100%}
@media(max-width:1380px){.cheques-grid{grid-template-columns:minmax(0,1fr)}.cheque-month-card{max-width:100%}}
@media(max-width:750px){.cheque-head{padding:11px}.cheque-head-controls{width:100%;justify-content:space-between;gap:5px}.cheque-year-switch button{font-size:10px;padding:6px}.cheque-status-select{min-width:110px;flex:1}.cheque-kpi-strip{padding:10px;gap:6px}.cheque-kpi-strip>div{padding:9px 7px}.cheque-kpi-strip strong{font-size:12px}.cheque-chart-heading{padding:9px 12px 0}.cheque-chart-scroll{margin:0 8px}.cheque-selected-month{padding:10px 12px}}


/* 01.06 – Cash position: readable RTL ranked bars and detailed accounts */
.cash-overview{margin:15px 0 18px;min-width:0;padding:0;overflow:hidden;border-radius:14px}
.cash-head{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;padding:16px 19px;background:#fdfefe;border-bottom:1px solid var(--line)}
.cash-heading h3{font-size:16px;font-weight:750;margin:0;line-height:1.6}
.cash-heading p{font-size:11px;color:var(--muted);margin:3px 0 0}
.cash-head-actions button{padding:8px 11px;font-size:11px}
.cash-state{min-height:225px;display:flex;flex-direction:column;gap:13px;align-items:center;justify-content:center;padding:20px;text-align:center}
.cash-state .skeleton{width:70%}.cash-state .skeleton.short{width:40%}
.cash-state p{margin:0}.cash-state .notice{max-width:100%}
.cash-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;padding:17px 19px}
.cash-kpi{min-width:0;padding:13px 14px;border-radius:10px;background:#f5f7f8;display:flex;flex-direction:column;align-items:flex-start;gap:6px}
.cash-kpi.cash-total{background:#e8f6ee}
.cash-kpi>span{font-size:11px;color:#698080}
.cash-kpi>strong{font-size:clamp(15px,1.65vw,23px);font-variant-numeric:tabular-nums;font-weight:790;max-width:100%;overflow-wrap:anywhere}
.cash-kpi>small{font-size:10px;color:#72868a;max-width:100%;line-height:1.6;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.cash-main{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);direction:rtl;align-items:start;border-top:1px solid var(--line)}
.cash-chart-panel,.cash-detail-panel{min-width:0;padding:18px 19px 17px}
.cash-chart-panel{border-left:1px solid var(--line)}
.cash-panel-title{display:flex;justify-content:space-between;align-items:center;gap:10px;min-height:35px;margin-bottom:13px}
.cash-panel-title h4{font-size:13px;font-weight:750;margin:0}
.cash-panel-title p{font-size:10px;color:var(--muted);margin:3px 0 0}
.cash-panel-title .quiet{white-space:nowrap;padding:7px 9px;font-size:10px}
.cash-account-count{color:#718387;font-size:11px;white-space:nowrap}
.cash-bars{display:flex;flex-direction:column;gap:5px;max-height:540px;overflow-y:auto;scrollbar-width:thin;padding:3px}
.cash-chart-row{width:100%;min-width:0;text-align:right;border:1px solid transparent;background:transparent;border-radius:8px;cursor:pointer;display:flex;flex-direction:column;gap:7px;padding:7px 9px;transition:background .15s,border-color .15s;color:#41565c}
.cash-chart-row:hover{background:#f4f8f7;border-color:#dce6e2}
.cash-chart-row.selected{background:#eaf6f0;border-color:#acd3bd}
.cash-chart-row:focus-visible,.cash-account-button:focus-visible{outline:2px solid #217d62;outline-offset:2px}
.cash-chart-row-header{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0}
.cash-chart-name{display:block;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}
.cash-chart-row-header strong{font-size:11px;font-weight:760;white-space:nowrap;font-variant-numeric:tabular-nums;color:#233f40}
.cash-chart-row-header small{font-size:9px;font-weight:450;color:#758889}
.cash-chart-track{height:8px;border-radius:99px;background:#edf0f1;display:block;width:100%;overflow:hidden;direction:rtl}
.cash-chart-bar{height:100%;display:block;border-radius:99px;background:#31a377;transition:width .25s}
.cash-chart-row.selected .cash-chart-bar{background:#177855}
.cash-search{width:100%;min-height:36px;font-size:11px;margin-bottom:11px;padding:7px 11px}
.cash-table-shell{max-height:365px;overflow:auto;scrollbar-width:thin;border:1px solid #e2e9e9;border-radius:8px}
.cash-table-shell table{border-collapse:separate;border-spacing:0;width:100%;font-size:11px}
.cash-table-shell th{position:sticky;top:0;background:#f3f6f6;z-index:1;padding:10px 9px;text-align:right;color:#5b7379;font-size:11px}
.cash-table-shell th:last-child{text-align:left}
.cash-table-shell td{padding:8px 9px;border-top:1px solid #ecf0f0;color:#445a60;vertical-align:middle}
.cash-table-shell tr.selected{background:#eaf6f0}
.cash-account-button{background:transparent;border:0;padding:3px 0;text-align:right;cursor:pointer;color:inherit;line-height:1.7;font-size:11px;max-width:100%;overflow-wrap:anywhere}
.cash-account-button:hover{color:#1b755d}
.cash-table-money{font-weight:750;text-align:left;white-space:nowrap;font-variant-numeric:tabular-nums}
.cash-pager{display:flex;justify-content:flex-end;align-items:center;gap:10px;margin-top:10px;font-size:11px;color:#697e80}
.cash-pager .quiet{padding:6px 9px;font-size:11px}
.cash-selected{margin-top:14px;background:#f4f9f7;padding:12px 14px;border-radius:10px;display:flex;flex-direction:column;gap:5px;min-width:0}
.cash-selected>span{font-size:10px;color:#627d7b}
.cash-selected-name{font-size:12px;line-height:1.7;font-weight:750;overflow-wrap:anywhere}
.cash-selected div strong{font-size:18px;font-variant-numeric:tabular-nums}
.cash-selected div small,.cash-selected>small{font-size:10px;color:#738786}
.cash-no-results{padding:24px 12px;text-align:center;font-size:11px}
.cash-footer{border-top:1px solid var(--line);padding:10px 19px 13px;display:flex;gap:10px;flex-wrap:wrap;justify-content:space-between;font-size:10px;color:#829093}
@media(max-width:1220px){.cash-main{grid-template-columns:1fr}.cash-chart-panel{border-left:0;border-bottom:1px solid var(--line)}.cash-bars{max-height:380px}}
@media(max-width:800px){.cash-kpis{grid-template-columns:repeat(2,minmax(0,1fr));padding:12px;gap:8px}.cash-kpi{padding:11px}.cash-kpi>strong{font-size:15px}.cash-head{padding:13px}.cash-chart-panel,.cash-detail-panel{padding:12px}.cash-chart-row-header{gap:6px}.cash-chart-name{font-size:10px}.cash-chart-row-header strong{font-size:10px}.cash-footer{padding:10px 12px}}


/* 01.07 – localized, entirely browser-controlled Blazor Server reconnect UI. */
dialog#components-reconnect-modal.hd-reconnect{
    position:fixed;inset:0;margin:auto;
    width:min(430px,calc(100vw - 28px));max-width:430px;max-height:calc(100dvh - 30px);
    padding:0;border:1px solid #e2e7e9;border-radius:17px;
    background:#fff;color:#2c3d42;
    box-shadow:0 26px 90px #17273035,0 4px 24px #17273013;
    z-index:2147483000;overflow:auto;
    font-family:Vazirmatn,Tahoma,sans-serif;
    text-align:center
}
dialog#components-reconnect-modal.hd-reconnect:not([open]){display:none!important}
dialog#components-reconnect-modal.hd-reconnect[open]{display:block}
dialog#components-reconnect-modal.hd-reconnect::backdrop{
    background:rgba(26,39,44,.47);
    backdrop-filter:blur(3px)
}
.hd-reconnect-body{padding:29px 28px 24px;display:flex;flex-direction:column;align-items:center;gap:0}
.hd-reconnect-mark{
    position:relative;display:grid;place-items:center;
    width:78px;height:78px;border-radius:24px;
    background:#eaf6f2;color:#25856d;margin:0 0 16px;
}
.hd-reconnect-mark svg{position:relative;z-index:1}
.hd-reconnect-pulse{
    position:absolute;inset:-5px;border:2px solid #b8ddd2;
    border-radius:28px;animation:hd-reconnect-pulse 2.3s ease-in-out infinite;
    pointer-events:none
}
.hd-reconnect-caption{font-size:11px;font-weight:650;color:#74908b;margin-bottom:7px}
.hd-reconnect-body h2{margin:0;font-size:18px;line-height:1.8;font-weight:800;color:#293c41}
.hd-reconnect-description{
    margin:9px 0 17px;line-height:2.1;font-size:12px;
    color:#66787c;max-width:330px;min-height:42px;
}
.hd-reconnect-progress{
    height:5px;width:100%;max-width:290px;background:#e6eeeb;
    border-radius:99px;position:relative;overflow:hidden;margin-bottom:15px
}
.hd-reconnect-progress-bar{
    position:absolute;top:0;bottom:0;right:0;
    width:36%;border-radius:99px;
    background:linear-gradient(90deg,#a9d9c8,#3d9f80);
    animation:hd-reconnect-progress 1.65s ease-in-out infinite
}
.hd-reconnect-attempts{
    width:100%;display:flex;justify-content:center;align-items:center;
    gap:14px;flex-wrap:wrap;color:#657d7c;font-size:11px;
    padding:9px 11px;border-radius:9px;background:#f5f8f7;line-height:1.8
}
.hd-reconnect-attempts b{font-weight:750;color:#326b59;font-variant-numeric:tabular-nums}
.hd-reconnect-actions{width:100%;display:grid;gap:9px;margin-top:16px}
.hd-reconnect-actions button{
    border-radius:9px;min-height:42px;padding:9px 12px;
    font:650 12px Vazirmatn,Tahoma,sans-serif;
    cursor:pointer;width:100%;transition:background .16s ease,border-color .16s ease;
}
.hd-reconnect-actions button[hidden],
.hd-reconnect-progress[hidden],
.hd-reconnect-attempts[hidden]{display:none!important}
.hd-reconnect-primary{border:1px solid #36886f;background:#36886f;color:white}
.hd-reconnect-primary:hover{background:#286d57;border-color:#286d57}
.hd-reconnect-secondary{background:#fff;border:1px solid #cbd8d7;color:#405a60}
.hd-reconnect-secondary:hover{background:#f2f6f5;border-color:#9ab9af}
.hd-reconnect-actions button:focus-visible{outline:2px solid #36886f;outline-offset:3px}
.hd-reconnect-actions button:disabled{cursor:wait;opacity:.6}
.hd-reconnect-hint{
    margin:15px 0 0;max-width:350px;
    font-size:10px;line-height:2;color:#8b9a9c
}
.hd-reconnect[data-state="failed"] .hd-reconnect-mark,
.hd-reconnect[data-state="rejected"] .hd-reconnect-mark,
.hd-reconnect[data-state="resume-failed"] .hd-reconnect-mark{background:#fff4e7;color:#ab7727}
.hd-reconnect[data-state="failed"] .hd-reconnect-pulse,
.hd-reconnect[data-state="rejected"] .hd-reconnect-pulse,
.hd-reconnect[data-state="resume-failed"] .hd-reconnect-pulse{animation:none;border-color:#eacda5}
@keyframes hd-reconnect-pulse{
    0%,100%{opacity:.35;transform:scale(.96)}
    50%{opacity:1;transform:scale(1.07)}
}
@keyframes hd-reconnect-progress{
    0%{right:-37%}
    100%{right:100%}
}
@media(max-width:480px){
    .hd-reconnect-body{padding:23px 17px 18px}
    .hd-reconnect-mark{width:66px;height:66px;border-radius:18px}
    .hd-reconnect-body h2{font-size:16px}
    .hd-reconnect-description{font-size:11px}
    .hd-reconnect-attempts{gap:5px 12px}
}
@media(prefers-reduced-motion:reduce){
    .hd-reconnect-pulse,.hd-reconnect-progress-bar{animation:none}
}


/* 01.08 – Cash liquidity: premium 2.5D vertical columns, original monetary scaling.
   These rules supersede the old unused horizontal-bar layout without affecting
   any other dashboard reports or the original ARPA stored procedure. */
@media(min-width:1221px){
    .cash-main{grid-template-columns:minmax(0,1.85fr) minmax(320px,1fr)}
}
.cash-chart-panel{background:linear-gradient(180deg,#fff 0%,#fdfefe 100%)}
.cash-chart-heading{align-items:start;flex-wrap:wrap;gap:12px}
.cash-chart-tools{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.cash-scale-switch{display:inline-flex;align-items:center;gap:3px;padding:3px;
    border:1px solid #e0e8e8;border-radius:8px;background:#f4f7f7}
.cash-scale-switch button{border:0;background:transparent;color:#697b80;
    border-radius:6px;padding:7px 9px;min-height:32px;font:600 10px Vazirmatn,Tahoma,sans-serif;
    cursor:pointer;white-space:nowrap}
.cash-scale-switch button.active{background:#fff;color:#177758;box-shadow:0 1px 5px #112e2b18}
.cash-scale-switch button:focus-visible,.cash-column:focus-visible{
    outline:2px solid #288b72;outline-offset:3px
}
.cash-chart-summary{display:flex;align-items:center;justify-content:space-between;
    flex-wrap:wrap;gap:8px;padding:11px 13px;border:1px solid #dcece6;
    background:linear-gradient(135deg,#f0faf5,#fbfefd);border-radius:10px;
    margin:10px 0 12px}
.cash-chart-summary span{font-size:11px;color:#617974}
.cash-chart-summary strong{font-size:15px;font-weight:800;color:#205c4a;
    font-variant-numeric:tabular-nums;white-space:nowrap}
.cash-chart-summary strong small{font-size:10px;font-weight:500;color:#77938b}
.cash-column-scroll{max-width:100%;width:100%;overflow-x:auto;overflow-y:hidden;
    scrollbar-width:thin;scrollbar-color:#c4d6d0 transparent;padding:0 1px 8px}
.cash-vertical-grid{display:flex;direction:rtl;align-items:flex-end;
    min-width:max-content;gap:7px;padding:15px 8px 6px;isolation:isolate}
.cash-column{--cash-fill:#31947f;position:relative;display:flex;flex-direction:column;
    align-items:center;flex:0 0 100px;min-width:100px;max-width:100px;
    padding:7px 6px 11px;gap:10px;border-radius:11px;
    border:1px solid transparent;background:transparent;cursor:pointer;
    color:#36484d;transition:background .18s,border-color .18s,box-shadow .18s}
.cash-column:nth-child(6n+1){--cash-fill:#208d73}
.cash-column:nth-child(6n+2){--cash-fill:#468bab}
.cash-column:nth-child(6n+3){--cash-fill:#b38b59}
.cash-column:nth-child(6n+4){--cash-fill:#8479ac}
.cash-column:nth-child(6n+5){--cash-fill:#b47685}
.cash-column:nth-child(6n+6){--cash-fill:#3e9e9d}
.cash-column:hover{background:#f5faf8;border-color:#e0ece7}
.cash-column.selected{border-color:#90c8b6;background:#eaf7f1;
    box-shadow:inset 0 0 0 1px #b3d9ca,0 2px 9px #183c3010}
.cash-column-plot{position:relative;display:block;width:100%;height:275px;
    border-bottom:1px solid #d8e2e1;
    background:repeating-linear-gradient(to top,transparent 0,transparent 49px,#e9eeee 50px,#e9eeee 51px)}
.cash-column-bar{position:absolute;bottom:0;right:28%;width:48%;
    background:linear-gradient(105deg,color-mix(in srgb,var(--cash-fill) 83%,white),var(--cash-fill));
    border-radius:4px 4px 1px 1px;box-shadow:inset 1px 0 0 #ffffff32,0 2px 5px #133a3015;
    transition:height .28s ease,filter .2s}
.cash-column-bar::before{content:"";position:absolute;bottom:0;right:-10px;top:0;
    width:10px;background:color-mix(in srgb,var(--cash-fill) 74%,black);
    transform:skewY(-38deg);transform-origin:bottom left;
    border-radius:0 3px 1px 0}
.cash-column-bar::after{content:"";position:absolute;top:-10px;height:10px;
    left:5px;right:-5px;background:color-mix(in srgb,var(--cash-fill) 62%,white);
    transform:skewX(-45deg);transform-origin:bottom left;
    border-radius:2px 3px 0 0}
.cash-column.selected .cash-column-bar{filter:saturate(1.18);box-shadow:0 0 0 2px #ffffffbb,0 3px 10px #183e3028}
.cash-column-value{position:absolute;text-align:center;left:-12px;right:-12px;
    z-index:2;display:block;font-size:10px;font-weight:800;color:#294744;
    white-space:nowrap;font-variant-numeric:tabular-nums;
    text-shadow:0 1px 1px #fff;pointer-events:none}
.cash-column-caption{display:-webkit-box;min-height:42px;max-height:42px;
    max-width:92px;overflow:hidden;text-overflow:ellipsis;
    -webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;
    overflow-wrap:anywhere;text-align:center;font-size:10px;line-height:1.85;
    color:#566b70;font-weight:600}
.cash-column.selected .cash-column-caption{color:#176f53;font-weight:800}
.cash-chart-foot{display:flex;gap:8px 18px;flex-wrap:wrap;align-items:center;
    justify-content:space-between;font-size:10px;line-height:1.9;
    color:#708783;padding:10px 2px 0}
.cash-chart-dot{display:inline-block;vertical-align:middle;margin-left:4px;
    width:8px;height:8px;background:#208d73;border-radius:3px}
.cash-detail-panel .cash-table-shell tr.selected{background:#def3e8}
.cash-detail-panel .cash-account-button:hover{color:#176b52}
.cash-selected{background:linear-gradient(140deg,#edf8f2,#f8fcfa);
    border:1px solid #d4e8dd;border-radius:11px}
@media(max-width:1220px){
    .cash-chart-panel{border-left:0;border-bottom:1px solid var(--line)}
    .cash-vertical-grid{padding:12px 6px 4px}
}
@media(max-width:800px){
    .cash-chart-heading{gap:8px}
    .cash-chart-tools{justify-content:flex-start;width:100%}
    .cash-column{flex-basis:92px;min-width:92px;max-width:92px}
    .cash-column-plot{height:238px}
    .cash-column-caption{max-width:85px;font-size:9px}
    .cash-chart-summary strong{font-size:12px}
    .cash-chart-foot{flex-direction:column;align-items:flex-start;gap:3px}
}
@media(prefers-reduced-motion:reduce){
    .cash-column,.cash-column-bar{transition:none}
}


/* 01.09 — Cash chart polish: compact, readable columns + preserved 2.5D treatment. */
.cash-chart-panel{padding-top:15px}
.cash-chart-heading{margin-bottom:10px}
.cash-chart-heading .cash-panel-title h4,
.cash-chart-heading h4{font-size:14px}
.cash-chart-tools{gap:9px}
.cash-scale-switch button{font-size:11px;padding:7px 11px}
.cash-column-scroll{padding-top:2px}
.cash-vertical-grid{gap:12px;padding:9px 10px 4px}
.cash-column{flex:0 0 116px;min-width:116px;max-width:116px;
    padding:7px 7px 9px;gap:9px}
.cash-column-plot{height:220px;
    background:repeating-linear-gradient(to top,
        transparent 0px,transparent 72px,#edf1f0 73px,#edf1f0 74px)}
.cash-column-value{font-size:11px;left:-4px;right:-4px;
    line-height:1.5;font-weight:800}
.cash-column-caption{max-width:108px;min-height:46px;max-height:46px;
    line-height:1.8;font-size:11px;font-weight:650}
.cash-chart-foot{border-top:1px solid #eef2f1;margin-top:10px;padding-top:9px;
    font-size:11px;color:#6b7f7d}
.cash-chart-summary{display:none}
.cash-column.selected .cash-column-plot{
    background:repeating-linear-gradient(to top,
        #f0f8f3 0px,#f0f8f3 72px,#e0ebe5 73px,#e0ebe5 74px)}
.cash-column:hover .cash-column-caption{color:#177357}
.cash-detail-panel .cash-table-shell{scroll-behavior:smooth}
@media(max-width:800px){
    .cash-vertical-grid{gap:8px;padding:7px 7px 4px}
    .cash-column{flex:0 0 105px;min-width:105px;max-width:105px}
    .cash-column-plot{height:205px}
    .cash-column-caption{max-width:98px;font-size:10.5px;min-height:45px;max-height:45px}
    .cash-column-value{font-size:10px}
    .cash-scale-switch button{padding:6px 8px;font-size:10px}
}
@media(prefers-reduced-motion:reduce){
    .cash-detail-panel .cash-table-shell{scroll-behavior:auto}
}


/* 01.10 — Warehouse valuation + quantity drilldown. Company/year scoped, RTL. */
.warehouse-report{margin:16px 0 18px;padding:0;min-width:0;overflow:hidden;border-radius:14px}
.warehouse-heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;
  gap:12px;background:#fff;border-bottom:1px solid var(--line);padding:15px 19px}
.warehouse-heading h3{font-size:16px;font-weight:800;margin:0}
.warehouse-heading p{margin:4px 0 0;font-size:11px;color:var(--muted)}
.warehouse-heading button{font-size:11px;padding:8px 11px}
.warehouse-state{min-height:260px;padding:24px;display:flex;flex-direction:column;align-items:center;
  justify-content:center;gap:12px;text-align:center;font-size:12px}
.warehouse-state .skeleton{width:min(75%,550px)}
.warehouse-state .skeleton.short{width:40%}
.warehouse-state .notice{max-width:100%}
.warehouse-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:13px 17px}
.warehouse-kpis>div{min-width:0;background:#f4f7f7;border:1px solid #eaf0ef;
  padding:12px 14px;border-radius:11px;display:flex;flex-direction:column;gap:5px}
.warehouse-kpis>div:first-child{background:#eaf7f1;border-color:#d8ecdf}
.warehouse-kpis span{color:#677d7e;font-size:11px}
.warehouse-kpis strong{font-size:clamp(15px,1.55vw,22px);font-weight:800;
  font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.warehouse-kpis small{font-size:10px;color:#7d9390}
.warehouse-kpis strong.warehouse-danger{color:#b94745}
.warehouse-two-column{direction:rtl;display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);
  border-top:1px solid var(--line);align-items:start}
.warehouse-chart-section,.warehouse-items-section{min-width:0;padding:15px 17px 16px}
.warehouse-chart-section{border-left:1px solid var(--line)}
.warehouse-panel-title{display:flex;align-items:start;justify-content:space-between;flex-wrap:wrap;
  gap:9px;min-height:37px;margin-bottom:12px}
.warehouse-panel-title h4{font-size:13px;margin:0;font-weight:800;line-height:1.6}
.warehouse-panel-title p{font-size:10px;color:#7b8c8e;margin:3px 0 0}
.warehouse-muted,.warehouse-item-count{font-size:10px;color:#75898e;white-space:nowrap}
.warehouse-chart-scroll{overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;
  scrollbar-color:#bfd5d2 transparent;max-width:100%;padding:1px 2px 7px}
.warehouse-columns{display:flex;align-items:end;direction:rtl;min-width:max-content;
  gap:10px;padding:6px 10px 2px}
.warehouse-column{--wh-fill:#229575;flex:0 0 117px;min-width:117px;max-width:117px;
  border:1px solid transparent;background:transparent;cursor:pointer;
  padding:8px 7px 11px;border-radius:11px;color:#3a5054;
  display:flex;flex-direction:column;gap:8px;align-items:center;
  transition:background .16s,border-color .16s}
.warehouse-column:nth-child(6n+1){--wh-fill:#2e9c79}
.warehouse-column:nth-child(6n+2){--wh-fill:#348cac}
.warehouse-column:nth-child(6n+3){--wh-fill:#b18a65}
.warehouse-column:nth-child(6n+4){--wh-fill:#907eb7}
.warehouse-column:nth-child(6n+5){--wh-fill:#3aa3a0}
.warehouse-column:nth-child(6n+6){--wh-fill:#c07b83}
.warehouse-column:hover{border-color:#d9e7e1;background:#f5faf8}
.warehouse-column.selected{background:#edf8f2;border-color:#8ac8aa;box-shadow:inset 0 0 0 1px #badfcb}
.warehouse-column:focus-visible{outline:2px solid #23886f;outline-offset:2px}
.warehouse-column-plot{height:248px;width:100%;display:block;position:relative;
  border-bottom:1px solid #d4dfde;
  background:repeating-linear-gradient(to top,transparent 0,transparent 60px,#e8efed 61px,#e8efed 62px)}
.warehouse-column-plot::before{content:"";position:absolute;bottom:62px;left:0;right:0;
  border-top:1px solid #9ebbb2;z-index:1}
.warehouse-column-bar{display:block;position:absolute;right:29%;width:46%;
  background:linear-gradient(105deg,color-mix(in srgb,var(--wh-fill) 82%,white),var(--wh-fill));
  border-radius:3px 3px 0 0;box-shadow:0 2px 6px #19392b13;transition:height .2s}
.warehouse-column-bar::before{content:"";position:absolute;right:-9px;top:0;bottom:0;
  width:9px;background:color-mix(in srgb,var(--wh-fill) 72%,black);
  transform:skewY(-37deg);transform-origin:bottom left}
.warehouse-column-bar::after{content:"";position:absolute;top:-9px;left:4px;right:-4px;height:9px;
  background:color-mix(in srgb,var(--wh-fill) 60%,white);
  transform:skewX(-45deg);transform-origin:bottom left}
.warehouse-column-bar.negative{--wh-fill:#c75954;border-radius:0 0 3px 3px}
.warehouse-column-bar.zero{height:2px!important;background:#c8d1d2}
.warehouse-column-bar.zero::before,.warehouse-column-bar.zero::after{display:none}
.warehouse-column-value{position:absolute;left:-8px;right:-8px;text-align:center;z-index:2;
  font-size:11px;line-height:1.5;white-space:nowrap;font-weight:800;
  color:#314d51;font-variant-numeric:tabular-nums;text-shadow:0 1px 2px #fff;pointer-events:none}
.warehouse-column-label{display:flex;align-items:center;flex-direction:column;gap:3px;
  line-height:1.8;text-align:center;min-height:54px}
.warehouse-column-label strong{font-size:12px;color:#314c54;font-weight:800}
.warehouse-column-label span{font-size:10px;font-weight:650;color:#687b7f;max-width:105px;
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;
  overflow:hidden;text-overflow:ellipsis;overflow-wrap:anywhere}
.warehouse-column.selected .warehouse-column-label span{color:#196f56}
.warehouse-chart-footer{border-top:1px solid #eff2f1;padding-top:10px;
  display:flex;align-items:center;justify-content:space-between;gap:8px 15px;flex-wrap:wrap;
  font-size:10px;color:#788c88;line-height:1.8}
.warehouse-chart-footer i{display:inline-block;width:8px;height:8px;border-radius:3px;
  background:#239976;vertical-align:middle;margin-left:4px}
.warehouse-selected-value{display:flex;align-items:center;justify-content:space-between;gap:8px;
  flex-wrap:wrap;padding:10px 12px;border:1px solid #d5eadd;background:#f1faf5;
  border-radius:9px;margin-bottom:12px}
.warehouse-selected-value>span{font-size:10px;color:#557a72}
.warehouse-selected-value strong{font-size:14px;font-weight:800;color:#235c48}
.warehouse-selected-value strong small{font-size:10px;font-weight:500}
.warehouse-items-actions{display:flex;gap:7px;margin-bottom:11px}
.warehouse-items-actions input,.warehouse-items-actions select{min-height:36px;font-size:11px;padding:7px 9px}
.warehouse-items-actions input{flex:1;min-width:0;max-width:none}
.warehouse-items-actions select{flex:0 0 131px;max-width:131px}
.warehouse-item-scroll{overflow:auto;max-height:350px;min-height:150px;scrollbar-width:thin;
  border:1px solid #e1e9e8;border-radius:9px}
.warehouse-item-scroll table{border-collapse:separate;border-spacing:0;
  table-layout:fixed;width:100%;font-size:11px}
.warehouse-item-scroll th{position:sticky;top:0;z-index:2;background:#f1f5f4;
  color:#516e6c;padding:10px;text-align:right;border-bottom:1px solid #dce7e3}
.warehouse-item-scroll th:last-child{text-align:left;width:35%}
.warehouse-item-scroll td{border-bottom:1px solid #ebf0ee;padding:9px 10px;
  line-height:1.8;vertical-align:middle}
.warehouse-item-scroll tbody tr:nth-child(even){background:#fcfdfc}
.warehouse-item-scroll tbody tr:hover{background:#f3f9f6}
.warehouse-item-name{font-weight:550;color:#354d53;overflow-wrap:anywhere}
.warehouse-item-name small{display:block;color:#879794;font-size:10px;font-weight:400}
.warehouse-quantity{text-align:left;white-space:nowrap;font-weight:750;
  font-variant-numeric:tabular-nums;color:#236d55}
.warehouse-quantity.negative{color:#b84646}
.warehouse-quantity.zero{color:#879593}
.warehouse-unit{font-size:10px;color:#7c8e8c;font-weight:500;padding-inline-start:4px}
.warehouse-empty{text-align:center;font-size:11px;padding:20px;color:#7a8e8d}
.warehouse-item-pager{display:flex;align-items:center;justify-content:space-between;gap:10px;
  flex-wrap:wrap;padding-top:10px;color:#778889;font-size:11px}
.warehouse-item-pager>div{display:flex;align-items:center;gap:9px}
.warehouse-item-pager button{font-size:10px;padding:6px 9px}
.warehouse-report-footer{display:flex;align-items:center;justify-content:space-between;
  flex-wrap:wrap;gap:8px 16px;padding:10px 17px 12px;border-top:1px solid var(--line);
  font-size:10px;color:#81908e}
@media(max-width:1180px){
  .warehouse-two-column{grid-template-columns:minmax(0,1fr)}
  .warehouse-chart-section{border-left:0;border-bottom:1px solid var(--line)}
}
@media(max-width:700px){
  .warehouse-kpis{grid-template-columns:repeat(2,minmax(0,1fr));padding:10px;gap:8px}
  .warehouse-kpis>div:first-child{grid-column:1/-1}
  .warehouse-kpis strong{font-size:16px}
  .warehouse-heading{padding:12px}
  .warehouse-chart-section,.warehouse-items-section{padding:11px}
  .warehouse-column{flex-basis:105px;min-width:105px;max-width:105px}
  .warehouse-columns{gap:5px;padding:6px 5px 2px}
  .warehouse-column-label span{font-size:9px}
  .warehouse-items-actions select{flex-basis:110px;max-width:110px}
  .warehouse-item-scroll th,.warehouse-item-scroll td{padding:8px 7px;font-size:10px}
  .warehouse-report-footer{padding:10px 12px}
}
@media(prefers-reduced-motion:reduce){
  .warehouse-column,.warehouse-column-bar{transition:none}
}


/* 01.11 — Compact default view: six cash accounts, six paged rows and
   twelve cheque months with NO nested scrollbars on first render.
   More cash accounts can be explored only after an explicit user action. */
.cash-column-scroll.cash-compact{
    width:100%;
    max-width:100%;
    overflow-x:hidden;
    overflow-y:visible;
    padding:1px 0 5px;
}
.cash-vertical-grid.cash-compact{
    display:grid;
    grid-template-columns:repeat(6,minmax(0,1fr));
    width:100%;
    min-width:0;
    gap:clamp(3px,.55vw,10px);
    align-items:end;
    padding:8px 3px 3px;
}
.cash-vertical-grid.cash-compact .cash-column{
    width:100%;
    min-width:0;
    max-width:none;
    flex:none;
    padding:7px 3px 8px;
}
.cash-vertical-grid.cash-compact .cash-column-plot{
    height:180px;
    width:100%;
}
.cash-vertical-grid.cash-compact .cash-column-caption{
    max-width:100%;
    min-height:41px;
    max-height:41px;
    font-size:10px;
    line-height:1.7;
}
.cash-vertical-grid.cash-compact .cash-column-value{
    font-size:10px;
    left:-1px;
    right:-1px;
    max-width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
}
.cash-column-scroll.cash-expanded{
    overflow-x:auto;
    overflow-y:hidden;
}
.cash-vertical-grid.cash-expanded{
    display:flex;
    width:max-content;
    min-width:max-content;
    gap:10px;
}
.cash-vertical-grid.cash-expanded .cash-column{
    flex:0 0 108px;
    min-width:108px;
    max-width:108px;
}
.cash-chart-foot{padding-top:8px;gap:5px 12px}
.cash-detail-panel .cash-table-shell{
    max-height:none;
    min-height:0;
    overflow:visible;
    scroll-behavior:auto;
}
.cash-detail-panel .cash-table-shell table{
    width:100%;
    table-layout:fixed;
}
.cash-detail-panel .cash-table-shell th:first-child{
    width:59%;
}
.cash-detail-panel .cash-table-shell th:last-child{
    width:41%;
}
.cash-detail-panel .cash-table-shell td{
    overflow:hidden;
}
.cash-detail-panel .cash-account-button{
    display:block;
    width:100%;
    min-width:0;
    max-width:100%;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    overflow-wrap:normal;
}
.cash-detail-panel .cash-table-money{
    font-size:11px;
    letter-spacing:-.12px;
    text-overflow:clip;
    white-space:nowrap;
}
.cash-detail-panel .cash-table-shell td,
.cash-detail-panel .cash-table-shell th{
    padding-block:7px;
}
.cash-pager{margin-top:8px}
.cash-selected{margin-top:10px;padding:10px 12px}

/* Cheque cards: every month is visible at once; never force min-width:610px.
   Dense column labels are deliberately shortened instead of overlaid. */
.cheque-month-card{min-width:0}
.cheque-chart-scroll{
    width:auto;
    max-width:100%;
    overflow-x:hidden;
    overflow-y:hidden;
    margin:0 9px;
    padding:0 1px 5px;
}
.cheque-chart{
    display:grid;
    width:100%;
    min-width:0;
    grid-template-columns:repeat(12,minmax(0,1fr));
    align-items:end;
    gap:2px;
    padding-top:4px;
}
.cheque-chart-month{
    min-width:0;
    width:100%;
    max-width:100%;
    flex:none;
    gap:3px;
    padding:3px 1px;
}
.cheque-chart-track{
    height:165px;
    background:repeating-linear-gradient(to top,
        transparent 0,transparent 39px,#ebf1f0 40px,#ebf1f0 41px);
}
.cheque-bar{
    right:21%;
    width:58%;
    border-radius:3px 3px 0 0;
}
.cheque-month-label{
    width:100%;
    max-width:100%;
    min-height:19px;
    font-size:9px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    text-align:center;
}
.cheque-month-short{display:none}
.cheque-kpi-strip{padding-block:10px;gap:7px}
.cheque-kpi-strip>div{padding:9px 10px;gap:4px}
.cheque-selected-month{padding:9px 12px}
@media(max-width:950px){
    .cheque-month-label{display:none}
    .cheque-month-short{display:block;width:100%;min-height:19px;
        font-size:9px;line-height:19px;color:#5f7376;text-align:center}
}
@media(max-width:700px){
    .cash-vertical-grid.cash-compact{
        grid-template-columns:repeat(3,minmax(0,1fr));
        gap:3px 5px;
    }
    .cash-vertical-grid.cash-compact .cash-column-plot{height:126px}
    .cash-vertical-grid.cash-compact .cash-column-caption{
        max-height:35px;min-height:35px;font-size:9px}
    .cash-vertical-grid.cash-compact .cash-column-value{font-size:9px}
    .cash-detail-panel .cash-table-money{font-size:10px}
    .cheque-chart-scroll{margin-inline:5px}
    .cheque-chart{gap:1px}
    .cheque-chart-track{height:136px}
    .cheque-chart-month{padding:2px 0}
    .cheque-month-short{font-size:8px}
    .cheque-kpi-strip>div{padding:8px 5px}
    .cheque-selected-month{gap:6px}
}


/* Fabric consumption: interactive monthly chart and paged details.
   Detail rows use a bounded internal scroll viewport further below. */
.fabric-report{margin:15px 0 18px;min-width:0;padding:0;overflow:hidden;border-radius:14px}
.fabric-head{display:flex;justify-content:space-between;align-items:center;gap:12px;
  flex-wrap:wrap;padding:14px 18px;border-bottom:1px solid var(--line);background:#fff}
.fabric-head h3{font-size:15px;font-weight:800;margin:0}
.fabric-head p{margin:4px 0 0;font-size:11px;color:var(--muted)}
.fabric-head .quiet{font-size:11px;padding:8px 10px}
.fabric-state{min-height:220px;padding:25px;display:flex;align-items:center;flex-direction:column;
  justify-content:center;gap:12px;text-align:center;font-size:12px}
.fabric-state .skeleton{width:min(550px,80%)}
.fabric-state .skeleton.short{width:40%}
.fabric-state .notice{max-width:100%}
.fabric-highlights{display:grid;grid-template-columns:minmax(0,1.8fr) repeat(2,minmax(0,1fr));
  gap:10px;padding:13px 17px}
.fabric-highlight{background:#f4f7f7;border:1px solid #edf1f0;min-width:0;
  padding:11px 13px;border-radius:10px;display:flex;flex-direction:column;gap:5px}
.fabric-highlight:first-child{background:#f1f9f4;border-color:#dceee2}
.fabric-highlight span{font-size:10px;color:#6f8381}
.fabric-highlight strong{font-size:clamp(13px,1.4vw,20px);font-weight:800;line-height:1.7;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fabric-highlight small{font-size:10px;color:#798c88}
.fabric-layout{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);
  direction:rtl;align-items:stretch;border-top:1px solid var(--line)}
.fabric-chart-panel,.fabric-detail-panel{min-width:0;padding:15px 16px}
.fabric-chart-panel{border-left:1px solid var(--line)}
.fabric-panel-heading{display:flex;align-items:start;justify-content:space-between;
  gap:10px;flex-wrap:wrap;min-height:42px;margin-bottom:12px}
.fabric-panel-heading h4{font-size:13px;margin:0;font-weight:800}
.fabric-panel-heading p{font-size:10px;color:#7c918e;margin:4px 0 0}
.fabric-panel-heading .quiet{font-size:10px;padding:6px 8px}
.fabric-bars{display:flex;direction:rtl;align-items:flex-end;justify-content:space-between;
  gap:3px;width:100%;min-width:0;padding:5px 3px 6px}
.fabric-month{--fabric-color:#4b9b7b;min-width:0;flex:1;
  background:transparent;border:1px solid transparent;border-radius:10px;
  display:flex;flex-direction:column;align-items:center;gap:5px;
  cursor:pointer;text-align:center;padding:6px 3px 9px;color:#3a5256;
  transition:background .18s,border-color .18s}
.fabric-month:nth-child(8n+2){--fabric-color:#4b94b3}
.fabric-month:nth-child(8n+3){--fabric-color:#b18e69}
.fabric-month:nth-child(8n+4){--fabric-color:#a36f83}
.fabric-month:nth-child(8n+5){--fabric-color:#7b8fbd}
.fabric-month:nth-child(8n+6){--fabric-color:#299c91}
.fabric-month:nth-child(8n+7){--fabric-color:#b78349}
.fabric-month:nth-child(8n+8){--fabric-color:#798e67}
.fabric-month:hover{background:#f5faf7;border-color:#deebe5}
.fabric-month.active{background:#eaf7f1;border-color:#a0d1b5;
  box-shadow:inset 0 0 0 1px #c0e2d0}
.fabric-month:focus-visible{outline:2px solid #237a61;outline-offset:3px}
.fabric-bar-zone{display:block;width:100%;height:202px;position:relative;
  border-bottom:1px solid #dae6e3;
  background:repeating-linear-gradient(to top,transparent 0,transparent 48px,#edf1f0 49px,#edf1f0 50px)}
.fabric-bar{position:absolute;right:25%;width:50%;bottom:0;
  background:linear-gradient(115deg,color-mix(in srgb,var(--fabric-color) 83%,white),var(--fabric-color));
  border-radius:4px 4px 0 0;transition:height .25s;box-shadow:0 2px 6px #193c2b12}
.fabric-bar::before{content:"";position:absolute;top:0;bottom:0;right:-7px;
  width:7px;background:color-mix(in srgb,var(--fabric-color) 76%,black);
  transform:skewY(-36deg);transform-origin:bottom left}
.fabric-bar::after{content:"";position:absolute;top:-7px;height:7px;left:4px;right:-3px;
  background:color-mix(in srgb,var(--fabric-color) 55%,white);
  transform:skewX(-44deg);transform-origin:bottom left}
.fabric-bar.negative{--fabric-color:#bf5a57}
.fabric-bar-amount{position:absolute;z-index:2;left:0;right:0;display:block;text-align:center;
  font-size:10px;font-weight:800;white-space:nowrap;color:#304c51;
  text-shadow:0 1px 2px white;pointer-events:none}
.fabric-bar-month{font-size:10px;font-weight:800;color:#465f61;white-space:nowrap;
  overflow:hidden;text-overflow:ellipsis;width:100%}
.fabric-bar-item{font-size:9px;line-height:1.6;color:#718584;
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;
  overflow:hidden;width:100%;max-height:32px;min-height:32px;overflow-wrap:anywhere}
.fabric-month.active .fabric-bar-item{color:#266f54}
.fabric-bars.fabric-all-months{flex-wrap:wrap}
.fabric-bars.fabric-all-months .fabric-month{flex:0 0 calc((100% - 40px)/12)}
.fabric-chart-footer{display:flex;justify-content:space-between;gap:7px 14px;flex-wrap:wrap;
  font-size:10px;color:#80908e;border-top:1px solid #edf2ef;padding-top:11px}
.fabric-count{font-size:10px;color:#708480}
.fabric-selected-summary{display:flex;flex-direction:column;gap:5px;background:#f0faf5;
  border:1px solid #d9eddf;border-radius:10px;padding:11px 13px;margin-bottom:12px}
.fabric-selected-summary span{font-size:10px;color:#658475}
.fabric-selected-summary strong{font-size:12px;line-height:1.7;font-weight:750;
  overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.fabric-selected-summary b{font-size:17px;color:#217657;font-variant-numeric:tabular-nums}
.fabric-search{display:block;width:100%;font-size:11px;min-height:36px;padding:7px 10px;margin-bottom:10px}
.fabric-list{border:1px solid #e1e9e7;border-radius:9px;overflow:visible;min-width:0}
.fabric-list table{width:100%;table-layout:fixed;border-collapse:collapse;font-size:11px}
.fabric-list th{background:#f1f5f3;text-align:right;padding:9px 10px;
  font-size:10px;color:#637a76;border-bottom:1px solid #e0e9e6}
.fabric-list th:first-child{width:69%}
.fabric-list th:last-child{width:31%;text-align:left}
.fabric-list td{padding:8px 10px;border-bottom:1px solid #e9f0ec;
  color:#3a5054;line-height:1.65;vertical-align:middle;overflow:hidden;text-overflow:ellipsis}
.fabric-list td:first-child{white-space:nowrap}
.fabric-list td small{display:block;font-size:9px;font-weight:450;color:#8c9b97}
.fabric-list tr:nth-child(even){background:#fcfdfc}
.fabric-qty{text-align:left;white-space:nowrap;font-weight:800;font-variant-numeric:tabular-nums}
.fabric-qty.negative{color:#b94e4a}
.fabric-empty{padding:14px;text-align:center;font-size:11px;color:#80928b}
.fabric-pager{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;
  gap:7px;margin-top:10px;font-size:10px;color:#778983}
.fabric-pager>div{display:flex;align-items:center;gap:8px}
.fabric-pager .quiet{padding:6px 8px;font-size:10px}
.fabric-footer{display:flex;justify-content:space-between;gap:8px 14px;flex-wrap:wrap;
  border-top:1px solid var(--line);padding:11px 16px;font-size:10px;color:#82928f}
@media(max-width:1180px){
  .fabric-layout{grid-template-columns:minmax(0,1fr)}
  .fabric-chart-panel{border-left:0;border-bottom:1px solid var(--line)}
}
@media(max-width:700px){
  .fabric-highlights{grid-template-columns:repeat(2,minmax(0,1fr));padding:10px;gap:7px}
  .fabric-highlight:first-child{grid-column:1/-1}
  .fabric-highlight strong{font-size:14px}
  .fabric-head,.fabric-chart-panel,.fabric-detail-panel{padding:11px}
  .fabric-bars{flex-wrap:wrap;gap:5px}
  .fabric-month,.fabric-bars.fabric-all-months .fabric-month{flex:0 0 calc((100% - 25px)/6)}
  .fabric-bar-zone{height:144px}
  .fabric-bar-month{font-size:9px}
  .fabric-bar-amount{font-size:9px}
  .fabric-bar-item{font-size:8px}
  .fabric-list td,.fabric-list th{padding:7px}
  .fabric-footer{padding:10px}
}
@media(prefers-reduced-motion:reduce){.fabric-bar,.fabric-month{transition:none}}


/* Order prioritization review: bounded detail table scrolling, all advice
   explainable and READ-ONLY. Calm neutral UI; Vazirmatn follows app font. */
.priority-review{margin:15px 0 18px;padding:0;min-width:0;overflow:hidden;border-radius:14px}
.priority-head{display:flex;gap:12px;flex-wrap:wrap;align-items:center;
  justify-content:space-between;padding:16px 18px;border-bottom:1px solid var(--line);background:#fff}
.priority-head h3{font-size:16px;font-weight:800;margin:0;line-height:1.7}
.priority-head p{font-size:11px;color:var(--muted);margin:3px 0 0}
.priority-head-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.priority-head-actions .quiet{font-size:11px;padding:8px 11px}
.priority-readonly{font-size:10px;color:#6e8583;background:#f2f5f5;border:1px solid #e7eded;
  padding:7px 10px;border-radius:7px}
.priority-state{padding:26px;min-height:240px;display:flex;align-items:center;
  flex-direction:column;justify-content:center;gap:12px;font-size:12px;text-align:center}
.priority-state .skeleton{width:min(75%,600px)}
.priority-state .skeleton.short{width:35%}
.priority-state .notice{max-width:100%}
.priority-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));
  padding:13px 17px;gap:9px}
.priority-kpi{display:flex;flex-direction:column;align-items:flex-start;min-width:0;gap:6px;
  padding:13px 14px;background:#f4f7f7;border:1px solid #e9efee;border-radius:10px}
.priority-kpi span{font-size:10px;color:#6e8181;line-height:1.7}
.priority-kpi strong{font-size:clamp(19px,1.7vw,27px);font-weight:800;line-height:1.25;
  font-variant-numeric:tabular-nums;color:#243f44}
.priority-kpi small{font-size:10px;color:#81908f;line-height:1.7}
.priority-kpi.priority-finance{background:#fbf4f2;border-color:#f0e8e5}
.priority-kpi.priority-review-kpi{background:#f7f6f1;border-color:#eeeee7}
.priority-kpi.priority-ready{background:#f0f9f4;border-color:#e1ede5}
.priority-advice-panel{border-top:1px solid var(--line);padding:16px 17px 17px;background:#fbfcfc}
.priority-advice-heading{display:flex;align-items:start;justify-content:space-between;
  flex-wrap:wrap;gap:9px;margin-bottom:11px}
.priority-advice-heading h4{margin:0;font-size:13px;font-weight:800;color:#2c484e}
.priority-advice-heading p{margin:4px 0 0;font-size:10px;color:#7e9090}
.priority-advice-heading>span{font-size:10px;color:#708682;white-space:nowrap}
.priority-advice-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
.priority-advice-card{min-width:0;background:white;text-align:right;display:flex;flex-direction:column;
  align-items:flex-start;gap:6px;padding:12px 13px;cursor:pointer;
  border:1px solid #e0e8e7;border-radius:10px;
  font-family:inherit;transition:border-color .15s,background .15s,box-shadow .15s}
.priority-advice-card:hover{border-color:#9dbeb4;background:#f9fcfa;box-shadow:0 3px 10px #243e3610}
.priority-advice-card:focus-visible{outline:2px solid #398e79;outline-offset:3px}
.priority-advice-icon{font-size:12px;font-weight:800;color:#386c60;background:#e9f4f0;
  width:27px;height:27px;display:grid;place-items:center;border-radius:9px}
.priority-advice-card strong{font-size:12px;font-weight:800;color:#30474d;line-height:1.6}
.priority-advice-card>span:not(.priority-advice-icon){font-size:11px;color:#667f7e}
.priority-advice-card small{font-size:10px;color:#8b9c98;line-height:1.85}
.priority-workspace{padding:16px 17px 17px;border-top:1px solid var(--line)}
.priority-toolbar{display:flex;justify-content:space-between;align-items:end;
  flex-wrap:wrap;gap:12px;margin-bottom:12px}
.priority-toolbar h4{font-size:13px;font-weight:800;margin:0}
.priority-toolbar p{font-size:10px;color:#829393;margin:4px 0 0}
.priority-tools{display:flex;gap:7px;flex-wrap:wrap;align-items:center;max-width:100%}
.priority-tools input,.priority-tools select{min-height:36px;font-size:11px;padding:7px 9px}
.priority-tools input{width:clamp(175px,20vw,280px)}
.priority-tools select{width:auto;min-width:133px;max-width:200px}
.priority-table-container{width:100%;min-width:0;overflow:visible;
  border:1px solid #e0e8e7;border-radius:10px}
.priority-table{width:100%;table-layout:fixed;border-collapse:collapse;
  font-size:11px}
.priority-table thead{background:#f1f5f4}
.priority-table th{padding:10px 7px;border-bottom:1px solid #dce5e2;
  color:#687f7b;font-size:10px;font-weight:700;text-align:right;white-space:nowrap}
.priority-table th:first-child{width:22%}
.priority-table th:nth-child(n+2):nth-child(-n+6){width:6%}
.priority-table th:nth-child(7){width:14%}
.priority-table th:nth-child(8){width:12%}
.priority-table th:nth-child(9){width:22%}
.priority-table td{padding:10px 7px;border-bottom:1px solid #edf1f0;
  color:#375056;vertical-align:middle;overflow:hidden;text-overflow:ellipsis}
.priority-table tbody tr{cursor:pointer}
.priority-table tbody tr:nth-child(even){background:#fcfdfd}
.priority-table tbody tr:hover{background:#f3f8f6}
.priority-table tbody tr.selected{background:#eaf6f0;box-shadow:inset -3px 0 0 #67ad91}
.priority-customer{border:0;background:transparent;font:inherit;color:#2c494c;
  padding:0;text-align:right;cursor:pointer;width:100%;max-width:100%}
.priority-customer strong{display:block;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.priority-customer small{display:block;font-size:10px;color:#899694;font-weight:400;margin-top:4px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.priority-customer:focus-visible{outline:2px solid #318d71;outline-offset:2px}
.priority-num{text-align:center;white-space:nowrap;font-variant-numeric:tabular-nums;color:#405b61}
.priority-money{white-space:nowrap;text-align:center;font-variant-numeric:tabular-nums;font-weight:750;color:#283f42}
.priority-status,.priority-suggestion-tag{font-size:10px;font-weight:700;padding:5px 7px;
  border-radius:7px;display:inline-block;line-height:1.7;
  white-space:normal;text-align:center;overflow-wrap:anywhere}
.priority-status.debit,.priority-suggestion-tag.needs-finance{background:#fbeae7;color:#a6504b}
.priority-status.credit,.priority-suggestion-tag.review-production{background:#e8f5ee;color:#257654}
.priority-status.unknown,.priority-suggestion-tag.needs-account{background:#f6f1e5;color:#866d39}
.priority-status.balanced,.priority-suggestion-tag.needs-quantity{background:#edf0f6;color:#5b6e8f}
.priority-empty{font-size:11px;padding:20px;text-align:center;color:#7d908c}
.priority-mobile-list{display:none}
.priority-pagination{display:flex;align-items:center;justify-content:space-between;
  flex-wrap:wrap;gap:10px;margin-top:11px;font-size:11px;color:#788d87}
.priority-pagination>div{display:flex;align-items:center;gap:8px}
.priority-pagination .quiet{font-size:11px;padding:6px 9px}
.priority-detail{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);
  gap:11px;margin-top:15px}
.priority-detail-main,.priority-detail-products{border:1px solid #e2ebe7;
  border-radius:11px;padding:14px 15px;min-width:0;background:#fbfdfc}
.priority-detail-heading{display:flex;align-items:start;justify-content:space-between;
  flex-wrap:wrap;gap:10px;margin-bottom:8px}
.priority-overline{display:block;font-size:10px;color:#77908a;margin-bottom:3px}
.priority-detail-heading h4{margin:0;font-size:13px;font-weight:800;line-height:1.8;color:#345355}
.priority-detail-heading small{font-size:10px;color:#91a09b}
.priority-reason{font-size:11px;color:#617a76;line-height:2.05;margin:9px 0 13px}
.priority-next-action{display:flex;gap:5px;flex-direction:column;
  border-top:1px solid #e6eeea;padding-top:12px;font-size:11px;line-height:1.95}
.priority-next-action strong{font-weight:800;color:#346c59}
.priority-next-action span{color:#526b67}
.priority-detail-products h4{margin:0 0 12px;font-size:12px;font-weight:800;color:#33515a}
.priority-product-pills{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.priority-product-pills>div{border:1px solid #e5edea;background:white;padding:9px;
  border-radius:8px;display:flex;flex-direction:column;gap:6px;min-width:0}
.priority-product-pills span{font-size:10px;color:#859693}
.priority-product-pills strong{font-size:15px;font-weight:800;font-variant-numeric:tabular-nums;color:#385b5d}
.priority-detail-products>small{display:block;margin-top:12px;font-size:10px;
  line-height:1.9;color:#8a9b95}
.priority-footer{display:flex;justify-content:space-between;align-items:center;
  flex-wrap:wrap;gap:8px 15px;padding:11px 17px 13px;border-top:1px solid var(--line);
  font-size:10px;color:#869591}
@media(max-width:1350px){
  .priority-advice-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .priority-table th:nth-child(3),.priority-table td:nth-child(3),
  .priority-table th:nth-child(4),.priority-table td:nth-child(4){display:none}
  .priority-table th:first-child{width:27%}
  .priority-table th:nth-child(7){width:17%}
  .priority-table th:nth-child(8){width:14%}
  .priority-table th:nth-child(9){width:24%}
}
@media(max-width:900px){
  .priority-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .priority-table-container{display:none}
  .priority-mobile-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .priority-mobile-account{display:flex;flex-direction:column;text-align:right;align-items:flex-start;
    gap:9px;min-width:0;padding:12px;cursor:pointer;color:#364f50;
    border:1px solid #e0e9e6;background:#fff;border-radius:10px;font-family:inherit}
  .priority-mobile-account.selected{background:#eaf6f0;border-color:#92c6b0}
  .priority-mobile-account>span:first-child{max-width:100%}
  .priority-mobile-account strong{font-size:12px;line-height:1.7}
  .priority-mobile-account small{display:block;margin-top:3px;color:#7e918a;font-size:10px}
  .priority-detail{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:600px){
  .priority-head,.priority-workspace,.priority-advice-panel{padding:12px}
  .priority-head h3{font-size:14px}
  .priority-readonly{display:none}
  .priority-kpis{padding:9px;gap:7px}
  .priority-kpi{padding:10px}
  .priority-kpi strong{font-size:18px}
  .priority-advice-grid{grid-template-columns:minmax(0,1fr)}
  .priority-advice-card{padding:10px 12px}
  .priority-tools{width:100%}
  .priority-tools input{width:100%}
  .priority-tools select{flex:1;min-width:0;max-width:none}
  .priority-mobile-list{grid-template-columns:minmax(0,1fr)}
  .priority-product-pills{grid-template-columns:repeat(2,minmax(0,1fr))}
  .priority-detail-main,.priority-detail-products{padding:11px}
  .priority-footer{padding:10px 12px}
}
@media(prefers-reduced-motion:reduce){
  .priority-advice-card{transition:none}
}

/* Shared compact reporting layout — 2026-11-14.
   Keep all report headings and statistical cards on one consistent density scale. */
:root {
  --report-head-padding-y: 9px;
  --report-head-padding-x: 15px;
  --report-kpi-padding-y: 7px;
  --report-kpi-padding-x: 11px;
}
.feature-head,
.returned-head,
.cheque-head,
.cash-head,
.warehouse-heading,
.fabric-head {
  min-height: 0;
  padding: var(--report-head-padding-y) var(--report-head-padding-x);
  gap: 9px;
}
.report-head {align-items:center;margin-bottom:9px}
.feature-heading,.returned-head-title {gap:8px}
.feature-symbol,.returned-icon {width:32px;height:32px;font-size:18px;border-radius:8px}
.feature-heading h3,.cash-heading h3,.warehouse-heading h3,.fabric-head h3 {font-size:15px;line-height:1.55}
.feature-heading p,.returned-heading p,.cash-heading p,.warehouse-heading p,.fabric-head p {
  margin-top:1px;
  line-height:1.5;
}
.warehouse-heading button,
.fabric-head .quiet,
.cash-head-actions button,
.cheque-refresh,
.returned-reload {padding:6px 9px;font-size:11px}

.sales-kpis,
.balance-kpis,
.cheque-kpi-strip,
.cash-kpis,
.warehouse-kpis,
.fabric-highlights {gap:8px;padding:9px 15px}
.sales-kpi,
.balance-kpi,
.balance-total,
.cheque-kpi-strip>div,
.cash-kpi,
.warehouse-kpis>div,
.fabric-highlight {padding:var(--report-kpi-padding-y) var(--report-kpi-padding-x);gap:3px}
.sales-kpi>span,.balance-kpi>span,.cash-kpi>span,.warehouse-kpis span {
  line-height:1.25;
}
.sales-kpi>strong,.balance-kpi>strong,.cheque-kpi-strip strong,.cash-kpi>strong,
.warehouse-kpis strong,.fabric-highlight strong {line-height:1.22}
.sales-kpi>small,.balance-kpi>small,.cheque-kpi-strip small,.cash-kpi>small,.warehouse-kpis small,.fabric-highlight small {line-height:1.25}
.sales-recap>div {padding:8px 7px;gap:4px}
.returned-summary {padding:7px 12px}

/* Warehouse chart grows with the neighboring details instead of leaving a
   large, unused block below fixed-height pixel bars. */
.warehouse-two-column {align-items:stretch}
.warehouse-chart-section {display:flex;flex-direction:column;min-height:0}
.warehouse-panel-title {min-height:0;margin-bottom:9px}
.warehouse-chart-scroll {
  display:flex;
  flex:1 1 auto;
  min-height:340px;
  padding-bottom:5px;
}
.warehouse-columns {
  flex:1 0 auto;
  width:max-content;
  min-width:100%;
  justify-content:space-around;
  align-items:stretch;
  gap:clamp(4px,.7vw,10px);
  padding:5px 7px 2px;
}
.warehouse-column {
  flex:1 0 92px;
  min-width:92px;
  max-width:170px;
  min-height:100%;
  justify-content:flex-end;
}
.warehouse-column-plot {
  height:auto;
  min-height:275px;
  flex:1 1 auto;
}
.warehouse-column-plot::before {bottom:20%}
.warehouse-column-label {flex:0 0 54px}
.warehouse-chart-footer {margin-top:6px;padding-top:8px}
.warehouse-selected-value {padding:8px 11px;margin-bottom:9px}
.warehouse-items-actions {margin-bottom:9px}

@media (max-width:750px) {
  :root {
    --report-head-padding-y:9px;
    --report-head-padding-x:11px;
    --report-kpi-padding-y:7px;
    --report-kpi-padding-x:9px;
  }
  .sales-kpis,.balance-kpis,.cheque-kpi-strip,.cash-kpis,.warehouse-kpis,.fabric-highlights {
    padding:8px 10px;
    gap:7px;
  }
  .feature-heading h3,.cash-heading h3,.warehouse-heading h3,.fabric-head h3 {font-size:14px}
  .warehouse-chart-section,.warehouse-items-section {padding:10px}
  .warehouse-chart-scroll {min-height:260px}
  .warehouse-columns {padding:4px 3px 2px;gap:4px}
  .warehouse-column {flex-basis:94px;min-width:94px;max-width:130px}
  .warehouse-column-plot {min-height:205px}
  .warehouse-column-label {flex-basis:50px}
}

/* Apply the same fill-available-height behavior to other split reports.
   Their existing bars already use percentage heights, so text remains sharp. */
.balance-chart-panel,
.fabric-chart-panel,
.cash-chart-panel {display:flex;flex-direction:column}
.balance-four-chart {flex:1 1 auto;align-items:stretch;min-height:280px}
.balance-chart-option {justify-content:flex-end}
.balance-chart-track {flex:1 1 auto;height:auto;min-height:190px}
.fabric-bars:not(.fabric-all-months) {
  flex:1 1 auto;
  align-items:stretch;
  min-height:280px;
}
.fabric-bars:not(.fabric-all-months) .fabric-month {justify-content:flex-end}
.fabric-bars:not(.fabric-all-months) .fabric-bar-zone {
  flex:1 1 auto;
  height:auto;
  min-height:195px;
}
.cash-main {align-items:stretch}
.cash-column-scroll {
  flex:1 1 auto;
  display:flex;
  align-items:stretch;
  min-height:265px;
}
.cash-vertical-grid {flex:1 0 auto;align-items:stretch}
.cash-vertical-grid.cash-compact,.cash-vertical-grid.cash-expanded {align-items:stretch}
.cash-column {justify-content:flex-end}
.cash-column-plot {height:auto;min-height:190px;flex:1 1 auto}
.cash-vertical-grid.cash-compact .cash-column-plot {height:auto;min-height:180px}
@media (max-width:800px) {
  .balance-four-chart {min-height:230px}
  .balance-chart-track {min-height:160px}
  .fabric-bars:not(.fabric-all-months) {min-height:235px}
  .fabric-bars:not(.fabric-all-months) .fabric-bar-zone {min-height:155px}
  .cash-column-scroll {min-height:220px}
  .cash-column-plot {min-height:160px}
  .cash-vertical-grid.cash-compact .cash-column-plot {min-height:155px}
}

/* New priority-review report uses the shared compact spacing scale. */
.priority-head {min-height:0;padding:var(--report-head-padding-y) var(--report-head-padding-x);gap:9px}
.priority-head h3 {font-size:15px;line-height:1.55}
.priority-head p {margin:1px 0 0;line-height:1.5}
.priority-head-actions .quiet {padding:6px 9px;font-size:11px}
.priority-readonly {padding:5px 8px}
.priority-kpis {padding:9px 15px;gap:8px}
.priority-kpi {padding:7px 11px;gap:3px}
.priority-kpi span,.priority-kpi small {line-height:1.25}
@media(max-width:750px) {
  .priority-kpis {padding:8px 10px;gap:7px}
  .priority-kpi {padding:7px 9px;gap:3px}
  .priority-head h3 {font-size:14px}
}


/* Compact action cards: icon and headline share one row; no artificial card height. */
.priority-review .priority-advice-panel{padding:10px 14px 12px}
.priority-review .priority-advice-heading{align-items:center;gap:7px;margin-bottom:8px}
.priority-review .priority-advice-heading p{margin-top:2px;line-height:1.4}
.priority-review .priority-advice-grid{gap:8px;align-items:stretch}
.priority-review .priority-advice-card{
  min-height:0;justify-content:flex-start;align-items:stretch;
  padding:9px 11px;gap:3px
}
.priority-review .priority-advice-title{
  display:flex;align-items:center;gap:8px;min-width:0;width:100%;
}
.priority-review .priority-advice-title strong{font-size:12px;line-height:1.4}
.priority-review .priority-advice-icon{
  flex:0 0 23px;width:23px;height:23px;border-radius:7px;font-size:12px;
}
.priority-review .priority-advice-card>span:not(.priority-advice-title){
  font-size:10px;line-height:1.45
}
.priority-review .priority-advice-card small{font-size:10px;line-height:1.45;margin:0}
.priority-review .priority-kpis{padding:8px 14px;gap:7px}
.priority-review .priority-kpi{min-height:0;padding:6px 9px;gap:2px}
.priority-review .priority-kpi strong{font-size:clamp(18px,1.55vw,23px);line-height:1.15}
.priority-review .priority-kpi span,.priority-review .priority-kpi small{line-height:1.3}
@media(max-width:600px){
  .priority-review .priority-advice-panel{padding:9px 10px}
  .priority-review .priority-advice-card{padding:9px 10px}
  .priority-review .priority-kpis{padding:7px 10px}
}

/* Asset analysis, original ARPA BeginningBookValue/Cogs sources.
   Initial group bars fit the card; details use pagination plus a
   bounded internal scroll viewport. */
.assets-report{min-width:0;overflow:hidden;margin:15px 0 18px;padding:0;border-radius:14px}
.assets-head{display:flex;align-items:center;justify-content:space-between;gap:9px;
  flex-wrap:wrap;padding:var(--report-head-padding-y) var(--report-head-padding-x);background:#fff;border-bottom:1px solid var(--line)}
.assets-head h3{margin:0;font-size:15px;line-height:1.55;font-weight:800;color:#284449}
.assets-head p{margin:1px 0 0;font-size:11px;line-height:1.5;color:#81908f}
.assets-head button{font-size:11px;padding:6px 9px}
.assets-state{min-height:230px;padding:24px;display:flex;flex-direction:column;
  align-items:center;justify-content:center;gap:12px;text-align:center;font-size:12px}
.assets-state .skeleton{width:min(600px,78%)}
.assets-state .skeleton.short{width:40%}
.assets-state .notice{max-width:100%}
.assets-metrics{display:grid;grid-template-columns:1.65fr repeat(3,minmax(0,1fr));
  gap:8px;padding:9px 15px}
.assets-metric{min-width:0;padding:var(--report-kpi-padding-y) var(--report-kpi-padding-x);border:1px solid #e9efed;
  background:#f4f7f7;border-radius:10px;display:flex;flex-direction:column;gap:3px}
.assets-metric.assets-metric-featured{background:#eaf7f1;border-color:#d8ebdf}
.assets-metric span{font-size:10px;color:#718482;line-height:1.25}
.assets-metric strong{font-size:clamp(15px,1.55vw,23px);font-weight:800;
  line-height:1.22;color:#263e44;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.assets-metric small{font-size:10px;color:#879592;line-height:1.25}
.assets-metric strong.negative{color:#b5504e}
.assets-insight{display:flex;align-items:center;gap:8px 12px;flex-wrap:wrap;
  margin:0 17px 12px;padding:10px 12px;background:#f7f8f2;border:1px solid #edece0;
  border-radius:9px;font-size:11px;line-height:1.9;color:#667771}
.assets-insight strong{color:#495f55;white-space:nowrap;font-size:11px}
.assets-insight span{flex:1;min-width:200px}
.assets-insight button{padding:6px 9px;font-size:10px}
.assets-workspace{display:grid;grid-template-columns:minmax(0,1.18fr) minmax(0,1fr);
  direction:rtl;align-items:stretch;border-top:1px solid var(--line)}
.assets-chart-panel,.assets-detail-panel{padding:15px 16px;min-width:0}
.assets-chart-panel{border-left:1px solid var(--line);display:flex;flex-direction:column;min-height:0}
.assets-section-heading{display:flex;align-items:start;justify-content:space-between;
  flex-wrap:wrap;gap:9px;min-height:0;margin-bottom:9px}
.assets-section-heading h4{font-size:13px;font-weight:800;color:#2d494d;margin:0;line-height:1.6}
.assets-section-heading p{font-size:10px;color:#879691;line-height:1.7;margin:4px 0 0}
.assets-section-heading .quiet{padding:6px 9px;font-size:10px}
.assets-count{font-size:10px;color:#83948f;white-space:nowrap}
.assets-chart{width:100%;min-width:0;min-height:330px;flex:1 1 auto;
  display:flex;direction:rtl;justify-content:space-around;
  gap:clamp(2px,.5vw,8px);align-items:stretch;padding:6px 3px 4px;
  overflow-x:hidden;overflow-y:visible}
.assets-column{--assets-fill:#249875;display:flex;align-items:center;flex-direction:column;
  flex:1 1 0;min-width:0;max-width:100%;gap:7px;background:transparent;
  font-family:inherit;cursor:pointer;justify-content:flex-end;padding:7px 2px 9px;
  border:1px solid transparent;border-radius:10px;color:#445b5b;
  transition:background .16s,border-color .16s}
.assets-column:nth-child(7n+2){--assets-fill:#378aac}
.assets-column:nth-child(7n+3){--assets-fill:#8b72af}
.assets-column:nth-child(7n+4){--assets-fill:#c58d40}
.assets-column:nth-child(7n+5){--assets-fill:#d06a5b}
.assets-column:nth-child(7n+6){--assets-fill:#388e86}
.assets-column:nth-child(7n+7){--assets-fill:#6c8c72}
.assets-column:hover{background:#f5faf7;border-color:#dce9e2}
.assets-column.selected{background:#edf8f2;border-color:#94cdb1;
  box-shadow:inset 0 0 0 1px #c9e4d5}
.assets-column:focus-visible{outline:2px solid #378c75;outline-offset:2px}
.assets-plot{display:block;position:relative;width:100%;height:auto;min-height:245px;flex:1 1 auto;
  border-bottom:1px solid #c8d7d5;
  background:repeating-linear-gradient(to top,transparent 0,transparent 45px,
    #e8eeec 46px,#e8eeec 47px)}
.assets-bar{display:block;position:absolute;right:29%;width:45%;bottom:0;
  border-radius:3px 3px 0 0;
  background:linear-gradient(110deg,color-mix(in srgb,var(--assets-fill) 85%,white),var(--assets-fill));
  box-shadow:0 3px 8px #213e3014;transition:height .17s}
.assets-bar::before{content:"";position:absolute;right:-7px;top:0;bottom:0;width:7px;
  background:color-mix(in srgb,var(--assets-fill) 75%,black);
  transform:skewY(-37deg);transform-origin:bottom left}
.assets-bar::after{content:"";position:absolute;top:-7px;height:7px;left:4px;right:-4px;
  background:color-mix(in srgb,var(--assets-fill) 55%,white);
  transform:skewX(-45deg);transform-origin:bottom left}
.assets-bar.negative{--assets-fill:#b94f50}
.assets-bar.zero{height:2px!important;background:#b9c7c4}
.assets-bar.zero::before,.assets-bar.zero::after{display:none}
.assets-bar-value{position:absolute;z-index:2;left:-3px;right:-3px;display:block;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  font-size:10px;font-weight:800;text-align:center;color:#344c50;
  pointer-events:none;text-shadow:0 1px 2px white}
.assets-column-label{display:flex;flex-direction:column;align-items:center;gap:3px;
  text-align:center;line-height:1.65;min-height:43px;max-height:43px;flex:0 0 43px;width:100%;min-width:0}
.assets-column-label strong{font-size:11px;font-weight:850;color:#385258}
.assets-column-label span{font-size:9px;font-weight:600;color:#758581;width:100%;
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;
  overflow:hidden;overflow-wrap:anywhere}
.assets-column.selected .assets-column-label span{color:#2a7959}
.assets-chart.expanded{flex:0 0 auto;min-height:0;align-items:flex-start;flex-wrap:wrap;justify-content:stretch}
.assets-chart.expanded .assets-plot{height:235px;min-height:235px;flex:none}
.assets-chart.expanded .assets-column{flex:0 0 calc((100% - 7*8px)/8);
  max-width:calc((100% - 7*8px)/8)}
.assets-chart-caption{border-top:1px solid #edf0ef;display:flex;align-items:center;
  justify-content:space-between;gap:8px 16px;flex-wrap:wrap;
  font-size:10px;color:#81908c;line-height:1.8;padding-top:8px;margin-top:6px}
.assets-selected-total{display:flex;justify-content:space-between;align-items:center;
  flex-wrap:wrap;gap:8px;padding:10px 12px;background:#edf8f2;
  border:1px solid #daebdf;border-radius:9px;margin-bottom:11px}
.assets-selected-total span{font-size:10px;color:#628073}
.assets-selected-total strong{font-size:15px;font-weight:800;color:#24664e}
.assets-selected-total strong small{font-size:10px;font-weight:500}
.assets-detail-loading{min-height:190px;display:flex;align-items:center;
  justify-content:center;flex-direction:column;gap:9px;text-align:center;
  padding:15px;font-size:11px;color:#758a86}
.assets-detail-loading .notice{max-width:100%}
.assets-detail-actions{display:flex;gap:8px;align-items:center;margin-bottom:10px}
.assets-detail-actions input,.assets-detail-actions select{min-height:35px;font-size:11px;
  padding:6px 9px}
.assets-detail-actions input{flex:1;min-width:0;max-width:none}
.assets-detail-actions select{flex:0 0 160px;max-width:160px}
.assets-table-box{min-width:0;overflow:visible;border:1px solid #e0e8e6;border-radius:9px}
.assets-table{border-collapse:collapse;width:100%;table-layout:fixed;font-size:11px}
.assets-table thead{background:#f0f4f3}
.assets-table th{font-size:10px;color:#627a77;border-bottom:1px solid #dce6e3;
  padding:9px 8px;text-align:right}
.assets-table th:first-child{width:52%}
.assets-table th:nth-child(2){width:24%;text-align:left}
.assets-table th:nth-child(3){width:24%;text-align:left}
.assets-table td{padding:9px 8px;vertical-align:middle;
  border-bottom:1px solid #ecf1ef;color:#395054}
.assets-table tbody tr:nth-child(even){background:#fcfdfd}
.assets-table tbody tr:hover{background:#f5faf7}
.assets-table td:first-child{max-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.assets-table td strong{display:block;font-size:11px;color:#345052;font-weight:650;
  overflow:hidden;text-overflow:ellipsis}
.assets-table td small{display:block;margin-top:4px;font-size:10px;color:#92a19c}
.assets-money{text-align:left;white-space:nowrap;font-weight:750;
  font-size:11px;font-variant-numeric:tabular-nums;letter-spacing:-.15px}
.assets-money.negative{color:#b2514f}
.assets-empty{text-align:center;color:#87968e;font-size:11px;padding:16px}
.assets-pager{display:flex;align-items:center;justify-content:space-between;
  flex-wrap:wrap;gap:10px;margin-top:9px;color:#7c918c;font-size:11px}
.assets-pager>div{display:flex;align-items:center;gap:8px}
.assets-pager .quiet{padding:6px 8px;font-size:10px}
.assets-detail-note{font-size:10px;line-height:1.9;color:#8c9995;
  background:#f8faf9;border-radius:9px;margin-top:12px;padding:9px 11px}
.assets-foot{display:flex;align-items:center;justify-content:space-between;gap:8px 14px;
  flex-wrap:wrap;padding:10px 17px 12px;border-top:1px solid var(--line);
  color:#81918d;font-size:10px}
@media(max-width:1220px){
  .assets-workspace{grid-template-columns:minmax(0,1fr)}
  .assets-chart-panel{border-left:0;border-bottom:1px solid var(--line)}
  .assets-chart{flex:none;min-height:0}
  .assets-plot{height:245px;min-height:245px;flex:none}
}
@media(max-width:760px){
  .assets-metrics{grid-template-columns:repeat(2,minmax(0,1fr));padding:9px;gap:7px}
  .assets-metric.assets-metric-featured{grid-column:1/-1}
  .assets-metric strong{font-size:16px}
  .assets-head{padding:var(--report-head-padding-y) var(--report-head-padding-x)}
  .assets-chart-panel,.assets-detail-panel{padding:11px}
  .assets-chart{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));
    gap:6px;align-items:stretch}
  .assets-column{width:100%;padding:5px 2px}
  .assets-plot,.assets-chart.expanded .assets-plot{height:165px;min-height:165px;flex:none}
  .assets-chart.expanded .assets-column{max-width:100%;width:100%;flex:auto}
  .assets-bar-value{font-size:9px}
  .assets-detail-actions select{flex-basis:120px;max-width:120px}
  .assets-table th,.assets-table td{padding:8px 5px}
  .assets-table td,.assets-money{font-size:10px}
  .assets-insight{margin:0 9px 9px}
  .assets-foot{padding:10px}
}
@media(prefers-reduced-motion:reduce){
  .assets-bar,.assets-column{transition:none}
}

/* Compact desktop navigation rail + mobile drawer, 2026-11-14. */
/* Follow HarirOrders: a 64px icon rail is the desktop default. */
.hd-side-top {display:flex;align-items:center;min-width:0;gap:6px}
.side .brand {flex:1;min-width:0;margin:0;padding:5px 0 14px;gap:9px;white-space:nowrap}
.hd-brand-text {min-width:0;line-height:1.5}
.hd-brand-text small {display:block}
.side .brand-mark {display:grid;place-items:center;flex:0 0 38px;height:38px;width:38px}
.hd-sidebar-toggle,.hd-side-mobile-close,.hd-mobile-trigger {
  display:grid;place-items:center;flex-shrink:0;cursor:pointer;
  border:1px solid #ffffff30;border-radius:8px;
  width:30px;height:30px;padding:5px;background:#ffffff0d;color:#d8e5e8;
}
.hd-sidebar-toggle svg,.hd-side-mobile-close svg,.hd-mobile-trigger svg {width:19px;height:19px}
.hd-sidebar-toggle:hover,.hd-side-mobile-close:hover {color:#fff;background:#ffffff1c;border-color:#ffffff60}
.hd-sidebar-toggle:focus-visible,.hd-side-mobile-close:focus-visible,
.hd-mobile-trigger:focus-visible {outline:2px solid #d4bd8c;outline-offset:2px}
.side nav .hd-nav-icon {width:19px;height:19px;flex:0 0 19px}
.side nav .hd-nav-label {overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hd-side-mobile-close,.hd-mobile-trigger,.hd-sidebar-backdrop {display:none}
@media(min-width:751px) {
  .shell .side {
    width:64px;min-width:64px;padding:16px 6px 10px;
    z-index:40;transition:width .2s ease,padding .2s ease;
  }
  html[data-hd-sidebar="expanded"] .shell .side {
    width:248px;min-width:248px;padding:18px 11px;
  }
  .side .hd-side-top {flex-direction:column;gap:6px;align-items:center}
  .side .brand {
    flex:0 0 auto;flex-direction:column;justify-content:center;
    align-items:center;gap:6px;width:100%;min-height:42px;
    padding:0 0 3px;
  }
  .side .hd-brand-text,.side .side-foot {display:none}
  .side .hd-sidebar-toggle {width:29px;height:29px}
  .side nav {
    display:grid;gap:5px;overflow-x:hidden;overflow-y:auto;
    min-height:0;padding-top:15px;scrollbar-width:thin;
  }
  .side nav a {
    justify-content:center;gap:0;padding:8px 5px;min-width:0;
    min-height:42px;border-right:3px solid transparent;
    border-radius:9px;white-space:nowrap;
  }
  .side nav a.active {border-right-color:#d4bd8c}
  .side nav .hd-nav-icon {width:21px;height:21px;flex-basis:21px}
  .side nav .hd-nav-label {display:none}
  html[data-hd-sidebar="expanded"] .side .hd-side-top {flex-direction:row;gap:7px}
  html[data-hd-sidebar="expanded"] .side .brand {
    flex:1;flex-direction:row;justify-content:flex-start;
    width:auto;min-height:51px;padding:5px 2px 13px;
  }
  html[data-hd-sidebar="expanded"] .side .hd-brand-text {display:block;font-size:15px}
  html[data-hd-sidebar="expanded"] .side .hd-sidebar-toggle {margin-bottom:9px}
  html[data-hd-sidebar="expanded"] .side .hd-sidebar-toggle svg {transform:scaleX(-1)}
  html[data-hd-sidebar="expanded"] .side nav {padding-top:12px;gap:2px}
  html[data-hd-sidebar="expanded"] .side nav a {
    justify-content:flex-start;gap:11px;padding:10px 9px;
    min-height:41px;font-size:12px;
  }
  html[data-hd-sidebar="expanded"] .side nav .hd-nav-label {display:block}
  html[data-hd-sidebar="expanded"] .side nav .hd-nav-icon {
    width:19px;height:19px;flex-basis:19px;
  }
  html[data-hd-sidebar="expanded"] .side .side-foot {
    display:block;margin-top:auto;padding:16px 8px 8px;
    font-size:10px;text-align:center;white-space:nowrap;
  }
}
@media(max-width:750px) {
  /* A closed drawer has no layout footprint; charts receive full mobile width. */
  .shell #hd-sidebar {
    position:fixed;top:0;right:0;left:auto;z-index:81;
    width:min(290px,88vw);height:100dvh;max-height:100dvh;
    padding:14px 12px;display:flex;flex-direction:column;
    overflow:hidden;visibility:hidden;
    transform:translateX(105%);opacity:0;
    transition:transform .2s ease,opacity .2s ease,visibility .2s;
    box-shadow:-8px 0 30px #16282b29;
  }
  html[data-hd-mobile-menu="open"] .shell #hd-sidebar {
    visibility:visible;transform:translateX(0);opacity:1;
  }
  .side .hd-side-top {display:flex;flex-direction:row;align-items:center;gap:8px}
  .side .brand {padding:5px 1px 13px;gap:8px}
  .side .hd-brand-text {display:block;font-size:14px}
  .side .brand-mark {width:34px;height:34px;flex-basis:34px}
  .hd-sidebar-toggle {display:none}
  .hd-side-mobile-close {display:grid;width:31px;height:31px}
  #hd-sidebar nav {
    display:grid;align-content:start;gap:4px;
    overflow-x:hidden;overflow-y:auto;flex:1;
    padding-top:8px;scrollbar-width:thin;
  }
  #hd-sidebar nav a {
    display:flex;align-items:center;justify-content:flex-start;
    gap:11px;min-height:43px;padding:9px 11px;
    font-size:12px;white-space:nowrap;
  }
  #hd-sidebar nav .hd-nav-label {display:block}
  #hd-sidebar .side-foot {
    display:block;text-align:center;padding:12px 7px 5px;margin-top:auto;
    font-size:10px;
  }
  .hd-sidebar-backdrop {
    display:block;position:fixed;inset:0;z-index:80;
    border:0;width:100%;height:100%;padding:0;cursor:pointer;
    background:#1325277a;opacity:0;visibility:hidden;
    transition:opacity .2s ease,visibility .2s;
  }
  html[data-hd-mobile-menu="open"] .hd-sidebar-backdrop {opacity:1;visibility:visible}
  body.hd-mobile-menu-open {overflow:hidden}
  .header .hd-mobile-trigger {
    display:grid;order:0;flex:0 0 36px;width:36px;height:36px;
    color:#43595d;background:#fff;border-color:#dce4e4;
  }
  .header .hd-mobile-trigger:hover {background:#f4f7f6;border-color:#aebfbd}
  .header .header-actions {order:1;flex:1 1 auto;justify-content:flex-end}
  .header .header-primary {order:2;flex:1 1 100%}
}
@media(prefers-reduced-motion:reduce) {
  .shell .side,.hd-sidebar-backdrop {transition:none!important}
}


/* App-shell scrolling: report workspace only (2026-11-14). */
/* Lock the document to the visual viewport. The content panel itself is the
   scroll container, so navigation and header never travel with the reports. */
html, body {
  height:100%;
  width:100%;
  overflow:hidden;
}
.shell {
  height:100vh;                 /* fallback for older browsers */
  height:100dvh;
  min-height:0;
  max-height:100dvh;
  overflow:hidden;
  align-items:stretch;
}
.shell > .side {
  position:relative;
  top:auto;
  height:100%;
  max-height:100%;
  align-self:stretch;
  flex-shrink:0;
}
.shell > .workspace {
  flex:1 1 auto;
  display:flex;
  flex-direction:column;
  height:100%;
  min-height:0;
  min-width:0;
  overflow:hidden;
  align-self:stretch;
}
.shell > .workspace > .header {
  position:relative;
  top:auto;
  flex:0 0 auto;
  z-index:30;
}
.shell > .workspace > .content {
  display:block;
  flex:1 1 auto;
  width:100%;
  max-width:1800px;
  min-width:0;
  min-height:0;
  margin:0 auto;
  overflow-y:auto;
  overflow-x:auto;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  scrollbar-color:#c4d2d0 transparent;
  -webkit-overflow-scrolling:touch;
}
@media(max-width:750px) {
  .shell {display:block;height:100dvh;max-height:100dvh}
  .shell > .workspace {width:100%;height:100%;min-height:0}
  .shell > .workspace > .content {min-height:0}
}

/* Place the content scroller against the RTL sidebar, while keeping all
   report/page content RTL. The scroll container alone uses LTR for the thumb. */
.shell > .workspace > .content {
  direction:ltr;
  max-width:none;
  margin:0;
}
.shell > .workspace > .content > * {
  direction:rtl;
}


/* 01.15 — Salary and sofa production: two compact, responsive independent
   charts with accessible selection; never force default horizontal scroll. */
.monthly-insights-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;margin:15px 0}
.monthly-insights-grid.single{grid-template-columns:minmax(0,1fr)}
.monthly-personnel-report,.sofa-monthly-report{margin:0;min-width:0;
  padding:0;border-radius:14px;overflow:hidden}
.monthly-personnel-heading,.sofa-monthly-head{display:flex;align-items:center;
  justify-content:space-between;gap:9px;flex-wrap:wrap;
  padding:13px 14px;background:#fff;border-bottom:1px solid var(--line)}
.monthly-personnel-heading h3,.sofa-monthly-head h3{font-size:14px;font-weight:800;
  margin:0;color:#29464b;line-height:1.65}
.monthly-personnel-heading p,.sofa-monthly-head p{font-size:10px;color:#80908d;
  margin:3px 0 0;line-height:1.8}
.monthly-personnel-actions{display:flex;align-items:center;flex-wrap:wrap;gap:7px}
.monthly-personnel-actions select{max-width:175px;width:145px;min-height:35px;
  font-size:11px;padding:6px 9px}
.monthly-personnel-actions .quiet,.sofa-monthly-head .quiet{font-size:10px;padding:7px 9px}
.monthly-chart-state{min-height:310px;padding:20px;display:flex;align-items:center;
  justify-content:center;flex-direction:column;gap:12px;text-align:center;font-size:11px}
.monthly-chart-state .skeleton{width:min(80%,440px)}
.monthly-chart-state .skeleton.short{width:38%}
.monthly-chart-state .notice{max-width:100%}
.monthly-personnel-stats,.sofa-summary{display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;padding:11px 12px}
.monthly-personnel-stats>div,.sofa-summary>div{display:flex;flex-direction:column;gap:5px;
  min-width:0;background:#f4f7f7;border:1px solid #ebf0ef;
  border-radius:9px;padding:9px 10px}
.monthly-personnel-stats>div:first-child,.sofa-summary>div:first-child{background:#eaf7f1;border-color:#d9ece1}
.monthly-personnel-stats span,.sofa-summary span{font-size:9px;color:#758784;line-height:1.7}
.monthly-personnel-stats strong,.sofa-summary strong{font-size:clamp(12px,1.1vw,17px);
  font-weight:800;color:#28444b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.monthly-personnel-stats small,.sofa-summary small{font-size:9px;color:#81918d}
.sofa-summary strong small{font-weight:450}
.monthly-personnel-subhead{display:flex;justify-content:space-between;gap:10px;
  padding:6px 14px 0;color:#738886;font-size:10px}
.monthly-personnel-subhead span:first-child{font-weight:750;color:#45635e}
.monthly-personnel-bars{display:flex;align-items:end;justify-content:space-between;gap:2px;
  width:100%;min-width:0;direction:rtl;padding:7px 10px 10px}
.monthly-personnel-month{--salary-color:#3c8eae;flex:1 1 0;min-width:0;
  max-width:100%;background:transparent;border:1px solid transparent;
  border-radius:9px;display:flex;flex-direction:column;align-items:center;
  padding:6px 2px 8px;gap:4px;font-family:inherit;color:#51646a;cursor:pointer;
  transition:background .14s,border-color .14s}
.monthly-personnel-month:nth-child(6n+2){--salary-color:#3677ab}
.monthly-personnel-month:nth-child(6n+3){--salary-color:#7366a8}
.monthly-personnel-month:nth-child(6n+4){--salary-color:#aa719d}
.monthly-personnel-month:nth-child(6n+5){--salary-color:#32958b}
.monthly-personnel-month:nth-child(6n+6){--salary-color:#b68661}
.monthly-personnel-month:hover{background:#f5faf8;border-color:#e1e9e8}
.monthly-personnel-month.selected{background:#edf7f4;border-color:#9ccdb7}
.monthly-personnel-month:focus-visible{outline:2px solid #297e6c;outline-offset:2px}
.monthly-personnel-plot{display:block;position:relative;width:100%;height:196px;
  border-bottom:1px solid #d3dddc;
  background:repeating-linear-gradient(to top,transparent 0,transparent 46px,
    #e9efed 47px,#e9efed 48px)}
.monthly-personnel-bar{position:absolute;right:22%;width:56%;bottom:0;display:block;
  border-radius:4px 4px 0 0;
  background:linear-gradient(110deg,color-mix(in srgb,var(--salary-color) 80%,white),
    var(--salary-color));box-shadow:0 3px 6px #234c6015;
  transition:height .18s}
.monthly-personnel-bar::before{content:"";position:absolute;top:0;bottom:0;right:-6px;
  width:6px;background:color-mix(in srgb,var(--salary-color) 75%,black);
  transform:skewY(-35deg);transform-origin:bottom left}
.monthly-personnel-bar::after{content:"";position:absolute;top:-6px;height:6px;left:3px;right:-3px;
  background:color-mix(in srgb,var(--salary-color) 58%,white);
  transform:skewX(-42deg);transform-origin:bottom left}
.monthly-personnel-bar.negative{--salary-color:#b95157}
.monthly-personnel-value{position:absolute;display:block;left:-3px;right:-3px;
  z-index:2;text-align:center;white-space:nowrap;overflow:hidden;
  text-overflow:ellipsis;pointer-events:none;
  font-size:10px;font-weight:800;color:#334d53;text-shadow:0 1px 2px white}
.monthly-personnel-month-name{font-size:9px;font-weight:750;color:#526765;width:100%;
  text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.monthly-personnel-people{font-size:9px;color:#82918c;white-space:nowrap}
.monthly-personnel-selected{display:grid;grid-template-columns:1fr 1.4fr 1fr;
  gap:8px;border-top:1px solid var(--line);padding:10px 12px}
.monthly-personnel-selected>div{min-width:0;display:flex;flex-direction:column;gap:5px;
  border-radius:8px;background:#f5f8f7;padding:9px 10px}
.monthly-personnel-selected>div:nth-child(2){background:#eaf7f0}
.monthly-personnel-selected span{font-size:10px;color:#7c8d88}
.monthly-personnel-selected strong{font-size:12px;font-weight:800;overflow:hidden;
  text-overflow:ellipsis;white-space:nowrap;color:#2d4e4f}
.monthly-personnel-selected strong small{font-size:9px;font-weight:450}
.monthly-personnel-footer,.sofa-monthly-footer{border-top:1px solid var(--line);
  padding:9px 12px;display:flex;align-items:center;justify-content:space-between;
  flex-wrap:wrap;gap:7px 12px;color:#879693;font-size:9px;line-height:1.8}

.sofa-monthly-visual{display:grid;grid-template-columns:minmax(0,1.18fr) minmax(0,1fr);
  align-items:center;gap:4px;padding:6px 12px 10px}
.sofa-donut-area{min-width:0;max-width:290px;aspect-ratio:1/1;position:relative;
  margin-inline:auto;width:100%}
.sofa-donut-svg{width:100%;height:100%;display:block;overflow:visible}
.sofa-donut-slice{cursor:pointer;transition:opacity .15s,stroke-width .15s;
  stroke-linecap:butt;outline:none}
.sofa-donut-slice:hover,.sofa-donut-slice.selected{stroke-width:46;opacity:.96}
.sofa-donut-slice:focus{outline:2px solid #267d6c}
.sofa-donut-core{position:absolute;inset:31%;display:flex;flex-direction:column;
  align-items:center;justify-content:center;text-align:center;gap:5px;pointer-events:none}
.sofa-donut-core span{font-size:11px;color:#65837a}
.sofa-donut-core strong{font-size:clamp(19px,2.2vw,31px);color:#25454a;
  font-weight:850;font-variant-numeric:tabular-nums}
.sofa-donut-core small{font-size:10px;color:#8a9c94}
.sofa-month-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  align-content:center;gap:5px;min-width:0}
.sofa-month-item{min-width:0;padding:7px 8px;border:1px solid #ecf0ed;
  background:#fff;border-radius:8px;display:flex;align-items:center;
  text-align:right;gap:5px;cursor:pointer;font-family:inherit}
.sofa-month-item:hover{background:#f6faf7;border-color:#c8dfd4}
.sofa-month-item.selected{background:#edf7f2;border-color:#93c9ad}
.sofa-month-item:focus-visible{outline:2px solid #357b67;outline-offset:2px}
.sofa-month-item i{flex:0 0 7px;height:7px;border-radius:3px}
.sofa-month-item>span{font-size:10px;color:#516765;min-width:0;flex:1;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sofa-month-item strong{font-size:11px;color:#28494a;font-weight:800}
.sofa-month-item small{font-size:9px;color:#95a19c}
.sofa-monthly-footnote{display:flex;align-items:center;gap:8px;flex-wrap:wrap;
  padding:9px 12px;border-top:1px solid var(--line)}
.sofa-monthly-footnote>div{display:flex;gap:8px;align-items:center;
  border:1px solid #e7eeeb;background:#f5f8f6;border-radius:8px;
  padding:7px 9px;font-size:10px}
.sofa-monthly-footnote>div span{color:#83918c}
.sofa-monthly-footnote>div strong{color:#2d6051;font-weight:800}
.sofa-monthly-note{font-size:9px;color:#83938d;line-height:1.8}
@media(max-width:1200px){
  .monthly-insights-grid{grid-template-columns:minmax(0,1fr)}
  .sofa-monthly-visual{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
}
@media(max-width:670px){
  .monthly-personnel-heading,.sofa-monthly-head{padding:11px}
  .monthly-personnel-stats,.sofa-summary{padding:8px;gap:6px}
  .monthly-personnel-stats>div,.sofa-summary>div{padding:7px}
  .monthly-personnel-stats strong,.sofa-summary strong{font-size:12px}
  .monthly-personnel-bars{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));
    gap:6px 2px;align-items:end;padding:6px}
  .monthly-personnel-plot{height:133px}
  .monthly-personnel-bar{right:28%;width:44%}
  .monthly-personnel-value{font-size:9px}
  .monthly-personnel-month-name{font-size:9px}
  .monthly-personnel-selected{gap:5px;padding:8px}
  .monthly-personnel-selected>div{padding:7px}
  .monthly-personnel-selected strong{font-size:10px}
  .sofa-monthly-visual{grid-template-columns:minmax(0,1fr);padding:6px 10px}
  .sofa-donut-area{max-width:255px}
  .sofa-month-list{grid-template-columns:repeat(3,minmax(0,1fr))}
  .sofa-month-item{padding:7px 6px}
}
@media(max-width:420px){
  .sofa-month-list{grid-template-columns:repeat(2,minmax(0,1fr))}
  .monthly-personnel-actions select{max-width:145px;width:120px}
}
@media(prefers-reduced-motion:reduce){
  .sofa-donut-slice,.monthly-personnel-bar,.monthly-personnel-month{transition:none}
}


/* 01.16 — dining-table / coffee-table monthly production dashboard.
   All 12 months fit without horizontal scroll; responsive grid wraps on mobile.
   Interactive selection does not trigger SQL: entire month series is cached. */
.furniture-duo-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;margin:15px 0;direction:rtl}
.furniture-duo-grid.single{grid-template-columns:minmax(0,1fr)}
.furniture-monthly-panel{min-width:0;overflow:hidden;margin:0;padding:0;border-radius:13px}
.furniture-panel-head{display:flex;justify-content:space-between;align-items:center;
  flex-wrap:wrap;gap:9px;padding:13px 14px;background:#fff;border-bottom:1px solid var(--line)}
.furniture-panel-head h3{font-size:14px;font-weight:800;color:#2d494e;line-height:1.65;margin:0}
.furniture-panel-head p{font-size:10px;margin:3px 0 0;line-height:1.7;color:#899695}
.furniture-panel-head .quiet{font-size:10px;padding:7px 10px;white-space:nowrap}
.furniture-monthly-state{min-height:290px;padding:25px;display:flex;align-items:center;
  justify-content:center;flex-direction:column;gap:12px;text-align:center;font-size:11px}
.furniture-monthly-state .skeleton{width:min(80%,480px)}
.furniture-monthly-state .skeleton.short{width:43%}
.furniture-monthly-state .notice{max-width:100%}
.furniture-panel-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;padding:12px 13px}
.furniture-kpi{min-width:0;border:1px solid #e9efec;background:#f4f7f6;
  border-radius:9px;padding:9px 11px;display:flex;flex-direction:column;gap:5px}
.furniture-kpi.main{background:#e9f6ee;border-color:#d8eddf}
.coffee-panel .furniture-kpi.main{background:#f1f7ec;border-color:#e2eedd}
.furniture-kpi span{font-size:9px;color:#81928c;line-height:1.6}
.furniture-kpi strong{font-size:clamp(12px,1.3vw,20px);font-weight:850;color:#2b4749;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.furniture-kpi small{font-size:9px;color:#879892;line-height:1.7}
.furniture-chart-heading{display:flex;justify-content:space-between;align-items:center;
  gap:8px;flex-wrap:wrap;padding:4px 13px 8px}
.furniture-chart-heading h4{font-size:12px;font-weight:800;color:#3e5a59;margin:0}
.furniture-chart-heading p{font-size:10px;color:#8a9994;margin:3px 0 0}
.furniture-chart-heading .quiet{font-size:10px;padding:5px 8px}
.furniture-monthly-chart{display:flex;align-items:end;justify-content:space-around;
  direction:rtl;gap:2px;width:100%;min-width:0;padding:8px 7px 12px;overflow:visible}
.furniture-month{--furniture-fill:#268e74;flex:1 1 0;min-width:0;max-width:100%;
  display:flex;align-items:center;flex-direction:column;gap:5px;
  font-family:inherit;color:#566b67;cursor:pointer;
  background:transparent;border:1px solid transparent;border-radius:9px;padding:7px 1px 9px;
  transition:background .16s,border-color .16s}
.furniture-month:nth-child(8n+2){--furniture-fill:#238d70}
.furniture-month:nth-child(8n+3){--furniture-fill:#c36469}
.furniture-month:nth-child(8n+4){--furniture-fill:#b83446}
.furniture-month:nth-child(8n+5){--furniture-fill:#c89b3c}
.furniture-month:nth-child(8n+6){--furniture-fill:#cd863b}
.furniture-month:nth-child(8n+7){--furniture-fill:#347d9c}
.furniture-month:nth-child(8n+8){--furniture-fill:#8f75aa}
.coffee-panel .furniture-month{--furniture-fill:#78b84b}
.coffee-panel .furniture-month:nth-child(8n+2){--furniture-fill:#65ad35}
.coffee-panel .furniture-month:nth-child(8n+3){--furniture-fill:#aa8b81}
.coffee-panel .furniture-month:nth-child(8n+4){--furniture-fill:#bb716e}
.coffee-panel .furniture-month:nth-child(8n+5){--furniture-fill:#ca7d7a}
.coffee-panel .furniture-month:nth-child(8n+6){--furniture-fill:#92a45e}
.coffee-panel .furniture-month:nth-child(8n+7){--furniture-fill:#a9b64d}
.coffee-panel .furniture-month:nth-child(8n+8){--furniture-fill:#8a9f4c}
.furniture-month:hover{background:#f6faf8;border-color:#e0ede7}
.furniture-month.selected{background:#edf8f2;border-color:#9dcdb4;
  box-shadow:inset 0 0 0 1px #d1e9db}
.furniture-month:focus-visible{outline:2px solid #357c68;outline-offset:2px}
.furniture-plot{display:block;position:relative;width:100%;height:191px;
  border-bottom:1px solid #d7e1dd;
  background:repeating-linear-gradient(to top,transparent 0,transparent 45px,#eaf0ed 46px,#eaf0ed 47px)}
.furniture-bar{position:absolute;bottom:0;right:27%;width:48%;
  border-radius:3px 3px 0 0;display:block;
  background:linear-gradient(115deg,color-mix(in srgb,var(--furniture-fill) 80%,white),
    var(--furniture-fill));box-shadow:0 3px 8px #1c433518;
  transition:height .18s}
.furniture-bar::before{content:"";position:absolute;right:-6px;top:0;bottom:0;width:6px;
  background:color-mix(in srgb,var(--furniture-fill) 73%,black);
  transform:skewY(-34deg);transform-origin:bottom left}
.furniture-bar::after{content:"";position:absolute;top:-6px;height:6px;left:3px;right:-4px;
  background:color-mix(in srgb,var(--furniture-fill) 58%,white);
  transform:skewX(-42deg);transform-origin:bottom left}
.furniture-bar.negative{--furniture-fill:#b84950!important}
.furniture-value{position:absolute;z-index:2;left:-4px;right:-4px;
  display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;
  text-align:center;pointer-events:none;font-size:10px;font-weight:850;color:#304d4c;
  text-shadow:0 1px 2px white}
.furniture-zero{position:absolute;bottom:7px;left:0;right:0;
  font-size:10px;font-weight:600;color:#9aa7a3}
.furniture-month-name{font-size:9px;font-weight:800;text-align:center;color:#526a68;
  width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.furniture-month-year{font-size:9px;color:#9caaa5}
.furniture-monthly-chart.show-all{flex-wrap:wrap;justify-content:flex-start}
.furniture-monthly-chart.show-all .furniture-month{flex:0 0 calc((100% - 11*2px)/12)}
.furniture-month-detail{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;padding:10px 12px;border-top:1px solid #e9f0ed}
.furniture-month-detail>div{min-width:0;background:#f4f7f6;border:1px solid #ecf0ed;
  border-radius:8px;padding:9px 11px;display:flex;flex-direction:column;gap:6px}
.furniture-month-detail>div:nth-child(2){background:#e8f5ee;border-color:#d9ebdf}
.furniture-month-detail span{font-size:9px;color:#80938a;line-height:1.7}
.furniture-month-detail strong{font-size:13px;font-weight:800;color:#295149;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.furniture-month-detail strong small{font-size:9px;font-weight:450}
.furniture-monthly-footer{padding:9px 13px 11px;display:flex;align-items:center;
  flex-wrap:wrap;justify-content:space-between;gap:7px 12px;
  border-top:1px solid var(--line);font-size:9px;line-height:1.8;color:#82958e}
.furniture-monthly-footer b{font-weight:700}
@media(max-width:1220px){
  .furniture-duo-grid{grid-template-columns:minmax(0,1fr)}
  .furniture-monthly-chart{gap:4px}
}
@media(max-width:690px){
  .furniture-panel-head{padding:11px}
  .furniture-panel-kpis{padding:8px;gap:6px}
  .furniture-kpi{padding:8px}
  .furniture-kpi strong{font-size:13px}
  .furniture-monthly-chart{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));
    align-items:end;gap:7px 2px;padding:6px}
  .furniture-monthly-chart.show-all .furniture-month{max-width:100%;width:100%;flex:auto}
  .furniture-month{max-width:100%;width:100%}
  .furniture-plot{height:140px}
  .furniture-value{font-size:9px}
  .furniture-month-detail{padding:8px;gap:5px}
  .furniture-month-detail>div{padding:7px}
  .furniture-month-detail strong{font-size:11px}
  .furniture-monthly-footer{padding:9px}
}
@media(prefers-reduced-motion:reduce){
  .furniture-month,.furniture-bar{transition:none}
}


/* Shared, compact finance visualizations: expenses and monthly profit */
.finance-visual{margin-block:12px;min-width:0}
.finance-visual-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 16px;border-bottom:1px solid #e9edf2}
.finance-visual-head h3{font-size:14px;font-weight:750;margin:0}
.finance-visual-head .quiet{font-size:12px;padding:5px 10px}
.finance-visual-state{min-height:170px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;text-align:center;padding:20px}
.finance-visual-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:12px 14px}
.finance-visual-kpis>div{display:flex;flex-wrap:wrap;gap:4px 8px;align-items:baseline;border:1px solid #e8edf2;background:#fafbfd;border-radius:9px;padding:9px 12px;min-width:0}
.finance-visual-kpis span{font-size:12px;color:#64748b}
.finance-visual-kpis strong{font-size:16px;color:#253549;overflow-wrap:anywhere}
.finance-visual-kpis small{font-size:11px;color:#7b8797}
.expenses-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:0 14px 14px}
.finance-visual-section{min-width:0;border:1px solid #e9edf2;border-radius:10px;padding:10px}
.finance-visual-subhead{display:flex;gap:7px;align-items:center;justify-content:space-between;margin-bottom:4px}
.finance-visual-subhead h4{margin:0;font-size:13px}
.finance-visual-subhead small{font-size:11px;color:#748193;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}
.finance-bars-scroll{width:100%;min-width:0;overflow-x:hidden;overflow-y:hidden;padding:6px 0 2px}
.finance-bars{height:255px;display:flex;align-items:stretch;gap:7px;direction:rtl;min-width:0;width:100%;padding:4px 2px}
.finance-bar-item{border:0;background:transparent;color:inherit;font:inherit;min-width:0;flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;padding:0 1px;cursor:default}
button.finance-bar-item{cursor:pointer;border-radius:7px}
button.finance-bar-item:hover,button.finance-bar-item.selected{background:#f0f6fa}
.finance-bar-value{height:22px;font-size:11px;font-weight:700;color:#334155;white-space:nowrap}
.finance-bar-track{height:190px;width:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;border-bottom:1px solid #ced8e2;position:relative}
.finance-bar-track:before{content:"";position:absolute;inset:50% 0 auto;border-top:1px dashed #e9edf2;pointer-events:none}
.finance-bar-fill{display:block;width:min(67%,48px);border-radius:5px 5px 0 0;min-height:0;position:relative;transition:height .25s}
.finance-bar-fill.expense{background:linear-gradient(0deg,#647fa6,#a3bed8)}
.finance-bar-label{font-size:10px;line-height:1.4;text-align:center;min-height:26px;max-width:105px;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}
.finance-bars-monthly{min-width:0;width:100%}
.profit-legend{padding:0 15px 5px;display:flex;align-items:center;gap:16px;font-size:11px;color:#64748b}
.profit-legend span{display:inline-flex;align-items:center;gap:5px}
.profit-dot{width:8px;height:8px;display:inline-block;border-radius:50%}
.profit-dot.positive{background:#169b82}
.profit-dot.negative{background:#c8515a}
.profit-bars{min-width:0;height:285px;margin:0;width:100%}
.profit-bars .finance-bar-track{height:218px}
.finance-bar-fill.gain{background:linear-gradient(0deg,#0b766c,#36b59b)}
.finance-bar-fill.loss{background:linear-gradient(0deg,#a93642,#e17879)}
.negative-text{color:#ad3948}
@media(max-width:960px){.expenses-pair{grid-template-columns:1fr}.finance-visual-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.finance-visual-kpis{grid-template-columns:1fr}.finance-visual-subhead{flex-wrap:wrap}.finance-visual-head{padding:9px 12px}}

/* Charts must fit the actual card width: no artificial 960px chart or horizontal scrollbar. */
.finance-bars{gap:clamp(2px,0.5vw,7px)}
.finance-bar-item{overflow:hidden}
.finance-bar-value{max-width:100%;font-size:clamp(8px,0.85vw,11px);overflow:hidden;text-overflow:ellipsis;text-align:center}
.finance-bar-label{max-width:100%;overflow-wrap:anywhere}
.finance-bar-fill{max-width:80%}
@media(max-width:650px){
  .finance-bars{gap:2px}
  .finance-bar-value{font-size:9px}
  .finance-bar-label{font-size:9px}
}

/* Compact configuration screen; scroll only the data list, not the whole layout. */
.hd-source-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.hd-source-head h1{margin:0}
.hd-source-grid{display:grid;grid-template-columns:minmax(290px,.8fr) minmax(360px,1.2fr);gap:12px;align-items:start}
.hd-source-grid>.panel{min-width:0}
.hd-source-list{display:grid;gap:8px;max-height:480px;overflow:auto}
.hd-source-item{border:1px solid var(--line);border-radius:9px;padding:10px 12px;background:#fff}
.hd-source-item-title,.hd-source-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.hd-source-item-title{justify-content:space-between}
.hd-source-item small{display:block;color:var(--muted);overflow-wrap:anywhere;margin-top:2px}
.hd-source-actions{margin-top:8px}
.hd-source-actions .quiet{width:auto;padding:6px 10px;min-height:32px}
.hd-source-status{color:var(--muted);background:#f1f3f3;border-radius:7px;padding:2px 7px;font-size:11px}
.hd-source-status.active{background:#eaf2ef;color:#376d59}
.hd-source-fields,.hd-source-options,.hd-source-route-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.hd-source-fields>div,.hd-source-options>div,.hd-source-route-fields>div{min-width:0}
.hd-source-check{display:flex;align-items:center;gap:8px;grid-column:1/-1;margin:4px 0}
.hd-source-check input{width:16px;min-height:16px;accent-color:var(--accent)}
.hd-source-advanced{margin-top:12px;padding:10px;border:1px solid var(--line);border-radius:9px}
.hd-source-advanced summary{cursor:pointer;font-weight:600}
.hd-source-options{margin-top:12px;max-height:310px;overflow:auto}
.hd-source-form-actions{margin-top:12px}
.hd-source-routing{margin-top:12px}
.hd-source-route-fields{grid-template-columns:minmax(190px,1fr) minmax(190px,1fr) auto;align-items:end;margin-top:10px}
.hd-source-route-button button{min-height:40px;white-space:nowrap}
@media(max-width:900px){
 .hd-source-grid{grid-template-columns:minmax(0,1fr)}
 .hd-source-list{max-height:280px}
 .hd-source-route-fields{grid-template-columns:minmax(0,1fr)}
 .hd-source-fields,.hd-source-options{grid-template-columns:minmax(0,1fr)}
}


/* User administration: compact Rahgosha-style list, advanced filter drawer and edit dialog. */
.hd-users-page{min-width:0;display:grid;gap:12px}
.hd-users-pagehead{display:flex;align-items:center;justify-content:space-between;gap:12px}
.hd-users-pagehead h1{font-size:18px;margin:0;font-weight:700}
.hd-users-pageactions{display:flex;align-items:center;gap:8px}
.hd-users-btn{border:1px solid transparent;border-radius:8px;padding:8px 14px;min-height:36px;font-size:12px;font-weight:650;cursor:pointer;white-space:nowrap;margin:0}
.hd-users-btn.primary{background:#527e79;border-color:#527e79;color:#fff}
.hd-users-btn.primary:hover{background:#466f6a}
.hd-users-btn.secondary{background:white;border-color:#dce4e5;color:#344b52}
.hd-users-btn.secondary:hover{border-color:#a6babb;background:#f8faf9}
.hd-users-btn:disabled{opacity:.45;cursor:default}
.hd-users-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.hd-users-count{display:flex;align-items:center;gap:13px;text-align:right;background:#fff;border:1px solid var(--line);padding:10px 16px;border-radius:10px;cursor:pointer;color:var(--ink);min-width:0}
.hd-users-count strong{font-size:22px;font-weight:750;font-variant-numeric:tabular-nums}
.hd-users-count span{font-size:12px;color:var(--muted)}
.hd-users-count.selected{border-color:#9dbbb6;background:#f8fbfa}
.hd-users-count:hover{border-color:#b1c5c1}
.hd-users-list-panel{background:#fff;border:1px solid var(--line);border-radius:11px;display:flex;flex-direction:column;min-width:0;overflow:hidden}
.hd-users-toolbar{min-height:55px;padding:9px 14px;display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--line)}
.hd-users-filter-btn{display:flex;align-items:center;gap:7px}
.hd-users-filter-btn svg,.hd-users-edit-button svg,.hd-users-avatar svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.hd-users-filter-number{background:#edf2f2;border-radius:7px;padding:0 6px}
.hd-users-results{margin-inline-start:auto;color:var(--muted);font-size:12px}
.hd-users-link{font:inherit;font-size:12px;color:var(--accent);border:0;background:none;cursor:pointer}
.hd-users-table-scroll{height:min(56vh,530px);min-height:220px;overflow:auto;scrollbar-width:thin}
.hd-users-table{border-collapse:separate;border-spacing:0;min-width:660px;width:100%;table-layout:fixed}
.hd-users-table thead th{background:#f6f8f8;color:#5d7275;z-index:1;text-align:right;position:sticky;top:0;padding:11px 14px;font-size:12px;border-bottom:1px solid var(--line)}
.hd-users-table th:nth-child(1){width:22%}.hd-users-table th:nth-child(2){width:16%}
.hd-users-table th:nth-child(3){width:16%}.hd-users-table th:nth-child(4){width:28%}
.hd-users-table th:nth-child(5){width:10%}.hd-users-table th:nth-child(6){width:8%}
.hd-users-table td{padding:10px 14px;font-size:12px;vertical-align:middle;border-bottom:1px solid #eff2f2;overflow:hidden;text-overflow:ellipsis}
.hd-users-table td strong{font-weight:650}
.hd-users-table tbody tr:hover td{background:#fafcfc}
.hd-users-code{direction:ltr;unicode-bidi:isolate;display:inline-block}
.hd-users-company{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hd-users-actions-col{text-align:center!important}
.hd-users-pill{display:inline-flex;align-items:center;justify-content:center;font-size:11px;font-weight:650;border:1px solid transparent;padding:4px 9px;border-radius:40px}
.hd-users-pill.active{background:#edf5f1;color:#42745b;border-color:#dcebe3}
.hd-users-pill.inactive{background:#f4f5f5;color:#758187;border-color:#e5e9e9}
.hd-users-edit-button{height:30px;width:32px;display:inline-grid;place-items:center;border-radius:7px;border:1px solid #dce5e5;background:#fff;color:#4a6268;cursor:pointer}
.hd-users-edit-button:hover{background:#f3f8f7;border-color:#a5beba}
.hd-users-edit-button:disabled{opacity:.4;cursor:default}
.hd-users-self{font-size:11px;color:#7b898b;white-space:nowrap}
.hd-users-empty{padding:38px 12px!important;text-align:center;color:var(--muted)}
.hd-users-footer{padding:10px 14px;border-top:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:52px}
.hd-users-footer small{font-size:11px;color:var(--muted)}
.hd-users-footer>div{display:flex;gap:7px}
.hd-users-footer .hd-users-btn{min-height:30px;padding:5px 10px;font-size:11px}
.hd-users-mobile-cards{display:none}
.hd-users-message{border:1px solid #cddcdb;background:#f8fbfa;color:#365a5b;padding:9px 12px;border-radius:9px;display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:12px}
.hd-users-message button{border:0;background:transparent;color:inherit;font-size:20px;cursor:pointer}
.hd-users-overlay{position:fixed;inset:0;z-index:1200;display:flex;align-items:center;justify-content:center;padding:16px}
.hd-users-backdrop{position:absolute;inset:0;border:0;background:rgba(29,45,51,.4);cursor:default}
.hd-users-dialog{width:min(600px,100%);max-height:min(90vh,830px);z-index:1;background:#fff;border-radius:13px;border:1px solid #d9e3e4;box-shadow:0 20px 80px #1c303441;display:flex;flex-direction:column;overflow:hidden}
.hd-users-dialog-head,.hd-users-drawer-head{padding:14px 18px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:10px}
.hd-users-dialog-head h2,.hd-users-drawer-head h2{font-size:15px;margin:0;font-weight:700}
.hd-users-close{border:1px solid #e2e7e7;background:white;width:29px;height:29px;display:grid;place-items:center;border-radius:7px;cursor:pointer;color:#607176;font-size:21px;line-height:1}
.hd-users-dialog-body{overflow:auto;padding:16px 18px;scrollbar-width:thin;min-height:0}
.hd-users-dialog-body .notice{margin:0 0 12px;padding:9px 12px;font-size:12px}
.hd-users-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.hd-users-field{min-width:0}
.hd-users-field.full{grid-column:1/-1}
.hd-users-field label:not(.hd-users-checkbox){font-size:12px;margin:0 0 6px;color:#536b70}
.hd-users-field .field{min-height:38px;padding:8px 10px;font-size:13px;margin:0}
.hd-users-dialog-footer{padding:12px 18px;border-top:1px solid var(--line);display:flex;justify-content:flex-end;gap:8px}
.hd-users-edit-identity{display:flex;align-items:center;gap:10px;padding:9px 11px;background:#f7f9f9;border:1px solid var(--line);border-radius:9px;margin-bottom:14px}
.hd-users-edit-identity strong,.hd-users-person-name strong{display:block;font-size:13px}
.hd-users-edit-identity small,.hd-users-person-name small{display:block;color:var(--muted);font-size:11px}
.hd-users-avatar{width:37px;height:37px;flex:0 0 37px;display:grid;place-items:center;color:#607b7f;background:#eaf0f0;border-radius:9px}
.hd-users-avatar svg{width:20px;height:20px}
.hd-users-company-picker{border:1px solid var(--line);border-radius:8px;padding:7px 10px;display:flex;gap:8px 15px;flex-wrap:wrap;max-height:120px;overflow:auto}
.hd-users-checkbox{display:inline-flex;align-items:center;gap:8px;margin:0;font-size:12px;cursor:pointer;color:#465f66}
.hd-users-checkbox input{width:15px;height:15px;min-height:15px;accent-color:#527e79;margin:0}
.hd-users-account-active{padding-top:3px}
.hd-users-hint{font-size:11px;color:var(--muted);margin:8px 0 0}
.hd-users-password-section{border:1px solid var(--line);border-radius:8px;padding:10px 12px;margin-top:12px}
.hd-users-password-section summary{font-size:12px;font-weight:650;cursor:pointer}
.hd-users-password-section .hd-users-field{margin-top:10px}
.hd-users-filter-drawer{position:absolute;inset-block:0;right:0;z-index:1;width:min(385px,93vw);background:#fff;box-shadow:-12px 0 40px #192f3030;display:flex;flex-direction:column}
.hd-users-drawer-body{padding:17px;display:grid;align-content:start;gap:15px;overflow:auto;flex:1;min-height:0}
.hd-users-drawer-footer{padding:14px 17px;border-top:1px solid var(--line);display:flex;gap:9px}
.hd-users-drawer-footer .hd-users-btn{flex:1}
@media(max-width:700px){
 .hd-users-page{gap:10px}
 .hd-users-pagehead h1{font-size:16px}
 .hd-users-pageactions .hd-users-btn{padding:7px 9px;font-size:11px}
 .hd-users-summary{gap:6px}
 .hd-users-count{padding:9px 7px;display:flex;flex-direction:column;align-items:center;gap:3px}
 .hd-users-count strong{font-size:19px}
 .hd-users-count span{font-size:10px}
 .hd-users-table-scroll{display:none}
 .hd-users-mobile-cards{display:grid;gap:9px;padding:11px;max-height:58vh;overflow:auto;scrollbar-width:thin}
 .hd-users-mobile-card{border:1px solid var(--line);border-radius:10px;padding:11px;display:grid;gap:10px}
 .hd-users-mobile-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
 .hd-users-person{display:flex;align-items:center;gap:9px;min-width:0}
 .hd-users-person-name{min-width:0;overflow:hidden;text-overflow:ellipsis}
 .hd-users-mobile-metrics{display:grid;grid-template-columns:1fr 1.3fr;gap:9px}
 .hd-users-mobile-metrics>div{display:grid;gap:3px;min-width:0}
 .hd-users-mobile-metrics span{font-size:10px;color:var(--muted)}
 .hd-users-mobile-metrics strong{font-size:12px;font-weight:600;overflow:hidden;text-overflow:ellipsis}
 .hd-users-mobile-footer{border-top:1px solid var(--line);padding-top:9px;display:flex;justify-content:flex-end}
 .hd-users-mobile-footer .hd-users-btn{padding:6px 11px;min-height:30px;font-size:11px}
 .hd-users-dialog{position:absolute;bottom:0;max-height:91dvh;max-height:91vh;width:100%;border-radius:15px 15px 0 0}
 .hd-users-overlay{padding:0}
 .hd-users-dialog-body{padding:14px}
 .hd-users-fields{grid-template-columns:1fr;gap:10px}
 .hd-users-dialog-footer{padding:10px 14px}
 .hd-users-dialog-footer .hd-users-btn{flex:1}
 .hd-users-toolbar{padding:8px 10px}
 .hd-users-footer{padding:9px 10px}
}


/* Shared company/fiscal year and data source administration — match Users screen. */
.hd-settings-page{gap:11px}
.hd-settings-summary .hd-users-count{cursor:default}
.hd-settings-summary .hd-users-count:hover{border-color:var(--line)}
.hd-settings-toolbar-title{font-size:13px;font-weight:700;white-space:nowrap}
.hd-settings-search{width:min(330px,44vw);min-height:34px;margin:0;padding:7px 10px;font-size:12px}
.hd-settings-select{width:min(290px,40vw);min-height:34px;padding:6px 10px;margin:0;font-size:12px}
.hd-settings-table-scroll{height:auto;max-height:345px;min-height:0;overflow:auto}
.hd-settings-years-scroll{max-height:290px}
.hd-settings-table{table-layout:auto;min-width:850px}
.hd-settings-year-table{table-layout:auto;min-width:780px}
.hd-settings-table th,.hd-settings-year-table th{width:auto!important;padding:9px 12px}
.hd-settings-table td,.hd-settings-year-table td{padding:8px 12px}
.hd-settings-selected-row td{background:#f3f8f7}
.hd-settings-row-actions{display:flex;align-items:center;justify-content:center;gap:6px;white-space:nowrap}
.hd-settings-row-actions .hd-users-edit-button{flex:0 0 32px}
.hd-settings-routing{padding:13px 14px}
.hd-settings-route-top{display:grid;grid-template-columns:minmax(180px,1fr) minmax(220px,1.3fr) auto;gap:12px;align-items:end}
.hd-settings-route-top>.hd-users-btn{margin:0;align-self:end;min-height:38px}
.hd-settings-routing .hd-users-field .field{min-height:38px}
.hd-settings-section-title{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:11px 14px;border-top:1px solid var(--line);font-size:12px}
.hd-settings-section-title small{font-size:11px;color:var(--muted)}
.hd-settings-binding-scroll{max-height:370px;min-height:0;overflow:auto;padding:0 14px 10px;scrollbar-width:thin}
.hd-settings-binding-table{min-width:620px;table-layout:fixed}
.hd-settings-binding-table th,.hd-settings-binding-table td{padding:8px 10px}
.hd-settings-binding-table th:first-child{width:30%}
.hd-settings-binding-table th:nth-child(2){width:47%}
.hd-settings-binding-table th:nth-child(3){width:13%}
.hd-settings-binding-table th:last-child{width:10%}
.hd-settings-binding-table .field{min-height:33px;padding:5px 9px;margin:0;font-size:12px}
.hd-settings-binding-table .hd-users-btn{min-height:30px;padding:5px 10px}
.hd-settings-mapping{margin:0 14px 14px;border:1px solid var(--line);border-radius:9px;padding:10px 12px}
.hd-settings-mapping summary{font-weight:650;font-size:12px;cursor:pointer}
.hd-settings-mapping-fields{grid-template-columns:repeat(3,minmax(0,1fr)) auto;gap:10px;margin-top:12px}
.hd-settings-source-dialog{width:min(680px,100%)}
.hd-settings-source-advanced .hd-users-fields{margin-top:12px}
.hd-settings-confirm{width:min(410px,100%)}
.hd-settings-confirm p{font-size:13px;margin:0}
.hd-settings-confirm .hd-users-hint{font-size:11px;margin-top:10px}
.hd-sources-table{min-width:760px}
.hd-sources-table th:nth-child(1){width:20%!important}
.hd-sources-table th:nth-child(2){width:23%!important}
.hd-sources-table th:nth-child(3){width:19%!important}
.hd-sources-table th:nth-child(4){width:15%!important}
.hd-sources-table th:nth-child(5){width:11%!important}
.hd-sources-table th:nth-child(6){width:12%!important}
@media(max-width:800px){
 .hd-settings-route-top{grid-template-columns:repeat(2,minmax(0,1fr))}
 .hd-settings-mapping-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
 .hd-settings-route-top>.hd-users-btn{width:max-content}
 .hd-settings-section-title{flex-direction:column;align-items:flex-start}
}
@media(max-width:700px){
 .hd-settings-page .hd-users-pagehead{align-items:flex-start}
 .hd-settings-page .hd-users-pageactions{flex-wrap:wrap;justify-content:flex-end}
 .hd-settings-page .hd-users-pageactions .hd-users-btn{white-space:nowrap}
 .hd-settings-search{flex:1;width:auto;min-width:95px}
 .hd-settings-select{flex:1;width:auto;min-width:110px}
 .hd-settings-table-scroll,.hd-settings-years-scroll{display:none}
 .hd-settings-routing{padding:11px}
 .hd-settings-route-top,.hd-settings-mapping-fields{grid-template-columns:1fr}
 .hd-settings-route-top>.hd-users-btn{width:100%}
 .hd-settings-binding-scroll{padding:0 9px 9px;max-height:330px}
 .hd-settings-binding-table{min-width:570px}
 .hd-settings-binding-table th,.hd-settings-binding-table td{font-size:11px;padding:7px 8px}
 .hd-settings-source-dialog .hd-users-dialog-body{padding:12px 14px}
 .hd-settings-source-dialog .hd-users-fields{grid-template-columns:1fr}
 .hd-settings-mapping{margin:0 10px 10px}
}


/* Per-user dashboard report access, inside the existing compact user modal. */
.hd-user-report-access{border:1px solid var(--line);border-radius:9px;margin-top:13px;padding:11px 12px;min-width:0;background:#fff}
.hd-user-report-head{display:flex;align-items:baseline;justify-content:space-between;gap:8px;flex-wrap:wrap}
.hd-user-report-head strong{font-size:12px;color:var(--ink)}
.hd-user-report-head small{font-size:11px;color:var(--muted)}
.hd-user-report-modes{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin-top:13px}
.hd-user-report-modes .hd-users-checkbox{font-size:12px;min-height:26px}
.hd-user-report-tools{display:flex;align-items:center;gap:7px;margin:11px 0 7px;flex-wrap:wrap}
.hd-user-report-tools .hd-users-btn{min-height:30px;padding:5px 9px;font-size:11px}
.hd-user-report-tools span{font-size:11px;color:var(--muted);margin-inline-start:auto}
.hd-user-report-list{display:grid;gap:8px;max-height:270px;overflow:auto;scrollbar-width:thin;padding-inline-end:3px}
.hd-user-report-group{border:1px solid var(--line);border-radius:8px;overflow:hidden;background:#fff}
.hd-user-report-group-title{font-weight:650;font-size:11px;background:#f5f8f8;padding:6px 10px;border-bottom:1px solid var(--line)}
.hd-user-report-items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 10px;padding:9px 10px}
.hd-user-report-item{display:flex;align-items:center;min-width:0;font-size:11px;line-height:1.65}
.hd-user-report-item span{min-width:0;white-space:normal}
@media(max-width:700px){
 .hd-user-report-access{padding:10px}
 .hd-user-report-head{gap:4px}
 .hd-user-report-items{grid-template-columns:minmax(0,1fr)}
 .hd-user-report-list{max-height:220px}
 .hd-user-report-modes{gap:9px}
}

.hd-user-custom-mark{display:block;font-size:10px;color:#66807c;margin-top:3px}


/* Compact report details: show roughly five to six rows and scroll within the
   table, while keeping 50-record pagination, filters and charts outside it.
   This overrides older "overflow:visible" rules which expanded the dashboard. */
.cash-detail-panel .cash-table-shell.hd-detail-compact-scroll,
.fabric-detail-panel .fabric-list.hd-detail-compact-scroll,
.priority-workspace .priority-table-container.hd-detail-compact-scroll,
.assets-detail-panel .assets-table-box.hd-detail-compact-scroll {
    min-height:0;
    overflow-x:auto;
    overflow-y:auto;
    overscroll-behavior:contain;
    scrollbar-width:thin;
    scrollbar-color:#bdcfca transparent;
    scrollbar-gutter:stable;
}
.cash-detail-panel .cash-table-shell.hd-detail-compact-scroll{
    max-height:min(235px,40dvh); /* heading + ~5-6 rows */
}
.fabric-detail-panel .fabric-list.hd-detail-compact-scroll{
    max-height:min(260px,42dvh); /* heading + ~5-6 fabric rows */
}
.priority-workspace .priority-table-container.hd-detail-compact-scroll{
    max-height:min(300px,46dvh); /* heading + ~5-6 account rows */
}
.assets-detail-panel .assets-table-box.hd-detail-compact-scroll{
    max-height:min(270px,42dvh); /* heading + ~5-6 asset rows */
}
.cash-detail-panel .cash-table-shell.hd-detail-compact-scroll th,
.fabric-detail-panel .fabric-list.hd-detail-compact-scroll th,
.priority-workspace .priority-table-container.hd-detail-compact-scroll th,
.assets-detail-panel .assets-table-box.hd-detail-compact-scroll th {
    position:sticky;
    top:0;
    z-index:2;
    box-shadow:0 1px 0 #dfe8e5;
}
.cash-detail-panel .cash-table-shell.hd-detail-compact-scroll th{background:#f3f6f6}
.fabric-detail-panel .fabric-list.hd-detail-compact-scroll th{background:#f1f5f3}
.priority-workspace .priority-table-container.hd-detail-compact-scroll th{background:#f1f5f4}
.assets-detail-panel .assets-table-box.hd-detail-compact-scroll th{background:#f0f4f3}

/* The full list of asset groups uses a separate inner scroll when expanded.
   The normal eight-group chart remains unchanged. */
.assets-chart.expanded{
    max-height:min(305px,42dvh);
    overflow-y:auto;
    overflow-x:hidden;
    overscroll-behavior:contain;
    scrollbar-width:thin;
    scrollbar-color:#bdcfca transparent;
    align-content:start;
}

/* Orders become mobile cards below 900px. Keep their own viewport bounded. */
@media(max-width:900px){
    .priority-mobile-list.hd-detail-compact-scroll{
        max-height:min(340px,46dvh);
        min-height:0;
        overflow-x:hidden;
        overflow-y:auto;
        overscroll-behavior:contain;
        scrollbar-width:thin;
        scrollbar-color:#bdcfca transparent;
        align-content:start;
    }
}


/* Preserve equal-height two-column panels. Their chart content must grow
   with the compact detail side instead of leaving blank space beneath bars. */
.fabric-layout,.assets-workspace{align-items:stretch}
.fabric-chart-panel,.fabric-detail-panel,
.assets-chart-panel,.assets-detail-panel,
.cash-chart-panel,.cash-detail-panel{padding-block:11px}
.fabric-panel-heading,.assets-section-heading,
.cash-panel-title{margin-bottom:8px}
.fabric-selected-summary{padding:7px 10px;margin-bottom:8px;gap:3px}
.fabric-search{margin-bottom:7px;min-height:32px}
.cash-search{min-height:32px;margin-bottom:7px}
.cash-selected{margin-top:7px;padding:8px 10px;gap:3px}
.fabric-bar-zone{height:158px}
.assets-chart:not(.expanded){min-height:245px}
.assets-chart:not(.expanded) .assets-plot{min-height:175px}
.cash-vertical-grid.cash-compact .cash-column-plot{height:152px}
@media(max-width:800px){
 .fabric-bar-zone{height:132px}
 .cash-vertical-grid.cash-compact .cash-column-plot{height:126px}
 .assets-chart:not(.expanded){min-height:210px}
 .assets-chart:not(.expanded) .assets-plot{min-height:155px}
}


/* Isolate failures in the interactive order-review report without breaking
   the rest of the server-rendered dashboard. */
.hd-report-fault{
    display:flex;flex-direction:column;align-items:flex-start;
    gap:8px;padding:15px 18px;min-height:0;
    border:1px solid #e2e8e8;background:#fbfcfc;border-radius:10px;
}
.hd-report-fault strong{font-size:13px;color:#4a555c}
.hd-report-fault p{font-size:12px;color:#6b7880;margin:0}
.hd-report-fault .quiet{font-size:11px;margin-top:4px}


/* 2026-11-15: restore vertical chart fill after compacting the detail tables.
   Stretching the grid alone is insufficient for Fabric: each bar has its own
   fixed-height zone. Grow the chart track and its bar zones with the panel. */
@media(min-width:1181px){
  .fabric-chart-panel{
    display:flex;
    flex-direction:column;
    min-height:0;
  }
  .fabric-chart-panel .fabric-bars{
    flex:1 1 auto;
    min-height:225px;
    align-items:stretch;
  }
  .fabric-chart-panel .fabric-month{
    align-self:stretch;
  }
  .fabric-chart-panel .fabric-bar-zone{
    height:auto;
    min-height:150px;
    flex:1 1 auto;
  }
  .fabric-chart-panel .fabric-chart-footer{
    margin-top:auto;
  }
}
@media(min-width:1221px){
  .assets-chart-panel .assets-chart:not(.expanded){
    flex:1 1 auto;
    min-height:245px;
    align-items:stretch;
  }
  .assets-chart-panel .assets-chart:not(.expanded) .assets-column{
    align-self:stretch;
  }
  .assets-chart-panel .assets-chart:not(.expanded) .assets-plot{
    height:auto;
    min-height:175px;
    flex:1 1 auto;
  }
  .assets-chart-panel .assets-chart-caption{
    margin-top:auto;
  }
}
/* When stacked on narrow viewports, each chart keeps its natural compact
   height instead of stretching to match a separate table row. */
@media(max-width:1180px){
  .fabric-layout{align-items:start}
}
@media(max-width:1220px){
  .assets-workspace{align-items:start}
}


/* Fix 2.5D bar caps (assets, cash and fabric), 2026-11-15.
   Previous skewX/skewY pseudo-elements created visible white slits where the
   top face met the front face and the right side. Use matching polygons with
   a 1px overlap instead; they stay attached at any chart height/zoom. */
.assets-bar::before,
.cash-column-bar::before,
.fabric-bar::before{
    transform:none;
    transform-origin:center;
    border-radius:0;
    box-shadow:none;
}
.assets-bar::after,
.cash-column-bar::after,
.fabric-bar::after{
    transform:none;
    transform-origin:center;
    border-radius:0;
    box-shadow:none;
}
.assets-bar::before{
    top:-8px;
    bottom:0;
    right:-8px;
    width:9px;
    clip-path:polygon(0 8px,100% 0,100% 100%,0 100%);
}
.assets-bar::after{
    top:-8px;
    height:9px;
    left:0;
    right:-8px;
    clip-path:polygon(0 100%,8px 0,100% 0,calc(100% - 8px) 100%);
}
.cash-column-bar::before{
    top:-9px;
    bottom:0;
    right:-9px;
    width:10px;
    clip-path:polygon(0 9px,100% 0,100% 100%,0 100%);
}
.cash-column-bar::after{
    top:-9px;
    height:10px;
    left:0;
    right:-9px;
    clip-path:polygon(0 100%,9px 0,100% 0,calc(100% - 9px) 100%);
}
.fabric-bar::before{
    top:-7px;
    bottom:0;
    right:-7px;
    width:8px;
    clip-path:polygon(0 7px,100% 0,100% 100%,0 100%);
}
.fabric-bar::after{
    top:-7px;
    height:8px;
    left:0;
    right:-7px;
    clip-path:polygon(0 100%,7px 0,100% 0,calc(100% - 7px) 100%);
}

/* The asset amount now lives inside its actual bar instead of being placed
   independently using percentage-based positioning in the plot. */
.assets-bar .assets-bar-value{
    position:absolute;
    top:auto;
    right:auto;
    bottom:calc(100% + 11px);
    left:50%;
    transform:translateX(-50%);
    display:block;
    width:max-content;
    max-width:min(120px, 11vw);
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    line-height:1.4;
    z-index:4;
}
@media(max-width:760px){
    .assets-bar .assets-bar-value{
        max-width:90px;
        font-size:9px;
    }
}


/* Final 2.5D seam correction (asset, cash, fabric).
   The older front-face top border-radius leaves a white triangular hole
   between its clipped corner and the straight polygon top/side faces.
   Use a square top edge and explicit overlapping face paint order. */
.assets-bar:not(.zero),
.cash-column-bar,
.fabric-bar{
    border-radius:0 0 1px 1px;
    overflow:visible;
    isolation:isolate;
}
.assets-bar::before,
.cash-column-bar::before,
.fabric-bar::before{
    z-index:1;
}
.assets-bar::after,
.cash-column-bar::after,
.fabric-bar::after{
    z-index:2;
}
/* Keep value labels above both faces of the extruded bars. */
.assets-bar .assets-bar-value{z-index:3}


/* Optional company branding in the compact dashboard header and company admin. */
.header-dashboard-filters .hd-header-company-logo{
    width:36px;
    height:36px;
    flex:0 0 36px;
    object-fit:contain;
    border:1px solid #e0e8e8;
    border-radius:9px;
    background:#fff;
    padding:3px;
    box-sizing:border-box;
}
.hd-company-name-cell{
    display:inline-flex;
    align-items:center;
    gap:8px;
    max-width:100%;
    min-width:0;
    vertical-align:middle;
}
.hd-company-name-cell strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hd-company-logo-list,
.hd-company-logo-placeholder{
    display:grid;
    flex:0 0 30px;
    place-items:center;
    width:30px;
    height:30px;
    border:1px solid #e2e9e8;
    border-radius:8px;
    object-fit:contain;
    background:white;
    box-sizing:border-box;
}
.hd-company-logo-placeholder{color:#9ba9a8;background:#f7f9f9;font-size:11px}
.hd-company-logo-editor{
    display:flex;
    align-items:center;
    gap:15px;
    border:1px solid var(--line);
    border-radius:9px;
    padding:12px;
    background:#f9fbfb;
    min-width:0;
}
.hd-company-logo-preview{
    width:76px;
    height:76px;
    flex:0 0 76px;
    object-fit:contain;
    padding:5px;
    box-sizing:border-box;
    background:#fff;
    border:1px solid #dfe7e7;
    border-radius:11px;
}
.hd-company-logo-empty{
    display:grid;
    place-items:center;
    color:#8b9c9d;
    font-size:11px;
}
.hd-company-logo-controls{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    min-width:0;
    gap:7px;
}
.hd-company-logo-controls input[type=file]{
    width:100%;
    min-width:0;
    max-width:330px;
    font:inherit;
    font-size:11px;
    color:#4c6468;
}
.hd-company-logo-controls small{font-size:10px;color:var(--muted);line-height:1.65}
.hd-company-logo-controls .hd-users-btn{min-height:28px;padding:4px 10px}
@media(max-width:700px){
    .header-dashboard-filters .hd-header-company-logo{width:30px;height:30px;flex-basis:30px}
    .header-dashboard-filters .hd-header-company-filter{min-width:110px;flex:1 1 120px}
    .header-dashboard-filters .hd-header-company-filter label{display:none}
    .header-dashboard-filters .hd-header-company-filter select{min-width:80px}
    .hd-company-logo-editor{gap:9px;padding:9px;align-items:flex-start}
    .hd-company-logo-preview{width:64px;height:64px;flex-basis:64px}
}


/* Dashboard shell header — a soft stone/teal treatment with restrained gold accents.
   Intentionally scoped to the header: charts, admin forms and side menu are unchanged. */
.workspace > .header{
  background:linear-gradient(112deg,#ffffff 0%,#fbfdfc 52%,#f1f7f4 100%);
  border-bottom:1px solid #d8e5e0;
  box-shadow:0 2px 11px rgba(44,76,71,.075);
  position:sticky;
  isolation:isolate;
}
.workspace > .header::after{
  content:"";
  position:absolute;
  inset-inline:0;
  bottom:0;
  height:2px;
  pointer-events:none;
  background:linear-gradient(90deg,transparent 4%,#d9c4a0 42%,#a8c9bf 85%,transparent 100%);
  opacity:.48;
}
.header-dashboard-filters{
  align-items:center;
  gap:9px;
}
.header-dashboard-filters .hd-header-filter-card{
  min-height:43px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:4px 9px 4px 5px;
  background:rgba(255,255,255,.89);
  border:1px solid #dce9e4;
  border-radius:10px;
  box-shadow:0 1px 2px rgba(58,88,79,.035);
  transition:border-color .16s ease,background-color .16s ease,box-shadow .16s ease;
}
.header-dashboard-filters .hd-header-filter-card:hover{
  border-color:#a9c6bb;
  background:#fff;
  box-shadow:0 2px 8px rgba(44,86,71,.065);
}
.header-dashboard-filters .hd-header-filter-card:focus-within{
  border-color:#80aba0;
  box-shadow:0 0 0 3px rgba(118,164,150,.13);
}
.header-dashboard-filters .hd-header-filter-label{
  display:inline-flex;
  align-items:center;
  gap:5px;
  margin:0;
  font-size:11px;
  font-weight:650;
  color:#516a64;
  white-space:nowrap;
  cursor:pointer;
}
.header-dashboard-filters .hd-header-filter-label svg{
  width:16px;
  height:16px;
  flex:0 0 16px;
  color:#668d81;
}
.header-dashboard-filters .hd-header-filter-card select{
  width:auto;
  min-width:128px;
  max-width:235px;
  min-height:31px;
  padding:5px 9px;
  margin:0;
  border:1px solid transparent;
  border-radius:7px;
  background:#f4f8f6;
  color:#314b48;
  font-size:12px;
  font-weight:600;
  box-shadow:none;
  outline-offset:2px;
  cursor:pointer;
  transition:background-color .15s ease;
}
.header-dashboard-filters .hd-header-filter-card select:hover{
  background:#edf4f0;
}
.header-dashboard-filters .hd-header-filter-card select:focus{
  outline:2px solid #9abcb3;
  outline-offset:0;
  border-color:transparent;
  box-shadow:none;
}
.header-dashboard-filters .hd-header-filter-card select:disabled{
  opacity:.58;
  cursor:not-allowed;
}
.header-dashboard-filters .hd-header-company-filter .hd-header-company-logo{
  width:34px;
  height:34px;
  flex:0 0 34px;
  border:1px solid #d4e2dc;
  border-radius:8px;
  background:#fff;
  object-fit:contain;
  padding:3px;
}
.workspace > .header .header-actions{
  display:flex;
  align-items:center;
  gap:9px;
  margin-inline-start:auto;
  color:#3e5756;
}
.hd-header-user{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-width:0;
  padding:4px 10px 4px 5px;
  border:1px solid #e1e9e5;
  background:rgba(255,255,255,.7);
  border-radius:10px;
}
.hd-header-user-icon{
  width:29px;
  height:29px;
  flex:0 0 29px;
  display:grid;
  place-items:center;
  border-radius:8px;
  color:#48776d;
  background:#e8f2ec;
}
.hd-header-user-icon svg{width:18px;height:18px}
.hd-header-user-name{
  display:block;
  max-width:180px;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:12px;
  font-weight:650;
  color:#425958;
}
.header-actions .hd-header-logout{
  min-height:36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:6px 11px;
  color:#756755;
  border:1px solid #e9dfd0;
  background:#fbf8f2;
  border-radius:9px;
  font-size:12px;
  transition:background-color .16s ease,border-color .16s ease;
}
.header-actions .hd-header-logout:hover,
.header-actions .hd-header-logout:focus-visible{
  background:#f6edde;
  border-color:#d6bfa0;
  color:#6b5339;
}
.hd-header-logout svg{width:16px;height:16px;flex:0 0 16px}
.workspace > .header .hd-mobile-trigger{
  border-radius:9px;
  background:#f6f9f7;
  color:#54766f;
}
@media(max-width:1100px){
  .workspace > .header{gap:9px;padding-inline:12px}
  .header-dashboard-filters{gap:7px}
  .header-dashboard-filters .hd-header-filter-card{gap:5px;padding-inline:6px}
  .header-dashboard-filters .hd-header-filter-card select{min-width:95px;max-width:170px}
  .hd-header-user-name{max-width:125px}
}
@media(max-width:750px){
  .workspace > .header{
    padding:7px 10px;
    align-items:center;
    row-gap:7px;
  }
  .header .header-primary{min-width:0}
  .header-dashboard-filters{width:100%;gap:7px;align-items:stretch;flex-wrap:nowrap}
  .header-dashboard-filters .hd-header-filter-card{
    flex:1 1 0;
    min-width:0;
    min-height:39px;
    gap:4px;
    padding:3px 6px;
  }
  .header-dashboard-filters .hd-header-filter-card select{
    flex:1 1 0;
    min-width:0;
    max-width:none;
    padding:5px 4px;
    font-size:11px;
  }
  .header-dashboard-filters .hd-header-company-filter .hd-header-company-logo{
    width:30px;height:30px;flex-basis:30px;padding:2px;
  }
  .hd-header-user{padding:2px 6px;gap:5px}
  .hd-header-user-icon{width:27px;height:27px;flex-basis:27px}
  .hd-header-user-name{max-width:150px}
  .header-actions .hd-header-logout{min-height:32px;padding:5px 9px}
}
/* Earlier header CSS hid the company label on phones. Keep its icon visible. */
@media(max-width:700px){
  .header-dashboard-filters .hd-header-company-filter .hd-header-filter-label{display:inline-flex}
}
@media(max-width:480px){
  .header-dashboard-filters .hd-header-filter-label span{display:none}
  .header-dashboard-filters .hd-header-filter-label svg{width:16px;height:16px}
  .header-dashboard-filters .hd-header-filter-card{gap:4px}
  .header-dashboard-filters .hd-header-company-filter .hd-header-company-logo{
    width:27px;height:27px;flex-basis:27px;
  }
  .hd-header-user-name{max-width:115px;font-size:11px}
  .header-actions .hd-header-logout{gap:4px;padding:5px 7px}
}
@media(prefers-reduced-motion:reduce){
  .header-dashboard-filters .hd-header-filter-card,
  .header-dashboard-filters .hd-header-filter-card select,
  .header-actions .hd-header-logout{transition:none}
}

/* Self-service account profile — compact, light, RTL and visually aligned
   with user management and the dashboard header. */
.workspace > .header a.hd-header-user{
    color:#425958;
    text-decoration:none;
    cursor:pointer;
    transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease;
}
.workspace > .header a.hd-header-user:hover,
.workspace > .header a.hd-header-user:focus-visible{
    color:#314e47;
    border-color:#a4c9b9;
    background:#eff7f3;
    box-shadow:0 0 0 3px rgba(128,171,152,.11);
    text-decoration:none;
}
.workspace > .header a.hd-header-user:hover .hd-header-user-icon{
    background:#dceee5;
}
.hd-my-profile{
    width:min(1050px,100%);
    margin:0 auto;
    display:grid;
    gap:12px;
    min-width:0;
}
.hd-my-profile-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}
.hd-my-profile-heading{display:flex;align-items:center;gap:9px}
.hd-my-profile-head h1{font-size:18px;margin:0;font-weight:750}
.hd-my-profile-heading-icon,
.hd-my-profile-section-icon{
    display:grid;
    place-items:center;
    border-radius:9px;
    background:#edf5f1;
    color:#547e70;
    flex-shrink:0;
}
.hd-my-profile-heading-icon{width:36px;height:36px}
.hd-my-profile-heading-icon svg{width:19px;height:19px}
.hd-my-profile-section-icon{width:31px;height:31px}
.hd-my-profile-section-icon svg{width:17px;height:17px}
.hd-my-profile-return{
    display:inline-flex;
    align-items:center;
    gap:5px;
    justify-content:center;
    text-decoration:none!important;
    font-size:11px;
}
.hd-my-profile-return svg{width:15px;height:15px}
.hd-my-profile-loading{
    padding:30px 15px;
    text-align:center;
    background:#fff;
    border:1px solid var(--line);
    border-radius:11px;
    color:var(--muted);
}
.hd-my-profile-notice{
    display:flex;
    align-items:center;
    gap:10px;
    padding:10px 13px;
    border-radius:9px;
    font-size:12px;
    border:1px solid #e2e7e7;
    background:#fff;
}
.hd-my-profile-notice svg{width:17px;height:17px;flex-shrink:0}
.hd-my-profile-notice.success{color:#356959;background:#f0f8f4;border-color:#cce5d9}
.hd-my-profile-notice.error{color:#95574d;background:#fff8f6;border-color:#eddbd5}
.hd-my-profile-identity{
    display:flex;
    align-items:center;
    gap:12px;
    background:linear-gradient(110deg,#ffffff,#f5f9f7);
    border:1px solid #dfe8e4;
    border-radius:12px;
    padding:12px 15px;
    min-width:0;
}
.hd-my-profile-avatar{
    width:52px;height:52px;flex:0 0 52px;
    border-radius:12px;
    display:grid;
    place-items:center;
    background:#e2efe8;
    color:#49786a;
    border:1px solid #d0e2d9;
}
.hd-my-profile-avatar svg{width:26px;height:26px}
.hd-my-profile-summary{
    flex:1 1 auto;
    min-width:0;
    display:grid;
    gap:3px;
}
.hd-my-profile-summary strong{
    font-size:15px;
    font-weight:750;
    text-overflow:ellipsis;
    overflow:hidden;
    white-space:nowrap;
}
.hd-my-profile-summary small{
    font-size:12px;
    color:var(--muted);
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    text-align:start;
}
.hd-my-profile-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    align-items:start;
    gap:12px;
}
.hd-my-profile-card{
    min-width:0;
    background:#fff;
    border:1px solid var(--line);
    border-radius:12px;
    overflow:hidden;
}
.hd-my-profile-card-head{
    padding:13px 16px;
    display:flex;
    align-items:center;
    gap:8px;
    border-bottom:1px solid #e9eeee;
}
.hd-my-profile-card-head h2{
    font-size:14px;
    font-weight:700;
    margin:0;
}
.hd-my-profile-form{
    display:grid;
    gap:15px;
    padding:16px;
}
.hd-my-profile-form .hd-users-field label{
    display:block;
    margin:0 0 6px;
    font-size:12px;
}
.hd-my-profile-form input.field{
    margin:0;
    min-height:39px;
    font-size:13px;
    padding:8px 11px;
    border-radius:8px;
}
.hd-my-profile-form input.field:focus{
    border-color:#83ada0;
    box-shadow:0 0 0 3px #b1d3c142;
}
.hd-my-profile-hint{
    font-size:11px;
    line-height:1.9;
    margin:0;
    color:#7b8989;
}
.hd-my-profile-actions{
    display:flex;
    justify-content:flex-end;
    border-top:1px solid #edf0f0;
    padding-top:13px;
}
.hd-my-profile-actions .hd-users-btn{
    min-width:132px;
    font-size:12px;
    min-height:37px;
}
@media(max-width:850px){
    .hd-my-profile-grid{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:500px){
    .hd-my-profile{gap:10px}
    .hd-my-profile-head h1{font-size:16px}
    .hd-my-profile-return{min-height:32px;padding:5px 8px}
    .hd-my-profile-return span{font-size:10px}
    .hd-my-profile-identity{padding:10px}
    .hd-my-profile-avatar{width:43px;height:43px;flex-basis:43px}
    .hd-my-profile-avatar svg{width:21px;height:21px}
    .hd-my-profile-form{padding:12px;gap:12px}
    .hd-my-profile-card-head{padding:11px 12px}
    .hd-my-profile-actions .hd-users-btn{width:100%}
}


/* Executive P&L — an honest two-sided chart with one shared numeric scale.
   Scoped to ProfitMonthlyOverview; other financial charts remain unchanged. */
.profit-overview{
  --profit-gain:#238e7c;
  --profit-gain-light:#55bca8;
  --profit-loss:#bd5360;
  --profit-loss-light:#e49399;
  padding:0;
  overflow:hidden;
  border-color:#e0e8e7;
  background:#fff;
}
.profit-overview .profit-overview-head{
  padding:12px 17px;
  border-bottom:1px solid #e9eeee;
  background:linear-gradient(115deg,#fff 38%,#f7faf9 100%);
}
.profit-overview .profit-title{
  display:flex;align-items:center;gap:10px;min-width:0;
}
.profit-overview .profit-title-icon{
  width:35px;height:35px;flex:0 0 35px;
  display:grid;place-items:center;
  border:1px solid #daebe5;border-radius:10px;
  background:#eef7f2;color:#3d806e;
}
.profit-overview .profit-title-icon svg{width:19px;height:19px}
.profit-overview .profit-title h3{margin:0;font-size:14px;font-weight:800;color:#304644}
.profit-overview .profit-title small{display:block;font-size:10px;color:#849290;margin-top:2px}
.profit-overview .profit-refresh{
  display:inline-flex;align-items:center;gap:6px;
  border:1px solid #dce6e3;background:white;
  border-radius:8px;min-height:32px;font-size:11px;color:#54716b;
}
.profit-overview .profit-refresh svg{width:15px;height:15px}
.profit-overview .profit-refresh:hover{border-color:#a2c5b9;background:#f4faf7}
.profit-overview-kpis{
  display:grid;
  grid-template-columns:minmax(0,1.5fr) repeat(2,minmax(0,.75fr)) minmax(0,.95fr);
  gap:9px;
  padding:12px 16px;
}
.profit-overview-kpi{
  position:relative;min-width:0;
  display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;
  gap:4px;
  border:1px solid #e7edeb;
  border-radius:11px;
  background:#f8faf9;
  padding:11px 13px;
  min-height:87px;
  overflow:hidden;
}
.profit-overview-kpi>span{font-size:11px;color:#677b78}
.profit-overview-kpi>strong{
  font-size:clamp(15px,1.2vw,19px);
  font-weight:800;
  color:#354d49;
  line-height:1.6;
  max-width:100%;
  overflow-wrap:anywhere;
  font-variant-numeric:tabular-nums;
}
.profit-overview-kpi>small{
  color:#879694;
  font-size:10px;
  line-height:1.5;
}
.profit-overview-kpi.profit-net{border-color:#cfe5db;background:#eff8f4}
.profit-overview-kpi.profit-net.is-loss{border-color:#eed6da;background:#fdf4f5}
.profit-overview-kpi.profit-net>strong{color:#2a7663}
.profit-overview-kpi.profit-net.is-loss>strong{color:#a74351}
.profit-overview-kpi.profit-best{background:#fbfaf8;border-color:#eae6e0}
.profit-overview .profit-text-gain{color:#298272}
.profit-overview .profit-text-loss{color:#b44b59}

.profit-chart-section{border-top:1px solid #edf0ee}
.profit-chart-heading{
  display:flex;align-items:center;justify-content:space-between;
  gap:10px;padding:12px 18px 3px;
}
.profit-chart-legend{display:flex;align-items:center;flex-wrap:wrap;gap:15px}
.profit-chart-legend span{
  display:inline-flex;align-items:center;gap:5px;
  font-size:11px;color:#637674;white-space:nowrap;
}
.profit-legend-dot{display:inline-block;width:9px;height:9px;border-radius:3px;flex:0 0 9px}
.profit-overview .profit-legend-dot.gain{background:var(--profit-gain)}
.profit-overview .profit-legend-dot.loss{background:var(--profit-loss)}
.profit-zero-legend{width:14px;height:0;border-top:2px solid #95aaa6}
.profit-chart-heading>small{font-size:10px;color:#899794;white-space:nowrap}
.profit-chart-scroll{overflow-x:auto;overflow-y:hidden;min-width:0;scrollbar-width:thin;scrollbar-color:#d3ded9 transparent}
.profit-chart-scroll:focus-visible{outline:2px solid #83aa9c;outline-offset:-2px}
.profit-month-chart{
  direction:rtl;
  display:flex;
  gap:6px;
  position:relative;
  --profit-negative-zone-height:38px;
  width:100%;
  min-width:650px;
  max-width:1500px;
  margin-inline:auto;
  padding:0 15px 8px;
}
/* One continuous zero reference line, even between month columns. */
.profit-month-chart::before{
  content:"";
  position:absolute;
  inset-inline:15px;
  /* The button has a 1px transparent border above its plot. */
  top:171px;
  border-top:2px solid #96aba6;
  pointer-events:none;
  z-index:0;
}
.profit-month-column{
  flex:1 1 0;min-width:0;
  margin:0;
  padding:0 4px 4px;
  border:1px solid transparent;
  background:transparent;
  border-radius:10px;
  font:inherit;color:inherit;
  cursor:pointer;
  display:flex;flex-direction:column;align-items:center;
  position:relative;
  z-index:1;
  transition:background-color .16s ease,border-color .16s ease;
}
/* No tall background from the first gridline to the month caption. */
.profit-month-column:hover,
.profit-month-column.selected,
.profit-month-column.selected.is-loss{
  background:transparent;
  border-color:transparent;
}
.profit-month-column:focus-visible{outline:2px solid #8cbbab;outline-offset:-2px}
.profit-month-plot{
  display:flex;
  flex-direction:column;
  height:calc(170px + var(--profit-negative-zone-height));
  width:100%;
  min-width:0;
  position:relative;
}
.profit-positive-zone,
.profit-negative-zone{
  display:flex;
  align-items:flex-end;
  justify-content:center;
  width:100%;min-width:0;
  position:relative;
}
.profit-positive-zone{
  height:170px;
  flex:0 0 170px;
  background:
    linear-gradient(to bottom,transparent 25%,#edf1f0 25.35%,transparent 25.65%),
    linear-gradient(to bottom,transparent 50%,#edf1f0 50.35%,transparent 50.65%),
    linear-gradient(to bottom,transparent 75%,#edf1f0 75.35%,transparent 75.65%);
}
.profit-negative-zone{
  height:var(--profit-negative-zone-height);
  flex:0 0 var(--profit-negative-zone-height);
  align-items:flex-start;
  background:none;
}
.profit-column-bar{
  width:clamp(15px,54%,46px);
  flex:0 0 auto;
  display:block;
  position:relative;
  border-radius:5px 5px 0 0;
  box-shadow:inset -1px 0 0 #ffffff30;
  transition:height .2s ease;
}
.profit-column-bar.gain{
  background:linear-gradient(180deg,var(--profit-gain-light),var(--profit-gain));
}
.profit-column-bar.loss{
  background:linear-gradient(180deg,var(--profit-loss),var(--profit-loss-light));
  border-radius:0 0 5px 5px;
}
.profit-column-value{
  position:absolute;
  bottom:calc(100% + 7px);
  left:50%;
  transform:translateX(-50%);
  max-width:100px;
  color:#344c4b;
  font-size:10px;font-weight:750;
  white-space:nowrap;
  text-align:center;
  direction:rtl;
  pointer-events:none;
  font-variant-numeric:tabular-nums;
}
.profit-column-bar.loss .profit-column-value{
  top:calc(100% + 6px);
  bottom:auto;
  color:#a94d5a;
}
.profit-month-name{
  display:block;
  text-align:center;
  margin-top:5px;
  font-weight:650;
  font-size:11px;
  color:#677875;
  line-height:1.75;
  white-space:nowrap;
}
.profit-month-column .profit-month-name{
  padding:2px 9px;
  border:1px solid transparent;
  border-radius:7px;
  transition:background-color .16s ease,border-color .16s ease;
}
.profit-month-column:hover .profit-month-name{background:#f5f9f7}
.profit-month-column.selected .profit-month-name{
  color:#315e54;
  font-weight:750;
  background:#ebf5f0;
  border-color:#cfe4d9;
}
.profit-month-column.selected.is-loss .profit-month-name{
  color:#a94d5a;
  background:#fdf0f2;
  border-color:#efd9de;
}
.profit-month-column.selected .profit-column-bar.gain{
  box-shadow:0 0 0 3px rgba(43,141,117,.13);
}
.profit-month-column.selected .profit-column-bar.loss{
  box-shadow:0 0 0 3px rgba(188,83,97,.13);
}
.profit-column-bar.loss.is-small-loss::after{
  content:"";
  position:absolute;
  top:0;
  left:50%;
  transform:translate(-50%,-1px);
  width:8px;
  height:8px;
  border:1px solid white;
  border-radius:50%;
  background:var(--profit-loss);
  box-shadow:0 1px 4px rgba(155,47,65,.22);
  box-sizing:border-box;
  pointer-events:none;
}
/* Small-loss dots are visual locators, not exaggerated numeric bars. */
.profit-selected-detail{
  margin:3px 16px 14px;
  border:1px solid #e3eae7;border-radius:10px;
  background:#fafcfb;
  display:grid;
  grid-template-columns:minmax(140px,.9fr) minmax(110px,.6fr) minmax(165px,1.1fr) minmax(160px,1fr);
  gap:12px;
  padding:11px 14px;
  align-items:center;
}
.profit-selected-detail>div{min-width:0;display:flex;flex-direction:column;gap:4px}
.profit-selected-detail>div.profit-detail-month{flex-direction:row;align-items:center;gap:9px}
.profit-detail-month>div{display:flex;flex-direction:column;gap:4px}
.profit-detail-icon{
  width:29px;height:29px;flex:0 0 29px;display:grid;place-items:center;
  border-radius:8px;background:#eaf2ee;color:#477e6c;
}
.profit-detail-icon svg{width:16px;height:16px}
.profit-selected-detail small{font-size:10px;color:#82918e}
.profit-selected-detail strong{font-size:12px;font-weight:780;color:#314946}
.profit-selected-detail .profit-status{display:inline-flex;width:max-content;border-radius:6px;padding:3px 9px}
.profit-selected-detail .profit-status.gain{background:#e5f5ec;color:#237d65}
.profit-selected-detail .profit-status.loss{background:#fbe9eb;color:#ae4051}
.profit-detail-amount strong{font-variant-numeric:tabular-nums}
.profit-detail-amount strong span{font-size:10px;font-weight:500;color:#748680}
.profit-selected-detail .profit-detail-help{
  line-height:1.9;text-align:end;
  justify-self:end;
  max-width:220px;
}
@media(max-width:900px){
  .profit-overview-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .profit-overview-kpi.profit-net{grid-column:1/-1}
  .profit-selected-detail{grid-template-columns:repeat(3,minmax(0,1fr))}
  .profit-selected-detail .profit-detail-help{grid-column:1/-1;max-width:none;justify-self:start}
}
@media(max-width:600px){
  .profit-overview .profit-overview-head{padding:10px 12px}
  .profit-overview .profit-title-icon{width:30px;height:30px;flex-basis:30px}
  .profit-overview .profit-title h3{font-size:12px}
  .profit-overview .profit-title small{font-size:9px}
  .profit-overview .profit-refresh{padding:5px 8px;font-size:10px}
  .profit-overview-kpis{gap:7px;padding:9px}
  .profit-overview-kpi{min-height:75px;padding:9px}
  .profit-overview-kpi>strong{font-size:15px}
  .profit-chart-heading{padding:10px 10px 3px;flex-wrap:wrap;gap:4px}
  .profit-chart-heading>small{font-size:9px}
  .profit-month-chart{padding-inline:8px}
  .profit-month-column{padding-inline:2px}
  .profit-selected-detail{margin:3px 9px 10px;gap:7px;padding:10px;grid-template-columns:repeat(2,minmax(0,1fr))}
  .profit-selected-detail .profit-detail-amount{grid-column:1/-1}
  .profit-selected-detail .profit-detail-help{grid-column:1/-1}
}
@media(prefers-reduced-motion:reduce){
  .profit-month-column,.profit-column-bar{transition:none}
}


/* Expense charts: brand palette and interactive selection */
.expenses-visual{background:#fff}
.expenses-visual .finance-visual-kpis>div{background:#fff;border-color:#e7e9ee}
.expenses-visual .finance-visual-kpis>div:first-child strong{color:#a92332}
.expenses-visual .finance-visual-section{background:#fff;border-color:#e7e9ee}
.expense-group-chart{display:grid;gap:7px;padding:5px 0 2px}
button.expense-group-row{width:100%;min-height:39px;display:grid;grid-template-columns:minmax(125px,1.2fr) minmax(65px,1fr) minmax(55px,.45fr);align-items:center;gap:9px;padding:6px 9px;text-align:right;color:#343a46;font:inherit;border:1px solid transparent;border-radius:8px;background:#fff;cursor:pointer;transition:background-color .2s,border-color .2s,opacity .2s}
.expense-group-row:not(.selected){opacity:.86}
.expense-group-row:hover{opacity:1;background:#f8f8f9}
button.expense-group-row.selected{opacity:1;background:#fff8f9;border-color:#eed4d8}
.expense-group-name{font-size:11px;line-height:1.5;font-weight:650;min-width:0;overflow-wrap:anywhere}
.expense-group-row.selected .expense-group-name{font-weight:800}
.expense-group-track{height:10px;display:block;width:100%;background:#f1f2f4;border-radius:99px;overflow:hidden;direction:rtl}
.expense-group-fill{height:100%;display:block;background:var(--expense-color,#a92332);border-radius:99px;transition:width .28s ease}
.expense-group-value{font-size:11px;font-weight:750;text-align:left;direction:rtl;white-space:nowrap;font-variant-numeric:tabular-nums;color:#343a46}
.expense-group-row.selected .expense-group-value{color:#a92332}
.expenses-visual .expense-month-item{border:1px solid transparent;border-radius:8px;transition:opacity .2s,background-color .2s;border-color .2s}
.expenses-visual .expense-month-item:hover{background:#f8f8f9}
.expenses-visual .expense-month-item.selected,.expenses-visual .expense-month-item.peak{background:#fff8f9;border-color:#f4e0e3}
.expenses-visual .expense-month-bars .finance-bar-fill.expense{background:var(--expense-color,#a92332);opacity:.72;transition:height .25s ease,opacity .2s ease}
.expenses-visual .expense-month-bars .expense-month-item.selected .finance-bar-fill.expense,
.expenses-visual .expense-month-bars .expense-month-item.peak .finance-bar-fill.expense{background:#a92332;opacity:1;box-shadow:0 0 0 1px rgba(169,35,50,.08)}
.expenses-visual .expense-month-bars.has-selection .expense-month-item:not(.selected){opacity:.48}
.expenses-visual .expense-month-bars .finance-bar-track{border-bottom-color:#e3e6ea}
.expenses-visual .expense-month-bars .finance-bar-track:before{border-top-color:#eceef1}
.expenses-visual .expense-month-bars .finance-bar-value{color:#343a46}
.expenses-visual .expense-month-item.selected .finance-bar-value{color:#a92332;font-weight:800}
.expenses-visual .expense-group-row:focus-visible,.expenses-visual .expense-month-item:focus-visible{outline:2px solid #a92332;outline-offset:2px}
@media(max-width:560px){
  button.expense-group-row{grid-template-columns:minmax(105px,1fr) minmax(40px,.9fr) minmax(49px,.42fr);gap:5px;padding:6px}
  .expense-group-name,.expense-group-value{font-size:10px}
  .expense-group-chart{gap:4px}
  .expenses-visual .expense-month-bars .finance-bar-label{font-size:9px}
}
@media(prefers-reduced-motion:reduce){
  .expense-group-row,.expense-group-fill,.expenses-visual .expense-month-item,.expenses-visual .expense-month-bars .finance-bar-fill.expense{transition:none}
}

/* Executive expenses: all expense groups aggregated into one full-width
   Persian-month chart. No browser-level horizontal scrollbar. */
.hd-expense-totals{margin:15px 0;padding:0;min-width:0;overflow:hidden;border-radius:13px;background:#fff}
.hd-expense-totals-head{display:flex;align-items:center;justify-content:space-between;
  gap:10px;flex-wrap:wrap;padding:10px 14px;border-bottom:1px solid var(--line)}
.hd-expense-totals-head h3{margin:0;color:#292d35;font-size:15px;font-weight:800;line-height:1.55}
.hd-expense-totals-head p{font-size:11px;color:#808894;margin:2px 0 0;line-height:1.5}
.hd-expense-totals-head .quiet{font-size:11px;padding:6px 9px}
.hd-expense-totals-state{min-height:130px;display:flex;align-items:center;justify-content:center;
  flex-direction:column;gap:8px;padding:16px;font-size:12px;text-align:center}
.hd-expense-totals-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
  gap:7px;padding:9px 13px 5px}
.hd-expense-totals-stats>div{display:flex;flex-direction:column;gap:2px;min-width:0;
  padding:8px 11px;border:1px solid #ebe8ea;border-radius:9px;background:#fbfafb}
.hd-expense-totals-stats>div:first-child{background:#fdf3f5;border-color:#f0e0e4}
.hd-expense-totals-stats span{font-size:10px;color:#80858f;line-height:1.45}
.hd-expense-totals-stats strong{font-size:clamp(13px,1.25vw,18px);font-weight:850;
  color:#292d35;line-height:1.4;overflow-wrap:anywhere}
.hd-expense-totals-stats small{font-size:10px;color:#87909a}
.hd-expense-totals-chart{padding:10px 12px 6px}
.hd-expense-totals-chart-head{display:flex;justify-content:space-between;
  align-items:center;gap:8px;margin:0 2px 8px;color:#78808b;font-size:10px}
.hd-expense-totals-bars{display:grid;
  grid-template-columns:repeat(var(--expense-month-count,12),minmax(0,1fr));
  gap:3px;align-items:start;direction:rtl}
.hd-expense-totals-month{min-width:0;display:flex;flex-direction:column;align-items:center;
  gap:5px;padding:5px 2px 7px;background:transparent;border:1px solid transparent;
  border-radius:9px;color:#4a515a;cursor:pointer;font-family:inherit}
.hd-expense-totals-month:hover{background:#fdf4f6;border-color:#ead6dc}
.hd-expense-totals-month.selected{background:#fcf0f3;border-color:#d9aab6}
.hd-expense-totals-value{font-size:10px;font-weight:800;color:#39404a;line-height:1.3;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.hd-expense-totals-track{display:block;position:relative;height:120px;width:100%;
  border-bottom:1px solid #dce0e5;
  background:repeating-linear-gradient(to top,transparent 0,transparent 39px,#eff0f3 40px)}
.hd-expense-totals-fill{position:absolute;bottom:0;right:25%;width:50%;
  border-radius:5px 5px 0 0;background:linear-gradient(180deg,#a3263a,#d998a4);
  transition:height .2s ease}
.hd-expense-totals-month.negative .hd-expense-totals-fill{background:linear-gradient(180deg,#717b8b,#b6bdc8)}
.hd-expense-totals-name{font-size:10px;color:#616872;font-weight:700;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.hd-expense-totals-current{font-size:9px;font-weight:700;line-height:1.25;
  color:#a3263a;background:#fbf0f2;border-radius:5px;padding:2px 6px}
.hd-expense-totals-selected{display:flex;align-items:center;justify-content:space-between;
  gap:10px;margin:0 13px 8px;padding:8px 11px;background:#faf8f9;
  border:1px solid #ece5e8;border-radius:8px;font-size:11px}
.hd-expense-totals-selected strong{font-size:13px;font-weight:850;color:#8b2335}
.hd-expense-totals-foot{display:flex;align-items:center;justify-content:space-between;
  flex-wrap:wrap;gap:6px 10px;padding:8px 13px;border-top:1px solid #eeedf0;
  color:#8c939d;font-size:10px;line-height:1.55}
@media(max-width:950px){
  .hd-expense-totals-bars{grid-template-columns:repeat(auto-fit,minmax(105px,1fr));gap:8px 3px}
  .hd-expense-totals-track{height:95px}
}
@media(max-width:540px){
  .hd-expense-totals-head{padding:9px 10px}
  .hd-expense-totals-stats{padding:7px 9px;gap:5px}
  .hd-expense-totals-stats>div{padding:7px;gap:2px}
  .hd-expense-totals-stats strong{font-size:12px}
  .hd-expense-totals-bars{grid-template-columns:repeat(auto-fit,minmax(92px,1fr))}
  .hd-expense-totals-chart{padding:9px}
  .hd-expense-totals-track{height:80px}
  .hd-expense-totals-selected{margin:0 9px 8px}
}
@media(prefers-reduced-motion:reduce){
  .hd-expense-totals-fill{transition:none}
}


/* Mobile fabric report: a compact horizontal comparison instead of narrow,
   two-row 3D columns. Desktop chart and month-selection semantics stay intact. */
.fabric-mobile-list {display:none}
@media (max-width:700px) {
  .fabric-chart-panel .fabric-bars {display:none}
  .fabric-chart-panel .fabric-mobile-list {
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:7px;
    width:100%;
    min-width:0;
  }
  .fabric-mobile-month {
    --fabric-color:#a82f44;
    display:grid;
    grid-template-columns:minmax(0,1fr);
    min-width:0;
    width:100%;
    gap:4px;
    padding:9px 11px;
    text-align:right;
    direction:rtl;
    color:#303740;
    background:#fff;
    border:1px solid #e9e6e8;
    border-radius:10px;
    cursor:pointer;
    font:inherit;
  }
  .fabric-mobile-month:nth-child(8n+2) {--fabric-color:#707782}
  .fabric-mobile-month:nth-child(8n+3) {--fabric-color:#c86c7c}
  .fabric-mobile-month:nth-child(8n+4) {--fabric-color:#414650}
  .fabric-mobile-month:nth-child(8n+5) {--fabric-color:#965768}
  .fabric-mobile-month:nth-child(8n+6) {--fabric-color:#8a6672}
  .fabric-mobile-month:nth-child(8n+7) {--fabric-color:#9d273b}
  .fabric-mobile-month:nth-child(8n+8) {--fabric-color:#85808a}
  .fabric-mobile-month.active {background:#fcf3f5;border-color:#ca929e}
  .fabric-mobile-month:focus-visible {outline:2px solid #ad4053;outline-offset:2px}
  .fabric-mobile-month-head {display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0}
  .fabric-mobile-month-head strong {font-size:12px;font-weight:800;color:#313640}
  .fabric-mobile-month-head b {font-size:13px;color:#752d40;font-weight:800;white-space:nowrap}
  .fabric-mobile-item {display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;color:#747b84}
  .fabric-mobile-track {display:block;direction:rtl;height:6px;width:100%;overflow:hidden;border-radius:99px;background:#f1e9ec}
  .fabric-mobile-fill {display:block;height:100%;max-width:100%;border-radius:99px;background:var(--fabric-color)}
  .fabric-mobile-fill.negative {background:#b95a58}
  .fabric-chart-footer {margin-top:9px}
}


/* Treasury: one consistent, touch-friendly status picker across desktop/mobile.
   The operational source may omit columns, but a status is never hidden. */
.cheque-status-picker{display:flex;min-width:0}
.cheque-status-trigger{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  min-width:146px;min-height:36px;padding:7px 11px;border:1px solid #e3dfe3;
  border-radius:9px;background:#fff;color:#383943;cursor:pointer;
  font:700 12px/1.6 Vazirmatn,Tahoma,sans-serif;
}
.cheque-status-trigger:hover{background:#fff9fa;border-color:#d6b3ba}
.cheque-status-trigger:disabled{opacity:.55;cursor:wait}
.cheque-status-chevron{font-size:18px;color:#8b5662}
.cheque-status-backdrop{
  position:fixed;inset:0;z-index:75;width:100vw;height:100dvh;
  background:#1d202887;border:0;border-radius:0;cursor:default;
}
.cheque-status-menu{
  position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);
  z-index:76;width:min(430px,calc(100vw - 32px));max-height:78dvh;
  display:flex;flex-direction:column;overflow:hidden;
  background:#fff;border:1px solid #eee8eb;border-radius:17px;
  box-shadow:0 18px 55px #14171b38;direction:rtl;
}
.cheque-status-menu-title{
  display:flex;align-items:center;justify-content:space-between;
  gap:10px;padding:13px 17px;border-bottom:1px solid #eee8eb;
}
.cheque-status-menu-title strong{font-size:15px;font-weight:800;color:#31343b}
.cheque-status-close{
  display:grid;place-items:center;width:30px;height:30px;min-height:30px;
  border:0;border-radius:8px;background:#f8f6f7;color:#7b5961;
  font:700 21px/1 Vazirmatn,Tahoma,sans-serif;cursor:pointer;
}
.cheque-status-options{overflow-y:auto;overscroll-behavior:contain;padding:8px;scrollbar-width:thin}
.cheque-status-option{
  display:flex;align-items:center;gap:10px;width:100%;min-height:44px;
  padding:9px 11px;border:1px solid transparent;border-radius:10px;
  background:#fff;text-align:right;color:#42464f;cursor:pointer;
  font:650 13px/1.7 Vazirmatn,Tahoma,sans-serif;
}
.cheque-status-option+.cheque-status-option{margin-top:2px}
.cheque-status-option:hover{background:#fcf4f5}
.cheque-status-option.selected{background:#fcf0f3;border-color:#edd3d9;color:#943549;font-weight:850}
.cheque-status-radio{
  display:block;flex:0 0 16px;width:16px;height:16px;border-radius:50%;
  border:2px solid #b3adb1;background:#fff;
}
.cheque-status-option.selected .cheque-status-radio{border:5px solid #ab3e51}
.cheque-status-option-text{flex:1;min-width:0}
.cheque-status-option small{
  font-size:10px;color:#9f6a38;white-space:nowrap;
  border:1px solid #f1e2cc;padding:2px 5px;border-radius:6px;
}
.cheque-status-trigger:focus-visible,.cheque-status-option:focus-visible,.cheque-status-close:focus-visible{
  outline:2px solid #aa3e53;outline-offset:1px;
}
@media(max-width:750px){
  .cheque-status-picker{flex:1;min-width:0}
  .cheque-status-trigger{width:100%;min-width:0;font-size:12px}
  .cheque-status-menu{
    left:10px;right:10px;top:auto;bottom:calc(76px + env(safe-area-inset-bottom, 0px));
    transform:none;width:auto;max-height:calc(100dvh - 155px - env(safe-area-inset-bottom, 0px));
    border-radius:18px;
  }
  .cheque-status-option{min-height:45px;font-size:13px}
}
@media(prefers-reduced-motion:reduce){
  .cheque-status-option,.cheque-status-trigger{transition:none}
}


/* Payroll reconciliation: a single responsive chart style shared with the existing
   salary chart; no additional CSS/JS assets and no browser-level horizontal scroll. */
.hd-payroll-bridge{padding:0;min-width:0;overflow:hidden;margin:14px 0;border-radius:14px;
  --payroll-booked:#a92339;--payroll-payable:#8d96a3;--payroll-line:#ece7e9}
.hd-payroll-bridge-head{display:flex;align-items:center;justify-content:space-between;
  flex-wrap:wrap;gap:12px;padding:13px 16px;border-bottom:1px solid var(--payroll-line)}
.hd-payroll-bridge-head h3{font-size:14px;font-weight:850;color:#30343c;margin:0}
.hd-payroll-bridge-head p{margin:3px 0 0;font-size:11px;color:#7c8088;line-height:1.85}
.hd-payroll-bridge-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px;min-width:0}
.hd-payroll-bridge-actions label{font-size:10px;color:#696d75}
.hd-payroll-bridge-actions select{max-width:310px;min-width:170px;min-height:35px;
  font:inherit;font-size:11px;background:#fff;border:1px solid #dedce0;
  border-radius:8px;padding:6px 8px;color:#313640}
.hd-payroll-bridge-actions .quiet{font-size:11px;min-height:35px}
.hd-payroll-bridge-state{min-height:90px;display:flex;align-items:center;
  justify-content:center;gap:10px;flex-wrap:wrap;padding:20px;font-size:12px;text-align:center}
.hd-payroll-bridge-provenance{display:flex;gap:9px 20px;flex-wrap:wrap;
  padding:9px 15px;border-bottom:1px solid #f0edef;font-size:10px;color:#767a82}
.hd-payroll-bridge-provenance strong{color:#41444d}
.hd-payroll-bridge-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;padding:12px 14px}
.hd-payroll-bridge-metrics>div{min-width:0;display:flex;flex-direction:column;gap:7px;
  padding:11px;background:#f7f8f9;border:1px solid #e9e9ed;border-radius:10px}
.hd-payroll-bridge-metrics>div:nth-child(3){background:#fbf2f4;border-color:#efdce0}
.hd-payroll-bridge-metrics span{font-size:10px;color:#7b808a;line-height:1.6}
.hd-payroll-bridge-metrics strong{font-size:clamp(12px,1.2vw,18px);
  font-weight:850;color:#333b46;overflow-wrap:anywhere}
.hd-payroll-bridge-metrics>div:nth-child(3) strong{color:#9e273b}
.hd-payroll-bridge-legend{display:flex;gap:9px 19px;flex-wrap:wrap;
  padding:8px 15px;color:#555b66;font-size:10px;align-items:center}
.hd-payroll-bridge-legend>span{display:inline-flex;align-items:center;gap:7px}
.hd-payroll-bridge-legend i{display:inline-block;width:11px;height:11px;border-radius:3px}
.hd-payroll-bridge-legend .booked{background:var(--payroll-booked)}
.hd-payroll-bridge-legend .payable{background:var(--payroll-payable)}
.hd-payroll-bridge-legend small{margin-inline-start:auto;color:#8b919b;font-size:10px}
.hd-payroll-bridge-chart{display:grid;grid-template-columns:repeat(auto-fit,minmax(80px,1fr));
  gap:5px;padding:8px 12px 12px;min-width:0}
.hd-payroll-bridge-month{min-width:0;min-height:153px;display:flex;flex-direction:column;
  align-items:stretch;justify-content:end;gap:6px;padding:10px 5px 7px;
  border:1px solid transparent;border-radius:9px;background:#fff;cursor:pointer;
  font:inherit;text-align:center;color:#535a66}
.hd-payroll-bridge-month:hover{background:#faf7f8;border-color:#e9dadf}
.hd-payroll-bridge-month.selected{background:#fcf2f4;border-color:#dba3ae}
.hd-payroll-bridge-bars{height:110px;width:100%;display:flex;gap:5px;
  align-items:flex-end;justify-content:center;border-bottom:1px solid #e1e1e6;
  background:linear-gradient(to top,transparent 49%,#f1f0f1 50%,transparent 50%);
  position:relative}
.hd-payroll-bridge-bar{width:min(31%,27px);min-height:2px;border-radius:5px 5px 0 0;
  display:block;transition:height .2s ease;box-shadow:none}
.hd-payroll-bridge-bar.booked{background:var(--payroll-booked)}
.hd-payroll-bridge-bar.payable{background:var(--payroll-payable)}
.hd-payroll-bridge-missing{width:26%;display:grid;place-items:center;
  height:18px;color:#babcc3;font-size:17px}
.hd-payroll-bridge-month-label{font-size:11px;font-weight:750}
.hd-payroll-bridge-partial{align-self:center;color:#a23b49;font-size:9px;
  border-radius:6px;background:#fbebef;padding:1px 6px}
.hd-payroll-bridge-detail{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));
  gap:7px;padding:10px 14px;border-top:1px solid var(--payroll-line)}
.hd-payroll-bridge-detail>div{display:flex;flex-direction:column;gap:5px;
  padding:9px;border-radius:9px;background:#f7f8f9;min-width:0}
.hd-payroll-bridge-detail span{font-size:10px;color:#858994}
.hd-payroll-bridge-detail strong{font-size:12px;color:#313840;overflow-wrap:anywhere}
.hd-payroll-bridge-detail small{font-size:9px;color:#7f8590;overflow-wrap:anywhere}
.hd-payroll-bridge-validation{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
  gap:1px;background:#e9e8ed;border-top:1px solid #e9e8ed;
  border-bottom:1px solid #e9e8ed}
.hd-payroll-bridge-validation>div{display:flex;justify-content:space-between;
  flex-wrap:wrap;gap:7px 10px;background:#fff;padding:12px 14px;
  font-size:10px;color:#717782}
.hd-payroll-bridge-validation strong{color:#333841;font-size:12px}
.hd-payroll-bridge-warning{margin:8px 14px;padding:9px 12px;font-size:11px;
  line-height:1.85;color:#7a4a27;background:#fff8ee;border:1px solid #f0e2ca;
  border-radius:8px}
.hd-payroll-bridge-footer{padding:11px 14px;display:flex;justify-content:space-between;
  align-items:start;flex-wrap:wrap;gap:8px 15px;font-size:10px;line-height:1.9;
  color:#878c94;border-top:1px solid var(--payroll-line)}
.hd-payroll-bridge-footer span:first-child{max-width:820px}

/* Preserve the single visual language: clean, flat salary columns and Persian units. */
.monthly-personnel-month{--salary-color:#be6674}
.monthly-personnel-month:nth-child(n){--salary-color:#be6674}
.monthly-personnel-month.selected{--salary-color:#a92339;background:#fbf2f4;border-color:#e3b5bd}
.monthly-personnel-month:hover{background:#fcf7f8;border-color:#ebd9dd}
.monthly-personnel-bar{background:var(--salary-color);box-shadow:none;
  border-radius:5px 5px 0 0}
.monthly-personnel-bar::before,.monthly-personnel-bar::after{display:none}
.monthly-personnel-bar.negative{--salary-color:#7a8390}
.monthly-personnel-plot{background:linear-gradient(to top,transparent 49%,#ececf0 50%,transparent 50%);
  border-color:#e3e3e6}
.monthly-personnel-stats>div:first-child,.monthly-personnel-selected>div:nth-child(2){
  background:#fbf1f3;border-color:#edd9de}
.monthly-personnel-stats strong,.monthly-personnel-selected strong{color:#343941}
.monthly-personnel-heading h3{color:#353940}

@media(max-width:900px){
  .hd-payroll-bridge-metrics,.hd-payroll-bridge-detail{grid-template-columns:repeat(2,minmax(0,1fr))}
  .hd-payroll-bridge-validation{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:560px){
  .hd-payroll-bridge-head{padding:11px}
  .hd-payroll-bridge-actions{width:100%}
  .hd-payroll-bridge-actions label{width:100%}
  .hd-payroll-bridge-actions select{flex:1;min-width:0;max-width:100%}
  .hd-payroll-bridge-chart{grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;
    padding:6px}
  .hd-payroll-bridge-month{min-height:125px;padding:6px 3px;font-size:10px}
  .hd-payroll-bridge-bars{height:90px}
  .hd-payroll-bridge-bar{width:36%}
  .hd-payroll-bridge-metrics{gap:5px;padding:8px}
  .hd-payroll-bridge-metrics>div{padding:8px}
  .hd-payroll-bridge-detail{gap:5px;padding:7px}
  .hd-payroll-bridge-detail>div{padding:7px}
  .hd-payroll-bridge-provenance,.hd-payroll-bridge-legend{padding:8px}
}
@media(prefers-reduced-motion:reduce){
  .hd-payroll-bridge-bar{transition:none}
}


/* Shared partial-period markers used by expense and payroll reports. */
.hd-expense-month-current{display:inline-flex;align-items:center;justify-content:center;
  padding:2px 5px;min-height:16px;border-radius:5px;background:#fff1f2;
  color:#a62c3d;font-size:9px;line-height:1.35}
.hd-expense-source-note{padding:0 11px;margin:5px 0 2px;color:#8b929c;
  font-size:10px;line-height:1.7}
.monthly-personnel-month .hd-expense-month-current{margin-top:2px}
