/* flowDeck+ 1.3.2 UI polish layer. Keep structural fixes here, not scattered per page. */
/* Copyright (c) 2026 Bernd Schartner. All rights reserved. */

:root {
    --fd-polish-line: #d7e2f1;
    --fd-polish-line-strong: #bfd2ee;
    --fd-polish-panel: #fbfdff;
    --fd-polish-panel-soft: #f6f9fc;
    --fd-polish-text: #172033;
    --fd-polish-muted: #65748b;
}

.modal-dialog {
    margin-top: 1.35rem;
    margin-bottom: 1.35rem;
}

.modal-content {
    overflow: hidden;
    border-color: var(--fd-polish-line) !important;
    border-radius: 8px !important;
    background: #ffffff;
    box-shadow: 0 22px 54px rgba(15, 23, 42, .22) !important;
}

.modal-header {
    min-height: 62px;
    align-items: center;
    padding: 15px 18px !important;
    border-bottom-color: var(--fd-polish-line) !important;
    background: var(--fd-polish-panel);
}

.modal-title {
    color: var(--fd-polish-text);
    font-size: 18px !important;
    font-weight: 760 !important;
    line-height: 1.22;
}

.modal-body {
    padding: 16px 18px !important;
    color: var(--fd-polish-text);
}

.modal-footer {
    min-height: 58px;
    gap: 8px;
    padding: 12px 18px !important;
    border-top-color: var(--fd-polish-line) !important;
    background: var(--fd-polish-panel-soft);
}

.modal-header .btn-close {
    width: 34px;
    height: 34px;
    margin: 0 !important;
    border-radius: 8px;
    opacity: .62;
    transition: background .14s ease, opacity .14s ease;
}

.modal-header .btn-close:hover,
.modal-header .btn-close:focus-visible {
    background-color: #eaf1fb;
    opacity: 1;
    box-shadow: none;
}

.modal-body .form-control,
.modal-body .form-select,
.modal-body textarea.form-control {
    border-color: var(--fd-polish-line-strong);
    background-color: #ffffff;
}

.modal-body .form-control:focus,
.modal-body .form-select:focus,
.modal-body textarea.form-control:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
}

.modal-body label,
.modal-body .form-label {
    color: #344258;
    font-size: 12px;
    font-weight: 760;
}

.modal-footer .btn,
.modal-body .btn {
    min-height: 38px;
}

.flowcrm-module {
    gap: 12px;
}

.flowcrm-header-card,
.flowcrm-filter-card,
.flowcrm-list-card,
.flowcrm-detail-card,
.flowcrm-kpi {
    border-color: var(--fd-polish-line) !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .055) !important;
}

.flowcrm-detail-card {
    background: #f8fbff !important;
}

.flowcrm-detail {
    display: grid;
    gap: 12px;
}

.flowcrm-detail-head {
    align-items: center;
    padding: 14px 16px;
    border: 1px solid #c9dbf4;
    border-left: 4px solid #2563eb;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(37, 99, 235, .07);
}

.flowcrm-detail-head.is-company-detail {
    border-left-color: #0f766e;
}

.flowcrm-detail-head.is-participant-detail {
    border-left-color: #4f46e5;
}

.flowcrm-case-company-title,
.flowcrm-case-participant-title {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #071426;
    font-weight: 820;
    line-height: 1.18;
}

.flowcrm-case-company-title {
    font-size: 18px;
}

.flowcrm-case-participant-title {
    margin-top: 3px;
    font-size: 15px;
}

.flowcrm-detail-meta {
    margin-top: 4px;
}

.flowcrm-detail-actions {
    align-items: center;
}

.flowcrm-detail-actions .card-action-btn {
    min-width: 158px;
    min-height: 38px;
}

.flowcrm-case-detail-head {
    align-items: flex-start !important;
}

.flowcrm-case-action-rail {
    align-items: flex-start !important;
    align-self: flex-start !important;
    flex-wrap: nowrap !important;
    width: auto !important;
    justify-content: flex-end !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.flowcrm-case-action-rail .card-action-btn {
    flex: 0 0 38px !important;
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
}

.flowcrm-quick-action {
    grid-template-columns: minmax(180px, .42fr) minmax(0, 1.58fr);
    gap: 14px;
    align-items: center;
    margin-top: 12px;
    padding: 12px 14px;
    border-color: #c9dbf4;
    background: #f4f8fd;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .82);
}

.flowcrm-quick-action .flowcrm-panel-title {
    font-size: 15px;
}

.flowcrm-quick-grid {
    grid-template-columns: minmax(146px, .85fr) 154px 154px minmax(230px, 1.45fr) minmax(142px, auto);
    gap: 9px;
}

.flowcrm-quick-grid .form-control,
.flowcrm-quick-grid .form-select,
.flowcrm-duration-stepper {
    min-height: 40px;
    border-radius: 8px;
}

#flowCrmQuickSaveBtn,
#flowCrmParticipantQuickSaveBtn,
#flowCrmEditCompanyFromCaseBtn,
#flowCrmEditParticipantFromCaseBtn {
    width: 148px !important;
    min-width: 148px !important;
    max-width: 148px !important;
    justify-content: center !important;
}

.flowcrm-duration-stepper {
    width: 154px;
    border-color: var(--fd-polish-line-strong);
    box-shadow: 0 1px 0 rgba(15, 23, 42, .03);
}

.flowcrm-duration-stepper-btn {
    background: #f6f9fc;
}

.flowcrm-duration-stepper-value {
    color: #102033;
    font-size: 12px;
    font-weight: 820;
}

.flowcrm-case-detail-grid {
    grid-template-columns: minmax(360px, .72fr) minmax(520px, 1.28fr);
    gap: 14px;
    align-items: start;
    margin-top: 0;
}

.flowcrm-case-side-stack,
.flowcrm-case-main-stack {
    gap: 12px;
}

.flowcrm-case-fields,
.flowcrm-case-history,
.flowcrm-dossier {
    border-color: var(--fd-polish-line) !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .045);
}

.flowcrm-case-fields {
    background: #ffffff;
}

.flowcrm-case-history {
    background: var(--fd-polish-panel);
}

.flowcrm-field-grid {
    gap: 10px 12px;
}

.flowcrm-detail label {
    color: #344258;
    font-size: 12px;
    font-weight: 760;
}

.flowcrm-detail .form-control,
.flowcrm-detail .form-select {
    border-color: var(--fd-polish-line-strong);
    background-color: #ffffff;
}

.flowcrm-dossier {
    background: #ffffff;
}

.flowcrm-dossier > .flowcrm-section-head {
    background: #f4f8fd;
}

.flowcrm-timeline {
    gap: 10px;
}

.flowcrm-timeline-group-title {
    color: #394a63;
    font-size: 12px;
    font-weight: 820;
}

.flowcrm-timeline-item {
    border-color: var(--fd-polish-line);
    border-left-width: 4px;
    background: #ffffff;
    box-shadow: 0 5px 14px rgba(15, 23, 42, .04);
}

.flowcrm-timeline-title {
    align-items: flex-start;
    font-size: 13px;
    font-weight: 780;
}

.flowcrm-timeline-title-meta {
    gap: 6px;
    color: var(--fd-polish-muted);
    font-size: 12px;
}

.flowcrm-timeline-note {
    margin-top: 5px;
    color: #52627a;
}

.flowcrm-empty {
    background: #ffffff;
}

.flowcrm-pill {
    border: 1px solid rgba(15, 118, 110, .18);
}

body.darkmode {
    --fd-polish-line: #263548;
    --fd-polish-line-strong: #334155;
    --fd-polish-panel: #111827;
    --fd-polish-panel-soft: #0f172a;
    --fd-polish-text: #e5edf7;
    --fd-polish-muted: #9aa8bc;
}

body.darkmode .modal-content,
body.darkmode .flowcrm-detail-head,
body.darkmode .flowcrm-case-fields,
body.darkmode .flowcrm-dossier,
body.darkmode .flowcrm-timeline-item,
body.darkmode .flowcrm-empty {
    background: #111827;
}

body.darkmode .modal-header,
body.darkmode .modal-footer,
body.darkmode .flowcrm-quick-action,
body.darkmode .flowcrm-case-history,
body.darkmode .flowcrm-dossier > .flowcrm-section-head {
    background: #0f172a;
}

body.darkmode .modal-title,
body.darkmode .flowcrm-case-company-title,
body.darkmode .flowcrm-case-participant-title {
    color: #f8fafc;
}

@media (max-width: 1250px) {
    .flowcrm-case-detail-grid,
    .flowcrm-quick-action,
    .flowcrm-quick-grid {
        grid-template-columns: 1fr;
    }

    .flowcrm-duration-stepper {
        width: 100%;
    }
}

@media (max-width: 760px) {
    .modal-dialog {
        margin: .75rem;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    .flowcrm-detail-head {
        align-items: stretch;
        flex-direction: column;
    }

    .flowcrm-detail-actions .card-action-btn {
        width: 100%;
        min-width: 0;
    }
}

.flowcrm-view-switch .btn.card-action-btn:not(.w-100):not(.settings-icon-btn):not(.flowcrm-contact-icon):not(.header-icon-button),
.flowcrm-view-switch .btn.card-action-btn.btn-sm:not(.w-100):not(.settings-icon-btn):not(.flowcrm-contact-icon):not(.header-icon-button) {
    min-width: 0 !important;
    padding-left: 4px !important;
    padding-right: 4px !important;
}

/* Premium shell pass: applied after legacy/module styles. */

html {
    background: #edf2f7;
}

body {
    background:
        radial-gradient(circle at 18% -10%, rgba(14, 165, 233, .08), transparent 28rem),
        linear-gradient(180deg, #f6f8fb 0%, #eef3f8 100%);
    color: #142033;
}

.sidebar {
    background: linear-gradient(180deg, #071d3d 0%, #0c2f5d 54%, #0f3b68 100%) !important;
    border-right: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 18px 0 42px rgba(15, 23, 42, .12);
}

.logo {
    background: rgba(255, 255, 255, .96) !important;
    border-bottom-color: rgba(15, 23, 42, .08) !important;
}

.logo-box {
    background: linear-gradient(135deg, #0b376d, #2563eb) !important;
    box-shadow: 0 8px 20px rgba(37, 99, 235, .2) !important;
}

.sidebar-dashboard {
    padding: 11px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    background: rgba(255, 255, 255, .055);
}

.sidebar-dashboard .badge {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .16);
    box-shadow: none;
}

.menu-item {
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
    color: rgba(255, 255, 255, .82) !important;
    transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease;
}

.menu-item:hover,
.menu-item:focus-visible {
    border-color: rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .09) !important;
    color: #ffffff !important;
    transform: translateX(1px);
}

.menu-item.active {
    border-color: rgba(255, 255, 255, .2);
    background: linear-gradient(135deg, #2f6df1 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 10px 24px rgba(37, 99, 235, .25) !important;
}

.menu-item.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 999px;
    background: #ffffff;
}

.main {
    background: transparent !important;
}

.app-header {
    background: rgba(250, 252, 255, .86) !important;
    border-bottom-color: rgba(188, 204, 226, .72) !important;
    box-shadow: 0 8px 28px rgba(15, 23, 42, .06) !important;
}

.header-icon-button,
.notification-button,
.header-user-toggle {
    border: 1px solid #d8e3f0 !important;
    background: rgba(255, 255, 255, .86) !important;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .045);
}

.header-icon-button:hover,
.header-icon-button:focus-visible,
.notification-button:hover,
.notification-button:focus-visible,
.header-user-toggle:hover,
.header-user-toggle:focus-visible {
    border-color: #b9cef0 !important;
    background: #ffffff !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}

.topbar-subtitle,
.fd-page-subtitle,
.card-info,
.flowcrm-subtitle,
.flowcrm-muted {
    color: #64748b !important;
}

.card-custom,
.fd-card,
.preview-box,
.settings-card,
.settings-system-card,
.workbook-card,
.template-card,
.standard-user-card,
.flowkv-card,
.flowkv-detail-card,
.flowskills-query-card,
.flowskills-results-card,
.flowcheck-panel,
.flowcheck-result-card,
.home-section-card,
.home-calendar-card,
.calendar-card,
.rss-card {
    border-color: #dbe6f2 !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, .94) !important;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .055) !important;
}

.card-custom:hover,
.workbook-card:hover,
.template-card:hover,
.standard-user-card:hover,
.teilnehmer-card .card-custom:hover,
.betrieb-card .card-custom:hover {
    border-color: #c4d6ee !important;
    box-shadow: 0 16px 34px rgba(15, 23, 42, .075) !important;
}

.standard-user-card {
    min-height: 268px;
    height: auto !important;
}

.standard-user-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.standard-user-actions .standard-user-deactivate-btn {
    grid-column: 1 / -1;
}

.standard-user-actions .card-action-btn {
    min-width: 0;
}

.standard-user-grid.is-list .standard-user-actions {
    grid-template-columns: 1fr;
}

.form-control,
.form-select,
.input-group-text,
textarea.form-control,
.modern-search,
.app-header-search .input-group {
    border-color: #cfdae8 !important;
    border-radius: 8px !important;
    background-color: #ffffff !important;
    box-shadow: 0 1px 0 rgba(15, 23, 42, .025);
}

.form-control:hover,
.form-select:hover,
textarea.form-control:hover,
.modern-search:hover,
.app-header-search .input-group:hover {
    border-color: #bacce2 !important;
}

.form-control:focus,
.form-select:focus,
textarea.form-control:focus,
.modern-search:focus-within,
.app-header-search .input-group:focus-within {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .13) !important;
}

.btn,
.btn.card-action-btn {
    border-radius: 8px !important;
    transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.btn:hover,
.btn:focus-visible {
    transform: none;
}

.btn-primary {
    border-color: #1f5fe8 !important;
    background: linear-gradient(180deg, #2f6df1 0%, #1f5fe8 100%) !important;
    box-shadow: 0 9px 20px rgba(37, 99, 235, .18) !important;
}

.btn-primary:hover,
.btn-primary:focus-visible {
    border-color: #1d4ed8 !important;
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%) !important;
    box-shadow: 0 12px 24px rgba(37, 99, 235, .24) !important;
}

.btn-outline-primary,
.btn-outline-secondary {
    background: #ffffff !important;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .04);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus-visible {
    background: #f2f7ff !important;
    border-color: #2563eb !important;
    color: #1d4ed8 !important;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus-visible {
    background: #f8fafc !important;
    border-color: #94a3b8 !important;
}

.workpaper-tabs,
.stammdaten-tabs,
.settings-tabs,
.flowcrm-view-switch,
.calendar-view-switch {
    border-color: #d6e1ee !important;
    border-radius: 8px !important;
    background: #eef3f8 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8) !important;
}

.workpaper-tabs .btn,
.stammdaten-tabs .btn,
.settings-tabs .btn,
.flowcrm-view-switch .card-action-btn,
.calendar-view-switch .btn {
    border-radius: 6px !important;
    font-weight: 650 !important;
}

.workpaper-tabs .btn-primary,
.stammdaten-tabs .btn-primary,
.settings-tabs .btn-primary,
.flowcrm-view-switch .btn-primary,
.calendar-view-switch .btn-primary {
    background: #ffffff !important;
    border-color: #ffffff !important;
    color: #1d4ed8 !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .08) !important;
}

.badge,
.fd-pill,
.flowcrm-pill,
.betrieb-kpb-pill,
.workbook-status,
.standard-user-pill {
    border-radius: 999px !important;
    letter-spacing: 0 !important;
    box-shadow: none !important;
}

.teilnehmer-card .card-custom,
.betrieb-card .card-custom {
    border-left: 3px solid transparent !important;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.teilnehmer-card .card-custom:hover,
.betrieb-card .card-custom:hover {
    border-left-color: #2563eb !important;
    transform: none;
}

.toast {
    border-color: #cddcf0 !important;
    border-radius: 8px !important;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .18) !important;
}

.dropdown-menu {
    border-color: #dbe6f2 !important;
    border-radius: 8px !important;
    box-shadow: 0 16px 36px rgba(15, 23, 42, .16) !important;
}

.dropdown-item {
    border-radius: 6px;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: #eef6ff;
    color: #1d4ed8;
}

body.darkmode {
    background: linear-gradient(180deg, #0b1220 0%, #111827 100%) !important;
}

body.darkmode .app-header {
    background: rgba(15, 23, 42, .88) !important;
    border-bottom-color: rgba(71, 85, 105, .7) !important;
}

body.darkmode .card-custom,
body.darkmode .fd-card,
body.darkmode .preview-box,
body.darkmode .settings-card,
body.darkmode .settings-system-card,
body.darkmode .workbook-card,
body.darkmode .template-card,
body.darkmode .standard-user-card,
body.darkmode .flowkv-card,
body.darkmode .flowkv-detail-card,
body.darkmode .flowskills-query-card,
body.darkmode .flowskills-results-card,
body.darkmode .flowcheck-panel,
body.darkmode .flowcheck-result-card,
body.darkmode .home-section-card,
body.darkmode .home-calendar-card,
body.darkmode .calendar-card,
body.darkmode .rss-card,
body.darkmode .header-icon-button,
body.darkmode .notification-button,
body.darkmode .header-user-toggle,
body.darkmode .form-control,
body.darkmode .form-select,
body.darkmode .input-group-text,
body.darkmode textarea.form-control,
body.darkmode .modern-search,
body.darkmode .app-header-search .input-group,
body.darkmode .btn-outline-primary,
body.darkmode .btn-outline-secondary {
    border-color: #334155 !important;
    background-color: #111827 !important;
    color: #e5edf7 !important;
}

body.darkmode .topbar-title h2,
body.darkmode .fd-page-title,
body.darkmode .flowcrm-title,
body.darkmode .flowkv-title,
body.darkmode .flowskills-title,
body.darkmode .workpaper-title h2,
body.darkmode .card-title,
body.darkmode .fd-card-title,
body.darkmode .settings-card-title,
body.darkmode .flowcrm-panel-title,
body.darkmode .flowkv-card-title,
body.darkmode .flowcheck-title,
body.darkmode .home-card-title,
body.darkmode .home-main-grid h5 {
    color: #f8fafc !important;
}

body.darkmode #homePage .home-card-title > i {
    background: rgba(37, 99, 235, .18);
    color: #93c5fd;
}

/* 1.3.2 correction pass: restore clean page headers and remove hard shell seam. */

.sidebar {
    border-right: 0 !important;
    box-shadow: none !important;
}

.app-header {
    box-shadow: 0 1px 0 rgba(188, 204, 226, .72) !important;
}

.main::before {
    content: none !important;
}

#dokumentePage .workpaper-page-head {
    display: grid !important;
    grid-template-columns: 1fr !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 0 0 12px !important;
    margin: 0 0 14px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

#dokumentePage .workpaper-page-head .topbar {
    margin: 0 !important;
}

#dokumentePage .workpaper-page-head .topbar-title h2 {
    margin: 0 !important;
    color: #111c2e !important;
    font-size: 23px !important;
    font-weight: 820 !important;
    line-height: 1.12 !important;
}

#dokumentePage .workpaper-page-head .workpaper-tabs {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 42px !important;
    margin: 0 !important;
    padding: 4px !important;
    border: 1px solid #d6e1ee !important;
    border-radius: 8px !important;
    background: #eef3f8 !important;
    box-shadow: none !important;
}

