:root {
    font-family: system-ui, sans-serif;
}

body.saas-shell {
    --saas-footer-h: 4.25rem;
}

body.pb-dashfooter main {
    padding-bottom: calc(var(--saas-footer-h) + 1.25rem);
}

.saas-guest-bar {
    background-color: var(--bs-body-bg);
}

.saas-guest-brand:hover {
    opacity: 0.92;
}

.saas-muted {
    color: var(--bs-secondary-color);
    font-size: 0.9rem;
}

/* Einheitliche Haupt-Cards (Bootstrap 5) */
.saas-card .card-header {
    background-color: var(--bs-body-bg);
}

[data-bs-theme="light"] .saas-card .card-header {
    background-color: var(--bs-secondary-bg);
}

.saas-card-nested {
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: var(--bs-border-radius);
    overflow: hidden;
}

/* Dashboard-Kacheln etwas klarer vom Hintergrund */
.dashboard-apps .saas-card-nested .card-header {
    font-weight: 600;
}

/* Gast-Fußzeile: Theme-Link lesbar */
.saas-guest-footer .saas-theme-btn {
    color: inherit;
}

.saas-guest-footer .saas-theme-btn:hover {
    opacity: 0.85;
}

/* Dashboard-Fußzeile */
.saas-dash-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    background: #1e1e1e;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.35);
}

.saas-dash-footer__inner {
    min-height: var(--saas-footer-h);
}

.saas-dash-footer__link {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.35rem 0.5rem;
    color: #f0a832;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    border: none;
    background: transparent;
    border-radius: 0.35rem;
}

.saas-dash-footer__link:hover {
    color: #ffd46b;
}

.saas-dash-footer__link i {
    font-size: 1.15rem;
}

.saas-dash-footer__link--active {
    color: #ffd46b;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.saas-dash-footer__btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    padding: 0.35rem 0.55rem;
    color: #f0a832;
    background: transparent;
    border: none;
    border-radius: 0.35rem;
    font-size: 0.78rem;
    font-weight: 500;
}

.saas-dash-footer__btn:hover {
    color: #ffd46b;
}

.saas-dash-footer__btn i {
    font-size: 1.1rem;
}

.saas-dash-footer__logout button {
    border: none;
    background: transparent;
    cursor: pointer;
}

.saas-dash-footer button.saas-dash-footer__btn {
    vertical-align: middle;
}

/* ---- Folkwang / Gast-Auth (Login, Registrierung): Dark + Bright explizit ---- */
:root {
    --saas-folkwang-orange: #f39c12;
    --saas-folkwang-orange-hover: #e08e0b;
    --saas-folkwang-orange-rgb: 243, 156, 18;
    --saas-auth-on-orange: #141414;
}

body.saas-auth-shell main {
    padding-bottom: calc(var(--saas-footer-h) + 0.75rem);
}

.saas-guest-footer__link,
.saas-guest-footer__btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.12rem;
    padding: 0.35rem 0.55rem;
    color: var(--saas-folkwang-orange);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    border: none;
    background: transparent;
    border-radius: 0.35rem;
}

.saas-guest-footer__link:hover,
.saas-guest-footer__btn:hover {
    color: #ffd46b;
}

.saas-guest-footer__link i,
.saas-guest-footer__btn i {
    font-size: 1.12rem;
}

/* —— Dark (Referenz: Karte etwas heller als Seite, Felder klar umrandet) —— */
html[data-bs-theme="dark"] body.saas-auth-shell {
    background-color: #121212 !important;
    color: #f5f5f5;
}

html[data-bs-theme="dark"] .saas-auth-top {
    background-color: #121212 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-bs-theme="dark"] .saas-auth-top .saas-guest-brand {
    color: #fff !important;
}

html[data-bs-theme="dark"] .saas-guest-footer {
    background-color: #121212;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-bs-theme="dark"] body.saas-auth-shell .saas-auth-card.card {
    background: #1a1a1a;
    border: 1px solid #3d3d3d !important;
    border-radius: 0.75rem;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
    color: #f5f5f5;
    overflow: hidden;
}

