/* ==========================================================================
   abante Vertragsmanagement – Stylesheet
   ========================================================================== */

:root {
  color-scheme: light;
  --surface-1: #fcfcfb;
  --surface-2: #ffffff;
  --page: #f4f4f1;
  --text-primary: #0b0b0b;
  --text-secondary: #52514e;
  --text-muted: #898781;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --border: rgba(11, 11, 11, 0.10);
  --border-strong: rgba(11, 11, 11, 0.18);

  /* Kategoriale Serienfarben (validiert, Reihenfolge fest) */
  --series-1: #006cad;  /* abante-Blau – Ausgaben / Belastungen */
  --series-2: #eb6834;  /* orange – Einnahmen / Umsätze   */
  --series-3: #1baf7a;  /* aqua                            */
  --series-4: #eda100;  /* gelb                            */

  /* Statusfarben (reserviert) */
  --good: #0ca30c;
  --warning: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b;
  --good-text: #006300;

  --accent: #006cad;        /* Hausfarbe abante */
  --accent-ink: #ffffff;
  --brand: #006cad;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(11, 11, 11, .05), 0 8px 24px -16px rgba(11, 11, 11, .18);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --surface-1: #1a1a19;
    --surface-2: #222221;
    --page: #0d0d0d;
    --text-primary: #ffffff;
    --text-secondary: #c3c2b7;
    --text-muted: #898781;
    --grid: #2c2c2a;
    --axis: #383835;
    --border: rgba(255, 255, 255, 0.10);
    --border-strong: rgba(255, 255, 255, 0.20);
    --series-1: #1c8ecf;
    --series-2: #d95926;
    --series-3: #199e70;
    --series-4: #c98500;
    --good-text: #0ca30c;
    --accent: #a8d4ef;
    --accent-ink: #06283c;
    --brand: #1c8ecf;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -16px rgba(0, 0, 0, .8);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --surface-1: #1a1a19;
  --surface-2: #222221;
  --page: #0d0d0d;
  --text-primary: #ffffff;
  --text-secondary: #c3c2b7;
  --text-muted: #898781;
  --grid: #2c2c2a;
  --axis: #383835;
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.20);
  --series-1: #1c8ecf;
  --series-2: #d95926;
  --series-3: #199e70;
  --series-4: #c98500;
  --good-text: #0ca30c;
  --accent: #a8d4ef;
  --accent-ink: #06283c;
  --brand: #1c8ecf;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -16px rgba(0, 0, 0, .8);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--series-1); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ------------------------------------------------------------------ Layout */
.app {
  display: flex;
  min-height: 100vh;
  background-image: linear-gradient(90deg,
    var(--surface-1) 0, var(--surface-1) 232px,
    var(--border) 232px, var(--border) 233px,
    var(--page) 233px);
}