#dokumentePage .workpaper-page-head .workpaper-tabs .btn {
    width: 100% !important;
    min-width: 0 !important;
    height: 34px !important;
    min-height: 34px !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    transform: none !important;
}

#dokumentePage .workpaper-page-head .workpaper-tabs .btn-primary {
    border-color: #2563eb !important;
    background: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .08) !important;
}

#dokumentePage .workpaper-page-head .workpaper-tabs .btn-outline-primary {
    border-color: transparent !important;
    background: transparent !important;
    color: #2563eb !important;
}

#dokumentePage .workpaper-header-slot {
    display: block !important;
    min-width: 0 !important;
    margin-top: 2px !important;
}

#dokumentePage .workpaper-header-slot .workpaper-header-card {
    display: none !important;
    min-height: 66px !important;
    margin: 0 !important;
    padding: 13px !important;
    border: 1px solid #dbe6f2 !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, .94) !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .045) !important;
}

#dokumentePage .workpaper-header-slot .workpaper-header-card.is-active {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px !important;
}

#dokumentePage .workpaper-header-slot .workpaper-title {
    min-width: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 11px !important;
}

#dokumentePage .workpaper-header-slot .workpaper-title > div:last-child {
    display: block !important;
    min-width: 0 !important;
}

#dokumentePage .workpaper-header-slot .workpaper-title h2 {
    margin: 0 !important;
    color: #111c2e !important;
    font-size: 21px !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
}

#dokumentePage .workpaper-header-slot .topbar-subtitle {
    margin-top: 3px !important;
    overflow: hidden !important;
    color: #64748b !important;
    font-size: 13px !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

#dokumentePage .workpaper-header-slot .flowdocs-save-status {
    min-width: 132px !important;
    max-width: 180px !important;
    margin-left: auto !important;
}

#dokumentePage .workpaper-header-slot #newDatasetBtn,
#dokumentePage .workpaper-header-actions .card-action-btn {
    min-width: 146px !important;
}

#dokumentePage .workpaper-pane.is-active,
#flowCalcContent {
    margin-top: 0 !important;
}

body.darkmode #dokumentePage .workpaper-page-head .topbar-title h2,
body.darkmode #dokumentePage .workpaper-header-slot .workpaper-title h2 {
    color: #f8fafc !important;
}

body.darkmode #dokumentePage .workpaper-page-head .workpaper-tabs {
    border-color: #334155 !important;
    background: #0f172a !important;
}

body.darkmode #dokumentePage .workpaper-header-slot .workpaper-header-card {
    border-color: #334155 !important;
    background: #111827 !important;
}

@media (max-width: 900px) {
    #dokumentePage .workpaper-header-slot .workpaper-header-card.is-active {
        align-items: stretch !important;
        flex-direction: column !important;
    }

    #dokumentePage .workpaper-header-slot .flowdocs-save-status,
    #dokumentePage .workpaper-header-slot #newDatasetBtn,
    #dokumentePage .workpaper-header-actions,
    #dokumentePage .workpaper-header-actions .card-action-btn {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
    }
}

/* 1.3.2 correction pass: unify logo/header surface. */
.logo,
.app-header {
    background: #ffffff !important;
    background-color: #ffffff !important;
}

.app-header {
    border-bottom-color: #dbe6f2 !important;
    box-shadow: 0 1px 0 #dbe6f2 !important;
}

.logo {
    border-bottom-color: #dbe6f2 !important;
}

/* 1.3.2 correction pass: all module tab bars use a stable five-slot grid. */
.workpaper-tabs,
.stammdaten-tabs,
.settings-tabs {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    justify-content: stretch !important;
    align-items: center !important;
}

.workpaper-tabs > .btn,
.stammdaten-tabs > .btn,
.settings-tabs > .btn {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
}

#dokumentePage .workpaper-page-head .workpaper-tabs,
#arbeitsmappePage .workpaper-tabs,
#formularePage .workpaper-tabs {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}

@media (max-width: 760px) {
    .workpaper-tabs,
    .stammdaten-tabs,
    .settings-tabs,
    #dokumentePage .workpaper-page-head .workpaper-tabs,
    #arbeitsmappePage .workpaper-tabs,
    #formularePage .workpaper-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* 1.3.2 correction pass: align home name typography. */
#homePage .missing-document-person,
#homePage .missing-document-person .fd-card-title-name,
#homePage .recent-name-link,
#homePage .recent-name-link .fd-card-title-name,
#homePage .recent-name-link .fd-card-title-primary,
#homePage .recent-name-link .fd-card-title-secondary {
    font-size: 15px !important;
    line-height: 1.15 !important;
}

#homePage .missing-document-person,
#homePage .missing-document-person .fd-card-title-name {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: #111827;
    font-weight: 400 !important;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#homePage .missing-document-person .fd-card-title-primary,
#homePage .recent-name-link .fd-card-title-primary {
    font-weight: 700 !important;
}

#homePage .missing-document-person .fd-card-title-secondary,
#homePage .recent-name-link .fd-card-title-secondary {
    font-weight: 400 !important;
}

#homePage .recent-title-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    width: 100%;
}

#homePage .recent-title-line .badge {
    justify-self: end;
}

#homePage .missing-document-group {
    padding: 0;
    flex: 0 0 auto;
    min-height: 42px;
    overflow: hidden;
}

#homePage .missing-document-group[open] {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    min-height: 104px;
}

#homePage .missing-document-group-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    margin: 0;
    padding: 10px;
    cursor: pointer;
    list-style: none;
}

#homePage .missing-document-group-head,
.flowcrm-missing-documents-body .missing-document-group-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px;
}

#homePage .missing-document-group-head::-webkit-details-marker {
    display: none;
}

#homePage .missing-document-badges {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    min-width: max-content;
}

.flowcrm-missing-documents-body .missing-document-badges {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    min-width: max-content;
}

.flowcrm-missing-documents-body .missing-document-group-head {
    display: flex;
    align-items: center;
    gap: 7px;
}

.flowcrm-missing-documents-body .missing-document-person {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flowcrm-missing-documents-body .missing-document-group-head .bi-chevron-down {
    margin-left: auto;
    color: #64748b;
}

#homePage .missing-document-group-head .bi-chevron-down {
    color: #64748b;
    transition: transform .14s ease;
}

#homePage .missing-document-group[open] .missing-document-group-head .bi-chevron-down {
    transform: rotate(180deg);
}

#homePage .missing-document-group-body {
    flex: 0 0 auto;
    min-height: 0;
    max-height: 146px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 10px 8px;
    scrollbar-gutter: stable;
    overscroll-behavior: contain;
}

#homePage .missing-document-item {
    flex: 0 0 auto;
    min-height: 24px;
    line-height: 1.25;
}

#homePage .missing-documents-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    margin: 0 0 10px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #f8fafc;
}

#homePage .missing-documents-tab {
    min-height: 32px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #334155;
    font-size: 13px;
    font-weight: 750;
}

#homePage .missing-documents-tab.active {
    background: #ffffff;
    color: #2563eb;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .08);
}

.missing-document-meta {
    padding: 2px 0 6px;
    color: #64748b;
    font-size: 12px;
    font-weight: 650;
}

#homePage .home-today-time {
    display: grid;
    gap: 2px;
    min-width: 54px;
    text-align: left;
    line-height: 1.1;
}

#homePage .home-today-time small {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}

#homePage .home-today-event {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 10px;
}

#homePage .home-today-title {
    color: #111827;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.24;
}

#homePage .home-today-meta {
    margin-top: 2px;
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Home polish: calmer cards and a more deliberate calendar surface. */
#homePage .home-main-grid.has-home-widgets {
    gap: 14px;
}

#homePage .home-section-card,
#homePage .home-widget-card {
    border-color: #dbe6f2 !important;
    border-radius: 10px !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .98) 0%, rgba(248, 251, 255, .96) 100%),
        #ffffff !important;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .06) !important;
}

#homePage .home-main-grid.has-home-widgets > [class*="home-"] {
    min-height: 0;
}

#homePage .home-main-grid.has-home-widgets .home-section-card,
#homePage .home-main-grid.has-home-widgets .home-widget-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

#homePage .home-main-grid.has-home-widgets > .home-missing-column,
#homePage .home-main-grid.has-home-widgets > .home-today-column,
#homePage .home-main-grid.has-home-widgets > .home-recent-column,
#homePage .home-main-grid.has-home-widgets > .home-widgets-column {
    min-height: 0;
    overflow: hidden;
}

#homePage .home-main-grid.has-home-widgets > .home-missing-column .home-section-card {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    height: 100%;
    min-height: 0;
}

#homePage .home-main-grid.has-home-widgets > .home-missing-column .missing-documents-tabs {
    min-height: 0;
}

#homePage .home-today-list,
#homePage .missing-documents-list,
#homePage .recent-workbook-list,
#homePage .home-weather-body,
#homePage .home-radio-status {
    min-height: 0;
    overflow-y: auto;
    overflow-x: auto;
    scrollbar-gutter: stable;
}

#homePage .missing-documents-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
    max-height: 100%;
    align-content: normal;
    overflow-y: auto;
    overflow-x: hidden;
}

#homePage .home-today-list,
#homePage .missing-documents-list,
#homePage .recent-workbook-list,
#homePage .home-weather-body {
    padding-right: 4px;
}

#homePage .home-main-grid.has-home-widgets > .home-missing-column {
    display: flex;
    min-height: 0;
    overflow-y: hidden;
    overflow-x: hidden;
    scrollbar-gutter: auto;
}

#homePage .home-main-grid.has-home-widgets > .home-missing-column .home-section-card {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0 !important;
    max-height: 100%;
}

#homePage .home-card-head,
#homePage .home-widget-head {
    flex: 0 0 auto;
    min-height: 32px;
    margin-bottom: 11px;
    padding-bottom: 9px;
    border-bottom: 1px solid #edf2f7;
}

#homePage .home-card-title,
#homePage .home-widget-title {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    margin: 0;
    color: #111827;
    font-size: 15px;
    font-weight: 760;
    line-height: 1.15;
}

#homePage .home-card-title > i {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    border-radius: 7px;
    background: #eaf2ff;
    color: #2563eb;
    font-size: 14px;
    line-height: 1;
}

#homePage .home-card-title > span:not(.card-info) {
    min-width: 0;
}

#homePage .home-section-card.rss-card {
    display: grid !important;
    grid-template-columns: auto minmax(180px, 1fr) auto;
    align-items: center !important;
    gap: 12px !important;
    min-height: 56px !important;
    height: 56px !important;
    margin-top: 12px !important;
    margin-bottom: 0 !important;
    padding: 10px 12px !important;
    overflow: hidden !important;
}

#homePage .home-section-card.rss-card .rss-card-title {
    flex: 0 0 auto;
    justify-self: start;
    white-space: nowrap;
}

#homePage .home-section-card.rss-card .rss-ticker {
    display: block !important;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    height: 34px !important;
    border-radius: 8px !important;
}

#homePage .home-section-card.rss-card .rss-track {
    min-height: 34px !important;
    padding: 7px 14px !important;
}

#homePage .home-section-card.rss-card .rss-item {
    gap: 8px;
    font-size: 12px;
    font-weight: 650;
}

#homePage .home-section-card.rss-card #homeRssSettingsBtn {
    flex: 0 0 32px;
    justify-self: end;
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
}

#homePage .home-today-event,
#homePage .missing-document-group,
#homePage .recent-row {
    border-color: #dfe8f2 !important;
    border-radius: 9px !important;
    background: #ffffff !important;
    box-shadow: 0 1px 0 rgba(15, 23, 42, .025);
}

#homePage .home-today-event:hover,
#homePage .missing-document-group:hover,
#homePage .recent-row:hover {
    border-color: #bfdbfe !important;
    background: #f8fbff !important;
}

#homePage .home-calendar-card {
    padding: 13px;
}

#homePage .home-calendar-card .calendar-title-block {
    margin-bottom: 10px;
}

#homePage .home-calendar-card .calendar-toolbar {
    grid-template-columns: auto minmax(130px, 1fr) auto auto;
    gap: 9px;
    margin-top: 0;
    margin-bottom: 10px;
    padding: 7px;
    border-color: #dfe8f2;
    border-radius: 9px;
    background: #eef4fb;
}

#homePage .home-calendar-card .calendar-controls,
#homePage .home-calendar-card .calendar-mode-switch,
#homePage .home-calendar-card .calendar-view-switch {
    background: #f8fafc !important;
    border: 1px solid #dfe8f2 !important;
    border-radius: 8px !important;
    padding: 3px !important;
}

#homePage .home-calendar-card .calendar-controls {
    gap: 3px;
}

#homePage .home-calendar-card .calendar-control-btn,
#homePage .home-calendar-card .calendar-view-btn,
#homePage .home-calendar-card .calendar-mode-btn {
    height: 29px !important;
    min-height: 29px !important;
    border-radius: 6px !important;
    transform: none !important;
}

#homePage .home-calendar-card .calendar-control-btn {
    width: 29px;
    min-width: 29px;
}

#homePage .home-calendar-card .calendar-today-btn {
    min-width: 68px;
    margin: 0;
    padding: 0 12px !important;
}

#homePage .home-calendar-card .calendar-month-label {
    padding: 0 8px;
    font-size: 16px;
    font-weight: 820;
}

#homePage .home-calendar-card .calendar-grid {
    border-color: #d9e5f2;
    border-radius: 9px;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .68);
}

#homePage .home-calendar-card .calendar-weekday {
    min-height: 31px;
    color: #52627a;
    background: #f7fafc;
    font-size: 10px;
    font-weight: 800;
}

#homePage .home-calendar-card .calendar-day {
    min-height: 66px;
    padding: 6px 7px;
    border-color: #edf2f7;
}

#homePage .home-calendar-card .calendar-day.is-weekend {
    background: #fff8f2;
}

#homePage .home-calendar-card .calendar-day:not(.is-muted):hover {
    background: #f8fbff;
}

#homePage .home-calendar-card .calendar-day-number {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 760;
}

#homePage .home-calendar-card .calendar-day-event-chip {
    min-height: 18px;
    padding: 2px 6px;
    border-radius: 5px;
    font-size: 10px;
    line-height: 1.15;
}

#homePage .home-calendar-card .outlook-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

#homePage .home-calendar-card .outlook-actions .btn {
    min-height: 34px;
    border-radius: 8px !important;
}

#homePage .home-calendar-card .calendar-week-pane:not(.d-none),
#homePage .home-calendar-card .calendar-day-pane:not(.d-none),
#homePage .home-calendar-card .calendar-week-grid,
#homePage .home-calendar-card .calendar-week-board,
#homePage .home-calendar-card .calendar-timeline {
    width: 100%;
    max-width: 100%;
}

#homePage .home-calendar-card .calendar-week-grid {
    display: block;
    width: 100%;
    overflow-x: hidden;
}

#homePage .home-calendar-card .calendar-layout {
    position: relative;
    overflow: visible;
    margin-top: -2px;
    padding-bottom: 10px;
}

#homePage .home-calendar-card .calendar-month-pane:not(.d-none) {
    display: flex;
    flex-direction: column;
    min-height: 0;
    width: 100%;
}

#homePage .home-calendar-card .calendar-week-pane:not(.d-none) {
    display: flex;
    flex-direction: column;
    min-height: 0;
    width: 100%;
}

#homePage .home-calendar-card .calendar-week-board {
    position: relative;
    width: 100% !important;
    max-width: none !important;
    min-width: 100% !important;
    grid-template-columns: 54px repeat(7, minmax(0, 1fr));
}

#homePage .home-calendar-card .calendar-week-pane:not(.d-none) .calendar-week-grid {
    flex: 1 1 auto;
    min-height: 0;
    max-height: min(56vh, 520px);
    overflow-x: auto;
    overflow-y: auto;
    overscroll-behavior: contain;
}

#homePage .home-calendar-card .calendar-grid {
    flex: 1 1 auto;
    min-height: 0;
    grid-template-rows: 31px repeat(6, minmax(66px, 1fr));
}

#homePage .home-calendar-card .calendar-day {
    min-height: 66px;
    padding: 6px 7px;
}

#homePage .home-calendar-card .outlook-sync-panel {
    flex: 0 0 auto;
    margin-top: 10px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

#homePage .home-calendar-card .calendar-week-board.is-weekend-collapsed {
    grid-template-columns: 54px repeat(5, minmax(0, 1fr)) repeat(2, 64px);
}

#homePage .home-calendar-card.is-weekend-collapsed .calendar-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) repeat(2, 64px);
}

#homePage .home-calendar-card.is-weekend-collapsed .calendar-weekday.is-weekend,
#homePage .home-calendar-card.is-weekend-collapsed .calendar-day.is-weekend,
#homePage .home-calendar-card .calendar-week-board.is-weekend-collapsed .calendar-week-head.is-weekend,
#homePage .home-calendar-card .calendar-week-board.is-weekend-collapsed .calendar-week-column.is-weekend {
    display: grid;
}

#homePage .home-calendar-card.is-weekend-collapsed .calendar-day.is-weekend {
    min-width: 54px;
    padding: 8px 6px;
}

#homePage .home-calendar-card.is-weekend-collapsed .calendar-day.is-weekend .calendar-day-events,
#homePage .home-calendar-card .calendar-week-board.is-weekend-collapsed .calendar-week-column.is-weekend .calendar-week-events-layer {
    display: none;
}

#homePage .home-calendar-card .calendar-weekend-toggle {
    position: absolute;
    top: 57px;
    right: 6px;
    z-index: 30;
    width: 26px;
    min-width: 26px;
    height: 34px;
    padding: 0 !important;
    border-radius: 7px !important;
    border: 1px solid #cbd5e1 !important;
    font-size: 11px;
    font-weight: 750;
    background: rgba(255, 255, 255, .86) !important;
    color: #64748b !important;
    box-shadow: 0 3px 8px rgba(15, 23, 42, .08);
}

#homePage .home-calendar-card .calendar-weekend-toggle.is-active {
    background: rgba(255, 255, 255, .9) !important;
    color: #475569 !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
}

#homePage .home-calendar-card .calendar-weekend-toggle:hover,
#homePage .home-calendar-card .calendar-weekend-toggle:focus-visible {
    border-color: #93c5fd !important;
    color: #2563eb !important;
}

