/* Fit the screen; all financial columns remain readable and available. */
#app #page-container .profit-workspace{gap:5px!important;min-height:0;min-width:0;max-width:100%;overflow:hidden}
#app .profit-workspace .scroll-workspace-toolbar{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr));gap:5px 8px!important;align-items:end;align-content:start;padding:7px!important;margin:0!important;min-width:0;flex-shrink:0;max-height:34vh;overflow:auto}
#app .profit-workspace label{display:flex;flex-direction:column!important;gap:2px;min-width:0;max-width:none;height:auto;font-size:12px;line-height:1.3}
#app #page-container .profit-workspace #profit-filters :is(input,select){box-sizing:border-box;width:100%;min-width:0;min-height:31px;height:31px;padding:3px 5px!important;background:#fff!important;color:#000!important;-webkit-text-fill-color:#000!important;font-size:13px!important}
#app .profit-actions{display:flex;flex-wrap:wrap;align-items:center;gap:5px 8px;min-width:0;padding:5px}
#app #profit-filters .profit-actions{grid-column:1/-1;padding:0}
#app .profit-workspace .profit-actions .btn{min-height:31px;min-width:0;padding:5px 10px!important;font-size:12px!important;line-height:1.4;border-radius:6px;box-shadow:none}
#app .profit-workspace .profit-actions .btn-save{background:#166b47!important;color:#fff!important;border:1px solid #166b47}
#app .profit-workspace #profit-refresh{background:#205a85!important;color:#fff!important;border-color:#205a85}
#app .profit-workspace #profit-export{background:#fff!important;color:#205a85!important;border:1px solid #205a85}
#app .profit-workspace #profit-records{background:#f4e6b9!important;color:#35280c!important;border:1px solid #b39642}
#app .profit-workspace :is(#profit-prev,#profit-next){background:#e9eef4!important;color:#172a3b!important;border:1px solid #a9bac8}
#app .profit-actions button:disabled{opacity:.45;cursor:not-allowed}
#app .profit-actions small{flex:1 1 280px;font-size:11px;line-height:1.5;min-width:0}
#app .profit-workspace #profit-status{margin:0;padding:2px 7px;font-size:11px;line-height:1.4;overflow-wrap:anywhere}
#app .profit-workspace .profit-error{color:#ffb3aa!important}
#app .profit-workspace .profit-notice{background:#fff5da;color:#171717;padding:7px;margin:4px;font-size:12px;border:1px solid #d0b77a;border-radius:5px}
#app #page-container .profit-workspace .scroll-workspace-results{flex:1;min-height:80px;min-width:0;height:auto;overflow-y:auto!important;overflow-x:hidden!important;background:#fff!important;color:#000!important;scrollbar-gutter:stable}
#app .profit-workspace #profit-results{min-width:0;max-width:100%;background:#fff;color:#000}
#app .profit-workspace #profit-results .profit-actions{color:#000;font-size:12px}
#app .profit-workspace .profit-table{width:100%;min-width:0!important;max-width:100%;table-layout:fixed;border-collapse:collapse!important;border-spacing:0;font-size:clamp(11px,.86vw,13px);border:1px solid #8a939d;background:#fff;color:#000}
#app #page-container .profit-workspace .profit-table :is(th,td){box-sizing:border-box;padding:6px 3px!important;min-width:0;white-space:normal!important;overflow-wrap:anywhere;line-height:1.5;text-align:center;background:#fff!important;color:#000!important;-webkit-text-fill-color:#000!important;border:1px solid #a7afb7!important;box-shadow:none!important}
#app .profit-workspace .profit-table th{position:sticky;top:0;z-index:1;font-size:11px;font-weight:700;vertical-align:middle;border-bottom:2px solid #536675!important}
#app .profit-workspace .profit-table td{font-variant-numeric:tabular-nums}
#app .profit-workspace .profit-table td>span{display:block;max-width:100%;min-width:0}
#app #page-container .profit-workspace .profit-table td>span[dir="ltr"]{font-family:Arial,sans-serif!important;font-size:13px!important;font-variant-numeric:tabular-nums;white-space:nowrap}
#app #page-container .profit-workspace .profit-table td>span.profit-long-number[dir="ltr"]{font-size:clamp(10px,.82vw,13px)!important}
#app .profit-workspace #profit-summary{flex-shrink:0;min-width:0;padding:0;padding-inline-end:76px;border-top:2px solid #b69743;background:#f4f6f8;color:#000}
body:has(.profit-workspace) #voice-assistant-button{left:14px;bottom:12px;min-width:54px;width:54px;height:44px;border-radius:10px;padding:4px;box-shadow:none;display:flex;align-items:center;justify-content:center;gap:3px}
body:has(.profit-workspace) #voice-assistant-button svg{width:19px;height:19px}
#app .profit-workspace .profit-totals{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:0;min-width:0;width:100%}
#app .profit-workspace .profit-totals>div{min-width:0;padding:3px 6px;border:1px solid #c4cbd1;border-top:0;display:flex;flex-direction:column;justify-content:center;gap:1px;background:#f4f6f8!important;color:#000!important;border-radius:0}
#app .profit-workspace .profit-totals span{font-size:10px;line-height:1.35;overflow-wrap:anywhere}
#app .profit-workspace .profit-totals strong{font-size:14px;font-weight:700;line-height:1.35;overflow-wrap:anywhere;font-variant-numeric:tabular-nums;color:#000}
#app #page-container .profit-workspace #profit-summary :is(span,strong){color:#000!important;-webkit-text-fill-color:#000!important}
#app #page-container .profit-workspace #profit-results .profit-actions :is(span,small){color:#000!important;-webkit-text-fill-color:#000!important}
#app .profit-workspace .profit-totals .profit-net{background:#e1f0e6!important;border-color:#6a9879}
@media screen{.content:has(.profit-workspace){height:100dvh!important;min-height:0!important;overflow:hidden!important}}
@media(min-width:1750px){#app .profit-workspace .profit-totals{grid-template-columns:repeat(14,minmax(0,1fr))}}
/* Narrow windows stack each complete record into labelled cells, without
   removing fields or forcing a horizontal scrollbar. */
@media screen and (max-width:1150px){
 #app .profit-workspace .scroll-workspace-toolbar{grid-template-columns:repeat(4,minmax(0,1fr))}
 #app .profit-workspace .profit-table{display:block;font-size:13px;border:0}
 #app .profit-workspace .profit-table thead{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%)}
 #app .profit-workspace .profit-table tbody{display:block}
 #app .profit-workspace .profit-table tbody tr{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin:0 0 8px;border-top:2px solid #566b7b}
 #app .profit-workspace .profit-table td{display:flex;flex-direction:column;justify-content:space-between;gap:2px}
 #app .profit-workspace .profit-table td:before{content:attr(data-label);display:block;font-size:10px;font-weight:600;color:#3c4854}
 #app .profit-workspace .profit-table td[colspan]{grid-column:1/-1}
 #app .profit-workspace .profit-totals strong{font-size:12px}
}
@media screen and (max-width:650px){
 #app .profit-workspace .scroll-workspace-toolbar{grid-template-columns:repeat(2,minmax(0,1fr));max-height:30vh}
 #app .profit-workspace .profit-table tbody tr{grid-template-columns:repeat(2,minmax(0,1fr))}
 #app .profit-workspace .profit-totals{grid-template-columns:repeat(4,minmax(0,1fr))}
 #app .profit-workspace .profit-totals>div{padding:2px 3px}
 #app .profit-workspace #profit-status{font-size:10px}
}
@media screen and (max-height:580px){
 #app .profit-workspace .scroll-workspace-toolbar{max-height:16vh}
 #app .profit-workspace #profit-summary{max-height:24vh;overflow-y:auto;overflow-x:hidden}
 #app .profit-workspace #profit-status{font-size:10px;padding:0 4px}
}
@media print{
 #app .profit-workspace,#app .profit-workspace .scroll-workspace-results{overflow:visible!important;height:auto!important;max-height:none!important;display:block}
 #app .profit-workspace .profit-table th{position:static}
 #app .profit-actions{display:none}
 #app .profit-workspace #profit-summary{break-inside:avoid}
}
