/* GENERERAD av scripts/gen-dark.py – redigera inte för hand. Mörkt läge, gäller bara html[data-theme=dark]. */
/* ---- från public/app.css ---- */
:where(html[data-theme=dark]) button{background:#141416}
:where(html[data-theme=dark]) button:hover{background:#191a1b}
:where(html[data-theme=dark]) button.ghost:hover{background:#1d2127}
:where(html[data-theme=dark]) button.icon:hover{background:#1d2127}
:where(html[data-theme=dark]) input,:where(html[data-theme=dark]) select,:where(html[data-theme=dark]) textarea{background:#141416}
:where(html[data-theme=dark]) input:focus,:where(html[data-theme=dark]) select:focus,:where(html[data-theme=dark]) textarea:focus{outline:2px solid #162548}
:where(html[data-theme=dark]) kbd{background:#1a1a1a}
:where(html[data-theme=dark]) .login-card{background:#141416}
:where(html[data-theme=dark]) .top .search{background:#141416}
:where(html[data-theme=dark]) .banner{background:#30270e;color:#e6926b}
:where(html[data-theme=dark]) .tabs .cnt{background:#1d2127}
:where(html[data-theme=dark]) .seg{background:#1d2127}
:where(html[data-theme=dark]) .seg button.on{background:#141416}
:where(html[data-theme=dark]) .kpi{background:#141416}
:where(html[data-theme=dark]) .badge{background:#1b1e23;color:#c5c7cb}
:where(html[data-theme=dark]) .s-pagaende,:where(html[data-theme=dark]) .s-godkand,:where(html[data-theme=dark]) .s-klar,:where(html[data-theme=dark]) .s-betald,:where(html[data-theme=dark]) .s-attesterad,:where(html[data-theme=dark]) .s-vunnen,:where(html[data-theme=dark]) .s-aktiv,:where(html[data-theme=dark]) .s-ok{background:#112d1d;color:#7aedbd}
:where(html[data-theme=dark]) .s-planerad,:where(html[data-theme=dark]) .s-skickad,:where(html[data-theme=dark]) .s-begard,:where(html[data-theme=dark]) .s-ny,:where(html[data-theme=dark]) .s-utkast,:where(html[data-theme=dark]) .s-att_gora,:where(html[data-theme=dark]) .s-oppen{background:#0d1f2d;color:#487fdd}
:where(html[data-theme=dark]) .s-pausad,:where(html[data-theme=dark]) .s-attest1,:where(html[data-theme=dark]) .s-pagar,:where(html[data-theme=dark]) .s-risk,:where(html[data-theme=dark]) .s-fakturerad{background:#30270e;color:#ea8c56}
:where(html[data-theme=dark]) .s-avslutad,:where(html[data-theme=dark]) .s-forlorad{background:#1b1e23;color:#babdc0}
:where(html[data-theme=dark]) .s-avslagen,:where(html[data-theme=dark]) .s-avvisad,:where(html[data-theme=dark]) .s-forsenad,:where(html[data-theme=dark]) .s-ej_ok{background:#29110f;color:#dc645b}
:where(html[data-theme=dark]) th{background:#16191d}
:where(html[data-theme=dark]) tfoot td{background:#16191d}
:where(html[data-theme=dark]) table.list tbody tr:hover{background:#191a1b}
:where(html[data-theme=dark]) .grid td.edit input:focus,:where(html[data-theme=dark]) .grid td.edit select:focus{background:#141416}
:where(html[data-theme=dark]) .empty-state{background:#171719}
:where(html[data-theme=dark]) tr.warn td{background:#29200c}
:where(html[data-theme=dark]) tr.bad td{background:#270f0b}
:where(html[data-theme=dark]) .drawer{background:#141416}
:where(html[data-theme=dark]) .confirm{background:#141416}
:where(html[data-theme=dark]) .search-box{background:#141416}
:where(html[data-theme=dark]) .search-res li.sel a,:where(html[data-theme=dark]) .search-res li a:hover{background:#1b1e23}
:where(html[data-theme=dark]) .notifs li.unread{background:#0d1f2d}
:where(html[data-theme=dark]) .ai-btn{color:#6d45d3}
:where(html[data-theme=dark]) .ai-q{background:#0d192d}
:where(html[data-theme=dark]) .ai-a{background:#191a1b}
:where(html[data-theme=dark]) .pitem{background:#141416}
:where(html[data-theme=dark]) .pitem:hover{border-color:#202f57}
:where(html[data-theme=dark]) .warnlist li{background:#30270e}
:where(html[data-theme=dark]) .warnlist li.hog{background:#29110f}
:where(html[data-theme=dark]) .bar{background:#1d2127}
:where(html[data-theme=dark]) .chip.dev{background:#30270e;color:#ea8c56}
:where(html[data-theme=dark]) .chip.chk{background:#29110f;color:#dc645b}
:where(html[data-theme=dark]) .chip.std{background:#112d1d;color:#7aedbd}
:where(html[data-theme=dark]) .ftree{background:#141416}
:where(html[data-theme=dark]) .ftree a:hover{background:#1b1e23}
:where(html[data-theme=dark]) .ftree a.on{background:#0d192d}
:where(html[data-theme=dark]) .dropzone.over{background:#0d192d}
:where(html[data-theme=dark]) .preview{background:#1b1e23}
:where(html[data-theme=dark]) .res-btns button.on.ok{background:#112d1d;color:#7aedbd}
:where(html[data-theme=dark]) .res-btns button.on.ej_ok{background:#29110f;color:#dc645b}
:where(html[data-theme=dark]) .res-btns button.on.ea{background:#1b1e23}
:where(html[data-theme=dark]) canvas.sign{background:#141416}
:where(html[data-theme=dark]) .cal{background:#141416}
:where(html[data-theme=dark]) .cal .dh{background:#16191d}
:where(html[data-theme=dark]) .cal .d:hover{background:#171719}
:where(html[data-theme=dark]) .cal .d.out{background:#16191d}
:where(html[data-theme=dark]) .ev{background:#0d192d;color:#618bdc}
:where(html[data-theme=dark]) .ev.t-besiktning{background:#281122;color:#df53a0}
:where(html[data-theme=dark]) .ev.t-deadline{background:#30270e;color:#ea8c56}
:where(html[data-theme=dark]) .ev.t-outlook{background:#0d202c;color:#5fbdf0}
:where(html[data-theme=dark]) .ev.t-upptagen{background:#1b1e23;color:#babdc0}
:where(html[data-theme=dark]) .mlist{background:#141416}
:where(html[data-theme=dark]) .mlist a:hover{background:#191a1b}
:where(html[data-theme=dark]) .mlist a.on{background:#0d192d}
:where(html[data-theme=dark]) .mbody{background:#171719}
:where(html[data-theme=dark]) .avatar{background:#101d37;color:#618bdc}
:where(html[data-theme=dark]) .mention{background:#0d192d;color:#618bdc}
:where(html[data-theme=dark]) .mention-pop{background:#141416}
:where(html[data-theme=dark]) .mention-pop div:hover,:where(html[data-theme=dark]) .mention-pop div.sel{background:#1b1e23}
:where(html[data-theme=dark]) a.btn{background:#141416}
:where(html[data-theme=dark]) a.btn:hover{background:#1d2127}
:where(html[data-theme=dark]) input.plain:focus{background:#141416}
:where(html[data-theme=dark]) .kc-item.bad{background:#25100b}
:where(html[data-theme=dark]) table.clickable tbody tr:hover{background:#191a1b}
:where(html[data-theme=dark]) .newmenu .pop{background:#141416}
:where(html[data-theme=dark]) .newmenu .pop button:hover{background:#1b1e23}
:where(html[data-theme=dark]) .tag{background:#1b1e23;color:#c5c7cb}
:where(html[data-theme=dark]) table.calc tr.grp td{background:#16191d}
:where(html[data-theme=dark]) table.calc td input:focus{background:#141416}
:where(html[data-theme=dark]) tr.late td{background:#2e1e0d}
:where(html[data-theme=dark]) .logo-previews .lp-light{background:#141416}
/* ---- från public/bvgantt.css ---- */
:where(html[data-theme=dark]) .bvg .gantt{background:#141416;border:1px solid #222831}
:where(html[data-theme=dark]) .bvg .g-row{border-bottom:1px solid #1d2128}
:where(html[data-theme=dark]) .bvg .g-track{background:repeating-linear-gradient(90deg,#141416,#141416 39px,#1a2027 40px)}
:where(html[data-theme=dark]) .bvg .g-row{border-bottom:1px solid var(--line,#2a2a2b)}
:where(html[data-theme=dark]) .bvg .g-name{background:var(--panel,#141416)}
:where(html[data-theme=dark]) .bvg .gantt-shell{border:1px solid var(--line,#262c33);background:var(--panel,#141416)}
:where(html[data-theme=dark]) .bvg .gantt-head{border-bottom:1px solid var(--line,#262c33)}
:where(html[data-theme=dark]) .bvg .gantt-corner{background:var(--panel,#141416)}
:where(html[data-theme=dark]) .bvg .gantt-corner small{color:var(--muted,#a8abaf)}
:where(html[data-theme=dark]) .bvg .gantt-head-scroll{background:var(--panel,#141416)}
:where(html[data-theme=dark]) .bvg .tl-month,:where(html[data-theme=dark]) .bvg .tl-week,:where(html[data-theme=dark]) .bvg .tl-day{border-right:1px solid var(--line,#262c33);border-bottom:1px solid var(--line,#262c33)}
:where(html[data-theme=dark]) .bvg .tl-day small{color:var(--muted,#a8abaf)}
:where(html[data-theme=dark]) .bvg .gantt-names{background:var(--panel,#141416)}
:where(html[data-theme=dark]) .bvg .g-name,:where(html[data-theme=dark]) .bvg .g-track{border-bottom:1px solid var(--line,#2a2a2b)}
:where(html[data-theme=dark]) .bvg .g-name{background:var(--panel,#141416)}
:where(html[data-theme=dark]) .bvg .g-meta{color:var(--muted,#a8abaf)}
:where(html[data-theme=dark]) .bvg .g-name a.g-meta.g-empty-hint{color:#a8abaf}
@media(min-width:761px){:where(html[data-theme=dark]) .bvg #ganttWrap .g-corner-cols>div{border-left:1px solid var(--line,#2a2a2b);color:#babcc0}
:where(html[data-theme=dark]) .bvg #ganttWrap .g-name{background:var(--panel,#141416)}
:where(html[data-theme=dark]) .bvg #ganttWrap .g-name.activity-row{background:#141a20}
:where(html[data-theme=dark]) .bvg #ganttWrap .g-col{border-left:1px solid var(--line,#2a2a2b);color:#c4c7cb}
:where(html[data-theme=dark]) .bvg #ganttWrap .g-link-btn{color:#a8abaf}
:where(html[data-theme=dark]) .bvg #ganttWrap .g-link-btn:hover,:where(html[data-theme=dark]) .bvg #ganttWrap .g-link-btn.is-linked{background:#0e1c32;color:#3d7fe0}
}@media(min-width:761px){:where(html[data-theme=dark]) .bvg #ganttWrap .g-col-edit:hover{background:#0e1c32}
:where(html[data-theme=dark]) .bvg #ganttWrap .g-col-input{background:#141416}
:where(html[data-theme=dark]) .bvg #ganttWrap .g-col-input.g-col-bad{background:#290f0f}
}:where(html[data-theme=dark]) .bvg #ganttWrap .tl-day{border-right:1px solid var(--line,#262c33);border-bottom:1px solid var(--line,#262c33)}
:where(html[data-theme=dark]) .bvg #ganttWrap .tl-day b{color:#b0bedd}
:where(html[data-theme=dark]) .bvg #ganttWrap .tl-day small{color:#c4c7cb}
:where(html[data-theme=dark]) .bvg #ganttWrap .tl-day.is-red b,:where(html[data-theme=dark]) .bvg #ganttWrap .tl-day.is-red small{color:#d96b6b}
:where(html[data-theme=dark]) .bvg #ganttWrap .g-name.activity-row.is-selected{background:#0e1c32}
:where(html[data-theme=dark]) .bvg #ganttWrap .g-wo{border:1px solid #323a43;background:#141a20;color:#c4c7cb}
:where(html[data-theme=dark]) .bvg #ganttWrap .g-corner-cols>div{border-left:1px solid var(--line,#2a2a2b);color:#babcc0}
:where(html[data-theme=dark]) .bvg #ganttWrap .g-name{
  background:var(--panel,#141416)}
:where(html[data-theme=dark]) .bvg #ganttWrap .g-name.activity-row{background:#141a20}
:where(html[data-theme=dark]) .bvg #ganttWrap .g-col{border-left:1px solid var(--line,#2a2a2b);color:#c4c7cb}
:where(html[data-theme=dark]) .bvg #ganttWrap .g-link-btn{color:#a8abaf}
:where(html[data-theme=dark]) .bvg #ganttWrap .g-link-btn:hover,:where(html[data-theme=dark]) .bvg #ganttWrap .g-link-btn.is-linked{background:#0e1c32;color:#3d7fe0}
:where(html[data-theme=dark]) .bvg #ganttWrap .g-col-edit:hover{background:#0e1c32}
:where(html[data-theme=dark]) .bvg #ganttWrap .g-col-input{
  background:#141416}
:where(html[data-theme=dark]) .bvg .g-deltid .g-act-name{color:#ea8c56}
:where(html[data-theme=dark]) .bvg .g-col-edit:hover{background:#181f25}
:where(html[data-theme=dark]) .bvg .g-col-bad{background:#29110f}
/* ---- handskrivet (scripts/dark-manual.css) ---- */
html[data-theme=dark]{--bg:#0b0b0c;--card:#141416;--ink:#e7e7ea;--muted:#a1a1aa;--line:#2a2a2e;--line2:#1f1f22;--brand:#5b8cff;--brand-ink:#fff;--side:#000;--ok:#3ccb8f;--warn:#f5a524;--bad:#f97066;--info:#6aa6ff;--sh:0 1px 2px rgba(0,0,0,.5);color-scheme:dark}
html[data-theme=dark] body{background:var(--bg);color:var(--ink)}
html[data-theme=dark] button.primary{background:#2f6bff;border-color:#2f6bff;color:#fff}html[data-theme=dark] button.primary:hover{background:#4a7fff}
html[data-theme=dark] input,html[data-theme=dark] select,html[data-theme=dark] textarea{background:#0f0f11;border-color:#2e2e33;color:var(--ink)}
html[data-theme=dark] input::placeholder,html[data-theme=dark] textarea::placeholder{color:#6b6b73}
html[data-theme=dark] input:focus,html[data-theme=dark] select:focus,html[data-theme=dark] textarea:focus{outline-color:#2b4fae;border-color:#5b8cff}
html[data-theme=dark] input[type=date]::-webkit-calendar-picker-indicator{filter:invert(.85)}
/* Sidomeny och inloggning – svart */
html[data-theme=dark] .side{background:#000;color:#d4d4d8;border-right:1px solid #1c1c1f}
html[data-theme=dark] .side nav a,html[data-theme=dark] .side-foot a{color:#d4d4d8}
html[data-theme=dark] .side nav a:hover,html[data-theme=dark] .side-foot a:hover{background:#18181b;color:#fff}
html[data-theme=dark] .side nav a.active,html[data-theme=dark] .side-foot a.active{background:#232327;color:#fff;box-shadow:inset 3px 0 0 #c9a54a}
html[data-theme=dark] .side-foot{border-top-color:#232326}html[data-theme=dark] .side-foot button{color:#a1a1aa}
html[data-theme=dark] .login{background:radial-gradient(120% 90% at 50% 0%,#1a1a1c 0%,#0b0b0c 55%,#000 100%)}
html[data-theme=dark] .login-card{background:#141416;box-shadow:0 20px 60px rgba(0,0,0,.7);border:1px solid #232327}
html[data-theme=dark] header.top{background:rgba(11,11,12,.92);border-bottom-color:#1f1f22}
html[data-theme=dark] .drawer{background:#141416;box-shadow:-20px 0 60px rgba(0,0,0,.6)}html[data-theme=dark] .drawer-back{background:rgba(0,0,0,.6)}
html[data-theme=dark] .toast{background:#26262a;color:#fff;border:1px solid #34343a}
html[data-theme=dark] details.more summary{color:var(--muted)}
/* Tabeller */
html[data-theme=dark] table.grid th{background:#1a1a1d;color:#c4c4cc}
html[data-theme=dark] table.grid td,html[data-theme=dark] table.grid th{border-color:#26262a}
html[data-theme=dark] table.grid.clickable tbody tr:hover td,html[data-theme=dark] table.clickable tbody tr:hover td{background:#1c1c20}
/* Status-badges – mörka toner med ljus text */
html[data-theme=dark] .badge{filter:none}
/* Gantt (Byggvy-porten) */
html[data-theme=dark] .bvg{--panel:#141416;--line:#2a2a2e}
html[data-theme=dark] .bvg .gantt-shell,html[data-theme=dark] .bvg .gantt-head,html[data-theme=dark] .bvg .gantt-corner,html[data-theme=dark] .bvg .gantt-names,html[data-theme=dark] .bvg .g-name{background:#141416;color:var(--ink);border-color:#2a2a2e}
html[data-theme=dark] .bvg .g-track{background-color:#111113;border-color:#222226}
html[data-theme=dark] .bvg .gantt-daycol{border-color:#1f1f23}
html[data-theme=dark] .bvg .gantt-daycol.is-red,html[data-theme=dark] .bvg .gantt-daycol.is-weekend{background:rgba(249,112,102,.09)}
html[data-theme=dark] .bvg .gantt-daycol.is-holiday{background:rgba(249,112,102,.16)}
html[data-theme=dark] .bvg .tl-day.is-red,html[data-theme=dark] .bvg .tl-day.is-red b,html[data-theme=dark] .bvg .tl-day.is-red small{color:#f97066}
html[data-theme=dark] .bvg .tl-day.is-red{background:rgba(249,112,102,.1)}
html[data-theme=dark] .bvg .timeline-head,html[data-theme=dark] .bvg .tl-month,html[data-theme=dark] .bvg .tl-week,html[data-theme=dark] .bvg .tl-day{background-color:#141416;color:#c4c4cc;border-color:#26262a}
html[data-theme=dark] .bvg .g-corner-cols>div,html[data-theme=dark] .bvg .g-col{border-color:#26262a;color:#c4c4cc}
html[data-theme=dark] .bvg .g-col-edit:hover{background:#1f1f23}
html[data-theme=dark] .bvg .g-col-input{background:#0f0f11;color:var(--ink)}
html[data-theme=dark] .bvg .today-line{background:#ff5a4f;box-shadow:0 0 0 1px rgba(255,90,79,.25)}
html[data-theme=dark] .bvg .g-bar.g-owner{background:#3a3a42}
html[data-theme=dark] .bvg .g-bar.act{background:#55657d}
html[data-theme=dark] .bvg .g-link-line{stroke:#7aa2ff}html[data-theme=dark] .bvg #gArrow path{fill:#7aa2ff}
html[data-theme=dark] .bvg .g-deltid .g-act-name{color:#f5a524}
html[data-theme=dark] .bvg .g-add{background:#141416;color:#7aa2ff;border-color:#3b3b42}
html[data-theme=dark] .bvg .gantt-toolbar .is-on,html[data-theme=dark] .bvg .gantt-zoom .is-active{background:#e7e7ea;color:#0b0b0c;border-color:#e7e7ea}
html[data-theme=dark] .bvg .activity-row:hover,html[data-theme=dark] .bvg .g-name:hover{background:#18181b}
/* Logotyp: transparent variant byts automatiskt per tema (se .logo-swap) */
html[data-theme=dark] .logo-on-light{display:none!important}html[data-theme=dark] .logo-on-dark{display:block!important}
html[data-theme=dark] .seg{background:#1a1a1d}html[data-theme=dark] .seg button.on{background:#2e2e34;color:#fff;box-shadow:0 1px 2px rgba(0,0,0,.6)}
