/**
 * Smartcore Dark-Theme – System-weite Overrides fuer alle Smartcore-Module.
 *
 * Wird nur aktiv, wenn <html data-scp-theme="dark"> gesetzt ist. Das Attribut
 * setzt PlatformLayoutElement (Theme-Toggle) oder das Early-Head-Script.
 *
 * Light-Mode bleibt unberuehrt – alle Regeln hier sind Dark-only Overrides.
 */

/* ============================================================
 * 1. Root-Hintergrund & generischer Body
 * ============================================================ */
html[data-scp-theme="dark"] {
    color-scheme: dark;
}
html[data-scp-theme="dark"] body {
    background-color: #0b1220;
    color: #e5e7eb;
}

/* ============================================================
 * 2. Smartcore Referrals (.scr-*)
 * ============================================================ */
html[data-scp-theme="dark"] .scr-ref-dash,
html[data-scp-theme="dark"] .scr-campaign-content,
html[data-scp-theme="dark"] .scr-ref-dash .scr-form-section,
html[data-scp-theme="dark"] .scr-ref-dash .scr-basics-card,
html[data-scp-theme="dark"] .scr-ref-dash .scr-flow-card,
html[data-scp-theme="dark"] .scr-ref-dash .scr-flow-preview,
html[data-scp-theme="dark"] .scr-ref-dash .scr-field-row,
html[data-scp-theme="dark"] .scr-ref-dash .scr-tabs,
html[data-scp-theme="dark"] .scr-ref-dash .scr-activity,
html[data-scp-theme="dark"] .scr-ref-dash .scr-preview-card {
    background-color: #111827;
    color: #e5e7eb;
    border-color: #1f2937;
}
html[data-scp-theme="dark"] .scr-ref-dash .scr-basics-card__head {
    background: linear-gradient(180deg, #1e293b, #111827);
    border-color: #1f2937;
}
html[data-scp-theme="dark"] .scr-ref-dash .scr-basics-card__title,
html[data-scp-theme="dark"] .scr-ref-dash h2,
html[data-scp-theme="dark"] .scr-ref-dash h3,
html[data-scp-theme="dark"] .scr-ref-dash h4 {
    color: #f1f5f9;
}
html[data-scp-theme="dark"] .scr-ref-dash .scr-basics-card__sub,
html[data-scp-theme="dark"] .scr-ref-dash .scr-field-hint,
html[data-scp-theme="dark"] .scr-ref-dash .scr-flow-card__footer,
html[data-scp-theme="dark"] .scr-ref-dash .scr-flow-preview__empty {
    color: #94a3b8;
}
html[data-scp-theme="dark"] .scr-ref-dash .scr-flow-card__head {
    background: linear-gradient(180deg, #1e3a8a, #111827);
    border-color: #1f2937;
}
html[data-scp-theme="dark"] .scr-ref-dash .scr-flow-card__divider {
    color: #64748b;
    border-color: #334155;
}
html[data-scp-theme="dark"] .scr-ref-dash .scr-flow-card__footer {
    background-color: #0f172a;
    border-color: #1f2937;
}
html[data-scp-theme="dark"] .scr-ref-dash .scr-flow-preview {
    box-shadow: 0 1px 2px rgba(0, 0, 0, .35) inset;
    background-color: #0f172a;
}
html[data-scp-theme="dark"] .scr-ref-dash .scr-flow-block {
    background-color: #111827;
    border-color: #1f2937;
}
html[data-scp-theme="dark"] .scr-ref-dash .scr-flow-block__head {
    background-color: #1e293b;
    border-color: #1f2937;
}
html[data-scp-theme="dark"] .scr-ref-dash .scr-flow-block__label,
html[data-scp-theme="dark"] .scr-ref-dash .scr-flow-block__edit {
    color: #e5e7eb;
}
html[data-scp-theme="dark"] .scr-ref-dash .scr-flow-block__edit:focus {
    background-color: #0f172a;
    box-shadow: 0 0 0 2px #3b82f6;
}
html[data-scp-theme="dark"] .scr-ref-dash .scr-flow-block__edit:empty::before {
    color: #64748b;
}
html[data-scp-theme="dark"] .scr-ref-dash .scr-flow-chip {
    background-color: #1f2937;
    border-color: #334155;
    color: #cbd5e1;
}
html[data-scp-theme="dark"] .scr-ref-dash .scr-flow-chip:hover {
    background-color: #1e3a8a;
    border-color: #3b82f6;
    color: #bfdbfe;
}
html[data-scp-theme="dark"] .scr-ref-dash input[type="text"],
html[data-scp-theme="dark"] .scr-ref-dash input[type="url"],
html[data-scp-theme="dark"] .scr-ref-dash input[type="email"],
html[data-scp-theme="dark"] .scr-ref-dash input[type="number"],
html[data-scp-theme="dark"] .scr-ref-dash input[type="search"],
html[data-scp-theme="dark"] .scr-ref-dash input[type="date"],
html[data-scp-theme="dark"] .scr-ref-dash input[type="datetime-local"],
html[data-scp-theme="dark"] .scr-ref-dash textarea,
html[data-scp-theme="dark"] .scr-ref-dash select,
html[data-scp-theme="dark"] .scr-ref-dash .scr-flow-block__input {
    background-color: #0f172a;
    color: #e5e7eb;
    border-color: #334155;
}
html[data-scp-theme="dark"] .scr-ref-dash input:focus,
html[data-scp-theme="dark"] .scr-ref-dash textarea:focus,
html[data-scp-theme="dark"] .scr-ref-dash select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px #1e3a8a;
    outline: none;
}
html[data-scp-theme="dark"] .scr-ref-dash table {
    background-color: #111827;
    color: #e5e7eb;
}
html[data-scp-theme="dark"] .scr-ref-dash table th {
    background-color: #1e293b;
    color: #e5e7eb;
    border-color: #1f2937;
}
html[data-scp-theme="dark"] .scr-ref-dash table td {
    border-color: #1f2937;
}
html[data-scp-theme="dark"] .scr-ref-dash .scr-pill,
html[data-scp-theme="dark"] .scr-ref-dash .scr-activity__tone {
    background-color: #1f2937;
    color: #cbd5e1;
}
html[data-scp-theme="dark"] .scr-ref-dash .scr-dash-save-bar {
    background-color: #111827;
    border-color: #1f2937;
}

/* ============================================================
 * 3. Smartcore Dealmaker (.dlm-*) – Dashboard & Public
 * ============================================================ */
html[data-scp-theme="dark"] .dlm-dash,
html[data-scp-theme="dark"] .dlm-shell,
html[data-scp-theme="dark"] .dlm-storefront-outer,
html[data-scp-theme="dark"] .dlm-pool {
    background-color: transparent;
    color: #e5e7eb;
}
html[data-scp-theme="dark"] .dlm-dropzone {
    background-color: #0f172a;
    border-color: #334155;
}
html[data-scp-theme="dark"] .dlm-dropzone:hover,
html[data-scp-theme="dark"] .dlm-dropzone:focus-within {
    background-color: #1e293b;
    border-color: #64748b;
}
html[data-scp-theme="dark"] .dlm-dropzone.dlm-dropzone--is-dragover {
    background-color: #1e3a8a;
    border-color: #3b82f6;
}
html[data-scp-theme="dark"] .dlm-dropzone__text {
    color: #94a3b8;
}
html[data-scp-theme="dark"] .dlm-stat-card,
html[data-scp-theme="dark"] .dlm-card,
html[data-scp-theme="dark"] .dlm-tile,
html[data-scp-theme="dark"] .dlm-panel,
html[data-scp-theme="dark"] .dlm-box,
html[data-scp-theme="dark"] .dlm-section {
    background-color: #111827;
    color: #e5e7eb;
    border-color: #1f2937;
}
html[data-scp-theme="dark"] .dlm-tile:hover {
    background-color: #1e293b;
}
html[data-scp-theme="dark"] .dlm-header,
html[data-scp-theme="dark"] .dlm-subheader {
    background-color: transparent;
    color: #f1f5f9;
}
html[data-scp-theme="dark"] .dlm-sub,
html[data-scp-theme="dark"] .dlm-muted,
html[data-scp-theme="dark"] .dlm-hint {
    color: #94a3b8;
}
html[data-scp-theme="dark"] .dlm-dash input[type="text"],
html[data-scp-theme="dark"] .dlm-dash input[type="url"],
html[data-scp-theme="dark"] .dlm-dash input[type="email"],
html[data-scp-theme="dark"] .dlm-dash input[type="number"],
html[data-scp-theme="dark"] .dlm-dash input[type="search"],
html[data-scp-theme="dark"] .dlm-dash textarea,
html[data-scp-theme="dark"] .dlm-dash select,
html[data-scp-theme="dark"] .dlm-shell input[type="text"],
html[data-scp-theme="dark"] .dlm-shell input[type="email"],
html[data-scp-theme="dark"] .dlm-shell input[type="number"],
html[data-scp-theme="dark"] .dlm-shell textarea,
html[data-scp-theme="dark"] .dlm-shell select {
    background-color: #0f172a;
    color: #e5e7eb;
    border-color: #334155;
}
html[data-scp-theme="dark"] .dlm-grid .dlm-tile {
    background-color: #111827;
}
html[data-scp-theme="dark"] .dlm-builder-preview-banner {
    background-color: #1e3a8a;
    color: #e5e7eb;
    border-color: #3b82f6;
}

/* ============================================================
 * 3b. Mandanten-Einstellungen (Hub + Unterseiten, Inline-Styles in PHP)
 * ============================================================ */
html[data-scp-theme="dark"] .smartcore-settings-hub {
    color: #e5e7eb;
}
html[data-scp-theme="dark"] .smartcore-settings-hub__hero {
    border-bottom-color: #334155;
}
html[data-scp-theme="dark"] .smartcore-settings-hub__title {
    color: #f1f5f9;
}
html[data-scp-theme="dark"] .smartcore-settings-hub__lead {
    color: #cbd5e1;
}
html[data-scp-theme="dark"] .smartcore-settings-hub__card {
    background-color: #111827;
    border-color: #334155;
    color: #e5e7eb;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
html[data-scp-theme="dark"] .smartcore-settings-hub__card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.22);
}
html[data-scp-theme="dark"] .smartcore-settings-hub__card--disabled {
    background-color: #0f172a;
    border-color: #475569;
    color: #94a3b8;
}
html[data-scp-theme="dark"] .smartcore-settings-hub__card-title {
    color: #bfdbfe;
}
html[data-scp-theme="dark"] .smartcore-settings-hub__card-desc {
    color: #94a3b8;
}
html[data-scp-theme="dark"] .smartcore-settings-hub__card-hint {
    color: #64748b;
}
html[data-scp-theme="dark"] .smartcore-settings-hub__back-link {
    color: #93c5fd;
}
html[data-scp-theme="dark"] .smartcore-settings-hub__muted {
    color: #94a3b8;
}
html[data-scp-theme="dark"] .smartcore-cm-master {
    color: #e5e7eb;
}
html[data-scp-theme="dark"] .smartcore-cm-master__hero--edit {
    border-bottom-color: #334155;
}
html[data-scp-theme="dark"] .smartcore-cm-master__title--edit {
    color: #f1f5f9;
}
html[data-scp-theme="dark"] .smartcore-cm-master__meta {
    color: #94a3b8;
}
html[data-scp-theme="dark"] .smartcore-cm-master__msg--ok {
    background-color: #064e3b;
    color: #d1fae5;
    border-color: #059669;
}
html[data-scp-theme="dark"] .smartcore-cm-master__msg--err {
    background-color: #7f1d1d;
    color: #fecaca;
    border-color: #b91c1c;
}
html[data-scp-theme="dark"] .smartcore-cm-master__card--edit {
    border-color: #334155;
    background: #111827;
    box-shadow: none;
}
html[data-scp-theme="dark"] .smartcore-cm-master__label {
    color: #94a3b8;
}
html[data-scp-theme="dark"] .smartcore-cm-master__control {
    background-color: #0f172a;
    border-color: #334155;
    color: #e5e7eb;
}
html[data-scp-theme="dark"] .smartcore-cm-master__bar {
    border-top-color: #334155;
    background: rgba(15, 23, 42, 0.92);
}
html[data-scp-theme="dark"] .smartcore-cm-master__muted {
    color: #94a3b8;
}
html[data-scp-theme="dark"] .smartcore-cm-master__logo-drop {
    border-color: #475569;
    background-color: #0f172a;
}
html[data-scp-theme="dark"] .smartcore-cm-master__logo-preview img {
    border-color: #334155;
    background-color: #111827;
}
html[data-scp-theme="dark"] .smartcore-cm-master__logo-drop-hint {
    color: #94a3b8;
}
html[data-scp-theme="dark"] .smartcore-cm-master__btn--ghost {
    border-color: #334155;
    background-color: #1e293b;
    color: #e5e7eb;
}
html[data-scp-theme="dark"] .smartcore-cm-master__btn--ghost:hover {
    border-color: #475569;
    background-color: #334155;
}
html[data-scp-theme="dark"] .smartcore-ca {
    color: #e5e7eb;
}
html[data-scp-theme="dark"] .smartcore-ca__hero,
html[data-scp-theme="dark"] .smartcore-ca__hero--edit {
    border-bottom-color: #334155;
}
html[data-scp-theme="dark"] .smartcore-ca__title,
html[data-scp-theme="dark"] .smartcore-ca__title--edit {
    color: #f1f5f9;
}
html[data-scp-theme="dark"] .smartcore-ca__lead,
html[data-scp-theme="dark"] .smartcore-ca__meta,
html[data-scp-theme="dark"] .smartcore-ca__muted,
html[data-scp-theme="dark"] .smartcore-ca__sub {
    color: #94a3b8;
}
html[data-scp-theme="dark"] .smartcore-ca-msg--ok {
    background-color: #064e3b;
    color: #d1fae5;
    border-color: #059669;
}
html[data-scp-theme="dark"] .smartcore-ca-msg--err {
    background-color: #7f1d1d;
    color: #fecaca;
    border-color: #b91c1c;
}
html[data-scp-theme="dark"] .smartcore-ca__tablewrap {
    border-color: #334155;
    background-color: #111827;
}
html[data-scp-theme="dark"] .smartcore-ca__table th {
    background-color: #0f172a;
    color: #94a3b8;
    border-bottom-color: #334155;
}
html[data-scp-theme="dark"] .smartcore-ca__table td {
    border-bottom-color: #334155;
    color: #e5e7eb;
}
html[data-scp-theme="dark"] .smartcore-ca__card,
html[data-scp-theme="dark"] .smartcore-ca__card--edit {
    background: #111827;
    border-color: #334155;
    box-shadow: none;
}
html[data-scp-theme="dark"] .smartcore-ca__label {
    color: #cbd5e1;
}
html[data-scp-theme="dark"] .smartcore-ca__input,
html[data-scp-theme="dark"] .smartcore-ca__control {
    background-color: #0f172a;
    border-color: #334155;
    color: #e5e7eb;
}
html[data-scp-theme="dark"] .smartcore-ca__readonly {
    color: #e5e7eb;
    background-color: #0f172a;
    border-color: #475569;
}
html[data-scp-theme="dark"] .smartcore-ca__hint,
html[data-scp-theme="dark"] .smartcore-ca__optional {
    color: #94a3b8;
}
html[data-scp-theme="dark"] .smartcore-ca__bar {
    border-top-color: #334155;
    background: rgba(15, 23, 42, 0.92);
}
html[data-scp-theme="dark"] .smartcore-ca__btn {
    background-color: #1e293b;
    border-color: #334155;
    color: #e5e7eb;
}
html[data-scp-theme="dark"] .smartcore-ca__btn--primary {
    background-color: #2563eb;
    border-color: #2563eb;
    color: #fff;
}
html[data-scp-theme="dark"] .smartcore-ca__btn--primary:hover {
    background-color: #1d4ed8;
}
html[data-scp-theme="dark"] .smartcore-ca__btn--ghost {
    background-color: transparent;
    color: #94a3b8;
}
html[data-scp-theme="dark"] .smartcore-ca__btn--ghost:hover {
    background-color: #334155;
    color: #e5e7eb;
}
html[data-scp-theme="dark"] .smartcore-ca__link,
html[data-scp-theme="dark"] .smartcore-ca__linkbtn {
    color: #93c5fd;
}
html[data-scp-theme="dark"] .smartcore-ca__linkbtn--danger {
    color: #f87171;
}
html[data-scp-theme="dark"] .smartcore-subs--edit {
    color: #e5e7eb;
}
html[data-scp-theme="dark"] .smartcore-subs__hero--edit {
    border-bottom-color: #334155;
}
html[data-scp-theme="dark"] .smartcore-subs__title--edit {
    color: #f1f5f9;
}
html[data-scp-theme="dark"] .smartcore-subs__meta,
html[data-scp-theme="dark"] .smartcore-subs__muted {
    color: #94a3b8;
}
html[data-scp-theme="dark"] .smartcore-subs-msg--ok {
    background-color: #064e3b;
    color: #d1fae5;
    border-color: #059669;
}
html[data-scp-theme="dark"] .smartcore-subs-msg--err {
    background-color: #7f1d1d;
    color: #fecaca;
    border-color: #b91c1c;
}
html[data-scp-theme="dark"] .smartcore-subs__card--edit {
    background: #111827;
    border-color: #334155;
    box-shadow: none;
}
html[data-scp-theme="dark"] .smartcore-subs__h2 {
    background-color: #0f172a;
    border-bottom-color: #334155;
    color: #94a3b8;
}
html[data-scp-theme="dark"] .smartcore-subs__modcard {
    background-color: #111827;
    border-color: #334155;
}
html[data-scp-theme="dark"] .smartcore-subs__modslug {
    color: #64748b;
}
html[data-scp-theme="dark"] .smartcore-subs__table th,
html[data-scp-theme="dark"] .smartcore-subs__table td {
    border-bottom-color: #334155;
    color: #e5e7eb;
}
html[data-scp-theme="dark"] .smartcore-subs__table th {
    background-color: #0f172a;
    color: #94a3b8;
}
html[data-scp-theme="dark"] .smartcore-subs__reason {
    background-color: #0f172a;
    border-color: #334155;
    color: #e5e7eb;
}
html[data-scp-theme="dark"] .smartcore-subs__btn {
    background-color: #1e293b;
    border-color: #334155;
    color: #e5e7eb;
}
html[data-scp-theme="dark"] .smartcore-subs__btn--primary {
    background-color: #2563eb;
    border-color: #2563eb;
    color: #fff;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.35);
}
html[data-scp-theme="dark"] .smartcore-subs__btn--primary:hover {
    background-color: #1d4ed8;
}
html[data-scp-theme="dark"] .smartcore-subs__btn--ghost {
    border-color: #334155;
    color: #e5e7eb;
}
html[data-scp-theme="dark"] .smartcore-subs__btn--ghost:hover {
    background-color: #334155;
}
html[data-scp-theme="dark"] .smartcore-subs__btn--danger {
    background-color: #450a0a;
    border-color: #991b1b;
    color: #fecaca;
}
html[data-scp-theme="dark"] .smartcore-subs__btn--danger:hover {
    background-color: #7f1d1d;
}
html[data-scp-theme="dark"] .smartcore-subs__bookrow {
    border-bottom-color: #334155;
}
html[data-scp-theme="dark"] .smartcore-subs__booktitle {
    color: #e5e7eb;
}
html[data-scp-theme="dark"] .smartcore-subs__foot {
    color: #64748b;
}
html[data-scp-theme="dark"] .smartcore-inv--edit {
    color: #e5e7eb;
}
html[data-scp-theme="dark"] .smartcore-inv__hero--edit {
    border-bottom-color: #334155;
}
html[data-scp-theme="dark"] .smartcore-inv__title--edit {
    color: #f1f5f9;
}
html[data-scp-theme="dark"] .smartcore-inv__meta {
    color: #94a3b8;
}
html[data-scp-theme="dark"] .smartcore-inv__card--edit {
    background: #111827;
    border-color: #334155;
    box-shadow: none;
}
html[data-scp-theme="dark"] .smartcore-inv__h2 {
    background-color: #0f172a;
    border-bottom-color: #334155;
    color: #94a3b8;
}
html[data-scp-theme="dark"] .smartcore-inv__empty-title {
    color: #e2e8f0;
}
html[data-scp-theme="dark"] .smartcore-inv__empty-text {
    color: #94a3b8;
}
html[data-scp-theme="dark"] .smartcore-inv__table th,
html[data-scp-theme="dark"] .smartcore-inv__table td {
    border-bottom-color: #334155;
    color: #e5e7eb;
}
html[data-scp-theme="dark"] .smartcore-inv__table th {
    background-color: #0f172a;
    color: #94a3b8;
}
html[data-scp-theme="dark"] .smartcore-inv__link {
    color: #93c5fd;
}
html[data-scp-theme="dark"] .smartcore-inv__extra {
    background-color: #0f172a;
    border-color: #475569;
    color: #cbd5e1;
}