.sidebar {
  width: 232px;
  flex: 0 0 232px;
  background: var(--surface-1);
  border-right: 1px solid var(--border);
  padding: 18px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand { padding: 2px 6px 20px; }
.brand a { display: block; }
.brand img { width: 100%; max-width: 178px; height: auto; display: block; }
.brand .claim { font-size: 11px; color: var(--text-muted); letter-spacing: .04em;
  margin: 7px 0 0 2px; text-transform: uppercase; font-weight: 600; }

/* Logo nur im Ausdruck (Seitenleiste wird dort ausgeblendet) */
.print-brand { display: none; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: 14px; font-weight: 500;
}
.nav a:hover { background: var(--page); text-decoration: none; color: var(--text-primary); }
.nav a.active { background: var(--accent); color: var(--accent-ink); }
.nav a .ico { width: 18px; text-align: center; opacity: .85; font-size: 15px; }
.nav a .badge-n {
  margin-left: auto; font-size: 11px; font-weight: 700;
  background: var(--critical); color: #fff; border-radius: 20px; padding: 1px 7px;
}
.nav-sep { margin: 14px 10px 6px; font-size: 11px; text-transform: uppercase;
  letter-spacing: .07em; color: var(--text-muted); font-weight: 600; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 26px; background: var(--surface-1);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 19px; margin: 0; font-weight: 650; letter-spacing: -.2px; }
.topbar .spacer { flex: 1; }
.userchip { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
}

.content { padding: 22px 26px 60px; max-width: 1400px; }

/* ------------------------------------------------------------------- Cards */
.card {
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 18px;
}
.card > h2, .card > h3 { margin: 0 0 4px; font-size: 15px; font-weight: 650; }
.card .sub { color: var(--text-muted); font-size: 12.5px; margin-bottom: 14px; }
.card-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.card-head .spacer { flex: 1; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }

/* ------------------------------------------------------------- Stat-Kacheln */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.tile {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow);
}
.tile .label { font-size: 12px; color: var(--text-muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em; }
.tile .value { font-size: 25px; font-weight: 660; letter-spacing: -.6px; margin-top: 5px; }
.tile .value.sm { font-size: 20px; }
.tile .meta { font-size: 12.5px; color: var(--text-secondary); margin-top: 3px; }
.tile.accent-1 { border-left: 3px solid var(--series-1); }
.tile.accent-2 { border-left: 3px solid var(--series-2); }
.tile.accent-crit { border-left: 3px solid var(--critical); }
.tile.accent-warn { border-left: 3px solid var(--warning); }
.tile.accent-good { border-left: 3px solid var(--good); }
.pos { color: var(--good-text); }
.neg { color: var(--critical); }

/* ----------------------------------------------------------------- Tabellen */
.table-wrap { overflow-x: auto; margin: 0 -20px -18px; padding: 0 20px 4px; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-muted); font-weight: 650; padding: 8px 8px;
  border-bottom: 1px solid var(--axis); white-space: nowrap;
}
table.data th a { color: inherit; }
table.data td { padding: 9px 8px; border-bottom: 1px solid var(--grid); vertical-align: top; }
table.data tbody tr:hover { background: var(--page); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data .t-main { font-weight: 600; }
table.data .t-sub { color: var(--text-muted); font-size: 12px; }
table.data tfoot td { font-weight: 700; border-top: 2px solid var(--axis); border-bottom: none; }

/* -------------------------------------------------------------------- Badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 650;
  padding: 2px 8px; border-radius: 20px; border: 1px solid var(--border-strong);
  color: var(--text-secondary); white-space: nowrap;
}
.badge .ic { font-size: 11px; }
.badge.lvl-critical { color: #fff; background: var(--critical); border-color: transparent; }
.badge.lvl-serious  { color: #3d2113; background: var(--serious); border-color: transparent; }
.badge.lvl-warning  { color: #3d2f04; background: var(--warning); border-color: transparent; }
.badge.lvl-good     { color: var(--good-text); border-color: color-mix(in srgb, var(--good) 45%, transparent); }
.badge.lvl-neutral  { color: var(--text-muted); }
.badge.dir-expense  { color: var(--series-1); border-color: color-mix(in srgb, var(--series-1) 40%, transparent); }
.badge.dir-revenue  { color: var(--series-2); border-color: color-mix(in srgb, var(--series-2) 45%, transparent); }
.badge.risk-hoch    { color: #fff; background: var(--critical); border-color: transparent; }
.badge.risk-mittel  { color: #3d2f04; background: var(--warning); border-color: transparent; }
.badge.risk-niedrig { color: var(--text-secondary); }

/* -------------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: 13.5px; font-weight: 600;
  padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text-primary); cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--page); text-decoration: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.primary:hover { filter: brightness(1.12); }
.btn.danger { color: var(--critical); border-color: color-mix(in srgb, var(--critical) 40%, transparent); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ------------------------------------------------------------------ Formulare */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px 16px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field label { font-size: 12px; font-weight: 650; color: var(--text-secondary); }
.field .hint { font-size: 11.5px; color: var(--text-muted); }
input[type=text], input[type=number], input[type=date], input[type=email], input[type=password],
input[type=file], select, textarea {
  font: inherit; font-size: 14px; padding: 8px 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text-primary);
  width: 100%; min-width: 0;
}
textarea { min-height: 74px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--series-1); outline-offset: 1px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.check input { width: 16px; height: 16px; }
fieldset { border: none; padding: 0; margin: 0 0 22px; }
fieldset > legend { font-size: 13px; font-weight: 700; padding: 0 0 10px;
  color: var(--text-primary); text-transform: uppercase; letter-spacing: .05em; }

