body{background:#f4f3ef;color:#232323}header{background:#151515;border-bottom:3px solid #ba9745}header h1{font-size:18px;line-height:1.7;color:#ead69d}.brand-logo{height:88px;width:88px;object-fit:contain}header small{color:#c7b985}nav{background:#232323}nav button.active{border-bottom-color:#d5b76a;color:#f8e7b5}button.act,th{background:#292722}button.act.alt{background:#c7a554;color:#151515}.panel h2{border-color:#bd9847;color:#3b3527}.card .val{color:#6f541b}.panel,.card{position:relative;background-color:rgba(255,255,255,.96)}main{position:relative;isolation:isolate}main:before{content:'';position:fixed;z-index:-1;inset:18% 20%;background:url('/watermark.png') center/contain no-repeat;opacity:.035;pointer-events:none}.report-heading{display:flex;align-items:center;gap:15px;margin:16px 0}.report-heading img{width:72px;height:72px;object-fit:contain}.report-heading h2{font-size:19px;margin-bottom:8px}.permissions{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px;padding:12px;background:#faf7ef}.permissions label{display:flex!important;flex-direction:row!important;gap:8px;align-items:center}.permissions input{width:18px;height:18px}.user-card{border-bottom:1px solid #ddd;padding:15px 0;overflow-wrap:anywhere}.bar{height:14px;min-width:1px;background:#bb984b;border-radius:3px;margin:5px 0}.chart-row{margin:14px 0;break-inside:avoid}.chart-row small{display:block}.filters input{max-width:100%}.report-heading p{font-size:12px;color:#666}td{overflow-wrap:anywhere}.no-print{}.print-only{display:none}@page{size:A4 landscape;margin:12mm 10mm}@media print{body{background:white;color:black;font-size:10px;-webkit-print-color-adjust:exact;print-color-adjust:exact}header{background:white!important;color:black!important;border-bottom:2px solid #ad8736;padding:0 0 8px;display:flex!important}header h1{color:black;font-size:16px}header small{color:#555}header .brand-logo{width:65px;height:65px}#accountBar,header .proj,nav,.no-print,button,main>form,.filters{display:none!important}main{max-width:none;padding:0}main:before{position:fixed;inset:20% 30%;opacity:.04}.panel,.card{box-shadow:none;border:1px solid #ddd;border-radius:0;background:transparent;padding:8px;margin-bottom:8px}.panel{break-inside:auto}h2,h3,.report-heading{break-after:avoid}.report-heading img{display:none}.report-heading{margin:8px 0}.report-heading h2{font-size:15px}.tblwrap{overflow:visible!important}table{width:100%;font-size:9px;table-layout:fixed;border-collapse:collapse}thead{display:table-header-group}tfoot{display:table-footer-group}tr{break-inside:avoid}td,th{white-space:normal!important;overflow-wrap:anywhere;word-break:normal;padding:4px;border:1px solid #aaa}th{background:#eee!important;color:black!important}td.num,th.num{white-space:normal!important;font-size:9px}.cards{display:flex;break-inside:avoid;margin:8px 0}.card .val{font-size:15px}.warn{background:#faf7eb!important;font-size:10px;break-inside:avoid}.chart-row{margin:8px 0}.note{font-size:9px}.bar{height:10px}}
@media(max-width:640px){header h1{font-size:14px}.brand-logo{height:62px;width:62px}header{padding:9px;gap:8px}#accountBar{font-size:11px;width:100%}main{padding:8px}.report-heading h2{font-size:16px}.report-heading img{width:52px;height:52px}.permissions{grid-template-columns:1fr}.filters{align-items:stretch}.filters label{max-width:100%}form.entry{grid-template-columns:repeat(auto-fit,minmax(145px,1fr))}}
@media(max-width:640px){main>.panel table{min-width:700px}#reportBody table{min-width:650px}}
@media print{#reportBody table{min-width:0!important}#reportBody .panel{padding:4px}#reportBody table:has(th:nth-child(14)){font-size:8px}#reportBody table:has(th:nth-child(14)) td,#reportBody table:has(th:nth-child(14)) th{font-size:8px;padding:3px}}
@media screen{.item-wide{min-width:230px;max-width:360px;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;line-height:1.7}td{white-space:normal!important;text-overflow:clip!important;max-width:none}#reportBody table:has(th:nth-child(14)){min-width:1800px}}
@media print{.item-wide{width:14%;white-space:normal!important;overflow:visible!important;text-overflow:clip!important}}

@media screen{td.num{white-space:nowrap!important;min-width:95px}main>.panel table{min-width:1050px}#reportBody table{min-width:0}#reportBody table:has(th:nth-child(14)){min-width:1800px}}

/* v5: fit every table inside the viewport width - no horizontal scroll, readable wrapped text */
@media screen{main{max-width:none}}
@media screen and (min-width:641px){
main>.panel table{min-width:0}
main .tblwrap{overflow-x:visible}
main thead th{position:sticky;top:0;z-index:2}
nav{position:sticky;top:0;z-index:20}
main table{width:100%;table-layout:fixed}
main td,main th{overflow-wrap:break-word;white-space:normal}
main table td.num{white-space:normal!important}
#reportBody table{min-width:0!important}
.item-wide{min-width:0!important;max-width:none!important;white-space:normal!important;overflow:visible!important}
main table th.col-w,main table td.col-w{width:9%}
main table th.col-t,main table td.col-t{width:6.5%}
main table th.col-id,main table td.col-id{width:2.5%}
main table th.col-date,main table td.col-date{width:6%;white-space:nowrap}
main table th.col-n,main table td.col-n{width:6.5%;white-space:nowrap!important}
main table th.col-act,main table td.col-act{width:5%}
}
@media screen and (min-width:641px) and (max-width:1500px){
main table{font-size:12px}
main td,main th{padding:4px 5px}
main table td.col-n{font-size:11.5px}
}
@media print{
thead th{position:static!important}
td,th{overflow-wrap:break-word!important}
table{table-layout:fixed;width:100%}
th.col-w,td.col-w{width:7.5%}
th.col-t,td.col-t{width:6%}
th.col-id,td.col-id{width:2.5%}
th.col-date,td.col-date{width:5.5%}
th.col-n,td.col-n{width:6%;white-space:nowrap!important;font-size:8px}
th.col-act,td.col-act{width:6%}
.item-wide{width:8%!important;min-width:0!important}
}
.limit-alert{background:#fde8e8;border:1px solid #c0392b;color:#8e2323;padding:10px 14px;border-radius:8px;margin:10px 0;font-weight:600}
tr.lim-warn td{background:#fff7e0}
tr.lim-over td{background:#fde8e8;color:#8e2323;font-weight:600}
@media print{.limit-alert{border-color:#000;color:#000}}