/* ============================================================
 * 4. Smartcore LMS (.smartcore-lms-* + .sclms-*)
 *    LMS hat eigene Dark-Logik per data-lms-color-scheme – wir
 *    ueberschreiben nur, wo die nicht greift (Editor, Student-Dashboard,
 *    CCT-Forms). Den Kursfolien-Player lassen wir unberuehrt, weil er
 *    bereits eine Theme-Logik mitbringt.
 * ============================================================ */
html[data-scp-theme="dark"] .smartcore-lms-cct-form,
html[data-scp-theme="dark"] .smartcore-lms-startscreen,
html[data-scp-theme="dark"] .smartcore-lms-start-success,
html[data-scp-theme="dark"] .sclms-dashboard,
html[data-scp-theme="dark"] .sclms-card,
html[data-scp-theme="dark"] .sclms-panel,
html[data-scp-theme="dark"] .sclms-widget {
    background-color: #111827;
    color: #e5e7eb;
    border-color: #1f2937;
}
html[data-scp-theme="dark"] .smartcore-lms-cct-field label,
html[data-scp-theme="dark"] .sclms-card label,
html[data-scp-theme="dark"] .sclms-widget label {
    color: #cbd5e1;
}
html[data-scp-theme="dark"] .smartcore-lms-cct-field input,
html[data-scp-theme="dark"] .smartcore-lms-cct-field textarea,
html[data-scp-theme="dark"] .smartcore-lms-cct-field select,
html[data-scp-theme="dark"] .sclms-dashboard input,
html[data-scp-theme="dark"] .sclms-dashboard textarea,
html[data-scp-theme="dark"] .sclms-dashboard select {
    background-color: #0f172a;
    color: #e5e7eb;
    border-color: #334155;
}
html[data-scp-theme="dark"] .sclms-muted,
html[data-scp-theme="dark"] .sclms-hint,
html[data-scp-theme="dark"] .smartcore-lms-start-success p {
    color: #94a3b8;
}