html[data-bs-theme="dark"] body.saas-auth-shell .saas-auth-card .card-header {
    text-align: center;
    background: #2a2a2a !important;
    border-bottom: 1px solid #404040 !important;
    padding: 1.5rem 1.25rem;
}

html[data-bs-theme="dark"] body.saas-auth-shell .saas-auth-card .card-header h1 {
    color: #fff;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
}

html[data-bs-theme="dark"] body.saas-auth-shell .saas-auth-card .card-header h1 i {
    color: #fff !important;
}

html[data-bs-theme="dark"] body.saas-auth-shell .saas-auth-card .subtitle {
    color: #c4c4c4;
    font-size: 0.95rem;
    margin: 0;
    font-weight: 400;
}

html[data-bs-theme="dark"] body.saas-auth-shell .saas-auth-card .card-body {
    background: #1a1a1a;
    color: #f5f5f5;
}

html[data-bs-theme="dark"] body.saas-auth-shell .saas-auth-card .form-label {
    color: #fff;
    font-weight: 500;
}

/* Eingaben: deutlich von Kartenfläche (#1a1a1a) absetzen */
html[data-bs-theme="dark"] body.saas-auth-shell .saas-auth-card .form-control,
html[data-bs-theme="dark"] body.saas-auth-shell .saas-auth-card .form-select {
    background-color: #2e2e2e !important;
    background-image: none !important;
    border: 2px solid #6a6a6a !important;
    color: #fff !important;
    border-radius: 0.5rem;
}

html[data-bs-theme="dark"] body.saas-auth-shell .saas-auth-card .form-control::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

html[data-bs-theme="dark"] body.saas-auth-shell .saas-auth-card .form-control:focus,
html[data-bs-theme="dark"] body.saas-auth-shell .saas-auth-card .form-select:focus {
    border-color: var(--saas-folkwang-orange) !important;
    box-shadow: 0 0 0 0.2rem rgba(var(--saas-folkwang-orange-rgb), 0.25) !important;
    background-color: #353535 !important;
    color: #fff !important;
}

html[data-bs-theme="dark"] body.saas-auth-shell .saas-auth-card .form-control:-webkit-autofill,
html[data-bs-theme="dark"] body.saas-auth-shell .saas-auth-card .form-control:-webkit-autofill:hover,
html[data-bs-theme="dark"] body.saas-auth-shell .saas-auth-card .form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff !important;
    box-shadow: 0 0 0 1000px #2e2e2e inset !important;
    border: 2px solid #6a6a6a !important;
}

html[data-bs-theme="dark"] body.saas-auth-shell .saas-auth-card .form-check-input {
    width: 1.1em;
    height: 1.1em;
    border: 2px solid #8a8a8a;
    background-color: #2e2e2e;
}

html[data-bs-theme="dark"] body.saas-auth-shell .saas-auth-card .form-check-input:checked {
    background-color: var(--saas-folkwang-orange);
    border-color: var(--saas-folkwang-orange);
}

html[data-bs-theme="dark"] body.saas-auth-shell .saas-auth-card .form-check-label {
    color: #f0f0f0;
}

html[data-bs-theme="dark"] body.saas-auth-shell .saas-auth-card .btn-primary {
    background-color: var(--saas-folkwang-orange);
    border-color: var(--saas-folkwang-orange);
    color: var(--saas-auth-on-orange);
    font-weight: 700;
}

html[data-bs-theme="dark"] body.saas-auth-shell .saas-auth-card .btn-primary:hover {
    background-color: var(--saas-folkwang-orange-hover);
    border-color: var(--saas-folkwang-orange-hover);
    color: var(--saas-auth-on-orange);
}

html[data-bs-theme="dark"] body.saas-auth-shell .saas-auth-card .btn-auth-outline {
    background: transparent;
    color: var(--saas-folkwang-orange);
    border: 2px solid var(--saas-folkwang-orange);
    font-weight: 600;
}

