/* DPR · RFI register · SPS/IPC tabs (ui-site.js). Uses the theme tokens from theme-modern.css / theme-switcher.css. */
:root{
  --site-found:var(--m-blue,#155DFC);
  --site-sub:#5B8DEF;
  --site-super:#0E8F96;
  --site-cos:#A1A1AA;
  --site-empty:#EEF1F5;
  --site-last:var(--m-amber,#E17100);
}
.site{display:flex;flex-direction:column;gap:16px}
.site .mono{font-family:var(--m-mono,ui-monospace,monospace)}
.site .num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.site .card h3{display:flex;justify-content:space-between;align-items:baseline;gap:12px;flex-wrap:wrap}
.site .card h3 .sub{font-weight:400}

/* KPI strip: one bordered band, five cells */
.site-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));border:1px solid var(--m-border,#E4E4E7);border-radius:var(--m-radius,10px);background:var(--m-panel,#fff)}
.site-kpis>div{padding:14px 16px;border-left:1px solid var(--m-border,#E4E4E7);display:flex;flex-direction:column;gap:3px;min-width:0}
.site-kpis>div:first-child{border-left:0}
.site-kpis .l{font-size:12px;color:var(--m-muted,#71717A);font-weight:500}
.site-kpis .v{font-size:24px;font-weight:600;letter-spacing:-.02em;font-variant-numeric:tabular-nums;color:var(--m-text,#09090B)}
.site-kpis .s{font-size:12px;color:var(--m-muted,#71717A)}
.site-kpis .bar{height:4px;border-radius:2px;background:var(--site-empty);overflow:hidden;margin-top:4px}
.site-kpis .bar i{display:block;height:100%;background:var(--site-found)}
@media(max-width:1100px){.site-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.site-kpis>div{border-left:0;border-top:1px solid var(--m-border,#E4E4E7)}.site-kpis>div:nth-child(-n+2){border-top:0}.site-kpis>div:nth-child(even){border-left:1px solid var(--m-border,#E4E4E7)}}

/* chainage strip */
.site-strip{overflow-x:auto}
.site-strip svg{display:block;min-width:680px;width:100%}
.site-strip text{font-family:var(--m-font,inherit);fill:var(--m-muted,#71717A);font-size:12px}
.site-strip text.b{fill:var(--m-text,#09090B);font-weight:600}
.site-strip text.m{font-family:var(--m-mono,monospace);font-size:10.5px}
.site-strip .lane{fill:var(--site-empty)}
.site-strip .axis{stroke:var(--m-border,#D4D4D8)}
.f-foundation{fill:var(--site-found)} .f-substructure{fill:var(--site-sub)} .f-superstructure{fill:var(--site-super)} .f-cos{fill:var(--site-cos)} .f-last{fill:var(--site-last)}
.site-strip rect.seg{stroke:var(--m-panel,#fff);stroke-width:.6}
.sw{display:inline-block;width:10px;height:10px;border-radius:2px;vertical-align:-1px;margin-right:6px}
.sw.foundation{background:var(--site-found)} .sw.substructure{background:var(--site-sub)} .sw.superstructure{background:var(--site-super)} .sw.cos,.sw.other{background:var(--site-cos)} .sw.last{background:var(--site-last)} .sw.bal{background:var(--site-empty);box-shadow:inset 0 0 0 1px var(--m-border,#E4E4E7)}

/* two-column layouts */
.site-side{display:grid;grid-template-columns:minmax(0,360px) minmax(0,1fr);gap:16px;align-items:start}
.site-2{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:start}
@media(max-width:1000px){.site-side,.site-2{grid-template-columns:minmax(0,1fr)}}

/* upload */
.site-drop{border:1.5px dashed var(--m-border,#D4D4D8);border-radius:var(--m-radius-sm,8px);padding:16px;display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center;cursor:pointer;background:transparent;transition:border-color .15s ease-out,background .15s ease-out}
.site-drop:hover,.site-drop.over{border-color:var(--m-blue,#155DFC);background:var(--m-blue-50,#EFF6FF)}
.site-drop:focus-visible{outline:2px solid var(--m-blue,#155DFC);outline-offset:2px}
.site-drop svg{width:22px;height:22px;stroke:var(--m-blue,#155DFC);fill:none;stroke-width:2}
.site-drop b{font-weight:500;color:var(--m-text,#09090B)}
.site-drop input{display:none}
.site .form.one{grid-template-columns:1fr}
.site .form .unit{position:relative}.site .form .unit input{padding-right:28px;text-align:right;width:100%}
.site .form .unit span{position:absolute;right:9px;top:50%;transform:translateY(-50%);font-size:11px;color:var(--m-muted,#71717A)}
.site .row3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}

/* stage bars */
.site-steps{display:flex;flex-direction:column;gap:8px}
.site-step{display:grid;grid-template-columns:minmax(110px,170px) minmax(0,1fr) auto;gap:10px;align-items:center;font-size:12.5px}
.site-step .track{height:14px;background:var(--site-empty);border-radius:3px;position:relative;overflow:hidden}
.site-step .track i{position:absolute;top:0;bottom:0;border-radius:3px}
.site-step .track i.thin{top:4px;bottom:4px}
.site-step.total{border-top:2px solid var(--m-text,#09090B);padding-top:8px;font-weight:600}
@media(max-width:560px){.site-step{grid-template-columns:minmax(0,1fr) auto}.site-step .track{grid-column:1/-1;order:3}.site .row3{grid-template-columns:1fr}}

/* checks */
.site-checks{display:flex;flex-direction:column}
.site-check{display:grid;grid-template-columns:18px minmax(0,1fr) auto;gap:10px;padding:9px 0;border-bottom:1px solid var(--m-border-soft,#F4F4F5);font-size:12.5px;line-height:1.45}
.site-check:last-child{border-bottom:0}
.site-check svg{width:15px;height:15px;margin-top:2px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.site-check .src{font-family:var(--m-mono,monospace);font-size:11px;color:var(--m-muted,#71717A);white-space:nowrap}
.c-bad{color:var(--m-red,#E7000B)} .c-warn{color:var(--m-amber,#E17100)} .c-info{color:var(--m-blue,#155DFC)} .c-ok{color:var(--m-green,#00A63E)}

/* bill chips */
.site-chips{display:flex;gap:6px;flex-wrap:wrap}
.site-chip{border:1px solid var(--m-border,#E4E4E7);background:var(--m-panel,#fff);border-radius:6px;padding:4px 9px;font:500 12px var(--m-mono,monospace);cursor:pointer;display:inline-flex;gap:6px;align-items:center;color:var(--m-text,#09090B)}
.site-chip:hover{background:var(--m-hover,#F4F4F5)}
.site-chip[aria-pressed="true"]{background:var(--m-blue,#155DFC);border-color:var(--m-blue,#155DFC);color:#fff}
.site-chip .pip{width:6px;height:6px;border-radius:50%;background:var(--m-green,#00A63E)}
.site-chip .pip.none{background:var(--m-border,#D4D4D8)}
.site-chip[aria-pressed="true"] .pip{background:#fff}

.site .tb td.desc{min-width:220px;max-width:420px}
.site .clamp{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.site .tb tr.grp td{background:var(--m-hover,#F4F4F5);font-size:11.5px;color:var(--m-muted,#71717A);font-weight:500}
.site .tb tr.sub td:first-child{padding-left:22px;color:var(--m-muted,#71717A)}
.site .empty{padding:24px 8px;text-align:center;color:var(--m-muted,#71717A);font-size:12.5px}
.site .flag{display:block;margin-top:3px;font-size:11.5px;color:var(--m-amber,#E17100)}
.site details summary{cursor:pointer;color:var(--m-blue,#155DFC);font-size:12px}
.site-busy{height:12px;border-radius:3px;background:linear-gradient(90deg,var(--m-subtle,#FAFAFA),var(--m-border,#E4E4E7),var(--m-subtle,#FAFAFA));background-size:200% 100%;animation:site-sh 1.2s infinite}
@keyframes site-sh{to{background-position:-200% 0}}
@media(prefers-reduced-motion:reduce){.site-busy{animation:none}.site-drop{transition:none}}
.site-billchart svg{display:block;width:100%;min-width:560px}
.site-billchart text{font-family:var(--m-font,inherit);font-size:11px;fill:var(--m-muted,#71717A)}
.site-billchart text.b{fill:var(--m-text,#09090B);font-weight:600;font-size:12px}
.site-billchart .grid{stroke:var(--m-border-soft,#F4F4F5)}
.site-billchart .cum{fill:none;stroke:var(--m-text,#09090B);stroke-width:1.6}
.site-billchart .dot{fill:var(--m-text,#09090B)} .site-billchart .dot.last{fill:var(--site-last)}

.site .legend span{display:inline-flex;align-items:center}
.site .legend i.sw{flex:none;width:10px;height:10px;margin-right:6px}
.site .nw{white-space:nowrap}

/* daily entry sheet */
:root{--site-other:#8B95A5;--site-done:#B8C2CF}
.f-other{fill:var(--site-other)} .f-site{fill:var(--site-done)}
.sw.other{background:var(--site-other)} .sw.site{background:var(--site-done)}
.site-bar{gap:8px;flex-wrap:wrap}
.site-bar input[type=date]{border:1px solid var(--m-border,#E4E4E7);border-radius:6px;padding:4px 8px;font-size:12.5px;background:var(--m-panel,#fff);color:var(--m-text,#09090B)}
.site-bar .seg{display:inline-flex;gap:0}
.site-bar .seg .btn{border-radius:0}
.site-bar .seg .btn:first-child{border-radius:6px 0 0 6px}
.site-bar .seg .btn:last-child{border-radius:0 6px 6px 0}
.site-sheet td{vertical-align:middle}
.site-sheet td.site-in{width:130px;padding-top:4px;padding-bottom:4px}
.site-sheet .unit{position:relative}
.site-sheet .unit input,.site-lines .unit input{width:100%;border:1px solid var(--m-border,#E4E4E7);border-radius:6px;padding:5px 30px 5px 8px;text-align:right;font-variant-numeric:tabular-nums;font-size:12.5px;background:var(--m-panel,#fff);color:var(--m-text,#09090B)}
.site-sheet .unit input:focus,.site-lines input:focus,.site-lines select:focus{outline:2px solid var(--m-blue,#155DFC);outline-offset:0;border-color:transparent}
.site-sheet .unit input:disabled{background:var(--m-hover,#F4F4F5);color:var(--m-muted,#71717A)}
.site-sheet .unit span,.site-lines .unit span{position:absolute;right:8px;top:50%;transform:translateY(-50%);font-size:11px;color:var(--m-muted,#71717A);pointer-events:none}
.site-sheet tr.moved td{background:var(--m-blue-50,#EFF6FF)}
.site-sheet tr.moved td:first-child{box-shadow:inset 3px 0 0 var(--m-blue,#155DFC)}
.site .tb tr.idle td{color:var(--m-muted,#71717A)}
.site-mini{height:6px;border-radius:3px;background:var(--site-empty);overflow:hidden;margin-bottom:2px;min-width:80px}
.site-mini i{display:block;height:100%}
.site-lines input,.site-lines select{border:1px solid var(--m-border,#E4E4E7);border-radius:6px;padding:4px 6px;font-size:12.5px;background:var(--m-panel,#fff);color:var(--m-text,#09090B);max-width:100%}
.site-lines td{vertical-align:middle}
.site-lines .unit{position:relative}
.site-lines select[data-f="item"]{max-width:240px}
@media(max-width:640px){.site-sheet .hm{display:none}.site .site-sheet td.desc{min-width:0}.site-sheet td.site-in{width:104px}.site-bar .sep,.site-bar .spacer{display:none}}
.site-sheet .mref{display:none;color:var(--m-muted,#71717A);font-size:11px}
@media(max-width:640px){.site-sheet .mref{display:block}.site .site-sheet td.site-in{min-width:100px}.site-sheet td,.site-sheet th{padding-left:6px;padding-right:6px}}

/* bills submitted but not yet certified */
:root{--site-pend-stripe:repeating-linear-gradient(135deg,var(--site-last) 0 2px,transparent 2px 5px)}
.sw.pend{background:var(--site-pend-stripe);box-shadow:inset 0 0 0 1px var(--site-last)}
.site-strip rect.f-pend{fill:var(--site-last);fill-opacity:.28;stroke:var(--site-last);stroke-width:1;stroke-dasharray:3 2}
.site-billchart rect.unc{fill-opacity:.35;stroke:currentColor;stroke-width:.8;stroke-dasharray:3 2}
.site-billchart .cum.unc{stroke-dasharray:4 4;opacity:.7}
.site-billchart .dot.unc{fill:var(--m-panel,#fff);stroke:var(--site-last);stroke-width:1.6}
.site-kpis .s.pend{display:flex;align-items:center;gap:0;color:var(--m-text,#09090B)}
.site-kpis .s.pend .sw{flex:none}
.site-kpis .bar{display:flex}
.site-kpis .bar i{flex:none}
.site-kpis .bar i.pend,.site-step .track i.pend{background:var(--site-pend-stripe);opacity:1}
.site-step .track i.pend{position:absolute;top:0;bottom:0}
.site-step .pendn{color:var(--site-last);font-size:11.5px}
.site-chip .chip-st{margin-left:6px;font-size:10.5px;color:var(--site-last);font-weight:500}
.site h3 .site-st{margin-left:12px;display:inline-flex;align-items:center;gap:6px;font-weight:500}
.site h3 .site-st select{font-size:12.5px;padding:3px 6px;border:1px solid var(--m-border,#E4E4E7);border-radius:6px;background:var(--m-panel,#fff);color:var(--m-text,#09090B)}
.site-chip[aria-pressed="true"] .chip-st{color:inherit;opacity:.85}