/* LMS: Kurs-Workspace (Router), Meine Kurse, Einreichungen, Tabellen — editor-form.css ist light-first */
html[data-scp-theme="dark"] .smartcore-lms-my-courses {
    color: #e5e7eb;
}
html[data-scp-theme="dark"] .smartcore-lms-kicker,
html[data-scp-theme="dark"] .smartcore-lms-subline {
    color: #94a3b8;
}
html[data-scp-theme="dark"] .smartcore-lms-dashboard-head h2,
html[data-scp-theme="dark"] .smartcore-lms-drilldown-head h2 {
    color: #f1f5f9;
}
html[data-scp-theme="dark"] .smartcore-lms-metric {
    background: #0f172a;
    border-color: #334155;
}
html[data-scp-theme="dark"] .smartcore-lms-metric-value {
    color: #f1f5f9;
}
html[data-scp-theme="dark"] .smartcore-lms-metric-label {
    color: #94a3b8;
}
html[data-scp-theme="dark"] .smartcore-lms-search,
html[data-scp-theme="dark"] .smartcore-lms-sort {
    background-color: #0f172a;
    color: #e5e7eb;
    border-color: #334155;
}
html[data-scp-theme="dark"] .smartcore-lms-option-tile {
    background-color: #111827;
    border-color: #334155;
    color: #e5e7eb;
    box-shadow: none;
}
html[data-scp-theme="dark"] .smartcore-lms-option-tile:hover {
    background-color: #1e293b;
    border-color: #3b82f6;
}
html[data-scp-theme="dark"] .smartcore-lms-course-card {
    background-color: #111827;
    border-color: #334155;
    box-shadow: none;
}
html[data-scp-theme="dark"] .smartcore-lms-course-thumb {
    background-color: #0f172a;
}
html[data-scp-theme="dark"] .smartcore-lms-course-thumb-placeholder {
    color: #e5e7eb;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}
html[data-scp-theme="dark"] .smartcore-lms-course-body h3 {
    color: #f1f5f9;
}
html[data-scp-theme="dark"] .smartcore-lms-course-description {
    color: #94a3b8;
}
html[data-scp-theme="dark"] .smartcore-lms-badge {
    background-color: #1e3a8a;
    border-color: #3b82f6;
    color: #93c5fd;
}
html[data-scp-theme="dark"] .smartcore-lms-badge.is-key {
    background-color: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
}
html[data-scp-theme="dark"] .smartcore-lms-course-actions.is-secondary {
    border-top-color: #334155;
}
html[data-scp-theme="dark"] .smartcore-lms-workspace-router {
    background-color: #111827;
    border-color: #334155;
    color: #e5e7eb;
}
html[data-scp-theme="dark"] .smartcore-lms-workspace-head h3 {
    color: #f1f5f9;
}
html[data-scp-theme="dark"] .smartcore-lms-workspace-breadcrumb {
    color: #94a3b8;
}
html[data-scp-theme="dark"] .smartcore-lms-workspace-breadcrumb a {
    color: #cbd5e1;
}
html[data-scp-theme="dark"] .smartcore-lms-back-btn {
    background-color: #0f172a;
    border-color: #334155;
    color: #e5e7eb;
}
html[data-scp-theme="dark"] .smartcore-lms-workspace-sub {
    color: #94a3b8;
}
html[data-scp-theme="dark"] .smartcore-lms-quiz-context-label {
    color: #e2e8f0;
}
html[data-scp-theme="dark"] .smartcore-lms-quiz-context-sep {
    color: #64748b;
}
html[data-scp-theme="dark"] .smartcore-lms-quiz-context-body {
    color: #cbd5e1;
}
html[data-scp-theme="dark"] .smartcore-lms-tab {
    background-color: #0f172a;
    border-color: #334155;
    color: #e5e7eb;
}
html[data-scp-theme="dark"] .smartcore-lms-tab.is-active {
    background-color: #1e3a8a;
    border-color: #3b82f6;
    color: #dbeafe;
}
html[data-scp-theme="dark"] .smartcore-lms-workspace-empty {
    border-color: #475569;
    color: #94a3b8;
}
html[data-scp-theme="dark"] .smartcore-lms-workspace-card {
    border-color: #334155;
    background-color: #0f172a;
}
html[data-scp-theme="dark"] .smartcore-lms-workspace-list h4 {
    color: #e2e8f0;
}
html[data-scp-theme="dark"] .smartcore-lms-course-section--flat {
    border-bottom-color: #334155;
}
html[data-scp-theme="dark"] .smartcore-lms-course-section-heading {
    color: #e2e8f0;
}
html[data-scp-theme="dark"] .smartcore-lms-slide-card {
    background-color: #111827;
    border-color: #334155;
    box-shadow: none;
}
html[data-scp-theme="dark"] .smartcore-lms-slide-title {
    color: #f1f5f9;
}
html[data-scp-theme="dark"] .smartcore-lms-slide-summary {
    color: #94a3b8;
}
html[data-scp-theme="dark"] .smartcore-lms-slide-hero {
    background-color: #0f172a;
    border-bottom-color: #334155;
}
html[data-scp-theme="dark"] .smartcore-lms-slide-hero-fallback {
    color: #94a3b8;
}
html[data-scp-theme="dark"] .smartcore-lms-slide-thumb {
    border-color: #334155;
}
html[data-scp-theme="dark"] .smartcore-lms-slide-thumb-placeholder {
    border-color: #475569;
    color: #94a3b8;
}
html[data-scp-theme="dark"] .smartcore-lms-quiz-card .smartcore-lms-slide-hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-bottom-color: #334155;
}
html[data-scp-theme="dark"] .smartcore-lms-submissions-toolbar__label,
html[data-scp-theme="dark"] .smartcore-lms-analytics-check {
    color: #e5e7eb;
}
html[data-scp-theme="dark"] .smartcore-lms-submissions-filter,
html[data-scp-theme="dark"] .smartcore-lms-submissions-toolbar .smartcore-lms-submissions-range {
    background-color: #0f172a;
    color: #e5e7eb;
    border-color: #334155;
}
html[data-scp-theme="dark"] .smartcore-lms-stat {
    background-color: #0f172a;
    border-color: #334155;
}
html[data-scp-theme="dark"] .smartcore-lms-stat span {
    color: #94a3b8;
}
html[data-scp-theme="dark"] .smartcore-lms-stat strong {
    color: #f1f5f9;
}
html[data-scp-theme="dark"] .smartcore-lms-results-table th,
html[data-scp-theme="dark"] .smartcore-lms-results-table td {
    border-color: #334155;
    color: #e5e7eb;
}
html[data-scp-theme="dark"] .smartcore-lms-results-table th {
    background-color: #0f172a;
}
html[data-scp-theme="dark"] .smartcore-lms-results-table tbody tr {
    background-color: #111827;
}
html[data-scp-theme="dark"] .smartcore-lms-results-table tbody tr:nth-child(even) {
    background-color: #0f172a;
}
html[data-scp-theme="dark"] .smartcore-lms-btn {
    background-color: #1e293b;
    border-color: #334155;
    color: #e5e7eb;
}
html[data-scp-theme="dark"] .smartcore-lms-btn:hover {
    background-color: #334155;
    border-color: #475569;
}
html[data-scp-theme="dark"] .smartcore-lms-course-actions:not(.is-secondary) .smartcore-lms-btn:first-child {
    color: #fff;
}
html[data-scp-theme="dark"] .smartcore-lms-course-topline .smartcore-lms-btn--copy-participant.is-copied {
    border-color: #166534;
    background-color: #064e3b;
    color: #bbf7d0;
}
html[data-scp-theme="dark"] .smartcore-lms-help {
    color: #94a3b8;
}
html[data-scp-theme="dark"] .smartcore-lms-notice.is-success {
    background-color: #064e3b;
    color: #d1fae5;
}
html[data-scp-theme="dark"] .smartcore-lms-notice.is-error {
    background-color: #7f1d1d;
    color: #fecaca;
}
html[data-scp-theme="dark"] .smartcore-lms-analytics-exec {
    background: #0f172a;
    border-color: #334155;
}
html[data-scp-theme="dark"] .smartcore-lms-analytics-exec__label {
    color: #94a3b8;
}
html[data-scp-theme="dark"] .smartcore-lms-analytics-exec__card {
    background-color: #111827;
    border-color: #334155;
}
html[data-scp-theme="dark"] .smartcore-lms-analytics-exec__card h6 {
    color: #94a3b8;
}
html[data-scp-theme="dark"] .smartcore-lms-analytics-exec__card strong {
    color: #f1f5f9;
}
html[data-scp-theme="dark"] .smartcore-lms-analytics-exec__card small.is-neutral,
html[data-scp-theme="dark"] .smartcore-lms-analytics-exec__card small {
    color: #94a3b8;
}
html[data-scp-theme="dark"] .smartcore-lms-analytics-exec__card small.is-up {
    color: #4ade80;
}
html[data-scp-theme="dark"] .smartcore-lms-analytics-exec__card small.is-down {
    color: #f87171;
}
html[data-scp-theme="dark"] .smartcore-lms-analytics-storage {
    background-color: #0f172a;
    border-color: #334155;
}
html[data-scp-theme="dark"] .smartcore-lms-analytics-storage h5 {
    color: #f1f5f9;
}
html[data-scp-theme="dark"] .smartcore-lms-analytics-subhead {
    color: #cbd5e1;
}
html[data-scp-theme="dark"] .smartcore-lms-submission-detail-modal__panel {
    background-color: #111827;
    border-color: #334155;
    color: #e5e7eb;
}
html[data-scp-theme="dark"] .smartcore-lms-submission-detail-modal__title {
    color: #f1f5f9;
}
html[data-scp-theme="dark"] .smartcore-lms-submission-detail-modal__head {
    border-bottom-color: #334155;
}
html[data-scp-theme="dark"] .smartcore-lms-submission-detail-modal__close {
    background-color: #0f172a;
    color: #e5e7eb;
}
html[data-scp-theme="dark"] .smartcore-lms-submission-detail-modal__close:hover {
    background-color: #1e293b;
}
html[data-scp-theme="dark"] .smartcore-lms-submission-detail-section__title {
    color: #94a3b8;
}
html[data-scp-theme="dark"] .smartcore-lms-submission-tech-details {
    border-color: #334155;
    background-color: #0f172a;
}
html[data-scp-theme="dark"] .smartcore-lms-submission-tech-details__content {
    border-top-color: #334155;
}
html[data-scp-theme="dark"] .smartcore-lms-submission-detail-kv__k {
    color: #94a3b8;
}
html[data-scp-theme="dark"] .smartcore-lms-submission-detail-kv__v {
    color: #e5e7eb;
}
html[data-scp-theme="dark"] .smartcore-lms-submission-detail-qa-wrap {
    border-color: #334155;
    background-color: #0f172a;
}
html[data-scp-theme="dark"] .smartcore-lms-quiz-einzel-table--modal {
    background-color: #111827;
}
html[data-scp-theme="dark"] .smartcore-lms-submission-detail-raw > summary {
    color: #94a3b8;
}
html[data-scp-theme="dark"] .smartcore-lms-backup-card {
    background-color: #111827;
    border-color: #334155;
    color: #e5e7eb;
    box-shadow: none;
}
html[data-scp-theme="dark"] .smartcore-lms-backup-preset-help,
html[data-scp-theme="dark"] .smartcore-lms-backup-last dt {
    color: #94a3b8;
}
html[data-scp-theme="dark"] .smartcore-lms-backup-last {
    background-color: #0f172a;
    border-color: #334155;
}
html[data-scp-theme="dark"] .smartcore-lms-backup-last dd {
    color: #e5e7eb;
}
html[data-scp-theme="dark"] .smartcore-lms-media-preview--course-drop {
    background-color: #0f172a;
    border-color: #475569;
}
html[data-scp-theme="dark"] .smartcore-lms-media-preview--course-drop:hover {
    background-color: #1e293b;
    border-color: #64748b;
}
html[data-scp-theme="dark"] .smartcore-lms-media-preview--course-drop.is-drag-over {
    background-color: #1e3a8a;
    border-color: #3b82f6;
}
html[data-scp-theme="dark"] .sclms-course-image-drop-hint__title {
    color: #f1f5f9;
}
html[data-scp-theme="dark"] .sclms-course-image-drop-hint__sub {
    color: #94a3b8;
}