html[data-bs-theme="dark"] body.saas-auth-shell .saas-auth-card .btn-auth-outline:hover {
    background: var(--saas-folkwang-orange);
    color: var(--saas-auth-on-orange);
    border-color: var(--saas-folkwang-orange);
}

html[data-bs-theme="dark"] body.saas-auth-shell .saas-auth-card .btn-link.gray-link,
html[data-bs-theme="dark"] body.saas-auth-shell .saas-auth-card a.gray-link {
    color: #a8a8a8 !important;
}

html[data-bs-theme="dark"] body.saas-auth-shell .saas-auth-card .btn-link.gray-link:hover,
html[data-bs-theme="dark"] body.saas-auth-shell .saas-auth-card a.gray-link:hover {
    color: #d0d0d0 !important;
}

html[data-bs-theme="dark"] body.saas-auth-shell .saas-auth-card hr {
    border-color: rgba(255, 255, 255, 0.18);
    opacity: 1;
}

html[data-bs-theme="dark"] body.saas-auth-shell .saas-auth-card .text-body-secondary {
    color: #c0c0c0 !important;
}

html[data-bs-theme="dark"] body.saas-auth-shell .saas-auth-card .text-muted {
    color: #b0b0b0 !important;
}

html[data-bs-theme="dark"] body.saas-auth-shell .modal-content {
    background: #2a2a2a;
    color: #f5f5f5;
    border: 1px solid #4a4a4a;
}

html[data-bs-theme="dark"] body.saas-auth-shell .modal-header,
html[data-bs-theme="dark"] body.saas-auth-shell .modal-footer {
    border-color: #404040;
}

html[data-bs-theme="dark"] body.saas-auth-shell .modal-body .form-control {
    background-color: #2e2e2e !important;
    border: 2px solid #6a6a6a !important;
    color: #fff !important;
}

html[data-bs-theme="dark"] body.saas-auth-shell .modal-footer .btn-primary,
html[data-bs-theme="dark"] body.saas-auth-shell .modal-header .btn-primary {
    background-color: var(--saas-folkwang-orange);
    border-color: var(--saas-folkwang-orange);
    color: var(--saas-auth-on-orange);
    font-weight: 700;
}

html[data-bs-theme="dark"] body.saas-auth-shell .modal-footer .btn-secondary {
    background: #404040;
    border-color: #505050;
    color: #fff;
}

html[data-bs-theme="dark"] body.saas-auth-shell .modal .btn-close {
    filter: invert(1) grayscale(1);
    opacity: 0.75;
}

html[data-bs-theme="dark"] body.saas-auth-shell .saas-auth-totp-setup {
    background: #242424;
    border: 1px solid #4a4a4a;
    color: #f0f0f0;
}

/* —— Bright / Light (data-bs-theme=light, localStorage „bright“) —— */
html[data-bs-theme="light"] body.saas-auth-shell {
    background-color: #e9ecef !important;
    color: #212529;
}

html[data-bs-theme="light"] .saas-auth-top {
    background-color: #f8f9fa !important;
    border-color: #dee2e6 !important;
}

html[data-bs-theme="light"] .saas-auth-top .saas-guest-brand {
    color: #212529 !important;
}

html[data-bs-theme="light"] .saas-guest-footer {
    background-color: #f8f9fa;
    border-color: #dee2e6 !important;
}

html[data-bs-theme="light"] body.saas-auth-shell .saas-auth-card.card {
    background: #fff;
    border: 1px solid #ced4da !important;
    border-radius: 0.75rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    color: #212529;
}

html[data-bs-theme="light"] body.saas-auth-shell .saas-auth-card .card-header {
    text-align: center;
    background: #e9ecef !important;
    border-bottom: 1px solid #ced4da !important;
    padding: 1.5rem 1.25rem;
}

html[data-bs-theme="light"] body.saas-auth-shell .saas-auth-card .card-header h1 {
    color: #212529;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
}

