/* flowDeck⁺ settings surface */

#einstellungenPage .topbar-title h2,
#einstellungenPage .settings-folder-title {
    font-family: var(--fd-font-condensed) !important;
    letter-spacing: 0;
}

#einstellungenPage .settings-card-title,
#einstellungenPage .settings-admin-status-title {
    font-family: var(--fd-font-main) !important;
    letter-spacing: 0;
}

#einstellungenPage {
    color: var(--fd-text);
    font-size: 13px;
    line-height: 1.38;
}

#einstellungenPage .topbar {
    margin-bottom: 14px;
}

#einstellungenPage .topbar-title h2 {
    font-size: inherit;
    font-weight: inherit;
    line-height: 1.2;
}

#einstellungenPage .topbar-subtitle {
    color: #66758a;
    font-size: 12px;
}

#einstellungenPage .settings-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
    gap: 6px;
    margin-bottom: 18px;
    padding: 4px;
    border: 1px solid #dfe7f0;
    border-radius: 9px;
    background: #eef3f8;
    box-shadow: none;
}

#einstellungenPage .settings-tabs .btn {
    width: 100%;
    min-height: 34px;
    height: 34px;
    padding: 0 12px;
    border-radius: 8px !important;
    box-shadow: none;
    font-size: 13px;
    font-weight: 650;
}

#einstellungenPage .settings-tabs .btn.btn-primary {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 8px 16px rgba(37, 99, 235, .16) !important;
}

#einstellungenPage .settings-tabs .btn.btn-outline-primary {
    background: rgba(255, 255, 255, .82) !important;
    border-color: #cfe0f5 !important;
    color: #1f5fd1 !important;
}

#einstellungenPage .settings-tabs .btn:hover,
#einstellungenPage .settings-tabs .btn:focus-visible {
    background: #ffffff !important;
    border-color: #93b7ef !important;
    color: #174ea6 !important;
}

#einstellungenPage .settings-section {
    min-width: 0;
}

#einstellungenPage .settings-section.is-active {
    padding-top: 16px;
}

#einstellungenPage .settings-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(340px, 1fr));
    gap: 14px;
    align-items: start;
    width: 100%;
    max-width: 1560px;
    margin: 0 auto;
}

#einstellungenPage .settings-overview-grid > .settings-card,
#settingsHomeSection .settings-home-layout > .settings-card {
    min-width: 0;
}

#settingsDocumentsSection .settings-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
        "documents flowcalc"
        "flowmail flowmail";
    align-items: start;
}

#settingsDocumentsSection .settings-flowmail-card {
    grid-area: flowmail;
}

#settingsDocumentsSection .settings-documents-card {
    grid-area: documents;
}

#settingsDocumentsSection .settings-babe-card {
    grid-area: flowcalc;
}

#settingsUsersSection.is-active {
    width: 100%;
    max-width: 1560px;
    margin: 0 auto;
}

#settingsUsersSection > .settings-card {
    min-width: 0;
    width: 100%;
}

#settingsHomeSection .settings-home-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(440px, 1fr));
    gap: 14px;
    align-items: start;
    max-width: 1440px;
    margin: 0 auto;
}

#settingsHomeSection .settings-card {
    grid-area: auto !important;
    width: 100%;
}

#settingsHomeSection .settings-home-shortcuts-card {
    grid-column: 1 / -1;
}

#settingsHomeSection .settings-home-shortcut-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

#settingsHomeSection .settings-home-shortcut-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    padding: 9px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #f8fbff;
}

#settingsHomeSection .settings-home-shortcut-slot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #eaf2ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
}

#settingsHomeSection .settings-home-shortcut-row .form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    grid-column: 1 / -1;
    min-height: auto;
    margin: 0;
    padding: 7px 9px;
    line-height: 1.2;
}

#settingsHomeSection .settings-home-shortcut-row .form-check-input {
    flex: 0 0 auto;
    margin: 0;
}

#settingsHomeSection .settings-home-shortcut-row .form-check-label {
    min-width: 0;
}

#settingsHomeSection .settings-calendar-card,
#settingsHomeSection .settings-weather-card {
    align-self: stretch;
}

#settingsFlowCheckSection .settings-overview-grid {
    grid-template-areas: none;
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
}

#settingsFlowCheckSection .settings-system-card {
    grid-area: auto;
    width: 100%;
}

#settingsSystemSection .settings-system-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
    gap: 16px;
    align-items: start;
    width: 100%;
    max-width: 1560px;
    margin: 0 auto;
}

#settingsSystemSection .settings-system-column {
    display: grid;
    align-content: start;
    gap: 16px;
    min-width: 0;
}

#settingsSystemSection .settings-system-group {
    display: grid;
    align-content: start;
    gap: 12px;
    min-width: 0;
}

#settingsSystemSection .settings-system-column > .settings-system-group {
    grid-column: auto;
}

#settingsSystemSection .settings-system-group-head {
    display: grid;
    gap: 2px;
    min-width: 0;
    min-height: 0;
    padding: 0 2px 8px;
    border-bottom: 1px solid #e8eef7;
}

#settingsSystemSection .settings-system-group-title {
    color: #172033;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
}

#settingsSystemSection .settings-system-group-subtitle {
    margin-top: 2px;
    color: #68778c;
    font-size: 12px;
    line-height: 1.25;
}

#settingsSystemSection .settings-system-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
    min-width: 0;
}

#settingsSystemSection .settings-card {
    align-self: stretch;
    width: 100%;
}

#settingsSystemSection .settings-system-card-grid > .settings-card {
    min-height: 0;
}

#settingsSystemSection .settings-system-group > .settings-card,
#settingsSystemSection .settings-system-card-grid > .settings-card {
    margin: 0;
}

#settingsSystemSection .settings-preview-engine-card {
    grid-column: 1 / -1;
}

#settingsSystemSection .settings-modules-card,
#settingsSystemSection .settings-maintenance-card {
    display: flex;
    flex-direction: column;
}

#settingsSystemSection .settings-modules-card .settings-module-list,
#settingsSystemSection .settings-maintenance-card .settings-folder-list {
    flex: 1 1 auto;
}

#einstellungenPage .settings-flowkv-source-switch {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    min-height: 38px;
    padding: 3px;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #f8fafc;
}

#einstellungenPage .settings-flowkv-source-switch button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    height: 30px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #475569;
    font-size: 13px;
    font-weight: 800;
}

#einstellungenPage .settings-flowkv-source-switch button:hover,
#einstellungenPage .settings-flowkv-source-switch button:focus-visible {
    color: #0d6efd;
    outline: none;
}

#einstellungenPage .settings-flowkv-source-switch button.is-active {
    background: #ffffff;
    color: #0d6efd;
    box-shadow: 0 1px 5px rgba(15, 23, 42, .12);
}

#einstellungenPage .settings-flowkv-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    margin: 0;
    padding: 8px 12px;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

#einstellungenPage .settings-flowkv-toggle input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #0d6efd;
}

#einstellungenPage .settings-data-backup-action-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: end;
    min-width: 0;
}

#einstellungenPage .settings-data-backup-select {
    min-width: 0;
}

#einstellungenPage .settings-data-backup-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
    align-items: end;
    justify-content: stretch;
    min-width: 0;
    max-width: 100%;
}

#einstellungenPage .settings-data-backup-actions .card-action-btn {
    width: 100%;
    min-width: 0 !important;
    white-space: normal;
}