@media (max-width: 1320px) {
    #homePage .dashboard-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    #homePage .home-quickbar {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    #homePage .home-quick-action {
        border-radius: 0 !important;
    }

    #homePage .home-quick-action:nth-child(3) {
        border-right: 0;
    }

    #homePage .home-quick-action:nth-child(n + 4) {
        border-top: 1px solid #e5edf7;
    }

    #homePage .home-main-grid.has-home-widgets {
        display: flex !important;
        flex-direction: column !important;
        flex: 0 0 auto !important;
        gap: 12px !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
    }

    #homePage .home-main-grid.has-home-widgets > .home-today-column {
        order: 1;
    }

    #homePage .home-main-grid.has-home-widgets > .home-missing-column {
        order: 2;
    }

    #homePage .home-main-grid.has-home-widgets > .home-recent-column {
        order: 3;
    }

    #homePage .home-main-grid.has-home-widgets > .home-calendar-column {
        order: 4;
    }

    #homePage .home-main-grid.has-home-widgets > .home-widgets-column {
        order: 5;
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        grid-template-rows: none !important;
        gap: 12px !important;
    }

    #homePage .home-main-grid.has-home-widgets > .home-today-column,
    #homePage .home-main-grid.has-home-widgets > .home-missing-column,
    #homePage .home-main-grid.has-home-widgets > .home-recent-column,
    #homePage .home-main-grid.has-home-widgets > .home-calendar-column,
    #homePage .home-main-grid.has-home-widgets > .home-widgets-column {
        flex: 0 0 auto !important;
        width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
    }

    #homePage .home-main-grid.has-home-widgets .home-section-card,
    #homePage .home-main-grid.has-home-widgets .home-widget-card,
    #homePage .home-main-grid.has-home-widgets .home-calendar-card {
        height: auto !important;
        max-height: none !important;
    }

    #homePage .home-main-grid.has-home-widgets > .home-missing-column .home-section-card {
        display: grid !important;
        grid-template-rows: auto auto minmax(0, 1fr) !important;
        height: min(620px, calc(100vh - 168px)) !important;
        max-height: min(620px, calc(100vh - 168px)) !important;
    }

    #homePage .home-main-grid.has-home-widgets .home-today-column .home-section-card,
    #homePage .home-main-grid.has-home-widgets .home-recent-column .home-section-card,
    #homePage .home-main-grid.has-home-widgets .home-missing-column .home-section-card {
        min-height: 220px !important;
    }

    #homePage .home-main-grid.has-home-widgets .home-calendar-card .calendar-layout,
    #homePage .home-main-grid.has-home-widgets .home-calendar-card .calendar-month-pane {
        min-height: 0 !important;
    }

    #homePage .home-main-grid.has-home-widgets .home-calendar-card .calendar-grid {
        min-height: 430px !important;
        grid-template-rows: 31px repeat(6, minmax(62px, 1fr)) !important;
    }
}

@media (max-width: 980px) {
    #homePage .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #homePage .home-quickbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #homePage .home-quick-action:nth-child(odd) {
        border-right: 1px solid #e5edf7;
    }

    #homePage .home-quick-action:nth-child(even) {
        border-right: 0;
    }

    #homePage .home-quick-action:nth-child(n + 3) {
        border-top: 1px solid #e5edf7;
    }

    #homePage .home-calendar-card .calendar-toolbar {
        grid-template-columns: auto minmax(120px, 1fr);
    }

    #homePage .home-calendar-card .calendar-mode-switch,
    #homePage .home-calendar-card .calendar-view-switch {
        justify-self: stretch;
    }

    #homePage .home-calendar-card .calendar-grid {
        min-height: 392px !important;
        grid-template-rows: 31px repeat(6, minmax(56px, 1fr)) !important;
    }
}

@media (max-width: 560px) {
    #homePage .dashboard-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    #homePage .dashboard-card {
        min-height: 72px;
        grid-template-columns: 44px minmax(0, 1fr);
        text-align: left;
    }

    #homePage .dashboard-card > div:last-child {
        min-width: 0;
    }

    #homePage .dashboard-label,
    #homePage .dashboard-value {
        overflow-wrap: normal;
        word-break: normal;
        hyphens: none;
    }

    #homePage .home-quickbar {
        grid-template-columns: minmax(0, 1fr) !important;
        border-radius: 8px !important;
    }

    #homePage .home-quick-action {
        justify-content: center;
        min-height: 42px;
        border-right: 0 !important;
        border-top: 1px solid #e5edf7;
    }

    #homePage .home-quick-action:first-child {
        border-top: 0;
    }
}

@media (max-width: 760px) {
    #homePage .home-main-grid.has-home-widgets > .home-widgets-column {
        grid-template-columns: 1fr !important;
    }

    #homePage .home-section-card.rss-card {
        grid-template-columns: minmax(0, 1fr) auto;
        height: auto !important;
        min-height: 86px !important;
    }

    #homePage .home-section-card.rss-card .rss-card-title {
        min-width: 0;
    }

    #homePage .home-section-card.rss-card .rss-ticker {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    #homePage .home-section-card.rss-card #homeRssSettingsBtn {
        grid-column: 2;
        grid-row: 1;
    }
}

/* 1.3.2 correction pass: module tabs share one visual language. */
.workpaper-tabs,
.stammdaten-tabs,
.settings-tabs,
#dokumentePage .workpaper-page-head .workpaper-tabs,
#arbeitsmappePage .workpaper-tabs,
#formularePage .workpaper-tabs {
    gap: 6px !important;
    padding: 4px !important;
    border: 1px solid #dfe7f0 !important;
    border-radius: 9px !important;
    background: #eef3f8 !important;
    box-shadow: none !important;
}

.workpaper-tabs > .btn,
.stammdaten-tabs > .btn,
.settings-tabs > .btn,
#dokumentePage .workpaper-page-head .workpaper-tabs > .btn {
    min-height: 34px !important;
    height: 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 0 12px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 650 !important;
    box-shadow: none !important;
    transform: none !important;
    white-space: nowrap !important;
}

.workpaper-tabs > .btn i.me-2,
.stammdaten-tabs > .btn i.me-2,
.settings-tabs > .btn i.me-2 {
    margin-right: 0 !important;
}

.workpaper-tabs > .btn-primary,
.stammdaten-tabs > .btn-primary,
.settings-tabs > .btn-primary,
#dokumentePage .workpaper-page-head .workpaper-tabs > .btn-primary {
    border-color: #2563eb !important;
    background: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .08) !important;
}

.workpaper-tabs > .btn-outline-primary,
.stammdaten-tabs > .btn-outline-primary,
.settings-tabs > .btn-outline-primary,
#dokumentePage .workpaper-page-head .workpaper-tabs > .btn-outline-primary {
    border-color: transparent !important;
    background: transparent !important;
    color: #2563eb !important;
}

.workpaper-tabs > .btn-outline-primary:hover,
.workpaper-tabs > .btn-outline-primary:focus-visible,
.stammdaten-tabs > .btn-outline-primary:hover,
.stammdaten-tabs > .btn-outline-primary:focus-visible,
.settings-tabs > .btn-outline-primary:hover,
.settings-tabs > .btn-outline-primary:focus-visible {
    border-color: #dbeafe !important;
    background: #f8fbff !important;
    color: #1d4ed8 !important;
}

#dokumentePage .workpaper-page-head .topbar-title h2 {
    margin-bottom: 1px !important;
}

#dokumentePage .workpaper-page-head .topbar-subtitle {
    color: #64748b !important;
    font-size: 13px !important;
    line-height: 1.25 !important;
}

/* 1.3.2 correction pass: softer active sidebar marker. */
.sidebar .menu-item {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px !important;
    border-radius: 10px !important;
}

.sidebar .menu-item i {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0 !important;
    border-radius: 999px;
    color: rgba(255, 255, 255, .84);
    transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}

.sidebar .menu-item.active {
    border-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #ffffff !important;
    transform: none !important;
}

.sidebar .menu-item.active::before {
    content: "";
    position: absolute;
    left: -19px;
    top: 7px;
    bottom: 7px;
    width: 6px;
    border-radius: 0 999px 999px 0;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(255, 255, 255, .22);
}

.sidebar .menu-item.active i {
    background: #ffffff;
    color: #0f3b68;
    box-shadow: 0 8px 20px rgba(255, 255, 255, .18);
}

.sidebar .menu-item.active:hover,
.sidebar .menu-item.active:focus-visible {
    background: rgba(255, 255, 255, .055) !important;
}

.sidebar .menu-item:hover i,
.sidebar .menu-item:focus-visible i {
    background: rgba(255, 255, 255, .12);
    color: #ffffff;
}

/* 1.3.2 correction pass: equal header icon tiles. */
.app-header .header-icon-button,
.app-header .notification-button,
.app-header-search-toggle {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    flex: 0 0 42px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    border-radius: 8px !important;
    line-height: 1 !important;
}

.app-header .header-icon-button i,
.app-header .notification-button i,
.app-header-search-toggle i {
    margin: 0 !important;
    line-height: 1 !important;
}

.app-header .notification-button {
    position: relative;
}

/* 1.3.2 correction pass: keep app header white in dark mode. */
body.darkmode .app-header,
body.darkmode .logo {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border-color: #dbe6f2 !important;
    color: #111827 !important;
}

body.darkmode .app-header {
    box-shadow: 0 1px 0 #dbe6f2 !important;
}

body.darkmode .app-header .header-icon-button,
body.darkmode .app-header .notification-button,
body.darkmode .app-header .header-user-toggle,
body.darkmode .app-header .app-header-search .input-group,
body.darkmode .app-header .form-control,
body.darkmode .app-header .input-group-text {
    border-color: #d8e3f0 !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #111827 !important;
}

body.darkmode .app-header .header-user-name,
body.darkmode .app-header .notification-button i,
body.darkmode .app-header .header-icon-button i,
body.darkmode .app-header .app-header-search .form-control {
    color: #111827 !important;
}

body.darkmode .app-header .header-user-role,
body.darkmode .app-header .app-header-search .form-control::placeholder {
    color: #64748b !important;
}

/* 1.3.2 correction pass: make logo/header one continuous white band. */
.app-header::before {
    content: "";
    position: absolute;
    left: calc(-1 * var(--fd-shell-width, 280px));
    top: 0;
    bottom: -1px;
    width: var(--fd-shell-width, 280px);
    background: #ffffff;
    border-bottom: 1px solid #dbe6f2;
    pointer-events: none;
    z-index: -1;
}

.logo {
    position: relative;
    z-index: 2;
}

body.darkmode .app-header::before {
    background: #ffffff;
    border-bottom-color: #dbe6f2;
}

/* 1.3.2 correction pass: modern active sidebar pill. */
.sidebar .menu-item {
    min-height: 42px;
    border-radius: 10px !important;
    color: rgba(255, 255, 255, .74) !important;
}

.sidebar .menu-item::before {
    content: none !important;
}

.sidebar .menu-item i {
    background: rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .78);
}

.sidebar .menu-item:hover,
.sidebar .menu-item:focus-visible {
    border-color: rgba(255, 255, 255, .12) !important;
    background: rgba(255, 255, 255, .08) !important;
    color: #ffffff !important;
    transform: none !important;
}

.sidebar .menu-item:hover i,
.sidebar .menu-item:focus-visible i {
    background: rgba(255, 255, 255, .14);
    color: #ffffff;
}

.sidebar .menu-item.active {
    border-color: rgba(255, 255, 255, .9) !important;
    background: #ffffff !important;
    color: #0b2a5b !important;
    box-shadow: 0 12px 26px rgba(2, 6, 23, .22) !important;
}

.sidebar .menu-item.active i {
    background: #e8f1ff;
    color: #1d4ed8;
    box-shadow: none !important;
}

.sidebar .menu-item.active:hover,
.sidebar .menu-item.active:focus-visible {
    background: #ffffff !important;
    color: #0b2a5b !important;
    box-shadow: 0 14px 30px rgba(2, 6, 23, .25) !important;
}

/* 1.3.2 feature: collapsible sidebar. */
:root {
    --fd-sidebar-expanded-width: 240px;
    --fd-sidebar-collapsed-width: 74px;
    --fd-shell-width: var(--fd-sidebar-expanded-width);
}

body.sidebar-collapsed {
    --fd-shell-width: var(--fd-sidebar-collapsed-width);
}

.sidebar,
.main,
.app-header::before {
    transition: width .18s ease, margin-left .18s ease, left .18s ease, padding .18s ease;
}

.sidebar {
    width: var(--fd-shell-width) !important;
}

.main {
    margin-left: var(--fd-shell-width) !important;
}

.logo {
    gap: 10px;
}