/* ============================================================
 * 5. Smartcore Survey Builder (.csb-*)
 *
 * Eigene CSS-Variablen (Dark-Tokens), damit Komponenten im Builder
 * (Fragenbloecke, Drag-States etc.) konsistent aussehen.
 * ============================================================ */
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) {
    --csb-question-bg: #111827;
    --csb-question-border: #1f2937;
    --csb-question-radius: 10px;
    --csb-dragging-bg: #1e3a8a;
    --csb-dragging-border: #3b82f6;
    --csb-status-saving: #93c5fd;
    --csb-status-success: #34d399;
    --csb-status-error: #fca5a5;
}

/* Flaechen: alle Haupt-Container, Cards, Panels, Listen, Canvas */
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light),
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-form,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-card,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-panel,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-list,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-note,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-question-block,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-question-block-wrap,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-question-blocks,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-sort-panel,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-sort-list,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-sort-item,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-option-row,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-option-list,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-builder,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-builder__palette,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-builder__main,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-builder__preview,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-builder__canvas,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-builder__preview-mount,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-builder__preview-content,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-builder__drop-hint,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-palette-item,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-survey-preview-panel,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-survey-preview-panel__preview-box,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-inline-new-question,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-inline-choice-rows,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-inline-choice-row,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-inline-question-preview-wrap,
html[data-scp-theme="dark"] .csb-dashboard.csb-dashboard--widget-create:not(.csb-dashboard--theme-light),
html[data-scp-theme="dark"] .csb-dashboard.csb-dashboard--widget-list:not(.csb-dashboard--theme-light),
html[data-scp-theme="dark"] .csb-dashboard.csb-dashboard--edit:not(.csb-dashboard--theme-light),
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-dashboard-theme-bar,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-theme-wrap,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-create-wizard-shell,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-survey,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-survey__cover,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-survey__step,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-survey__thank-you,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-question,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-option {
    background-color: #111827;
    color: #e5e7eb;
    border-color: #1f2937;
}

