/* Bruche Portal — dark theme. GENERATED by tools/dark-gen.mjs from the light CSS + tools/dark-hand.css; edit those, not this. */
@media screen{
/* --- styles.css: 88 rules --- */
:where(html[data-theme="dark"]) :focus-visible{outline:3px solid #916946}
:where(html[data-theme="dark"]) .btn.sec{background:#293843}
:where(html[data-theme="dark"]) .card{border:1px solid #304352}
:where(html[data-theme="dark"]) .stat{border:1px solid #304352}
:where(html[data-theme="dark"]) .chip{background:#24323d}
:where(html[data-theme="dark"]) .tabs{background:var(--card)}
:where(html[data-theme="dark"]) .tabs a{color:#a2adb6}
:where(html[data-theme="dark"]) input[type=text],:where(html[data-theme="dark"]) input[type=number],:where(html[data-theme="dark"]) input[type=password],:where(html[data-theme="dark"]) input[type=date],:where(html[data-theme="dark"]) input[type=search],:where(html[data-theme="dark"]) select,:where(html[data-theme="dark"]) textarea{border:1px solid #425564;background:var(--card)}
:where(html[data-theme="dark"]) .seg button,:where(html[data-theme="dark"]) .seg a{border:1px solid #425564;background:var(--card)}
:where(html[data-theme="dark"]) .bar{background:#24323d}
:where(html[data-theme="dark"]) .drop{border:2px dashed #4f6475;background:var(--card)}
:where(html[data-theme="dark"]) #toast{background:#315068}
:where(html[data-theme="dark"]) .note{color:#acceef}
:where(html[data-theme="dark"]) .warnbox{color:#f9e3b5}
:where(html[data-theme="dark"]) .offer img{background:#24292f}
:where(html[data-theme="dark"]) .ph{background:var(--card);color:#9ea9b2}
:where(html[data-theme="dark"]) .ph.ic{background:#243038;border-color:#354552}
:where(html[data-theme="dark"]) .pdftag{border:1px solid #425564}
:where(html[data-theme="dark"]) .chip.rule{background:#26183f;color:#ae96d3}
:where(html[data-theme="dark"]) .chip.rule.g{background:#271b48}
:where(html[data-theme="dark"]) .chip.q{border:1px solid #40505d;background:var(--card)}
:where(html[data-theme="dark"]) .why{background:#3b2616;border:1px solid #62442f}
:where(html[data-theme="dark"]) .offer .oimg{background:#24292f}
:where(html[data-theme="dark"]) .lb-in{background:var(--card)}
:where(html[data-theme="dark"]) .lb-in img{background:var(--card)}
:where(html[data-theme="dark"]) .lb-x{background:#24323d}
:where(html[data-theme="dark"]) .tabs{background:var(--card)}
:where(html[data-theme="dark"]) .tabs a{color:#a5b0b9}
:where(html[data-theme="dark"]) .act{border:1px solid #344756}
:where(html[data-theme="dark"]) .howto{border:1px solid #334e6a;background:#152336}
:where(html[data-theme="dark"]) .spend-g>div{background:#1d2834}
:where(html[data-theme="dark"]) .li .li-ic{background:#24323d}
:where(html[data-theme="dark"]) .crew-tbl tr.on td{background:#472c1b}
:where(html[data-theme="dark"]) .crew-punch.bad{border-color:#733838;background:#341414}
:where(html[data-theme="dark"]) input[type=datetime-local]{border:1px solid #425564;background:var(--card)}
:where(html[data-theme="dark"]) .crew-pre{background:#1d2834}
:where(html[data-theme="dark"]) .card.ok{border-color:#39774e;background:#153921}
:where(html[data-theme="dark"]) a.inv-tr:hover{background:#1a2734}
:where(html[data-theme="dark"]) .cp-pick{border:1px solid rgba(255,255,255,0.25)}
:where(html[data-theme="dark"]) .cp-warn{background:#52471f;color:#faebbf;border:1px solid #918146}
:where(html[data-theme="dark"]) .cp-dirty{outline:2px solid #466291}
:where(html[data-theme="dark"]) .cp-low{background:#6f642a!important}
:where(html[data-theme="dark"]) .cp-low input,:where(html[data-theme="dark"]) .cp-low select{background:#49431c}
:where(html[data-theme="dark"]) .cp-doc{border:1px solid rgba(255,255,255,0.25);background:var(--card)}
:where(html[data-theme="dark"]) .cp-sh{border-bottom:1px solid rgba(255,255,255,0.24)}
:where(html[data-theme="dark"]) .cp-tg{border:1px solid rgba(255,255,255,0.25)}
:where(html[data-theme="dark"]) .cp-tg button.on{background:#1f547a}
:where(html[data-theme="dark"]) .cp-newf.on{outline:2px solid #466291}
:where(html[data-theme="dark"]) .cp-drop{border:2px dashed rgba(255,255,255,0.25)}
:where(html[data-theme="dark"]) .cp-drop.on{border-color:#466291;background:rgba(42,68,111,0.06)}
:where(html[data-theme="dark"]) td.cp-day:hover{background:rgba(42,68,111,0.12)}
:where(html[data-theme="dark"]) .cp-zoom button{border:1px solid rgba(255,255,255,0.25);background:var(--card)}
:where(html[data-theme="dark"]) .cp-spl,:where(html[data-theme="dark"]) .cp-x{color:#608df0}
:where(html[data-theme="dark"]) .cp-side .tbl tr.cp-main{border-top:1px solid rgba(255,255,255,0.25)}
:where(html[data-theme="dark"]) .cp-side .tbl tr.cp-main td:nth-child(n+3)::before{color:#a1a6b0}
:where(html[data-theme="dark"]) .cg-li.on{background:rgba(42,64,111,0.08)}
:where(html[data-theme="dark"]) .cg-why{color:#f4b07c}
:where(html[data-theme="dark"]) .vtog{border:1px solid #425564;background:var(--card)}
:where(html[data-theme="dark"]) .vtog a+a{border-left:1px solid #425564}
:where(html[data-theme="dark"]) .vcard{background:var(--card)}
:where(html[data-theme="dark"]) .vc-ic{fill:#6f5a2a;stroke:#e1bd70}
:where(html[data-theme="dark"]) .vchip{background:#24323d}
:where(html[data-theme="dark"]) .vchip.acc{background:#52431f;color:#f7d99f}
:where(html[data-theme="dark"]) .vchip.red{background:#441a1a;color:#eb8383}
:where(html[data-theme="dark"]) .vchip.ok{background:#1d4c2e;color:#afe9c5}
:where(html[data-theme="dark"]) .cg-ml{background:rgba(42,64,111,0.06);border:1px solid rgba(70,93,145,0.25)}
:where(html[data-theme="dark"]) .cg-mle{color:#ea7474}
:where(html[data-theme="dark"]) .inv-card.selmode .inv-tr .isel[data-fl]{outline:2px solid #f2cf5e}
:where(html[data-theme="dark"]) .fchip.red{background:#441a1a;color:#ed8078;border-color:#753d38}
:where(html[data-theme="dark"]) .fchip.yellow{background:#4d3a1d;color:#f6ca8f;border-color:#83683f}
:where(html[data-theme="dark"]) .fchip.ok{background:#1b482f;color:#a3e9c2}
:where(html[data-theme="dark"]) .inv-tr.flg-red,:where(html[data-theme="dark"]) .li.flg-red{background:#371815}
:where(html[data-theme="dark"]) .inv-tr.flg-yellow,:where(html[data-theme="dark"]) .li.flg-yellow{background:#3b2f16}
:where(html[data-theme="dark"]) a.inv-tr.flg-red:hover{background:#401a18}
:where(html[data-theme="dark"]) a.inv-tr.flg-yellow:hover{background:#4a391c}
:where(html[data-theme="dark"]) .fl-pop{background:var(--card)}
:where(html[data-theme="dark"]) .chip.violet{background:#291943;color:#ae96d3}
:where(html[data-theme="dark"]) .cp-lead-ne{border-left:4px solid #624691}
:where(html[data-theme="dark"]) .thm-btn{border:1px solid rgba(43,51,59,0.35)}
:where(html[data-theme="dark"]) .est-note{border:1px solid rgba(255,255,255,0.25)}
:where(html[data-theme="dark"]) .inv-tr .cplink{border:1px solid #334f6b}
:where(html[data-theme="dark"]) .inv-tr .cplink:active{background:#233f5c}
:where(html[data-theme="dark"]) .tk-lbx,:where(html[data-theme="dark"]) .tk-lbp,:where(html[data-theme="dark"]) .tk-lbn{background:rgba(27,32,37,0.18)}
@media (min-width:900px){
:where(html[data-theme="dark"]) .inv-split.has-pdf .pdfpane,:where(html[data-theme="dark"]) .inv-split.has-pdf.view-details .pdfpane{background:#2c3840}
:where(html[data-theme="dark"]) .tabs{background:var(--card)}
:where(html[data-theme="dark"]) .tabs a,:where(html[data-theme="dark"]) .tabs a.m{color:#c4d0d9}
:where(html[data-theme="dark"]) .tabs a:hover{background:#212d39}
:where(html[data-theme="dark"]) .tabs a.on{background:#472c1b}
}
/* --- clock/clock.css: 13 rules --- */
:where(html[data-theme="dark"]) .ck-tabs button{border:1px solid #425564;background:var(--card)}
:where(html[data-theme="dark"]) .ck-status{background:var(--card);border:1px solid #304352}
:where(html[data-theme="dark"]) .ck-status.on{border-color:#39774e}
:where(html[data-theme="dark"]) .cp-pick{border:1px solid rgba(255,255,255,0.25)}
:where(html[data-theme="dark"]) .cp-warn{background:#52471f;color:#faebbf;border:1px solid #918146}
:where(html[data-theme="dark"]) .cp-dirty{outline:2px solid #466291}
:where(html[data-theme="dark"]) .cp-low{background:#6f642a!important}
:where(html[data-theme="dark"]) .cp-low input,:where(html[data-theme="dark"]) .cp-low select{background:#49431c}
:where(html[data-theme="dark"]) .cp-doc{border:1px solid rgba(255,255,255,0.25);background:var(--card)}
:where(html[data-theme="dark"]) .cp-sh{border-bottom:1px solid rgba(255,255,255,0.24)}
:where(html[data-theme="dark"]) .ck-dist{color:#b0bbca;background:#1a2c3d}
:where(html[data-theme="dark"]) .ck-dist.near{color:#b3efca;background:#1e4f2f}
:where(html[data-theme="dark"]) .ck-far{border-left:4px solid #914646}
/* --- qbwc.js: 7 rules --- */
html[data-theme="dark"] .qw-pw{background:#52491f;border:1px dashed #f4dc74}
html[data-theme="dark"] .qw-ok{color:#a0ecb5}
html[data-theme="dark"] .qw-bad{color:#e26f6f}
html[data-theme="dark"] .qw-wait{color:#f6d694}
html[data-theme="dark"] .seg a.pub-err{color:#e26f6f}
html[data-theme="dark"] .rvbar{background:#17253d;border-bottom:1px solid #324467}
html[data-theme="dark"] .rvbar .lnk{color:#6689ea}
/* --- suppliers.js: 4 rules --- */
html[data-theme="dark"] .sx-c{background:#17203d;color:#8a85db}
html[data-theme="dark"] .sx-c.c-ex,html[data-theme="dark"] .sx-c.c-you{background:#1e4f2f;color:#b3efca}
html[data-theme="dark"] .sx-c.c-md{background:#635e26;color:#f4cb9b}
html[data-theme="dark"] .sx-why{background:#1e262d}
/* --- pdfview.js: 9 rules --- */
html[data-theme="dark"] .pv-line:hover{background:rgba(111,100,42,0.14)}
html[data-theme="dark"] .pv-line:focus-visible{outline:2px solid #465d91}
html[data-theme="dark"] .pv-line.pv-on{background:rgba(111,100,42,0.38)}
html[data-theme="dark"] .pv-msg{color:#a6acb3}
html[data-theme="dark"] .pv-spin{border:2px solid #455367;border-top-color:#465d91}
html[data-theme="dark"] .pv-err{color:#d98c8c}
html[data-theme="dark"] .pv-open{background:#2a406f}
html[data-theme="dark"] .pv-foot{color:#a3a8ae}
html[data-theme="dark"] .pv-foot a{color:#608df0}
/* --- hand-tuned (tools/dark-hand.css), last so it wins --- */
/* Hand-tuned dark theme pieces (merged into site/dark.css by tools/dark-gen.mjs, after the generated rules).
   The variables sit on html[data-theme="dark"]; the rules use :where(html[data-theme="dark"]) so they add no specificity
   and the light CSS's own more specific rules (.seg .on, .tabs a.on, ...) keep winning exactly as in light mode. */
html[data-theme="dark"]{color-scheme:dark;--bg:#0e1419;--card:#172028;--ink:#e2e8ed;--mut:#9cadba;--line:#2b3742;--pri:#2f6f9f;--acc:#e0803f;--red:#ff7b72;--redbg:#3b1d1f;--yel:#f2b84b;--yelbg:#3a2d10;--grn:#5cc985;--grnbg:#16301f;--blu:#79b3ec;--blubg:#15283b}
/* header stays a deep navy so the brand reads, not the lighter button blue */
:where(html[data-theme="dark"]) .top{background:#0b1a26;border-bottom:1px solid #1f2d39}
:where(html[data-theme="dark"]) .ln .code,:where(html[data-theme="dark"]) .pdftag{color:#8cc0ea}
:where(html[data-theme="dark"]) .li .li-ic .ic{stroke:#8cc0ea}
:where(html[data-theme="dark"]) input,:where(html[data-theme="dark"]) select,:where(html[data-theme="dark"]) textarea{color:var(--ink)}
:where(html[data-theme="dark"]) input::placeholder,:where(html[data-theme="dark"]) textarea::placeholder{color:#6f808d}
/* inputs without a type (datalist pickers in Settings) and the text-like types the light CSS leaves to the browser */
:where(html[data-theme="dark"]) input:not([type]),:where(html[data-theme="dark"]) input[type=email],:where(html[data-theme="dark"]) input[type=tel],:where(html[data-theme="dark"]) input[type=url],:where(html[data-theme="dark"]) input[type=time],:where(html[data-theme="dark"]) input[type=month]{background:var(--card);border:1px solid #425564;border-radius:6px}
/* charts drawn as inline SVG by app.js: grid lines, axis text, the navy series */
html[data-theme="dark"] svg [stroke="#e6ebef"]{stroke:#2b3742}
html[data-theme="dark"] svg [fill="#6b7883"]{fill:#9cadba}
html[data-theme="dark"] svg [stroke="#0f2a3d"]{stroke:#8cc0ea}
html[data-theme="dark"] svg [fill="#0f2a3d"]{fill:#8cc0ea}
/* map: dark tiles (inverted OpenStreetMap), markers keep their colours */
:where(html[data-theme="dark"]) .leaflet-container{background:#1b242c}
:where(html[data-theme="dark"]) .leaflet-tile-pane{filter:invert(1) hue-rotate(180deg) brightness(.9) contrast(.88) saturate(.7)}
html[data-theme="dark"] .leaflet-popup-content-wrapper,html[data-theme="dark"] .leaflet-popup-tip{background:#1d2731;color:var(--ink)}
html[data-theme="dark"] .leaflet-bar a{background:#1d2731;color:var(--ink);border-color:#34424e}
html[data-theme="dark"] .leaflet-control-attribution{background:rgba(23,32,40,.8)!important;color:#9cadba}
html[data-theme="dark"] .leaflet-control-attribution a{color:#7fb6e6}
/* PDF viewer: the pages are paper and stay white; only the chrome around them is dark */
html[data-theme="dark"] .pv-page{background:#fff}

}
