/* flowDeck⁺ global corporate design */
/* Copyright (c) 2026 Bernd Schartner. All rights reserved. */

/* flowDeck CI v2: calm enterprise shell */

:root {
    --fd-font-main: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    --fd-font-condensed: "Arial Narrow", "Aptos Narrow", "Roboto Condensed", "Segoe UI Condensed", var(--fd-font-main);
    --fd-bg: #f3f6f9;
    --fd-surface: #ffffff;
    --fd-surface-soft: #f8fafc;
    --fd-border: #e2e8f0;
    --fd-border-strong: #d7e0eb;
    --fd-text: #162033;
    --fd-muted: #5f6f84;
    --fd-navy: #0b2a5b;
    --fd-navy-soft: #123a78;
    --fd-blue: #2563eb;
    --fd-blue-soft: #e8f1ff;
    --fd-sticky-gap: 8px;
    --fd-shadow: 0 10px 26px rgba(15, 23, 42, .045);
    --fd-shadow-soft: 0 6px 18px rgba(15, 23, 42, .035);
}

html {
    font-size: 95%;
}

body {
    background: var(--fd-bg);
    color: var(--fd-text);
    font-family: var(--fd-font-main);
    font-size: .95rem;
    letter-spacing: 0;
}

.sidebar {
    background: linear-gradient(180deg, #082554 0%, #0b326d 100%);
    padding: 19px;
}

.logo {
    min-height: 68px;
    margin: -19px -19px 18px;
    padding: 0 18px;
    background: #ffffff;
    color: #0a376d;
    border-bottom: 1px solid rgba(15, 23, 42, .08);
    display: flex;
    align-items: center;
    gap: 9px;
}

.logo-text {
    color: #0a376d;
    font-family: var(--fd-font-main);
    font-size: 26px;
    font-weight: 650;
    line-height: 1;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: visible;
}

.logo-subtitle {
    margin-top: 3px;
    color: rgba(10, 55, 109, .58);
    font-size: 10px;
    font-weight: 750;
    line-height: 1;
    letter-spacing: .02em;
}

.logo-text-flow,
.fd-brand-flow {
    display: inline-block;
    transform: scaleX(.86);
    transform-origin: left center;
    font-family: "Arial Narrow", "Aptos Narrow", var(--fd-font-main);
    font-weight: 850;
    margin-right: -.34em;
}

.logo-text-desk,
.fd-brand-name {
    font-weight: 500;
}

.fd-brand-wordmark {
    display: inline-flex;
    align-items: baseline;
    color: inherit;
    font-family: var(--fd-font-main);
    font-size: 1em;
    line-height: 1;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: visible;
}

.fd-brand-plus {
    display: inline-block;
    margin-left: -.02em;
    color: inherit;
    font-size: 1em;
    font-weight: 700;
    line-height: 1;
    vertical-align: baseline;
    transform: none;
    transform-origin: left center;
    overflow: visible;
}

.logo-text .fd-brand-plus {
    margin-left: -.02em;
}

.logo-box {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 8px;
    margin-right: 0;
    background: #0a376d;
    box-shadow: none;
    filter: none;
}

.logo-box img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: contain;
}

.logo-wordmark {
    min-width: 0;
}

.sidebar-footer {
    color: rgba(255, 255, 255, .64);
}

.sidebar-section-title {
    color: rgba(255, 255, 255, .58);
    font-size: 10px;
    letter-spacing: .08em;
}

.menu-item {
    padding: 11px 13px;
    margin-bottom: 6px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 650;
    color: rgba(255, 255, 255, .86);
}

.menu-item:hover {
    background: rgba(255, 255, 255, .085);
    color: #fff;
}

.menu-item.active {
    background: rgba(37, 99, 235, .92);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}

.menu-item i {
    margin-right: 9px;
    font-size: .98em;
}

.main {
    padding: 0 24px 24px;
}

.app-header {
    height: 70px;
    margin: 0 -24px 20px;
    padding: 11px 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    isolation: isolate;
    background: rgba(255, 255, 255, .88);
    border-bottom: 1px solid var(--fd-border);
    gap: 18px;
    box-shadow: 0 1px 0 rgba(15, 23, 42, .02);
    backdrop-filter: blur(12px);
}

.app-header-search .input-group,
.modern-search {
    min-height: 42px;
    border-color: var(--fd-border-strong);
    border-radius: 10px;
    box-shadow: var(--fd-shadow-soft);
}

.app-header-search .form-control,
.modern-search .form-control {
    min-height: 34px;
}

.notification-button {
    width: 40px;
    height: 40px;
    font-size: 20px;
    color: var(--fd-text);
}

.header-user-toggle {
    min-width: 205px;
    gap: 10px;
    padding: 5px 7px;
    border-radius: 10px;
}

.header-user-photo {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
}

.header-user-name {
    font-size: 14px;
}

.header-user-role {
    font-size: 12px;
    color: var(--fd-muted);
}

.header-admin-lock {
    width: 18px;
    color: #64748b;
    font-size: 15px;
    text-align: center;
}

.header-admin-lock.is-unlocked {
    color: #16a34a;
}

.header-admin-lock.is-denied {
    color: #94a3b8;
}

#headerAdminToggleBtn.is-admin-denied {
    opacity: .72;
    cursor: not-allowed;
}

[data-admin-action="true"].is-admin-denied {
    cursor: not-allowed;
}

.user-start-modal .modal-body {
    max-height: min(68vh, 620px);
    overflow: auto;
}

.user-start-modal {
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 14px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
}

.user-start-modal .modal-header {
    align-items: flex-start;
    background:
        linear-gradient(135deg, rgba(239, 246, 255, .96), rgba(255, 255, 255, 1));
    border-bottom: 1px solid rgba(148, 163, 184, .22);
    border-radius: 14px 14px 0 0;
    padding: 18px 20px 16px;
}

.user-start-modal .modal-title {
    font-size: 18px;
    font-weight: 800;
}

.user-start-welcome {
    padding: 4px 0 0;
}

.user-start-welcome-title {
    margin-bottom: 14px;
    color: var(--fd-text);
    font-size: 27px;
    font-weight: 800;
    line-height: 1.15;
}