#einstellungenPage #settingsRestoreDataBackupBtn {
    min-width: 0 !important;
    white-space: normal;
}

#einstellungenPage .settings-muted-line,
#einstellungenPage .settings-admin-note,
#einstellungenPage .settings-admin-log,
#einstellungenPage #settingsSetupBackupPath {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

#einstellungenPage .settings-card {
    display: block;
    min-width: 0;
    overflow: hidden;
    padding: 13px;
    border-color: #dfe7f0;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    color: var(--fd-text);
    font-size: 13px;
    line-height: 1.38;
}

#einstellungenPage .settings-card-head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 13px;
    min-height: 42px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eef2f7;
}

#einstellungenPage .settings-user-card .settings-card-head {
    justify-content: space-between;
}

#einstellungenPage .settings-card-head > .settings-card-icon + div,
#einstellungenPage .settings-card-head > .d-flex {
    min-width: 0;
}

#einstellungenPage .settings-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border: 1px solid #d9e5f4;
    border-radius: 7px;
    background: #f6f9fd;
    color: #2563eb;
    font-size: 16px;
}

#einstellungenPage .settings-card-title {
    color: #172033;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.22;
}

#einstellungenPage .settings-card-subtitle {
    margin-top: 2px;
    color: #68778c;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.32;
}

#einstellungenPage .settings-user-delegation {
    border-top: 1px solid #e2e8f0;
}

#einstellungenPage .settings-card-head.compact-head {
    justify-content: flex-start;
    margin-bottom: 10px;
}

#einstellungenPage .settings-delegation-form {
    padding: 11px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

#einstellungenPage .settings-delegation-check {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 1.75rem;
}

#einstellungenPage .settings-delegation-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

#einstellungenPage .settings-mini-title {
    margin-bottom: 7px;
    color: #334155;
    font-size: 12px;
    font-weight: 750;
}

#einstellungenPage .settings-delegation-list {
    display: grid;
    gap: 8px;
}

#einstellungenPage .settings-delegation-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 10px;
    border: 1px solid #dbe6f3;
    border-radius: 8px;
    background: #ffffff;
}

#einstellungenPage .settings-delegation-copy {
    min-width: 0;
}

#einstellungenPage .settings-delegation-title {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: #172033;
    font-size: 13px;
    font-weight: 700;
}

#einstellungenPage .settings-delegation-title span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#einstellungenPage .settings-delegation-meta {
    margin-top: 2px;
    color: #64748b;
    font-size: 12px;
}

#einstellungenPage .settings-delegation-badge {
    flex: 0 0 auto;
    padding: 2px 7px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    color: #475569;
    background: #f8fafc;
    font-size: 11px;
    font-weight: 700;
}

#einstellungenPage .settings-delegation-badge.is-aktiv {
    border-color: rgba(22, 163, 74, .28);
    color: #15803d;
    background: #dcfce7;
}

#einstellungenPage .settings-delegation-badge.is-geplant {
    border-color: rgba(37, 99, 235, .24);
    color: #1d4ed8;
    background: #dbeafe;
}

#einstellungenPage .settings-delegation-badge.is-abgelaufen,
#einstellungenPage .settings-delegation-badge.is-inaktiv {
    border-color: #e2e8f0;
    color: #64748b;
    background: #f1f5f9;
}

#einstellungenPage .settings-sync-note {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 8px 10px;
    border: 1px solid #dbe7f6;
    border-radius: 7px;
    background: #f8fbff;
    color: #516176;
    font-size: 12px;
    line-height: 1.3;
}

#einstellungenPage .settings-sync-note i {
    color: #2563eb;
}

#einstellungenPage .settings-sync-note.is-pending {
    border-color: #fed7aa;
    background: #fff7ed;
    color: #9a3412;
}

#einstellungenPage .settings-sync-note.is-pending i {
    color: #f97316;
}

#einstellungenPage .settings-sync-note.is-ok {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

#einstellungenPage .settings-sync-note.is-ok i {
    color: #16a34a;
}

#einstellungenPage .settings-field-grid {
    gap: 10px 12px;
}

#einstellungenPage .settings-card label,
#einstellungenPage .settings-card .form-check-label {
    color: #263246;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.32;
}

#einstellungenPage .settings-card label:not(.form-check),
#einstellungenPage .settings-card .form-check-label {
    margin-bottom: 5px;
}

#einstellungenPage .settings-card .form-control,
#einstellungenPage .settings-card .form-select,
#einstellungenPage .settings-card textarea.form-control {
    min-height: 38px;
    border-color: #d7e0eb;
    border-radius: 7px;
    color: #172033;
    font-size: 13px;
    font-weight: 400;
    box-shadow: none;
}

#einstellungenPage .settings-card .form-control:focus,
#einstellungenPage .settings-card .form-select:focus,
#einstellungenPage .settings-card textarea.form-control:focus {
    border-color: #9bbcf7;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

#einstellungenPage .settings-card .form-check {
    min-height: 38px;
    padding: 8px 10px;
    border-color: #e3eaf2;
    border-radius: 7px;
    background: #fbfcfe;
}

#einstellungenPage .settings-admin-status-grid {
    gap: 1px;
    overflow: hidden;
    border: 1px solid #e1e8f0;
    border-radius: 8px;
    background: #e1e8f0;
}

#einstellungenPage .settings-admin-status-item {
    min-width: 0;
    padding: 9px 10px;
    border: 0;
    border-radius: 0;
    background: #fbfcfe;
}

#einstellungenPage .settings-admin-status-value {
    overflow: hidden;
    color: #172033;
    font-size: 15px;
    font-weight: 750;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#einstellungenPage .settings-admin-status-label {
    margin-top: 3px;
    color: #6b7a90;
    font-size: 12px;
    line-height: 1.32;
}

#einstellungenPage .settings-folder-list {
    gap: 7px;
}

#einstellungenPage .settings-migration-list {
    gap: 0;
    overflow: hidden;
    border: 1px solid #e1e8f0;
    border-radius: 8px;
}

#einstellungenPage .settings-migration-row {
    padding: 9px 10px;
    border: 0;
    border-bottom: 1px solid #e1e8f0;
    border-radius: 0;
    background: #ffffff;
}

#einstellungenPage .settings-folder-row {
    padding: 9px 10px;
    border: 1px solid #e1e8f0;
    border-radius: 7px;
    background: #fbfcfe;
}

#einstellungenPage .settings-module-list {
    display: grid;
    gap: 10px;
}

#einstellungenPage .settings-module-group-title {
    margin-top: 4px;
    color: #1e3a8a;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

#einstellungenPage .settings-module-area {
    overflow: hidden;
    border: 1px solid #dde7f2;
    border-radius: 9px;
    background: #f8fbff;
}

#einstellungenPage .settings-module-area-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
    padding: 10px 11px;
    border-bottom: 1px solid #dde7f2;
    background: #eef5ff;
}

#einstellungenPage .settings-module-area-title {
    color: #10284f;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
}

#einstellungenPage .settings-module-area-description {
    margin-top: 2px;
    color: #61748e;
    font-size: 11px;
    line-height: 1.3;
}

#einstellungenPage .settings-module-area-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #ffffff;
    color: #1d4ed8;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

#einstellungenPage .settings-module-area-list {
    display: grid;
    gap: 0;
}