html[data-bs-theme="light"] body.saas-auth-shell .saas-auth-card .card-header h1 i {
    color: var(--saas-folkwang-orange) !important;
}

html[data-bs-theme="light"] body.saas-auth-shell .saas-auth-card .subtitle {
    color: #495057;
    font-size: 0.95rem;
    margin: 0;
}

html[data-bs-theme="light"] body.saas-auth-shell .saas-auth-card .card-body {
    background: #fff;
    color: #212529;
}

html[data-bs-theme="light"] body.saas-auth-shell .saas-auth-card .form-label {
    color: #212529;
    font-weight: 500;
}

html[data-bs-theme="light"] body.saas-auth-shell .saas-auth-card .form-control,
html[data-bs-theme="light"] body.saas-auth-shell .saas-auth-card .form-select {
    background-color: #fff !important;
    border: 2px solid #adb5bd !important;
    color: #212529 !important;
    border-radius: 0.5rem;
}

html[data-bs-theme="light"] body.saas-auth-shell .saas-auth-card .form-control:focus,
html[data-bs-theme="light"] body.saas-auth-shell .saas-auth-card .form-select:focus {
    border-color: var(--saas-folkwang-orange) !important;
    box-shadow: 0 0 0 0.2rem rgba(var(--saas-folkwang-orange-rgb), 0.2) !important;
}

html[data-bs-theme="light"] body.saas-auth-shell .saas-auth-card .form-check-input {
    border: 2px solid #6c757d;
    background-color: #fff;
}

html[data-bs-theme="light"] body.saas-auth-shell .saas-auth-card .form-check-input:checked {
    background-color: var(--saas-folkwang-orange);
    border-color: var(--saas-folkwang-orange);
}

html[data-bs-theme="light"] body.saas-auth-shell .saas-auth-card .form-check-label {
    color: #212529;
}

html[data-bs-theme="light"] body.saas-auth-shell .saas-auth-card .btn-primary {
    background-color: var(--saas-folkwang-orange);
    border-color: var(--saas-folkwang-orange);
    color: var(--saas-auth-on-orange);
    font-weight: 700;
}

html[data-bs-theme="light"] body.saas-auth-shell .saas-auth-card .btn-primary:hover {
    background-color: var(--saas-folkwang-orange-hover);
    border-color: var(--saas-folkwang-orange-hover);
    color: var(--saas-auth-on-orange);
}

html[data-bs-theme="light"] body.saas-auth-shell .saas-auth-card .btn-auth-outline {
    background: transparent;
    color: #c87f0a;
    border: 2px solid var(--saas-folkwang-orange);
    font-weight: 600;
}

html[data-bs-theme="light"] body.saas-auth-shell .saas-auth-card .btn-auth-outline:hover {
    background: var(--saas-folkwang-orange);
    color: var(--saas-auth-on-orange);
    border-color: var(--saas-folkwang-orange);
}

html[data-bs-theme="light"] body.saas-auth-shell .saas-auth-card .btn-link.gray-link,
html[data-bs-theme="light"] body.saas-auth-shell .saas-auth-card a.gray-link {
    color: #6c757d !important;
}

html[data-bs-theme="light"] body.saas-auth-shell .saas-auth-card .btn-link.gray-link:hover,
html[data-bs-theme="light"] body.saas-auth-shell .saas-auth-card a.gray-link:hover {
    color: #495057 !important;
}

html[data-bs-theme="light"] body.saas-auth-shell .saas-auth-card hr {
    border-color: #dee2e6;
    opacity: 1;
}

html[data-bs-theme="light"] body.saas-auth-shell .saas-auth-card .text-body-secondary,
html[data-bs-theme="light"] body.saas-auth-shell .saas-auth-card .text-muted {
    color: #495057 !important;
}

html[data-bs-theme="light"] body.saas-auth-shell .modal-content {
    background: #fff;
    color: #212529;
    border: 1px solid #ced4da;
}