.sidebar-toggle {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    padding: 0;
    border: 1px solid #dbe6f2;
    border-radius: 8px;
    background: #ffffff;
    color: #0b2a5b;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .06);
    transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus-visible {
    border-color: #b9cef0;
    background: #f8fbff;
    color: #1d4ed8;
    transform: none;
}

.sidebar-toggle i {
    font-size: 14px;
    line-height: 1;
}

body.sidebar-collapsed .sidebar {
    padding-left: 10px !important;
    padding-right: 10px !important;
    align-items: center;
}

body.sidebar-collapsed .logo {
    width: calc(var(--fd-sidebar-collapsed-width) + 20px);
    min-height: 70px;
    justify-content: center;
    margin-left: -10px !important;
    margin-right: -10px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
}

body.sidebar-collapsed .logo-wordmark,
body.sidebar-collapsed .sidebar-dashboard,
body.sidebar-collapsed .sidebar-section-title,
body.sidebar-collapsed .sidebar-footer,
body.sidebar-collapsed .sidebar hr {
    display: none !important;
}

body.sidebar-collapsed .logo-box {
    width: 38px !important;
    height: 38px !important;
    flex-basis: 38px !important;
    margin: 0 !important;
}

body.sidebar-collapsed .sidebar-toggle {
    position: absolute;
    right: -12px;
    top: 18px;
    z-index: 5;
    width: 26px;
    height: 26px;
    min-width: 26px;
    border-radius: 999px;
}

body.sidebar-collapsed .menu-item {
    width: 46px;
    min-width: 46px;
    height: 46px;
    min-height: 46px;
    justify-content: center;
    padding: 0 !important;
    margin-bottom: 8px;
    font-size: 0 !important;
    line-height: 0 !important;
    overflow: visible;
}

body.sidebar-collapsed .menu-item i {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    margin: 0 !important;
    font-size: 15px;
}

body.sidebar-collapsed .menu-item.active {
    background: rgba(255, 255, 255, .12) !important;
    border-color: rgba(255, 255, 255, .16) !important;
    box-shadow: none !important;
}

body.sidebar-collapsed .menu-item.active i {
    background: #ffffff;
    color: #1d4ed8;
}

body.sidebar-collapsed .menu-item:hover,
body.sidebar-collapsed .menu-item:focus-visible {
    background: rgba(255, 255, 255, .09) !important;
}

body.sidebar-collapsed .app-header::before {
    width: var(--fd-sidebar-collapsed-width);
    left: calc(-1 * var(--fd-sidebar-collapsed-width));
}

@media (max-width: 760px) {
    :root {
        --fd-shell-width: var(--fd-sidebar-collapsed-width);
    }

    .main {
        padding-left: 18px !important;
        padding-right: 14px !important;
    }

    .app-header {
        min-height: 86px !important;
        height: auto !important;
        align-items: flex-start !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        padding: 10px 14px !important;
    }

    .app-header-search {
        order: 1;
        flex: 1 1 132px;
        min-width: 0;
    }

    .notification-button,
    .header-icon-button {
        width: 34px !important;
        height: 34px !important;
        flex: 0 0 34px;
    }

    .header-user-toggle {
        width: 46px !important;
        min-width: 46px !important;
        max-width: 46px !important;
        padding: 4px !important;
        gap: 0 !important;
        justify-content: center !important;
        overflow: hidden;
    }

    .header-user-photo {
        width: 34px !important;
        height: 34px !important;
        flex-basis: 34px !important;
    }

    .header-user-toggle .flex-grow-1,
    .header-user-toggle .header-admin-lock,
    .header-user-toggle .bi-chevron-down {
        display: none !important;
    }

    .header-user-name {
        max-width: 86px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .header-user-role {
        display: none !important;
    }

    .fd-sticky-page-head {
        padding-top: 42px !important;
    }

    .sidebar {
        width: var(--fd-sidebar-collapsed-width) !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
        align-items: center;
    }

    .main {
        margin-left: var(--fd-sidebar-collapsed-width) !important;
    }

    .logo {
        width: calc(var(--fd-sidebar-collapsed-width) + 20px);
        min-height: 70px;
        justify-content: center;
        margin-left: -10px !important;
        margin-right: -10px !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .logo-wordmark,
    .sidebar-dashboard,
    .sidebar-section-title,
    .sidebar-footer,
    .sidebar hr {
        display: none !important;
    }

    .logo-box {
        width: 38px !important;
        height: 38px !important;
        flex-basis: 38px !important;
        margin: 0 !important;
    }

    .sidebar-toggle {
        position: absolute !important;
        right: -12px;
        top: auto;
        bottom: 22px;
        z-index: 170 !important;
        width: 26px;
        height: 26px;
        min-width: 26px;
        border-radius: 999px;
    }

    .menu-item {
        width: 46px;
        min-width: 46px;
        height: 46px;
        min-height: 46px;
        justify-content: center;
        padding: 0 !important;
        margin-bottom: 8px;
        font-size: 0 !important;
        line-height: 0 !important;
        overflow: visible;
    }

    .menu-item i {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
        margin: 0 !important;
        font-size: 15px;
    }

    .app-header::before {
        width: var(--fd-sidebar-collapsed-width);
        left: calc(-1 * var(--fd-sidebar-collapsed-width));
    }

    body.sidebar-collapsed .sidebar {
        width: var(--fd-sidebar-collapsed-width) !important;
    }

    body.sidebar-collapsed .main {
        margin-left: var(--fd-sidebar-collapsed-width) !important;
    }
}

/* 1.3.2 fix: keep logo and collapse toggle above the white header bridge. */
.sidebar {
    z-index: 140 !important;
    overflow: visible !important;
}

.app-header {
    z-index: 100 !important;
}

.logo {
    position: relative !important;
    z-index: 150 !important;
    overflow: visible !important;
}

.logo-box,
.logo-box img,
.sidebar-toggle {
    position: relative !important;
    z-index: 160 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.sidebar-toggle {
    pointer-events: auto !important;
}

body.sidebar-collapsed .sidebar-toggle {
    z-index: 170 !important;
}

/* 1.3.2 correction pass: cleaner compact sidebar controls. */
.sidebar-toggle {
    width: 30px !important;
    height: 30px !important;
    flex: 0 0 30px !important;
    margin: 4px auto 12px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    color: rgba(255, 255, 255, .78) !important;
    box-shadow: none !important;
}

.logo .sidebar-toggle {
    position: absolute !important;
    right: 14px;
    bottom: -42px;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus-visible {
    background: rgba(255, 255, 255, .1) !important;
    color: #ffffff !important;
    transform: none !important;
}

body:not(.sidebar-collapsed) .sidebar .menu-item.active {
    background: #ffffff !important;
    color: #0b2a5b !important;
    box-shadow: 0 12px 26px rgba(2, 6, 23, .22) !important;
}

body.sidebar-collapsed .logo {
    width: calc(var(--fd-sidebar-collapsed-width) + 20px) !important;
    justify-content: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

body.sidebar-collapsed .logo-box {
    margin-left: 0 !important;
    margin-right: 0 !important;
    transform: translateX(0) !important;
}

body.sidebar-collapsed .logo .sidebar-toggle {
    position: static !important;
    order: 2;
    margin: 10px auto 0 !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    color: rgba(255, 255, 255, .78) !important;
}

body.sidebar-collapsed .logo {
    flex-direction: column;
    gap: 4px;
}

body.sidebar-collapsed .menu-item,
body.sidebar-collapsed .menu-item:hover,
body.sidebar-collapsed .menu-item:focus-visible,
body.sidebar-collapsed .menu-item.active,
body.sidebar-collapsed .menu-item.active:hover,
body.sidebar-collapsed .menu-item.active:focus-visible {
    border-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.sidebar-collapsed .menu-item i {
    background: rgba(255, 255, 255, .1) !important;
    color: rgba(255, 255, 255, .82) !important;
}

body.sidebar-collapsed .menu-item:hover i,
body.sidebar-collapsed .menu-item:focus-visible i {
    background: rgba(255, 255, 255, .16) !important;
    color: #ffffff !important;
}

body.sidebar-collapsed .menu-item.active i,
body.sidebar-collapsed .menu-item.active:hover i,
body.sidebar-collapsed .menu-item.active:focus-visible i {
    background: #ffffff !important;
    color: #1d4ed8 !important;
}

/* 1.3.2 correction pass: sidebar toggle belongs to the footer. */
.sidebar-footer {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.sidebar-footer-main {
    min-width: 0;
    display: grid;
    gap: 1px;
    font-size: 11px;
    font-weight: 650;
    line-height: 1.22;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-footer-line {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logo .sidebar-toggle {
    position: static !important;
    right: auto !important;
    bottom: auto !important;
}

.sidebar-footer .sidebar-toggle {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    flex: 0 0 28px !important;
    margin: 0 !important;
    color: rgba(255, 255, 255, .78) !important;
}

body.sidebar-collapsed .sidebar-footer {
    width: 100%;
    display: flex !important;
    justify-content: center;
    margin-top: auto !important;
}

body.sidebar-collapsed .sidebar-footer-main {
    display: none !important;
}

body.sidebar-collapsed .sidebar-footer .sidebar-toggle {
    position: static !important;
    order: 0;
    margin: 0 auto !important;
}

body.sidebar-collapsed .logo {
    flex-direction: row !important;
    min-height: 70px;
}

body.sidebar-collapsed .logo .sidebar-toggle {
    display: none !important;
}

/* 1.3.2 correction pass: compact sidebar is one centered dark rail. */
body.sidebar-collapsed .sidebar {
    width: var(--fd-sidebar-collapsed-width) !important;
    padding: 0 !important;
    align-items: center !important;
    background: linear-gradient(180deg, #071d3d 0%, #0c2f5d 54%, #0f3b68 100%) !important;
}

body.sidebar-collapsed .logo {
    width: 100% !important;
    min-height: 74px !important;
    margin: 0 0 16px !important;
    padding: 14px 0 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, .08) !important;
}

body.sidebar-collapsed .logo-box {
    width: 40px !important;
    height: 40px !important;
    flex: 0 0 40px !important;
    margin: 0 !important;
    transform: none !important;
    box-shadow: 0 10px 22px rgba(2, 6, 23, .18) !important;
}

body.sidebar-collapsed .logo-box img {
    width: 100% !important;
    height: 100% !important;
}

body.sidebar-collapsed .menu-item {
    width: 100% !important;
    min-width: 0 !important;
    height: 46px !important;
    min-height: 46px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 0 8px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
}

body.sidebar-collapsed .menu-item i {
    width: 34px !important;
    height: 34px !important;
    flex: 0 0 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    border-radius: 999px !important;
}

body.sidebar-collapsed .sidebar-footer {
    width: 100% !important;
    min-height: 58px;
    margin-top: auto !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

body.sidebar-collapsed .sidebar-footer .sidebar-toggle {
    width: 34px !important;
    height: 34px !important;
    flex: 0 0 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    background: rgba(255, 255, 255, .1) !important;
}

body.sidebar-collapsed .sidebar-footer .sidebar-toggle:hover,
body.sidebar-collapsed .sidebar-footer .sidebar-toggle:focus-visible {
    background: rgba(255, 255, 255, .16) !important;
}

body.sidebar-collapsed .app-header::before {
    background: transparent !important;
    border-bottom: 0 !important;
}

/* 1.3.2 correction pass: unified module header rhythm. */
.page-content > .fd-sticky-page-head,
#dokumentePage > form > .fd-sticky-page-head {
    padding: 0 !important;
    margin: 0 0 14px !important;
}

.page-content > .fd-sticky-page-head > .topbar,
#dokumentePage > form > .fd-sticky-page-head > .topbar {
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 0 12px !important;
}

.page-content > .fd-sticky-page-head .topbar-title h2,
#dokumentePage .workpaper-page-head .topbar-title h2 {
    margin: 0 !important;
    font-size: 24px !important;
    font-weight: 820 !important;
    line-height: 1.12 !important;
    letter-spacing: 0 !important;
}

.page-content > .fd-sticky-page-head .topbar-subtitle,
#dokumentePage .workpaper-page-head .topbar-subtitle {
    margin-top: 3px !important;
    font-size: 13px !important;
    line-height: 1.28 !important;
}

.page-content .workpaper-tabs,
.page-content .stammdaten-tabs,
#dokumentePage .workpaper-page-head .workpaper-tabs,
#arbeitsmappePage .workpaper-tabs,
#formularePage .workpaper-tabs {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 10px !important;
    padding: 4px !important;
    margin: 0 !important;
}

#dokumentePage .workpaper-page-head .workpaper-tabs {
    margin-bottom: 14px !important;
}

.page-content .workpaper-tabs > .btn,
.page-content .stammdaten-tabs > .btn,
#dokumentePage .workpaper-page-head .workpaper-tabs > .btn {
    width: auto !important;
    min-width: 0 !important;
    min-height: 36px !important;
    padding: 8px 12px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 780 !important;
    line-height: 1.15 !important;
}

#dokumentePage .workpaper-header-slot {
    margin: 0 !important;
}

#dokumentePage .workpaper-header-slot .workpaper-header-card,
.flowcrm-module .flowcrm-header-card {
    min-height: 70px !important;
    padding: 14px 16px !important;
    margin: 0 0 14px !important;
    border-radius: 8px !important;
}

#dokumentePage .workpaper-header-slot .workpaper-title,
.flowcrm-module .flowcrm-header-main {
    gap: 12px !important;
}

#dokumentePage .workpaper-header-slot .workpaper-title-icon,
.flowcrm-module .flowcrm-header-icon {
    width: 42px !important;
    height: 42px !important;
    flex: 0 0 42px !important;
    border-radius: 10px !important;
}

#dokumentePage .workpaper-header-slot .workpaper-title h2,
.flowcrm-module .flowcrm-title {
    margin: 0 !important;
    font-size: 21px !important;
    font-weight: 820 !important;
    line-height: 1.1 !important;
    letter-spacing: 0 !important;
}

#dokumentePage .workpaper-header-slot .workpaper-title h2 .fd-brand-wordmark,
.flowcrm-module .flowcrm-title .fd-brand-wordmark {
    font-size: inherit !important;
    line-height: inherit !important;
}

#dokumentePage .workpaper-header-slot .workpaper-title .topbar-subtitle,
.flowcrm-module .flowcrm-subtitle {
    margin-top: 4px !important;
    font-size: 13px !important;
    line-height: 1.28 !important;
}

.flowcrm-module > .fd-sticky-tab-tools,
#arbeitsmappePage .workbook-pane,
#formularePage .formulare-pane {
    margin-top: 0 !important;
}

#arbeitsmappePage .fd-sticky-tab-tools.card-custom,
#formularePage .fd-sticky-tab-tools.card-custom,
#stammdatenPage .fd-sticky-tab-tools.card-custom {
    margin-top: 0 !important;
    margin-bottom: 14px !important;
    padding: 12px 14px !important;
    border-radius: 8px !important;
}

@media (max-width: 900px) {
    .page-content .workpaper-tabs,
    .page-content .stammdaten-tabs,
    #dokumentePage .workpaper-page-head .workpaper-tabs,
    #arbeitsmappePage .workpaper-tabs,
    #formularePage .workpaper-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* 1.3.2 correction pass: compact sidebar icon centering. */
body.sidebar-collapsed .sidebar {
    width: var(--fd-sidebar-collapsed-width) !important;
    min-width: var(--fd-sidebar-collapsed-width) !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
}

body.sidebar-collapsed .logo {
    width: 100% !important;
    min-width: 100% !important;
    margin: 0 0 16px !important;
    padding: 14px 0 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 0 !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
}

body.sidebar-collapsed .logo::before,
body.sidebar-collapsed .logo::after {
    display: none !important;
    content: none !important;
}

body.sidebar-collapsed .logo-box {
    margin: 0 auto !important;
    transform: none !important;
}

body.sidebar-collapsed .menu-item,
body.sidebar-collapsed .menu-item:hover,
body.sidebar-collapsed .menu-item:focus-visible,
body.sidebar-collapsed .menu-item.active,
body.sidebar-collapsed .menu-item.active:hover,
body.sidebar-collapsed .menu-item.active:focus-visible {
    width: 100% !important;
    min-width: 100% !important;
    height: 46px !important;
    min-height: 46px !important;
    margin: 0 0 8px !important;
    padding: 0 !important;
    display: grid !important;
    place-items: center !important;
    text-align: center !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    transform: none !important;
}

body.sidebar-collapsed .menu-item i {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    margin: 0 !important;
    display: grid !important;
    place-items: center !important;
    line-height: 1 !important;
    border-radius: 999px !important;
}

body.sidebar-collapsed .sidebar-footer {
    border-top: 0 !important;
}

/* 1.3.2 correction pass: consistent card gaps and compact search bars. */
:root {
    --fd-card-gap: 12px;
    --fd-search-card-padding-y: 10px;
    --fd-search-card-padding-x: 12px;
    --fd-control-compact-height: 40px;
}

.page-content > .fd-sticky-page-head,
#dokumentePage > form > .fd-sticky-page-head,
#dokumentePage .workpaper-header-slot .workpaper-header-card,
.flowcrm-module .flowcrm-header-card,
.card-custom.mb-4,
.fd-card.mb-4,
.flowcrm-filter-card,
.flowkv-filter-card,
.fd-sticky-tab-tools.card-custom {
    margin-bottom: var(--fd-card-gap) !important;
}

.flowcrm-module .flowcrm-filter-card,
.flowkv-filter-card,
.fd-sticky-tab-tools.card-custom,
#arbeitsmappePage .fd-sticky-tab-tools.card-custom,
#formularePage .fd-sticky-tab-tools.card-custom,
#stammdatenPage .fd-sticky-tab-tools.card-custom {
    padding: var(--fd-search-card-padding-y) var(--fd-search-card-padding-x) !important;
    border-radius: 8px !important;
}

.flowcrm-filter-grid,
.flowkv-filter-card .row,
.fd-sticky-tab-tools .row {
    gap: 10px 10px !important;
}

.flowcrm-filter-card .modern-search,
.flowkv-filter-card .modern-search,
.fd-sticky-tab-tools .modern-search,
.flowcrm-filter-card .form-control,
.flowcrm-filter-card .form-select,
.flowkv-filter-card .form-control,
.flowkv-filter-card .form-select,
.fd-sticky-tab-tools .form-control,
.fd-sticky-tab-tools .form-select,
.fd-sticky-tab-tools .input-group-text {
    min-height: var(--fd-control-compact-height) !important;
    height: var(--fd-control-compact-height) !important;
}

.flowcrm-filter-card .form-control,
.flowcrm-filter-card .form-select,
.flowkv-filter-card .form-control,
.flowkv-filter-card .form-select,
.fd-sticky-tab-tools .form-control,
.fd-sticky-tab-tools .form-select {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    font-size: 13px !important;
}

.flowcrm-filter-card .input-group-text,
.flowkv-filter-card .input-group-text,
.fd-sticky-tab-tools .input-group-text {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
}

.workbook-trash-toolbar-btn {
    width: auto !important;
    min-width: 126px !important;
    max-width: 150px !important;
    height: 46px !important;
    min-height: 46px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    justify-content: center !important;
    white-space: nowrap !important;
}

.workbook-toolbar-actions {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-width: 0;
}

.workbook-toolbar-actions .form-select {
    height: 46px !important;
    min-height: 46px !important;
    min-width: 0;
}

.workbook-card.is-active {
    border-left: 5px solid #16a34a !important;
}

.workbook-card.is-pending {
    border-left: 5px solid #f59e0b !important;
    background:
        linear-gradient(180deg, rgba(255, 251, 235, .96) 0%, rgba(255, 255, 255, .96) 72%) !important;
}

.workbook-status.warning {
    color: #92400e !important;
}

.workbook-status.warning .workbook-status-dot {
    background: #f59e0b !important;
}

.workbook-card.is-completed {
    position: relative;
    border-color: rgba(22, 163, 74, .34) !important;
    border-left: 5px solid #16a34a !important;
    background:
        linear-gradient(180deg, rgba(240, 253, 244, .96) 0%, rgba(255, 255, 255, .96) 72%) !important;
}

.workbook-completed-pill {
    flex: 0 0 auto;
    min-width: 36px;
    border: 1px solid rgba(22, 163, 74, .28);
    background: rgba(220, 252, 231, .92);
    color: #166534;
    text-align: center;
    font-size: .68rem;
    font-weight: 800;
    line-height: 1.15;
}

.workbook-delegated-pill {
    flex: 0 0 auto;
    min-width: 38px;
    border: 1px solid rgba(37, 99, 235, .24);
    background: rgba(219, 234, 254, .94);
    color: #1d4ed8;
    text-align: center;
    font-size: .68rem;
    font-weight: 750;
    line-height: 1.15;
}

.workbook-card.is-completed:hover {
    border-color: rgba(22, 163, 74, .46) !important;
    box-shadow: 0 16px 34px rgba(22, 101, 52, .09) !important;
}

.flowcrm-stats-grid,
.flowcrm-main-grid,
.flowcrm-detail-grid,
.workbook-grid,
.formulare-grid,
.kv-grid {
    gap: var(--fd-card-gap) !important;
}

.flowcrm-module > .fd-sticky-tab-tools > .flowcrm-header-card + .flowcrm-filter-card {
    margin-top: 0 !important;
}

/* 1.3.2 correction pass: collapsed sidebar active tab notch. */
body.sidebar-collapsed .sidebar,
body.sidebar-collapsed .sidebar-menu {
    overflow: visible !important;
}

body.sidebar-collapsed .menu-item {
    position: relative !important;
    isolation: isolate !important;
}

body.sidebar-collapsed .menu-item.active::before {
    content: "" !important;
    position: absolute !important;
    z-index: -1 !important;
    left: 14px !important;
    right: -14px !important;
    top: 6px !important;
    height: 34px !important;
    background: #ffffff !important;
    border-radius: 999px 0 0 999px !important;
    box-shadow: 0 12px 22px rgba(15, 23, 42, .08) !important;
}

body.sidebar-collapsed .menu-item.active,
body.sidebar-collapsed .menu-item.active:hover,
body.sidebar-collapsed .menu-item.active:focus-visible {
    overflow: visible !important;
    background: transparent !important;
}

body.sidebar-collapsed .menu-item.active i,
body.sidebar-collapsed .menu-item.active:hover i,
body.sidebar-collapsed .menu-item.active:focus-visible i {
    position: relative !important;
    z-index: 1 !important;
    background: #ffffff !important;
    color: #2563eb !important;
    box-shadow: none !important;
}

/* 1.3.2 correction pass: collapsed logo sits on white header. */
body.sidebar-collapsed .logo {
    min-height: 64px !important;
    margin: 0 0 16px !important;
    padding: 10px 0 !important;
    background: #ffffff !important;
    border-radius: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
}

body.sidebar-collapsed .logo-box {
    box-shadow: 0 10px 22px rgba(15, 23, 42, .16) !important;
}

body.sidebar-collapsed .sidebar-menu {
    padding-top: 0 !important;
}

/* 1.3.2 correction pass: repair collapsed logo header and active tab. */
body.sidebar-collapsed .sidebar {
    overflow: visible !important;
}

body.sidebar-collapsed .logo {
    width: 100% !important;
    min-height: 64px !important;
    margin: 0 !important;
    padding: 10px 0 !important;
    background: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 0 !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
}

body.sidebar-collapsed .logo-box {
    width: 38px !important;
    height: 38px !important;
    flex: 0 0 38px !important;
    margin: 0 auto !important;
}

body.sidebar-collapsed .sidebar-menu {
    width: 100% !important;
    padding-top: 16px !important;
    overflow: visible !important;
}

body.sidebar-collapsed .menu-item,
body.sidebar-collapsed .menu-item:hover,
body.sidebar-collapsed .menu-item:focus-visible {
    width: 100% !important;
    min-width: 100% !important;
    margin: 0 0 8px !important;
    background: transparent !important;
    overflow: visible !important;
}

body.sidebar-collapsed .menu-item::before {
    display: none !important;
    content: none !important;
}

body.sidebar-collapsed .menu-item.active,
body.sidebar-collapsed .menu-item.active:hover,
body.sidebar-collapsed .menu-item.active:focus-visible {
    width: calc(100% + 14px) !important;
    min-width: calc(100% + 14px) !important;
    margin: 0 -14px 8px 0 !important;
    padding: 0 14px 0 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(90deg, transparent 0 14px, #ffffff 14px 100%) !important;
    border-radius: 999px 0 0 999px !important;
    border: 0 !important;
    box-shadow: none !important;
    isolation: auto !important;
}

body.sidebar-collapsed .menu-item i {
    position: relative !important;
    z-index: 1 !important;
}

body.sidebar-collapsed .menu-item.active i,
body.sidebar-collapsed .menu-item.active:hover i,
body.sidebar-collapsed .menu-item.active:focus-visible i {
    background: #ffffff !important;
    color: #2563eb !important;
    box-shadow: none !important;
}

/* 1.3.2 correction pass: active collapsed tab uses page background. */
body.sidebar-collapsed .menu-item.active,
body.sidebar-collapsed .menu-item.active:hover,
body.sidebar-collapsed .menu-item.active:focus-visible {
    width: calc(100% + 16px) !important;
    min-width: calc(100% + 16px) !important;
    margin: 0 -16px 8px 0 !important;
    padding: 0 16px 0 0 !important;
    background: var(--fd-bg, #f3f6f9) !important;
    border-radius: 999px 0 0 999px !important;
    box-shadow: none !important;
}

body.sidebar-collapsed .menu-item.active::before,
body.sidebar-collapsed .menu-item.active::after {
    display: none !important;
    content: none !important;
}

body.sidebar-collapsed .menu-item.active i,
body.sidebar-collapsed .menu-item.active:hover i,
body.sidebar-collapsed .menu-item.active:focus-visible i {
    background: #ffffff !important;
    color: #2563eb !important;
}

body.darkmode.sidebar-collapsed .menu-item.active,
body.darkmode.sidebar-collapsed .menu-item.active:hover,
body.darkmode.sidebar-collapsed .menu-item.active:focus-visible {
    background: var(--fd-bg, #0f172a) !important;
}

/* 1.3.2 correction pass: revert collapsed active notch to clean icon pill. */
body.sidebar-collapsed .sidebar,
body.sidebar-collapsed .sidebar-menu {
    overflow: hidden !important;
}

body.sidebar-collapsed .logo {
    width: 100% !important;
    min-height: 64px !important;
    margin: 0 !important;
    padding: 10px 0 !important;
    background: #ffffff !important;
    border: 0 !important;
    box-shadow: none !important;
}

body.sidebar-collapsed .sidebar-menu {
    width: 100% !important;
    padding-top: 16px !important;
}

body.sidebar-collapsed .menu-item,
body.sidebar-collapsed .menu-item:hover,
body.sidebar-collapsed .menu-item:focus-visible,
body.sidebar-collapsed .menu-item.active,
body.sidebar-collapsed .menu-item.active:hover,
body.sidebar-collapsed .menu-item.active:focus-visible {
    width: 100% !important;
    min-width: 100% !important;
    height: 46px !important;
    min-height: 46px !important;
    margin: 0 0 8px !important;
    padding: 0 !important;
    display: grid !important;
    place-items: center !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    overflow: hidden !important;
    isolation: auto !important;
}

body.sidebar-collapsed .menu-item::before,
body.sidebar-collapsed .menu-item::after,
body.sidebar-collapsed .menu-item.active::before,
body.sidebar-collapsed .menu-item.active::after {
    display: none !important;
    content: none !important;
}

body.sidebar-collapsed .menu-item i {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    margin: 0 !important;
    display: grid !important;
    place-items: center !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, .1) !important;
    color: rgba(255, 255, 255, .82) !important;
    box-shadow: none !important;
}

body.sidebar-collapsed .menu-item:hover i,
body.sidebar-collapsed .menu-item:focus-visible i {
    background: rgba(255, 255, 255, .16) !important;
    color: #ffffff !important;
}

body.sidebar-collapsed .menu-item.active i,
body.sidebar-collapsed .menu-item.active:hover i,
body.sidebar-collapsed .menu-item.active:focus-visible i {
    background: #ffffff !important;
    color: #2563eb !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .14) !important;
}

/* 1.3.2 restore: compact sidebar back to v18 baseline. */
body.sidebar-collapsed .sidebar {
    width: var(--fd-sidebar-collapsed-width) !important;
    min-width: var(--fd-sidebar-collapsed-width) !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    overflow: hidden !important;
    background: linear-gradient(180deg, #071d3d 0%, #0c2f5d 54%, #0f3b68 100%) !important;
}

body.sidebar-collapsed .logo {
    width: 100% !important;
    min-width: 100% !important;
    min-height: 74px !important;
    margin: 0 0 16px !important;
    padding: 14px 0 12px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-bottom: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

body.sidebar-collapsed .logo::before,
body.sidebar-collapsed .logo::after {
    display: none !important;
    content: none !important;
}

body.sidebar-collapsed .logo-box {
    width: 40px !important;
    height: 40px !important;
    flex: 0 0 40px !important;
    margin: 0 auto !important;
    transform: none !important;
    box-shadow: 0 10px 22px rgba(2, 6, 23, .18) !important;
}

body.sidebar-collapsed .logo-box img {
    width: 100% !important;
    height: 100% !important;
}

body.sidebar-collapsed .logo-wordmark,
body.sidebar-collapsed .sidebar-dashboard,
body.sidebar-collapsed .sidebar-section-title,
body.sidebar-collapsed .sidebar-footer-main,
body.sidebar-collapsed .sidebar hr,
body.sidebar-collapsed .logo .sidebar-toggle {
    display: none !important;
}

body.sidebar-collapsed .sidebar-menu {
    width: 100% !important;
    padding: 0 !important;
    overflow: hidden !important;
}

body.sidebar-collapsed .menu-item,
body.sidebar-collapsed .menu-item:hover,
body.sidebar-collapsed .menu-item:focus-visible,
body.sidebar-collapsed .menu-item.active,
body.sidebar-collapsed .menu-item.active:hover,
body.sidebar-collapsed .menu-item.active:focus-visible {
    width: 100% !important;
    min-width: 0 !important;
    height: 46px !important;
    min-height: 46px !important;
    margin: 0 0 8px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    overflow: hidden !important;
    isolation: auto !important;
}

body.sidebar-collapsed .menu-item::before,
body.sidebar-collapsed .menu-item::after,
body.sidebar-collapsed .menu-item.active::before,
body.sidebar-collapsed .menu-item.active::after {
    display: none !important;
    content: none !important;
}

body.sidebar-collapsed .menu-item span {
    display: none !important;
}

body.sidebar-collapsed .menu-item i {
    width: 34px !important;
    height: 34px !important;
    flex: 0 0 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, .1) !important;
    color: rgba(255, 255, 255, .82) !important;
    box-shadow: none !important;
}

body.sidebar-collapsed .menu-item:hover i,
body.sidebar-collapsed .menu-item:focus-visible i {
    background: rgba(255, 255, 255, .16) !important;
    color: #ffffff !important;
}

body.sidebar-collapsed .menu-item.active i,
body.sidebar-collapsed .menu-item.active:hover i,
body.sidebar-collapsed .menu-item.active:focus-visible i {
    background: #ffffff !important;
    color: #1d4ed8 !important;
    box-shadow: none !important;
}

body.sidebar-collapsed .sidebar-footer {
    width: 100% !important;
    min-height: 58px !important;
    margin-top: auto !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 0 !important;
    border-top: 0 !important;
}

body.sidebar-collapsed .sidebar-footer .sidebar-toggle {
    width: 34px !important;
    height: 34px !important;
    flex: 0 0 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    background: rgba(255, 255, 255, .1) !important;
}

body.sidebar-collapsed .app-header::before {
    background: transparent !important;
    border-bottom: 0 !important;
}

/* 1.3.2 correction pass: collapsed sidebar inverted logo and exact icon centering. */
body.sidebar-collapsed .logo-box img {
    filter: invert(1) hue-rotate(180deg) contrast(1.08) saturate(.9) !important;
}

body.sidebar-collapsed .sidebar-menu {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
}

body.sidebar-collapsed .menu-item,
body.sidebar-collapsed .menu-item:hover,
body.sidebar-collapsed .menu-item:focus-visible,
body.sidebar-collapsed .menu-item.active,
body.sidebar-collapsed .menu-item.active:hover,
body.sidebar-collapsed .menu-item.active:focus-visible {
    display: grid !important;
    grid-template-columns: 1fr !important;
    place-items: center !important;
    justify-items: center !important;
    align-items: center !important;
    text-align: center !important;
}

body.sidebar-collapsed .menu-item i,
body.sidebar-collapsed .menu-item i.me-2,
body.sidebar-collapsed .menu-item.active i,
body.sidebar-collapsed .menu-item.active i.me-2 {
    margin: 0 !important;
    transform: none !important;
    display: grid !important;
    place-items: center !important;
    text-align: center !important;
    line-height: 1 !important;
}

body.sidebar-collapsed .menu-item i::before {
    margin: 0 !important;
    line-height: 1 !important;
}

/* 1.3.2 correction pass: vertically center compact search text. */
.modern-search {
    display: flex !important;
    align-items: center !important;
}

.modern-search .input-group-text,
.modern-search .form-control,
.fd-sticky-tab-tools .modern-search .input-group-text,
.fd-sticky-tab-tools .modern-search .form-control,
.flowcrm-filter-card .modern-search .input-group-text,
.flowcrm-filter-card .modern-search .form-control,
.flowkv-filter-card .modern-search .input-group-text,
.flowkv-filter-card .modern-search .form-control {
    height: 40px !important;
    min-height: 40px !important;
    display: flex !important;
    align-items: center !important;
    line-height: 1.2 !important;
}

.modern-search .form-control,
.fd-sticky-tab-tools .modern-search .form-control,
.flowcrm-filter-card .modern-search .form-control,
.flowkv-filter-card .modern-search .form-control {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.modern-search .form-control::placeholder {
    line-height: 1.2 !important;
}
/* 1.3.2 correction pass: central maximum width for search fields. */
:root {
    --fd-search-max-width: 620px;
    --fd-search-compact-max-width: 560px;
    --fd-search-wide-max-width: 720px;
}

.app-header-search .modern-search,
.fd-sticky-tab-tools .modern-search,
.flowcrm-filter-card .modern-search,
.flowkv-filter-card .modern-search,
.flowskills-search-wrap .modern-search,
#einstellungenPage .modern-search:has(input[type="search"]) {
    width: 100% !important;
    max-width: var(--fd-search-max-width) !important;
}

#teilnehmerContent .fd-sticky-tab-tools .input-group,
#betriebeContent .fd-sticky-tab-tools .input-group {
    max-width: var(--fd-search-compact-max-width) !important;
}

.flowkv-filter-card .modern-search {
    max-width: var(--fd-search-wide-max-width) !important;
}

#flowSkillsWorkbookSearch,
#flowSkillsJobSearch {
    max-width: var(--fd-search-max-width) !important;
}

@media (max-width: 760px) {
    .app-header-search .modern-search,
    .fd-sticky-tab-tools .modern-search,
    .flowcrm-filter-card .modern-search,
    .flowkv-filter-card .modern-search,
    .flowskills-search-wrap .modern-search,
    #einstellungenPage .modern-search:has(input[type="search"]),
    #teilnehmerContent .fd-sticky-tab-tools .input-group,
    #betriebeContent .fd-sticky-tab-tools .input-group,
    #flowSkillsWorkbookSearch,
    #flowSkillsJobSearch {
        max-width: none !important;
    }
}

/* 1.3.2 correction pass: keep workbook search tools in one row. */
#arbeitsmappePage .fd-sticky-tab-tools .row {
    display: grid !important;
    grid-template-columns: minmax(320px, var(--fd-search-max-width)) minmax(220px, 320px) !important;
    gap: 10px !important;
    align-items: center !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

#arbeitsmappePage .fd-sticky-tab-tools .row > [class*="col-"] {
    width: auto !important;
    max-width: none !important;
    flex: 0 0 auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

#arbeitsmappePage .fd-sticky-tab-tools .modern-search,
#arbeitsmappePage .fd-sticky-tab-tools .form-select {
    width: 100% !important;
}
#arbeitsmappePage .fd-sticky-tab-tools .modern-search {
    max-width: 100% !important;
}