.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.filters .field { min-width: 140px; }
.filters .field.grow { flex: 1; min-width: 220px; }

/* --------------------------------------------------------------------- Flash */
.flash { padding: 11px 14px; border-radius: var(--radius-sm); margin-bottom: 14px; font-size: 14px;
  border: 1px solid var(--border-strong); background: var(--surface-1); }
.flash.ok    { border-left: 3px solid var(--good); }
.flash.error { border-left: 3px solid var(--critical); }
.flash.warn  { border-left: 3px solid var(--warning); }
.flash.info  { border-left: 3px solid var(--series-1); }

/* -------------------------------------------------------------------- Charts */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--grid); stroke-width: 1; }
.chart .axis { stroke: var(--axis); stroke-width: 1; }
.chart .tick { fill: var(--text-muted); font-size: 11px; font-family: var(--font);
  font-variant-numeric: tabular-nums; }
.chart .rowlabel { fill: var(--text-secondary); font-size: 12.5px; font-family: var(--font); }
.chart .rowvalue { fill: var(--text-primary); font-size: 12.5px; font-weight: 600;
  font-family: var(--font); font-variant-numeric: tabular-nums; }
.chart .bar { stroke: var(--surface-1); stroke-width: 1; }
.chart .bar.s1 { fill: var(--series-1); }
.chart .bar.s2 { fill: var(--series-2); }
.chart .bar.s3 { fill: var(--series-3); }
.chart .bar:hover { filter: brightness(1.1); }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.s1 { stroke: var(--series-1); }
.chart .line.s2 { stroke: var(--series-2); }
.chart .line.s3 { stroke: var(--series-3); }
.chart .line.s4 { stroke: var(--series-4); }
.chart .area { stroke: none; opacity: .12; }
.chart .area.s1 { fill: var(--series-1); }
.chart .area.s2 { fill: var(--series-2); }
.chart .pt { stroke: var(--surface-1); stroke-width: 2; }
.chart .pt.s1 { fill: var(--series-1); }
.chart .pt.s2 { fill: var(--series-2); }
.chart .pt.s3 { fill: var(--series-3); }
.chart .pt.s4 { fill: var(--series-4); }
.chart .pt:hover, .chart .pt:focus { r: 6; outline: none; }
.chart .ptlabel { font-size: 11.5px; font-weight: 650; font-family: var(--font);
  fill: var(--text-primary); font-variant-numeric: tabular-nums; }
.chart .dot { stroke: var(--surface-1); stroke-width: 2; }
.chart .dot.lvl-critical { fill: var(--critical); }
.chart .dot.lvl-serious  { fill: var(--serious); }
.chart .dot.lvl-warning  { fill: var(--warning); }
.chart .dot.lvl-good     { fill: var(--good); }

.legend { display: flex; flex-wrap: wrap; gap: 16px; margin: 4px 0 10px; font-size: 12.5px;
  color: var(--text-secondary); }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.swatch.s1 { background: var(--series-1); }
.swatch.s2 { background: var(--series-2); }
.swatch.s3 { background: var(--series-3); }
.swatch.s4 { background: var(--series-4); }