.user-start-welcome-main {
    min-height: 136px;
    padding: 20px 22px;
    border: 1px solid var(--fd-border);
    border-radius: 10px;
    background:
        linear-gradient(135deg, #fff, #f9fbff);
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
}

.user-start-welcome-photo-wrap {
    width: 88px;
    height: 88px;
    flex-basis: 88px;
    box-shadow: 0 14px 28px rgba(15, 23, 42, .10);
}

.user-start-welcome-kicker {
    margin-bottom: 5px;
    color: var(--fd-muted);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0;
    text-transform: uppercase;
}

.user-start-welcome-name {
    overflow: hidden;
    color: var(--fd-text);
    font-size: 22px;
    font-weight: 800;
    line-height: 1.12;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-start-welcome-role {
    overflow: hidden;
    margin-top: 6px;
    color: var(--fd-muted);
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-start-welcome-actions {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(2, minmax(160px, 1fr));
    gap: 10px;
}

.user-start-welcome-actions .btn {
    min-height: 42px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 750;
}

.user-start-pin-wrap {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #fbfdff;
}

.user-start-pin-wrap .input-group-text {
    width: 44px;
    justify-content: center;
}

.user-start-pin-wrap .form-label {
    margin-bottom: 6px;
    color: var(--fd-muted);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0;
    text-transform: uppercase;
}

.user-start-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
}

.user-start-card {
    position: relative;
    min-width: 0;
    min-height: 112px;
    padding: 13px 42px 13px 13px;
    border: 1px solid var(--fd-border);
    border-radius: 12px;
    background:
        linear-gradient(180deg, #fff, #f8fbff);
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    color: var(--fd-text);
    text-align: left;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.user-start-card:hover,
.user-start-card:focus-visible {
    border-color: var(--fd-blue);
    box-shadow: 0 10px 24px rgba(37, 99, 235, .12);
    transform: none;
    outline: none;
}

.user-start-card.is-selected {
    border-color: rgba(37, 99, 235, .58);
    box-shadow: 0 14px 32px rgba(37, 99, 235, .14);
}

.user-start-card .standard-user-photo-wrap {
    width: 76px;
    height: 76px;
    flex-basis: 76px;
}

.user-start-content {
    min-width: 0;
    display: block;
}

.user-start-name {
    overflow: hidden;
    color: var(--fd-text);
    font-size: 15px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-start-meta {
    overflow: hidden;
    color: var(--fd-muted);
    font-size: 12px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-start-foot {
    overflow: hidden;
    margin-top: 9px;
    color: var(--fd-muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.user-start-initials {
    min-width: 34px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(37, 99, 235, .09);
    color: var(--fd-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 850;
}

.user-start-check {
    position: absolute;
    top: 13px;
    right: 13px;
    width: 26px;
    height: 26px;
    border: 1px solid rgba(37, 99, 235, .18);
    border-radius: 999px;
    background: #fff;
    color: var(--fd-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.user-start-card.is-selected .user-start-check {
    background: var(--fd-blue);
    border-color: var(--fd-blue);
    color: #fff;
}

.user-start-modal {
    overflow: hidden;
    border: 1px solid #cfdced;
    border-radius: 10px;
    background: #f8fbff;
    box-shadow: 0 30px 74px rgba(15, 23, 42, .24);
}

.user-start-modal .modal-header {
    min-height: 76px;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid #d8e4f2;
    border-radius: 10px 10px 0 0;
    background: #ffffff;
}

.user-start-header-mark {
    display: flex;
    align-items: center;
    margin-right: auto;
    min-width: 0;
    gap: 12px;
}

.user-start-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 19px;
}

.user-start-header-state,
.user-start-auth-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 30px;
    padding: 5px 9px;
    border: 1px solid #cfe0f6;
    border-radius: 7px;
    background: #f6faff;
    color: #36557f;
    font-size: 12px;
    font-weight: 760;
    line-height: 1;
    white-space: nowrap;
}

.user-start-modal .btn-close {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    margin: 0;
    border-radius: 8px;
    opacity: .66;
}

.user-start-modal .btn-close:hover,
.user-start-modal .btn-close:focus-visible {
    background-color: #eef5ff;
    opacity: 1;
    box-shadow: none;
}

.user-start-modal .modal-body {
    max-height: min(72vh, 680px);
    padding: 16px;
    overflow: auto;
    background: #f4f8fd;
}

.user-start-body-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr);
    gap: 12px;
    align-items: stretch;
}

#userStartWelcome.d-none + .user-start-auth-panel {
    grid-column: 1 / -1;
}

.user-start-welcome {
    min-width: 0;
    padding: 0;
}

.user-start-welcome-main,
.user-start-auth-panel {
    min-height: 100%;
    border: 1px solid #d5e2f2;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .055);
}

.user-start-welcome-main {
    padding: 17px;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 14px;
}

.user-start-welcome-top {
    min-width: 0;
    padding-bottom: 11px;
    border-bottom: 1px solid #e3ebf6;
}

.user-start-welcome-profile {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    min-width: 0;
}

.user-start-welcome-photo-wrap {
    width: 76px;
    height: 76px;
    flex-basis: 76px;
    border: 1px solid #e0e8f3;
    box-shadow: 0 12px 22px rgba(15, 23, 42, .10);
}

.user-start-welcome-title {
    margin: 0 0 5px;
    color: #172033;
    font-size: 20px;
    font-weight: 820;
    line-height: 1.15;
}

.user-start-welcome-kicker {
    margin-bottom: 6px;
    color: #66758b;
    font-size: 10px;
    font-weight: 780;
    letter-spacing: 0;
    text-transform: uppercase;
}

.user-start-welcome-name {
    font-size: 18px;
    font-weight: 820;
}

.user-start-welcome-role {
    margin-top: 5px;
    font-size: 12px;
}

.user-start-welcome-footline {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
}

.user-start-welcome-footline span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 30px;
    padding: 6px 8px;
    border: 1px solid #d5e4f6;
    border-radius: 7px;
    background: #f8fbff;
    color: #41618d;
    font-size: 11px;
    font-weight: 760;
    line-height: 1.1;
    white-space: nowrap;
}

.user-start-auth-panel {
    display: grid;
    gap: 12px;
    padding: 14px;
}

.user-start-auth-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e3ebf6;
}

.user-start-auth-title {
    color: #172033;
    font-size: 15px;
    font-weight: 820;
    line-height: 1.2;
}

.user-start-auth-subtitle {
    margin-top: 3px;
    color: #65748b;
    font-size: 12px;
    line-height: 1.35;
}

.user-start-pin-wrap {
    margin-top: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.user-start-pin-wrap .input-group {
    min-height: 42px;
}

.user-start-pin-wrap .input-group-text,
#userStartSearchWrap .input-group-text {
    width: 42px;
    border-color: #cfdced;
    background: #f8fbff;
    color: #41618d;
}

.user-start-pin-wrap .form-control,
#userStartSearchWrap .form-control {
    min-height: 42px;
    border-color: #cfdced;
    color: #172033;
    font-size: 14px;
}

.user-start-pin-wrap .form-control:focus,
#userStartSearchWrap .form-control:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .13);
}

.user-start-welcome-actions {
    margin-top: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.user-start-welcome-actions .btn {
    min-height: 42px;
    border-radius: 8px;
    font-size: 13px;
}

.user-start-list {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid #d5e2f2;
    border-radius: 8px;
    background: #ffffff;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.user-start-card {
    min-height: 104px;
    border-radius: 8px;
    background: #ffffff;
}

@media (max-width: 767.98px) {
    .user-start-modal .modal-header {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .user-start-header-state {
        order: 3;
        margin-left: 50px;
    }

    .user-start-body-grid {
        grid-template-columns: 1fr;
    }

    .user-start-welcome-profile {
        grid-template-columns: 64px minmax(0, 1fr);
        gap: 12px;
    }

    .user-start-welcome-photo-wrap {
        width: 64px;
        height: 64px;
        flex-basis: 64px;
    }

    .user-start-welcome-footline {
        grid-template-columns: 1fr;
    }

    .user-start-welcome-actions {
        grid-template-columns: 1fr;
    }

    .user-start-list {
        grid-template-columns: 1fr;
    }
}

.settings-card.is-admin-locked {
    position: relative;
}

.settings-card.is-admin-denied,
.settings-card.is-admin-locked {
    position: relative;
}

.settings-card.is-admin-denied::after,
.settings-card.is-admin-locked::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: rgba(248, 250, 252, .64);
    pointer-events: none;
}

.settings-card.is-admin-denied::after {
    background: rgba(248, 250, 252, .78);
}

.settings-card.is-admin-denied .settings-card-head::after {
    content: "Nur Admin";
    margin-left: auto;
    padding: 4px 8px;
    border: 1px solid #d7e0ea;
    border-radius: 999px;
    background: #f8fafc;
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
}

.settings-card.is-admin-denied .settings-card-head,
.settings-card.is-admin-locked .settings-card-head {
    position: relative;
    z-index: 1;
}

.settings-card.is-admin-denied .settings-card-body,
.settings-card.is-admin-locked .settings-card-body {
    position: relative;
    z-index: 0;
}

.settings-card.is-admin-locked .settings-card-head::before {
    content: "\F47A";
    width: 26px;
    height: 26px;
    margin-right: 8px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #64748b;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    font-family: "bootstrap-icons";
    font-size: 14px;
}

.topbar {
    margin-bottom: 18px;
}

.fd-sticky-page-head {
    position: static;
    top: auto;
    z-index: auto;
    isolation: auto;
    transform: none;
    backface-visibility: visible;
    margin: 0;
    padding: 0 0 12px;
    background: var(--fd-bg);
    box-shadow: 0 1px 0 var(--fd-border), 0 12px 18px rgba(243, 246, 249, .96);
}

.fd-sticky-page-head::before {
    content: none;
    display: none;
}

.fd-sticky-page-head::after {
    content: none;
    display: none;
}

.fd-sticky-page-head .topbar {
    margin-bottom: 14px;
}

.fd-sticky-page-head .workpaper-tabs,
.fd-sticky-page-head .stammdaten-tabs,
.fd-sticky-page-head .settings-tabs {
    margin-bottom: 0 !important;
}

.fd-sticky-tab-tools {
    position: static;
    top: auto;
    z-index: auto;
    isolation: auto;
    transform: none;
    backface-visibility: visible;
    margin-top: 12px;
    background: var(--fd-bg);
    box-shadow: 0 12px 18px rgba(243, 246, 249, .94);
    overflow: visible;
}

.fd-sticky-tab-tools::before {
    content: none;
    display: none;
}

.fd-sticky-page-head + .fd-sticky-tab-tools,
.fd-sticky-page-head + * .fd-sticky-tab-tools {
    margin-top: 12px;
}

.fd-sticky-page-head + .workpaper-pane,
.fd-sticky-page-head + .workbook-pane,
.fd-sticky-page-head + .formulare-pane,
.fd-sticky-page-head + .settings-content {
    margin-top: 12px;
}

#stammdatenPage > #teilnehmerContent,
#stammdatenPage > #betriebeContent,
#stammdatenPage > #flowCrmContent {
    padding-top: 12px;
}

#stammdatenPage > #teilnehmerContent > .fd-sticky-tab-tools:first-child,
#stammdatenPage > #betriebeContent > .fd-sticky-tab-tools:first-child,
#workbookListContent.workbook-pane.is-active > .fd-sticky-tab-tools:first-child,
#vorlagenContent.formulare-pane.is-active > .fd-sticky-tab-tools:first-child {
    margin-top: 0;
}

.page-content {
    scroll-padding-top: calc(
        var(--fd-app-header-height, 70px)
        + var(--fd-sticky-gap, 8px)
        + var(--fd-sticky-page-head-height, 0px)
        + 16px
    );
}

.fd-sticky-tab-tools.card-custom,
.fd-sticky-tab-tools > .card-custom {
    box-shadow: var(--fd-shadow);
}

.fd-sticky-tab-tools > .card-custom + .card-custom {
    margin-top: 10px;
}

.topbar-title h2,
.flowkv-title,
.flowskills-title {
    color: var(--fd-text);
    font-family: var(--fd-font-condensed) !important;
    font-size: 22px !important;
    font-weight: 850 !important;
    line-height: 1.16;
    letter-spacing: 0;
}

.topbar-subtitle,
.card-info,
.flowkv-header-card .card-info,
.flowskills-head .card-info {
    color: var(--fd-muted);
    font-size: 13px;
}

.card-custom,
.preview-box,
.flowkv-card,
.flowkv-detail-card,
.flowskills-query-card,
.flowskills-results-card,
.flowcheck-panel,
.flowcheck-result-card,
.settings-card {
    background: var(--fd-surface);
    border: 1px solid var(--fd-border);
    border-radius: 10px;
    box-shadow: var(--fd-shadow);
    padding: 13px;
}

.card-custom.fd-sticky-tab-tools,
.card-custom.flowkv-header-card,
.card-custom.flowkv-filter-card,
.card-custom.workpaper-header-card,
.card-custom.flowcrm-filter-card {
    background: var(--fd-surface) !important;
    border: 1px solid var(--fd-border) !important;
    box-shadow: var(--fd-shadow) !important;
}

.fd-sticky-tab-tools .input-group,
.fd-sticky-tab-tools .modern-search,
.flowkv-filter-card .modern-search,
.flowcrm-filter-card .modern-search {
    min-height: 38px;
    border-color: var(--fd-border-strong);
    border-radius: 8px;
    box-shadow: none;
}

.fd-sticky-tab-tools .input-group-text,
.fd-sticky-tab-tools .form-control,
.fd-sticky-tab-tools .form-select,
.flowkv-filter-card .input-group-text,
.flowkv-filter-card .form-control,
.flowkv-filter-card .form-select,
.flowcrm-filter-card .input-group-text,
.flowcrm-filter-card .form-control,
.flowcrm-filter-card .form-select {
    min-height: 38px;
}

.card-title,
.settings-card-title,
.flowcheck-title {
    color: var(--fd-text);
    font-size: 16px;
    font-family: var(--fd-font-main);
    font-weight: 700;
    letter-spacing: 0;
}

h1,
h2,
h3,
h4,
h5,
h6,
.modal-title,
.topbar-title h2,
.card-title,
.fd-card-title,
.fd-page-title,
.fd-section-title,
.workpaper-title h2,
.standard-user-title,
.settings-card-title,
.settings-folder-title,
.flowkv-title,
.flowkv-card-title,
.flowkv-section-title,
.flowkv-salary-group-title,
.flowcalc-panel-title,
.flowcheck-title,
.flowcheck-overview-title,
.flowcheck-section-title,
.flowcheck-issue-title,
.flowskills-title,
.flowskills-step-title,
.flowskills-sip-title,
.flowskills-section-title,
.flowskills-group-title,
.calendar-day-title,
.calendar-timeline-event-title,
.global-search-item-title {
    font-family: var(--fd-font-condensed) !important;
    letter-spacing: 0;
}

.card-title,
.fd-card-title,
.settings-card-title,
.settings-folder-title,
.flowkv-card-title,
.flowkv-section-title,
.flowkv-salary-group-title,
.flowcalc-panel-title,
.flowcheck-title,
.flowcheck-overview-title,
.flowcheck-section-title,
.flowcheck-issue-title,
.flowskills-step-title,
.flowskills-sip-title,
.flowskills-section-title,
.flowskills-group-title,
.calendar-day-title,
.calendar-timeline-event-title {
    font-family: var(--fd-font-main) !important;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0;
}

.form-control,
.form-select,
.input-group-text {
    min-height: 41px;
    border-color: var(--fd-border-strong);
    border-radius: 8px;
    color: var(--fd-text);
    font-size: 14px;
}

.form-control::placeholder {
    color: #8a98aa;
}

.form-label,
label {
    color: var(--fd-text);
    font-size: 14px;
}

.btn,
.btn.card-action-btn,
.workbook-actions .btn,
.outlook-actions .btn,
.settings-tabs .btn,
.flowkv-source-option,
.flowkv-detail-open {
    min-height: 34px;
    border-radius: 8px !important;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
}

.btn.card-action-btn:not(.w-100):not(.settings-icon-btn):not(.flowcrm-contact-icon):not(.header-icon-button),
.workbook-actions .btn:not(.w-100),
.preview-actions .btn:not(.w-100) {
    min-width: 148px;
    padding-left: 14px !important;
    padding-right: 14px !important;
    white-space: nowrap;
}

.btn.card-action-btn.btn-sm:not(.w-100):not(.settings-icon-btn):not(.flowcrm-contact-icon):not(.header-icon-button) {
    min-width: 132px;
}

.btn-primary {
    min-height: 41px;
    background: var(--fd-blue);
    border-color: var(--fd-blue);
    box-shadow: 0 8px 18px rgba(37, 99, 235, .16);
}

.btn-outline-primary {
    min-height: 41px;
    border-color: var(--fd-blue);
    color: var(--fd-blue);
    background: #fff;
}

.btn-outline-secondary {
    border-color: var(--fd-border-strong);
    color: #46566b;
    background: #fff;
}

.workpaper-tabs,
.stammdaten-tabs {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px !important;
    width: 100%;
    max-width: none !important;
    margin-bottom: 18px !important;
    padding: 4px;
    border: 1px solid #dfe7f0;
    border-radius: 9px;
    background: #eef3f8;
    box-shadow: none;
}

.workpaper-tabs .btn,
.stammdaten-tabs .btn {
    width: 100% !important;
    min-width: 0;
    min-height: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 12px;
    border-radius: 6px !important;
    box-shadow: none;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.workpaper-tabs .btn i.me-2,
.stammdaten-tabs .btn i.me-2 {
    margin-right: 0 !important;
}

.workpaper-tabs .btn-outline-primary,
.stammdaten-tabs .btn-outline-primary {
    background: transparent;
    border-color: transparent;
}

.workpaper-tabs .btn-primary,
.stammdaten-tabs .btn-primary {
    box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
}

.badge,
.flowkv-pill,
.flowcheck-pill,
.workbook-status,
.standard-user-pill {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
}

.flowkv-header-icon,
.flowskills-icon,
.settings-card-icon,
.dashboard-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    font-size: 18px;
}

.flowkv-layout,
.flowskills-layout,
.settings-grid {
    gap: 14px;
}

.flowkv-search-card,
.flowskills-profile,
.flowcheck-summary,
.settings-folder-row,
.rss-url-row,
.workbook-card,
.teilnehmer-card .card-custom,
.betrieb-card .card-custom {
    border-color: var(--fd-border);
    border-radius: 9px;
}

.table,
table {
    color: var(--fd-text);
    font-size: 13px;
}

.table th,
table th {
    color: #41516a;
    font-size: 12px;
    font-weight: 800;
}

.modal-content {
    border: 1px solid var(--fd-border);
    border-radius: 10px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, .18);
}