#arbeitsmappePage .fd-sticky-tab-tools .row,
#teilnehmerContent .fd-sticky-tab-tools .row,
#betriebeContent .fd-sticky-tab-tools .row {
    justify-content: start !important;
}

@media (max-width: 700px) {
    #arbeitsmappePage .fd-sticky-tab-tools .row {
        grid-template-columns: 1fr !important;
    }
}

/* 1.3.2 correction pass: stammdaten filters stay one row and use modern search styling. */
#teilnehmerContent .fd-sticky-tab-tools .row,
#betriebeContent .fd-sticky-tab-tools .row {
    display: grid !important;
    grid-template-columns: minmax(280px, var(--fd-search-compact-max-width)) minmax(160px, 220px) minmax(180px, 230px) minmax(150px, 190px) auto !important;
    gap: 10px !important;
    align-items: center !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

#teilnehmerContent .fd-sticky-tab-tools .row > [class*="col-"],
#betriebeContent .fd-sticky-tab-tools .row > [class*="col-"] {
    width: auto !important;
    max-width: none !important;
    flex: 0 0 auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

#teilnehmerContent .fd-sticky-tab-tools .input-group,
#betriebeContent .fd-sticky-tab-tools .input-group {
    width: 100% !important;
    height: 40px !important;
    min-height: 40px !important;
    display: flex !important;
    align-items: center !important;
    overflow: hidden !important;
    border: 1px solid #cfdae8 !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .035) !important;
}

#teilnehmerContent .fd-sticky-tab-tools .input-group-text,
#betriebeContent .fd-sticky-tab-tools .input-group-text {
    width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 0 !important;
    background: transparent !important;
    color: #64748b !important;
}

#teilnehmerContent .fd-sticky-tab-tools .input-group .form-control,
#betriebeContent .fd-sticky-tab-tools .input-group .form-control {
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 12px 0 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    line-height: 1.2 !important;
}

#teilnehmerContent .fd-sticky-tab-tools .form-select,
#betriebeContent .fd-sticky-tab-tools .form-select {
    width: 100% !important;
}

#teilnehmerContent .fd-sticky-tab-tools .col-md-3.d-flex,
#betriebeContent .fd-sticky-tab-tools .col-md-2.d-flex,
#betriebeContent .fd-sticky-tab-tools .col-md-3.d-flex {
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    justify-content: end !important;
    min-width: 0 !important;
}

#stammdatenNewCompanyBtn {
    min-width: 146px !important;
}

.view-toggle-group {
    display: inline-flex !important;
    gap: 6px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

.view-toggle-group .btn,
#teilnehmerGridViewBtn,
#teilnehmerListViewBtn,
#betriebeGridViewBtn,
#betriebeListViewBtn {
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    margin: 0 !important;
}

.view-toggle-group .btn + .btn {
    margin-left: 0 !important;
}

@media (max-width: 1050px) {
    #teilnehmerContent .fd-sticky-tab-tools .row,
    #betriebeContent .fd-sticky-tab-tools .row {
        grid-template-columns: minmax(0, 1fr) minmax(170px, 220px) auto !important;
    }
}

@media (max-width: 760px) {
    #teilnehmerContent .fd-sticky-tab-tools .row,
    #betriebeContent .fd-sticky-tab-tools .row {
        grid-template-columns: 1fr !important;
    }
}

/* 1.3.2 correction pass: all search toolbars stay one row on desktop. */
#formularePage .fd-sticky-tab-tools .row,
.flowkv-filter-card .row {
    display: grid !important;
    gap: 10px !important;
    align-items: center !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

#formularePage .fd-sticky-tab-tools .row {
    grid-template-columns: minmax(320px, var(--fd-search-max-width)) minmax(150px, 220px) minmax(120px, 180px) !important;
}

.flowkv-filter-card .row {
    grid-template-columns: minmax(360px, var(--fd-search-wide-max-width)) minmax(240px, 300px) minmax(120px, 180px) !important;
}

#formularePage .fd-sticky-tab-tools .row > [class*="col-"],
.flowkv-filter-card .row > [class*="col-"] {
    width: auto !important;
    max-width: none !important;
    flex: 0 0 auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

#formularePage .fd-sticky-tab-tools .modern-search,
#formularePage .fd-sticky-tab-tools .form-select,
.flowkv-filter-card .modern-search,
.flowkv-filter-card .flowkv-source-switch {
    width: 100% !important;
}

#formularePage .fd-sticky-tab-tools .modern-search,
.flowkv-filter-card .modern-search {
    max-width: 100% !important;
}

#formularePage .fd-sticky-tab-tools .row,
.flowkv-filter-card .row {
    justify-content: start !important;
}

#formularePage .fd-sticky-tab-tools .card-action-btn,
.flowkv-filter-card .card-action-btn,
#reloadTemplatesBtn {
    width: 100% !important;
    height: 40px !important;
    min-height: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
}

.flowkv-filter-card #reloadCollectiveBtn {
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    padding: 0 !important;
    display: inline-grid !important;
    place-items: center !important;
    aspect-ratio: 1 / 1;
    border-radius: 8px !important;
}

.flowkv-source-switch {
    height: 40px !important;
    min-height: 40px !important;
    padding: 3px !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 4px !important;
    align-items: center !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.flowkv-source-switch .flowkv-source-option,
.flowkv-source-switch .flowkv-source-option:hover,
.flowkv-source-switch .flowkv-source-option:focus-visible,
.flowkv-source-switch .flowkv-source-option.is-active,
.flowkv-source-switch .flowkv-source-option.is-active:hover,
.flowkv-source-switch .flowkv-source-option.is-active:focus-visible {
    width: 100% !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    padding: 0 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
    transform: none !important;
    box-shadow: none !important;
}

.flowkv-source-switch .flowkv-source-option.is-active {
    background: #ffffff !important;
    color: #0d6efd !important;
}

@media (max-width: 850px) {
    #formularePage .fd-sticky-tab-tools .row,
    .flowkv-filter-card .row {
        grid-template-columns: 1fr !important;
    }
}

/* 1.3.2 correction pass: settings user toolbar equal control height. */
#standardUserSearch,
#standardUserLocationFilter,
#standardUserSearch.form-control,
#standardUserLocationFilter.form-select {
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    font-size: 13px !important;
    line-height: 40px !important;
}

#standardUserSearch.form-control {
    padding: 0 12px 0 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

#standardUserSearch.form-control::placeholder {
    line-height: 40px !important;
}

#standardUserLocationFilter.form-select {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-radius: 8px !important;
    background-position: right 12px center !important;
}

#standardUserSearch.form-control:focus {
    box-shadow: none !important;
}

#standardUserSearch.form-control:focus,
#standardUserLocationFilter.form-select:focus {
    border-color: #2563eb !important;
}

/* 1.3.2 correction pass: workpaper tab hover states. */
#dokumentePage .workpaper-page-head .workpaper-tabs > .btn,
#dokumentePage .workpaper-page-head .workpaper-tabs > .btn-primary,
#dokumentePage .workpaper-page-head .workpaper-tabs > .btn-outline-primary {
    transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease !important;
}

#dokumentePage .workpaper-page-head .workpaper-tabs > .btn:hover,
#dokumentePage .workpaper-page-head .workpaper-tabs > .btn:focus-visible {
    transform: none !important;
    box-shadow: 0 10px 20px rgba(37, 99, 235, .12) !important;
}

#dokumentePage .workpaper-page-head .workpaper-tabs > .btn-outline-primary:hover,
#dokumentePage .workpaper-page-head .workpaper-tabs > .btn-outline-primary:focus-visible {
    background: #f8fbff !important;
    border-color: #dbeafe !important;
    color: #1d4ed8 !important;
}

#dokumentePage .workpaper-page-head .workpaper-tabs > .btn-primary:hover,
#dokumentePage .workpaper-page-head .workpaper-tabs > .btn-primary:focus-visible {
    background: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    color: #ffffff !important;
}

/* 1.3.2 correction pass: unified page title size and quiet tab hover. */
.page-content > .fd-sticky-page-head .topbar-title > h2,
#dokumentePage > form > .fd-sticky-page-head .topbar-title > h2 {
    margin: 0 !important;
    font-size: 24px !important;
    font-weight: 820 !important;
    line-height: 1.12 !important;
    letter-spacing: 0 !important;
    color: #071426 !important;
}

.page-content > .fd-sticky-page-head .topbar-subtitle,
#dokumentePage > form > .fd-sticky-page-head .topbar-subtitle {
    font-size: 13px !important;
    line-height: 1.28 !important;
}

.workpaper-tabs > .btn,
.stammdaten-tabs > .btn,
.settings-tabs > .btn,
#dokumentePage .workpaper-page-head .workpaper-tabs > .btn {
    transition: background-color .16s ease, border-color .16s ease, color .16s ease !important;
}

.workpaper-tabs > .btn:hover,
.workpaper-tabs > .btn:focus-visible,
.stammdaten-tabs > .btn:hover,
.stammdaten-tabs > .btn:focus-visible,
.settings-tabs > .btn:hover,
.settings-tabs > .btn:focus-visible,
#dokumentePage .workpaper-page-head .workpaper-tabs > .btn:hover,
#dokumentePage .workpaper-page-head .workpaper-tabs > .btn:focus-visible {
    transform: none !important;
    box-shadow: none !important;
}