#einstellungenPage .settings-module-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 9px 10px;
    border: 0;
    border-bottom: 1px solid #e1e8f0;
    border-radius: 0;
    background: #fbfcfe;
}

#einstellungenPage .settings-module-row:last-child {
    border-bottom: 0;
}

#einstellungenPage .settings-module-row .form-check {
    min-height: 0;
    margin: 0;
    padding: 0 0 0 2.5em;
    border: 0;
    background: transparent;
}

#einstellungenPage .settings-module-row.is-fixed {
    background: #f8fbff;
}

#einstellungenPage .settings-module-row.is-dependent-disabled {
    background: #f8fafc;
}

#einstellungenPage .settings-module-row.is-dependent-disabled .settings-module-meta {
    opacity: .78;
}

#einstellungenPage .settings-module-fixed-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 9px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

#einstellungenPage .settings-module-meta {
    min-width: 0;
}

#einstellungenPage .settings-module-dependency-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    padding: 2px 6px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 10px;
    font-weight: 750;
    vertical-align: middle;
}

#einstellungenPage .settings-module-hint {
    margin-top: 3px;
    color: #64748b;
    font-size: 11px;
    line-height: 1.35;
}

#einstellungenPage .settings-folder-row:last-child,
#einstellungenPage .settings-migration-row:last-child {
    border-bottom: 0;
}

#einstellungenPage #settingsReloadTemplatesBtn {
    margin-top: 2px;
}

#einstellungenPage .settings-flowmail-card {
    border-left: 4px solid #be123c;
}

#einstellungenPage .settings-flowmail-card .settings-card-icon {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #be123c;
}

#einstellungenPage .settings-flowmail-note {
    margin-bottom: 12px;
    padding: 8px 10px;
    border: 1px solid #fecdd3;
    border-radius: 7px;
    background: #fff1f2;
    color: #9f1239;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.34;
}

#einstellungenPage .settings-flowmail-grid .settings-muted-line {
    padding: 0;
    border: 0;
    font-size: 11px;
}

#einstellungenPage .settings-flowmail-recipient-picker {
    overflow: hidden;
    border: 1px solid #d7e0eb;
    border-radius: 8px;
    background: #ffffff;
}

#einstellungenPage .settings-flowmail-recipient-picker:focus-within {
    border-color: #9bbcf7;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

#einstellungenPage .settings-flowmail-recipient-picker.is-disabled {
    opacity: .62;
    pointer-events: none;
}

#einstellungenPage .settings-flowmail-recipient-selected {
    display: flex;
    min-height: 38px;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    padding: 7px 8px;
    border-bottom: 1px solid #e6edf4;
    background: #f8fbff;
}

#einstellungenPage .settings-flowmail-recipient-placeholder,
#einstellungenPage .settings-flowmail-recipient-empty {
    color: #8090a8;
    font-size: 12px;
}

#einstellungenPage .settings-flowmail-recipient-chip {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    gap: 7px;
    padding: 4px 5px 4px 4px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: #172033;
    font-size: 12px;
    font-weight: 650;
    line-height: 1;
}

#einstellungenPage .settings-flowmail-recipient-name {
    overflow: hidden;
    max-width: 128px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#einstellungenPage .settings-flowmail-person-code {
    display: inline-flex;
    min-width: 28px;
    min-height: 22px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
}

#einstellungenPage .settings-flowmail-person-code {
    background: #2563eb;
    color: #ffffff;
}

#einstellungenPage .settings-flowmail-recipient-chip button {
    display: inline-flex;
    width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #64748b;
}

#einstellungenPage .settings-flowmail-recipient-chip button:hover,
#einstellungenPage .settings-flowmail-recipient-chip button:focus-visible {
    background: #dbeafe;
    color: #1d4ed8;
}

#einstellungenPage .settings-flowmail-recipient-search {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    min-height: 36px;
    padding: 0 8px;
    border-bottom: 1px solid #e6edf4;
    color: #64748b;
}

#einstellungenPage .settings-flowmail-recipient-search input {
    width: 100%;
    min-height: 34px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #172033;
    font-size: 12px;
}

#einstellungenPage .settings-flowmail-recipient-options {
    display: grid;
    max-height: 190px;
    overflow-y: auto;
    padding: 4px;
}

#einstellungenPage .settings-flowmail-recipient-option {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) minmax(84px, auto);
    gap: 8px;
    align-items: center;
    width: 100%;
    padding: 7px 8px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #172033;
    text-align: left;
}

#einstellungenPage .settings-flowmail-recipient-option:hover,
#einstellungenPage .settings-flowmail-recipient-option:focus-visible {
    background: #eff6ff;
    outline: 0;
}

#einstellungenPage .settings-flowmail-option-main {
    min-width: 0;
}

#einstellungenPage .settings-flowmail-option-main strong,
#einstellungenPage .settings-flowmail-option-main small,
#einstellungenPage .settings-flowmail-option-fullname {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#einstellungenPage .settings-flowmail-option-main strong {
    color: #172033;
    font-size: 12px;
    font-weight: 750;
}

#einstellungenPage .settings-flowmail-option-main small {
    margin-top: 1px;
    color: #64748b;
    font-size: 11px;
}

#einstellungenPage .settings-flowmail-option-fullname {
    justify-self: end;
    max-width: 140px;
    color: #8090a8;
    font-size: 11px;
}

#einstellungenPage .settings-flowmail-recipient-empty {
    padding: 10px 8px;
}

#einstellungenPage .settings-flowmail-templates {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #e6edf4;
}

#einstellungenPage .settings-flowmail-section-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

#einstellungenPage .settings-flowmail-section-title {
    color: #172033;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.2;
}

#einstellungenPage .settings-flowmail-template-list {
    display: grid;
    gap: 8px;
}

#einstellungenPage .settings-flowmail-template-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border: 1px solid #d7e0eb;
    border-radius: 8px;
    background: #f8fbff;
}

#einstellungenPage .settings-flowmail-template-main {
    min-width: 0;
}

#einstellungenPage .settings-flowmail-template-title {
    color: #172033;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.18;
}

#einstellungenPage .settings-flowmail-template-meta,
#einstellungenPage .settings-flowmail-template-subject,
#einstellungenPage .settings-flowmail-template-preview {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#einstellungenPage .settings-flowmail-template-meta {
    margin-top: 2px;
    color: #6b7a90;
    font-size: 11px;
    font-weight: 600;
}

#einstellungenPage .settings-flowmail-template-subject {
    margin-top: 5px;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
}

#einstellungenPage .settings-flowmail-template-preview {
    margin-top: 2px;
    color: #68778c;
    font-size: 11px;
}

#einstellungenPage .settings-flowmail-template-textarea {
    min-height: auto;
    resize: vertical;
}

#einstellungenPage .settings-flowmail-placeholder-hint {
    margin-top: 12px;
    padding: 8px 10px;
    border: 1px solid #dbeafe;
    border-radius: 7px;
    background: #eff6ff;
    color: #1e40af;
    font-size: 12px;
    line-height: 1.35;
}

#einstellungenPage .settings-folder-title {
    color: #243047;
    font-size: 14px;
    font-weight: 750;
    line-height: 1.22;
}

#einstellungenPage .settings-folder-path {
    color: #6b7a90;
    font-size: 12px;
    line-height: 1.32;
}