html[data-bs-theme="light"] body.saas-auth-shell .modal-body .form-control {
    background-color: #fff !important;
    border: 2px solid #adb5bd !important;
    color: #212529 !important;
}

html[data-bs-theme="light"] body.saas-auth-shell .modal-footer .btn-primary {
    background-color: var(--saas-folkwang-orange);
    border-color: var(--saas-folkwang-orange);
    color: var(--saas-auth-on-orange);
    font-weight: 700;
}

html[data-bs-theme="light"] body.saas-auth-shell .saas-auth-totp-setup {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #212529;
}

/* ---------- App-Bereich (Dashboard, Profil, …): Kacheln wie Johanniter, Bright wie Registrierung ---------- */

/* Dunkel (Standard-App unter data-bs-theme=dark): Kachel-Grid */
body.saas-body-app .dashboard-apps .dashboard-card,
body.saas-body-app .dashboard-quickactions .dashboard-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid #444;
    background-color: #3a3a3a;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    text-align: center;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

body.saas-body-app .dashboard-apps .dashboard-card:hover,
body.saas-body-app .dashboard-quickactions .dashboard-card:hover {
    background-color: #444;
    border-color: #555;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

body.saas-body-app .dashboard-apps .dashboard-card i,
body.saas-body-app .dashboard-quickactions .dashboard-card i {
    flex-shrink: 0;
    margin-bottom: 0.5rem;
    font-size: 2rem;
    color: var(--saas-folkwang-orange);
}

body.saas-body-app .dashboard-apps .dashboard-card span,
body.saas-body-app .dashboard-quickactions .dashboard-card span {
    text-align: center;
    max-width: 100%;
}

.dashboard-apps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    align-items: stretch;
}

@media (max-width: 991.98px) {
    .dashboard-apps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575.98px) {
    .dashboard-apps-grid {
        grid-template-columns: 1fr;
    }
}

.dashboard-tile-slot {
    position: relative;
    min-width: 0;
}

.dashboard-tile-slot .dashboard-card {
    height: 100%;
}

.dashboard-tile-drag {
    position: absolute;
    top: 4px;
    left: 4px;
    z-index: 2;
    cursor: grab;
    padding: 4px 8px;
    color: #888;
    line-height: 1;
    border-radius: 0.35rem;
    user-select: none;
}

.dashboard-tile-drag:active {
    cursor: grabbing;
}

.dashboard-tile-drag:hover {
    color: #ccc;
    background-color: rgba(0, 0, 0, 0.25);
}

.dashboard-tile-slot--dragging {
    opacity: 0.65;
}

/* Hell-Theme App: gleiche Farblogik wie Registrierung (saas-auth-shell light) */
html[data-bs-theme="light"] body.saas-body-app {
    background-color: #e9ecef !important;
}