.modal-header,
.modal-footer {
    border-color: var(--fd-border);
}

#homePage .card-custom {
    border-color: var(--fd-border);
    box-shadow: var(--fd-shadow);
}

/* flowDeck CI v2: card typography harmonization */

.teilnehmer-card .card-custom,
.betrieb-card .card-custom,
.workbook-card,
.template-card,
.standard-user-card,
.settings-card,
.flowkv-card,
.flowskills-query-card,
.flowskills-results-card,
.flowcheck-panel {
    font-size: 13px;
    line-height: 1.38;
}

.teilnehmer-card .card-custom [style*="font-size: 18px"],
.betrieb-card .card-custom [style*="font-size: 18px"] {
    font-size: 16px !important;
    font-family: var(--fd-font-main) !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    color: var(--fd-text);
}

.teilnehmer-card .card-custom [style*="font-size: 18px"] .fw-bold {
    font-family: var(--fd-font-main);
    font-size: 16px;
    font-weight: 700 !important;
}

.teilnehmer-card .card-custom [style*="font-size: 18px"] .fw-normal {
    font-family: var(--fd-font-main);
    font-size: 16px;
    font-weight: 400 !important;
}

.teilnehmer-card .card-custom [style*="font-size: 13px"],
.betrieb-card .card-custom [style*="font-size: 13px"] {
    font-size: 12px !important;
    line-height: 1.32 !important;
}

.teilnehmer-card .card-custom,
.betrieb-card .card-custom {
    padding: 12px;
    max-height: 150px;
}

.teilnehmer-card .badge.rounded-pill {
    min-height: 18px;
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
    font-family: var(--fd-font-condensed);
    font-stretch: condensed;
    font-size: 11px;
    font-weight: 850;
    line-height: 1;
    letter-spacing: 0;
}

#homePage .workbook-status,
#homePage .badge.rounded-pill {
    min-height: 18px;
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
    border-radius: 999px;
    font-family: var(--fd-font-condensed);
    font-stretch: condensed;
    font-size: 11px;
    font-weight: 850;
    line-height: 1;
    letter-spacing: 0;
}

.betrieb-card-head {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    align-items: start;
}

.betrieb-card-main {
    min-width: 0;
}

.betrieb-card-title-row {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.betrieb-card-title-row > .bi[data-company-icon] {
    flex: 0 0 auto;
}

.betrieb-card-meta-actions {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 6px;
    margin-left: auto;
}

.delete-company-btn {
    width: 20px;
    min-width: 20px;
    height: 20px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    justify-self: end;
    align-self: center;
    margin-top: 0;
    border-radius: 6px;
    line-height: 1;
}

.delete-company-btn .bi {
    font-size: 14px;
    line-height: 1;
}

.betrieb-filter-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 24px;
    margin-top: 10px;
}

.betrieb-filter-count {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #f8fbff;
    color: #475569;
    font-size: 12px;
    font-weight: 750;
    line-height: 1;
    white-space: nowrap;
}

.duplicate-company-preview {
    padding: 10px 11px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #f8fbff;
}