.workpaper-tabs > .btn-outline-primary:hover,
.workpaper-tabs > .btn-outline-primary:focus-visible,
.stammdaten-tabs > .btn-outline-primary:hover,
.stammdaten-tabs > .btn-outline-primary:focus-visible,
.settings-tabs > .btn-outline-primary:hover,
.settings-tabs > .btn-outline-primary:focus-visible,
#dokumentePage .workpaper-page-head .workpaper-tabs > .btn-outline-primary:hover,
#dokumentePage .workpaper-page-head .workpaper-tabs > .btn-outline-primary:focus-visible {
    background: #f8fbff !important;
    border-color: #dbeafe !important;
    color: #1d4ed8 !important;
}

.workpaper-tabs > .btn-primary:hover,
.workpaper-tabs > .btn-primary:focus-visible,
.stammdaten-tabs > .btn-primary:hover,
.stammdaten-tabs > .btn-primary:focus-visible,
.settings-tabs > .btn-primary:hover,
.settings-tabs > .btn-primary:focus-visible,
#dokumentePage .workpaper-page-head .workpaper-tabs > .btn-primary:hover,
#dokumentePage .workpaper-page-head .workpaper-tabs > .btn-primary:focus-visible {
    background: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    color: #ffffff !important;
}

body.darkmode .page-content > .fd-sticky-page-head .topbar-title > h2,
body.darkmode #dokumentePage > form > .fd-sticky-page-head .topbar-title > h2 {
    color: #ffffff !important;
}

/* 1.3.2 correction pass: flowDocs worktime card balances the left column only. */
#flowDocsContent .flowdocs-worktime-card {
    flex: 1 1 auto !important;
}

/* 1.3.2 correction pass: flowCRM filter search uses the shared max width. */
.flowcrm-filter-grid {
    grid-template-columns: minmax(280px, var(--fd-search-compact-max-width)) repeat(5, minmax(132px, 220px)) !important;
    justify-content: start !important;
}



/* 1.3.2 correction pass: quieter CRM detail identity titles. */
.flowcrm-detail-head .flowcrm-case-company-title,
.flowcrm-detail-head .flowcrm-case-participant-title,
.flowcrm-detail-head .flowcrm-case-company-title span,
.flowcrm-detail-head .flowcrm-case-participant-title span {
    font-weight: 650 !important;
}

.flowcrm-detail-head .flowcrm-case-participant-title {
    font-size: 14px !important;
}

/* 1.3.2 correction pass: equal flowSkills action button dimensions. */
.flowskills-action-row {
    align-items: center !important;
}

.flowskills-action-row .flowskills-action-btn,
.flowskills-action-row .flowskills-action-btn:disabled,
.flowskills-action-row .flowskills-action-btn.disabled {
    width: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
    flex: 0 0 150px !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    padding: 0 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
}

.flowskills-action-row .flowskills-action-btn .fd-brand-wordmark,
.flowskills-action-row .flowskills-action-btn span {
    line-height: 1 !important;
}

@media (max-width: 640px) {
    .flowskills-action-row .flowskills-action-btn,
    .flowskills-action-row .flowskills-action-btn:disabled,
    .flowskills-action-row .flowskills-action-btn.disabled {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        flex: 1 1 0 !important;
    }
}
/* 1.3.2 correction pass: lighter app header actions without boxed tiles. */
.app-header {
    gap: 10px !important;
    box-shadow: 0 1px 0 rgba(188, 204, 226, .72) !important;
}

.app-header .theme-switch-header {
    height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
}

.app-header .theme-switch-header .theme-slider {
    border: 0 !important;
    background: #eef3f8 !important;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, .08) !important;
}

.app-header .header-icon-button,
.app-header .notification-button,
.app-header-search-toggle {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    flex: 0 0 38px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #111827 !important;
    transition: background-color .16s ease, color .16s ease !important;
}

.app-header .header-icon-button:hover,
.app-header .header-icon-button:focus-visible,
.app-header .notification-button:hover,
.app-header .notification-button:focus-visible,
.app-header-search-toggle:hover,
.app-header-search-toggle:focus-visible {
    background: #eef4ff !important;
    color: #2563eb !important;
    box-shadow: none !important;
    outline: none !important;
}

.app-header .header-icon-button i,
.app-header .notification-button i,
.app-header-search-toggle i {
    font-size: 20px !important;
}

.app-header .notification-badge {
    top: 2px !important;
    right: 1px !important;
    min-width: 17px !important;
    height: 17px !important;
    padding: 0 5px !important;
    border: 2px solid #ffffff !important;
    line-height: 13px !important;
}

.module-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.module-header-action-badge[hidden] {
    display: none !important;
}

.flowdeck-confirm-modal .modal-content {
    overflow: hidden;
    border: 1px solid #dbe6f2;
    border-radius: 12px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
}

.flowdeck-confirm-modal .modal-header {
    align-items: flex-start;
    gap: 12px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid #e4edf8;
}

.flowdeck-confirm-modal .modal-title {
    margin: 0;
    color: #0f172a;
    font-size: 18px;
    font-weight: 820;
    letter-spacing: 0;
    line-height: 1.2;
}

.flowdeck-confirm-subtitle {
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.35;
}

.flowdeck-confirm-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 10px;
    background: #eff6ff;
    color: #2563eb;
}

.flowdeck-confirm-modal .modal-body {
    padding: 18px 20px;
}

.flowdeck-confirm-modal .modal-body p {
    margin: 0;
    color: #334155;
    font-size: 14px;
    line-height: 1.5;
}

.flowdeck-confirm-modal .modal-footer {
    gap: 10px;
    padding: 14px 20px 18px;
    border-top: 1px solid #e4edf8;
}

body.darkmode .flowdeck-confirm-modal .modal-content {
    border-color: #334155;
    background: #111827;
    color: #e5eefb;
}

body.darkmode .flowdeck-confirm-modal .modal-header,
body.darkmode .flowdeck-confirm-modal .modal-footer {
    border-color: #334155;
}

body.darkmode .flowdeck-confirm-modal .modal-title {
    color: #f8fafc;
}

body.darkmode .flowdeck-confirm-subtitle,
body.darkmode .flowdeck-confirm-modal .modal-body p {
    color: #cbd5e1;
}

body.darkmode .flowdeck-confirm-icon {
    background: #172554;
    color: #bfdbfe;
}

.app-header .header-user-toggle {
    min-width: 252px !important;
    min-height: 44px !important;
    padding: 4px 8px 4px 6px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #111827 !important;
    gap: 10px !important;
    transition: background-color .16s ease !important;
}

.app-header .header-user-toggle:hover,
.app-header .header-user-toggle:focus-visible {
    background: #f3f7fb !important;
    box-shadow: none !important;
    outline: none !important;
}

.app-header .header-user-photo {
    width: 38px !important;
    height: 38px !important;
    flex: 0 0 38px !important;
    box-shadow: 0 0 0 1px rgba(203, 213, 225, .85) !important;
}

.app-header .header-user-name {
    font-size: 14px !important;
    line-height: 1.15 !important;
}

.app-header .header-user-role {
    font-size: 11px !important;
    line-height: 1.2 !important;
}

.app-header .header-admin-lock,
.app-header .header-user-toggle .bi-chevron-down {
    color: #64748b !important;
}

@media (max-width: 760px) {
    .app-header .header-user-toggle {
        width: 46px !important;
        min-width: 46px !important;
        max-width: 46px !important;
        padding: 4px !important;
        gap: 0 !important;
        justify-content: center !important;
        overflow: hidden;
    }

    .app-header .header-user-photo {
        width: 34px !important;
        height: 34px !important;
        flex: 0 0 34px !important;
    }

    .app-header .header-user-toggle .flex-grow-1,
    .app-header .header-admin-lock,
    .app-header .header-user-toggle .bi-chevron-down {
        display: none !important;
    }
}

body.darkmode .app-header .theme-switch-header .theme-slider,
body.darkmode .app-header .header-icon-button,
body.darkmode .app-header .notification-button,
body.darkmode .app-header .header-user-toggle,
body.darkmode .app-header-search-toggle {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #111827 !important;
}

body.darkmode .app-header .theme-switch-header .theme-slider {
    background: #eef3f8 !important;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, .08) !important;
}

body.darkmode .app-header .header-icon-button:hover,
body.darkmode .app-header .header-icon-button:focus-visible,
body.darkmode .app-header .notification-button:hover,
body.darkmode .app-header .notification-button:focus-visible,
body.darkmode .app-header .header-user-toggle:hover,
body.darkmode .app-header .header-user-toggle:focus-visible,
body.darkmode .app-header-search-toggle:hover,
body.darkmode .app-header-search-toggle:focus-visible {
    background: #eef4ff !important;
    color: #2563eb !important;
}

/* 1.3.2 correction pass: search/filter toolbars as quiet rows, not cards. */
.flowcrm-filter-card,
.flowkv-filter-card,
.fd-sticky-tab-tools.card-custom,
#arbeitsmappePage .fd-sticky-tab-tools.card-custom,
#formularePage .fd-sticky-tab-tools.card-custom,
#stammdatenPage .fd-sticky-tab-tools.card-custom {
    padding: 8px 10px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.flowcrm-filter-grid,
.flowkv-filter-card .row,
.fd-sticky-tab-tools .row,
#arbeitsmappePage .fd-sticky-tab-tools .row,
#formularePage .fd-sticky-tab-tools .row,
#stammdatenPage .fd-sticky-tab-tools .row {
    gap: 10px !important;
    align-items: center !important;
}

.flowcrm-filter-card .modern-search,
.flowkv-filter-card .modern-search,
.fd-sticky-tab-tools .modern-search,
.flowcrm-filter-card .form-control,
.flowcrm-filter-card .form-select,
.flowkv-filter-card .form-control,
.flowkv-filter-card .form-select,
.fd-sticky-tab-tools .form-control,
.fd-sticky-tab-tools .form-select,
.fd-sticky-tab-tools .input-group-text {
    min-height: 38px !important;
    height: 38px !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}

.flowcrm-filter-card .modern-search,
.flowkv-filter-card .modern-search,
.fd-sticky-tab-tools .modern-search,
#teilnehmerContent .fd-sticky-tab-tools .input-group,
#betriebeContent .fd-sticky-tab-tools .input-group {
    background: #ffffff !important;
    border: 1px solid #cfdae8 !important;
}

.stammdaten-filter-meta,
.betrieb-filter-meta {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 6px 8px !important;
    min-width: 0 !important;
    margin-top: 8px !important;
}

.stammdaten-filter-count,
.betrieb-filter-count {
    color: #64748b !important;
    font-size: 12px !important;
    font-weight: 760 !important;
    line-height: 1.25 !important;
}

.stammdaten-filter-chips {
    display: inline-flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 5px !important;
    min-width: 0 !important;
}

.stammdaten-filter-chips:empty {
    display: none !important;
}

.stammdaten-filter-chip {
    display: inline-flex !important;
    align-items: center !important;
    min-height: 24px !important;
    max-width: 100% !important;
    padding: 3px 8px !important;
    border: 1px solid #bfdbfe !important;
    border-radius: 8px !important;
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    line-height: 1.1 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.stammdaten-filter-reset {
    flex: 0 0 auto !important;
    min-width: 128px !important;
    min-height: 38px !important;
    border-color: #cbd5e1 !important;
    background: #ffffff !important;
    color: #475569 !important;
    transform: none !important;
}

.stammdaten-filter-reset:not(:disabled):hover,
.stammdaten-filter-reset:not(:disabled):focus-visible {
    border-color: #2563eb !important;
    background: #eff6ff !important;
    color: #1d4ed8 !important;
}

.stammdaten-filter-reset:disabled {
    opacity: .52 !important;
    cursor: not-allowed !important;
}

body.darkmode .stammdaten-filter-count,
body.darkmode .betrieb-filter-count {
    color: #94a3b8 !important;
}

body.darkmode .stammdaten-filter-chip {
    border-color: #1d4ed8 !important;
    background: #172554 !important;
    color: #bfdbfe !important;
}

body.darkmode .stammdaten-filter-reset {
    border-color: #334155 !important;
    background: #111827 !important;
    color: #cbd5e1 !important;
}

body.darkmode .stammdaten-filter-reset:not(:disabled):hover,
body.darkmode .stammdaten-filter-reset:not(:disabled):focus-visible {
    border-color: #60a5fa !important;
    background: #172554 !important;
    color: #bfdbfe !important;
}

@media (max-width: 1180px) {
    #teilnehmerContent .fd-sticky-tab-tools .col-md-3.d-flex,
    #betriebeContent .fd-sticky-tab-tools .col-md-3.d-flex {
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
    }

    #stammdatenNewCompanyBtn,
    .stammdaten-filter-reset {
        flex: 1 1 150px !important;
        min-width: 0 !important;
    }

    .view-toggle-group {
        flex: 0 0 auto !important;
    }
}

.flowcrm-filter-card .modern-search:hover,
.flowkv-filter-card .modern-search:hover,
.fd-sticky-tab-tools .modern-search:hover,
#teilnehmerContent .fd-sticky-tab-tools .input-group:hover,
#betriebeContent .fd-sticky-tab-tools .input-group:hover,
.flowcrm-filter-card .form-select:hover,
.flowkv-filter-card .form-select:hover,
.fd-sticky-tab-tools .form-select:hover {
    border-color: #b9cbe0 !important;
}

.flowcrm-filter-card .modern-search:focus-within,
.flowkv-filter-card .modern-search:focus-within,
.fd-sticky-tab-tools .modern-search:focus-within,
#teilnehmerContent .fd-sticky-tab-tools .input-group:focus-within,
#betriebeContent .fd-sticky-tab-tools .input-group:focus-within,
.flowcrm-filter-card .form-select:focus,
.flowkv-filter-card .form-select:focus,
.fd-sticky-tab-tools .form-select:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .11) !important;
}

.flowcrm-filter-card .input-group-text,
.flowkv-filter-card .input-group-text,
.fd-sticky-tab-tools .input-group-text {
    width: 38px !important;
    min-width: 38px !important;
    padding: 0 !important;
    justify-content: center !important;
    border: 0 !important;
    background: transparent !important;
    color: #64748b !important;
}

.flowcrm-filter-card .form-control,
.flowkv-filter-card .form-control,
.fd-sticky-tab-tools .form-control {
    border: 0 !important;
    background: transparent !important;
    padding: 0 12px 0 0 !important;
}

.flowcrm-filter-card .form-select,
.flowkv-filter-card .form-select,
.fd-sticky-tab-tools .form-select {
    background-color: #ffffff !important;
    border: 1px solid #cfdae8 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    font-size: 13px !important;
}

.flowcrm-filter-card .flowcrm-filter-toggle {
    height: 46px !important;
    min-height: 46px !important;
    padding: 0 12px !important;
    border-radius: 8px !important;
    line-height: 1 !important;
    box-shadow: none !important;
}

.flowcrm-filter-card .flowcrm-filter-toggle:hover,
.flowcrm-filter-card .flowcrm-filter-toggle:focus,
.flowcrm-filter-card .flowcrm-filter-toggle:focus-visible,
.flowcrm-filter-card .flowcrm-filter-toggle:active,
.flowcrm-filter-card .flowcrm-filter-toggle.is-open {
    transform: none !important;
}

.flowcrm-filter-card .flowcrm-advanced-filters .form-control,
.flowcrm-filter-card .flowcrm-advanced-filters .form-select {
    height: 40px !important;
    min-height: 40px !important;
    padding: 8px 12px !important;
    border: 1px solid #cddcf0 !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    color: #0f172a !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04) !important;
}

.flowcrm-filter-card .flowcrm-advanced-filters .form-control:hover,
.flowcrm-filter-card .flowcrm-advanced-filters .form-select:hover {
    border-color: #adc3df !important;
}

.flowcrm-filter-card .flowcrm-advanced-filters .form-control:focus,
.flowcrm-filter-card .flowcrm-advanced-filters .form-select:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12) !important;
}

.flowcrm-filter-card .flowcrm-advanced-filters .form-control::placeholder {
    color: #8fa1b8 !important;
    opacity: 1 !important;
}

.flowcrm-advanced-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e3edfb;
}

.flowcrm-filter-card .flowcrm-reset-filters {
    border-color: #bfd6f6 !important;
    background: #f8fbff !important;
    color: #1d4ed8 !important;
    box-shadow: none !important;
}

.flowcrm-filter-card .flowcrm-reset-filters:hover,
.flowcrm-filter-card .flowcrm-reset-filters:focus,
.flowcrm-filter-card .flowcrm-reset-filters:focus-visible,
.flowcrm-filter-card .flowcrm-reset-filters:active,
.flowcrm-filter-card .flowcrm-reset-filters.active {
    border-color: #2563eb !important;
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .10) !important;
}

.flowkv-filter-card .flowkv-source-switch {
    height: 38px !important;
    min-height: 38px !important;
    border: 1px solid #cfdae8 !important;
    background: #eef3f8 !important;
    box-shadow: none !important;
}

.flowkv-filter-card .flowkv-source-option {
    height: 30px !important;
    min-height: 30px !important;
    align-self: center !important;
    box-shadow: none !important;
    transform: none !important;
}

body.darkmode .flowcrm-filter-card,
body.darkmode .flowkv-filter-card,
body.darkmode .fd-sticky-tab-tools.card-custom,
body.darkmode #arbeitsmappePage .fd-sticky-tab-tools.card-custom,
body.darkmode #formularePage .fd-sticky-tab-tools.card-custom,
body.darkmode #stammdatenPage .fd-sticky-tab-tools.card-custom {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

body.darkmode .flowcrm-filter-card .modern-search,
body.darkmode .flowkv-filter-card .modern-search,
body.darkmode .fd-sticky-tab-tools .modern-search,
body.darkmode #teilnehmerContent .fd-sticky-tab-tools .input-group,
body.darkmode #betriebeContent .fd-sticky-tab-tools .input-group,
body.darkmode .flowcrm-filter-card .form-select,
body.darkmode .flowkv-filter-card .form-select,
body.darkmode .fd-sticky-tab-tools .form-select {
    background: #ffffff !important;
    border-color: #cfdae8 !important;
    color: #111827 !important;
}

/* 1.3.2 correction pass: restore outer search/filter cards. */
.flowcrm-filter-card,
.flowkv-filter-card,
.fd-sticky-tab-tools.card-custom,
#arbeitsmappePage .fd-sticky-tab-tools.card-custom,
#formularePage .fd-sticky-tab-tools.card-custom,
#stammdatenPage .fd-sticky-tab-tools.card-custom {
    padding: 10px 12px !important;
    border: 1px solid #dbe6f2 !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, .94) !important;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .045) !important;
}

body.darkmode .flowcrm-filter-card,
body.darkmode .flowkv-filter-card,
body.darkmode .fd-sticky-tab-tools.card-custom,
body.darkmode #arbeitsmappePage .fd-sticky-tab-tools.card-custom,
body.darkmode #formularePage .fd-sticky-tab-tools.card-custom,
body.darkmode #stammdatenPage .fd-sticky-tab-tools.card-custom {
    border: 1px solid #dbe6f2 !important;
    background: #ffffff !important;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .045) !important;
}

body.darkmode .flowcrm-filter-card {
    border-color: #24324a !important;
    background: #0f172a !important;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .22) !important;
}

