.wf-note{color:var(--muted);font-size:13px;line-height:1.55;margin:12px 0;overflow-wrap:anywhere}
.wf-controls{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end;margin:20px 0 12px}.wf-controls select{max-width:310px}.wf-week-nav{display:flex;gap:8px;align-items:flex-end}.wf-week-nav label{margin:0;font-size:12px}.wf-week-nav input{margin-top:6px;min-width:156px}.wf-week-nav>button{min-width:42px;height:45px}.wf-period{font-size:18px;font-weight:700}
.wf-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:18px 0}.wf-metric{padding:18px;border:1px solid var(--line);background:var(--card);border-radius:16px;min-width:0}.wf-metric small{display:block;min-height:36px;font-size:12px;line-height:1.4}.wf-metric strong{font-size:clamp(21px,3vw,30px);display:block;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}.wf-highlight{border-color:#867214;background:linear-gradient(135deg,#24200d,#151613)}.wf-highlight strong{color:var(--gold)}.wf-negative,.wf-negative strong{color:var(--red)}.wf-warning{border:1px solid #74601a;background:#26200c;border-radius:12px;padding:14px;color:#ffe083;font-size:13px}.wf-error{color:var(--red);font-size:13px}.wf-error:empty{display:none}
.wf-site-card,.wf-panel{padding:18px;background:var(--card);border:1px solid var(--line);border-radius:16px;margin:16px 0}.wf-site-card header{display:flex;gap:14px;justify-content:space-between;align-items:center}.wf-site-card h3{margin:0 0 4px;font-size:18px;overflow-wrap:anywhere}.wf-site-card header small{font-size:12px}.wf-site-values{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;border-top:1px solid var(--line);padding-top:16px;margin-top:16px}.wf-site-values small,.wf-site-values b{display:block}.wf-site-values small{font-size:11px;margin-bottom:5px}.wf-site-values b{font-size:17px;overflow-wrap:anywhere}.wf-panel h2{margin:0 0 16px}.wf-invoice-row{display:flex;justify-content:space-between;align-items:center;gap:14px;width:100%;padding:14px 0;background:transparent;border:0;border-top:1px solid var(--line);border-radius:0;text-align:left}.wf-invoice-row>span{min-width:0}.wf-invoice-row b{display:block;overflow-wrap:anywhere;font-size:13px}.wf-invoice-row small{display:block;margin-top:5px;font-size:11px;font-weight:400}.wf-invoice-row>strong{text-align:right;font-size:17px;flex:0 0 auto}.wf-invoice-row>strong small{color:var(--gold);max-width:130px}.wf-pending{border-color:#574d22}
.wf-editor{margin-top:24px;border-top:1px solid var(--line);padding-top:16px}.wf-editor h3{margin:0}.wf-allocation-row{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr) 38px;gap:10px;align-items:start;border-top:1px solid var(--line);padding:10px 0}.wf-allocation-row label{font-size:12px;margin:0;min-width:0}.wf-allocation-row input{display:block;min-width:0;margin-top:7px;padding:11px 8px}.wf-allocation-row small{display:block;font-weight:400;font-size:11px;margin-top:7px}.wf-allocation-row .wa-remove{margin-top:24px;padding:8px;width:38px;height:43px}.wf-allocation-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-top:18px;background:var(--panel-2);padding:12px;border-radius:12px}.wf-allocation-totals small,.wf-allocation-totals b{display:block;overflow-wrap:anywhere}.wf-allocation-totals small{font-size:11px;min-height:32px}.wf-allocation-totals b{font-size:16px}.wf-detail-weeks p{display:flex;justify-content:space-between;gap:12px;font-size:13px}.wf-detail-weeks b{white-space:nowrap}.wf-delete{margin-top:18px;color:var(--red)}
.wf-shortcut{display:flex;gap:14px;align-items:center;justify-content:space-between;padding:15px 17px;margin:0 0 20px;border:1px solid #574d22;background:var(--panel);border-radius:14px}.wf-shortcut b,.wf-shortcut small{display:block}.wf-shortcut small{font-size:12px;max-width:580px;margin-top:5px}.wf-shortcut button{flex-shrink:0;font-size:12px}
#weeklySummary .toolbar{flex-wrap:wrap}#weeklySummary .toolbar h1{font-size:clamp(29px,6vw,42px)}#weeklySummary .toolbar>button{font-size:12px}#weeklySummary button:focus-visible,.wf-editor button:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
@media(max-width:460px){.wf-editor .wf-allocation-row{grid-template-columns:minmax(0,1fr) 38px;gap:9px}.wf-allocation-row label:first-child{grid-column:1/-1}.wf-allocation-row label:nth-child(2){grid-column:1}.wf-editor .wf-allocation-row .wa-remove{grid-column:2;width:38px;margin-top:22px}.wf-allocation-row label:first-child input{max-width:100%}}
@media(max-width:650px){.wf-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.wf-metric{padding:14px}.wf-metric small{font-size:11px}.wf-controls{gap:10px}.wf-controls select{max-width:none}.wf-site-values{grid-template-columns:repeat(2,minmax(0,1fr))}.wf-site-card header{align-items:flex-start;flex-direction:column;gap:10px}.wf-site-card header button{font-size:12px}.wf-site-card,.wf-panel{padding:15px}.wf-shortcut{align-items:flex-start;flex-direction:column;gap:10px}.wf-allocation-row{grid-template-columns:minmax(0,1fr) minmax(0,.95fr) 30px;gap:7px}.wf-allocation-row .wa-remove{width:30px}.wf-allocation-row label{font-size:10px}.wf-allocation-row input{font-size:16px;padding:10px 5px}.wf-allocation-totals{gap:8px;padding:10px}.wf-allocation-totals b{font-size:14px}.wf-invoice-row>strong{font-size:15px}.wf-detail-weeks p{font-size:11px}.wf-invoice-row>strong small{max-width:110px}}
.wf-main-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
.wf-controls .wf-site-filter{min-width:0;flex:1 1 240px;margin:0;font-size:12px}.wf-site-filter select{display:block;margin-top:6px;max-width:none;width:100%}
.wf-sites-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:18px 0}.wf-site-choice{text-align:left;min-width:0;padding:16px!important;white-space:normal}.wf-site-choice b,.wf-site-choice span,.wf-site-choice strong{display:block;overflow-wrap:anywhere}.wf-site-choice b{font-size:15px}.wf-site-choice span{font-size:11px;font-weight:400;color:var(--muted);margin:8px 0}.wf-site-choice strong{font-size:14px;color:var(--gold)}
.wf-invoice-card{padding:18px 0;border-top:1px solid var(--line)}.wf-invoice-card:first-of-type{border-top:0}.wf-invoice-card header{display:flex;flex-direction:column;gap:6px;min-width:0}.wf-invoice-card header small{font-size:12px;color:var(--muted)}.wf-invoice-title{background:transparent;border:0;border-radius:0;padding:0!important;text-align:left;font-size:15px;white-space:normal;overflow-wrap:anywhere;color:var(--gold)}.wf-invoice-values{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:16px 0}.wf-invoice-values>div{min-width:0}.wf-invoice-values small,.wf-invoice-values b{display:block;overflow-wrap:anywhere}.wf-invoice-values small{font-size:11px;color:var(--muted);min-height:34px}.wf-invoice-values b{font-size:17px;font-variant-numeric:tabular-nums}.wf-invoice-card>button{font-size:12px}.wf-pending summary{cursor:pointer;font-weight:700;line-height:1.5;overflow-wrap:anywhere}.wf-empty{padding:12px 0}.wf-empty p{font-size:14px;line-height:1.6;color:var(--muted)}.wf-week-preview{display:flex;justify-content:space-between;gap:15px;padding:15px;background:var(--panel);border:1px solid #574d22;border-radius:12px;margin-top:15px}.wf-week-preview span{font-size:13px}.wf-week-preview strong{font-size:22px;color:var(--gold);white-space:nowrap}.wf-warning p{font-size:12px;line-height:1.6}.wf-warning button{margin-top:6px;font-size:12px}
.wf-editor .wf-allocation-row{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) minmax(0,1fr) 38px}.wf-editor .wa-cost-label{min-width:0}
@media(max-width:800px){.wf-sites-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.wf-invoice-values{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.wf-main-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.wf-main-metrics .wf-highlight{grid-column:1/-1}.wf-week-nav{display:grid;grid-template-columns:40px minmax(0,1fr) 40px;flex:1 1 240px;min-width:0}.wf-week-nav input{min-width:0;width:100%;max-width:100%}.wf-week-nav>button{min-width:0;width:40px}.wf-editor .wf-allocation-row{grid-template-columns:minmax(0,1fr) 38px}.wf-editor .wf-allocation-row label:first-child{grid-column:1/-1;grid-row:1}.wf-editor .wf-allocation-row label:nth-child(2){grid-column:1;grid-row:2}.wf-editor .wf-allocation-row .wa-cost-label{grid-column:1/-1;grid-row:3}.wf-editor .wf-allocation-row .wa-remove{grid-column:2;grid-row:2;width:38px;margin-top:22px}.wf-invoice-values b{font-size:16px}.wf-sites-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.wf-site-choice{padding:12px!important}.wf-site-choice b{font-size:13px}}
@media(max-width:360px){.wf-sites-grid,.wf-main-metrics{grid-template-columns:1fr}.wf-invoice-values{gap:10px}.wf-week-preview{flex-direction:column;gap:8px}}
.wf-main-metrics strong{white-space:nowrap;overflow-wrap:normal}
.wf-week-preview>div:last-child{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}

/* Automatic labour: invoice amounts and site costs remain separate. */
.wf-invoice-values{grid-template-columns:repeat(2,minmax(0,1fr))}
.wf-labour-row{display:flex;justify-content:space-between;gap:16px;padding:14px 0;border-top:1px solid var(--line)}.wf-labour-row>div{min-width:0}.wf-labour-row>div:last-child{text-align:right;flex-shrink:0}.wf-labour-row b,.wf-labour-row strong,.wf-labour-row small{display:block}.wf-labour-row b{font-size:14px;overflow-wrap:anywhere}.wf-labour-row strong{white-space:nowrap;font-size:16px}.wf-labour-row small{color:var(--muted);font-size:11px;line-height:1.5;margin-top:5px}.wf-payment-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.wf-payment-summary span{font-size:12px;color:var(--muted)}.wf-payment-summary b{display:block;font-size:20px;color:var(--text);margin-top:7px;white-space:nowrap}.wf-labour-actions{display:flex;gap:10px;margin-top:16px}.wf-labour-actions button{font-size:12px}.wf-week-preview>div{min-width:0}.wf-week-preview small{display:block;line-height:1.5;font-size:11px;margin:5px 0}.wf-editor .wf-allocation-row{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) 38px}
@media(max-width:460px){.wf-editor .wf-allocation-row{grid-template-columns:minmax(0,1fr) 38px}.wf-labour-row{gap:10px}.wf-labour-row b{font-size:12px}.wf-labour-row>div:last-child{max-width:48%}.wf-payment-summary b{font-size:18px}.wf-week-preview{flex-direction:column}}