#einstellungenPage .settings-muted-line {
    padding: 9px 0 0;
    border-top-color: #e6edf4;
    color: #6b7a90;
    font-size: 12px;
    line-height: 1.34;
}

#einstellungenPage .settings-admin-note {
    padding: 9px 10px;
    border-color: #ead9b8;
    border-radius: 7px;
    background: #fffaf0;
    color: #7a4c16;
    font-size: 12px;
    line-height: 1.34;
}

#einstellungenPage .settings-admin-log {
    border-color: #e1e8f0;
    border-radius: 8px;
    background: #fbfcfe;
    font-size: 12px;
}

#einstellungenPage .settings-flowbot-learning-panel {
    padding: 10px;
    border: 1px solid #e1e8f0;
    border-radius: 8px;
    background: #fbfcfe;
}

#settingsFlowBotSection > .settings-overview-grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 1600px;
    margin-inline: auto;
}

#settingsFlowBotSection > .settings-overview-grid > .settings-card {
    display: grid;
    grid-template-columns: minmax(340px, .72fr) minmax(560px, 1.28fr);
    grid-template-areas:
        "head head"
        "status sources"
        "enabled sources"
        "connector sources"
        "model sources"
        "provider sources"
        "audit sources"
        "learning sources"
        "flowai sources"
        "note note"
        "auditlog auditlog"
        "learnpanel learnpanel"
        "save save";
    gap: 12px 16px;
    align-items: start;
}

#settingsFlowBotSection .settings-card-head {
    grid-area: head;
    margin-bottom: 0;
}

#settingsFlowBotSection > .settings-overview-grid > .settings-card > .settings-admin-status-grid {
    grid-area: status;
    margin-bottom: 0 !important;
}

#settingsFlowBotSection > .settings-overview-grid > .settings-card > .settings-switch-row {
    min-height: 40px;
    margin-bottom: 0 !important;
    padding: 8px 10px;
    border: 1px solid #dbe6f2;
    border-radius: 8px;
    background: #fbfdff;
}

#settingsFlowBotSection .settings-flowbot-toggle-enabled {
    grid-area: enabled;
}

#settingsFlowBotSection .settings-flowbot-toggle-connector {
    grid-area: connector;
}

#settingsFlowBotSection .settings-flowbot-provider-row {
    grid-area: model;
    margin: 0 !important;
}

#settingsFlowBotSection .settings-flowbot-provider-panel {
    grid-area: provider;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 0 !important;
    padding: 10px;
    border: 1px solid #dbe6f2;
    border-radius: 8px;
    background: #fbfdff;
}

#settingsFlowBotSection .settings-flowbot-provider-field {
    display: grid;
    gap: 4px;
    min-width: 0;
}

#settingsFlowBotSection .settings-flowbot-provider-note {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: #5b6f88;
    font-size: 12px;
}

body #settingsFlowBotSection .settings-flowbot-provider-field:not([hidden]) {
    grid-column: 1 / -1;
}

#settingsFlowBotSection .settings-flowbot-toggle-audit {
    grid-area: audit;
}

#settingsFlowBotSection .settings-flowbot-toggle-learning {
    grid-area: learning;
}

#settingsFlowBotSection .settings-flowbot-flowai-panel {
    grid-area: flowai;
    display: grid;
    gap: 10px;
    margin-bottom: 0 !important;
    padding: 10px;
    border: 1px solid #dbe6f2;
    border-radius: 8px;
    background: #fbfdff;
}

#settingsFlowBotSection .settings-flowbot-flowai-panel .settings-flowbot-panel-head {
    margin-bottom: 0;
}

#settingsFlowBotSection .settings-flowbot-flowai-panel .settings-flowbot-panel-title {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

#settingsFlowBotSection .settings-flowbot-flowai-panel .settings-flowbot-panel-title i {
    color: #2563eb;
    font-size: 14px;
}

#settingsFlowBotSection .settings-flowbot-flowai-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

#settingsFlowBotSection .settings-flowbot-flowai-item {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 8px;
    border: 1px solid #e2eaf5;
    border-radius: 8px;
    background: #ffffff;
}

#settingsFlowBotSection .settings-flowbot-flowai-item span {
    color: #6b7a90;
    font-size: 11px;
    line-height: 1.1;
}

#settingsFlowBotSection .settings-flowbot-flowai-item strong {
    min-width: 0;
    color: #172033;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

#settingsFlowBotSection .settings-flowbot-flowai-contract {
    grid-column: 1 / -1;
}

#settingsFlowBotSection .settings-flowbot-flowai-toggles {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    min-width: 0;
}

#settingsFlowBotSection .settings-flowbot-toggle-reasoner,
#settingsFlowBotSection .settings-flowbot-flowai-toggle {
    min-height: 40px;
    margin-bottom: 0 !important;
    padding: 8px 10px;
    border: 1px solid #dbe6f2;
    border-radius: 8px;
    background: #ffffff;
}

#settingsFlowBotSection .settings-flowbot-toggle-reasoner .form-check-label,
#settingsFlowBotSection .settings-flowbot-flowai-toggle .form-check-label {
    display: grid;
    gap: 2px;
    min-width: 0;
}

#settingsFlowBotSection .settings-flowbot-toggle-reasoner small,
#settingsFlowBotSection .settings-flowbot-flowai-toggle small {
    color: #66758a;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.25;
}

#settingsFlowBotSection .settings-flowbot-flowai-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    min-height: 26px;
    padding: 3px 8px;
    border: 1px solid #dbe5f0;
    border-radius: 8px;
    background: #f7f9fc;
    color: #516174;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.1;
}

#settingsFlowBotSection .settings-flowbot-flowai-state.is-active {
    border-color: #22c55e;
    background: #ecfdf3;
    color: #166534;
}

#settingsFlowBotSection .settings-flowbot-flowai-state.is-warning {
    border-color: #facc15;
    background: #fffbeb;
    color: #854d0e;
}

#settingsFlowBotSection .settings-flowbot-sources-panel {
    grid-area: sources;
    margin-bottom: 0 !important;
}

#settingsFlowBotSection .settings-admin-note {
    grid-area: note;
    margin-bottom: 0 !important;
}

#settingsFlowBotAuditPreview {
    grid-area: auditlog;
    margin-bottom: 0 !important;
}

#settingsFlowBotSection .settings-flowbot-learning-panel {
    grid-area: learnpanel;
    margin-bottom: 0 !important;
}

#settingsFlowBotSection > .settings-overview-grid > .settings-card > .d-flex.justify-content-end {
    grid-area: save;
}

#einstellungenPage .settings-flowbot-sources-panel {
    padding: 12px;
    border: 1px solid #dce8f7;
    border-radius: 10px;
    background: #f8fbff;
}

#einstellungenPage .settings-flowbot-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

#einstellungenPage .settings-flowbot-panel-title,
#einstellungenPage .settings-flowbot-route-title {
    color: #172033;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.2;
}

#einstellungenPage .settings-flowbot-learning-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

#einstellungenPage .settings-flowbot-source-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

#einstellungenPage .settings-flowbot-source-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px;
    min-width: 0;
    padding: 10px;
    border: 1px solid #dfe7f0;
    border-radius: 9px;
    background: #ffffff;
}

#einstellungenPage .settings-flowbot-source-main {
    flex: 1 1 100%;
    min-width: 0;
}