/* Fallback: jede weitere Flaechen-Komponente, die mit csb- beginnt */
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) [class^="csb-"],
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) [class*=" csb-"] {
    border-color: #1f2937;
}

/* Head-/Title-/Tab-Elemente mit etwas kontrastierterem Hintergrund */
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-question-block__title,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-question-block__summary,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-question-block__grip,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-sort-item__handle,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-builder__main-head,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-builder__palette-head,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-builder__preview-head,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-builder__canvas-title,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-builder__palette-title,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-builder__preview-title,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-edit-questions__head,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-edit-questions__h2,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-survey-preview-panel__cta,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-survey__brand {
    background-color: #1e293b;
    color: #f1f5f9;
    border-color: #1f2937;
}

/* Inhaltsbereich unter einem Titel / Frage-Body */
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-question-block__content,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-survey-preview-panel__body,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-inline-question-preview {
    background-color: #0f172a;
    color: #e5e7eb;
    border-color: #1f2937;
}

/* Hover-Zustaende */
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-question-block:hover,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-sort-item:hover,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-palette-item:hover,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-option-row:hover {
    background-color: #1f2937;
    border-color: #334155;
}

/* Drag-States */
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-question-block-wrap.dragging .csb-question-block,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-sort-item.dragging,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-palette-item.is-dragging,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-question-blocks.csb-is-palette-over {
    background-color: #1e3a8a;
    border-color: #3b82f6;
    color: #e0ecff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .25);
}