body.darkmode .flowcrm-filter-card .modern-search,
body.darkmode .flowcrm-filter-card .form-select,
body.darkmode .flowcrm-filter-card .flowcrm-advanced-filters,
body.darkmode .flowcrm-filter-card .flowcrm-advanced-filters .form-control,
body.darkmode .flowcrm-filter-card .flowcrm-advanced-filters .form-select {
    border-color: #334155 !important;
    background: #111827 !important;
    color: #e5e7eb !important;
    box-shadow: none !important;
}

body.darkmode .flowcrm-filter-card .modern-search .input-group-text,
body.darkmode .flowcrm-filter-card .modern-search .form-control {
    background: transparent !important;
    color: #e5e7eb !important;
}

body.darkmode .flowcrm-filter-card .modern-search .form-control::placeholder,
body.darkmode .flowcrm-filter-card .flowcrm-advanced-filters .form-control::placeholder {
    color: #8ca0bc !important;
    opacity: 1 !important;
}

body.darkmode .flowcrm-filter-card .flowcrm-advanced-group-title {
    color: #93c5fd !important;
}

body.darkmode .flowcrm-filter-card .flowcrm-advanced-group-title:not(:first-child),
body.darkmode .flowcrm-filter-card .flowcrm-advanced-actions {
    border-color: #334155 !important;
}

body.darkmode .flowcrm-filter-card .flowcrm-filter-toggle {
    border-color: #334155 !important;
    background: #111827 !important;
    color: #bfdbfe !important;
}

body.darkmode .flowcrm-filter-card .flowcrm-filter-toggle:hover,
body.darkmode .flowcrm-filter-card .flowcrm-filter-toggle:focus,
body.darkmode .flowcrm-filter-card .flowcrm-filter-toggle:active,
body.darkmode .flowcrm-filter-card .flowcrm-filter-toggle.is-open {
    border-color: #3b82f6 !important;
    background: #2563eb !important;
    color: #ffffff !important;
}

body.darkmode .flowcrm-filter-card .flowcrm-reset-filters {
    border-color: #334155 !important;
    background: #111827 !important;
    color: #bfdbfe !important;
}

body.darkmode .flowcrm-filter-card .flowcrm-reset-filters:hover,
body.darkmode .flowcrm-filter-card .flowcrm-reset-filters:focus,
body.darkmode .flowcrm-filter-card .flowcrm-reset-filters:focus-visible,
body.darkmode .flowcrm-filter-card .flowcrm-reset-filters:active,
body.darkmode .flowcrm-filter-card .flowcrm-reset-filters.active {
    border-color: #3b82f6 !important;
    background: #172554 !important;
    color: #dbeafe !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .16) !important;
}

body.darkmode .flowcrm-view-switch .btn-primary {
    border-color: #3b82f6 !important;
    background: #2563eb !important;
    color: #ffffff !important;
}

body.darkmode .flowcrm-view-switch .btn-outline-primary {
    border-color: transparent !important;
    background: transparent !important;
    color: #bfdbfe !important;
}

/* 1.3.2 correction pass: flowDocs header action order and spacing. */
#dokumentePage .workpaper-header-slot .flowdocs-header-actions {
    display: flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    gap: 10px !important;
    margin-left: auto !important;
    margin-right: calc(41.666667% + 8px) !important;
}

#dokumentePage .workpaper-header-slot .flowdocs-header-actions .card-action-btn,
#dokumentePage .workpaper-header-slot #flowDocsResolutionBtn,
#dokumentePage .workpaper-header-slot #flowDocsLoadDatasetBtn,
#dokumentePage .workpaper-header-slot #newDatasetBtn,
#dokumentePage .workpaper-header-slot .flowdocs-save-status {
    flex: 0 0 146px !important;
    width: 146px !important;
    min-width: 146px !important;
    max-width: 146px !important;
    height: 34px !important;
}

#dokumentePage .workpaper-header-slot .flowdocs-save-status {
    margin-left: 0 !important;
}

@media (max-width: 900px) {
    #dokumentePage .workpaper-header-slot .flowdocs-header-actions {
        width: 100% !important;
        flex-wrap: wrap !important;
        margin-right: 0 !important;
    }

    #dokumentePage .workpaper-header-slot .flowdocs-header-actions .card-action-btn,
    #dokumentePage .workpaper-header-slot .flowdocs-header-actions .flowdocs-save-status {
        flex: 1 1 180px !important;
        max-width: none !important;
    }
}



/* 1.3.2 correction pass: flowDocs status grows to the right of the form column edge. */
@media (min-width: 901px) {
    #dokumentePage .workpaper-header-slot .workpaper-header-card.is-active {
        position: relative !important;
    }

    #dokumentePage .workpaper-header-slot .flowdocs-header-actions {
        position: absolute !important;
        top: 50% !important;
        left: calc(58.333333% - 458px) !important;
        right: auto !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        transform: translateY(-50%) !important;
    }

    #dokumentePage .workpaper-header-slot #flowDocsResolutionBtn,
    #dokumentePage .workpaper-header-slot #flowDocsLoadDatasetBtn,
    #dokumentePage .workpaper-header-slot #newDatasetBtn {
        flex: 0 0 146px !important;
        width: 146px !important;
        min-width: 146px !important;
        max-width: 146px !important;
    }

    #dokumentePage .workpaper-header-slot .flowdocs-save-status {
        flex: 0 1 auto !important;
        width: max-content !important;
        min-width: 146px !important;
        max-width: min(420px, 32vw) !important;
        justify-content: flex-start !important;
        overflow: hidden !important;
    }

#dokumentePage .workpaper-header-slot .flowdocs-save-status span {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}
}

/* 1.3.2 correction pass: compact flowDocs header actions on small desktop screens. */
@media (min-width: 901px) and (max-width: 1199px) {
    #dokumentePage .workpaper-header-slot .workpaper-header-card.is-active {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        align-items: center !important;
        column-gap: 14px !important;
    }

    #dokumentePage .workpaper-header-slot .flowdocs-header-actions {
        position: static !important;
        justify-self: end !important;
        transform: none !important;
        gap: 8px !important;
        margin: 0 !important;
    }

    #dokumentePage .workpaper-header-slot #flowDocsResolutionBtn,
    #dokumentePage .workpaper-header-slot #flowDocsLoadDatasetBtn,
    #dokumentePage .workpaper-header-slot #newDatasetBtn {
        flex: 0 0 104px !important;
        width: 104px !important;
        min-width: 104px !important;
        max-width: 104px !important;
        padding-inline: 10px !important;
    }

    #dokumentePage .workpaper-header-slot #flowDocsLoadDatasetBtn,
    #dokumentePage .workpaper-header-slot #newDatasetBtn {
        flex-basis: 92px !important;
        width: 92px !important;
        min-width: 92px !important;
        max-width: 92px !important;
    }

    #dokumentePage .workpaper-header-slot .flowdocs-save-status {
        flex: 0 0 84px !important;
        width: 84px !important;
        min-width: 84px !important;
        max-width: 84px !important;
        justify-content: center !important;
    }

    #dokumentePage .workpaper-header-slot .flowdocs-header-actions .card-action-btn i {
        margin-right: 6px !important;
    }

    #dokumentePage .workpaper-header-slot #flowDocsLoadDatasetBtn span,
    #dokumentePage .workpaper-header-slot #newDatasetBtn span {
        max-width: 58px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }
}

/* 1.3.2 correction pass: flowDocs header buttons keep hover color without motion. */
#dokumentePage .workpaper-header-slot .flowdocs-header-actions .card-action-btn {
    transition: background-color .14s ease, border-color .14s ease, color .14s ease !important;
    transform: none !important;
    box-shadow: none !important;
}

#dokumentePage .workpaper-header-slot .flowdocs-header-actions .card-action-btn:hover,
#dokumentePage .workpaper-header-slot .flowdocs-header-actions .card-action-btn:focus-visible {
    transform: none !important;
    box-shadow: none !important;
}

#dokumentePage .workpaper-header-slot .flowdocs-save-status {
    transform: none !important;
}

/* 1.3.2 correction pass: flowDocs resolution DV mode. */
#flowDocsContent.flowdocs-resolution-mode .flowdocs-resolution-hidden,
#flowDocsContent.flowdocs-resolution-mode #saveDatensatzBtn {
    display: none !important;
}

#dokumentePage .workpaper-header-slot #flowDocsResolutionBtn.btn-primary {
    color: #ffffff !important;
}
#flowDocsContent.flowdocs-resolution-mode #generateAllDocumentsBtn,
#flowDocsContent.flowdocs-resolution-mode #generateAllDocumentsBtn.disabled,
#flowDocsContent.flowdocs-resolution-mode #generateAllDocumentsBtn:disabled {
    pointer-events: none !important;
    opacity: .55 !important;
    color: #94a3b8 !important;
    border-color: #cbd5e1 !important;
    background: #f1f5f9 !important;
    box-shadow: none !important;
    transform: none !important;
}

#flowDocsContent.flowdocs-resolution-mode #generateAllDocumentsBtn i,
#flowDocsContent.flowdocs-resolution-mode #generateAllDocumentsBtn span {
    color: #94a3b8 !important;
}
#flowDocsContent .flowdocs-resolution-job-summary {
    display: none;
}

#flowDocsContent.flowdocs-resolution-mode .flowdocs-company-manual-fields {
    display: none !important;
}

#flowDocsContent.flowdocs-resolution-mode .flowdocs-resolution-job-summary {
    display: block;
}

#flowDocsContent .flowdocs-resolution-job-summary .form-control[readonly] {
    background: #f8fafc !important;
    color: #334155 !important;
    cursor: default;
}
#flowDocsContent .flowdocs-resolution-consultant-field {
    display: none;
}

#flowDocsContent.flowdocs-resolution-mode .flowdocs-resolution-consultant-field {
    display: block;
}

#flowDocsContent.flowdocs-resolution-mode #generateAllDocumentsBtn {
    display: none !important;
}
#flowDocsContent.flowdocs-resolution-mode #aufloesungFristField:disabled {
    background: #f1f5f9 !important;
    color: #94a3b8 !important;
    border-color: #d7e1ee !important;
    cursor: not-allowed;
}

/* 1.4 ownership and interaction polish. */
#arbeitsmappePage .workbook-actions .workbook-upload-btn:hover,
#arbeitsmappePage .workbook-actions .workbook-upload-btn:focus,
#arbeitsmappePage .workbook-actions .workbook-upload-btn:focus-visible,
#arbeitsmappePage .workbook-actions .workbook-upload-btn:active {
    border-color: #1d4ed8 !important;
    background: linear-gradient(180deg, #2f6df1 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 9px 20px rgba(37, 99, 235, .2) !important;
}

#arbeitsmappePage .workbook-actions .workbook-upload-btn:hover i,
#arbeitsmappePage .workbook-actions .workbook-upload-btn:focus i,
#arbeitsmappePage .workbook-actions .workbook-upload-btn:focus-visible i,
#arbeitsmappePage .workbook-actions .workbook-upload-btn:active i {
    color: #ffffff !important;
}

.tooltip {
    --bs-tooltip-bg: #102033;
    --bs-tooltip-color: #ffffff;
    --bs-tooltip-opacity: 1;
    --bs-tooltip-max-width: 260px;
    --bs-tooltip-padding-x: 10px;
    --bs-tooltip-padding-y: 7px;
    --bs-tooltip-font-size: 12px;
    --bs-tooltip-border-radius: 8px;
    filter: drop-shadow(0 12px 24px rgba(15, 23, 42, .18));
}

.tooltip .tooltip-inner {
    border: 1px solid rgba(255, 255, 255, .12) !important;
    background: var(--bs-tooltip-bg) !important;
    color: var(--bs-tooltip-color) !important;
    font-weight: 650;
    letter-spacing: 0;
    line-height: 1.25;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

body.darkmode .tooltip {
    --bs-tooltip-bg: #e8f1ff;
    --bs-tooltip-color: #102033;
}

body.darkmode .tooltip .tooltip-inner {
    border-color: rgba(15, 23, 42, .12) !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .3);
}

/* 1.4 communication should behave like the workpaper module switcher. */
#kommunikationPage .workpaper-page-head {
    display: grid !important;
    grid-template-columns: 1fr !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 0 0 12px !important;
    margin: 0 0 14px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

#kommunikationPage .workpaper-page-head .topbar {
    margin: 0 !important;
}

#kommunikationPage .workpaper-page-head .topbar-title h2 {
    margin: 0 !important;
    color: #111c2e !important;
    font-size: 24px !important;
    font-weight: 820 !important;
    line-height: 1.12 !important;
    letter-spacing: 0 !important;
}

#kommunikationPage .workpaper-page-head .topbar-subtitle {
    margin-top: 3px !important;
    font-size: 13px !important;
    line-height: 1.28 !important;
}

#kommunikationPage .workpaper-page-head .workpaper-tabs {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 42px !important;
    margin: 0 0 14px !important;
    padding: 4px !important;
    border: 1px solid #d6e1ee !important;
    border-radius: 8px !important;
    background: #eef3f8 !important;
    box-shadow: none !important;
}

#kommunikationPage .workpaper-page-head .workpaper-tabs .btn {
    width: 100% !important;
    min-width: 0 !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 780 !important;
    line-height: 1.15 !important;
    box-shadow: none !important;
    transform: none !important;
}

#kommunikationPage .workpaper-page-head .workpaper-tabs .btn-primary,
#kommunikationPage .workpaper-page-head .workpaper-tabs .btn-primary:hover,
#kommunikationPage .workpaper-page-head .workpaper-tabs .btn-primary:focus-visible {
    border-color: #2563eb !important;
    background: #2563eb !important;
    color: #ffffff !important;
}

#kommunikationPage .workpaper-page-head .workpaper-tabs .btn-outline-primary {
    border-color: transparent !important;
    background: transparent !important;
    color: #2563eb !important;
}

#kommunikationPage .workpaper-page-head .workpaper-tabs .btn-outline-primary:hover,
#kommunikationPage .workpaper-page-head .workpaper-tabs .btn-outline-primary:focus-visible {
    border-color: #dbeafe !important;
    background: #f8fbff !important;
    color: #1d4ed8 !important;
}

#kommunikationPage .workpaper-header-slot {
    display: block !important;
    min-width: 0 !important;
    margin-top: 2px !important;
}

#kommunikationPage .workpaper-header-slot .workpaper-header-card {
    display: none !important;
    min-height: 66px !important;
    margin: 0 !important;
    padding: 13px !important;
    border: 1px solid #dbe6f2 !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, .94) !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .045) !important;
}

#kommunikationPage .workpaper-header-slot .workpaper-header-card.is-active {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px !important;
}

#kommunikationPage .workpaper-header-slot .workpaper-title {
    min-width: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 11px !important;
}

#kommunikationPage .workpaper-header-slot .workpaper-title-icon {
    width: 42px !important;
    height: 42px !important;
    flex: 0 0 42px !important;
    border-radius: 10px !important;
}

#kommunikationPage .workpaper-header-slot .workpaper-title > div:last-child {
    display: block !important;
    min-width: 0 !important;
}

#kommunikationPage .workpaper-header-slot .workpaper-title h2 {
    margin: 0 !important;
    color: #111c2e !important;
    font-size: 21px !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
}

#kommunikationPage .workpaper-header-slot .topbar-subtitle {
    margin-top: 3px !important;
    overflow: hidden !important;
    color: #64748b !important;
    font-size: 13px !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

#kommunikationPage .communication-header-actions,
#kommunikationPage .flowmail-header-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    margin-left: auto !important;
    flex-wrap: wrap !important;
}

#kommunikationPage .communication-header-actions .card-action-btn,
#kommunikationPage .flowmail-header-actions .card-action-btn {
    min-width: 146px !important;
}

#kommunikationPage .communication-pane.is-active {
    margin-top: 0 !important;
}

#kommunikationPage .flowmessage-head {
    display: none !important;
}

body.darkmode #kommunikationPage .workpaper-page-head .topbar-title h2,
body.darkmode #kommunikationPage .workpaper-header-slot .workpaper-title h2 {
    color: #f8fafc !important;
}

body.darkmode #kommunikationPage .workpaper-page-head .workpaper-tabs {
    border-color: #334155 !important;
    background: #0f172a !important;
}

body.darkmode #kommunikationPage .workpaper-header-slot .workpaper-header-card {
    border-color: #334155 !important;
    background: #111827 !important;
}

@media (max-width: 900px) {
    #kommunikationPage .workpaper-header-slot .workpaper-header-card.is-active {
        align-items: stretch !important;
        flex-direction: column !important;
    }

    #kommunikationPage .communication-header-actions,
    #kommunikationPage .flowmail-header-actions,
    #kommunikationPage .communication-header-actions .card-action-btn,
    #kommunikationPage .flowmail-header-actions .card-action-btn {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
    }
}

/* 1.4 correction pass: keep compact search input text vertically centered. */
.fd-sticky-tab-tools .modern-search input[type="search"].form-control,
.flowcrm-filter-card .modern-search input[type="search"].form-control,
.flowkv-filter-card .modern-search input[type="search"].form-control,
.app-header-search .modern-search input[type="search"].form-control {
    display: block !important;
    height: 38px !important;
    min-height: 38px !important;
    line-height: 38px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    box-sizing: border-box !important;
}

.fd-sticky-tab-tools .modern-search input[type="search"].form-control::placeholder,
.flowcrm-filter-card .modern-search input[type="search"].form-control::placeholder,
.flowkv-filter-card .modern-search input[type="search"].form-control::placeholder,
.app-header-search .modern-search input[type="search"].form-control::placeholder {
    line-height: 38px !important;
}

/* 1.4 shell correction: remove the visual step between logo band and app header. */
.logo {
    min-height: 68px !important;
    height: 68px !important;
    margin-top: -19px !important;
    margin-right: -19px !important;
    margin-bottom: 18px !important;
    margin-left: -19px !important;
    border-bottom: 1px solid #dbe6f2 !important;
    box-shadow: none !important;
}

.app-header {
    height: 68px !important;
    min-height: 68px !important;
    border-bottom: 1px solid #dbe6f2 !important;
    box-shadow: none !important;
}

.app-header::before {
    top: 0 !important;
    bottom: -1px !important;
    background: #ffffff !important;
    border-bottom: 1px solid #dbe6f2 !important;
    box-shadow: none !important;
}

.app-header::after {
    content: "";
    position: absolute;
    left: -1px;
    top: 0;
    bottom: -1px;
    width: 2px;
    background: #ffffff;
    border-bottom: 1px solid #dbe6f2;
    pointer-events: none;
    z-index: 0;
}

body.darkmode .logo,
body.darkmode .app-header,
body.darkmode .app-header::before,
body.darkmode .app-header::after {
    background: #ffffff !important;
    border-bottom-color: #dbe6f2 !important;
    box-shadow: none !important;
}