#einstellungenPage .settings-flowbot-source-title {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #172033;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}

#einstellungenPage .settings-flowbot-source-title i {
    color: #2563eb;
    font-size: 14px;
}

#einstellungenPage .settings-flowbot-source-meta {
    margin-top: 3px;
    color: #6b7a90;
    font-size: 12px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

#einstellungenPage .settings-flowbot-source-cache {
    display: grid;
    flex: 1 1 96px;
    gap: 3px;
    min-width: 86px;
    color: #6b7a90;
    font-size: 11px;
    line-height: 1.1;
}

#einstellungenPage .settings-flowbot-source-cache:has(.input-group) {
    flex-basis: 154px;
}

#einstellungenPage .settings-flowbot-source-cache .form-control {
    height: 38px;
    min-height: 38px;
    padding: 4px 7px;
    font-size: 13px;
}

#einstellungenPage .settings-flowbot-source-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 0 0 auto;
    margin: 0 !important;
    padding-left: 10px !important;
    white-space: nowrap;
    border: 1px solid #d8e2ee;
    background: #f8fafc;
    color: #64748b;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}

#einstellungenPage .settings-flowbot-source-switch .form-check-input,
#settingsFlowBotSection .settings-switch-row .form-check-input {
    flex: 0 0 auto;
    width: 34px;
    height: 18px;
    margin-top: 0;
    margin-left: 0 !important;
    border: 1px solid #b8c6d8;
    background-color: #e8eef6;
    background-image: radial-gradient(circle at 8px 50%, #ffffff 0 5.5px, transparent 6px) !important;
    background-position: center;
    background-size: 100% 100%;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, .08);
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

#einstellungenPage .settings-flowbot-source-switch .form-check-input::before,
#settingsFlowBotSection .settings-switch-row .form-check-input::before {
    content: "";
    display: block;
    width: 12px;
    height: 12px;
    margin: 2px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .18);
    transition: transform .15s ease;
}

#einstellungenPage .settings-flowbot-source-switch .form-check-input:checked,
#settingsFlowBotSection .settings-switch-row .form-check-input:checked {
    border-color: #145de0;
    background-color: #2563eb;
    background-image: radial-gradient(circle at calc(100% - 8px) 50%, #ffffff 0 5.5px, transparent 6px) !important;
}

#einstellungenPage .settings-flowbot-source-switch .form-check-input:checked::before,
#settingsFlowBotSection .settings-switch-row .form-check-input:checked::before {
    transform: translateX(15px);
}

#einstellungenPage .settings-flowbot-source-switch:has(.form-check-input:checked),
#settingsFlowBotSection .settings-switch-row:has(.form-check-input:checked) {
    border-color: #a9c3ff;
    background: #eef5ff !important;
    color: #12377a;
}

#einstellungenPage .settings-flowbot-source-switch:not(:has(.form-check-input:checked)),
#settingsFlowBotSection .settings-switch-row:not(:has(.form-check-input:checked)) {
    border-color: #d8e2ee;
    background: #f8fafc !important;
    color: #64748b;
}

#einstellungenPage .settings-flowbot-source-switch:not(:has(.form-check-input:checked)) .form-check-label,
#settingsFlowBotSection .settings-switch-row:not(:has(.form-check-input:checked)) .form-check-label {
    color: #64748b;
    font-weight: 650;
}

#einstellungenPage .settings-flowbot-source-switch:has(.form-check-input:checked) .form-check-label,
#settingsFlowBotSection .settings-switch-row:has(.form-check-input:checked) .form-check-label {
    color: #102a63;
    font-weight: 760;
}

#einstellungenPage .settings-flowbot-source-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 86px;
    height: 38px;
    min-height: 38px;
    padding: 3px 8px;
    border: 1px solid #dbe5f0;
    border-radius: 999px;
    color: #516174;
    background: #f7f9fc;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.1;
    text-align: center;
}

#einstellungenPage .settings-flowbot-source-state.is-active {
    border-color: #58b368;
    color: #246b34;
    background: #eef9f0;
}

#einstellungenPage .settings-flowbot-source-state.is-warning {
    border-color: #f2bf5e;
    color: #8a5b10;
    background: #fff8e8;
}

#einstellungenPage .settings-flowbot-source-state.is-muted {
    color: #7a8797;
    background: #f1f4f8;
}

#einstellungenPage .settings-flowbot-web-provider-row {
    grid-column: 1 / -1;
    align-items: stretch;
    background: #fbfdff;
}

#einstellungenPage .settings-flowbot-provider-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 8px;
}

#einstellungenPage .settings-flowbot-provider-toggles .settings-flowbot-source-switch {
    min-height: 32px;
    padding: 6px 9px;
    border-radius: 7px;
}

#einstellungenPage .settings-flowbot-searxng-url {
    flex: 1 1 260px;
    min-width: 220px;
}

#einstellungenPage .settings-flowbot-source-test {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 0 0 auto;
    width: 92px;
    height: 38px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid #2563eb;
    border-radius: 7px;
    background: #ffffff;
    color: #145de0;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

#einstellungenPage .settings-flowbot-source-test:hover,
#einstellungenPage .settings-flowbot-source-test:focus-visible {
    background: #eef5ff;
    color: #0f4ab8;
}

#einstellungenPage .settings-flowbot-phrase-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(180px, .72fr) auto;
    gap: 8px;
    align-items: end;
}

#einstellungenPage .settings-flowbot-phrase-field,
#einstellungenPage .settings-flowbot-phrase-tool {
    min-width: 0;
}

#einstellungenPage .settings-flowbot-route-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

#einstellungenPage .settings-flowbot-route-section {
    min-width: 0;
}

#einstellungenPage .settings-flowbot-route-title {
    margin-bottom: 6px;
}

#einstellungenPage .settings-flowbot-route-list {
    display: grid;
    gap: 7px;
    max-height: 290px;
    overflow: auto;
    padding-right: 2px;
}

#einstellungenPage .settings-flowbot-route,
#einstellungenPage .settings-flowbot-route-empty {
    min-width: 0;
    padding: 8px;
    border: 1px solid #dfe7f0;
    border-radius: 7px;
    background: #ffffff;
}

#einstellungenPage .settings-flowbot-route {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

#einstellungenPage .settings-flowbot-route-main {
    min-width: 0;
}

#einstellungenPage .settings-flowbot-route-phrase {
    overflow-wrap: anywhere;
    color: #172033;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.28;
}

#einstellungenPage .settings-flowbot-route-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 8px;
    margin-top: 4px;
    color: #6b7a90;
    font-size: 11px;
    line-height: 1.25;
}

#einstellungenPage .settings-flowbot-route-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

#einstellungenPage .settings-flowbot-route-actions .card-action-btn {
    min-width: 104px;
}

#einstellungenPage .settings-flowbot-route-empty {
    color: #6b7a90;
    font-size: 12px;
    line-height: 1.32;
}

#einstellungenPage .settings-save-btn,
#einstellungenPage .card-action-btn {
    min-height: 36px !important;
    height: 36px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 14px;
    border-radius: 7px !important;
    box-shadow: none;
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
}

#einstellungenPage .settings-save-btn i.me-2,
#einstellungenPage .card-action-btn i.me-2 {
    margin-right: 0 !important;
}