/* Company work-week result: four comparable cards, optional drill-down. */
.wf-main-metrics{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.wf-main-metrics .wf-metric{padding:22px 18px;position:relative}
.wf-main-metrics .wf-metric small{min-height:38px;margin-top:14px;font-size:13px;color:var(--muted)}
.wf-main-metrics strong{font-size:clamp(19px,2.4vw,32px);letter-spacing:-.6px;white-space:normal;overflow-wrap:anywhere}
.wf-metric-icon{display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:11px;background:#252625;color:var(--gold)}
.wf-metric-icon svg{width:20px;height:20px}
.wf-controls .wf-site-filter,.wf-controls .wf-invoice-filter{min-width:0;flex:1 1 210px;margin:0;font-size:12px}
.wf-invoice-filter select{display:block;width:100%;max-width:100%;margin-top:6px}
.wf-controls{padding:16px;border:1px solid var(--line);border-radius:16px;background:var(--card)}
.wf-controls .wf-week-nav{flex:1 1 280px;min-width:0}
.wf-period-line,.wf-result-line{display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap}
.wf-period-line .wf-period{margin:12px 0;font-size:17px}
#wfSync{color:var(--muted);font-size:11px}.wf-loading{color:var(--gold)!important}
.wf-result-line{padding:0 2px 10px;font-size:14px}.wf-result-line b{color:var(--gold);margin-left:8px}
.wf-provisional{color:#ffe083;font-size:12px;border:1px solid #574d22;border-radius:8px;padding:6px 10px}
.wf-expense-row{display:flex;justify-content:space-between;gap:16px;padding:16px 0;border-top:1px solid var(--line)}
.wf-expense-row>div{min-width:0}.wf-expense-row b,.wf-expense-row small{display:block;overflow-wrap:anywhere}.wf-expense-row small{font-size:12px;color:var(--muted);margin-top:6px;line-height:1.5}.wf-expense-row>strong{white-space:nowrap;font-size:17px}
.wf-link-button{font-size:11px;margin-top:10px;padding:7px 10px!important;min-height:32px}
.wf-status{display:inline-block!important;padding:3px 7px;background:#322816;border-radius:6px;color:#ffe083!important}.wf-status.paid{background:#143321;color:#92d6a6!important}
.wf-cash summary{cursor:pointer;font-weight:700}.wf-cash .wf-payment-summary{grid-template-columns:repeat(4,minmax(0,1fr));margin-top:20px}
.wf-cost-split{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) 36px;gap:10px;align-items:end;margin:14px 0}.wf-cost-split label{min-width:0;margin:0;font-size:12px}.wf-cost-split select,.wf-cost-split input{display:block;margin-top:6px;width:100%;max-width:100%;min-width:0}.wf-cost-split button{padding:10px;min-width:0}
@media(max-width:900px){.wf-main-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.wf-main-metrics .wf-highlight{grid-column:auto}.wf-main-metrics strong{font-size:29px}}
@media(max-width:650px){.wf-main-metrics{gap:10px}.wf-main-metrics .wf-metric{padding:16px 12px}.wf-main-metrics .wf-metric small{font-size:11px;min-height:32px}.wf-main-metrics strong{font-size:clamp(19px,5.4vw,29px)}.wf-controls{padding:12px;gap:14px}.wf-controls .wf-week-nav{flex-basis:100%}.wf-controls .wf-site-filter,.wf-controls .wf-invoice-filter{flex-basis:100%}.wf-cash .wf-payment-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.wf-period-line{gap:0}.wf-panel h2{font-size:19px}.wf-cost-split{grid-template-columns:minmax(0,1fr) 36px}.wf-cost-split label:first-child{grid-column:1/-1}}
@media(max-width:360px){.wf-main-metrics{grid-template-columns:1fr}.wf-main-metrics strong{font-size:30px}.wf-expense-row{flex-wrap:wrap}}

@media(max-width:650px){.wf-period-line #wfSync{flex-basis:100%;margin-bottom:8px}.wf-period-line .wf-period{margin-bottom:6px}}
