/* RSW POS globales Anwender-Theme – wird absichtlich NACH allen seitenbezogenen CSS-Dateien geladen. */
html[data-rsw-theme="dunkel"]{--bg:#0c1420;--nav:#101a28;--top:#0b131e;--blue:#8f3fe5;--border:#29384c;--text:#eef2f8;--muted:#a5b2c3;--green:#45d67b;--surface:#121b27;--surface2:#0f1824;--rsw-card-bg:#121b27;color-scheme:dark}
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) body,
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .rsw-layout,
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .rsw-content,
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .rsw-footer{background:var(--bg)!important;color:var(--text)!important}
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .card,
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .stat,
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .quick-card,
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .standalone-message,
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .dialog,
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .panel,
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .box,
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .group-box,
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .group-item,
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .group-price-row,
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .pricegroup-info,
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .billing-list-card,
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .billing-detail-card{background:var(--surface)!important;border-color:var(--border)!important;color:var(--text)!important}
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) h1,html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) h2,html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) h3,html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) h4,html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) strong,html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) label,html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) legend{color:var(--text)!important}
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) p,html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) small,html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .field-note,html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .muted,html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .page-title p,html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .color-field>span,html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .group-price-row>label:not(.check)>span{color:var(--muted)!important}
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) table{background:var(--surface)!important;color:var(--text)!important}
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) th{background:var(--surface2)!important;color:#b8c5d6!important}
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) td,html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) th{border-color:var(--border)!important}
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) tr,html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) tbody{background:transparent!important;color:var(--text)!important}
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) select,
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) textarea{background:#101a27!important;color:var(--text)!important;border-color:#405069!important}
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) input::placeholder,html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) textarea::placeholder{color:#8290a4!important}
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) input[type="color"]{background:#101a27!important;border-color:#405069!important}
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .filters,html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .card-head,html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .dialog-head,html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .dialog-actions,html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .list-row{border-color:var(--border)!important}
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .pricegroup-info strong{color:#d7c0f7!important}
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .pricegroup-info p{color:var(--muted)!important}
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .quick-card:hover{background:#172334!important;border-color:#65419a!important}
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) a:not(.button-link):not(.quick-card):not(.rsw-sidebar a):not(.rsw-topbar a){color:#c58aff}
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .badge.off{background:#263244!important;color:#c0cad7!important}
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .badge.ok{background:#153b28!important;color:#73e69b!important}
/* Dokument-/Papier-Vorschauen bleiben bewusst weiß. */
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .billing-paper,html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .invoice-paper,html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .pdf-preview{color:#17202a!important;color-scheme:light}


/* Auswahl Darstellung */
.rsw-theme-card{margin-bottom:18px}
.rsw-theme-form{padding:18px}
.rsw-theme-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.rsw-theme-choice{display:flex;align-items:center;gap:12px;padding:16px;border:2px solid #d6dee8;border-radius:10px;cursor:pointer;background:#fff;transition:.15s ease}
.rsw-theme-choice:hover{border-color:#9b3fe6}
.rsw-theme-choice:has(input:checked){border-color:#9b3fe6;box-shadow:0 0 0 2px rgba(155,63,230,.14)}
.rsw-theme-choice input{width:20px;height:20px;accent-color:#9b3fe6}
.rsw-theme-choice span{display:flex;flex-direction:column;gap:3px}.rsw-theme-choice strong{font-size:16px}.rsw-theme-choice small{color:#65758a}
.rsw-theme-actions{display:flex;align-items:center;gap:14px;margin-top:16px}.rsw-theme-message{font-weight:600}
@media(max-width:800px){.rsw-theme-choices{grid-template-columns:1fr}}
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .rsw-theme-choice{background:#0f1926!important;border-color:#33445b!important}
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .rsw-theme-choice:has(input:checked){background:#1b1530!important;border-color:#a64cf0!important;box-shadow:0 0 0 2px rgba(166,76,240,.22)!important}
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .rsw-theme-choice small{color:var(--muted)!important}

/* Breiter globaler Dark-Fix: auch Seiten mit eigenen Wrappern/Karten */
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .page,
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .content,
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .main,
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) main,
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .page-wrap,
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .content-wrap{background:var(--bg)!important;color:var(--text)!important}
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .section,
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .content-card,
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .settings-card,
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .option-card,
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .form-card,
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) fieldset{background:var(--surface)!important;border-color:var(--border)!important;color:var(--text)!important}
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .table-wrap{background:var(--surface)!important;border-color:var(--border)!important}
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) code{background:#0a121d!important;color:#d9b7ff!important}
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) hr{border-color:var(--border)!important}

/* 2026-09-19 gezielter Fix: Client-/App-Optionen im Dunkelmodus.
   Nur Farben/Rahmen – keine Layout-, z-index- oder pointer-events-Regeln. */
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .options-box,
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .client-strip,
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .scope-box,
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .client-choice{
  background:var(--surface)!important;
  color:var(--text)!important;
  border-color:var(--border)!important;
}
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .client-strip>div,
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .client-picker{
  border-color:var(--border)!important;
}
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .options-box p,
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .client-strip small{
  color:var(--muted)!important;
}
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .options-box .notice,
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .scope-box .notice{
  background:#172334!important;
  border-color:#405069!important;
  color:#dce6f3!important;
}
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .notice.ok{background:#153b28!important;border-color:#256642!important;color:#8ae9aa!important}
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .notice.err{background:#3a1b22!important;border-color:#743440!important;color:#ffb8c0!important}

/* Fahrgast-App bleibt interaktiv: Theme ändert dort ausschließlich Farben. */
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .fg-page .fg-step-card,
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .fg-page .fg-preview-column,
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .fg-page .fg-live-dialog,
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .fg-page .fg-dialog{
  background:#121b27!important;
  border-color:#29384c!important;
  color:#eef2f8!important;
}

/* 2026-09-19 Preisgruppen: Hinweisboxen im Dunkelmodus lesbar halten. */
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .pricegroup-page-info,
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .pricegroup-info{
  background:#121f2f!important;
  border-color:#31465f!important;
  border-left-color:#8f3fe5!important;
  color:#eef2f8!important;
}
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .pricegroup-page-info strong,
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .pricegroup-info strong{
  color:#f3f6fb!important;
}
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .pricegroup-page-info p,
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .pricegroup-info p{
  color:#b8c5d6!important;
}

/* 2026-09-19 final: Rechnungsnummern-Hinweise im Dunkelmodus lesbar. */
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .rn-grid .notice{
  color:#e8eef7!important;
  background:#172334!important;
  border-color:#405069!important;
}
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .rn-grid .notice strong{
  color:#ffffff!important;
}

/* Abrechnung/PDF ist bewusst komplett vom Theme ausgenommen: Arbeitsfläche weiß. */
body.rsw-theme-exempt .rsw-content{
  background:#ffffff!important;
  color:#17202a!important;
}
body.rsw-theme-exempt .page-title h1,
body.rsw-theme-exempt .page-title p{
  color:#17202a!important;
}


/* 2026-10-06: modularer Dashboard-/Karten-Fix im Dunkelmodus. */
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .dashboard-tile{
  background:var(--surface)!important;
  border-color:var(--border)!important;
  color:var(--text)!important;
}
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .dashboard-tile strong{
  color:var(--text)!important;
}
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .dashboard-tile span{
  color:var(--muted)!important;
}
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .dashboard-tile:hover{
  background:#172334!important;
  border-color:#65419a!important;
}
/* Inline-Karten im Anwenderbereich benutzen --rsw-card-bg. */
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt){
  --rsw-card-bg:var(--surface);
}

/* 2026-10-06: Kategorien des modularen Dashboards optisch trennen. */
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .dashboard-section{
  background:var(--surface2)!important;
  border-color:var(--border)!important;
  color:var(--text)!important;
}


/* 2026-10-06: Preisgruppen-Zuordnungsdialog im Dunkelmodus */
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .assign-dialog-info{
  background:#172334!important;
  color:var(--muted)!important;
  border-color:#405069!important;
}
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .assign-dialog-list,
html[data-rsw-theme="dunkel"] body:not(.rsw-theme-exempt) .assign-client-row{
  background:var(--surface)!important;
  color:var(--text)!important;
  border-color:var(--border)!important;
}
