
/* assets/dashboard-pulse.css */
.pulse-body{padding:20px 24px!important}.pulse-summary{display:flex;gap:28px;flex-wrap:wrap;margin-bottom:22px}.pulse-summary>div{display:flex;align-items:center;gap:9px;font-size:12px;color:#6c7c78}.pulse-summary strong{display:block;color:#203d35;font-size:19px;margin-top:5px;font-variant-numeric:tabular-nums}.pulse-dot{width:10px;height:10px;border-radius:50%;flex:none}.pulse-dot.sales{background:#18b693}.pulse-dot.purchases{background:#3689e8}.pulse-scroll{overflow-x:auto;padding-top:10px}.pulse-plot{display:flex;height:235px;min-width:390px;gap:12px}.pulse-axis{width:45px;height:185px;display:flex;flex-direction:column;justify-content:space-between;font-size:10px;color:#8c9d97;text-align:right;padding-right:3px}.pulse-columns{flex:1;display:flex;height:185px;gap:12px;background:repeating-linear-gradient(to top,#dceae540 0px,#dceae540 1px,transparent 1px,transparent 46.25px);border-bottom:1px solid #dce8e3}.pulse-day{flex:1;min-width:38px;position:relative;outline:none}.pulse-bars{height:100%;display:flex;gap:5px;justify-content:center;align-items:flex-end;padding:0 5px}.pulse-bar{width:17px;max-width:24px;flex:1;border-radius:7px 7px 0 0;transition:filter .2s,transform .2s;transform-origin:bottom}.pulse-bar.sales{background:linear-gradient(180deg,#42dac0,#10a77e);box-shadow:0 4px 10px #17b79720}.pulse-bar.purchases{background:linear-gradient(180deg,#73b9fa,#2878d7);box-shadow:0 4px 10px #3689e820}.pulse-day-label{text-align:center;margin-top:10px;color:#486058;font-size:11px}.pulse-day-label small{display:block;margin-top:3px;font-size:9px;color:#94a39c}.pulse-tooltip{position:absolute;bottom:45%;left:50%;transform:translate(-50%,0);opacity:0;pointer-events:none;background:#173f34;color:white;border-radius:9px;padding:10px 12px;font-size:10px;white-space:nowrap;box-shadow:0 8px 25px #173f3430;z-index:3;transition:opacity .15s}.pulse-tooltip span{display:block;margin-top:4px}.pulse-day:hover .pulse-tooltip,.pulse-day:focus .pulse-tooltip{opacity:1}.pulse-day:hover .pulse-bar,.pulse-day:focus .pulse-bar{filter:brightness(1.08)}.pulse-empty{padding:55px;text-align:center;color:#83988f}@media(max-width:600px){.pulse-body{padding:16px!important}.pulse-summary{gap:20px}.pulse-summary strong{font-size:17px}.pulse-columns{gap:6px}.pulse-bars{padding:0 3px}}@media(prefers-reduced-motion:reduce){.pulse-bar,.pulse-tooltip{transition:none}}





.pulse-dot.purchases{background:#eab14f}.pulse-dot.profit{background:#2589dc}.pulse-combo{width:100%;min-width:480px;display:block;height:auto;font-family:inherit;background:linear-gradient(180deg,#fbfefc,#fff)}.pulse-tick{font-size:10px;fill:#8b9f94}.pulse-weekday{font-size:11px;fill:#426453;font-weight:600}.pulse-note{display:block;margin-top:8px;font-size:10px;color:#82998d}.pulse-svg-day:focus rect,.pulse-svg-day:hover rect{filter:brightness(1.08)}.pulse-svg-day{outline:none}



/* assets/company-package-configuration.css */
.package-config-modal .package-config-intro{padding:14px 16px;background:#edf7f2;color:#315f4e;border-radius:10px;font-size:13px;line-height:1.6;margin-bottom:18px}
.package-config-products{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.package-config-modal .package-config-product{padding:12px;border:1px solid #d6e6de;border-radius:10px;background:#f8fbf9;display:grid;gap:10px;min-width:0}
.package-config-product>span{display:flex;align-items:center;gap:8px;min-width:0}
.package-config-modal input[type=checkbox]{width:18px;height:18px;flex:0 0 18px;margin:0;accent-color:#137b58}
.package-config-product input[type=number]{width:90px;min-width:0}
.package-config-heading{display:grid;gap:6px;margin-top:8px}
.package-config-features{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.package-config-modal .package-config-features label,.package-config-modal .package-config-check{display:flex;align-items:center;gap:9px;font-size:12px}
.package-config-features label{padding:10px;border:1px solid #ddeae3;border-radius:8px;background:#fafcfb;min-width:0}
.package-config-features span{overflow-wrap:anywhere}
.package-config-summary{font-size:13px;line-height:1.6;padding:14px;background:#eef6fa;color:#286080;border-radius:10px}
@media(max-width:600px){.package-config-products,.package-config-features{grid-template-columns:1fr}}

/* assets/dashboard-professional.css */
/* Company dashboard presentation; existing data and permissions stay authoritative. */
#content:has(> .dashboard-grid){--dash-green:#123d32;--dash-mint:#e5f4ec;--dash-gold:#c8a152}
#content:has(> .dashboard-grid)>.page-head{padding:28px 30px;margin-bottom:24px;border-radius:18px;background:linear-gradient(115deg,#11372e,#1b5945);color:white;box-shadow:0 10px 28px #173c3014;position:relative;overflow:hidden}
#content:has(> .dashboard-grid)>.page-head:after{content:'';position:absolute;width:230px;height:230px;border:1px solid #ffffff12;border-radius:50%;right:15%;top:-140px;pointer-events:none}
#content:has(> .dashboard-grid)>.page-head h1{font-size:27px;letter-spacing:-.6px;color:white;margin-bottom:8px}
#content:has(> .dashboard-grid)>.page-head .muted{color:#d1e5dc;font-size:13px}
#content:has(> .dashboard-grid)>.page-head .btn.primary{background:#edf6f1;color:#123d32;border:1px solid #ffffff50;box-shadow:none;min-height:44px}
#content:has(> .dashboard-grid)>.stats-grid{gap:18px;margin-bottom:24px}
#content:has(> .dashboard-grid)>.stats-grid .stat-card{min-width:0;padding:24px;border:1px solid #e0e9e4;border-radius:16px;box-shadow:0 4px 18px #173c3005;background:white}
#content:has(> .dashboard-grid)>.stats-grid .stat-card:after{display:none}
#content:has(> .dashboard-grid)>.stats-grid .stat-label{font-size:12px;font-weight:600;color:#60746b;display:flex;align-items:center;gap:10px;margin-bottom:18px;letter-spacing:.15px}
#content:has(> .dashboard-grid)>.stats-grid .stat-icon{width:32px;height:32px;border-radius:10px;display:grid;place-items:center;background:#e5f4ec;color:#237453;font-size:17px}
#content:has(> .dashboard-grid)>.stats-grid .stat-card:nth-child(2) .stat-icon{background:#fff3e4;color:#a66c20}
#content:has(> .dashboard-grid)>.stats-grid .stat-card:nth-child(3) .stat-icon{background:#edf0ff;color:#666eb5}
#content:has(> .dashboard-grid)>.stats-grid .stat-card:nth-child(4) .stat-icon{background:#f9efdd;color:#9c772f}
#content:has(> .dashboard-grid)>.stats-grid .stat-value{font-family:Manrope,'DM Sans',sans-serif;font-size:clamp(22px,2.2vw,32px);line-height:1.3;letter-spacing:-.9px;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
#content:has(> .dashboard-grid)>.stats-grid .stat-foot{font-size:11px;margin-top:12px;color:#809188}
#content:has(> .dashboard-grid)>.dashboard-grid{grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:22px}
#content:has(> .dashboard-grid) .card,#content:has(> .dashboard-grid)>.table-card{border:1px solid #e0e9e4;border-radius:16px;box-shadow:0 4px 18px #173c3004;overflow:hidden;min-width:0}
#content:has(> .dashboard-grid) .card-head{padding:22px 24px;border-bottom:1px solid #edf1ee}
#content:has(> .dashboard-grid) .card-head h3{font-size:15px;letter-spacing:-.2px;color:#214638}
#content:has(> .dashboard-grid) .card-head small{font-size:11px;color:#7d8c85}
#content:has(> .dashboard-grid) .card-body{padding:24px}
#content:has(> .dashboard-grid) .chart{height:220px;gap:14px;background:repeating-linear-gradient(to top,transparent 0,transparent calc(25% - 1px),#eef2ef calc(25% - 1px),#eef2ef 25%);border-bottom:1px solid #e5ece7}
#content:has(> .dashboard-grid) .chart .bar{background:linear-gradient(#4baf83,#1e7354);border-radius:5px 5px 0 0;max-width:25px}
#content:has(> .dashboard-grid) .chart .bar.purchase{background:linear-gradient(#e2c47d,#b59142)}
#content:has(> .dashboard-grid) .chart-day small{font-size:11px;color:#6f8177}
#content:has(> .dashboard-grid) .quick-grid{gap:12px}
#content:has(> .dashboard-grid) .quick-btn{background:#f7faf8;border:1px solid #e2ebe5;border-radius:12px;min-height:100px;padding:18px;box-shadow:none;transition:background .15s,border-color .15s}
#content:has(> .dashboard-grid) .quick-btn:hover{background:#eaf5ee;border-color:#a8cbb9}
#content:has(> .dashboard-grid) .quick-btn b{background:#e5f2e9;color:#286849;border-radius:10px;width:35px;height:35px;display:grid;place-items:center;font-size:20px}
#content:has(> .dashboard-grid) .quick-btn span{font-size:12px;font-weight:600;color:#315a46}
#content:has(> .dashboard-grid) .table-wrap{overflow-x:auto;max-width:100%;-webkit-overflow-scrolling:touch}
#content:has(> .dashboard-grid) table th{background:#f6f9f7;color:#74877c;letter-spacing:.6px;padding-block:14px}
#content:has(> .dashboard-grid) table td{padding-block:15px}
@media(max-width:1100px){#content:has(> .dashboard-grid)>.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#content:has(> .dashboard-grid)>.dashboard-grid{grid-template-columns:1fr}}
@media(max-width:600px){#content:has(> .dashboard-grid)>.page-head{padding:22px 18px;border-radius:14px;gap:18px;align-items:flex-start}#content:has(> .dashboard-grid)>.page-head h1{font-size:23px}#content:has(> .dashboard-grid)>.stats-grid{gap:10px}#content:has(> .dashboard-grid)>.stats-grid .stat-card{padding:16px 12px;border-radius:12px}#content:has(> .dashboard-grid)>.stats-grid .stat-label{font-size:11px;gap:6px;align-items:flex-start}#content:has(> .dashboard-grid)>.stats-grid .stat-value{font-size:22px}#content:has(> .dashboard-grid) .card-head,#content:has(> .dashboard-grid) .card-body{padding:18px}#content:has(> .dashboard-grid) .chart{gap:8px;height:180px}#content:has(> .dashboard-grid) table{min-width:640px}}

#content:has(> .dashboard-grid) .dashboard-eyebrow{display:block;font-size:10px;font-weight:700;letter-spacing:1.6px;color:#d9be79;margin-bottom:12px;text-transform:uppercase}
#content:has(> .dashboard-grid) .dashboard-date{text-align:right;color:#e4eee9;display:grid;gap:6px;font-size:12px}
#content:has(> .dashboard-grid) .dashboard-date span{font-size:10px;text-transform:uppercase;letter-spacing:1px;color:#bad2c5}
#content:has(> .dashboard-grid)>.stats-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
#content:has(> .dashboard-grid) .dashboard-recent{margin-top:24px}
#content:has(> .dashboard-grid) .dashboard-activity-chart{display:flex;gap:18px;height:220px}
#content:has(> .dashboard-grid) .dashboard-activity-day{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;gap:12px;font-size:11px;color:#6c8275}
#content:has(> .dashboard-grid) .dashboard-activity-day strong{font-size:12px;color:#235c44}
#content:has(> .dashboard-grid) .dashboard-activity-track{flex:1;width:100%;max-width:38px;display:flex;align-items:flex-end;background:#f1f6f3;border-radius:7px;overflow:hidden}
#content:has(> .dashboard-grid) .dashboard-activity-track span{width:100%;background:linear-gradient(#58b38c,#227756);border-radius:6px 6px 0 0}
#content:has(> .dashboard-grid) .dashboard-status{background:#edf5ef;border-radius:6px;padding:4px 8px;font-size:11px}
#content:has(> .dashboard-grid) .account-link{min-height:40px}
@media(max-width:1100px){#content:has(> .dashboard-grid)>.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){#content:has(> .dashboard-grid) .dashboard-date{text-align:left}#content:has(> .dashboard-grid)>.stats-grid{grid-template-columns:1fr!important}#content:has(> .dashboard-grid) .dashboard-activity-chart{gap:10px;height:190px}#content:has(> .dashboard-grid)>.page-head{flex-direction:column}#content:has(> .dashboard-grid) .dashboard-recent{margin-top:18px}}

#content:has(> .dashboard-grid){font-family:'DM Sans',Arial,sans-serif}
#content:has(> .dashboard-grid) :is(h1,h2,h3,button){font-family:'DM Sans',Arial,sans-serif}

/* Compact company view and permission-scoped business insights. */
#content[data-dashboard-view=company]:has(>.dashboard-grid)>.stats-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:18px}
#content[data-dashboard-view=company]:has(>.dashboard-grid)>.stats-grid .stat-card{padding:15px 16px;border-radius:12px}
#content[data-dashboard-view=company]:has(>.dashboard-grid)>.stats-grid .stat-label{margin-bottom:10px;font-size:11px;gap:8px}
#content[data-dashboard-view=company]:has(>.dashboard-grid)>.stats-grid .stat-icon{width:27px;height:27px;border-radius:8px;flex-shrink:0;font-size:14px}
#content[data-dashboard-view=company]:has(>.dashboard-grid)>.stats-grid .stat-value{font-size:22px;letter-spacing:-.5px}
#content[data-dashboard-view=company]:has(>.dashboard-grid)>.stats-grid .stat-foot{margin-top:8px;font-size:10px;line-height:1.4}
#content[data-dashboard-view=company]:has(>.dashboard-grid) .quick-btn{min-height:64px;padding:12px;display:flex;align-items:center;gap:10px}
#content[data-dashboard-view=company]:has(>.dashboard-grid) .quick-btn b{width:28px;height:28px;flex-shrink:0}
#content[data-dashboard-view=company]:has(>.dashboard-grid) .dashboard-activity-chart{height:160px}
#content[data-dashboard-view=company] .company-insights-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-bottom:18px}
#content[data-dashboard-view=company] .insight-chart-card .card-head{padding:16px 20px;gap:8px;flex-wrap:wrap}
#content[data-dashboard-view=company] .insight-chart-card .card-body{padding:16px 20px}
#content[data-dashboard-view=company] .insight-svg{display:block;width:100%;height:auto;max-height:220px;overflow:visible}
#content[data-dashboard-view=company] .insight-svg text,#content[data-dashboard-view=company] .stock-health text{fill:#778a7e;font:10px Arial,sans-serif}
#content[data-dashboard-view=company] .insight-legend{display:flex;flex-wrap:wrap;gap:10px 20px;margin-bottom:14px;font-size:11px;color:#698172}
#content[data-dashboard-view=company] .insight-legend span{display:flex;align-items:center;gap:7px}
#content[data-dashboard-view=company] .insight-legend b{color:#244a35;font-size:12px}
#content[data-dashboard-view=company] .insight-legend i,#content[data-dashboard-view=company] .stock-health-legend i{width:9px;height:9px;border-radius:3px;display:inline-block;flex-shrink:0}
#content[data-dashboard-view=company] .insight-data{margin-top:12px;font-size:11px;color:#617c6b}
#content[data-dashboard-view=company] .insight-data summary{cursor:pointer;min-height:36px;display:flex;align-items:center;text-decoration:underline;text-underline-offset:3px}
#content[data-dashboard-view=company] .insight-data table{font-size:11px;min-width:0}
#content[data-dashboard-view=company] .stock-health{display:flex;align-items:center;justify-content:center;gap:30px;min-height:190px}
#content[data-dashboard-view=company] .stock-health svg{width:170px;max-width:48%;flex-shrink:0}
#content[data-dashboard-view=company] .stock-health .stock-count{fill:#244a35;font-size:26px;font-weight:bold}
#content[data-dashboard-view=company] .stock-health-legend{flex:1;max-width:240px}
#content[data-dashboard-view=company] .stock-health-legend>div{display:flex;align-items:center;gap:8px;margin:18px 0;font-size:12px}
#content[data-dashboard-view=company] .stock-health-legend b{margin-left:auto;color:#244a35}
#content[data-dashboard-view=company] .customer-ranking{margin-bottom:16px}
#content[data-dashboard-view=company] .customer-ranking>div:first-child{display:flex;justify-content:space-between;gap:16px;font-size:12px;margin-bottom:7px}
#content[data-dashboard-view=company] .customer-ranking span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
#content[data-dashboard-view=company] .customer-ranking b{flex-shrink:0;font-variant-numeric:tabular-nums}
#content[data-dashboard-view=company] .customer-progress{height:5px;border-radius:4px;background:#edf3ef;overflow:hidden;margin-bottom:5px}
#content[data-dashboard-view=company] .customer-progress i{display:block;height:100%;background:#63ac86;border-radius:4px}
#content[data-dashboard-view=company] .customer-ranking small{font-size:10px;color:#80968a}
@media(min-width:1400px){#content[data-dashboard-view=company]:has(>.dashboard-grid)>.stats-grid{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media(max-width:1100px){#content[data-dashboard-view=company]:has(>.dashboard-grid)>.stats-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:800px){#content[data-dashboard-view=company] .company-insights-grid{grid-template-columns:1fr}#content[data-dashboard-view=company]:has(>.dashboard-grid)>.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){#content[data-dashboard-view=company]:has(>.dashboard-grid)>.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}#content[data-dashboard-view=company]:has(>.dashboard-grid)>.stats-grid .stat-card{padding:13px 12px}#content[data-dashboard-view=company]:has(>.dashboard-grid)>.stats-grid .stat-value{font-size:18px}#content[data-dashboard-view=company] .stock-health{gap:16px}#content[data-dashboard-view=company] .insight-chart-card .card-body{padding:14px}#content[data-dashboard-view=company] .customer-ranking>div:first-child{font-size:11px}}
@media(max-width:360px){#content[data-dashboard-view=company]:has(>.dashboard-grid)>.stats-grid{grid-template-columns:1fr!important}}

#content[data-dashboard-view=company]:has(>.dashboard-grid) .quick-btn:has(>svg)>b{display:none}

#content[data-dashboard-view=company] .party-tabs{display:flex;flex-wrap:wrap;gap:6px;padding:12px 20px 0}
#content[data-dashboard-view=company] .party-tabs button{font:inherit;font-size:12px;min-height:40px;padding:8px 12px;border:1px solid #dbe8df;border-radius:8px;color:#52705e;background:#f6faf7;cursor:pointer}
#content[data-dashboard-view=company] .party-tabs button[aria-selected=true]{color:white;background:#246d4f;border-color:#246d4f}
#content[data-dashboard-view=company] .party-caption{font-size:10px;color:#82978a;margin:0 0 16px}
#content[data-dashboard-view=company] .party-panel{min-height:180px}
@media(max-width:600px){#content[data-dashboard-view=company] .party-tabs{padding-inline:14px}#content[data-dashboard-view=company] .party-tabs button{min-height:44px}}

/* Greeting replaces the dashboard hero; stays in the shell only on Dashboard. */
.topbar:has(.dashboard-topbar-greeting){height:auto;min-height:76px;gap:16px}
.dashboard-topbar-greeting{flex:1;min-width:150px;text-align:center;display:grid;gap:4px;padding:10px 0;font-family:'DM Sans',Arial,sans-serif}
.dashboard-topbar-greeting strong{font-size:16px;font-weight:700;color:#214638;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dashboard-topbar-greeting small{font-size:11px;color:#7c8d83;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.topbar:has(.dashboard-topbar-greeting) .company-picker{min-width:0}
.topbar:has(.dashboard-topbar-greeting) .company-picker select{max-width:220px}
@media(max-width:1300px){.topbar:has(.dashboard-topbar-greeting){flex-wrap:wrap;padding-top:10px;padding-bottom:10px}.dashboard-topbar-greeting{order:10;flex-basis:100%;padding:4px 0 0}.topbar:has(.dashboard-topbar-greeting) .top-actions{margin-left:auto}}
@media(max-width:600px){.topbar:has(.dashboard-topbar-greeting){gap:8px}.topbar:has(.dashboard-topbar-greeting) .company-picker{flex:1}.topbar:has(.dashboard-topbar-greeting) .company-picker select{max-width:100%;width:100%;font-size:12px}.topbar:has(.dashboard-topbar-greeting) .top-stock-search{display:none}.topbar:has(.dashboard-topbar-greeting) .top-actions{gap:6px}.dashboard-topbar-greeting strong{font-size:15px}.dashboard-topbar-greeting small{font-size:11px}}

/* Single-line greeting uses the topbar's available middle space. */
.topbar:has(.dashboard-topbar-greeting){flex-wrap:nowrap;gap:12px;padding-top:0;padding-bottom:0}
.dashboard-topbar-greeting{order:0;flex:1 1 auto;flex-basis:auto;min-width:0;display:flex;align-items:center;justify-content:center;gap:14px;white-space:nowrap;padding:0}
.dashboard-topbar-greeting strong{font-size:26px;line-height:1.2;flex:0 1 auto;min-width:0;letter-spacing:-.5px}
.dashboard-topbar-greeting small{font-size:12px;flex:0 1 auto;min-width:0}
.topbar:has(.dashboard-topbar-greeting) .company-picker select{max-width:180px}
.topbar:has(.dashboard-topbar-greeting) .top-stock-search{max-width:140px;width:140px}
@media(max-width:1200px){.topbar:has(.dashboard-topbar-greeting) .company-picker span{display:none}.topbar:has(.dashboard-topbar-greeting) .company-picker select{max-width:155px}.topbar:has(.dashboard-topbar-greeting) .top-stock-search{max-width:100px;width:100px}.dashboard-topbar-greeting strong{font-size:24px}}
@media(max-width:800px){.dashboard-topbar-greeting{gap:8px}.dashboard-topbar-greeting strong{font-size:20px}.dashboard-topbar-greeting small{font-size:10px}.topbar:has(.dashboard-topbar-greeting) .company-picker select{max-width:120px}}
@media(max-width:600px){.topbar:has(.dashboard-topbar-greeting){gap:6px}.topbar:has(.dashboard-topbar-greeting) .company-picker{flex:0 1 80px}.topbar:has(.dashboard-topbar-greeting) .top-actions{margin-left:0}.dashboard-topbar-greeting strong{font-size:16px;letter-spacing:-.3px}.dashboard-topbar-greeting small{max-width:70px;font-size:9px}.dashboard-topbar-greeting{gap:6px}.topbar:has(.dashboard-topbar-greeting) .menu-btn{margin-right:0}}

.dashboard-company-controls{display:grid;gap:4px;min-width:0}
.dashboard-company-controls [data-dashboard-period]{border:0;background:none;padding:0 2px;color:#6d8377;font-size:10px;text-align:left;white-space:nowrap;cursor:pointer;text-decoration:underline;text-underline-offset:3px;min-height:20px}
.dashboard-period-dialog{box-sizing:border-box;width:min(460px,calc(100vw - 24px));max-height:calc(100dvh - 32px);overflow:auto;border:0;border-radius:14px;padding:24px;color:#214638;font:14px 'DM Sans',Arial,sans-serif}
.dashboard-period-dialog::backdrop{background:#123b2faa}
.dashboard-period-dialog h2{font-size:20px;margin:0 0 18px}
.dashboard-period-presets{display:flex;flex-wrap:wrap;gap:8px}
.dashboard-period-dialog button{min-height:44px;padding:10px 14px;border:1px solid #d5e4d9;border-radius:8px;background:#f2f7f3;color:#2c6546;font:inherit;cursor:pointer}
.dashboard-period-dates{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:18px 0}
.dashboard-period-dates label{display:grid;gap:8px;font-size:12px;min-width:0}
.dashboard-period-dates input{box-sizing:border-box;width:100%;min-width:0;min-height:44px;padding:8px;border:1px solid #cbded1;border-radius:8px;font-size:16px}
.dashboard-period-dialog p{color:#7b8b80;font-size:11px;line-height:1.5}
.dashboard-period-dialog footer{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}
.dashboard-period-dialog button[type=submit]{background:#215f43;color:white}
.dashboard-period-dialog [data-period-error]{color:#ad3939;font-size:12px}
.topbar:has(.dashboard-company-controls){min-height:80px}
@media(max-width:600px){.dashboard-company-controls [data-dashboard-period]{font-size:9px;max-width:100px;overflow:hidden;text-overflow:ellipsis}.dashboard-period-dialog{padding:18px}}

@media(pointer:coarse){.dashboard-company-controls [data-dashboard-period]{min-height:44px}}

#content:has(>.dashboard-grid) .dashboard-activity-chart{overflow-x:auto;overflow-y:hidden;padding-bottom:6px;-webkit-overflow-scrolling:touch}
#content:has(>.dashboard-grid) .dashboard-activity-day{min-width:44px}
#content:has(>.dashboard-grid) .dashboard-activity-day small{white-space:nowrap;font-size:10px}

#content[data-dashboard-view=company] .stock-health-legend>button{display:flex;align-items:center;gap:8px;width:100%;padding:9px 0;border:0;background:none;color:inherit;font:inherit;font-size:12px;text-align:left;cursor:pointer;min-height:40px}
#content[data-dashboard-view=company] .stock-health-legend>button:hover{color:#205e42;text-decoration:underline}
#content[data-dashboard-view=company] .stock-slow-note{display:block;font-size:9px;line-height:1.4;color:#839489;margin-top:4px}
#content[data-dashboard-view=company] [data-stock-category]{cursor:pointer}
#content[data-dashboard-view=company] .stock-attention-link{margin-top:12px;min-height:40px;padding:0;background:none;border:0;text-decoration:underline;text-underline-offset:3px;color:#617c6b;font:inherit;font-size:11px;cursor:pointer}
.dashboard-stock-dialog{box-sizing:border-box;width:min(1000px,calc(100vw - 24px));max-height:calc(100dvh - 32px);overflow:auto;border:0;border-radius:14px;padding:22px;color:#214638;font:13px 'DM Sans',Arial,sans-serif}
.dashboard-stock-dialog::backdrop{background:#123b2faa}
.stock-inline-details{width:100%;max-height:none;margin-top:18px;padding:18px 0 0;border-top:1px solid #e0e9e2;border-radius:0;overflow:visible}
.stock-inline-details .stock-dialog-head h2{font-size:15px}
.stock-dialog-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:16px}
.stock-dialog-head h2{font-size:20px;margin:0 0 8px}.stock-dialog-head small{font-size:11px;color:#7a8f80}
.dashboard-stock-dialog button{min-height:44px;padding:9px 15px;background:#edf5ef;border:1px solid #ccdfd1;border-radius:8px;color:#276546;font:inherit;cursor:pointer}
.dashboard-stock-dialog button:disabled{opacity:.4;cursor:default}
.stock-detail-search{display:flex;gap:8px;margin-bottom:10px}.stock-detail-search input{box-sizing:border-box;flex:1;min-width:0;min-height:44px;padding:10px;border:1px solid #ccdfd1;border-radius:8px;font-size:16px}
.stock-detail-note{font-size:11px;line-height:1.5;color:#798f80}.dashboard-stock-dialog .table-wrap{max-width:100%;overflow:auto}
.dashboard-stock-dialog table{width:100%;min-width:600px;border-collapse:collapse}.dashboard-stock-dialog th,.dashboard-stock-dialog td{padding:12px 10px;border-bottom:1px solid #e0e9e2;text-align:left;vertical-align:top}.dashboard-stock-dialog th{background:#f2f7f3;font-size:11px}
.stock-detail-pages{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:18px}.stock-detail-pages span{font-size:11px;color:#768e7d}
@media(max-width:600px){.dashboard-stock-dialog{padding:14px}.stock-dialog-head h2{font-size:17px}#content[data-dashboard-view=company] .stock-health-legend>button{min-height:44px}}

#content:has(>.dashboard-grid)>.stats-grid{grid-auto-rows:1fr}
#content:has(>.dashboard-grid)>.stats-grid .stat-card{height:100%;box-sizing:border-box}

#content [data-detail-metric],#content [data-detail-party]{cursor:pointer}#content [data-detail-metric]:hover,#content [data-detail-party]:hover{box-shadow:0 0 0 2px #74b89b}#content [data-detail-metric]:focus-visible,#content [data-detail-party]:focus-visible{outline:2px solid #25815c;outline-offset:2px}

/* assets/ui-theme.css */
.ui-theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:34px;padding:0 9px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--ink);font-size:11px;flex-shrink:0}
.ui-theme-toggle svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.ui-theme-toggle:focus-visible{outline:2px solid #2ca878;outline-offset:3px}
@media(max-width:1200px){.ui-theme-toggle span{display:none}.ui-theme-toggle{width:34px;padding:0}}
@media screen{
html[data-ui-theme=dark]{color-scheme:dark;--ink:#e3eee9;--muted:#a8bcb2;--line:#344b42;--bg:#111d18;--surface:#1b2b24;--deep:#102b22;--deep2:#091e17;--mint:#213f32;--shadow:0 14px 42px #0005}
html[data-ui-theme=dark] body,html[data-ui-theme=dark] .workspace{background:var(--bg);color:var(--ink)}
html[data-ui-theme=dark] :is(.topbar,.card,.table-card,.stat-card,.modal,.modal-head,.modal-header,.modal-footer,dialog,.login-panel,.login-card,.settings-panel,.settings-card,.product-search-results,.contact-search-results,.top-stock-results,.pdc-notification-panel,.transaction-format-dialog){background:var(--surface)!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-ui-theme=dark] :is(input,select,textarea){background:#15251e!important;color:var(--ink)!important;border-color:#496153!important}
html[data-ui-theme=dark] input::placeholder,html[data-ui-theme=dark] textarea::placeholder{color:#a1b4aa!important;opacity:1}
html[data-ui-theme=dark] :is(.toolbar,.transaction-filter-note,.transaction-bulk-actions,.card-head,.modal-body,.form-section,.settings-tabs,.party-tabs){background:#1b2b24!important;border-color:var(--line)!important;color:var(--ink)!important}
html[data-ui-theme=dark] :is(.card-head h3,.stat-label,.stat-value,.page-head h1,.dashboard-topbar-greeting,.modal h2,.modal h3,dialog h2,dialog h3,.login-panel h2,.form-grid label,.settings-panel h3){color:var(--ink)!important}
html[data-ui-theme=dark] :is(.muted,.stat-foot,.card-head small,.page-head p,.company-picker>span,.party-caption,.stock-slow-note,.stock-detail-note,.stock-dialog-head small,.insight-data summary){color:var(--muted)!important}
html[data-ui-theme=dark] :is(.btn.secondary,.quick-btn,.party-tabs button,.stock-attention-link,.stock-health-legend button,.modal-close,.modal-minimize,.icon-btn,.pdc-notification-button,.dashboard-period-presets button,.stock-detail-pages button){background:#233c30!important;color:#d0e6d9!important;border-color:#486452!important}
html[data-ui-theme=dark] .party-tabs button[aria-selected=true]{background:#2c7655!important;color:#fff!important}
html[data-ui-theme=dark] :is(th,td){border-color:var(--line)!important}
html[data-ui-theme=dark] th{background:#253d31!important;color:#c4dbcd!important}
html[data-ui-theme=dark] tbody tr{background:var(--surface)!important;color:var(--ink)}
html[data-ui-theme=dark] tbody tr:nth-child(even){background:#1e3027!important}
html[data-ui-theme=dark] tbody tr:hover{background:#294737!important}
html[data-ui-theme=dark] :is(.transaction-voucher-table small,.insight-legend,.customer-ranking,.stock-health-legend,.stock-count){color:var(--ink)!important;fill:var(--ink)!important}
html[data-ui-theme=dark] .insight-svg text{fill:#b3cbbd!important}
html[data-ui-theme=dark] .insight-svg line{stroke:#3a5245!important}
html[data-ui-theme=dark] .stock-health svg text{fill:#d9eade!important}
html[data-ui-theme=dark] :is(.customer-progress,.dashboard-activity-track){background:#304b3d!important}
html[data-ui-theme=dark] .stat-card:after{background:#254638!important}
html[data-ui-theme=dark] :is(.stat-icon,.live-status){background:#254638!important;color:#9ad8b8!important}
html[data-ui-theme=dark] .stat-value.text-red,html[data-ui-theme=dark] .text-red{color:#ff8383!important}
html[data-ui-theme=dark] .product-search-results button,html[data-ui-theme=dark] .top-stock-result{background:var(--surface)!important;color:var(--ink)!important}
html[data-ui-theme=dark] #ledgerone-titlebar{background:#1b2b24!important;color:#dfede5!important}
html[data-ui-theme=dark] .dashboard-topbar-greeting strong{color:#d9eee2!important}
html[data-ui-theme=dark] .login-panel a{color:#9cddbb}
html[data-ui-theme=dark] .loader-screen{background:#111d18;color:var(--ink)}
}
@media print{.ui-theme-toggle{display:none!important}}

@media screen{
html[data-ui-theme=dark] .report-export-actions{background:#1b2b24!important;border-color:var(--line)!important}
html[data-ui-theme=dark] .report-export-actions button{background:transparent!important;color:#d0e6d9!important}
html[data-ui-theme=dark] .report-export-actions button:hover,html[data-ui-theme=dark] .report-export-actions button:focus-visible{background:#294737!important;color:#fff!important}
html[data-ui-theme=dark] :is(.row-actions button,.table-card .action-edit,.table-card .action-delete){background:#233c30!important;border-color:#486452!important;color:#d0e6d9!important}
html[data-ui-theme=dark] :is(.row-actions .action-delete,.row-actions .immediate-delete,.table-card .action-delete){color:#ff9292!important}
html[data-ui-theme=dark] .row-actions button:hover:not(:disabled){background:#2d4c3c!important;border-color:#72a08a!important}
html[data-ui-theme=dark] :is(th.generic-sort-header:hover,th.generic-sort-header.sort-asc,th.generic-sort-header.sort-desc,th.report-sort-header.active-sort,.stock-moving-table thead th){background:#2b4939!important;color:#dcf0e3!important;border-color:var(--line)!important}
html[data-ui-theme=dark] :is(.generic-sort-header,.report-sort-header)::after,html[data-ui-theme=dark] .table-sort-button span{color:#9ad6b5!important}
html[data-ui-theme=dark] .table-sort-button:hover{color:#dcf0e3!important}
html[data-ui-theme=dark] .stock-moving-table tbody td{background:var(--surface)!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-ui-theme=dark] .stock-moving-table tbody tr:nth-child(even) td{background:#1e3027!important}
html[data-ui-theme=dark] .stock-moving-table tbody tr:hover td{background:#294737!important}
html[data-ui-theme=dark] :is(.stock-moving-column-tools,.stock-moving-report-controls){background:var(--surface)!important;color:var(--ink)!important;border-color:var(--line)!important}
}

@media screen{
html[data-ui-theme=dark] :is(.settings-menu,.settings-panel-head,.modal-foot,.opening-bill-editor,.voucher-help,.report-export-modal,.report-export-head,.report-export-foot){background:#1b2b24!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-ui-theme=dark] .settings-menu button{color:var(--ink)!important}
html[data-ui-theme=dark] .settings-menu button:hover,html[data-ui-theme=dark] .settings-menu button.active{background:#294737!important;color:#dcf0e3!important}
html[data-ui-theme=dark] :is(.settings-menu small,.settings-panel-head p,.opening-bill-head small,.opening-bill-columns,.opening-bill-summary span,.report-export-foot span){color:var(--muted)!important}
html[data-ui-theme=dark] :is(.settings-panel-head h2,.voucher-help b,.opening-bill-head b){color:var(--ink)!important}
html[data-ui-theme=dark] :is(.account-tree-action,.account-tree-toggle,.report-export-head button){background:#233c30!important;color:#d0e6d9!important;border-color:#486452!important}
html[data-ui-theme=dark] .account-list-card tbody tr td{background:#1b2b24!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-ui-theme=dark] .account-list-card tbody tr:nth-child(even) td{background:#1e3027!important}
html[data-ui-theme=dark] .account-list-card tbody tr:hover td{background:#294737!important}
html[data-ui-theme=dark] .account-list-card :is(.account-link,.account-tree-node-label b){color:#dceee3!important}
html[data-ui-theme=dark] .account-list-card :is(.account-tree-count,.account-system-badge){background:#30483b!important;color:#c7dbd0!important}
html[data-ui-theme=dark] .report-export-scroll{background:#101b16!important}
/* The preview frame follows the theme; the document retains paper colors. */
html[data-ui-theme=dark] .report-export-sheet{background:#fff!important;color:#172a22!important;--ink:#172a22;--muted:#586c61;--line:#d8e3dc;color-scheme:light}
html[data-ui-theme=dark] .report-export-sheet :is(h1,h2,h3,p,small,span,b,strong,footer){color:inherit}
html[data-ui-theme=dark] .report-export-sheet table :is(tbody tr,tbody tr:nth-child(even),tbody tr:hover,td){background:#fff!important;color:#172a22!important;border-color:#d8e3dc!important}
html[data-ui-theme=dark] .report-export-sheet table th{background:#e9f0ec!important;color:#203c2e!important;border-color:#cedcd3!important}
}

@media screen{
html[data-ui-theme=dark] :is(.report-summary,.company-card,.product-query-summary>div,.product-query-filter,.warehouse-card,.form-grid .checkbox-label,.allocation-row,.allocation-empty,.financial-report-head,.statement-total,.ageing-cards>div,.party-profile>div,.reconciliation-meta>div,.reconciliation-summary>div,.reconcile-balance-strip,.reconcile-section,.reconcile-section-head,.reconcile-footer-status,.billing-facts>div,.company-logo-editor,.billing-console,.billing-module-summary,.subscription-create-note,.available-plan-card,.available-plan-empty,.user-summary>div,.user-toolbar,.custom-access-panel,.permission-grid label,.permission-matrix,.permission-section>header,.permission-search,.approval-search,.session-summary>div,.sessions-card code,.po-receipt-history-head,.po-receipt-history-row,.module-assignment,.module-store-card,.year-close-card,.year-close-head,.year-close-confirm,.factory-reset-card,.factory-confirm-check,.stock-lookup-item,.stock-warehouse-balance,.invoice-tax-toggle,.invoice-total-summary,.outstanding-chart,.outstanding-pie>div,.reconcile-review-tools,.reconcile-direction,.temporary-check-card,.report-warehouse-picker>summary,.report-warehouse-picker>div,.import-section,.import-preview,.backup-card,.company-import-card,.premium-order-price,.premium-confirm,.guided-form-step,.bank-line-one-step .one-step-title,.reconcile-count,.reconcile-search-shell,.billing-company-card,.billing-company-card>header,.billing-company-card>footer,.billing-price-card,.billing-addon-card,.billing-company-metrics,.billing-member-list,.refund-bill-summary,.client-portal-modal,.client-portal-tabs,.client-summary-grid article,.client-portal-card,.client-service,.premium-module-picker .module-price,.report-date,.inventory-ageing-meta>div,.server-overview article,.server-meta>div,.package-price-chart>div,.extra-user-price-chart>div,.custom-tax-builder,.custom-tax-preset,.custom-tax-fields label,.note-format-selector,.note-format-selector label,.visual-canvas,.invoice-element-tools,.rich-text-area-tools,.invoice-data-palette,.billing-plain-summary>div,.billing-help-card,.referral-report-filter,.referral-picker summary,.referral-picker-options,.petty-cash-summary>div,.petty-float-row,.cash-count-summary>div,.petty-history-meta>div,.stock-moving-column-tools summary,.stock-moving-column-menu){background:#1b2b24!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-ui-theme=dark] :is(.permission-select-all,.permission-clear-all,.icon-action,.premium-icon,.premium-confirm-cancel,.client-quick-actions button,.client-action-grid>button,.invoice-rich-toolbar button,.invoice-token-list button,.stock-lookup-bar,.statement-tree-toggle){background:#233c30!important;color:#d0e6d9!important;border-color:#486452!important}
html[data-ui-theme=dark] :is(.permission-grid,.custom-access-panel,.billing-company-card,.custom-tax-preset,.client-portal-card,.year-close-card,.factory-reset-card,.module-store-card,.guided-form-step) :is(h2,h3,h4,b,strong,label){color:var(--ink)!important}
html[data-ui-theme=dark] :is(.permission-grid,.custom-access-panel,.billing-company-card,.custom-tax-preset,.client-portal-card,.year-close-card,.module-store-card) :is(p,small){color:var(--muted)!important}
html[data-ui-theme=dark] :is(.allocation-row.selected,.module-assignment.selected,.permission-matrix-row:hover>div,.permission-matrix-row label.dependency-auto,.reconcile-steps .active,.billing-menu button.active,.billing-menu button:hover,.client-action-grid>button:hover){background:#294737!important;color:#dcf0e3!important;border-color:#486452!important}
html[data-ui-theme=dark] :is(.voucher-ledger-posting tfoot th,.financial-table tbody td,.ledger-tree-entry td,.outstanding-tree-document td,.ledger-report-group td,.statement-parent-account td,.inventory-value-total-row td,.petty-cash-table tfoot th,.pdc-register-table tfoot th){background:#1e3027!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-ui-theme=dark] :is(.form-error,.delete-warning,.factory-reset-warning,.btn.danger,.premium-icon.danger,.opening-bill-remove,.line-remove){background:#452a2b!important;color:#ffb3ae!important;border-color:#7e4947!important}
html[data-ui-theme=dark] :is(.subscription-warning,.year-close-warning,.trial-control-alert,.billing-attention,.price-approval-box,.permission-dependency-note,.subscription-change-pending){background:#3e3824!important;color:#f1dca0!important;border-color:#6b5b34!important}
html[data-ui-theme=dark] :is(.reconcile-empty-success,.resolved-line,.billing-clear){background:#234333!important;color:#bce8ca!important;border-color:#426b50!important}
html[data-ui-theme=dark] .badge{background:#284437!important;color:#d3eadc!important}
html[data-ui-theme=dark] :is(.badge.void,.badge.inactive,.badge.adverse,.badge.rejected,.badge.suspended,.badge.past_due){background:#452a2b!important;color:#ffb3ae!important}
html[data-ui-theme=dark] :is(.badge.pending,.badge.pending_user,.badge.pending_approval,.badge.pending_payment,.badge.partially_received,.badge.pending_price_approval){background:#3e3824!important;color:#f1dca0!important}
}

@media screen{
html[data-ui-theme=dark] #content .account-list-card tbody tr td{background:#1b2b24!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-ui-theme=dark] #content .account-list-card tbody tr:nth-child(even) td{background:#1e3027!important}
html[data-ui-theme=dark] #content .account-list-card tbody tr:hover td{background:#294737!important}
html[data-ui-theme=dark] #content .account-list-card :is(.account-link,.account-tree-node-label b){color:#dceee3!important}
/* Keep the long account tree on the page's vertical scroll chain. */
#content .account-list-card .table-wrap{height:auto!important;max-height:none!important;overflow-x:auto!important;overflow-y:auto!important;overscroll-behavior:auto!important;touch-action:pan-x pan-y}
}

@media screen{
html[data-ui-theme=dark] .account-list-card.account-list-card tbody tr:nth-child(odd) td{background:#1b2b24!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-ui-theme=dark] .account-list-card.account-list-card tbody tr:nth-child(even) td{background:#1e3027!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-ui-theme=dark] .account-list-card.account-list-card tbody tr:hover td{background:#294737!important}
}

@media screen{
html[data-ui-theme=dark] .account-list-card.account-list-card tbody tr:nth-child(n) td{border-color:#344b42!important}
html[data-ui-theme=dark] .account-list-card.account-list-card .role-chip{background:#30483b!important;color:#c7dbd0!important;border-color:#486452!important}
html[data-ui-theme=dark] .account-list-card.account-list-card .account-link{border-color:#628471!important;text-decoration-color:#628471!important}
html[data-ui-theme=dark] .account-list-card.account-list-card .table-wrap{scrollbar-color:#527060 #15251e;}
html[data-ui-theme=dark] .account-list-card .table-wrap::-webkit-scrollbar-track{background:#15251e}
html[data-ui-theme=dark] .account-list-card .table-wrap::-webkit-scrollbar-thumb{background:#527060;border:2px solid #15251e;border-radius:8px}
}

@media screen{
html[data-ui-theme=dark] #content .account-list-card tbody tr[data-tree-depth]:nth-child(odd) td{background-color:#1b2b24!important;color:var(--ink)!important;border-color:#344b42!important}
html[data-ui-theme=dark] #content .account-list-card tbody tr[data-tree-depth]:nth-child(even) td{background-color:#1e3027!important;color:var(--ink)!important;border-color:#344b42!important}
html[data-ui-theme=dark] #content .account-list-card tbody tr[data-tree-depth]:hover td{background-color:#294737!important}
}

@media screen{
html[data-ui-theme=dark] :is(.account-link,.party-link,.contact-link,.ledger-link,#content table a):not(:where(.report-export-sheet *,.print-document *,.voucher-print *,.invoice-design-paper *)){color:#9edfc1!important;text-decoration-color:#6eaa8d!important}
html[data-ui-theme=dark] .statement-account-name .account-link{color:#9edfc1!important}
html[data-ui-theme=dark] :is(.account-link,.party-link,.contact-link,.ledger-link,#content table a):not(:where(.report-export-sheet *,.print-document *,.voucher-print *,.invoice-design-paper *)):is(:hover,:focus-visible){color:#dcffea!important;text-decoration-color:#dcffea!important}
html[data-ui-theme=dark] .outstanding-tree-table tr.credit-overdue-row :is(.account-link,.amount){color:#ffaaa3!important}
}

@media screen{
html[data-ui-theme=dark] #content :is(.statement-section h4,.ageing-cards .ageing-card,.ageing-cards>div,.ageing-bucket-note,.inventory-ageing-meta>div){background:#233c30!important;color:#dceee3!important;border-color:#486452!important}
html[data-ui-theme=dark] #content .ageing-cards .ageing-card:is(:hover,.active){background:#2d4d3b!important;border-color:#75b797!important;box-shadow:none}
html[data-ui-theme=dark] #content :is(.inventory-ageing-meta b,.ageing-cards strong,.ageing-cards b){color:#e3eee9!important}
html[data-ui-theme=dark] #content :is(.ageing-cards small,.inventory-ageing-meta small,.financial-report-head.compact-report-title p span+span,.financial-report-foot){color:#b5cdbf!important;border-color:#486452!important}
html[data-ui-theme=dark] #content :is(.financial-tree-controls button,.ledger-report-toggle,.statement-tree-toggle){background:#294737!important;color:#d5f1e0!important;border-color:#628873!important}
html[data-ui-theme=dark] #content :is(.financial-tree-controls button,.ledger-report-toggle,.statement-tree-toggle):is(:hover,:focus-visible){background:#38654c!important;color:#fff!important}
html[data-ui-theme=dark] #content :is(.statement-amount-table .statement-account-header td,.inventory-ageing-table tfoot th,.financial-table thead tr:first-child th){background:#253d31!important;color:#dceee3!important;border-color:#486452!important}
html[data-ui-theme=dark] #content .financial-table tr.trial-control-row :is(td,.amount){background:#452a2b!important;color:#ffb3ae!important;border-color:#7e4947!important}
html[data-ui-theme=dark] #content :is(.statement-less-amount,.statement-deduction-value,.statement-deduction strong){color:#ffaaa3!important}
}

@media screen{
html[data-ui-theme=dark] .modal .voucher-ledger-posting{background:#1b2b24!important;border-color:#344b42!important}
html[data-ui-theme=dark] .modal .voucher-ledger-posting-head{background:#233c30!important;border-color:#344b42!important;color:#e3eee9!important}
html[data-ui-theme=dark] .modal .voucher-ledger-posting-head b{color:#e3eee9!important}
html[data-ui-theme=dark] .modal .voucher-ledger-posting-head small{color:#b5cdbf!important}
html[data-ui-theme=dark] .modal .voucher-ledger-posting tfoot .ledger-posting-difference th{background:#1e3027!important;color:#e3eee9!important;border-color:#344b42!important}
}

@media screen{
html[data-ui-theme=dark] .petty-cash-tabs{background:#15251e!important;border-color:#486452!important}
html[data-ui-theme=dark] .petty-cash-tabs .report-tab{background:transparent!important;color:#bfd7ca!important;box-shadow:none!important}
html[data-ui-theme=dark] .petty-cash-tabs .report-tab:hover{background:#233c30!important;color:#e3eee9!important}
html[data-ui-theme=dark] .petty-cash-tabs .report-tab.active{background:#2d5943!important;color:#eafff1!important;box-shadow:inset 0 0 0 1px #56846b!important}
}

@media screen{
/* Column sizing follows current form fields, independent of theme. */
#modalRoot:is(.mode-simple,.mode-purchase) .voucher-lines{max-width:100%;overflow-x:auto!important}
#modalRoot:is(.mode-simple,.mode-purchase) .voucher-lines table{width:100%!important;min-width:1050px!important;table-layout:fixed!important}
#modalRoot:is(.mode-simple,.mode-purchase) .voucher-lines .line-number-col{width:38px!important}
#modalRoot:is(.mode-simple,.mode-purchase) .voucher-lines .ledger-col{width:150px!important}
#modalRoot:is(.mode-simple,.mode-purchase) .voucher-lines .codes-col{width:125px!important}
#modalRoot:is(.mode-simple,.mode-purchase) .voucher-lines .product-col{width:220px!important}
#modalRoot:is(.mode-simple,.mode-purchase) .voucher-lines .qty-col{width:75px!important}
#modalRoot:is(.mode-simple,.mode-purchase) .voucher-lines .price-col{width:95px!important}
#modalRoot:is(.mode-simple,.mode-purchase) .voucher-lines .discount-col{width:100px!important}
#modalRoot:is(.mode-simple,.mode-purchase) .voucher-lines .free-qty-col{width:60px!important}
#modalRoot:is(.mode-simple,.mode-purchase) .voucher-lines .total-col{width:110px!important}
#modalRoot:is(.mode-simple,.mode-purchase) .voucher-lines .remove-col{width:42px!important}
#modalRoot.stock-count-adjustment.stock-count-adjustment .table-wrap{overflow-x:auto!important;border-color:var(--line)!important}
#modalRoot.stock-count-adjustment.stock-count-adjustment table{min-width:960px!important}
#modalRoot.stock-count-adjustment.stock-count-adjustment :is(th,td):nth-child(1){width:32%!important}
#modalRoot.stock-count-adjustment.stock-count-adjustment :is(th,td):nth-child(2){width:9%!important}
#modalRoot.stock-count-adjustment.stock-count-adjustment :is(th,td):nth-child(3){width:10%!important}
#modalRoot.stock-count-adjustment.stock-count-adjustment :is(th,td):nth-child(4){width:12%!important}
#modalRoot.stock-count-adjustment.stock-count-adjustment :is(th,td):nth-child(5){width:10%!important}
#modalRoot.stock-count-adjustment.stock-count-adjustment :is(th,td):nth-child(6){width:10%!important}
#modalRoot.stock-count-adjustment.stock-count-adjustment :is(th,td):nth-child(7){width:12%!important}
#modalRoot.stock-count-adjustment.stock-count-adjustment :is(th,td):nth-child(8){width:5%!important}
html[data-ui-theme=dark] #modalRoot :is(.voucher-help,.adjustment-value-summary,.stock-count-adjustment .muted){background:#233c30!important;color:#bfd7ca!important;border-color:#486452!important}
html[data-ui-theme=dark] #modalRoot.stock-count-adjustment :is(.muted,.adjustment-value-summary){background:#233c30!important;color:#bfd7ca!important;border-color:#486452!important}
html[data-ui-theme=dark] #modalRoot.stock-count-adjustment :is(.adjustment-total-value,.adjustment-current,.adjustment-delta,.adjustment-new,.adjustment-notes){color:#d9eee2!important}
html[data-ui-theme=dark] #modalRoot.stock-count-adjustment .table-wrap{background:#1b2b24!important}
html[data-ui-theme=dark] #modalRoot :is(.line-number,.optional-label,.field-optional){background:#294737!important;color:#c6e6d5!important;border-color:#486452!important}
html[data-ui-theme=dark] #modalRoot .form-grid label small{color:#b5cdbf!important;background:transparent!important}
html[data-ui-theme=dark] #modalRoot :is(.voucher-totals,.voucher-totals small,.voucher-totals span){color:#bfd7ca!important}
}

@media screen{
html[data-ui-theme=dark] :is(.product-search-results,.contact-search-results,.top-stock-results) :is(button.keyboard-active,button.selected,[role=option][aria-selected=true],button:hover,button:focus-visible){background:#32694e!important;color:#f0fff5!important;border-color:#7bcda0!important;box-shadow:inset 3px 0 0 #8de4b2!important;outline:none}
html[data-ui-theme=dark] :is(.product-search-results,.contact-search-results) :is(button.keyboard-active,button.selected,button:hover,button:focus-visible) :is(b,small,.product-result-stock,.product-unit-price,.product-price){color:#e0f9e9!important}
html[data-ui-theme=dark] .product-search-results :is(.product-result-stock,.product-unit-price,.product-price){color:#a5ddbd!important}
html[data-ui-theme=dark] .modal .delete-warning{background:#252e27!important;border:1px solid #78504b!important;border-left:3px solid #e98d83!important;border-radius:10px;padding:16px;gap:14px}
html[data-ui-theme=dark] .modal .delete-warning>div{background:#503532!important;color:#ffc0b7!important;border-radius:8px}
html[data-ui-theme=dark] .modal .delete-warning h3{color:#f2eee8!important;margin-bottom:7px}
html[data-ui-theme=dark] .modal .delete-warning p{color:#c6d1c9!important;line-height:1.6}
html[data-ui-theme=dark] .modal .delete-warning p:last-child{color:#e7c5b9!important}
}
@media screen and (min-width:1200px){
#modalRoot:is(.mode-simple,.mode-purchase,.mode-journal) .voucher-lines:has(.product-combobox:focus-within){overflow:visible!important;max-height:none!important}
}

@media screen{
html[data-ui-theme=dark] :is(.product-search-results,.contact-search-results,.top-stock-results) em{color:#aadfbe!important;font-style:normal}
html[data-ui-theme=dark] :is(.product-search-results,.top-stock-results) :is(button.keyboard-active,button:hover,button:focus-visible) em{color:#f0fff5!important}
html[data-ui-theme=dark] :is(.product-stock-badge,.top-stock-qty){background:#2b493a!important;color:#e3f4e9!important;border-color:#628873!important}
html[data-ui-theme=dark] :is(.product-stock-badge,.top-stock-qty) :is(small,span){color:#d5ebdf!important}
html[data-ui-theme=dark] .product-search-results button :is(.product-result-placeholder,.product-image-placeholder){background:#30483b!important;color:#c3dacd!important}
}


/* Invoice advances and PDC dropdown surfaces follow the selected screen theme. */
@media screen{
html[data-ui-theme=dark] .customer-advances-apply{background:#182b22!important;border-color:#3d5849!important;color:#e3eee9!important}
html[data-ui-theme=dark] .customer-advance-row{background:#20382b!important;border-color:#42604e!important;color:#e3eee9!important}
html[data-ui-theme=dark] .customer-advance-row.advance-selected,html[data-ui-theme=dark] .customer-advance-row-readonly{background:#294a37!important;border-color:#6aab83!important}
html[data-ui-theme=dark] :is(.customer-advances-apply .allocation-title,.customer-advance-choice b,.customer-advance-value b,.customer-advance-row-readonly b){color:#e3eee9!important}
html[data-ui-theme=dark] :is(.customer-advances-apply small,.customer-advances-balance){color:#b6cdbf!important}
html[data-ui-theme=dark] .customer-advance-choice input{accent-color:#63bb8a}
html[data-ui-theme=dark] :is(.pdc-notification-head,.pdc-notification-item){background:#1b2b24!important;color:#e3eee9!important;border-color:#344b42!important}
html[data-ui-theme=dark] .pdc-notification-item:hover,html[data-ui-theme=dark] .pdc-notification-item:focus-visible{background:#294737!important}
html[data-ui-theme=dark] :is(.pdc-notification-item strong,.pdc-notification-item .amount,.pdc-notification-head b){color:#e3eee9!important}
html[data-ui-theme=dark] :is(.pdc-notification-meta,.pdc-notification-head span,.pdc-notification-empty){color:#b6cdbf!important}
html[data-ui-theme=dark] .pdc-notification-footer{background:#233c30!important;color:#b7e7cb!important;border-color:#344b42!important}
html[data-ui-theme=dark] .pdc-notification-footer:hover{background:#294737!important}
html[data-ui-theme=dark] .pdc-due-label{background:#284e3b!important;color:#b7e7cb!important}
html[data-ui-theme=dark] .pdc-due-label.overdue{background:#53392c!important;color:#ffd2b2!important}
html[data-ui-theme=dark] .pdc-notification-count{border-color:#1b2b24!important}
}

/* Billing console and role permission surfaces in dark mode. */
@media screen{
html[data-ui-theme=dark] .billing-console{--billing-line:#3d5749;--billing-soft:#233b2f}
html[data-ui-theme=dark] :is(.billing-menu,.billing-panel-heading,.billing-user-company,.billing-user-company>header,.billing-free-banner,.billing-free-date){background:#1b2f25!important;background-image:none!important;color:#e3eee9!important;border-color:#3d5749!important}
html[data-ui-theme=dark] .billing-console .billing-menu button{background:transparent!important;color:#d2e6da!important}
html[data-ui-theme=dark] .billing-console .billing-menu button.active,html[data-ui-theme=dark] .billing-console .billing-menu button:hover{background:#2a4b38!important;border-color:#527b62!important;color:#f0fff6!important}
html[data-ui-theme=dark] .billing-console .billing-menu button :is(span,svg){color:inherit!important}
html[data-ui-theme=dark] :is(.billing-panel-heading h2,.billing-panel-heading h3,.billing-user-company>header h3){color:#e3eee9!important}
html[data-ui-theme=dark] :is(.billing-menu button small,.billing-menu button.active small,.billing-panel-heading p,.billing-user-company small){color:#b4cbbd!important}
html[data-ui-theme=dark] :is(.billing-user-company>header>b,.billing-company-mark,.billing-invoice-icon){background:#294536!important;color:#d8f3e4!important;border-color:#527b62!important}
html[data-ui-theme=dark] :is(.permission-sticky-guide,.permission-matrix-head,.role-profile-presets,.permission-section,.permission-section>header,.permission-matrix,.permission-child-row,.permission-child-row .permission-main-toggle){background:#1d3227!important;background-image:none!important;color:#e3eee9!important;border-color:#3d5749!important}
html[data-ui-theme=dark] :is(.permission-matrix-row,.permission-matrix-row>label){background:#1b2b24!important;color:#e3eee9!important;border-color:#3d5749!important}
html[data-ui-theme=dark] .permission-matrix-row>label:has(input:checked){background:#284b38!important;color:#dcf5e5!important}
html[data-ui-theme=dark] .permission-matrix-row:hover>label{background:#263f31!important}
html[data-ui-theme=dark] :is(.permission-section>header b,.permission-sticky-guide b,.permission-sticky-guide span,.permission-main-toggle b,.role-profile-presets b){color:#e3eee9!important}
html[data-ui-theme=dark] :is(.permission-section>header small,.permission-section>header>span,.permission-main-toggle small,.role-profile-presets small){color:#b4cbbd!important}
html[data-ui-theme=dark] .role-profile-presets button{background:#233b2f!important;color:#e3eee9!important;border-color:#466652!important}
html[data-ui-theme=dark] .role-profile-presets button.active{background:#2d533d!important}
}

/* Dark financial-report party selector, including ageing multi-select. */
@media screen{
html[data-ui-theme=dark] :is(.ageing-party-picker,.ageing-party-options){background:#1b2f25!important;color:#e3eee9!important;border-color:#466452!important;box-shadow:0 8px 24px #0004}
html[data-ui-theme=dark] .ageing-party-picker summary{background:#20382b!important;color:#d9eee2!important;border-color:#466452!important}
html[data-ui-theme=dark] .ageing-party-options .ageing-party-option{background:#233c2f!important;color:#e3eee9!important;border-color:#3d5949!important}
html[data-ui-theme=dark] .ageing-party-options .ageing-party-option:hover{background:#2b4b39!important}
html[data-ui-theme=dark] .ageing-party-options .ageing-party-option:has(input:checked){background:#315b41!important;color:#f0fff6!important}
html[data-ui-theme=dark] .ageing-party-options .ageing-party-option span{color:inherit!important}
html[data-ui-theme=dark] .ageing-party-options input{accent-color:#60bd8b}
html[data-ui-theme=dark] .ageing-party-options .muted{color:#b3cbbd!important}
}

/* Settled ageing invoices remain in the same table with zero outstanding. */
@media screen{
.financial-table .ageing-settled-row td{background:#edf5ff!important;color:#294f78!important}
.financial-table .ageing-settled-row td:first-child{border-left:3px solid #699cd2}
.financial-table .ageing-settled-row .account-link{color:#295f93!important}
.ageing-settled-badge{display:inline-block;margin-left:5px;padding:2px 5px;border-radius:4px;background:#d7e8fb;color:#245680;font-size:10px;font-weight:600}
.ageing-settled-invoices[aria-pressed=true]{box-shadow:inset 0 0 0 2px #699cd2!important}
html[data-ui-theme=dark] .financial-table .ageing-settled-row td{background:#183448!important;color:#d2e9fb!important}
html[data-ui-theme=dark] .financial-table .ageing-settled-row .account-link{color:#a8d5fb!important}
html[data-ui-theme=dark] .ageing-settled-badge{background:#284f6b;color:#d2e9fb}
}

/* Compact payment detail summary and invoice allocation list. */
.payment-detail-view .payment-detail-container{display:block!important}
.payment-detail-summary,.payment-detail-allocations{border:1px solid #d5e4de;border-radius:12px;overflow:hidden;margin-bottom:16px;background:#fff}
.payment-detail-summary-head{display:flex;justify-content:space-between;gap:20px;padding:18px 20px;background:#f0f7f4;border-bottom:1px solid #d5e4de}
.payment-detail-summary-head h3{margin:5px 0 0;font-size:18px;color:inherit}
.payment-detail-summary-head small,.payment-detail-field small,.payment-detail-narration small{display:block;font-size:11px;color:#648077}
.payment-detail-amount{text-align:right;flex-shrink:0}.payment-detail-amount strong{display:block;font-size:25px;line-height:1.3;margin-top:4px;font-variant-numeric:tabular-nums;color:#174e3d}
.payment-detail-meta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px 24px;padding:18px 20px}.payment-detail-field strong{display:block;margin-top:5px;font-size:13px;overflow-wrap:anywhere}
.payment-detail-narration{padding:12px 20px;border-top:1px solid #e1ebe6}.payment-detail-narration p{margin:5px 0 0;font-size:12px;white-space:pre-wrap}
.payment-allocation-head{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;border-bottom:1px solid #d5e4de}.payment-allocation-head h3{font-size:14px;margin:0}.payment-allocation-head small{color:#648077;font-size:11px}
.payment-detail-view .payment-allocation-table{width:100%;border-collapse:collapse;margin:0}.payment-detail-view .payment-allocation-table th,.payment-detail-view .payment-allocation-table td{padding:10px 14px;font-size:12px}.payment-detail-view .payment-allocation-table tfoot th{background:#f0f7f4;border-top:1px solid #d5e4de}.payment-invoice-reference{display:block;font-size:10px;color:#648077;margin-top:3px}.payment-detail-empty{padding:16px;font-size:12px;color:#648077}
.payment-ledger-details{border:1px solid #d5e4de;border-radius:9px;margin:10px 0}.payment-ledger-details>summary{padding:12px 16px;font-size:12px;font-weight:600;cursor:pointer}.payment-detail-view .payment-ledger-details .voucher-lines{display:block!important}.payment-detail-view .payment-ledger-details .report-summary{display:flex!important}
html[data-ui-theme=dark] .payment-detail-summary,html[data-ui-theme=dark] .payment-detail-allocations{background:#192e25;border-color:#3b574a;color:#e0eee8}
html[data-ui-theme=dark] .payment-detail-summary-head,html[data-ui-theme=dark] .payment-detail-view .payment-allocation-table tfoot th{background:#223e31;border-color:#3b574a;color:#e0eee8}
html[data-ui-theme=dark] .payment-detail-amount strong{color:#a5dfc5}
html[data-ui-theme=dark] .payment-detail-summary-head small,html[data-ui-theme=dark] .payment-detail-field small,html[data-ui-theme=dark] .payment-detail-narration small,html[data-ui-theme=dark] .payment-allocation-head small,html[data-ui-theme=dark] .payment-invoice-reference,html[data-ui-theme=dark] .payment-detail-empty{color:#aac3b7}
html[data-ui-theme=dark] .payment-detail-narration,html[data-ui-theme=dark] .payment-allocation-head,html[data-ui-theme=dark] .payment-ledger-details{border-color:#3b574a}
@media(max-width:600px){.payment-detail-meta{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding:14px}.payment-detail-summary-head{padding:14px;gap:10px}.payment-detail-summary-head h3{font-size:15px}.payment-detail-amount strong{font-size:20px}.payment-detail-view .payment-allocation-table{min-width:440px}}

/* Invoice write-off: match the active ERP theme, including top-layer ledger choices. */
@media screen{
html[data-ui-theme=dark] .invoice-writeoff-summary{background:#213b30!important;border-color:var(--line)!important}
html[data-ui-theme=dark] .invoice-writeoff-summary strong{color:var(--ink)!important}
html[data-ui-theme=dark] .invoice-writeoff-summary small{color:var(--muted)!important}
html[data-ui-theme=dark] .writeoff-ledger-search button{background:#294638!important;color:var(--ink)!important;border:1px solid var(--line)!important}
html[data-ui-theme=dark] .writeoff-ledger-results{background:var(--surface)!important;color:var(--ink)!important;border-color:var(--line)!important;box-shadow:var(--shadow)}
html[data-ui-theme=dark] .writeoff-ledger-results button{background:var(--surface)!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-ui-theme=dark] .writeoff-ledger-results button:is(:hover,:focus,.keyboard-active){background:#2b5141!important;color:#edfff6!important;outline:2px solid #69b99b;outline-offset:-2px}
html[data-ui-theme=dark] .writeoff-ledger-results>.muted{color:var(--muted)!important}
}
.writeoff-ledger-search button::before{content:none!important;display:none!important}

/* Clear is an icon-only control; do not decorate it as an accounting action. */
.writeoff-ledger-search button{display:inline-flex!important;align-items:center!important;justify-content:center!important;flex-direction:row!important;gap:0!important;line-height:1!important;min-width:36px;white-space:nowrap}
.writeoff-ledger-search button>.lo-icon,.writeoff-ledger-search button>svg{display:none!important}

/* Preserve price-exception emphasis with readable dark-theme contrast. */
@media screen{
html[data-ui-theme=dark] input.line-price.price-overridden{background:#3b321e!important;color:#f5ead0!important;border-color:#d2a648!important;box-shadow:0 0 0 2px #d2a64822}
html[data-ui-theme=dark] input.line-price.price-overridden:focus{background:#423820!important;color:#fff1d1!important;box-shadow:0 0 0 3px #d2a64840}
}

/* assets/discount-entry-20261017.css */
/* Shared transaction discount totals; discounts use typed percent or amount. */
.transaction-discount-summary{box-sizing:border-box;width:330px;max-width:100%;margin:16px 0 20px auto;padding:12px;border:1px solid var(--line,#d1dfd8);border-radius:10px;background:var(--surface,#fff);color:var(--ink,#173c30)}
.transaction-discount-summary>div{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:5px 0;font-size:12px}
.transaction-discount-summary span{color:var(--muted,#718279);font-size:11px}
.transaction-discount-summary strong{font-variant-numeric:tabular-nums;font-size:14px}
.transaction-discount-summary>.discount-summary-total{border-top:1px solid var(--line,#d1dfd8);margin-top:4px;padding-top:8px}
.transaction-discount-summary>.discount-summary-total strong{font-size:16px}
@media(max-width:600px){.transaction-discount-summary{width:100%;margin-top:12px}}
