.report-tabs{display:flex;gap:4px;flex-wrap:wrap;margin:22px 0}.report-tabs button{padding:12px 16px;border:0;background:#d7e7ee;color:#326c83}.report-tabs .selected{background:#a9d0df;color:#164d63}.report-filters{display:flex;gap:12px;flex-wrap:wrap}.report-filters label{display:flex;flex-direction:column;gap:7px;flex:1;min-width:130px;font-size:12px}.report-filters input,.report-filters select{width:100%;padding:9px;border:1px solid #91b6c6;background:white}.report-actions{margin:20px 0;flex-wrap:wrap}.report-pagination{display:flex;gap:12px;align-items:center;justify-content:flex-end;flex-wrap:wrap;margin-top:16px}.report-pagination>span:first-child{margin-right:auto}.rest-modal{width:calc(100vw - 36px);max-width:1500px}.rest-head{display:flex;justify-content:space-between;align-items:start;gap:20px}.rest-head h2{margin:0}.rest-toolbar,.rest-totals,.rest-legend{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:20px 0}.rest-totals span{background:white;padding:14px 20px;display:flex;gap:15px}.rest-grid-wrap{overflow-x:auto;background:white}.rest-grid{border-collapse:collapse;min-width:1250px;width:100%;font-size:11px}.rest-grid th,.rest-grid td{padding:6px 3px;text-align:center;border:1px solid #cad5dc;white-space:nowrap}.rest-grid td.rest-R,.rest-grid td.rest-W,.rest-grid td.rest-U{min-width:14px}.rest-R{background:#c3e1e8;color:#164e60}.rest-W{background:#356b84;color:white}.rest-U{background:#f3f4f5;color:#74818a}.rest-legend span{padding:6px 10px}.rest-checks{padding:18px;background:white;margin-top:20px;font-size:13px;line-height:1.6}.rest-warning{color:#9c2929;background:#fff0ed;padding:10px}.rest-note{text-align:left!important;white-space:normal!important}.rest-grid th:first-child{position:sticky;left:0;background:#e8eef1}.rest-modal small{display:block}.rest-toolbar .tag{margin-right:auto}@media(max-width:650px){.report-filters{display:grid;grid-template-columns:1fr 1fr}.report-filters label{min-width:0}.report-tabs button{flex:1;font-size:12px}.rest-head{flex-wrap:wrap}.rest-toolbar button{flex:1}.rest-totals span{padding:10px}.rest-modal{width:96%}}@media print{.rest-toolbar,.rest-head button,.rest-grid button,.report-tabs,.report-filters,.report-actions{display:none!important}.rest-grid{min-width:0;font-size:6px}.rest-grid th,.rest-grid td{padding:2px 0;min-width:0!important}.rest-modal{max-height:none;width:100%;max-width:none;overflow:visible}.rest-grid-wrap{overflow:visible}dialog.rest-modal{position:absolute;top:0;margin:0;border:0}.rest-totals,.rest-legend{margin:8px 0;font-size:9px}.rest-checks{font-size:9px;break-inside:avoid}.rest-grid thead{display:table-header-group}.rest-grid tr{break-inside:avoid}.rest-head h2{font-size:14px}}

.rest-quick-entry{display:flex;gap:12px;align-items:end;margin:18px 0;flex-wrap:wrap}.rest-quick-entry label{display:flex;flex-direction:column;gap:8px;font-size:12px}.rest-quick-entry select{padding:9px;border:1px solid #91b6c6;background:white}@media print{.rest-quick-entry{display:none!important}}

.rest-grid-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:20px 0}.rest-grid-actions [role=status]{font-size:12px}.rest-grid td:has(.rest-slot){padding:0!important}.rest-slot{appearance:none;-webkit-appearance:none;display:block;width:100%;min-width:20px;height:30px;border:0!important;border-radius:0!important;margin:0!important;padding:0!important;cursor:pointer;background:transparent!important;position:relative;color:inherit!important}.rest-slot:checked:after{content:'×';font-size:24px;line-height:28px;position:absolute;inset:0;text-align:center;color:#164e60}.rest-slot:indeterminate:after{content:'·';font-size:18px;position:absolute;inset:0;text-align:center;color:#9ba8ae}.rest-slot:focus-visible{outline:3px solid #b46d00;outline-offset:-3px}.rest-slot:disabled{cursor:default;opacity:1}.rest-grid td.rest-W{background:white;color:#164e60}.rest-grid td.rest-R{background:#d9edf1}.rest-grid td.rest-U{background:#f1f3f5}.rest-legend .rest-W{background:white;color:#164e60}@media print{.rest-grid-actions{display:none!important}.rest-slot{min-width:0;height:13px}.rest-slot:checked:after{font-size:12px;line-height:13px}.rest-slot:indeterminate:after{font-size:9px;line-height:13px}.rest-grid td.rest-R{print-color-adjust:exact;-webkit-print-color-adjust:exact}}
.rest-slot{touch-action:auto;user-select:none;-webkit-user-select:none;min-width:24px;height:36px}.rest-slot:checked:after{line-height:35px;color:#164e60}.rest-grid td.rest-W{background:#d9edf1;color:#164e60}.rest-grid td.rest-R{background:#fff;color:#164e60}.rest-legend .rest-W{background:#d9edf1;color:#164e60}.rest-legend .rest-R{background:#fff;color:#164e60}.rest-grid td.rest-breach{box-shadow:inset 0 -4px #c82c36!important}.rest-grid td.rest-window{background-image:linear-gradient(#d92b3326,#d92b3326)!important}.rest-risk-row th{font-size:10px;color:#a51b2b;background:#fff3f3!important}.rest-risk-row td{padding:0!important;border-top:0!important;border-bottom:0!important;height:16px}.rest-risk-row[hidden]{display:none!important}.rest-risk-mark{display:block;border:0;background:#c82c36;color:white;width:100%;height:16px;line-height:14px;border-radius:0;font-size:10px;padding:0;cursor:pointer}.rest-risk-mark[hidden]{display:none}.rest-risk-label{font-size:9px;color:#a51b2b;white-space:normal!important}.rest-live-warnings{background:#fff;border-left:4px solid #b9cbd4;padding:12px 16px;margin:16px 0;line-height:1.5;font-size:12px}.rest-live-warnings:has(.rest-alert-count){border-left-color:#c82c36}.rest-alert-count{color:#a51b2b}.rest-live-warnings p{margin:6px 0}.rest-live-warnings h3{font-size:13px}.rest-grid-actions{position:sticky;top:0;background:#f0f4f7;z-index:4;padding:10px 0;border-bottom:1px solid #bdcfd8}.rest-grid thead th{position:sticky;top:0;z-index:2}.rest-grid-wrap{overscroll-behavior-x:contain;overscroll-behavior-y:auto}.rest-risk-mark:focus-visible{outline:2px solid #0b4560;outline-offset:1px}@media print{.rest-slot{min-width:0;height:13px}.rest-slot:checked:after{font-size:12px;line-height:13px}.rest-risk-mark{height:8px;font-size:6px;line-height:8px;print-color-adjust:exact;-webkit-print-color-adjust:exact}.rest-grid-actions{display:none!important}.rest-grid td.rest-breach{border-bottom:2px solid #c82c36!important;print-color-adjust:exact;-webkit-print-color-adjust:exact}.rest-live-warnings{break-inside:avoid}}
.rest-copy-people{margin:16px 0;border:1px solid #acc3ce;padding:14px}.rest-copy-people label{display:flex;gap:10px;align-items:center;padding:8px;background:#fff;margin:5px 0}.rest-copy-people input[type=checkbox]{width:18px;height:18px;flex:none}#rest-copy-error{color:#a51b2b}
/* Half-hour work/rest grid. Keep time values and print legibility independent of decorative layout. */
.rest-modal{max-width:1800px;width:calc(100vw - 36px);padding:20px;border-width:3px}.rest-head h2{font-size:21px}.rest-head p{margin:8px 0;font-size:12px}.rest-approver{margin:14px 0}.rest-approver label{display:flex;gap:10px;align-items:center;font-size:12px}.rest-approver input{width:250px;max-width:100%;border:1px solid #a4bcc8;padding:7px;background:#fff}.rest-toolbar{margin:12px 0;gap:7px}.rest-toolbar button{padding:7px 10px;font-size:12px}.rest-criteria{display:flex;justify-content:space-between;gap:24px;margin:18px 0 10px;font-size:12px;line-height:1.5}.rest-criteria h3{font-size:14px;margin:0 0 6px}.rest-criteria p{margin:3px 0}.rest-criteria i{display:inline-block;width:12px;height:12px;margin-right:7px;vertical-align:middle}.rule-day{background:#AB0101}.rule-parts{background:#E39703}.rule-week{background:#6f42c1}.rest-criteria label{display:flex;align-items:center;gap:5px;margin-top:8px;font-style:italic}.rest-overtime-setting{width:48px!important;padding:3px!important;border:1px solid #becbd3}.rest-key{display:grid;grid-template-columns:25px 60px;gap:8px;align-content:start;align-items:center}.rest-key span{width:25px;height:25px;display:inline-block;border:1px solid #b1c1c9}.rest-key-rest{background:#1F7DB2}.rest-key-work{background:#edfff0}.rest-legend{display:none}.rest-grid-actions{margin:9px 0;padding:5px 0;gap:7px}.rest-grid-actions button{font-size:11px;padding:8px 10px}.rest-grid-actions [role=status]{font-size:10px}.rest-modal .workspacehint{font-size:10px;line-height:1.5;margin:5px 0}.rest-live-warnings{margin:7px 0;padding:7px 10px;border-left-width:3px;font-size:11px}.rest-live-warnings:empty{display:none}.rest-grid{min-width:1570px;width:1570px;table-layout:fixed;font-size:11px}.rest-grid th,.rest-grid td{padding:0;border:1px solid #c3d1d7;white-space:normal}.rest-grid th:first-child,.rest-grid tbody tr>th:first-child{width:76px;min-width:76px;font-size:10px;white-space:nowrap}.rest-grid thead th[colspan="2"]{width:30px;min-width:30px;font-size:11px;height:26px;font-weight:normal;background:#f0f4f7}.rest-grid .rest-slot{min-width:15px;width:15px;height:28px}.rest-slot:checked:after,.rest-slot:indeterminate:after{content:none!important}.rest-grid td:has(.rest-slot){position:relative;width:15px;min-width:15px}.rest-grid td.rest-R{background:#1F7DB2;color:#fff}.rest-grid td.rest-W{background:#edfff0;color:#234}.rest-grid td.rest-U{background:repeating-linear-gradient(45deg,#d7dfe3,#d7dfe3 3px,#f1f3f5 3px,#f1f3f5 6px)}.rest-grid td.rest-breach{box-shadow:none!important}.rest-grid td.rest-window{background-image:linear-gradient(#d92b3329,#d92b3329)!important}.rest-grid thead th:nth-last-child(7){width:100px}.rest-grid thead th:nth-last-child(6){width:110px}.rest-grid thead th:nth-last-child(5){width:230px}.rest-grid thead th:nth-last-child(4),.rest-grid thead th:nth-last-child(3){width:65px}.rest-grid thead th:nth-last-child(2),.rest-grid thead th:last-child{width:100px}.rest-grid thead small{font-size:9px;font-weight:normal;line-height:1.3;margin:4px}.rest-grid input:not(.rest-slot),.rest-grid select{width:100%;min-width:0;border:0;background:transparent;font-size:10px;line-height:1.3;padding:5px;box-sizing:border-box}.rest-grid input:not(.rest-slot):focus,.rest-grid select:focus{outline:2px solid #267fa7;outline-offset:-2px}.rest-grid tfoot td,.rest-grid tfoot th{padding:7px;background:#e8eff3;font-weight:bold}.rest-grid .rest-risk-mark{position:absolute;bottom:7px;left:15%;width:45%;height:5px;z-index:1;border:0;padding:0;min-height:0;border-radius:0;cursor:help}.rest-grid .rest-risk-mark[hidden]{display:none}.rest-value-day{color:#AB0101;font-weight:bold}.rest-value-parts:not(.rest-value-day){color:#b37100;font-weight:bold}.rest-value-week{color:#6f42c1;font-weight:bold}.rest-totals{margin:12px 0;font-size:12px}.rest-totals span{padding:8px 12px}.large-cells .rest-grid{width:2020px;min-width:2020px}.large-cells .rest-grid thead th[colspan="2"]{width:48px;min-width:48px}.large-cells .rest-grid .rest-slot{width:24px;min-width:24px;height:36px}.large-cells .rest-grid td:has(.rest-slot){width:24px;min-width:24px}.rest-grid .rest-risk-mark:focus-visible{outline:2px solid #101820;outline-offset:2px}@media(max-width:700px){.rest-criteria{gap:10px}.rest-criteria label{flex-wrap:wrap}.rest-key{grid-template-columns:20px 45px;gap:5px}.rest-key span{width:20px;height:20px}.rest-approver label{flex-wrap:wrap}.rest-head h2{font-size:18px}}@media print{.rest-approver input,.rest-overtime-setting{border:0}.rest-grid{min-width:0!important;width:100%!important;font-size:6px;table-layout:fixed}.rest-grid th:first-child,.rest-grid tbody tr>th:first-child{width:46px;min-width:0;font-size:6px}.rest-grid thead th[colspan="2"]{width:12px;min-width:0;font-size:6px}.rest-grid td:has(.rest-slot),.rest-grid .rest-slot{width:auto;min-width:0;height:13px}.rest-grid .rest-risk-mark{bottom:3px;height:3px}.rest-grid thead th:nth-last-child(7){width:36px}.rest-grid thead th:nth-last-child(6){width:40px}.rest-grid thead th:nth-last-child(5){width:75px}.rest-grid thead th:nth-last-child(4),.rest-grid thead th:nth-last-child(3){width:25px}.rest-grid thead th:nth-last-child(2),.rest-grid thead th:last-child{width:40px}.rest-grid input:not(.rest-slot),.rest-grid select{font-size:5px;padding:1px;appearance:none}.rest-grid td.rest-R,.rest-grid td.rest-W{print-color-adjust:exact;-webkit-print-color-adjust:exact}.rest-grid td.rest-breach{border-bottom:1px solid #b7c7cf!important}.rest-criteria{font-size:8px}.rest-key span{width:12px;height:12px}.rest-criteria h3{font-size:10px}.rest-grid thead small{font-size:5px}.rest-live-warnings{font-size:7px}}

/* Kystkontroll report framing; time cells retain their functional dimensions. */
.rest-modal{border:1px solid #b7c5d3;border-radius:16px;padding:24px}.rest-head{border-bottom:3px solid #177c80;padding-bottom:14px;margin-bottom:18px}.rest-head h2{font:700 24px system-ui;color:#19254f}.rest-head p{font:14px system-ui}.rest-approver{padding:12px;border-left:3px solid #177c80;background:#f0f5f8}@media print{.rest-modal{border:0;padding:0}.rest-head{border-bottom:2px solid #222}.rest-approver{background:#fff}}

/* The legend and registered cells share the Kystkontroll palette. Unknown time stays unknown. */
.rest-modal{--rest-rest:#19264e;--rest-work:#e6f3f5;--rest-unknown:repeating-linear-gradient(45deg,#d7dfe3,#d7dfe3 3px,#f1f3f5 3px,#f1f3f5 6px)}
.rest-key{grid-template-columns:25px minmax(90px,auto)}
.rest-key-rest,.rest-grid td.rest-R{background:var(--rest-rest);color:#fff}
.rest-key-work,.rest-grid td.rest-W{background:var(--rest-work);color:#19264e}
.rest-key-unknown,.rest-grid td.rest-U{background:var(--rest-unknown)}
@media(max-width:700px){.rest-key{grid-template-columns:20px minmax(65px,auto)}}
@media print{.rest-key span,.rest-grid td.rest-U{print-color-adjust:exact;-webkit-print-color-adjust:exact}}
@media screen{
html.night-mode body .rest-key-rest,html.night-mode body .rest-grid td.rest-R{background-color:#661b1b!important;background-image:none!important}
html.night-mode body .rest-key-work,html.night-mode body .rest-grid td.rest-W{background-color:#160000!important;background-image:none!important}
html.night-mode body .rest-key-unknown,html.night-mode body .rest-grid td.rest-U{background-color:#000!important;background-image:repeating-linear-gradient(45deg,#3b1515,#3b1515 3px,#080000 3px,#080000 6px)!important}
}
