/* Day/Night-Mode — zentrale Farbvariablen. Dunkel = Default, hell via [data-bs-theme="light"].
   Muss NACH bootstrap.min.css geladen werden, damit die --bs-* Overrides greifen. */

:root, [data-bs-theme="dark"] {
    --bs-body-bg: #0f1117;
    --app-bg: #0f1117;
    --app-surface: #161822;          /* Sidebar, Cards, Tabellen */
    --sidebar-bg: var(--app-surface);
    --card-bg: var(--app-surface);
    --app-surface-2: #1d2030;        /* Sticky-Tabellenköpfe */
    --app-surface-3: #161b27;        /* Gruppenzeilen */
    --app-editor-bg: #0b0d13;        /* SQL-Editor */
    --app-text: #e6e8ef;
    --app-text-strong: #fff;
    --app-text-soft: #c9d1d9;        /* pre/JSON-Ausgaben */
    --app-text-mid: #ccc;
    --app-muted: #8b8fa3;
    --app-faint: #555;
    --app-faint-2: #6b6f7e;
    --app-border: rgba(255,255,255,.06);
    --app-border-strong: rgba(255,255,255,.1);
    --app-flash: rgba(255,255,255,.04);      /* dezente Flächen (pre, Zellen) */
    --app-flash-soft: rgba(255,255,255,.03);
    --app-ok: #2ea043;
    --app-err: #f85149;
    --app-warn: #d29922;
    --app-info: #58a6ff;
    /* Public-Statusseite */
    --pub-ok-text: #4cd87c;
    --pub-bad-text: #ff6e6e;
    --pub-tick-ok: #2bc55c;
    --pub-tick-failed: #e35b5b;
    --pub-tick-mixed: #d4a64a;
}

[data-bs-theme="light"] {
    --bs-body-bg: #eef0f4;
    --app-bg: #eef0f4;
    --app-surface: #ffffff;
    --app-surface-2: #e4e7ee;
    --app-surface-3: #f3f4f8;
    --app-editor-bg: #f6f8fa;
    --app-text: #1f2329;
    --app-text-strong: #111418;
    --app-text-soft: #343a44;
    --app-text-mid: #444;
    --app-muted: #5d6470;
    --app-faint: #9aa1ad;
    --app-faint-2: #7a8089;
    --app-border: rgba(15,20,30,.1);
    --app-border-strong: rgba(15,20,30,.18);
    --app-flash: rgba(15,20,30,.05);
    --app-flash-soft: rgba(15,20,30,.04);
    --app-ok: #1a7f37;
    --app-err: #cf222e;
    --app-warn: #9a6700;
    --app-info: #0969da;
    --pub-ok-text: #178a43;
    --pub-bad-text: #c5303c;
    --pub-tick-ok: #28a155;
    --pub-tick-failed: #d04545;
    --pub-tick-mixed: #b07f1e;
}