/* Keep interactive controls visually stable on hover/focus. */
button:hover,
button:focus,
button:focus-visible,
.btn:hover,
.btn:focus,
.btn:focus-visible,
.card-action-btn:hover,
.card-action-btn:focus,
.card-action-btn:focus-visible,
[role="button"]:hover,
[role="button"]:focus,
[role="button"]:focus-visible,
.header-icon-button:hover,
.header-icon-button:focus,
.header-icon-button:focus-visible,
.sidebar-toggle:hover,
.sidebar-toggle:focus,
.sidebar-toggle:focus-visible,
.menu-item:hover,
.menu-item:focus,
.menu-item:focus-visible,
.flowcrm-case-row:hover,
.flowcrm-case-row:focus,
.flowcrm-case-row:focus-visible,
.flowcrm-mini-button:hover,
.flowcrm-mini-button:focus,
.flowcrm-mini-button:focus-visible,
.flowcrm-timeline-action:hover,
.flowcrm-timeline-action:focus,
.flowcrm-timeline-action:focus-visible,
.flowcrm-duration-stepper-btn:hover,
.flowcrm-duration-stepper-btn:focus,
.flowcrm-duration-stepper-btn:focus-visible,
.calendar-control-btn:hover,
.calendar-control-btn:focus,
.calendar-control-btn:focus-visible,
.calendar-view-btn:hover,
.calendar-view-btn:focus,
.calendar-view-btn:focus-visible,
.calendar-mode-btn:hover,
.calendar-mode-btn:focus,
.calendar-mode-btn:focus-visible,
.flowkv-source-option:hover,
.flowkv-source-option:focus,
.flowkv-source-option:focus-visible,
.workbook-document-open:hover,
.workbook-document-open:focus,
.workbook-document-open:focus-visible,
.flowmessage-thread-delete:hover,
.flowmessage-thread-delete:focus,
.flowmessage-thread-delete:focus-visible,
.flowmessage-draft-trash:hover,
.flowmessage-draft-trash:focus,
.flowmessage-draft-trash:focus-visible,
.settings-icon-btn:hover,
.settings-icon-btn:focus,
.settings-icon-btn:focus-visible {
    transform: none !important;
}

@media (max-width: 1180px) {
    .workbook-toolbar-actions {
        grid-template-columns: 1fr;
    }

    .workbook-trash-toolbar-btn {
        max-width: none !important;
        width: 100% !important;
    }
}

/* 1.4 responsive safety layer: toolbars wrap before they collide. */
#arbeitsmappePage .workbook-grid {
    grid-template-columns: repeat(auto-fill, minmax(345px, 1fr)) !important;
    justify-content: stretch !important;
    width: 100% !important;
}

@media (min-width: 1500px) {
    #arbeitsmappePage .workbook-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 1180px) {
    #arbeitsmappePage .workbook-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        justify-content: stretch !important;
    }
}

@media (max-width: 760px) {
    #arbeitsmappePage .workbook-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (min-width: 901px) and (max-width: 1100px) {
    #dokumentePage .workpaper-header-slot .workpaper-header-card.is-active {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }

    #dokumentePage .workpaper-header-slot .flowdocs-header-actions {
        position: static !important;
        width: 100% !important;
        transform: none !important;
        justify-content: flex-start !important;
        margin: 0 !important;
    }

    #dokumentePage .workpaper-header-slot #flowDocsResolutionBtn,
    #dokumentePage .workpaper-header-slot #flowDocsLoadDatasetBtn,
    #dokumentePage .workpaper-header-slot #newDatasetBtn,
    #dokumentePage .workpaper-header-slot .flowdocs-save-status {
        flex: 1 1 150px !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
    }
}

@media (max-width: 1280px) {
    .flowcrm-module .flowcrm-header-card {
        flex-wrap: wrap !important;
        gap: 10px !important;
    }

    .flowcrm-module .flowcrm-header-main {
        flex: 1 1 320px !important;
        min-width: 0 !important;
    }

    .flowcrm-module .flowcrm-header-actions {
        flex: 1 1 100% !important;
        width: 100% !important;
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
    }

    .flowcrm-filter-grid {
        grid-template-columns: minmax(0, 1fr) minmax(150px, 210px) minmax(150px, 210px) !important;
    }

    .flowcrm-filter-card .modern-search {
        min-width: 0 !important;
    }

    #teilnehmerContent .fd-sticky-tab-tools .row,
    #betriebeContent .fd-sticky-tab-tools .row {
        grid-template-columns: minmax(0, 1fr) minmax(155px, 210px) minmax(155px, 210px) !important;
    }

    #teilnehmerContent .fd-sticky-tab-tools .col-md-3.d-flex,
    #betriebeContent .fd-sticky-tab-tools .col-md-3.d-flex,
    #teilnehmerContent .fd-sticky-tab-tools .col-md-2.d-flex,
    #betriebeContent .fd-sticky-tab-tools .col-md-2.d-flex {
        justify-content: flex-start !important;
    }
}

@media (max-width: 780px) {
    .page-content > .topbar,
    .page-content > .fd-sticky-page-head,
    .page-content > .fd-sticky-page-head > .topbar,
    #dokumentePage .workpaper-page-head,
    #dokumentePage .workpaper-page-head .topbar,
    #arbeitsmappePage .topbar,
    #formularePage .topbar,
    #kommunikationPage .topbar,
    .workpaper-tabs {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .workpaper-tabs {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .workpaper-tabs > .btn {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .topbar-title,
    .topbar-title > h2,
    .topbar-subtitle {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-wrap: anywhere !important;
        white-space: normal !important;
        box-sizing: border-box !important;
    }

    #dokumentePage .workpaper-header-slot,
    #dokumentePage .workpaper-header-card,
    #dokumentePage .workpaper-title,
    #dokumentePage .workpaper-title > div:last-child {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        flex-basis: auto !important;
        box-sizing: border-box !important;
    }

    #dokumentePage .workpaper-title {
        flex-wrap: wrap !important;
    }

    #dokumentePage .preview-box {
        min-width: 0 !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    #dokumentePage .preview-box .d-flex.gap-2 {
        flex-wrap: wrap !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    #dokumentePage #previewDocumentSelect {
        flex: 1 1 100% !important;
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .template-library-grid,
    .standard-user-grid,
    #collectiveLibraryGrid,
    #templateLibraryGrid {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .standard-user-grid.is-list .standard-user-card {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .template-library-grid > .card-custom,
    #collectiveLibraryGrid > .card-custom,
    #templateLibraryGrid > .card-custom {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .template-card,
    .standard-user-card,
    .flowkv-card {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .standard-user-main,
    .standard-user-actions {
        min-width: 0 !important;
        max-width: 100% !important;
        flex-wrap: wrap !important;
    }

    .standard-user-actions .card-action-btn {
        flex: 1 1 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .flowcrm-module .flowcrm-header-card {
        align-items: stretch !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
    }

    .flowcrm-module .flowcrm-header-main,
    .flowcrm-module .flowcrm-header-actions {
        flex: 1 1 auto !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .flowcrm-filter-grid,
    #teilnehmerContent .fd-sticky-tab-tools .row,
    #betriebeContent .fd-sticky-tab-tools .row {
        grid-template-columns: 1fr !important;
    }

    .flowcrm-module .flowcrm-header-actions .card-action-btn,
    #teilnehmerContent .fd-sticky-tab-tools .card-action-btn,
    #betriebeContent .fd-sticky-tab-tools .card-action-btn {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        justify-content: center !important;
    }
}

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

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

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

/* 1.4 correction: flowDocs header actions stay in normal layout flow. */
#dokumentePage .workpaper-header-slot .workpaper-header-card.is-active {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 10px 12px !important;
    position: relative !important;
}

#dokumentePage .workpaper-header-slot .workpaper-title {
    flex: 1 1 260px !important;
    min-width: 0 !important;
}

#dokumentePage .workpaper-header-slot .flowdocs-header-actions {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    flex: 0 1 auto !important;
    max-width: 100% !important;
    width: auto !important;
    margin: 0 0 0 auto !important;
    flex-wrap: wrap !important;
    justify-content: flex-end !important;
}

#dokumentePage .workpaper-header-slot #flowDocsResolutionBtn,
#dokumentePage .workpaper-header-slot #flowDocsLoadDatasetBtn,
#dokumentePage .workpaper-header-slot #newDatasetBtn,
#dokumentePage .workpaper-header-slot .flowdocs-save-status {
    flex: 0 1 146px !important;
    width: 146px !important;
    min-width: 0 !important;
    max-width: 146px !important;
}

@media (max-width: 1220px) {
    #dokumentePage .workpaper-header-slot .flowdocs-header-actions {
        flex: 1 1 100% !important;
        width: 100% !important;
        margin-left: 0 !important;
        justify-content: flex-start !important;
    }

    #dokumentePage .workpaper-header-slot #flowDocsResolutionBtn,
    #dokumentePage .workpaper-header-slot #flowDocsLoadDatasetBtn,
    #dokumentePage .workpaper-header-slot #newDatasetBtn,
    #dokumentePage .workpaper-header-slot .flowdocs-save-status {
        flex: 1 1 150px !important;
        width: auto !important;
        max-width: none !important;
    }
}

/* 1.5 correction: settings system uses balanced groups, not nested columns. */
#settingsSystemSection,
#settingsSystemSection .settings-system-layout,
#settingsSystemSection .settings-system-column,
#settingsSystemSection .settings-system-group,
#settingsSystemSection .settings-system-card-grid,
#settingsSystemSection .settings-card {
    min-width: 0 !important;
    max-width: 100% !important;
}

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

#settingsSystemSection .settings-system-group {
    display: grid !important;
    align-content: start !important;
    grid-template-columns: minmax(0, 1fr) !important;
}

#settingsSystemSection .settings-system-column {
    display: grid !important;
    align-content: start !important;
    gap: 16px !important;
}

#settingsSystemSection .settings-system-group {
    gap: 12px !important;
}

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

#settingsSystemSection .settings-system-card-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
    gap: 12px !important;
    align-items: start !important;
    width: 100% !important;
}

#settingsSystemSection .settings-system-card-grid > .settings-card,
#settingsSystemSection .settings-system-column > .settings-card,
#settingsSystemSection .settings-system-group > .settings-card {
    grid-column: auto !important;
    grid-row: auto !important;
    width: 100% !important;
}

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

@media (max-width: 1200px) {
    #settingsSystemSection .settings-system-layout {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    #settingsSystemSection .settings-system-card-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

/* 1.4 correction: flowCRM detail grids react to their actual container width. */
.flowcrm-detail-card,
.flowcrm-detail,
.flowcrm-case-detail-grid,
.flowcrm-case-side-stack,
.flowcrm-case-main-stack,
.flowcrm-case-fields,
.flowcrm-case-history,
.flowcrm-dossier,
.flowcrm-quick-action,
.flowcrm-quick-grid,
.flowcrm-field-grid,
.flowcrm-case-state-block {
    min-width: 0 !important;
    max-width: 100% !important;
}

.flowcrm-case-detail-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)) !important;
    width: 100% !important;
}

.flowcrm-quick-action {
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
}

.flowcrm-quick-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)) !important;
    width: 100% !important;
}

.flowcrm-quick-grid .form-control,
.flowcrm-quick-grid .form-select,
.flowcrm-duration-stepper {
    min-width: 0 !important;
    width: 100% !important;
}

.flowcrm-case-state-block,
.flowcrm-field-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)) !important;
}

.flowcrm-dossier,
.flowcrm-dossier * {
    min-width: 0;
}

/* 1.4.1 correction pass: workbook card buttons keep their visual state after click. */
#arbeitsmappePage .workbook-actions .btn-outline-primary,
#arbeitsmappePage .workbook-actions .btn-outline-primary:visited {
    border-color: #2563eb !important;
    background: #ffffff !important;
    color: #2563eb !important;
}

#arbeitsmappePage .workbook-actions .btn-outline-secondary,
#arbeitsmappePage .workbook-actions .btn-outline-secondary:visited {
    border-color: #cbd5e1 !important;
    background: #ffffff !important;
    color: #475569 !important;
}

#arbeitsmappePage .workbook-actions .btn-primary,
#arbeitsmappePage .workbook-actions .btn-primary:visited {
    border-color: #2563eb !important;
    background: linear-gradient(180deg, #2f6df1 0%, #2563eb 100%) !important;
    color: #ffffff !important;
}

#arbeitsmappePage .workbook-actions .btn-outline-primary:hover,
#arbeitsmappePage .workbook-actions .btn-outline-primary:focus,
#arbeitsmappePage .workbook-actions .btn-outline-primary:focus-visible,
#arbeitsmappePage .workbook-actions .btn-outline-primary:active,
#arbeitsmappePage .workbook-actions .btn-outline-primary.active {
    border-color: #1d4ed8 !important;
    background: #eff6ff !important;
    color: #1d4ed8 !important;
}

#arbeitsmappePage .workbook-actions .btn-outline-secondary:hover,
#arbeitsmappePage .workbook-actions .btn-outline-secondary:focus,
#arbeitsmappePage .workbook-actions .btn-outline-secondary:focus-visible,
#arbeitsmappePage .workbook-actions .btn-outline-secondary:active,
#arbeitsmappePage .workbook-actions .btn-outline-secondary.active {
    border-color: #94a3b8 !important;
    background: #f8fafc !important;
    color: #334155 !important;
}

#arbeitsmappePage .workbook-actions .btn-primary:hover,
#arbeitsmappePage .workbook-actions .btn-primary:focus,
#arbeitsmappePage .workbook-actions .btn-primary:focus-visible,
#arbeitsmappePage .workbook-actions .btn-primary:active,
#arbeitsmappePage .workbook-actions .btn-primary.active {
    border-color: #1d4ed8 !important;
    background: linear-gradient(180deg, #2f6df1 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
}

#arbeitsmappePage .workbook-actions .btn i {
    color: currentColor !important;
}

/* 1.4.1 correction pass: flowDocs allowance amount fields read as numeric euro inputs. */
#dokumentePage #flowDocsContent .flowdocs-allowance-card .flowdocs-allowance-amount,
#dokumentePage #flowDocsContent .flowdocs-allowance-card .input-group.flowdocs-allowance-amount.modern-search {
    margin-left: auto !important;
    max-width: 244px !important;
}

#dokumentePage #flowDocsContent .flowdocs-allowance-card .flowdocs-allowance-amount input.form-control,
#dokumentePage #flowDocsContent .flowdocs-allowance-card .flowdocs-allowance-amount input[type="search"].form-control {
    padding-left: 1rem !important;
    padding-right: .55rem !important;
    text-align: right !important;
}

#dokumentePage #flowDocsContent .flowdocs-allowance-card .flowdocs-allowance-amount .input-group-text {
    justify-content: center !important;
    min-width: 2.2rem !important;
    padding-left: .55rem !important;
    padding-right: .8rem !important;
}

.flowdocs-allowance-amount .flowdocs-allowance-input,
.flowdocs-allowance-amount input[name^="zulage"][name$="_betrag"] {
    direction: ltr !important;
    text-align: right !important;
}

/* 1.4.1 correction pass: flowDocs header buttons keep their clicked state. */
#dokumentePage .workpaper-header-slot .flowdocs-header-actions .btn-primary,
#dokumentePage .workpaper-header-slot .flowdocs-header-actions .btn-primary:hover,
#dokumentePage .workpaper-header-slot .flowdocs-header-actions .btn-primary:focus,
#dokumentePage .workpaper-header-slot .flowdocs-header-actions .btn-primary:focus-visible,
#dokumentePage .workpaper-header-slot .flowdocs-header-actions .btn-primary:active,
#dokumentePage .workpaper-header-slot .flowdocs-header-actions .btn-primary.active {
    background: linear-gradient(180deg, #2f6df1 0%, #2563eb 100%) !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
}

#dokumentePage .workpaper-header-slot .flowdocs-header-actions .btn-outline-primary,
#dokumentePage .workpaper-header-slot .flowdocs-header-actions .btn-outline-primary:visited {
    background: #ffffff !important;
    border-color: #2563eb !important;
    color: #2563eb !important;
}

#dokumentePage .workpaper-header-slot .flowdocs-header-actions .btn-outline-primary:hover,
#dokumentePage .workpaper-header-slot .flowdocs-header-actions .btn-outline-primary:focus,
#dokumentePage .workpaper-header-slot .flowdocs-header-actions .btn-outline-primary:focus-visible,
#dokumentePage .workpaper-header-slot .flowdocs-header-actions .btn-outline-primary:active,
#dokumentePage .workpaper-header-slot .flowdocs-header-actions .btn-outline-primary.active {
    background: #eff6ff !important;
    border-color: #1d4ed8 !important;
    color: #1d4ed8 !important;
}

#dokumentePage .workpaper-header-slot .flowdocs-header-actions .btn-outline-secondary,
#dokumentePage .workpaper-header-slot .flowdocs-header-actions .btn-outline-secondary:visited {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #475569 !important;
}

#dokumentePage .workpaper-header-slot .flowdocs-header-actions .btn-outline-secondary:hover,
#dokumentePage .workpaper-header-slot .flowdocs-header-actions .btn-outline-secondary:focus,
#dokumentePage .workpaper-header-slot .flowdocs-header-actions .btn-outline-secondary:focus-visible,
#dokumentePage .workpaper-header-slot .flowdocs-header-actions .btn-outline-secondary:active,
#dokumentePage .workpaper-header-slot .flowdocs-header-actions .btn-outline-secondary.active {
    background: #f8fafc !important;
    border-color: #94a3b8 !important;
    color: #334155 !important;
}

#dokumentePage .workpaper-header-slot .flowdocs-header-actions .btn i {
    color: currentColor !important;
}

/* 1.4.1 correction pass: flowDocs form action buttons keep their clicked state. */
#flowDocsContent #generateAllDocumentsBtn.btn-outline-primary,
#flowDocsContent #generateAllDocumentsBtn.btn-outline-primary:visited {
    background: #ffffff !important;
    border-color: #2563eb !important;
    color: #2563eb !important;
}

#flowDocsContent #generateAllDocumentsBtn.btn-outline-primary:hover,
#flowDocsContent #generateAllDocumentsBtn.btn-outline-primary:focus,
#flowDocsContent #generateAllDocumentsBtn.btn-outline-primary:focus-visible,
#flowDocsContent #generateAllDocumentsBtn.btn-outline-primary:active,
#flowDocsContent #generateAllDocumentsBtn.btn-outline-primary.active {
    background: #eff6ff !important;
    border-color: #1d4ed8 !important;
    color: #1d4ed8 !important;
}

#flowDocsContent #generateAllDocumentsBtn.btn-outline-primary i,
#flowDocsContent #generateAllDocumentsBtn.btn-outline-primary span {
    color: currentColor !important;
}

/* 1.4.1 correction pass: flowDocs header actions return to the original desktop position. */
@media (min-width: 1221px) {
    #dokumentePage .workpaper-header-slot .workpaper-header-card.is-active {
        position: relative !important;
    }

    #dokumentePage .workpaper-header-slot .flowdocs-header-actions {
        position: absolute !important;
        top: 50% !important;
        left: calc(58.333333% - 458px) !important;
        right: auto !important;
        width: auto !important;
        margin: 0 !important;
        transform: translateY(-50%) !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
    }
}

/* 1.5 release polish: compact mobile shell must not create horizontal page overflow. */
@media (max-width: 760px) {
    .logo {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: var(--fd-sidebar-collapsed-width) !important;
    }

    .app-header {
        margin-left: -18px !important;
        margin-right: -14px !important;
        max-width: none !important;
        width: auto !important;
    }
}