/* Formularfelder (inkl. Builder & Survey-Wizard) */
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-form input[type="text"],
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-form input[type="email"],
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-form input[type="url"],
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-form input[type="number"],
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-form input[type="search"],
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-form input[type="tel"],
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-form input[type="date"],
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-form input[type="time"],
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-form input[type="datetime-local"],
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-form input[type="password"],
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-form textarea,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-form select,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) input[type="text"],
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) input[type="email"],
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) input[type="url"],
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) input[type="number"],
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) textarea,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) select,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-survey input[type="text"],
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-survey input[type="email"],
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-survey input[type="url"],
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-survey input[type="number"],
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-survey textarea,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-survey select,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-inline-choice-row__label,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-inline-choice-row__value {
    background-color: #0f172a;
    color: #e5e7eb;
    border-color: #334155;
}
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-form input:focus,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-form textarea:focus,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-form select:focus,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) input:focus,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) textarea:focus,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-survey input:focus,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-survey textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, .35);
}
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-form label,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) label,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-survey label {
    color: #cbd5e1;
}

/* Buttons: primaere Aktionen bleiben farbig, Icon/Ghost werden dunkel */
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-icon-btn,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-drag-handle,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-action-btn,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-copy-url-btn,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-builder__preview-refresh {
    background-color: #1f2937;
    color: #e5e7eb;
    border-color: #334155;
}
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-icon-btn:hover,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-drag-handle:hover,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-action-btn:hover,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-copy-url-btn:hover,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-builder__preview-refresh:hover {
    background-color: #334155;
    border-color: #475569;
}
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-action-btn--primary,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-form button:not(.csb-icon-btn):not(.csb-action-btn) {
    background-color: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-action-btn--primary:hover,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-form button:not(.csb-icon-btn):not(.csb-action-btn):hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
}
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-icon-btn--save {
    color: #34d399;
}
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-icon-btn--delete,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-action-btn--danger,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-inline-choice-row__remove {
    color: #fca5a5;
    border-color: #7f1d1d;
}
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-action-btn--danger:hover,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-inline-choice-row__remove:hover {
    background-color: #7f1d1d;
    color: #fee2e2;
}
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-btn-danger {
    background-color: #991b1b !important;
    color: #fee2e2;
}