.betrieb-card .card-custom.is-locked-company {
    border-color: #fecaca;
    border-left: 4px solid #ef4444;
    background: linear-gradient(90deg, #fff7f7 0, #fff 42%);
}

.betrieb-card .card-custom.is-bankrupt-company {
    border-color: #ddd6fe;
    border-left: 4px solid #7c3aed;
    background: linear-gradient(90deg, #f6f1ff 0, #fff 42%);
}

.text-purple {
    color: #7c3aed !important;
}

.betrieb-company-title {
    min-width: 0;
    max-width: 100%;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
    white-space: nowrap;
    font-family: var(--fd-font-main);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.16;
}

.betrieb-lock-badge {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 4px;
    min-height: 20px;
    margin-left: 7px;
    padding: 0 7px;
    border: 1px solid #fecaca;
    border-radius: 999px;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 10px;
    font-weight: 750;
    line-height: 1;
    vertical-align: middle;
    white-space: nowrap;
}

.betrieb-lock-badge.is-bankrupt {
    border-color: #ddd6fe;
    background: #ede9fe;
    color: #6d28d9;
}

.betrieb-kpb-pills {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 4px;
    margin-left: 6px;
    vertical-align: middle;
}

.betrieb-card-meta-actions .betrieb-kpb-pills {
    margin-left: 0;
}

.betrieb-kpb-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 18px;
    padding: 0 6px;
    border: 1px solid #111827;
    border-radius: 999px;
    background: transparent;
    color: #111827;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.teilnehmer-grid,
.betriebe-grid {
    grid-template-columns: repeat(auto-fill, minmax(345px, 1fr));
    gap: 13px;
}

.workbook-grid,
.template-library-grid,
.standard-user-grid {
    gap: 13px;
}

.workbook-grid {
    grid-template-columns: repeat(auto-fill, minmax(345px, 360px));
    justify-content: start;
}

.workbook-card {
    min-width: 0;
    width: 100%;
    min-height: 166px;
    border-left-width: 3px;
}

.workbook-card-head {
    display: block;
    grid-template-columns: none;
    gap: 10px;
    align-items: start;
}

.workbook-main-line {
    min-width: 0;
    display: flex;
    gap: 12px;
}

.workbook-card-copy {
    min-width: 0;
    flex: 1 1 auto;
}

.workbook-title-row {
    display: flex;
    gap: 8px;
    align-items: center;
    min-width: 0;
}

.workbook-project-pill {
    flex: 0 0 auto;
    min-width: 38px;
    text-align: center;
}

.workbook-more {
    flex: 0 0 auto;
    margin-left: 2px;
}

.workbook-more .btn {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--fd-muted) !important;
}

.workbook-avatar {
    width: 38px;
    height: 38px;
    font-size: 18px;
}

.workbook-title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 16px;
    font-family: var(--fd-font-main) !important;
    font-weight: 400;
    line-height: 1.16;
}

.workbook-company {
    color: var(--fd-text);
    font-family: var(--fd-font-main);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
}

.workbook-meta,
.workbook-more-menu .dropdown-item,
.template-card,
.standard-user-meta,
.standard-user-title,
.standard-user-extra,
.settings-muted-line {
    font-size: 12px;
}

.workbook-status {
    font-size: 11px;
}

.workbook-actions {
    gap: 8px;
    grid-template-columns: repeat(4, minmax(42px, 1fr));
}