#einstellungenPage .settings-support-card .card-action-btn,
#einstellungenPage .settings-setup-update-card .card-action-btn,
#einstellungenPage .settings-setup-update-card .settings-save-btn,
#einstellungenPage .settings-flowkv-card .card-action-btn,
#einstellungenPage .settings-flowkv-card .settings-save-btn,
#einstellungenPage .settings-flowskills-card .settings-save-btn,
#einstellungenPage .settings-migration-card .settings-save-btn {
    min-width: 168px;
}

#einstellungenPage .settings-support-card .d-flex.flex-wrap,
#einstellungenPage .settings-setup-update-card .d-flex.flex-wrap,
#einstellungenPage .settings-flowkv-card .d-flex.flex-wrap {
    justify-content: stretch !important;
}

#einstellungenPage .settings-support-card .d-flex.flex-wrap > .card-action-btn,
#einstellungenPage .settings-setup-update-card .d-flex.flex-wrap > .card-action-btn,
#einstellungenPage .settings-setup-update-card .d-flex.flex-wrap > .settings-save-btn,
#einstellungenPage .settings-flowkv-card .d-flex.flex-wrap > .card-action-btn,
#einstellungenPage .settings-flowkv-card .d-flex.flex-wrap > .settings-save-btn {
    flex: 1 1 168px;
}

#einstellungenPage .settings-setup-status-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

#einstellungenPage .btn-primary {
    background: #2563eb;
    border-color: #2563eb;
}

#einstellungenPage .btn-outline-primary,
#einstellungenPage .btn-outline-secondary {
    background: #ffffff;
}

#einstellungenPage .settings-icon-btn {
    width: 34px;
    min-width: 34px;
    height: 34px;
}

#einstellungenPage .settings-icon-btn i {
    font-size: 15px;
}

#einstellungenPage .rss-url-dropdown {
    border-color: #e1e8f0;
    border-radius: 8px;
    box-shadow: none;
}

#einstellungenPage .rss-url-dropdown summary {
    padding: 9px 10px;
    color: #263246;
    font-size: 12px;
    font-weight: 650;
}

#einstellungenPage .settings-widget-textarea {
    min-height: 118px;
}

#einstellungenPage .fd-brand-plus {
    margin-left: -.02em;
}

body.darkmode #einstellungenPage .settings-tabs {
    background: #111827;
    border-color: #334155;
}

body.darkmode #einstellungenPage .settings-tabs .btn.btn-primary,
body.darkmode #einstellungenPage .settings-tabs .btn:hover,
body.darkmode #einstellungenPage .settings-tabs .btn:focus-visible {
    background: #2563eb !important;
    border-color: #60a5fa !important;
    color: #ffffff !important;
}

body.darkmode #einstellungenPage .settings-tabs .btn.btn-outline-primary {
    background: rgba(15, 23, 42, .86) !important;
    border-color: #334155 !important;
    color: #bfdbfe !important;
}

body.darkmode #einstellungenPage .settings-card-head {
    border-bottom-color: #334155;
}

body.darkmode #einstellungenPage .settings-card,
body.darkmode #einstellungenPage .settings-flowbot-source-row,
body.darkmode #einstellungenPage .settings-flowbot-route,
body.darkmode #einstellungenPage .settings-flowbot-route-empty,
body.darkmode #einstellungenPage .settings-folder-row,
body.darkmode #einstellungenPage .settings-migration-row {
    background: #172036;
    border-color: #27354b;
    color: #f8fafc;
}

body.darkmode #einstellungenPage .settings-card-icon,
body.darkmode #einstellungenPage .settings-admin-status-item,
body.darkmode #einstellungenPage .settings-card .form-check,
body.darkmode #einstellungenPage .settings-admin-log,
body.darkmode #einstellungenPage .settings-flowbot-sources-panel,
body.darkmode #einstellungenPage .settings-flowbot-learning-panel,
body.darkmode #einstellungenPage .settings-flowbot-flowai-panel,
body.darkmode #einstellungenPage .settings-flowbot-flowai-item,
body.darkmode #einstellungenPage .rss-url-dropdown {
    background: #111827;
    border-color: #334155;
}

body.darkmode #einstellungenPage .settings-admin-status-grid,
body.darkmode #einstellungenPage .settings-migration-list {
    background: #334155;
    border-color: #334155;
}

body.darkmode #einstellungenPage .settings-module-row.is-dependent-disabled {
    background: #0f172a;
}

body.darkmode #einstellungenPage .settings-module-dependency-badge {
    background: #172554;
    border-color: #1d4ed8;
    color: #bfdbfe;
}

body.darkmode #einstellungenPage .settings-module-area {
    border-color: #334155;
    background: #111827;
}

body.darkmode #einstellungenPage .settings-module-area-head {
    border-bottom-color: #334155;
    background: #0f172a;
}

body.darkmode #einstellungenPage .settings-module-area-title {
    color: #f8fafc;
}

body.darkmode #einstellungenPage .settings-module-area-description {
    color: #cbd5e1;
}

body.darkmode #einstellungenPage .settings-module-area-count {
    background: #172554;
    border-color: #1d4ed8;
    color: #bfdbfe;
}

body.darkmode #einstellungenPage .settings-card-title,
body.darkmode #einstellungenPage .settings-flowbot-panel-title,
body.darkmode #einstellungenPage .settings-flowbot-source-title,
body.darkmode #einstellungenPage .settings-flowbot-route-title,
body.darkmode #einstellungenPage .settings-flowbot-route-phrase,
body.darkmode #einstellungenPage .settings-flowbot-flowai-item strong,
body.darkmode #einstellungenPage .settings-system-group-title,
body.darkmode #einstellungenPage .settings-card label,
body.darkmode #einstellungenPage .settings-card .form-check-label,
body.darkmode #einstellungenPage .settings-folder-title,
body.darkmode #einstellungenPage .settings-admin-status-value {
    color: #f8fafc !important;
}

body.darkmode #einstellungenPage .topbar-subtitle,
body.darkmode #einstellungenPage .settings-card-subtitle,
body.darkmode #einstellungenPage .settings-flowbot-source-meta,
body.darkmode #einstellungenPage .settings-folder-path,
body.darkmode #einstellungenPage .settings-module-hint,
body.darkmode #einstellungenPage .settings-muted-line,
body.darkmode #einstellungenPage .settings-flowbot-route-meta,
body.darkmode #einstellungenPage .settings-flowbot-flowai-item span,
body.darkmode #einstellungenPage .settings-system-group-subtitle,
body.darkmode #einstellungenPage .settings-admin-status-label {
    color: #cbd5e1 !important;
}

body.darkmode #einstellungenPage .settings-flowbot-flowai-state {
    border-color: #334155;
    background: #0f172a;
    color: #cbd5e1;
}

body.darkmode #einstellungenPage .settings-flowbot-flowai-state.is-active {
    border-color: #22c55e;
    background: rgba(22, 101, 52, .26);
    color: #bbf7d0;
}

body.darkmode #einstellungenPage .settings-flowbot-flowai-state.is-warning {
    border-color: #eab308;
    background: rgba(113, 63, 18, .28);
    color: #fde68a;
}

body.darkmode #einstellungenPage .settings-admin-note {
    background: rgba(146, 64, 14, .2);
    border-color: rgba(251, 191, 36, .26);
    color: #fde68a;
}