html[data-bs-theme="light"] body.saas-body-app .saas-card.card {
    background: #fff;
    border: 1px solid #ced4da !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

html[data-bs-theme="light"] body.saas-body-app .saas-card .saas-card-header,
html[data-bs-theme="light"] body.saas-body-app .saas-card .card-header {
    background-color: #e9ecef !important;
    border-bottom: 1px solid #dee2e6 !important;
    color: #212529;
}

html[data-bs-theme="light"] body.saas-body-app .saas-card .card-body {
    background: #fff;
    color: #212529;
}

html[data-bs-theme="light"] body.saas-body-app .saas-dashboard-apps-panel {
    background: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
}

html[data-bs-theme="light"] body.saas-body-app .saas-dashboard-apps-panel .card-header {
    background-color: transparent !important;
    border-color: #dee2e6 !important;
    color: #212529;
}

html[data-bs-theme="light"] body.saas-body-app .text-body-secondary {
    color: #495057 !important;
}

html[data-bs-theme="light"] body.saas-body-app .saas-card .text-primary,
html[data-bs-theme="light"] body.saas-body-app .saas-card-header .text-primary {
    color: var(--saas-folkwang-orange) !important;
}

html[data-bs-theme="light"] body.saas-body-app .dashboard-apps .dashboard-card,
html[data-bs-theme="light"] body.saas-body-app .dashboard-quickactions .dashboard-card {
    background-color: #fff !important;
    border: 2px solid #dee2e6 !important;
    color: #212529 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

html[data-bs-theme="light"] body.saas-body-app .dashboard-apps .dashboard-card:hover,
html[data-bs-theme="light"] body.saas-body-app .dashboard-quickactions .dashboard-card:hover {
    background-color: #fff9f0 !important;
    border-color: var(--saas-folkwang-orange) !important;
    color: #212529 !important;
    box-shadow: 0 4px 12px rgba(var(--saas-folkwang-orange-rgb), 0.18);
}

html[data-bs-theme="light"] body.saas-body-app .dashboard-apps .dashboard-card i,
html[data-bs-theme="light"] body.saas-body-app .dashboard-quickactions .dashboard-card i {
    color: var(--saas-folkwang-orange) !important;
}

html[data-bs-theme="light"] body.saas-body-app .dashboard-tile-drag {
    color: #6c757d;
}

html[data-bs-theme="light"] body.saas-body-app .dashboard-tile-drag:hover {
    color: #495057;
    background-color: rgba(0, 0, 0, 0.06);
}

/* Fußzeile im Bright-Mode lesbar auf hellem Untergrund */
html[data-bs-theme="light"] .saas-dash-footer {
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
}

/* Bright + App: Tabellen/Nav (z. B. UAM) – Bootswatch-Dark bleibt oft dunkel trotz heller Card */
html[data-bs-theme="light"] body.saas-body-app .saas-card .table {
    --bs-table-color: #212529;
    --bs-table-bg: #fff;
    --bs-table-striped-color: #212529;
    --bs-table-striped-bg: rgba(0, 0, 0, 0.04);
    --bs-table-active-color: #212529;
    --bs-table-active-bg: rgba(0, 0, 0, 0.08);
    --bs-table-hover-color: #212529;
    --bs-table-hover-bg: rgba(0, 0, 0, 0.075);
    --bs-table-border-color: #dee2e6;
    color: #212529;
    border-color: #dee2e6;
}

html[data-bs-theme="light"] body.saas-body-app .saas-card .table thead th {
    background-color: #e9ecef;
    color: #212529;
    border-bottom-color: #dee2e6;
}

html[data-bs-theme="light"] body.saas-body-app .saas-card .nav-tabs {
    border-bottom-color: #dee2e6;
}

html[data-bs-theme="light"] body.saas-body-app .saas-card .nav-tabs .nav-link {
    color: #495057;
}

html[data-bs-theme="light"] body.saas-body-app .saas-card .nav-tabs .nav-link:hover {
    color: #212529;
    border-color: #dee2e6 #dee2e6 transparent;
}

html[data-bs-theme="light"] body.saas-body-app .saas-card .nav-tabs .nav-link.active {
    color: #212529;
    background-color: #fff;
    border-color: #dee2e6 #dee2e6 #fff;
}

/* UAM User2Rolle: eingebettete Standard-Cards */
html[data-bs-theme="light"] body.saas-body-app .saas-admin-uam .card:not(.saas-card) {
    background-color: #fff;
    border-color: #dee2e6;
    color: #212529;
}

html[data-bs-theme="light"] body.saas-body-app .saas-admin-uam .card:not(.saas-card) .card-header:not(.bg-primary) {
    background-color: #e9ecef !important;
    border-bottom-color: #dee2e6;
    color: #212529;
}

html[data-bs-theme="light"] body.saas-body-app .saas-admin-uam .admin-u2r-card-body,
html[data-bs-theme="light"] body.saas-body-app .saas-admin-uam .admin-u2r-dropzone {
    background-color: #f8f9fa;
}

html[data-bs-theme="light"] body.saas-body-app .saas-admin-uam .list-group-item {
    background-color: #fff;
    border-color: #dee2e6;
    color: #212529;
}

html[data-bs-theme="light"] body.saas-body-app .saas-admin-uam .text-muted {
    color: #6c757d !important;
}

/* UAM (ERP-Anlehnung): kompakte Filter + Scrollbereiche Modal */
.scroll-max-260 {
    max-height: 260px;
    overflow-y: auto;
}

.scroll-max-300 {
    max-height: 300px;
    overflow-y: auto;
}

.form-control-h38,
.form-select-h38 {
    height: 38px;
}

.btn.btn-h38 {
    height: 38px;
    padding-top: 0;
    padding-bottom: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.page-uam .saas-uam-filter-card .card:not(.saas-card) {
    background: inherit;
}

/* Formulare-Übersicht (Farben angelehnt an ERP_FUDK templates/formulare/index.twig) */
@media (min-width: 576px) {
    .formulare-search-group {
        max-width: 32rem;
    }
}

.saas-formulare-page .form-text.text-muted {
    color: rgba(255, 255, 255, 0.75) !important;
}

[data-theme="bright"] .saas-formulare-page .form-text.text-muted {
    color: rgba(33, 37, 41, 0.75) !important;
}

#formulareAccordion .accordion-item {
    background-color: #222 !important;
    border: 1px solid #444 !important;
    border-radius: 0.5rem !important;
    margin-bottom: 0.75rem !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    overflow: hidden;
}

#formulareAccordion .accordion-button {
    background-color: #2a2a2a !important;
    color: #fff !important;
    border: none !important;
    border-bottom: 1px solid #444 !important;
    padding: 1rem 1.25rem !important;
    font-weight: 500 !important;
}

#formulareAccordion .accordion-button:not(.collapsed) {
    background-color: #333 !important;
    color: #fff !important;
    border-bottom: 1px solid #555 !important;
    box-shadow: inset 0 -1px 0 0 rgba(243, 156, 18, 0.2) !important;
}