#tooltip {
  position: fixed; z-index: 90; pointer-events: none; opacity: 0; transition: opacity .1s;
  background: var(--text-primary); color: var(--surface-1); font-size: 12.5px; font-weight: 500;
  padding: 5px 9px; border-radius: var(--radius-sm); max-width: 280px; box-shadow: var(--shadow);
}
#tooltip.on { opacity: 1; }

details.tableview { margin-top: 10px; }
details.tableview > summary { cursor: pointer; font-size: 12.5px; color: var(--text-muted); }
details.tableview table.data { margin-top: 8px; }

/* ---------------------------------------------------------------- Detailseite */
.dl { display: grid; grid-template-columns: minmax(140px, 200px) 1fr; gap: 7px 18px; font-size: 14px; }
.dl dt { color: var(--text-muted); font-size: 12.5px; }
.dl dd { margin: 0; font-weight: 500; }
.timeline-list { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.timeline-list li { padding: 8px 0 8px 14px; border-left: 2px solid var(--grid); position: relative; }
.timeline-list li::before { content: ""; position: absolute; left: -5px; top: 14px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--axis); }
.timeline-list .when { color: var(--text-muted); font-size: 12px; }

.progress { height: 6px; border-radius: 4px; background: var(--grid); overflow: hidden; margin-top: 6px; }
.progress > i { display: block; height: 100%; background: var(--series-1); }

/* --------------------------------------------------------- PDF-Vorschau */
.pdfbox { border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden;
  background: var(--surface-2); }
.pdfbox-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 13px; }
.pdfbox-head .spacer { flex: 1; }
.pdfframe { width: 100%; height: 620px; border: 0; display: block; background: var(--page); }
.uploadbox { border: 1px dashed var(--border-strong); border-radius: var(--radius);
  padding: 14px 16px; background: var(--surface-2); }

/* -------------------------------------------------------------------- Login */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--page); }
.login-box { width: 100%; max-width: 430px; background: var(--surface-1); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow); padding: 34px 32px; }
.login-logo { width: 100%; max-width: 258px; height: auto; margin: 0 auto 26px; }
.login-box h1 { font-size: 19px; margin: 0 0 4px; }
.login-box p.sub { color: var(--text-muted); font-size: 13.5px; margin: 0 0 24px; }
.ms-btn {
  display: flex; align-items: center; justify-content: center; gap: 11px; width: 100%;
  padding: 12px 16px; font-size: 15px; font-weight: 600; border-radius: var(--radius-sm);
  background: #2f2f2f; color: #fff; border: 1px solid #1f1f1f; cursor: pointer; text-decoration: none;
}
.ms-btn:hover { background: #444; text-decoration: none; }
.ms-logo { width: 19px; height: 19px; flex: 0 0 19px; }
.login-foot { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--grid);
  font-size: 12.5px; color: var(--text-muted); }

/* ------------------------------------------------------------------- Sonstiges */
.setup-logo { width: 210px; height: auto; margin-bottom: 20px; }
.empty { text-align: center; padding: 40px 20px; color: var(--text-muted); font-size: 14px; }
.empty .big { font-size: 30px; margin-bottom: 8px; }
.kbd { font-family: ui-monospace, monospace; font-size: 12px; background: var(--page);
  border: 1px solid var(--border-strong); border-radius: 4px; padding: 1px 5px; }
code { font-family: ui-monospace, monospace; font-size: 12.5px; background: var(--page);
  padding: 1px 5px; border-radius: 4px; }
.mono { font-family: ui-monospace, monospace; font-size: 12.5px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.muted { color: var(--text-muted); }
.small { font-size: 12.5px; }
.mt { margin-top: 16px; }
.pill-toggle { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 20px; overflow: hidden; }
.pill-toggle a { padding: 4px 12px; font-size: 12.5px; font-weight: 600; color: var(--text-secondary); }
.pill-toggle a.on { background: var(--accent); color: var(--accent-ink); }
.pill-toggle a:hover { text-decoration: none; }

/* ===========================================================================
   Bereichsauswahl beim Anlegen
   =========================================================================== */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px; margin-top: 6px; }