/* Status-, Hinweis- und Meldungstexte */
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-hint,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-muted,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-palette-item__hint,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-builder__palette-desc,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-survey-preview-panel__hint,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-builder__preview-loading {
    color: #94a3b8;
}
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-sort-status.is-saving,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-inline-new-question__status.is-saving {
    color: #93c5fd;
}
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-sort-status.is-success,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-inline-new-question__status.is-success,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-message.success {
    color: #34d399;
    background-color: rgba(16, 185, 129, .08);
    border-color: rgba(16, 185, 129, .35);
}
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-sort-status.is-error,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-inline-new-question__status.is-error,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-message.error {
    color: #fca5a5;
    background-color: rgba(239, 68, 68, .08);
    border-color: rgba(239, 68, 68, .35);
}

/* Ueberschriften innerhalb des Survey-Builders */
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) h1,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) h2,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) h3,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) h4,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-builder h1,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-builder h2,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-builder h3,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-builder h4,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-survey h1,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-survey h2,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-survey h3,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-survey h4,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-question-block__title-text,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-question-block__type {
    color: #f1f5f9;
}

/* Progress / Steps im oeffentlichen Survey */
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-survey__progress-wrap,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-survey__progress-bar {
    background-color: #1f2937;
    border-color: #334155;
}
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-survey__progress-bar-fill {
    background-color: #3b82f6;
}
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-survey__steps-progress {
    color: #cbd5e1;
}
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-survey__step-nav {
    border-color: #1f2937;
}

/* Tabellen innerhalb des Dashboards (Reports, Submissions, Analytics) */
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) table,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-reports table,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-submissions table,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-analytics table {
    background-color: #111827;
    color: #e5e7eb;
    border-color: #1f2937;
}
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) table th,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-reports table th,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-submissions table th,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-analytics table th {
    background-color: #1e293b;
    color: #f1f5f9;
    border-color: #1f2937;
}
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) table td,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-reports table td,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-submissions table td,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-analytics table td {
    border-color: #1f2937;
}
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) table tr:hover td {
    background-color: #1f2937;
}

/* Image-Upload-Komponente */
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-survey-image-upload,
html[data-scp-theme="dark"] .csb-dashboard:not(.csb-dashboard--theme-light) .csb-survey-image-upload__preview {
    background-color: #0f172a;
    border-color: #334155;
    color: #e5e7eb;
}

/* ============================================================
 * 6. Generische Smartcore-Module (Task-Manager, Zeiterfassung,
 *    Ticket-System, Event-Slot-Manager, Local-Legends).
 *    Diese haben oft Inline-Styles oder keine dedizierten Praefixes.
 *    Wir targeten gemeinsame Patterns ueber den Layout-Content.
 * ============================================================ */