body.darkmode #einstellungenPage .settings-flowbot-source-state {
    background: #0f172a;
    border-color: #334155;
    color: #cbd5e1;
}

body.darkmode #einstellungenPage .settings-flowbot-source-state.is-active {
    background: #052e16;
    border-color: #15803d;
    color: #bbf7d0;
}

body.darkmode #einstellungenPage .settings-flowbot-source-state.is-warning {
    background: #422006;
    border-color: #b45309;
    color: #fde68a;
}

body.darkmode #einstellungenPage .settings-flowmail-card {
    border-left-color: #fb7185;
}

body.darkmode #einstellungenPage .settings-flowmail-card .settings-card-icon,
body.darkmode #einstellungenPage .settings-flowmail-note {
    background: #4c0519;
    border-color: #9f1239;
    color: #fecdd3;
}

body.darkmode #einstellungenPage .settings-flowmail-templates {
    border-top-color: #334155;
}

body.darkmode #einstellungenPage .settings-flowmail-section-title,
body.darkmode #einstellungenPage .settings-flowmail-template-title {
    color: #f8fafc;
}

body.darkmode #einstellungenPage .settings-flowmail-template-row {
    background: #111827;
    border-color: #334155;
}

body.darkmode #einstellungenPage .settings-flowmail-template-meta,
body.darkmode #einstellungenPage .settings-flowmail-template-preview {
    color: #cbd5e1;
}

body.darkmode #einstellungenPage .settings-flowmail-template-subject {
    color: #93c5fd;
}

body.darkmode #einstellungenPage .settings-flowmail-placeholder-hint {
    background: #172554;
    border-color: #1d4ed8;
    color: #bfdbfe;
}

body.darkmode #einstellungenPage .settings-flowmail-recipient-picker {
    background: #0f172a;
    border-color: #334155;
}

body.darkmode #einstellungenPage .settings-flowmail-recipient-selected {
    background: #111827;
    border-bottom-color: #334155;
}

body.darkmode #einstellungenPage .settings-flowmail-recipient-search {
    border-bottom-color: #334155;
    color: #94a3b8;
}

body.darkmode #einstellungenPage .settings-flowmail-recipient-search input,
body.darkmode #einstellungenPage .settings-flowmail-recipient-option,
body.darkmode #einstellungenPage .settings-flowmail-option-main strong,
body.darkmode #einstellungenPage .settings-flowmail-recipient-chip {
    color: #f8fafc;
}

body.darkmode #einstellungenPage .settings-flowmail-recipient-chip {
    background: #172554;
    border-color: #1d4ed8;
}

body.darkmode #einstellungenPage .settings-flowmail-recipient-option:hover,
body.darkmode #einstellungenPage .settings-flowmail-recipient-option:focus-visible {
    background: #172554;
}

body.darkmode #einstellungenPage .settings-flowmail-option-main small,
body.darkmode #einstellungenPage .settings-flowmail-option-fullname,
body.darkmode #einstellungenPage .settings-flowmail-recipient-placeholder,
body.darkmode #einstellungenPage .settings-flowmail-recipient-empty {
    color: #cbd5e1;
}

body.darkmode #einstellungenPage .settings-flowmail-recipient-chip button {
    color: #cbd5e1;
}

body.darkmode #einstellungenPage .settings-flowmail-recipient-chip button:hover,
body.darkmode #einstellungenPage .settings-flowmail-recipient-chip button:focus-visible {
    background: #1e3a8a;
    color: #bfdbfe;
}

body.darkmode #einstellungenPage .settings-module-group-title {
    color: #93c5fd;
}

body.darkmode #einstellungenPage .settings-module-row.is-fixed,
body.darkmode #einstellungenPage .settings-module-fixed-badge {
    border-color: #334155;
    background: #111827;
}

body.darkmode #einstellungenPage .settings-module-fixed-badge {
    color: #bfdbfe;
}

@media (max-width: 1200px) {
    #einstellungenPage .settings-overview-grid,
    #settingsHomeSection .settings-home-layout {
        grid-template-columns: 1fr;
    }

    #settingsSystemSection .settings-system-layout {
        grid-template-columns: 1fr;
    }

    #settingsSystemSection .settings-system-card-grid {
        grid-template-columns: 1fr;
    }

    #settingsHomeSection .settings-home-shortcut-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #einstellungenPage .settings-flowbot-phrase-form,
    #einstellungenPage .settings-flowbot-source-row,
    #einstellungenPage .settings-flowbot-route-columns,
    #settingsFlowBotSection .settings-flowbot-flowai-toggles,
    #einstellungenPage .settings-delegation-columns {
        grid-template-columns: 1fr;
    }

    #settingsSystemSection .settings-system-group-head {
        padding: 0;
    }
}

@media (max-width: 700px) {
    #settingsHomeSection .settings-home-shortcut-list {
        grid-template-columns: 1fr;
    }

    #einstellungenPage .settings-tabs {
        display: grid;
        grid-template-columns: 1fr;
    }

    #einstellungenPage .settings-card {
        padding: 13px;
    }

    #einstellungenPage .settings-admin-status-grid {
        grid-template-columns: 1fr;
    }

    #einstellungenPage .settings-flowbot-source-row {
        align-items: stretch;
    }

    #einstellungenPage .settings-flowbot-source-switch,
    #einstellungenPage .settings-flowbot-source-state {
        justify-content: flex-start;
    }

    #einstellungenPage .settings-flowbot-panel-head,
    #einstellungenPage .settings-flowbot-route {
        grid-template-columns: 1fr;
    }

    #einstellungenPage .settings-flowbot-panel-head {
        align-items: stretch;
        flex-direction: column;
    }

    #einstellungenPage .settings-flowbot-panel-head .card-action-btn,
    #einstellungenPage .settings-flowbot-phrase-form .card-action-btn,
    #einstellungenPage .settings-flowbot-route-actions .card-action-btn {
        width: 100%;
        min-width: 0;
    }

    #einstellungenPage .settings-flowbot-route-actions {
        justify-content: stretch;
    }

    #einstellungenPage .settings-data-backup-action-row,
    #einstellungenPage .settings-data-backup-actions {
        grid-template-columns: 1fr;
    }

    #einstellungenPage .settings-data-backup-actions {
        justify-content: stretch;
    }

    #einstellungenPage .settings-data-backup-actions .card-action-btn,
    #einstellungenPage #settingsRestoreDataBackupBtn {
        min-width: 0 !important;
    }

    #einstellungenPage .settings-folder-row {
        min-width: 0;
    }

    #einstellungenPage .settings-folder-row .card-action-btn,
    #einstellungenPage .settings-maintenance-card .card-action-btn,
    #einstellungenPage #settingsSaveWorkbookTrashBtn {
        width: 100%;
        min-width: 0 !important;
        white-space: normal;
    }
}

@media (min-width: 1121px) {
    #einstellungenPage .settings-tabs {
        display: grid !important;
        grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
        align-items: stretch !important;
    }

    #einstellungenPage .settings-tabs .btn {
        min-width: 0 !important;
    }
}

@media (min-width: 1181px) {
    #settingsDocumentsSection .settings-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        grid-template-areas:
            "documents flowcalc"
            "flowmail flowmail" !important;
    }
}

