:root{--navy:#15344c;--yellow:#f5c43e;--ink:#17354a;--border:#ccd9e0;--work:#267aab;--rest:#e4f2e8;--warn:#9b381e}*{box-sizing:border-box}body{margin:0;background:#f3f6f8;color:var(--ink);font-family:Arial,sans-serif;line-height:1.45}.apphead{background:var(--navy);color:white;padding:20px max(20px,calc((100vw - 1280px)/2));border-bottom:4px solid var(--yellow)}.apphead a{color:white}.apphead span{font-size:11px;letter-spacing:.14em}.apphead h1{font-size:30px;margin:8px 0}.apphead p{margin:0}main{max-width:1320px;margin:auto;padding:20px}.toolbar{display:flex;flex-wrap:wrap;align-items:end;gap:12px;margin:0 0 16px}.toolbar label{display:grid;gap:4px;font-size:13px;font-weight:bold}button,input,select{font:inherit;padding:11px;border:1px solid var(--border);border-radius:6px}button{background:var(--navy);color:white;border:0;cursor:pointer;font-weight:bold;min-height:44px}button:disabled{opacity:.45;cursor:wait}input,select{max-width:100%;background:white}.sheet{background:white;border:1px solid var(--border);padding:24px;margin:20px 0}.dochead{display:flex;justify-content:space-between;gap:20px;border-bottom:3px solid var(--navy);padding-bottom:12px}.dochead img{width:160px}.dochead h2{margin:0;font-size:24px}.muted{color:#506a79;font-size:13px}.tag{padding:5px 9px;background:#fff2ce;color:#714e00;font-weight:bold;font-size:12px;display:inline-block}.stats{display:flex;flex-wrap:wrap;border-block:1px solid var(--border);margin:18px 0;gap:30px;padding:12px 0}.stats b{display:block;font:700 25px 'Courier New',monospace}.stats span{font-size:12px}.notice{background:#fff5d9;border-left:4px solid #c38c00;padding:12px 16px}.danger{background:#fff0eb;border-left:4px solid var(--warn)}h3{margin:22px 0 10px}table{width:100%;border-collapse:collapse}th{background:var(--navy);color:white;text-align:left;font-size:12px;padding:8px}td{padding:7px;border-bottom:1px solid var(--border);vertical-align:top;font-size:12px}.number{font-family:'Courier New',monospace;white-space:nowrap;text-align:right;font-weight:bold}.scroll{overflow-x:auto}.calendar{min-width:960px;table-layout:fixed}.calendar th:nth-child(1){width:90px}.calendar th:nth-child(2){width:170px}.calendar th:nth-child(3){width:46px}.calendar th:nth-child(4),.calendar th:nth-child(5){width:62px}.calendar th:last-child{width:116px}.calendar td{height:32px;vertical-align:middle;padding:4px}.track{height:21px;position:relative;background:var(--rest);border:1px solid #9eb0ba;background-image:repeating-linear-gradient(to right,transparent 0,transparent calc(4.166666% - 1px),#92a7b64d calc(4.166666% - 1px),#92a7b64d 4.166666%)}.track.unknown{background-color:#fff0cc;background-image:repeating-linear-gradient(135deg,transparent 0,transparent 5px,#d3b76b55 5px,#d3b76b55 7px)}.bar{position:absolute;top:0;bottom:0;background:var(--work)}.axis{position:relative;height:20px;font:10px 'Courier New',monospace;margin-inline:1px}.axis span{position:absolute;transform:translateX(-50%)}.axis span:first-child{transform:none}.axis span:last-child{transform:translateX(-100%)}.legend{display:flex;gap:18px;flex-wrap:wrap;font-size:12px;margin:12px 0}.legend i{display:inline-block;width:20px;height:12px;margin-right:5px;border:1px solid #92a7b6}.red{color:#922b16;font-weight:bold}.small{font-size:11px}.ratebox{display:grid;grid-template-columns:1fr 1fr;gap:5px;min-width:190px}.ratebox input{padding:6px;width:95px}.ratebox input.reason{grid-column:1/-1;width:100%}.ratebox button{grid-column:1/-1;min-height:32px;padding:5px}.footer{margin-top:20px;font-size:11px;border-top:1px solid var(--border);padding-top:8px}.pagebreak{break-before:page}.errors li{margin-bottom:5px}.account-only{display:none}.monthly-steps{padding-left:24px}.monthly-steps li{padding:12px 0;border-bottom:1px solid var(--border)}.monthly-steps p{margin:6px 0}.monthly-steps a{display:inline-block;padding:10px 0;font-weight:bold}.dochead{border-bottom-color:var(--yellow)}tbody tr:nth-child(even){background:#edf3f6}@media(max-width:700px){main{padding:10px}.sheet{padding:12px}.dochead{display:block}.dochead img{width:130px;margin-bottom:12px}.toolbar>*{flex:1 1 170px}.stats{gap:20px}.stats b{font-size:22px}}
@page{size:A4 landscape;margin:10mm}@media print{*{-webkit-print-color-adjust:exact;print-color-adjust:exact}body{background:white;font-size:10px}.apphead,.toolbar,#message,.ratebox,.screen-only{display:none!important}main{max-width:none;padding:0}.sheet{border:0;padding:0;margin:0 0 12mm}.scroll{overflow:visible}.calendar{min-width:0}.calendar th:nth-child(2){width:145px}.calendar th:last-child{width:85px}.calendar td{height:19px;font-size:9px}.calendar th{font-size:9px;padding:4px}.track{height:13px}.dochead h2{font-size:19px}.dochead img{width:125px}.stats{margin:8px 0;padding:6px 0}.stats b{font-size:18px}thead{display:table-header-group}tr{break-inside:avoid}h3{break-after:avoid}.person{break-before:page}.calendar-wrap{break-inside:avoid}.legend,.muted,.footer{font-size:9px}.notice{padding:8px}body[data-print=accountant] .customer-only{display:none!important}body[data-print=accountant] .account-only{display:block}body[data-print=accountant] .person{display:none}.screen-only{display:none!important}}
@media print{.calendar-wrap{break-inside:auto}.calendar td{font-size:8px;line-height:1.1;height:17px;padding:1px 3px}.calendar .small{font-size:7px;line-height:1.05}.calendar th{font-size:8px;padding:3px}.calendar th:nth-child(1){width:58px}.calendar th:nth-child(2){width:135px}.calendar th:nth-child(3){width:30px}.calendar th:nth-child(4),.calendar th:nth-child(5){width:40px}.calendar th:last-child{width:73px}.person .dochead{padding-bottom:6px}.person .dochead h2{font-size:15px}.person .dochead img{width:100px}.person .stats{padding:3px 0;margin:5px 0}.person .stats b{font-size:15px}.person .stats span{font-size:9px}.person .legend{margin:5px 0}.person .small{font-size:8px}.track{height:11px}.errors li{margin-bottom:2px}.sheet>table td{font-size:9px;padding:4px}.sheet>table th{font-size:9px;padding:5px}.footer{break-inside:avoid}}
@media print{.person .stats{display:none}.person .dochead{line-height:1.15;margin-bottom:6px}.person .dochead h2{font-size:14px}.person .tag{font-size:9px;padding:2px 5px}.calendar td:nth-child(2) br{display:none}.calendar td:nth-child(2) .small:before{content:' · '}.calendar td{height:16px}.calendar .small{font-size:7px}.person .legend{margin:6px 0}}