html[data-scp-theme="dark"] .scp-layout-content .notice,
html[data-scp-theme="dark"] .scp-layout-content .card,
html[data-scp-theme="dark"] .scp-layout-content .panel,
html[data-scp-theme="dark"] .scp-layout-content .box,
html[data-scp-theme="dark"] .scp-layout-content table {
    background-color: #111827;
    color: #e5e7eb;
    border-color: #1f2937;
}
html[data-scp-theme="dark"] .scp-layout-content table th {
    background-color: #1e293b;
    color: #e5e7eb;
    border-color: #1f2937;
}
html[data-scp-theme="dark"] .scp-layout-content table td {
    border-color: #1f2937;
}
html[data-scp-theme="dark"] .scp-layout-content input[type="text"],
html[data-scp-theme="dark"] .scp-layout-content input[type="email"],
html[data-scp-theme="dark"] .scp-layout-content input[type="url"],
html[data-scp-theme="dark"] .scp-layout-content input[type="number"],
html[data-scp-theme="dark"] .scp-layout-content input[type="search"],
html[data-scp-theme="dark"] .scp-layout-content input[type="tel"],
html[data-scp-theme="dark"] .scp-layout-content input[type="date"],
html[data-scp-theme="dark"] .scp-layout-content input[type="time"],
html[data-scp-theme="dark"] .scp-layout-content input[type="datetime-local"],
html[data-scp-theme="dark"] .scp-layout-content input[type="password"],
html[data-scp-theme="dark"] .scp-layout-content textarea,
html[data-scp-theme="dark"] .scp-layout-content select {
    background-color: #0f172a;
    color: #e5e7eb;
    border-color: #334155;
}
html[data-scp-theme="dark"] .scp-layout-content input:focus,
html[data-scp-theme="dark"] .scp-layout-content textarea:focus,
html[data-scp-theme="dark"] .scp-layout-content select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px #1e3a8a;
    outline: none;
}
html[data-scp-theme="dark"] .scp-layout-content hr {
    border-color: #1f2937;
}
html[data-scp-theme="dark"] .scp-layout-content a {
    color: #60a5fa;
}
html[data-scp-theme="dark"] .scp-layout-content a:hover {
    color: #93c5fd;
}

/* 6b. CSB „Hell“ in Plattform-Content: Abschnitt-6-Generika nicht auf helle Umfrage-Flaechen anwenden */
html[data-scp-theme="dark"] .scp-layout-content .csb-dashboard.csb-dashboard--theme-light table,
html[data-scp-theme="dark"] .scp-layout-content .csb-dashboard.csb-dashboard--theme-light .notice,
html[data-scp-theme="dark"] .scp-layout-content .csb-dashboard.csb-dashboard--theme-light .card,
html[data-scp-theme="dark"] .scp-layout-content .csb-dashboard.csb-dashboard--theme-light .panel,
html[data-scp-theme="dark"] .scp-layout-content .csb-dashboard.csb-dashboard--theme-light .box {
    background-color: #ffffff;
    color: #1e293b;
    border-color: #e2e8f0;
}
html[data-scp-theme="dark"] .scp-layout-content .csb-dashboard.csb-dashboard--theme-light table th {
    background-color: #f1f5f9;
    color: #0f172a;
    border-color: #e2e8f0;
}
html[data-scp-theme="dark"] .scp-layout-content .csb-dashboard.csb-dashboard--theme-light table td {
    border-color: #e2e8f0;
}
html[data-scp-theme="dark"] .scp-layout-content .csb-dashboard.csb-dashboard--theme-light table tr:hover td {
    background-color: #f8fafc;
}
html[data-scp-theme="dark"] .scp-layout-content .csb-dashboard.csb-dashboard--theme-light input[type="text"],
html[data-scp-theme="dark"] .scp-layout-content .csb-dashboard.csb-dashboard--theme-light input[type="email"],
html[data-scp-theme="dark"] .scp-layout-content .csb-dashboard.csb-dashboard--theme-light input[type="url"],
html[data-scp-theme="dark"] .scp-layout-content .csb-dashboard.csb-dashboard--theme-light input[type="number"],
html[data-scp-theme="dark"] .scp-layout-content .csb-dashboard.csb-dashboard--theme-light input[type="search"],
html[data-scp-theme="dark"] .scp-layout-content .csb-dashboard.csb-dashboard--theme-light input[type="tel"],
html[data-scp-theme="dark"] .scp-layout-content .csb-dashboard.csb-dashboard--theme-light input[type="date"],
html[data-scp-theme="dark"] .scp-layout-content .csb-dashboard.csb-dashboard--theme-light input[type="time"],
html[data-scp-theme="dark"] .scp-layout-content .csb-dashboard.csb-dashboard--theme-light input[type="datetime-local"],
html[data-scp-theme="dark"] .scp-layout-content .csb-dashboard.csb-dashboard--theme-light input[type="password"],
html[data-scp-theme="dark"] .scp-layout-content .csb-dashboard.csb-dashboard--theme-light textarea,
html[data-scp-theme="dark"] .scp-layout-content .csb-dashboard.csb-dashboard--theme-light select {
    background-color: #ffffff;
    color: #1e293b;
    border-color: #cbd5e1;
}
html[data-scp-theme="dark"] .scp-layout-content .csb-dashboard.csb-dashboard--theme-light input:focus,
html[data-scp-theme="dark"] .scp-layout-content .csb-dashboard.csb-dashboard--theme-light textarea:focus,
html[data-scp-theme="dark"] .scp-layout-content .csb-dashboard.csb-dashboard--theme-light select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
    outline: none;
}
html[data-scp-theme="dark"] .scp-layout-content .csb-dashboard.csb-dashboard--theme-light hr {
    border-color: #e2e8f0;
}
html[data-scp-theme="dark"] .scp-layout-content .csb-dashboard.csb-dashboard--theme-light a {
    color: #2563eb;
}
html[data-scp-theme="dark"] .scp-layout-content .csb-dashboard.csb-dashboard--theme-light a:hover {
    color: #1d4ed8;
}

/* ============================================================
 * 7. Opt-Out: Plugins, die eigene Dark-Logik haben, koennen diesen
 *    Block ueber eine Klasse am Wrapper unterdruecken:
 *    .scp-no-dark  => unbeeinflusst vom System-Dark-Mode
 * ============================================================ */
html[data-scp-theme="dark"] .scp-no-dark,
html[data-scp-theme="dark"] .scp-no-dark * {
    background-color: revert;
    color: revert;
    border-color: revert;
}