@media (max-width: 1180px) {
    #settingsDocumentsSection .settings-overview-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "documents"
            "flowcalc"
            "flowmail";
    }

    #settingsFlowBotSection > .settings-overview-grid > .settings-card {
        grid-template-columns: 1fr;
        grid-template-areas:
            "head"
            "status"
            "enabled"
            "connector"
            "model"
            "provider"
            "audit"
            "learning"
            "flowai"
            "sources"
            "note"
            "auditlog"
            "learnpanel"
            "save";
    }

    #einstellungenPage .settings-flowbot-source-list {
        grid-template-columns: 1fr;
    }

    #settingsFlowBotSection .settings-flowbot-provider-panel {
        grid-template-columns: 1fr;
    }

    #settingsFlowBotSection .settings-flowbot-flowai-grid {
        grid-template-columns: 1fr;
    }
}

/* 1.5 release polish: settings must read as a compact admin console. */
body #einstellungenPage .settings-tabs {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding: 6px !important;
    border-color: #d6e2ef !important;
    border-radius: 10px !important;
    background: #f4f7fb !important;
}

body #einstellungenPage .settings-tabs .btn {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 38px !important;
    height: 38px !important;
    padding: 0 10px !important;
    border: 1px solid #c6d8ee !important;
    border-radius: 7px !important;
    background: #ffffff !important;
    color: #1d4ed8 !important;
    font-size: 12px !important;
    font-weight: 650 !important;
    line-height: 1 !important;
    overflow: hidden;
    text-overflow: ellipsis;
}

body #einstellungenPage .settings-tabs .btn i {
    flex: 0 0 auto;
    margin-right: 0 !important;
    font-size: 14px;
    line-height: 1;
}

body #einstellungenPage .settings-tabs .btn .fd-brand-wordmark {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

body #einstellungenPage .settings-tabs .btn.btn-primary {
    border-color: #2563eb !important;
    background: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 8px 18px rgba(37, 99, 235, .14) !important;
}

body #einstellungenPage .settings-tabs .btn.btn-outline-primary:hover,
body #einstellungenPage .settings-tabs .btn.btn-outline-primary:focus-visible {
    border-color: #8fb4ea !important;
    background: #f8fbff !important;
    color: #174ea6 !important;
}

body #einstellungenPage .settings-tabs .btn.is-admin-denied {
    border-color: #d8e1ea !important;
    background: #f8fafc !important;
    color: #718096 !important;
    cursor: not-allowed;
}

body #einstellungenPage .settings-tabs .btn.is-admin-denied i,
body #einstellungenPage .settings-tabs .btn.is-admin-denied .fd-brand-wordmark {
    color: #94a3b8 !important;
}

body #einstellungenPage .settings-tabs .btn.is-admin-denied:hover,
body #einstellungenPage .settings-tabs .btn.is-admin-denied:focus-visible {
    border-color: #cbd5e1 !important;
    background: #f8fafc !important;
    color: #64748b !important;
}

body #einstellungenPage .settings-card {
    border: 1px solid #dbe6f2;
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .055);
}

body #einstellungenPage .settings-card-head {
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid #edf2f7;
}

body #einstellungenPage .settings-card-head > div:last-child {
    min-width: 0;
}

body #settingsFlowBotSection > .settings-overview-grid > .settings-card {
    grid-template-columns: minmax(360px, .86fr) minmax(560px, 1.14fr);
    grid-template-areas:
        "head head"
        "status sources"
        "enabled sources"
        "connector sources"
        "model sources"
        "provider sources"
        "audit sources"
        "learning sources"
        "flowai sources"
        "note sources"
        "auditlog sources"
        "learnpanel learnpanel"
        "save save";
    gap: 14px 16px;
    padding: 18px;
}

body #settingsFlowBotSection .settings-flowbot-provider-row {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px !important;
    margin: 0 !important;
}

body #settingsFlowBotSection .settings-flowbot-provider-row > [class*="col-"] {
    width: auto !important;
    max-width: none !important;
    padding: 0 !important;
}

body #settingsFlowBotSection .settings-flowbot-provider-panel,
body #settingsFlowBotSection .settings-flowbot-flowai-panel,
body #einstellungenPage .settings-flowbot-sources-panel,
body #einstellungenPage .settings-flowbot-learning-panel {
    border-radius: 8px;
    background: #fbfdff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

body #einstellungenPage .settings-flowbot-source-list {
    grid-template-columns: repeat(2, minmax(320px, 1fr));
    gap: 10px;
}

body #einstellungenPage .settings-flowbot-source-row {
    min-height: 122px;
    align-content: flex-start;
    gap: 10px;
    padding: 12px;
    border-color: #dbe6f2;
    border-radius: 8px;
}

body #einstellungenPage .settings-flowbot-source-main {
    padding-bottom: 8px;
    border-bottom: 1px solid #eef3f8;
}

body #einstellungenPage .settings-flowbot-source-title {
    font-size: 13px;
    font-weight: 750;
}

body #einstellungenPage .settings-flowbot-source-cache {
    flex: 1 1 94px;
    min-width: 88px;
}

body #einstellungenPage .settings-flowbot-source-cache:has(.input-group) {
    flex-basis: 154px;
    min-width: 142px;
    max-width: 168px;
}

body #einstellungenPage .settings-flowbot-source-switch {
    flex: 0 0 92px;
    min-height: 38px !important;
    padding: 8px 10px !important;
    border-radius: 7px !important;
}

body #einstellungenPage .settings-flowbot-source-state {
    flex: 0 0 92px;
    min-width: 92px;
    min-height: 38px;
    border-radius: 7px;
}

body #einstellungenPage .settings-flowbot-source-test {
    flex: 0 0 92px;
    min-height: 38px;
}

body #einstellungenPage .settings-flowbot-phrase-form {
    grid-template-columns: minmax(260px, 1fr) minmax(190px, .7fr) minmax(132px, auto);
}

body #einstellungenPage .settings-flowbot-route-list {
    max-height: 260px;
}

@media (max-width: 1400px) {
    body #settingsFlowBotSection > .settings-overview-grid > .settings-card {
        grid-template-columns: minmax(330px, .92fr) minmax(460px, 1.08fr);
    }

    body #einstellungenPage .settings-flowbot-source-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1120px) {
    body #einstellungenPage .settings-tabs {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    body #settingsFlowBotSection > .settings-overview-grid > .settings-card {
        grid-template-columns: 1fr;
        grid-template-areas:
            "head"
            "status"
            "enabled"
            "connector"
            "model"
            "provider"
            "audit"
            "learning"
            "flowai"
            "sources"
            "note"
            "auditlog"
            "learnpanel"
            "save";
    }
}

@media (max-width: 700px) {
    body #einstellungenPage .settings-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    body #settingsFlowBotSection .settings-flowbot-provider-row,
    body #einstellungenPage .settings-flowbot-phrase-form {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 460px) {
    body #einstellungenPage .settings-tabs {
        grid-template-columns: 1fr !important;
    }

    body #einstellungenPage .settings-tabs .btn {
        justify-content: flex-start !important;
    }
}

body.darkmode #einstellungenPage .settings-tabs {
    background: #0f172a !important;
    border-color: #334155 !important;
}

body.darkmode #einstellungenPage .settings-tabs .btn.btn-outline-primary {
    background: #172036 !important;
    border-color: #334155 !important;
    color: #bfdbfe !important;
}

body.darkmode #einstellungenPage .settings-flowbot-source-main {
    border-bottom-color: #334155;
}