#formulareAccordion .accordion-button:hover {
    background-color: #333 !important;
}

#formulareAccordion .accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(243, 156, 18, 0.25) !important;
    border-color: #f39c12 !important;
}

#formulareAccordion .accordion-body {
    background-color: #222 !important;
    color: #fff !important;
    padding: 1.25rem !important;
    border-top: 1px solid #333 !important;
}

#formulareAccordion .accordion-body .list-unstyled {
    margin: 0;
    padding: 0;
}

#formulareAccordion .accordion-body .list-unstyled li a {
    color: #f39c12;
    text-decoration: none;
}

#formulareAccordion .accordion-body .list-unstyled li a:hover,
#formulareAccordion .accordion-body .list-unstyled li a:focus-visible {
    color: #d68910;
    text-decoration: underline;
}

/* Hell-Theme (data-theme entspricht theme.js bei SAAS wie ERP_Vorlage) */
[data-theme="bright"] #formulareAccordion .accordion-item {
    background-color: #ffffff !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="bright"] #formulareAccordion .accordion-button {
    background-color: #f8f9fa !important;
    color: #212529 !important;
    border-bottom: 1px solid #dee2e6 !important;
}

[data-theme="bright"] #formulareAccordion .accordion-button:not(.collapsed) {
    background-color: #e9ecef !important;
    color: #212529 !important;
    border-bottom: 1px solid #ced4da !important;
}

[data-theme="bright"] #formulareAccordion .accordion-button:hover {
    background-color: #e9ecef !important;
}

[data-theme="bright"] #formulareAccordion .accordion-body {
    background-color: #ffffff !important;
    color: #212529 !important;
    border-top: 1px solid #e9ecef !important;
}

[data-theme="bright"] #formulareAccordion .accordion-body .list-unstyled li a {
    color: #f39c12;
}

[data-theme="bright"] #formulareAccordion .accordion-body .list-unstyled li a:hover,
[data-theme="bright"] #formulareAccordion .accordion-body .list-unstyled li a:focus-visible {
    color: #d68910;
}