.workbook-actions .btn {
    min-width: 0 !important;
    width: 100%;
    min-height: 36px;
    padding-left: 0 !important;
    padding-right: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.workbook-actions .btn:not(.w-100),
.workbook-actions .btn.card-action-btn.btn-sm:not(.w-100) {
    min-width: 0 !important;
}

.workbook-actions .btn i {
    margin: 0 !important;
    font-size: 15px;
}

.template-card {
    min-width: 290px;
    min-height: 174px;
    gap: 11px;
}

.template-title,
.flowkv-card-title,
.flowskills-job-name,
.standard-user-meta .fw-bold,
.missing-document-person,
.recent-name-link {
    font-family: var(--fd-font-main) !important;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.16;
}

.fd-card-title-name {
    display: inline;
    min-width: 0;
    max-width: 100%;
    color: var(--fd-text);
    font-family: var(--fd-font-main);
    font-size: 16px;
    line-height: 1.16;
    letter-spacing: 0;
}

.workbook-title .fd-card-title-name,
.recent-name-link .fd-card-title-name,
.template-title .fd-card-title-name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.template-title .fd-card-title-name {
    white-space: normal;
}

.fd-card-title-primary {
    font-family: var(--fd-font-main);
    font-weight: 700;
}

.fd-card-title-secondary {
    font-family: var(--fd-font-main);
    font-weight: 400;
}

.template-title {
    display: -webkit-box;
    max-width: 100%;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    text-overflow: ellipsis;
    font-family: var(--fd-font-main) !important;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.16;
}

.template-meta,
.flowkv-card-meta,
.flowskills-job-meta,
.missing-document-name,
.recent-meta,
.card-info,
.first-info {
    font-size: 12px;
    line-height: 1.34;
}

.standard-user-grid {
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
}

.standard-user-photo-wrap {
    width: 76px;
    height: 76px;
    flex-basis: 76px;
}

.settings-card-title {
    font-size: 15px;
}

.settings-card .form-control,
.settings-card .form-select,
.settings-folder-title {
    font-size: 13px;
}

.settings-folder-path {
    font-size: 11px;
}

.workpaper-title h2,
.flowcalc-brand h2 {
    font-size: 20px;
    font-weight: 800;
}

.workpaper-title-icon,
.flowcalc-brand-icon {
    width: 36px;
    height: 36px;
    font-size: 18px;
}

body.darkmode {
    background: #0f172a;
}

body.darkmode .card-custom,
body.darkmode .preview-box,
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 .settings-card {
    background: #172036;
    border-color: #27354b;
    box-shadow: none;
}

body.darkmode .user-start-modal {
    background: #172036;
    border-color: #27354b;
}

body.darkmode .user-start-modal .modal-header {
    background:
        linear-gradient(135deg, rgba(30, 41, 59, .98), rgba(15, 23, 42, 1));
    border-bottom-color: #27354b;
}

body.darkmode .user-start-modal .modal-body {
    background: #111827;
}

body.darkmode .user-start-header-icon,
body.darkmode .user-start-header-state,
body.darkmode .user-start-auth-badge {
    border-color: #334155;
    background: #1e293b;
    color: #bfdbfe;
}

body.darkmode .user-start-auth-panel,
body.darkmode .user-start-list {
    background: #172036;
    border-color: #27354b;
    box-shadow: none;
}

body.darkmode .user-start-auth-head {
    border-bottom-color: #27354b;
}

body.darkmode .user-start-welcome-top {
    border-bottom-color: #27354b;
}

body.darkmode .user-start-welcome-footline span {
    border-color: #334155;
    background: #111827;
    color: #bfdbfe;
}

body.darkmode .user-start-card {
    background:
        linear-gradient(180deg, #1e293b, #172036);
    border-color: #27354b;
}

body.darkmode .user-start-welcome-main {
    background:
        linear-gradient(135deg, #1e293b, #172036);
    border-color: #27354b;
    box-shadow: none;
}

body.darkmode .user-start-card:hover,
body.darkmode .user-start-card:focus-visible,
body.darkmode .user-start-card.is-selected {
    border-color: rgba(96, 165, 250, .7);
    box-shadow: 0 14px 32px rgba(15, 23, 42, .28);
}

body.darkmode .user-start-check {
    background: #111827;
    border-color: #334155;
}

body.darkmode .user-start-initials {
    background: rgba(96, 165, 250, .16);
    color: #93c5fd;
}

body.darkmode .user-start-pin-wrap .input-group-text,
body.darkmode #userStartSearchWrap .input-group-text,
body.darkmode .user-start-pin-wrap .form-control,
body.darkmode #userStartSearchWrap .form-control {
    border-color: #334155;
    background: #111827;
    color: #f8fafc;
}

body.darkmode .topbar-title h2,
body.darkmode .topbar-subtitle,
body.darkmode .card-title,
body.darkmode .card-info,
body.darkmode .form-label,
body.darkmode label,
body.darkmode .settings-card-title,
body.darkmode .settings-card label,
body.darkmode .flowkv-title,
body.darkmode .flowkv-card-title,
body.darkmode .flowskills-title,
body.darkmode .flowskills-section-title,
body.darkmode .flowskills-group-title,
body.darkmode .flowcalc-brand h2,
body.darkmode .flowcalc-panel-title,
body.darkmode .flowcalc-kpi-value,
body.darkmode .flowcalc-rate-value,
body.darkmode .flowcalc-summary-label,
body.darkmode .flowcalc-summary-value,
body.darkmode .flowcalc-stundenteiler-item strong,
body.darkmode .flowcheck-title,
body.darkmode .flowcheck-status-label,
body.darkmode .flowcheck-quality-value,
body.darkmode .flowcheck-issue-title,
body.darkmode .template-title,
body.darkmode .workpaper-title h2,
body.darkmode .missing-document-person,
body.darkmode .recent-name-link,
body.darkmode .user-start-modal .modal-title,
body.darkmode .user-start-name,
body.darkmode .user-start-welcome-title,
body.darkmode .user-start-welcome-name {
    color: #f8fafc !important;
}

body.darkmode .topbar-subtitle,
body.darkmode .card-info,
body.darkmode .first-info,
body.darkmode .template-meta,
body.darkmode .flowkv-card-meta,
body.darkmode .flowkv-card-summary,
body.darkmode .flowskills-job-meta,
body.darkmode .flowskills-catalog-area,
body.darkmode .flowskills-empty,
body.darkmode .flowcalc-muted,
body.darkmode .flowcalc-stundenteiler-note,
body.darkmode .flowcalc-summary-row,
body.darkmode .flowcheck-status-value,
body.darkmode .flowcheck-status-detail,
body.darkmode .flowcheck-quality-label,
body.darkmode .flowcheck-issue-detail,
body.darkmode .flowcheck-section-title,
body.darkmode .settings-card-subtitle,
body.darkmode .settings-muted-line,
body.darkmode .settings-folder-path,
body.darkmode .missing-document-name,
body.darkmode .recent-meta {
    color: #cbd5e1 !important;
}

body.darkmode .form-control,
body.darkmode .form-select,
body.darkmode .input-group-text,
body.darkmode textarea.form-control {
    background-color: #111827 !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

body.darkmode .form-control::placeholder,
body.darkmode textarea.form-control::placeholder {
    color: #94a3b8 !important;
}

body.darkmode .modern-search,
body.darkmode .input-group,
body.darkmode .settings-tabs,
body.darkmode .workpaper-tabs,
body.darkmode .stammdaten-tabs,
body.darkmode .rss-url-dropdown,
body.darkmode .settings-card .form-check,
body.darkmode .settings-folder-row,
body.darkmode .settings-migration-row,
body.darkmode .settings-admin-status-item,
body.darkmode .settings-admin-log,
body.darkmode .flowcalc-panel,
body.darkmode .flowcalc-project-banner,
body.darkmode .flowcalc-stundenteiler-card,
body.darkmode .flowcalc-stundenteiler-item,
body.darkmode .flowcalc-kpi,
body.darkmode .flowcalc-rate,
body.darkmode .flowkv-source-switch,
body.darkmode .flowkv-warning-item,
body.darkmode .flowkv-salary-group,
body.darkmode .flowkv-salary-group-head,
body.darkmode .flowskills-profile,
body.darkmode .flowskills-empty,
body.darkmode .flowskills-group,
body.darkmode .flowskills-search-wrap,
body.darkmode .flowskills-catalog-row,
body.darkmode .flowskills-job-row,
body.darkmode .flowskills-selected-job,
body.darkmode .flowcheck-head,
body.darkmode .flowcheck-body,
body.darkmode .flowcheck-status-item,
body.darkmode .flowcheck-quality-item,
body.darkmode .flowcheck-issue {
    background: #111827 !important;
    border-color: #334155 !important;
}

body.darkmode .fd-sticky-page-head {
    background: var(--fd-bg);
    box-shadow: 0 1px 0 #334155, 0 12px 18px rgba(15, 23, 42, .96);
}

body.darkmode .fd-sticky-tab-tools {
    background: var(--fd-bg);
    box-shadow: 0 12px 18px rgba(15, 23, 42, .94);
}

body.darkmode .card-custom.fd-sticky-tab-tools,
body.darkmode .card-custom.flowkv-header-card,
body.darkmode .card-custom.flowkv-filter-card,
body.darkmode .card-custom.workpaper-header-card,
body.darkmode .card-custom.flowcrm-filter-card {
    background: #172036 !important;
    border-color: #27354b !important;
    box-shadow: 0 14px 30px rgba(0, 0, 0, .22) !important;
}

body.darkmode .flowcalc-kpi.green,
body.darkmode .flowcalc-rate.green,
body.darkmode .flowcalc-kpi.purple,
body.darkmode .flowcalc-rate.purple,
body.darkmode .flowcalc-rate.orange {
    background: #111827 !important;
}

body.darkmode .flowcalc-input-row,
body.darkmode .flowcalc-rate-row,
body.darkmode .flowcalc-summary-row,
body.darkmode .rss-url-dropdown-body,
body.darkmode .settings-muted-line {
    border-color: #334155 !important;
}

body.darkmode .flowcalc-brand-icon,
body.darkmode .workpaper-title-icon,
body.darkmode .settings-card-icon {
    background: rgba(37, 99, 235, .18) !important;
    border-color: rgba(147, 197, 253, .26) !important;
    color: #93c5fd !important;
}

body.darkmode .workpaper-tabs .btn-outline-primary,
body.darkmode .stammdaten-tabs .btn-outline-primary {
    background: transparent;
    border-color: transparent;
}

body.darkmode .flowcalc-alert,
body.darkmode .settings-admin-note,
body.darkmode .flowkv-warning-item {
    background: rgba(154, 52, 18, .18) !important;
    border-color: rgba(251, 146, 60, .38) !important;
    color: #fed7aa !important;
}

body.darkmode .betrieb-card .card-custom.is-locked-company {
    border-color: #7f1d1d;
    border-left-color: #ef4444;
    background: linear-gradient(90deg, rgba(127, 29, 29, .24) 0, #111827 46%);
}

body.darkmode .betrieb-card .card-custom.is-bankrupt-company {
    border-color: #4c1d95;
    border-left-color: #a78bfa;
    background: linear-gradient(90deg, rgba(76, 29, 149, .24) 0, #111827 46%);
}

body.darkmode .betrieb-lock-badge {
    border-color: #7f1d1d;
    background: rgba(127, 29, 29, .42);
    color: #fecaca;
}

body.darkmode .betrieb-lock-badge.is-bankrupt {
    border-color: #6d28d9;
    background: rgba(76, 29, 149, .52);
    color: #ddd6fe;
}

body.darkmode .betrieb-kpb-pill {
    border-color: #f8fafc;
    color: #f8fafc;
}

#homePage .home-card-title,
#homePage .missing-document-person,
#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-family: var(--fd-font-main) !important;
    font-stretch: normal !important;
    letter-spacing: 0 !important;
}

#homePage .home-card-title,
#homePage .missing-document-person,
#homePage .recent-name-link .fd-card-title-primary {
    font-weight: 700 !important;
}

#homePage .recent-name-link,
#homePage .recent-name-link .fd-card-title-name,
#homePage .recent-name-link .fd-card-title-secondary {
    font-weight: 400 !important;
}

body.darkmode :not(.a4-page):not(.a4-page *)[style*="background: #f8fafc"],
body.darkmode :not(.a4-page):not(.a4-page *)[style*="background:#f8fafc"],
body.darkmode :not(.a4-page):not(.a4-page *)[style*="background: #fff"],
body.darkmode :not(.a4-page):not(.a4-page *)[style*="background:#fff"],
body.darkmode :not(.a4-page):not(.a4-page *)[style*="background: #ffffff"],
body.darkmode :not(.a4-page):not(.a4-page *)[style*="background:#ffffff"] {
    background: #111827 !important;
}

body.darkmode :not(.a4-page):not(.a4-page *)[style*="color: #111827"],
body.darkmode :not(.a4-page):not(.a4-page *)[style*="color:#111827"],
body.darkmode :not(.a4-page):not(.a4-page *)[style*="color: #0f172a"],
body.darkmode :not(.a4-page):not(.a4-page *)[style*="color:#0f172a"] {
    color: #f8fafc !important;
}

.home-calendar-card .calendar-grid {
    grid-template-rows: 34px repeat(6, minmax(86px, 1fr));
    border-color: #dbe6f2;
    border-radius: 10px;
}

.home-calendar-card .calendar-weekday {
    min-height: 34px;
    color: #66758a;
    background: #f7fafc;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.home-calendar-card .calendar-day {
    min-height: 86px;
    height: auto;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 4px;
    padding: 8px;
    cursor: pointer;
}

.home-calendar-card .calendar-day-number,
.home-calendar-card .calendar-day-events {
    position: relative;
    z-index: 1;
}

.home-calendar-card .calendar-assignment-ranges {
    position: absolute;
    left: 0;
    right: 0;
    top: 31px;
    z-index: 0;
    display: grid;
    gap: 2px;
    pointer-events: none;
}

.home-calendar-card .calendar-assignment-range-bar {
    display: block;
    position: relative;
    height: 15px;
    overflow: hidden;
    pointer-events: auto;
    border-top: 1px solid var(--assignment-range-border, rgba(59, 130, 246, .24));
    border-bottom: 1px solid var(--assignment-range-border, rgba(59, 130, 246, .24));
    background: var(--assignment-range-bg, rgba(59, 130, 246, .12));
}

.home-calendar-card .calendar-assignment-range-bar.is-range-labeled {
    overflow: visible;
    z-index: 2;
}

.home-calendar-card .calendar-assignment-range-bar.is-range-placeholder {
    visibility: hidden;
    pointer-events: none;
}

.home-calendar-card .calendar-assignment-range-label {
    position: absolute;
    left: 0;
    top: 0;
    display: inline-block;
    width: min(360px, 42vw);
    max-width: calc((100vw - var(--sidebar-width, 0px)) / 3);
    padding: 0 6px;
    color: #102033;
    font-size: 10px;
    font-weight: 700;
    line-height: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-calendar-card .calendar-assignment-range-bar.is-range-start {
    margin-left: 8px;
    border-left: 1px solid var(--assignment-range-border, rgba(59, 130, 246, .24));
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}

.home-calendar-card .calendar-assignment-range-bar.is-range-end {
    margin-right: 8px;
    border-right: 1px solid var(--assignment-range-border, rgba(59, 130, 246, .24));
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
}

.home-calendar-card .calendar-assignment-range-bar.is-range-start.is-range-end {
    border-radius: 6px;
}

.home-calendar-card .calendar-day.is-assignment-range .calendar-day-events {
    margin-top: calc((var(--assignment-range-count, 1) * 17px) + 4px);
}

.home-calendar-card .calendar-day.is-drop-target,
.home-calendar-card .calendar-week-day.is-drop-target {
    background: #eff6ff !important;
    box-shadow: inset 0 0 0 2px #93c5fd;
}

.home-calendar-card .calendar-day-events {
    width: 100%;
    display: grid;
    gap: 3px;
    overflow: hidden;
}

.home-calendar-card .calendar-day-event-chip,
.home-calendar-card .calendar-week-event {
    cursor: grab;
    user-select: none;
}

.home-calendar-card .calendar-day-event-chip:active,
.home-calendar-card .calendar-week-event:active {
    cursor: grabbing;
}

.home-calendar-card .calendar-day-event-chip.is-readonly,
.home-calendar-card .calendar-week-event.is-readonly {
    cursor: default;
}

.home-calendar-card .calendar-mode-switch {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    min-width: 0;
    justify-self: end;
    padding: 3px;
    border: 1px solid #dbe3ed;
    border-radius: 8px;
    background: #ffffff;
}

.home-calendar-card .calendar-mode-btn {
    min-width: 0;
    height: 28px;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 0 11px;
    background: transparent;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    box-shadow: none;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.home-calendar-card .calendar-mode-btn.is-active {
    border-color: transparent;
    background: #eef5ff;
    color: #1d4ed8;
    box-shadow: none;
}

.home-calendar-card .calendar-control-btn:hover,
.home-calendar-card .calendar-control-btn:focus-visible,
.home-calendar-card .calendar-view-btn:hover,
.home-calendar-card .calendar-view-btn:focus-visible {
    border-color: #cbd5e1 !important;
    background: #ffffff !important;
    color: #0f172a !important;
    box-shadow: none !important;
    transform: none !important;
}

.home-calendar-card .calendar-mode-btn.is-active:hover,
.home-calendar-card .calendar-mode-btn.is-active:focus-visible {
    border-color: transparent !important;
    background: #eef5ff !important;
    color: #1d4ed8 !important;
    box-shadow: none !important;
    transform: none !important;
}

.home-calendar-card .calendar-mode-btn:hover,
.home-calendar-card .calendar-mode-btn:focus-visible {
    border-color: transparent !important;
    background: #f8fafc !important;
    color: #334155 !important;
    box-shadow: none !important;
    transform: none !important;
}

.home-calendar-card .calendar-view-btn.is-active:hover,
.home-calendar-card .calendar-view-btn.is-active:focus-visible,
.home-calendar-card .calendar-view-btn.btn-primary:hover,
.home-calendar-card .calendar-view-btn.btn-primary:focus-visible {
    border-color: #cbd5e1 !important;
    background: #ffffff !important;
    color: #0f172a !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .06) !important;
    transform: none !important;
}

.home-calendar-card.is-assignment-calendar .outlook-sync-panel,
.home-calendar-card.is-assignment-calendar #addCalendarEventQuickBtn,
.home-calendar-card.is-assignment-calendar #outlookStatus {
    display: none !important;
}

.home-calendar-card .calendar-day-event-chip.is-assignment,
.home-calendar-card .calendar-week-event.is-assignment,
.home-calendar-card .calendar-timeline-event.is-assignment {
    border-color: #0f766e;
    border-left-color: #14b8a6;
    background: rgba(20, 184, 166, .12);
    color: #0f172a;
}

.home-calendar-card .calendar-day-event-chip.is-assignment-start,
.home-calendar-card .calendar-week-event.is-assignment-start,
.home-calendar-card .calendar-timeline-event.is-assignment-start {
    border-color: #15803d;
    border-left-color: #22c55e;
    background: rgba(34, 197, 94, .12);
}

.home-calendar-card .calendar-day-event-chip.is-assignment-probation,
.home-calendar-card .calendar-week-event.is-assignment-probation,
.home-calendar-card .calendar-timeline-event.is-assignment-probation {
    border-color: #b45309;
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, .14);
}

.home-calendar-card .calendar-day-event-chip.is-assignment-termination,
.home-calendar-card .calendar-week-event.is-assignment-termination,
.home-calendar-card .calendar-timeline-event.is-assignment-termination,
.home-calendar-card .calendar-day-event-chip.is-assignment-notice_end,
.home-calendar-card .calendar-week-event.is-assignment-notice_end,
.home-calendar-card .calendar-timeline-event.is-assignment-notice_end {
    border-color: #b91c1c;
    border-left-color: #ef4444;
    background: rgba(239, 68, 68, .12);
}

.home-calendar-card .is-assignment-color-1 {
    --assignment-range-bg: rgba(37, 99, 235, .14);
    --assignment-range-border: rgba(37, 99, 235, .28);
    --assignment-chip-border: #2563eb;
    --assignment-chip-bg: rgba(37, 99, 235, .12);
}

.home-calendar-card .is-assignment-color-2 {
    --assignment-range-bg: rgba(13, 148, 136, .14);
    --assignment-range-border: rgba(13, 148, 136, .28);
    --assignment-chip-border: #0d9488;
    --assignment-chip-bg: rgba(13, 148, 136, .12);
}

.home-calendar-card .is-assignment-color-3 {
    --assignment-range-bg: rgba(124, 58, 237, .14);
    --assignment-range-border: rgba(124, 58, 237, .28);
    --assignment-chip-border: #7c3aed;
    --assignment-chip-bg: rgba(124, 58, 237, .12);
}

.home-calendar-card .is-assignment-color-4 {
    --assignment-range-bg: rgba(217, 119, 6, .15);
    --assignment-range-border: rgba(217, 119, 6, .3);
    --assignment-chip-border: #d97706;
    --assignment-chip-bg: rgba(217, 119, 6, .13);
}

.home-calendar-card .is-assignment-color-5 {
    --assignment-range-bg: rgba(219, 39, 119, .13);
    --assignment-range-border: rgba(219, 39, 119, .27);
    --assignment-chip-border: #db2777;
    --assignment-chip-bg: rgba(219, 39, 119, .11);
}

.home-calendar-card .is-assignment-color-6 {
    --assignment-range-bg: rgba(2, 132, 199, .14);
    --assignment-range-border: rgba(2, 132, 199, .28);
    --assignment-chip-border: #0284c7;
    --assignment-chip-bg: rgba(2, 132, 199, .12);
}

.home-calendar-card .is-assignment-color-7 {
    --assignment-range-bg: rgba(101, 163, 13, .15);
    --assignment-range-border: rgba(101, 163, 13, .3);
    --assignment-chip-border: #65a30d;
    --assignment-chip-bg: rgba(101, 163, 13, .13);
}

.home-calendar-card .is-assignment-color-8 {
    --assignment-range-bg: rgba(79, 70, 229, .14);
    --assignment-range-border: rgba(79, 70, 229, .28);
    --assignment-chip-border: #4f46e5;
    --assignment-chip-bg: rgba(79, 70, 229, .12);
}

.home-calendar-card .is-assignment-color-9 {
    --assignment-range-bg: rgba(8, 145, 178, .14);
    --assignment-range-border: rgba(8, 145, 178, .28);
    --assignment-chip-border: #0891b2;
    --assignment-chip-bg: rgba(8, 145, 178, .12);
}

.home-calendar-card .is-assignment-color-10 {
    --assignment-range-bg: rgba(190, 24, 93, .13);
    --assignment-range-border: rgba(190, 24, 93, .27);
    --assignment-chip-border: #be185d;
    --assignment-chip-bg: rgba(190, 24, 93, .11);
}

.home-calendar-card .is-assignment-color-11 {
    --assignment-range-bg: rgba(5, 150, 105, .14);
    --assignment-range-border: rgba(5, 150, 105, .28);
    --assignment-chip-border: #059669;
    --assignment-chip-bg: rgba(5, 150, 105, .12);
}

.home-calendar-card .is-assignment-color-12 {
    --assignment-range-bg: rgba(147, 51, 234, .14);
    --assignment-range-border: rgba(147, 51, 234, .28);
    --assignment-chip-border: #9333ea;
    --assignment-chip-bg: rgba(147, 51, 234, .12);
}

.home-calendar-card .calendar-day-event-chip.is-assignment[class*="is-assignment-color-"],
.home-calendar-card .calendar-week-event.is-assignment[class*="is-assignment-color-"],
.home-calendar-card .calendar-timeline-event.is-assignment[class*="is-assignment-color-"] {
    border-color: var(--assignment-chip-border);
    border-left-color: var(--assignment-chip-border);
    background: var(--assignment-chip-bg);
}

.home-calendar-card .calendar-day-more {
    padding-left: 2px;
    color: #64748b;
    font-size: 10px;
    font-weight: 600;
}

.home-calendar-card .calendar-week-grid {
    gap: 0;
    overflow: hidden;
    border: 1px solid #dbe6f2;
    border-radius: 10px;
    background: #ffffff;
}

.home-calendar-card .calendar-week-day {
    min-height: 460px;
    border: 0;
    border-right: 1px solid #e7eef6;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
}

.home-calendar-card .calendar-week-day:nth-child(6),
.home-calendar-card .calendar-week-day:nth-child(7) {
    background: #fff7f1;
}

.home-calendar-card .calendar-week-day:last-child {
    border-right: 0;
}

.home-calendar-card .calendar-week-day:hover {
    transform: none;
    box-shadow: inset 0 0 0 2px rgba(147, 197, 253, .45);
}

.home-calendar-card .calendar-week-day-head {
    min-height: 38px;
    padding-bottom: 8px;
    border-bottom: 1px solid #edf2f7;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.home-calendar-card .calendar-week-events {
    gap: 5px;
}

.home-calendar-card .calendar-week-event {
    border-radius: 6px;
    box-shadow: none;
}

body.darkmode .home-calendar-card .calendar-grid,
body.darkmode .home-calendar-card .calendar-week-grid {
    border-color: #334155;
    background: #111827;
}

body.darkmode .home-calendar-card .calendar-weekday,
body.darkmode .home-calendar-card .calendar-week-day {
    background: #172036;
    border-color: #334155;
}

body.darkmode .home-calendar-card .calendar-day.is-drop-target,
body.darkmode .home-calendar-card .calendar-week-day.is-drop-target {
    background: #172554 !important;
    box-shadow: inset 0 0 0 2px #3b82f6;
}

body.darkmode .home-calendar-card .calendar-week-day:nth-child(6),
body.darkmode .home-calendar-card .calendar-week-day:nth-child(7) {
    background: rgba(146, 64, 14, .16);
}

.card-custom.fd-sticky-tab-tools,
.fd-sticky-tab-tools.card-custom,
.flowkv-header-card.card-custom,
.flowkv-filter-card.card-custom,
.workpaper-header-card.card-custom,
.flowcrm-header-card.card-custom,
.flowcrm-filter-card.card-custom {
    background: var(--fd-surface) !important;
    border: 1px solid var(--fd-border) !important;
    border-radius: 10px !important;
    box-shadow: var(--fd-shadow) !important;
    padding: 13px !important;
}

.flowkv-header-card.card-custom,
.workpaper-header-card.card-custom,
.flowcrm-header-card.card-custom {
    min-height: 66px;
    display: flex;
    align-items: center;
}

.fd-sticky-tab-tools.card-custom,
.flowkv-filter-card.card-custom,
.flowcrm-filter-card.card-custom {
    margin-bottom: 14px !important;
}

.home-calendar-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.home-calendar-card .calendar-title-block {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin: 0;
}

.home-calendar-card .calendar-heading-stack {
    min-width: 0;
    display: grid;
    justify-items: start;
}

.home-calendar-card .calendar-view-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    justify-self: end;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.home-calendar-card .home-card-title {
    margin: 1px 0 0;
    color: #0f172a;
    font-family: var(--fd-font-main) !important;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0;
    text-align: left;
    white-space: nowrap;
}

.home-calendar-card .calendar-toolbar {
    display: grid;
    grid-template-columns: auto minmax(120px, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    min-width: 0;
    margin-top: 10px;
    padding: 8px 10px;
    border: 1px solid #dbe3ed;
    border-radius: 8px;
    background: #f8fafc;
    box-shadow: none;
}

.home-calendar-card .calendar-controls {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    white-space: nowrap;
    order: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.home-calendar-card .calendar-control-btn {
    width: 32px;
    min-width: 32px;
    height: 32px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-weight: 800;
    background: transparent;
    color: #475569;
    box-shadow: none;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.home-calendar-card .calendar-today-btn {
    width: auto;
    min-width: 76px;
    padding: 0 14px !important;
}

.home-calendar-card .calendar-month-label {
    margin: 0;
    color: #0f172a;
    white-space: nowrap;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.1;
    justify-self: start;
    padding: 0 12px;
}

.home-calendar-card .calendar-view-btn {
    min-width: 66px;
    height: 32px;
    border: 1px solid transparent !important;
    border-radius: 6px !important;
    padding: 0 12px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    color: #475569 !important;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    box-shadow: none;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.home-calendar-card .calendar-view-btn.is-active,
.home-calendar-card .calendar-view-btn.btn-primary {
    border-color: #cbd5e1 !important;
    background: #ffffff !important;
    color: #0f172a !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
}

.home-calendar-card .calendar-title-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
}

.home-calendar-card .calendar-layout,
.home-calendar-card #calendarSelectedDate {
    grid-column: 1 / -1;
}

.home-calendar-card #calendarSelectedDate {
    display: none !important;
}

.home-calendar-card .calendar-week-pane .calendar-day-title {
    display: none;
}

.home-calendar-card .calendar-week-grid {
    border: 0;
    overflow-x: auto;
    overflow-y: hidden;
    background: transparent;
}

.home-calendar-card .calendar-week-board {
    --week-slot-height: 18px;
    display: grid;
    grid-template-columns: 54px repeat(7, minmax(98px, 1fr));
    grid-template-rows: 50px auto;
    min-width: 780px;
    border: 1px solid #dbe6f2;
    border-radius: 10px;
    background: #ffffff;
    overflow: hidden;
}

.home-calendar-card .calendar-week-time-spacer,
.home-calendar-card .calendar-week-head {
    min-height: 50px;
    border-bottom: 1px solid #dbe6f2;
    background: #f7fafc;
}

.home-calendar-card .calendar-week-time-spacer {
    grid-column: 1;
    grid-row: 1;
}

.home-calendar-card .calendar-week-head {
    border: 0;
    border-left: 1px solid #e7eef6;
    border-bottom: 1px solid #dbe6f2;
    color: #475569;
    display: grid;
    place-items: center;
    gap: 2px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.1;
    text-transform: uppercase;
}

.home-calendar-card .calendar-week-head strong {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
    font-size: 13px;
}

.home-calendar-card .calendar-week-head.is-today strong {
    background: #2563eb;
    color: #ffffff;
}

.home-calendar-card .calendar-week-head.is-weekend,
.home-calendar-card .calendar-week-column.is-weekend {
    background: #fff7f1;
}

.home-calendar-card .calendar-week-time-column {
    grid-column: 1;
    grid-row: 2;
    display: grid;
    grid-template-rows: repeat(44, var(--week-slot-height));
    background: #f8fafc;
}

.home-calendar-card .calendar-week-time {
    min-height: var(--week-slot-height);
    padding: 1px 7px 0 0;
    border-bottom: 1px solid #f1f5f9;
    color: #64748b;
    font-size: 10px;
    line-height: 1;
    text-align: right;
}

.home-calendar-card .calendar-week-time.is-hour {
    border-bottom-color: #e2e8f0;
}

.home-calendar-card .calendar-week-column {
    position: relative;
    min-height: calc(44 * var(--week-slot-height));
    display: grid;
    grid-template-rows: repeat(44, var(--week-slot-height));
    border-left: 1px solid #e7eef6;
    background: #ffffff;
}

.home-calendar-card .calendar-week-column.is-selected {
    box-shadow: inset 3px 0 0 #2563eb;
}

.home-calendar-card .calendar-week-slot {
    min-height: var(--week-slot-height);
    padding: 0;
    border: 0;
    border-bottom: 1px solid #f1f5f9;
    background: transparent;
    cursor: pointer;
}

.home-calendar-card .calendar-week-slot.is-hour {
    border-bottom-color: #e2e8f0;
}

.home-calendar-card .calendar-week-slot:hover,
.home-calendar-card .calendar-week-slot.is-drop-target {
    background: rgba(37, 99, 235, .08);
}

.home-calendar-card .calendar-week-events-layer {
    position: absolute;
    inset: 0 5px 0 5px;
    pointer-events: none;
}

.home-calendar-card .calendar-week-event {
    position: absolute;
    left: 0;
    right: 0;
    min-height: 24px;
    display: grid;
    gap: 1px;
    padding: 4px 6px;
    border: 1px solid #bfdbfe;
    border-left: 3px solid #2563eb;
    border-radius: 7px;
    background: #eaf2ff;
    box-shadow: none;
    pointer-events: auto;
    overflow: hidden;
}

.home-calendar-card .calendar-week-event.is-outlook {
    border-color: #fed7aa;
    border-left-color: #ea580c;
    background: #fff7ed;
}

.home-calendar-card .calendar-week-event-time {
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.05;
}

.home-calendar-card .calendar-week-event-title {
    min-width: 0;
    color: #0f172a;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-calendar-card .calendar-week-untimed {
    position: absolute;
    left: 0;
    right: 0;
    top: 3px;
    padding: 4px 6px;
    border: 1px dashed #cbd5e1;
    border-radius: 7px;
    background: rgba(248, 250, 252, .92);
    color: #64748b;
    font-size: 11px;
    line-height: 1.2;
    pointer-events: none;
}

body.darkmode .card-custom.fd-sticky-tab-tools,
body.darkmode .fd-sticky-tab-tools.card-custom,
body.darkmode .flowkv-header-card.card-custom,
body.darkmode .flowkv-filter-card.card-custom,
body.darkmode .workpaper-header-card.card-custom,
body.darkmode .flowcrm-header-card.card-custom,
body.darkmode .flowcrm-filter-card.card-custom {
    background: #111827 !important;
    border-color: #334155 !important;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .22) !important;
}

body.darkmode .home-calendar-card .calendar-week-board {
    border-color: #334155;
    background: #111827;
}

body.darkmode .home-calendar-card .calendar-week-time-spacer,
body.darkmode .home-calendar-card .calendar-week-head,
body.darkmode .home-calendar-card .calendar-week-time-column {
    background: #172036;
    border-color: #334155;
}

body.darkmode .home-calendar-card .calendar-week-head,
body.darkmode .home-calendar-card .calendar-week-head strong,
body.darkmode .home-calendar-card .calendar-week-time {
    color: #e5e7eb;
}

body.darkmode .home-calendar-card .calendar-week-head.is-weekend,
body.darkmode .home-calendar-card .calendar-week-column.is-weekend {
    background: rgba(146, 64, 14, .16);
}

body.darkmode .home-calendar-card .calendar-week-column {
    background: #111827;
    border-color: #334155;
}

body.darkmode .home-calendar-card .calendar-week-slot {
    border-color: #1f2937;
}

body.darkmode .home-calendar-card .calendar-week-event {
    border-color: #1d4ed8;
    border-left-color: #60a5fa;
    background: rgba(37, 99, 235, .22);
}

body.darkmode .home-calendar-card .calendar-week-event.is-outlook {
    border-color: #9a3412;
    border-left-color: #fb923c;
    background: rgba(154, 52, 18, .24);
}

body.darkmode .home-calendar-card .calendar-toolbar {
    border-color: #334155;
    background: #111827;
    box-shadow: none;
}

body.darkmode .home-calendar-card .calendar-controls,
body.darkmode .home-calendar-card .calendar-view-switch {
    border-color: transparent;
    background: transparent;
}

body.darkmode .home-calendar-card .calendar-mode-switch {
    border-color: #334155;
    background: #111827;
}

body.darkmode .home-calendar-card .calendar-mode-btn,
body.darkmode .home-calendar-card .calendar-view-btn {
    border-color: #334155 !important;
    background: transparent !important;
    color: #bfdbfe;
}

body.darkmode .home-calendar-card .calendar-control-btn {
    border-color: transparent !important;
    background: transparent !important;
    color: #bfdbfe;
}

body.darkmode .home-calendar-card .calendar-mode-btn.is-active,
body.darkmode .home-calendar-card .calendar-view-btn.is-active,
body.darkmode .home-calendar-card .calendar-view-btn.btn-primary {
    border-color: transparent !important;
    color: #bfdbfe;
    background: #1e3a5f !important;
    box-shadow: none !important;
}

body.darkmode .home-calendar-card .calendar-assignment-range-label {
    color: #e5edf7;
}

body.darkmode .home-calendar-card .calendar-day-event-chip.is-assignment,
body.darkmode .home-calendar-card .calendar-week-event.is-assignment,
body.darkmode .home-calendar-card .calendar-timeline-event.is-assignment {
    border-color: #0f766e;
    border-left-color: #2dd4bf;
    background: rgba(20, 184, 166, .2);
    color: #f8fafc;
}

body.darkmode .home-calendar-card .calendar-day-event-chip.is-assignment-start,
body.darkmode .home-calendar-card .calendar-week-event.is-assignment-start,
body.darkmode .home-calendar-card .calendar-timeline-event.is-assignment-start {
    border-color: #15803d;
    border-left-color: #4ade80;
    background: rgba(34, 197, 94, .18);
}

body.darkmode .home-calendar-card .calendar-day-event-chip.is-assignment-probation,
body.darkmode .home-calendar-card .calendar-week-event.is-assignment-probation,
body.darkmode .home-calendar-card .calendar-timeline-event.is-assignment-probation {
    border-color: #b45309;
    border-left-color: #fbbf24;
    background: rgba(245, 158, 11, .18);
}

body.darkmode .home-calendar-card .calendar-day-event-chip.is-assignment-termination,
body.darkmode .home-calendar-card .calendar-week-event.is-assignment-termination,
body.darkmode .home-calendar-card .calendar-timeline-event.is-assignment-termination,
body.darkmode .home-calendar-card .calendar-day-event-chip.is-assignment-notice_end,
body.darkmode .home-calendar-card .calendar-week-event.is-assignment-notice_end,
body.darkmode .home-calendar-card .calendar-timeline-event.is-assignment-notice_end {
    border-color: #b91c1c;
    border-left-color: #f87171;
    background: rgba(239, 68, 68, .18);
}

body.darkmode .home-calendar-card .calendar-week-event-title {
    color: #f8fafc;
}

@media (max-width: 900px) {
    .workpaper-tabs,
    .stammdaten-tabs {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .home-calendar-card .calendar-toolbar {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .home-calendar-card .calendar-controls {
        grid-column: 1;
    }

    .home-calendar-card .calendar-month-label {
        grid-column: 2;
        justify-self: end;
    }

    .home-calendar-card .calendar-mode-switch {
        grid-column: 1;
        justify-self: start;
    }

    .home-calendar-card .calendar-view-switch {
        grid-column: 2;
        justify-self: end;
    }

    .home-calendar-card .calendar-title-block {
        align-items: flex-start;
        gap: 10px;
    }

    .home-calendar-card .calendar-title-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}

@media (max-width: 560px) {
    .btn.card-action-btn:not(.settings-icon-btn):not(.flowcrm-contact-icon):not(.header-icon-button),
    .workbook-actions .btn,
    .preview-actions .btn {
        width: 100%;
        min-width: 0;
    }

    .home-calendar-card .calendar-title-block {
        flex-direction: column;
    }

    .home-calendar-card .calendar-toolbar,
    .home-calendar-card .calendar-controls,
    .home-calendar-card .calendar-mode-switch,
    .home-calendar-card .calendar-title-actions,
    .home-calendar-card .calendar-view-switch {
        width: 100%;
    }

    .home-calendar-card .calendar-toolbar {
        align-items: flex-start;
        grid-template-columns: 1fr;
    }

    .home-calendar-card .calendar-controls,
    .home-calendar-card .calendar-month-label,
    .home-calendar-card .calendar-mode-switch,
    .home-calendar-card .calendar-view-switch {
        grid-column: 1;
        justify-self: stretch;
    }

    .home-calendar-card .calendar-month-label {
        padding-left: 0;
    }

    .home-calendar-card .calendar-controls {
        display: grid;
        grid-template-columns: 38px 38px minmax(74px, 1fr);
    }

    .home-calendar-card .calendar-mode-switch {
        display: inline-flex;
        width: auto;
        justify-self: start;
    }

    .home-calendar-card .calendar-view-switch {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Final card guard: module headers and sticky tool/search bands must never render transparent. */
.main .card-custom.workpaper-header-card,
.main .card-custom.flowkv-header-card,
.main .card-custom.flowkv-filter-card,
.main .card-custom.flowskills-head,
.main .card-custom.flowcheck-head,
.main .card-custom.flowcheck-body,
.main .card-custom.flowcrm-header-card,
.main .card-custom.flowcrm-filter-card,
.main .card-custom.fd-sticky-tab-tools,
.main .fd-sticky-tab-tools.card-custom,
.main .settings-card,
.main .settings-system-card {
    background-color: var(--fd-surface) !important;
    border: 1px solid var(--fd-border) !important;
    border-radius: 10px !important;
    box-shadow: var(--fd-shadow) !important;
}

.main .card-custom.workpaper-header-card,
.main .card-custom.flowkv-header-card,
.main .card-custom.flowskills-head,
.main .card-custom.flowcheck-head,
.main .card-custom.flowcrm-header-card {
    min-height: 66px;
    padding: 13px !important;
}

.main .card-custom.workpaper-header-card,
.main .card-custom.flowkv-header-card,
.main .card-custom.flowcrm-header-card {
    display: flex;
    align-items: center;
}

.main .card-custom.workpaper-header-card::before,
.main .card-custom.flowkv-header-card::before,
.main .card-custom.flowkv-filter-card::before,
.main .card-custom.fd-sticky-tab-tools::before,
.main .fd-sticky-tab-tools.card-custom::before {
    background: var(--fd-bg) !important;
}

body.darkmode .main .card-custom.workpaper-header-card,
body.darkmode .main .card-custom.flowkv-header-card,
body.darkmode .main .card-custom.flowkv-filter-card,
body.darkmode .main .card-custom.flowskills-head,
body.darkmode .main .card-custom.flowcheck-head,
body.darkmode .main .card-custom.flowcheck-body,
body.darkmode .main .card-custom.flowcrm-header-card,
body.darkmode .main .card-custom.flowcrm-filter-card,
body.darkmode .main .card-custom.fd-sticky-tab-tools,
body.darkmode .main .fd-sticky-tab-tools.card-custom,
body.darkmode .main .settings-card,
body.darkmode .main .settings-system-card {
    background-color: #111827 !important;
    border-color: #334155 !important;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .22) !important;
}

/* Hard guard: search/filter bands that are actual cards must keep their card surface. */
.card-custom.fd-sticky-tab-tools,
.fd-sticky-tab-tools.card-custom,
.card-custom.flowkv-filter-card,
.flowkv-filter-card.card-custom,
.card-custom.flowcrm-filter-card,
.flowcrm-filter-card.card-custom {
    background: var(--fd-surface) !important;
    background-color: var(--fd-surface) !important;
    border: 1px solid var(--fd-border) !important;
    border-radius: 10px !important;
    box-shadow: var(--fd-shadow) !important;
    padding: 13px !important;
}

.card-custom.fd-sticky-tab-tools::before,
.fd-sticky-tab-tools.card-custom::before,
.card-custom.flowkv-filter-card::before,
.flowkv-filter-card.card-custom::before {
    background: var(--fd-bg) !important;
}

body.darkmode .card-custom.fd-sticky-tab-tools,
body.darkmode .fd-sticky-tab-tools.card-custom,
body.darkmode .card-custom.flowkv-filter-card,
body.darkmode .flowkv-filter-card.card-custom,
body.darkmode .card-custom.flowcrm-filter-card,
body.darkmode .flowcrm-filter-card.card-custom {
    background: #111827 !important;
    background-color: #111827 !important;
    border-color: #334155 !important;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .22) !important;
}