.choice { display: block; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface-2); text-decoration: none; color: inherit; transition: border-color .12s, transform .12s; }
.choice:hover { border-color: var(--accent); transform: translateY(-1px); }
.choice-ico { font-size: 26px; line-height: 1; margin-bottom: 8px; }
.choice-t { font-weight: 650; font-size: 15px; margin-bottom: 4px; color: var(--text-primary); }
.choice-s { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }

/* ===========================================================================
   Dokumentenbrowser
   =========================================================================== */
.browser { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; align-items: start; }
.fbrowse-tree { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  background: var(--surface-2); }
.fnode { display: flex; align-items: center; gap: 8px; padding: 9px 10px; text-decoration: none;
  color: var(--text-primary); font-size: 13px; border-bottom: 1px solid var(--grid); }
.fnode:last-child { border-bottom: none; }
.fnode:hover { background: var(--surface-1); }
.fnode.on { background: var(--accent); color: var(--accent-ink); }
.fnode .fico { flex: none; width: 16px; text-align: center; font-size: 12px; }
.fnode .fname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fnode .fcount { flex: none; font-size: 11px; padding: 1px 6px; border-radius: 9px;
  background: var(--grid); color: var(--text-muted); }
.fnode.on .fcount { background: rgba(255,255,255,.28); color: var(--accent-ink); }
.fbrowse-files { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2);
  padding: 12px 14px; min-width: 0; }
.fbrowse-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px;
  border-bottom: 1px solid var(--grid); margin-bottom: 8px; }
.ftype { display: inline-block; min-width: 34px; text-align: center; font-size: 9.5px; font-weight: 700;
  letter-spacing: .04em; padding: 2px 4px; margin-right: 7px; border-radius: 4px;
  background: var(--grid); color: var(--text-muted); vertical-align: 1px; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; }
.inline-form select { font-size: 12px; padding: 3px 6px; max-width: 170px; }

@media (max-width: 900px) {
  .app { flex-direction: column; background-image: none; }
  .sidebar { width: 100%; flex: none; height: auto; position: static; border-right: none;
    border-bottom: 1px solid var(--border); }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .content { padding: 16px 14px 50px; }
  .topbar { padding: 12px 14px; }
  .table-wrap { margin: 0 -20px; padding: 0 20px; }
}

@media print {
  .sidebar, .topbar, .btn, .filters, .pill-toggle, .pdfframe, .uploadbox { display: none !important; }
  .app { background-image: none !important; display: block; }
  .main, .content { padding: 0 !important; max-width: none; }
  .print-brand { display: block !important; margin: 0 0 18px; }
  .print-brand img { width: 168px !important; height: auto; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; margin-bottom: 12px; }
  a { color: #000; text-decoration: none; }
  table.data { font-size: 9pt; }
}


@media (max-width: 900px) {
  .browser { grid-template-columns: 1fr; }
  .fbrowse-tree { display: flex; flex-wrap: wrap; }
  .fnode { border-bottom: none; border-right: 1px solid var(--grid); }
}

/* ===========================================================================
   Logo-Variante nach Farbschema
   Bewusst am Ende der Datei und mit dem Selektor "img.logo-…", damit diese
   Regeln alle vorherigen display-Angaben (.brand img, .login-logo, …) sicher
   überschreiben.
   =========================================================================== */
img.logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) img.logo-light { display: none; }
  :root:where(:not([data-theme="light"])) img.logo-dark  { display: block; }
}
:root[data-theme="dark"] img.logo-light { display: none; }
:root[data-theme="dark"] img.logo-dark  { display: block; }

@media print {
  img.logo-dark  { display: none !important; }
  img.logo-light { display: block !important; }
}
