/* flowCRM⁺ module */

.flowcrm-title {
    font-family: var(--fd-font-condensed) !important;
    letter-spacing: 0;
}

.flowcrm-panel-title,
.flowcrm-detail-title,
.flowcrm-dossier-title,
.flowcrm-case-company-title,
.flowcrm-case-title,
.flowcrm-mini-title,
.flowcrm-timeline-title,
.flowcrm-migration-name {
    font-family: var(--fd-font-main) !important;
    letter-spacing: 0;
}

.flowcrm-module {
    display: grid;
    --flowcrm-card-gap: 10px;
    gap: 14px;
    min-width: 0;
}

.flowcrm-module > .fd-sticky-tab-tools {
    display: grid;
    gap: 12px;
    margin-top: 0;
}

.flowcrm-module .card-custom,
.flowcrm-kpi {
    margin-bottom: 0 !important;
}

.flowcrm-panel-head,
.flowcrm-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.flowcrm-view-switch {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px;
    flex: 0 0 auto;
    min-width: 0;
    padding: 3px;
    border: 1px solid #c9daf5;
    border-radius: 8px;
    background: #f7fbff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .045);
}

.flowcrm-view-switch .card-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-width: 0 !important;
    max-width: 100%;
    min-height: 34px !important;
    padding: 6px 4px !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    font-size: 12px;
    font-weight: 750;
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flowcrm-view-switch .card-action-btn i {
    flex: 0 0 auto;
}

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

.flowcrm-view-switch .btn-outline-primary {
    border-color: transparent;
    background: transparent;
    color: #2563eb;
}

.flowcrm-view-switch .btn-outline-primary:hover,
.flowcrm-view-switch .btn-outline-primary:focus-visible {
    border-color: #dbeafe;
    background: #eef6ff;
    color: #1d4ed8;
}

.flowcrm-view-switch .btn-primary {
    border-color: #2563eb;
    background: #2563eb;
    color: #ffffff;
}

body.darkmode .flowcrm-view-switch {
    border-color: #334155;
    background: #111827;
    box-shadow: 0 12px 26px rgba(0, 0, 0, .18);
}

body.darkmode .flowcrm-view-switch .btn-outline-primary {
    color: #93c5fd;
}

body.darkmode .flowcrm-view-switch .btn-outline-primary:hover,
body.darkmode .flowcrm-view-switch .btn-outline-primary:focus-visible {
    border-color: #1e3a8a;
    background: #172554;
    color: #bfdbfe;
}

.flowcrm-header-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px;
}

.flowcrm-header-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
}

.flowcrm-header-icon {
    flex: 0 0 auto;
}

.flowcrm-title {
    margin: 0;
    color: var(--fd-text);
    font-size: 21px;
    font-weight: 800;
    line-height: 1.2;
}

.flowcrm-header-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.flowcrm-header-actions .card-action-btn {
    min-width: 146px;
}

#flowCrmMigrationBtn {
    display: none !important;
}

.flowcrm-subtitle,
.flowcrm-muted,
.flowcrm-case-meta,
.flowcrm-detail-meta,
.flowcrm-timeline-note {
    color: var(--fd-muted);
    font-size: 12px;
    line-height: 1.34;
}

.flowcrm-header-card .flowcrm-subtitle {
    margin-top: 2px;
    font-size: 13px;
}

.flowcrm-filter-card,
.flowcrm-list-card,
.flowcrm-detail-card {
    padding: 14px;
    border-radius: 8px;
}

.flowcrm-list-card,
.flowcrm-detail-card {
    border-color: #d7e2f1;
    background: #ffffff;
}

.flowcrm-filter-grid {
    display: grid;
    grid-template-columns: minmax(260px, 2fr) repeat(5, minmax(132px, 1fr));
    gap: 10px;
    align-items: stretch;
    min-width: 0;
}

.flowcrm-filter-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
}

.flowcrm-filter-toggle {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 44px;
    transform: none !important;
    gap: 7px;
    border-color: #2563eb !important;
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .045);
}

.flowcrm-filter-toggle:hover,
.flowcrm-filter-toggle:focus,
.flowcrm-filter-toggle:active,
.flowcrm-filter-toggle.is-open {
    transform: none !important;
    border-color: #2563eb !important;
    background: #2563eb !important;
    color: #ffffff !important;
}

.flowcrm-filter-toggle:focus-visible {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .18);
}

.flowcrm-filter-chevron {
    margin-left: 2px;
    transition: transform .16s ease;
}

.flowcrm-filter-toggle.is-open .flowcrm-filter-chevron {
    transform: rotate(180deg);
}

.flowcrm-filter-reset-all {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 44px;
    gap: 7px;
    border-color: #cbd5e1 !important;
    background: #ffffff !important;
    color: #475569 !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .035);
    transform: none !important;
}

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

.flowcrm-filter-reset-all:disabled {
    opacity: .52;
    cursor: not-allowed;
}

.flowcrm-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 999px;
    background: #2563eb;
    color: #ffffff;
    font-size: 11px;
    font-weight: 900;
}

.flowcrm-filter-toggle:hover .flowcrm-filter-count,
.flowcrm-filter-toggle:focus .flowcrm-filter-count,
.flowcrm-filter-toggle:active .flowcrm-filter-count,
.flowcrm-filter-toggle.is-open .flowcrm-filter-count {
    background: #ffffff;
    color: #1d4ed8;
}

.flowcrm-filter-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 5px;
    min-width: 0;
    margin-top: 8px;
}

.flowcrm-filter-chips:empty {
    display: none;
}

.flowcrm-filter-chip {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.flowcrm-advanced-filters {
    margin-top: 10px;
    padding: 14px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #f7fbff;
}

.flowcrm-advanced-filter-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(132px, 1fr));
    gap: 10px 12px;
    align-items: end;
}

.flowcrm-advanced-group-title {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    min-height: 20px;
    margin-top: 2px;
    padding-top: 2px;
    color: #1e3a8a;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.flowcrm-advanced-group-title:not(:first-child) {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid #e3edfb;
}

.flowcrm-advanced-field {
    min-width: 0;
    display: grid;
    gap: 5px;
    margin: 0;
}

.flowcrm-advanced-field > span {
    color: #475569;
    font-size: 11px;
    font-weight: 650;
    line-height: 1.2;
}

.flowcrm-advanced-field-wide {
    grid-column: span 2;
}

.flowcrm-reset-filters {
    width: 100% !important;
    min-width: 0 !important;
    gap: 6px;
}

.flowcrm-filter-card .modern-search {
    min-height: 46px;
    border: 1px solid #d7e2f1;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .045);
    overflow: hidden;
}

.flowcrm-filter-card .modern-search .input-group-text {
    width: 50px;
    min-height: 44px;
    justify-content: center;
    border: 0;
    background: transparent;
    color: #64748b;
}

.flowcrm-filter-card .modern-search .form-control {
    min-height: 44px;
    border: 0;
    background: transparent;
    box-shadow: none;
    padding-left: 0;
}

.flowcrm-filter-card .form-select,
.flowcrm-advanced-filters .form-control,
.flowcrm-advanced-filters .form-select {
    min-height: 46px;
    border-color: #d7e2f1;
    border-radius: 10px;
    background-color: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .045);
}

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

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

.flowcrm-advanced-filters .form-control::placeholder {
    color: #94a3b8;
    opacity: 1;
}

body.darkmode .flowcrm-filter-card .modern-search,
body.darkmode .flowcrm-filter-card .form-select,
body.darkmode .flowcrm-advanced-filters .form-control,
body.darkmode .flowcrm-advanced-filters .form-select,
body.darkmode .flowcrm-advanced-filters {
    border-color: #334155;
    background-color: #111827;
    box-shadow: 0 12px 26px rgba(0, 0, 0, .18);
}

body.darkmode .flowcrm-filter-card .modern-search .input-group-text,
body.darkmode .flowcrm-filter-card .modern-search .form-control,
body.darkmode .flowcrm-filter-card .form-select,
body.darkmode .flowcrm-advanced-filters .form-control,
body.darkmode .flowcrm-advanced-filters .form-select {
    color: #e5e7eb;
}

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

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

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

.flowcrm-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--flowcrm-card-gap);
    min-width: 0;
}

.flowcrm-kpi {
    padding: 12px 14px;
    border: 1px solid #dbe5f2;
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
    box-shadow: 0 8px 18px rgba(15, 23, 42, .045);
}

.flowcrm-kpi span {
    display: block;
    color: var(--fd-text);
    font-size: 18px;
    font-weight: 750;
    line-height: 1.1;
}

.flowcrm-kpi small {
    color: var(--fd-muted);
    font-size: 12px;
}

.flowcrm-finance-box {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding: 10px;
    border: 1px dashed var(--fd-border);
    border-radius: 8px;
    background: #fff;
}

.flowcrm-finance-box.is-active {
    border-color: #ddd6fe;
    background: #f6f1ff;
}

.flowcrm-finance-form-card {
    padding: 12px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
}

.flowcrm-check-row {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 2px;
}

.flowcrm-check-row .form-check {
    min-height: 0;
    margin: 0;
}

.flowcrm-layout {
    display: grid;
    grid-template-columns:
        minmax(320px, calc((100% - (var(--flowcrm-card-gap) * 3)) / 4))
        minmax(0, 1fr);
    gap: var(--flowcrm-card-gap);
    align-items: start;
    min-width: 0;
}

.flowcrm-list-card .flowcrm-panel-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.flowcrm-list-card .flowcrm-view-switch {
    width: 100%;
}

.flowcrm-panel-title,
.flowcrm-detail-title {
    color: var(--fd-text);
    font-size: 16px;
    font-family: var(--fd-font-main);
    font-weight: 700;
    line-height: 1.22;
}

.flowcrm-detail-head {
    padding: 13px 14px;
    border: 1px solid #c9daf5;
    border-left: 4px solid #2563eb;
    border-radius: 8px;
    background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 72%);
    box-shadow: 0 10px 22px rgba(37, 99, 235, .08);
}

.flowcrm-detail-head.is-phase-abbruch {
    border-color: #fecaca;
    border-left-color: #ef4444;
    background: linear-gradient(135deg, #fff5f5 0%, #ffffff 72%);
}

.flowcrm-detail-head.is-phase-ubernahme {
    border-color: #bbf7d0;
    border-left-color: #22c55e;
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 72%);
}

.flowcrm-detail-head.is-phase-zeitablauf {
    border-color: #fde68a;
    border-left-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #ffffff 72%);
}

.flowcrm-detail-head.is-participant-detail {
    border-color: #c9daf5;
    border-left-color: #2563eb;
    background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 72%);
}

.flowcrm-case-identity {
    display: grid;
    gap: 3px;
}

.flowcrm-case-company-title,
.flowcrm-case-participant-title {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--fd-text);
    line-height: 1.16;
}

.flowcrm-case-company-title {
    font-size: 19px;
    font-weight: 850;
}

.flowcrm-case-participant-title {
    color: #1e3a8a;
    font-family: var(--fd-font-main);
    font-size: 16px;
    font-weight: 780;
}

.flowcrm-case-company-title span,
.flowcrm-case-participant-title span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flowcrm-case-company-title i,
.flowcrm-case-participant-title i {
    flex: 0 0 auto;
    color: #2563eb;
    font-size: .9em;
}

.flowcrm-case-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
    min-width: 0;
}

.flowcrm-case-row {
    width: 100%;
    min-width: 0;
    padding: 10px 11px;
    border: 1px solid #d9e3f0;
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    color: inherit;
    text-align: left;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .035);
    transition: border-color .14s ease, background .14s ease, box-shadow .14s ease, transform .14s ease;
    overflow: hidden;
}

.flowcrm-list-more {
    width: 100%;
    min-height: 42px;
    border: 1px dashed #b8c9e6;
    border-radius: 8px;
    background: #f8fbff;
    color: #2563eb;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.flowcrm-list-more:hover,
.flowcrm-list-more:focus-visible {
    border-color: #2563eb;
    background: #eef5ff;
}

.flowcrm-case-row:hover,
.flowcrm-case-row:focus-visible,
.flowcrm-case-row.is-active {
    border-color: #9fbcf4;
    background: #f7fbff;
    box-shadow: 0 8px 18px rgba(37, 99, 235, .1);
}

.flowcrm-case-row:hover,
.flowcrm-case-row:focus-visible {
    transform: none;
}

.flowcrm-case-row.is-flowbot-highlighted,
.flowcrm-detail.is-flowbot-highlighted {
    outline: 3px solid rgba(37, 99, 235, .22);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .12), 0 14px 30px rgba(15, 23, 42, .12);
}

.flowcrm-case-row.is-phase-abbruch {
    border-color: #fecaca;
    background: linear-gradient(180deg, #fffafa 0%, #fff5f5 100%);
}

.flowcrm-case-row.is-phase-ubernahme {
    border-color: #bbf7d0;
    background: linear-gradient(180deg, #fbfffd 0%, #f0fdf4 100%);
}

.flowcrm-case-row.is-phase-zeitablauf {
    border-color: #fde68a;
    background: linear-gradient(180deg, #fffdf5 0%, #fffbeb 100%);
}

.flowcrm-case-row.is-closed {
    opacity: .84;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-style: dashed;
}

.flowcrm-case-row.is-closed.is-phase-abbruch {
    border-color: #fca5a5;
    background: linear-gradient(180deg, #fff7f7 0%, #fee2e2 100%);
}

.flowcrm-case-row.is-closed.is-phase-ubernahme {
    border-color: #86efac;
    background: linear-gradient(180deg, #f7fff9 0%, #dcfce7 100%);
}

.flowcrm-case-row.is-closed.is-phase-zeitablauf {
    border-color: #fcd34d;
    background: linear-gradient(180deg, #fffdf2 0%, #fef3c7 100%);
}

.flowcrm-case-row.is-closed.is-phase-abbruch:hover,
.flowcrm-case-row.is-closed.is-phase-abbruch:focus-visible,
.flowcrm-case-row.is-closed.is-phase-abbruch.is-active {
    background: linear-gradient(180deg, #fff1f2 0%, #fecaca 100%);
}

.flowcrm-case-row.is-closed.is-phase-ubernahme:hover,
.flowcrm-case-row.is-closed.is-phase-ubernahme:focus-visible,
.flowcrm-case-row.is-closed.is-phase-ubernahme.is-active {
    background: linear-gradient(180deg, #ecfdf3 0%, #bbf7d0 100%);
}

.flowcrm-case-row.is-closed.is-phase-zeitablauf:hover,
.flowcrm-case-row.is-closed.is-phase-zeitablauf:focus-visible,
.flowcrm-case-row.is-closed.is-phase-zeitablauf.is-active {
    background: linear-gradient(180deg, #fffbeb 0%, #fde68a 100%);
}

.flowcrm-case-row.is-closed .flowcrm-case-meta {
    color: #64748b;
    font-weight: 700;
}

.flowcrm-case-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.flowcrm-case-main > .min-w-0 {
    min-width: 0;
    overflow: hidden;
}

.flowcrm-case-title {
    color: var(--fd-text);
    font-size: 15px;
    font-family: var(--fd-font-main);
    font-weight: 400;
    line-height: 1.22;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flowcrm-case-title .fd-card-title-primary {
    font-weight: 700;
}

.flowcrm-case-title .fd-card-title-secondary {
    font-weight: 400;
}

.flowcrm-case-company {
    margin-top: 2px;
    color: #2d3a50;
    font-size: 12px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flowcrm-case-meta {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flowcrm-close-menu .dropdown-toggle.show,
.flowcrm-close-menu .dropdown-toggle:active,
.flowcrm-close-menu .dropdown-toggle:focus,
.flowcrm-close-menu .dropdown-toggle:focus-visible,
.flowcrm-close-menu .dropdown-toggle.is-busy,
.flowcrm-close-menu .dropdown-toggle[aria-busy="true"],
.flowcrm-close-menu .dropdown-toggle:disabled {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
    opacity: 1 !important;
    transform: none !important;
}

.flowcrm-close-menu .dropdown-toggle.show i,
.flowcrm-close-menu .dropdown-toggle:active i,
.flowcrm-close-menu .dropdown-toggle:focus i,
.flowcrm-close-menu .dropdown-toggle:focus-visible i,
.flowcrm-close-menu .dropdown-toggle.is-busy i,
.flowcrm-close-menu .dropdown-toggle[aria-busy="true"] i,
.flowcrm-close-menu .dropdown-toggle:disabled i {
    color: currentColor !important;
}

.flowcrm-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}

.flowcrm-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 56px;
    min-height: 22px;
    padding: 0 6px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-family: var(--fd-font-condensed);
    font-size: 11px;
    font-weight: 850;
    line-height: 1;
    white-space: nowrap;
}

.flowcrm-pill-label {
    flex: 0 0 auto;
}

.flowcrm-pill-code {
    flex: 0 0 auto;
    text-align: right;
}

.flowcrm-pill.is-tn {
    border-color: #cfe1ff;
    background: #f1f6ff;
    color: #1e4f9a;
}

.flowcrm-pill.is-bt {
    border-color: #d5e7dc;
    background: #f3faf6;
    color: #256044;
}

.flowcrm-pill.is-ul {
    border-color: #eadcc8;
    background: #fbf7ef;
    color: #745126;
}

.flowcrm-pill.is-muted {
    min-width: 0;
    border-color: #e2e8f0;
    background: #f8fafc;
    color: #64748b;
}

.flowcrm-phase {
    flex: 0 0 auto;
    min-width: 42px;
    padding: 4px 7px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #fff;
    color: #475569;
    font-family: var(--fd-font-condensed);
    font-size: 11px;
    font-weight: 850;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}

.flowcrm-phase.is-erstkontakt {
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.flowcrm-phase.is-bewerbung {
    border-color: #c7d2fe;
    color: #4338ca;
}

.flowcrm-phase.is-vorstellungsgesprach {
    border-color: #bae6fd;
    color: #0369a1;
}

.flowcrm-phase.is-arbeitserprobung {
    border-color: #bbf7d0;
    color: #15803d;
}

.flowcrm-phase.is-uberlassung {
    border-color: #fed7aa;
    color: #9a3412;
}

.flowcrm-phase.is-ubernahme {
    border-color: #bbf7d0;
    color: #15803d;
}

.flowcrm-phase.is-zeitablauf {
    border-color: #fde68a;
    color: #a16207;
}

.flowcrm-phase.is-abbruch,
.flowcrm-phase.is-absage {
    border-color: #fecaca;
    color: #b91c1c;
}

.flowcrm-phase.is-status {
    border-color: #e2e8f0;
    color: #475569;
}

.flowcrm-detail {
    min-height: 420px;
    min-width: 0;
}

.flowcrm-detail-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}

.flowcrm-case-detail-head {
    position: sticky;
    top: 12px;
    z-index: 6;
    align-items: flex-start;
    padding: 14px;
    border: 1px solid #c9daf5;
    border-radius: 8px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 12px 26px rgba(15, 23, 42, .08);
    backdrop-filter: blur(10px);
}

.flowcrm-case-action-rail {
    align-items: flex-start;
    align-self: flex-start;
    flex-wrap: nowrap;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.flowcrm-case-action-rail .card-action-btn {
    flex: 0 0 38px;
    width: 38px;
    min-width: 38px;
    height: 36px;
    padding: 0;
    justify-content: center;
    white-space: nowrap;
}

.flowcrm-case-action-rail .card-action-btn i {
    margin: 0;
    font-size: 15px;
    line-height: 1;
}

.flowcrm-open-flowdocs-btn {
    width: 174px;
    min-width: 174px;
    justify-content: center;
}

.flowcrm-open-flowdocs-label {
    margin-left: 5px;
}

.flowcrm-quick-grid .card-action-btn,
#flowCrmEditCompanyFromCaseBtn,
#flowCrmEditParticipantFromCaseBtn,
.flowcrm-dossier-action-btn {
    min-width: 174px;
}

.flowcrm-case-fields .card-action-btn:not(.w-100) {
    min-width: 174px;
}

.flowcrm-close-menu {
    flex: 0 0 auto;
}

.flowcrm-close-menu .dropdown-menu {
    min-width: 190px;
    padding: 6px;
    border: 1px solid #dbe5f2;
    border-radius: 8px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, .14);
}

.flowcrm-complete-option {
    min-height: 36px;
    border-radius: 7px;
    color: var(--fd-text);
    font-size: 13px;
    font-weight: 700;
}

.flowcrm-complete-option.is-abbruch i {
    color: #dc2626;
}

.flowcrm-complete-option.is-absage i {
    color: #64748b;
}

.flowcrm-complete-option.is-zeitablauf i {
    color: #d97706;
}

.flowcrm-complete-option.is-uebernahme i {
    color: #16a34a;
}

.flowcrm-detail-form {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.flowcrm-form-section {
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
}

.flowcrm-form-section summary,
.flowcrm-form-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 56px;
    padding: 11px 13px;
    cursor: pointer;
    list-style: none;
    background: #f8fbff;
}

.flowcrm-form-section-head {
    cursor: default;
}

.flowcrm-form-section summary::-webkit-details-marker {
    display: none;
}

.flowcrm-form-section summary > span,
.flowcrm-form-section-head > span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.flowcrm-form-section summary i {
    color: #2563eb;
    transition: transform .16s ease;
}

.flowcrm-form-section[open] summary i {
    transform: rotate(180deg);
}

.flowcrm-form-section-body {
    display: grid;
    gap: 10px;
    padding: 12px;
}

.flowcrm-settings-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    padding: 12px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #f8fbff;
}

.flowcrm-settings-toggle-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.flowcrm-settings-toggle-main span:last-child {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.flowcrm-settings-toggle-main strong {
    color: var(--fd-text);
    font-size: 14px;
    line-height: 1.2;
}

.flowcrm-settings-toggle-main small,
.flowcrm-settings-note {
    color: #64748b;
    font-size: 12px;
    line-height: 1.35;
}

.flowcrm-settings-toggle-icon,
.flowcrm-gisa-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: #ecfdf3;
    color: #15803d;
}

.flowcrm-settings-note {
    margin-top: 10px;
}

.flowcrm-gisa-panel {
    min-width: 0;
    margin-top: 10px;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
}

.flowcrm-gisa-panel summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 48px;
    padding: 9px 11px;
    cursor: pointer;
    list-style: none;
    background: #f0fdf4;
}

.flowcrm-gisa-panel summary::-webkit-details-marker {
    display: none;
}

.flowcrm-gisa-summary-main {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.flowcrm-gisa-summary-main span:last-child {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.flowcrm-gisa-summary-main strong {
    color: #14532d;
    font-size: 13px;
    line-height: 1.15;
}

.flowcrm-gisa-summary-main small,
.flowcrm-gisa-note {
    color: #64748b;
    font-size: 11px;
    line-height: 1.35;
}

.flowcrm-gisa-panel summary > .bi-chevron-down {
    flex: 0 0 auto;
    color: #15803d;
    transition: transform .16s ease;
}

.flowcrm-gisa-panel[open] summary > .bi-chevron-down {
    transform: rotate(180deg);
}

.flowcrm-gisa-body {
    display: grid;
    gap: 10px;
    max-height: 240px;
    padding: 11px;
    overflow: auto;
}

.flowcrm-gisa-grid {
    display: grid;
    gap: 7px;
}

.flowcrm-gisa-row {
    display: grid;
    grid-template-columns: minmax(76px, .45fr) minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    min-width: 0;
    font-size: 12px;
    line-height: 1.3;
}

.flowcrm-gisa-row span {
    color: #64748b;
}

.flowcrm-gisa-row strong {
    min-width: 0;
    color: var(--fd-text);
    font-weight: 700;
    overflow-wrap: anywhere;
}

.flowcrm-gisa-ask {
    justify-self: start;
}

.flowcrm-form-section.is-stammdaten {
    border-color: #bfdbfe;
}

.flowcrm-appointment-grid {
    display: grid;
    grid-template-columns: minmax(130px, .8fr) minmax(100px, .55fr) minmax(100px, .55fr) minmax(220px, 1.4fr) auto;
    gap: 10px;
    align-items: end;
}

.flowcrm-appointment-note-field {
    min-width: 0;
}

.flowcrm-appointment-list {
    margin-top: 12px;
}

.flowcrm-appointment-item {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.flowcrm-form-save-row {
    display: flex;
    justify-content: flex-end;
}

.flowcrm-form-save-row .card-action-btn {
    min-width: 180px;
}

.flowcrm-inline-action-field {
    align-items: stretch;
    display: flex;
    gap: 8px;
    min-width: 0;
}

.flowcrm-inline-action-field .form-control {
    flex: 1 1 auto;
    min-width: 0;
}

.flowcrm-inline-ai-btn {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    flex: 0 0 44px;
    height: auto;
    justify-content: center;
    min-height: 42px;
    min-width: 44px;
    padding: 0;
}

.flowcrm-inline-ai-btn i {
    font-size: 1rem;
    line-height: 1;
}

.flowcrm-participant-skill-box {
    display: grid;
    gap: 12px;
    padding: 0;
    border: 0;
    background: transparent;
}

.flowcrm-skill-box-head {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1e3a8a;
    font-weight: 700;
}

.flowcrm-skill-box-head i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #dbeafe;
    color: #2563eb;
    font-size: 14px;
}

.flowcrm-license-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.flowcrm-mobility-grid {
    display: grid;
    grid-template-columns: minmax(360px, 1fr) minmax(280px, .8fr);
    gap: 12px;
}

.flowcrm-mobility-group {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 12px;
    border-radius: 8px;
    background: #f8fbff;
}

.flowcrm-driver-license-group {
    background: #f6faff;
}

.flowcrm-mobility-group-head {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #1e3a8a;
    font-size: 13px;
    font-weight: 700;
}

.flowcrm-mobility-group-head i {
    color: #2563eb;
    font-size: 14px;
}

.flowcrm-mobility-fields {
    display: grid;
    gap: 10px;
}

.flowcrm-commute-fields {
    display: grid;
    grid-template-columns: auto minmax(150px, 1fr);
    gap: 8px;
    align-items: center;
}

.flowcrm-care-fields,
.flowcrm-benefit-grid {
    display: grid;
    grid-template-columns: minmax(220px, .7fr) minmax(260px, 1fr);
    gap: 14px;
    align-items: end;
    padding: 12px;
    border: 1px solid #e3edfb;
    border-radius: 8px;
    background: #f8fbff;
}

.flowcrm-care-fields > div,
.flowcrm-benefit-grid > div {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 7px;
}

.flowcrm-driver-license-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.flowcrm-driver-license-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.flowcrm-license-class-option {
    margin: 0;
}

.flowcrm-license-class-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.flowcrm-license-class-option span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 43px;
    min-height: 32px;
    padding: 0 9px;
    border: 1px solid #d7e7ff;
    border-radius: 8px;
    background: #ffffff;
    color: #1e3a8a;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    user-select: none;
}

.flowcrm-license-class-option input:checked + span {
    border-color: #2563eb;
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 7px 16px rgba(37, 99, 235, .18);
}

.flowcrm-certificate-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.flowcrm-license-grid-certificates {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.flowcrm-license-row {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 12px;
    border: 1px solid #e3edfb;
    border-radius: 8px;
    background: #ffffff;
}

.flowcrm-license-grid > div:not(.flowcrm-license-row) {
    min-width: 0;
    padding: 9px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #ffffff;
}

.flowcrm-license-row label,
.flowcrm-license-grid > div > label {
    margin-bottom: 5px;
}

.flowcrm-license-row label {
    margin-bottom: 0;
    font-weight: 600;
}

.flowcrm-yes-no-group {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    width: 136px;
    height: 36px;
    padding: 3px;
    border: 1px solid #c9daf5;
    border-radius: 10px;
    background: #ffffff;
    gap: 3px;
}

.flowcrm-yes-no-option {
    display: flex;
    align-items: center;
    margin: 0;
}

.flowcrm-yes-no-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.flowcrm-yes-no-option span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    width: 100%;
    height: 28px;
    padding: 0 10px;
    border-radius: 8px;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
}

.flowcrm-yes-no-option input:checked + span {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(37, 99, 235, .12);
}

.flowcrm-yes-no-group.is-disabled {
    opacity: .55;
}

.flowcrm-yes-no-group.is-disabled .flowcrm-yes-no-option span {
    cursor: not-allowed;
}

.flowcrm-customer-state-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 36px;
    margin-left: auto;
}

.flowcrm-customer-state-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px 12px;
    border: 1px solid #d8e2f0;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    user-select: none;
}

.flowcrm-customer-state-pill.is-new {
    border-color: #fed7aa;
    background: #fff7ed;
    color: #9a3412;
}

.flowcrm-customer-state-pill.is-existing {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

body.darkmode .flowcrm-customer-state-pill {
    border-color: #334155;
    background: #111827;
    color: #cbd5e1;
}

body.darkmode .flowcrm-customer-state-pill.is-new {
    border-color: #7c2d12;
    background: #1f1308;
    color: #fdba74;
}

body.darkmode .flowcrm-customer-state-pill.is-existing {
    border-color: #14532d;
    background: #071b10;
    color: #86efac;
}

.flowcrm-customer-state-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px;
    border: 1px solid #d8e2f0;
    border-radius: 8px;
    background: #f8fafc;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
}

.flowcrm-customer-state-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 12px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #64748b;
    font-size: 12px;
    font-weight: 750;
    line-height: 1;
}

.flowcrm-customer-state-option:hover,
.flowcrm-customer-state-option:focus-visible {
    background: #eef6ff;
    color: #1d4ed8;
    outline: none;
}

.flowcrm-customer-state-option.is-active.is-new {
    background: #fff7ed;
    color: #9a3412;
    box-shadow: inset 0 0 0 1px #fed7aa;
}

.flowcrm-customer-state-option.is-active.is-existing {
    background: #f0fdf4;
    color: #166534;
    box-shadow: inset 0 0 0 1px #bbf7d0;
}

.flowcrm-company-relation-card {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 12px;
    padding: 12px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #f8fbff;
}

.flowcrm-company-relation-column {
    display: grid;
    align-content: start;
    gap: 10px;
    min-width: 0;
}

.flowcrm-company-relation-title {
    color: #1e3a8a;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
}

.flowcrm-company-switch-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 9px 10px;
    border: 1px solid #dbe7f5;
    border-radius: 8px;
    background: #ffffff;
}

.flowcrm-company-switch-row .form-check-input {
    flex: 0 0 auto;
    margin: 0;
}

.flowcrm-company-switch-row span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.flowcrm-company-switch-row strong {
    color: #0f172a;
    font-size: 13px;
    line-height: 1.15;
}

.flowcrm-company-switch-row small {
    color: #64748b;
    font-size: 11px;
    line-height: 1.2;
}

.flowcrm-kpb-picker {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.flowcrm-kpb-picker .card-action-btn {
    min-height: 38px !important;
    white-space: nowrap;
}

.flowcrm-kpb-selected-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 24px;
    margin-top: 7px;
}

.flowcrm-kpb-selected-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 24px;
    padding: 3px 5px 3px 8px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 750;
    line-height: 1;
}

.flowcrm-kpb-selected-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    min-height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 10px;
    font-weight: 900;
}

.flowcrm-kpb-selected-pill button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #2563eb;
}

.flowcrm-kpb-selected-pill button:hover,
.flowcrm-kpb-selected-pill button:focus-visible {
    background: #dbeafe;
    color: #1e40af;
    outline: none;
}

.flowcrm-kpb-empty {
    color: #64748b;
    font-size: 11px;
    line-height: 24px;
}

body.darkmode .flowcrm-customer-state-toggle {
    border-color: #334155;
    background: #111827;
    box-shadow: 0 10px 22px rgba(0, 0, 0, .16);
}

body.darkmode .flowcrm-customer-state-option {
    color: #94a3b8;
}

body.darkmode .flowcrm-customer-state-option:hover,
body.darkmode .flowcrm-customer-state-option:focus-visible {
    background: #172554;
    color: #bfdbfe;
}

body.darkmode .flowcrm-customer-state-option.is-active.is-new {
    background: #1f1308;
    color: #fdba74;
    box-shadow: inset 0 0 0 1px #7c2d12;
}

body.darkmode .flowcrm-customer-state-option.is-active.is-existing {
    background: #071b10;
    color: #86efac;
    box-shadow: inset 0 0 0 1px #14532d;
}

body.darkmode .flowcrm-company-relation-card {
    border-color: #334155;
    background: #111827;
}

body.darkmode .flowcrm-company-relation-title {
    color: #93c5fd;
}

body.darkmode .flowcrm-company-switch-row {
    border-color: #334155;
    background: #172036;
}

body.darkmode .flowcrm-company-switch-row strong {
    color: #e5e7eb;
}

body.darkmode .flowcrm-company-switch-row small {
    color: #94a3b8;
}

body.darkmode .flowcrm-kpb-selected-pill {
    border-color: #1d4ed8;
    background: #172554;
    color: #bfdbfe;
}

body.darkmode .flowcrm-kpb-selected-code {
    background: #1e3a8a;
    color: #dbeafe;
}

body.darkmode .flowcrm-kpb-selected-pill button {
    color: #bfdbfe;
}

body.darkmode .flowcrm-kpb-selected-pill button:hover,
body.darkmode .flowcrm-kpb-selected-pill button:focus-visible {
    background: #1e3a8a;
    color: #ffffff;
}

body.darkmode .flowcrm-kpb-empty {
    color: #94a3b8;
}

.flowcrm-muted-control:disabled {
    background: #f1f5f9;
    border-color: #d8e2f0;
    color: #8b9bb0;
    cursor: not-allowed;
    opacity: 1;
}

body.darkmode .flowcrm-muted-control:disabled {
    background: #111827;
    border-color: #334155;
    color: #64748b;
}

.flowcrm-company-link-hint {
    margin-top: 5px;
    color: #64748b;
    font-size: 11px;
    line-height: 1.35;
}

.flowcrm-company-link-hint.is-linked {
    color: #166534;
}

.flowcrm-company-link-hint.is-unresolved {
    color: #9a3412;
}

.betrieb-relationship-line {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 22px;
    margin-top: 5px;
    color: #64748b;
    font-size: 11px;
}

.betrieb-relationship-line > span:first-child {
    color: #475569;
    font-weight: 700;
}

.betrieb-relationship-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
    padding: 0 6px;
    border: 1px solid #d8e2f0;
    border-radius: 999px;
    background: #f8fafc;
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
}

.flowcrm-company-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 22px;
    padding: 0 7px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 750;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

button.flowcrm-company-link {
    cursor: pointer;
}

.flowcrm-company-link:hover,
.flowcrm-company-link:focus-visible {
    border-color: #93c5fd;
    background: #dbeafe;
    color: #1d4ed8;
    text-decoration: none;
    transform: none;
}

.flowcrm-company-link.is-unresolved {
    border-color: #fed7aa;
    background: #fff7ed;
    color: #9a3412;
}

.flowcrm-company-link.is-compact {
    min-height: 20px;
    padding: 0 6px;
    font-size: 10px;
}

.flowcrm-company-relationships {
    display: grid;
    gap: 7px;
    margin-top: 10px;
    padding: 9px 10px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #f8fbff;
}

.flowcrm-company-link-row {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
}

.flowcrm-company-link-row > span:first-child {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.flowcrm-company-link-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}

body.darkmode .flowcrm-company-link-hint {
    color: #cbd5e1;
}

body.darkmode .flowcrm-company-link-hint.is-linked {
    color: #86efac;
}

body.darkmode .flowcrm-company-link-hint.is-unresolved {
    color: #fdba74;
}

body.darkmode .betrieb-relationship-line,
body.darkmode .betrieb-relationship-line > span:first-child {
    color: #cbd5e1;
}

body.darkmode .betrieb-relationship-more {
    border-color: #334155;
    background: #111827;
    color: #cbd5e1;
}

body.darkmode .flowcrm-company-link {
    border-color: #1d4ed8;
    background: #172554;
    color: #bfdbfe;
}

body.darkmode .flowcrm-company-link:hover,
body.darkmode .flowcrm-company-link:focus-visible {
    border-color: #60a5fa;
    background: #1e3a8a;
    color: #dbeafe;
}

body.darkmode .flowcrm-company-link.is-unresolved {
    border-color: #7c2d12;
    background: #1f1308;
    color: #fdba74;
}

body.darkmode .flowcrm-company-relationships {
    border-color: #334155;
    background: #111827;
}

body.darkmode .flowcrm-company-link-row > span:first-child {
    color: #cbd5e1;
}

.flowcrm-case-detail-grid {
    display: grid;
    grid-template-columns: minmax(420px, .95fr) minmax(0, 1.05fr);
    gap: 14px;
    align-items: start;
    margin-top: 14px;
}

.flowcrm-case-main-stack,
.flowcrm-case-side-stack {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.flowcrm-case-workflow {
    grid-template-columns: minmax(300px, .9fr) minmax(0, 1.35fr);
    align-items: start;
}

.flowcrm-case-fields,
.flowcrm-case-history {
    display: grid;
    gap: 12px;
}

.flowcrm-case-fields {
    padding: 12px;
    border: 1px solid #dbe5f2;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
}

.flowcrm-case-history {
    padding: 12px;
    border: 1px solid #dbe5f2;
    border-radius: 8px;
    background: #fbfdff;
}

.flowcrm-quick-action {
    display: grid;
    grid-template-columns: minmax(170px, .55fr) minmax(0, 1.45fr);
    gap: 12px;
    align-items: end;
    margin-top: 14px;
    padding: 12px;
    border: 1px solid #c7dbf7;
    border-radius: 8px;
    background: linear-gradient(135deg, #eef6ff 0%, #f8fbff 100%);
}

.flowcrm-quick-action.is-editing {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.flowcrm-quick-grid {
    display: grid;
    grid-template-columns: minmax(128px, .75fr) 128px 136px minmax(190px, 1.35fr) minmax(132px, auto);
    gap: 8px;
    align-items: end;
    min-width: 0;
}

.flowcrm-quick-grid .form-control,
.flowcrm-quick-grid .form-select {
    min-height: 38px;
    border-radius: 7px;
    font-size: 13px;
}

.flowcrm-duration-stepper {
    width: 136px;
    min-height: 38px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid #cddbf0;
    border-radius: 7px;
    background: #fff;
}

.flowcrm-duration-stepper-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: #f8fbff;
    color: #2563eb;
    font-size: 16px;
    line-height: 1;
    transition: background .15s, color .15s;
}

.flowcrm-duration-stepper-btn:first-of-type {
    border-right: 1px solid #e2e8f0;
}

.flowcrm-duration-stepper-btn:last-of-type {
    border-left: 1px solid #e2e8f0;
}

.flowcrm-duration-stepper-btn:hover,
.flowcrm-duration-stepper-btn:focus-visible {
    background: #eff6ff;
    color: #1d4ed8;
    outline: 0;
}

.flowcrm-duration-stepper-value {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    color: #0f172a;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.flowcrm-duration-stepper-value:focus-visible {
    outline: 2px solid rgba(37, 99, 235, .35);
    outline-offset: -2px;
}

.flowcrm-dossier {
    scroll-margin-top: 96px;
    margin-top: 0;
    padding: 0;
    border: 1px solid #c5d7f4;
    border-left: 4px solid #2563eb;
    border-radius: 8px;
    background: linear-gradient(180deg, #f8fbff 0, #ffffff 72%);
    box-shadow: 0 10px 24px rgba(37, 99, 235, .075);
    overflow: hidden;
}

.flowcrm-quick-action + .flowcrm-participant-profile {

    margin-top: 12px;

}

.flowcrm-dossier > .flowcrm-section-head {
    padding: 13px 15px;
    border-bottom: 1px solid #dbeafe;
    background: #edf6ff;
}

.flowcrm-dossier-title {
    font-size: 17px;
    font-family: var(--fd-font-main);
    font-weight: 700;
}

.flowcrm-dossier-grid,
.flowcrm-dossier > .flowcrm-finance-box,
.flowcrm-documents-box,
.flowcrm-related-cases,
.flowcrm-company-contacts {
    margin-left: 14px;
    margin-right: 14px;
}

.flowcrm-dossier-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(110px, .45fr);
    gap: 10px;
    margin-top: 12px;
}

.flowcrm-profile-grid {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(180px, 1.25fr) minmax(84px, .45fr);
    gap: 8px;
    margin: 12px 14px 14px;
}

.flowcrm-profile-item {
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #ffffff;
}

.flowcrm-profile-item .flowcrm-dossier-text {
    overflow-wrap: anywhere;
}

.flowcrm-dossier-text {
    margin-top: 6px;
    color: var(--fd-text);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.35;
}

.flowcrm-dossier-text span {
    color: var(--fd-muted);
    font-weight: 500;
}

.flowcrm-documents-box {
    margin-top: 12px;
    padding: 10px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #ffffff;
}

.flowcrm-participant-dossier {
    scroll-margin-top: 96px;
    border-left-color: #4f46e5;
    background: linear-gradient(180deg, #f8f7ff 0, #ffffff 72%);
}

.flowcrm-participant-dossier > .flowcrm-section-head {
    border-bottom-color: #ddd6fe;
    background: #f3f1ff;
}

.flowcrm-missing-documents-panel {
    margin-top: 12px;
    border-color: #fed7aa;
    border-left-color: #fb923c;
    background: linear-gradient(180deg, #fff7ed 0, #ffffff 72%);
}

.flowcrm-missing-documents-panel > .flowcrm-section-head {
    border-bottom-color: #fed7aa;
    background: #fff7ed;
}

.flowcrm-missing-documents-panel > summary.flowcrm-section-head {
    cursor: pointer;
    list-style: none;
}

.flowcrm-missing-documents-panel > summary.flowcrm-section-head::-webkit-details-marker {
    display: none;
}

.flowcrm-missing-documents-panel > summary.flowcrm-section-head i {
    transition: transform .15s ease;
}

.flowcrm-missing-documents-panel[open] > summary.flowcrm-section-head i {
    transform: rotate(180deg);
}

.flowcrm-case-participant-missing-panel {
    margin: 10px 14px 14px;
    overflow: hidden;
    border: 1px solid #dbe5f0;
    border-left: 3px solid #f59e0b;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .04);
}

.flowcrm-case-participant-missing-panel > summary.flowcrm-section-head {
    min-height: 58px;
    padding: 10px 12px;
    border-bottom: 0;
    background: linear-gradient(90deg, #fff7ed 0, #ffffff 72%);
}

.flowcrm-case-participant-missing-panel[open] > summary.flowcrm-section-head {
    border-bottom: 1px solid #fde68a;
}

.flowcrm-missing-summary-title {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 10px;
}

.flowcrm-missing-summary-icon {
    display: inline-grid;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 8px;
    background: #ffedd5;
    color: #c2410c;
    font-size: 16px;
}

.flowcrm-missing-summary-title > div {
    min-width: 0;
}

.flowcrm-missing-combined-body {
    display: grid;
    gap: 10px;
    margin: 12px 14px 14px;
}

.flowcrm-missing-subsection {
    min-width: 0;
    padding: 10px;
    border: 1px solid #fde68a;
    border-radius: 8px;
    background: #ffffff;
}

.flowcrm-missing-subsection-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    color: #111827;
    font-size: 13px;
    font-weight: 800;
}

.flowcrm-missing-subsection-head .flowcrm-muted {
    font-size: 12px;
    font-weight: 650;
    text-align: right;
}

.flowcrm-missing-documents-body {
    display: grid;
    gap: 8px;
}

.flowcrm-missing-documents-body .missing-document-group {
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid #fde68a;
    border-radius: 8px;
    background: #ffffff;
}

.flowcrm-missing-documents-body .missing-document-group-head {
    min-height: 40px;
    margin: 0;
    padding: 9px 10px;
    cursor: pointer;
    list-style: none;
}

.flowcrm-missing-documents-body .missing-document-group-head::-webkit-details-marker {
    display: none;
}

.flowcrm-missing-documents-body .missing-document-group-body {
    padding: 0 10px 8px;
}

.flowcrm-participant-dossier-head .flowcrm-documents-head {
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
}

.flowcrm-participant-dossier-head .flowcrm-dossier-action-btn {
    flex: 0 0 auto;
}

.flowcrm-documents-head {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
}

.flowcrm-documents-head i {
    flex: 0 0 auto;
    margin-top: 3px;
    color: #2563eb;
    transition: transform .14s ease;
}

.flowcrm-documents-head[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.flowcrm-documents-body {
    display: grid;
    gap: 9px;
    margin-top: 10px;
}

.flowcrm-documents-body[hidden] {
    display: none;
}

.flowcrm-participant-dossier-body {
    gap: 12px;
    margin: 12px 14px 14px;
}

.flowcrm-profile-grid.is-compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
}

.flowcrm-participant-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.flowcrm-participant-summary-grid > div {
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #ffffff;
}

.flowcrm-documents-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(146px, 1fr));
    gap: 8px;
}

.flowcrm-documents-actions .card-action-btn {
    width: 100%;
    min-width: 0;
}

.flowcrm-related-cases,
.flowcrm-company-contacts {
    margin-top: 12px;
    margin-bottom: 14px;
}

.flowcrm-related-cases {
    padding: 10px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #f7fbff;
}

.flowcrm-related-list {
    margin-top: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.flowcrm-mini-list {
    display: grid;
    gap: 7px;
}

.flowcrm-contact-mini-list {
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    align-items: start;
}

.flowcrm-mini-item {
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 10px;
    border: 1px solid #dbe5f2;
    border-radius: 8px;
    background: #ffffff;
    color: inherit;
    text-align: left;
}

.flowcrm-mini-item > * {
    min-width: 0;
}

.flowcrm-mini-button {
    transition: border-color .14s ease, background .14s ease;
}

.flowcrm-mini-button:hover,
.flowcrm-mini-button:focus-visible {
    border-color: #b8cff8;
    background: #f8fbff;
}

.flowcrm-related-case-row {
    align-items: center;
    padding: 0;
    gap: 6px;
}

.flowcrm-related-open {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    text-align: left;
}

.flowcrm-unlink-company-btn {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    margin-right: 6px;
}

.flowcrm-mini-title {
    color: var(--fd-text);
    font-size: 13px;
    font-family: var(--fd-font-main);
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.flowcrm-mini-meta {
    flex: 0 1 auto;
    min-width: 0;
    color: var(--fd-muted);
    font-size: 12px;
    line-height: 1.35;
    text-align: right;
    overflow-wrap: anywhere;
}

.flowcrm-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.flowcrm-case-state-block {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) minmax(150px, .78fr);
    gap: 10px;
    padding: 12px;
    border: 1px solid #bfdbfe;
    border-left: 4px solid #2563eb;
    border-radius: 8px;
    background: linear-gradient(135deg, #eff6ff 0%, #f8fbff 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75);
}

.flowcrm-case-state-block label {
    color: #1e3a8a;
}

.flowcrm-measure-goal-block {
    grid-template-columns: 1fr;
    padding: 10px 12px;
}

.flowcrm-measure-goal-row,
.flowcrm-measure-goal-options {
    display: flex;
    align-items: center;
    gap: 14px;
}

.flowcrm-measure-goal-row {
    flex-wrap: wrap;
}

.flowcrm-measure-goal-options {
    gap: 12px;
}

.flowcrm-measure-goal-options .form-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 0;
    padding-left: 0;
}

.flowcrm-measure-goal-options .form-check-input {
    float: none;
    margin: 0;
}

.flowcrm-case-problem-block {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid #bfdbfe;
    border-left: 4px solid #60a5fa;
    border-radius: 8px;
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
}

.flowcrm-problem-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: #1e40af;
    font-weight: 700;
    text-align: left;
}

.flowcrm-problem-toggle > span:first-child i {
    color: #60a5fa;
    font-size: 15px;
}

.flowcrm-problem-toggle span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.flowcrm-problem-toggle-meta {
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}

.flowcrm-problem-toggle[aria-expanded="true"] .bi-chevron-down {
    transform: rotate(180deg);
}

.flowcrm-problem-toggle .bi-chevron-down {
    transition: transform .16s ease;
}

.flowcrm-problem-body {
    display: grid;
    gap: 12px;
    padding-top: 2px;
}

.flowcrm-problem-choice-panel {
    padding: 8px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: rgba(255, 255, 255, .72);
}

.flowcrm-problem-area-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(170px, 1fr));
    gap: 6px 10px;
}

.flowcrm-problem-area-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 0;
    margin: 0;
    padding: 6px 8px;
    border-radius: 6px;
    color: #1e293b;
    font-weight: 600;
}

.flowcrm-problem-area-option:hover {
    background: #eff6ff;
}

.flowcrm-problem-area-option .form-check-input {
    float: none;
    margin: 0;
}

.flowcrm-problem-note-panel {
    display: grid;
    gap: 6px;
}

.flowcrm-problem-note-panel label {
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

.flowcrm-autogrow-textarea {
    min-height: 40px;
    overflow-y: hidden;
    resize: none;
}

.flowcrm-workbook-create-section {
    border-color: #bfdbfe;
}

.flowcrm-workbook-state-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 10px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
}

.flowcrm-workbook-create-grid {
    display: grid;
    grid-template-columns: minmax(240px, 1.5fr) minmax(180px, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.flowcrm-workbook-company-field,
.flowcrm-workbook-note-field {
    min-width: 0;
}

.flowcrm-person-row-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(118px, 1fr));
    gap: 10px;
}

.flowcrm-editable-field {
    position: relative;
    min-width: 0;
}

.flowcrm-editable-field .form-control {
    padding-right: 42px;
}

.flowcrm-editable-field .form-control[readonly] {
    background: #f8fbff;
    color: #334155;
}

.flowcrm-field-edit-btn {
    position: absolute;
    top: 50%;
    right: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    color: #2563eb;
    transform: translateY(-50%);
}

.flowcrm-field-edit-btn:hover,
.flowcrm-field-edit-btn:focus-visible,
.flowcrm-editable-field.is-editing .flowcrm-field-edit-btn {
    border-color: #bfdbfe;
    background: #eff6ff;
    outline: none;
}

.flowcrm-editable-field.is-editing .form-control {
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .10);
}

.flowcrm-migration-grid {
    display: grid;
    grid-template-columns: minmax(220px, .85fr) minmax(280px, 1fr) minmax(300px, 1.1fr) minmax(220px, .8fr);
    gap: 12px;
}

.flowcrm-migration-card {
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--fd-border);
    border-radius: 8px;
    background: #fbfcfe;
}

.flowcrm-field-stack {
    display: grid;
    gap: 9px;
}

.flowcrm-migration-status {
    padding: 9px 10px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 13px;
    line-height: 1.35;
}

.flowcrm-migration-list {
    display: grid;
    gap: 7px;
    max-height: 320px;
    overflow: auto;
}

.flowcrm-migration-item {
    display: grid;
    gap: 2px;
    padding: 8px 9px;
    border: 1px solid var(--fd-border);
    border-radius: 8px;
    background: #fff;
}

.flowcrm-migration-name {
    color: var(--fd-text);
    font-size: 13px;
    font-weight: 750;
    line-height: 1.25;
}

.flowcrm-checkline {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #263246;
    font-size: 13px;
    font-weight: 600;
}

.flowcrm-section-head,
.flowcrm-contact-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.flowcrm-contact-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.flowcrm-contact-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.flowcrm-contact-list {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.flowcrm-contact-card {
    padding: 12px;
    border: 1px solid #dbe5f2;
    border-radius: 8px;
    background: #fbfdff;
}

.flowcrm-contact-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.flowcrm-contact-mail {
    grid-column: span 2;
}

.flowcrm-detail label {
    display: block;
    margin-bottom: 5px;
    color: #263246;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.32;
}

.flowcrm-detail .form-control,
.flowcrm-detail .form-select {
    min-height: 38px;
    border-radius: 7px;
    font-size: 13px;
}

.flowcrm-timeline {
    display: grid;
    gap: 12px;
}

.flowcrm-timeline-group {
    display: grid;
    gap: 7px;
}

.flowcrm-timeline-group-title {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

.flowcrm-timeline-group-items {
    display: grid;
    gap: 8px;
}

.flowcrm-timeline-item {
    position: relative;
    padding: 10px 11px 10px 14px;
    border: 1px solid #dbe5f2;
    border-left: 3px solid #bfdbfe;
    border-radius: 8px;
    background: #ffffff;
}

.flowcrm-timeline-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--fd-text);
    font-size: 13px;
    font-family: var(--fd-font-main);
    font-weight: 700;
}

.flowcrm-timeline-title-meta {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    min-width: 0;
    color: var(--fd-muted);
    font-weight: 600;
    white-space: nowrap;
}

.flowcrm-timeline-actions {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.flowcrm-timeline-action {
    width: 23px;
    height: 23px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #64748b;
    font-size: 12px;
    line-height: 1;
}

.flowcrm-timeline-action:hover,
.flowcrm-timeline-action:focus-visible {
    background: #eff6ff;
    color: #2563eb;
}

.flowcrm-timeline-action.is-danger:hover,
.flowcrm-timeline-action.is-danger:focus-visible {
    background: #fee2e2;
    color: #dc2626;
}

.flowcrm-timeline-item.is-phase-abbruch,
.flowcrm-timeline-item.is-phase-absage {
    border-left-color: #ef4444;
}

.flowcrm-timeline-item.is-phase-ubernahme {
    border-left-color: #22c55e;
}

.flowcrm-timeline-item.is-phase-zeitablauf {
    border-left-color: #f59e0b;
}

.flowcrm-timeline-item.is-phase-arbeitspapiere,
.flowcrm-timeline-item.is-phase-uberlassung {
    border-left-color: #fb923c;
}

.flowcrm-timeline-item.is-phase-bewerbung,
.flowcrm-timeline-item.is-phase-vorstellungsgesprach,
.flowcrm-timeline-item.is-phase-arbeitserprobung {
    border-left-color: #3b82f6;
}

.flowcrm-empty {
    padding: 16px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    color: var(--fd-muted);
    font-size: 13px;
    text-align: center;
}

.flowcrm-empty.is-compact {
    padding: 10px 12px;
    text-align: left;
}

#flowCrmCompanyModal .modal-content,
#flowCrmSettingsModal .modal-content,
#flowCrmMigrationModal .modal-content,
#flowCrmConfirmDeleteModal .modal-content {
    display: flex;
    max-height: calc(100vh - 3rem);
    overflow: hidden;
}

#flowCrmCompanyModal .modal-body,
#flowCrmSettingsModal .modal-body,
#flowCrmMigrationModal .modal-body,
#flowCrmConfirmDeleteModal .modal-body {
    min-height: 0;
    overflow: auto;
}

#flowCrmCompanyModal .modal-header,
#flowCrmCompanyModal .modal-footer,
#flowCrmSettingsModal .modal-header,
#flowCrmSettingsModal .modal-footer,
#flowCrmMigrationModal .modal-header,
#flowCrmMigrationModal .modal-footer,
#flowCrmConfirmDeleteModal .modal-header,
#flowCrmConfirmDeleteModal .modal-footer {
    flex: 0 0 auto;
}

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

.flowcrm-confirm-modal .modal-header,
.flowcrm-confirm-modal .modal-footer {
    border-color: #e2e8f0;
}

.flowcrm-confirm-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #fee2e2;
    color: #dc2626;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    font-size: 19px;
}

.flowcrm-confirm-text {
    padding: 12px 13px;
    border: 1px solid #fee2e2;
    border-radius: 8px;
    background: #fff7f7;
    color: #7f1d1d;
    font-size: 13px;
    line-height: 1.4;
}

body.darkmode .flowcrm-kpi,
body.darkmode .flowcrm-case-row,
body.darkmode .flowcrm-contact-card,
body.darkmode .flowcrm-quick-action,
body.darkmode .flowcrm-dossier,
body.darkmode .flowcrm-finance-box,
body.darkmode .flowcrm-finance-form-card,
body.darkmode .flowcrm-case-fields,
body.darkmode .flowcrm-case-history,
body.darkmode .flowcrm-documents-box,
body.darkmode .flowcrm-participant-dossier,
body.darkmode .flowcrm-participant-summary-grid > div,
body.darkmode .flowcrm-form-section,
body.darkmode .flowcrm-participant-skill-box,
body.darkmode .flowcrm-skills-box,
body.darkmode .flowcrm-profile-item,
body.darkmode .flowcrm-related-cases,
body.darkmode .flowcrm-mini-item,
body.darkmode .flowcrm-migration-card,
body.darkmode .flowcrm-migration-item,
body.darkmode .flowcrm-timeline-item {
    background: #111827;
    border-color: #334155;
}

body.darkmode .flowcrm-finance-box.is-active {
    background: #241b3a;
    border-color: #6d28d9;
}

body.darkmode .flowcrm-case-state-block {
    border-color: #1d4ed8;
    border-left-color: #60a5fa;
    background: linear-gradient(135deg, #0f1f3a 0%, #111827 100%);
}

body.darkmode .flowcrm-case-state-block label {
    color: #bfdbfe;
}

body.darkmode .flowcrm-dossier {
    border-color: #1d4ed8;
    background: #111827;
    box-shadow: none;
}

body.darkmode .flowcrm-case-detail-head {
    border-color: #334155;
    background: rgba(15, 23, 42, .96);
    box-shadow: 0 12px 26px rgba(0, 0, 0, .28);
}

body.darkmode .flowcrm-case-action-rail {
    background: transparent;
}

body.darkmode .flowcrm-participant-dossier {
    border-left-color: #818cf8;
    background: #111827;
}

body.darkmode .flowcrm-participant-dossier > .flowcrm-section-head {
    border-bottom-color: #312e81;
    background: #1b1f3a;
}

body.darkmode .flowcrm-dossier > .flowcrm-section-head {
    border-bottom-color: #1e3a8a;
    background: #172036;
}

body.darkmode .flowcrm-case-row:hover,
body.darkmode .flowcrm-case-row:focus-visible,
body.darkmode .flowcrm-case-row.is-active {
    background: #172036;
    border-color: #3b82f6;
}

body.darkmode .flowcrm-case-company,
body.darkmode .flowcrm-detail label,
body.darkmode .flowcrm-checkline {
    color: #cbd5e1;
}

body.darkmode .flowcrm-phase,
body.darkmode .flowcrm-pill.is-muted {
    background: #172036;
    border-color: #334155;
    color: #cbd5e1;
}

body.darkmode .flowcrm-duration-stepper {
    border-color: #334155;
    background: #172036;
}

body.darkmode .flowcrm-duration-stepper-btn {
    background: #111827;
    color: #93c5fd;
}

body.darkmode .flowcrm-duration-stepper-btn:first-of-type,
body.darkmode .flowcrm-duration-stepper-btn:last-of-type {
    border-color: #334155;
}

body.darkmode .flowcrm-form-section summary,
body.darkmode .flowcrm-form-section-head {
    background: #111827;
}

body.darkmode .flowcrm-form-section summary i {
    color: #93c5fd;
}

body.darkmode .flowcrm-editable-field .form-control[readonly] {
    background: #172036;
    color: #e5e7eb;
}

body.darkmode .flowcrm-field-edit-btn {
    color: #93c5fd;
}

body.darkmode .flowcrm-field-edit-btn:hover,
body.darkmode .flowcrm-field-edit-btn:focus-visible,
body.darkmode .flowcrm-editable-field.is-editing .flowcrm-field-edit-btn {
    border-color: #1d4ed8;
    background: #172554;
}

body.darkmode .flowcrm-editable-field.is-editing .form-control {
    border-color: #60a5fa;
    background: #0f172a;
}

body.darkmode .flowcrm-yes-no-group {
    background: #111827;
    border-color: #334155;
}

body.darkmode .flowcrm-care-fields,
body.darkmode .flowcrm-benefit-grid {
    background: #111827;
    border-color: #334155;
}

body.darkmode .flowcrm-skill-box-head {
    color: #bfdbfe;
}

body.darkmode .flowcrm-skill-box-head i {
    background: #172554;
    color: #93c5fd;
}

body.darkmode .flowcrm-mobility-group,
body.darkmode .flowcrm-driver-license-group {
    background: #111827;
}

body.darkmode .flowcrm-mobility-group-head {
    color: #bfdbfe;
}

body.darkmode .flowcrm-mobility-group-head i {
    color: #93c5fd;
}

body.darkmode .flowcrm-license-row {
    background: #0f172a;
    border-color: #334155;
}

body.darkmode .flowcrm-license-class-option span {
    border-color: #334155;
    background: #0f172a;
    color: #cbd5e1;
}

body.darkmode .flowcrm-license-class-option input:checked + span {
    border-color: #3b82f6;
    background: #3b82f6;
    color: #ffffff;
}

body.darkmode .flowcrm-license-grid > div:not(.flowcrm-license-row) {
    background: #0f172a;
    border-color: #334155;
}

body.darkmode .flowcrm-yes-no-option span {
    color: #cbd5e1;
}

body.darkmode .flowcrm-yes-no-option input:checked + span {
    background: #3b82f6;
    color: #ffffff;
}

body.darkmode .flowcrm-duration-stepper-value {
    color: #f8fafc;
}

body.darkmode .flowcrm-detail-head.is-participant-detail {
    background: #172036;
    border-color: #334155;
    border-left-color: #3b82f6;
}

body.darkmode .flowcrm-confirm-modal {
    background: #172036;
    border-color: #334155;
}

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

body.darkmode .flowcrm-confirm-text {
    background: rgba(127, 29, 29, .24);
    border-color: #7f1d1d;
    color: #fecaca;
}

@media (max-width: 1650px) {
    .flowcrm-quick-action {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .flowcrm-quick-grid {
        grid-template-columns: minmax(140px, 1fr) minmax(132px, .65fr) 136px;
    }

    .flowcrm-quick-grid .flowcrm-note-input {
        grid-column: 1 / -1;
    }

    .flowcrm-quick-grid .card-action-btn {
        grid-column: 1 / -1;
        width: 100%;
    }
}

@media (max-width: 1250px) {
    .flowcrm-header-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .flowcrm-header-actions {
        width: 100%;
    }

    .flowcrm-header-actions .card-action-btn {
        flex: 1 1 180px;
        min-width: 180px;
    }

    .flowcrm-panel-head {
        align-items: stretch;
        flex-direction: column;
    }

    .flowcrm-detail-actions {
        width: 100%;
        justify-content: stretch;
    }

    .flowcrm-case-detail-head {
        position: static;
    }

    .flowcrm-case-action-rail {
        width: auto;
        max-width: none;
        justify-content: flex-end;
    }

    .flowcrm-detail-actions .card-action-btn {
        flex: 1 1 174px;
    }

    .flowcrm-case-action-rail .card-action-btn {
        flex: 0 0 38px;
        width: 38px;
        min-width: 38px;
    }

    .flowcrm-close-menu {
        flex: 1 1 174px;
    }

    .flowcrm-view-switch {
        width: 100%;
    }

    .flowcrm-filter-grid,
    .flowcrm-advanced-filter-grid,
    .flowcrm-quick-action,
    .flowcrm-case-detail-grid,
    .flowcrm-case-workflow,
    .flowcrm-profile-grid.is-compact,
    .flowcrm-participant-summary-grid,
    .flowcrm-person-row-grid,
    .flowcrm-mobility-grid,
    .flowcrm-certificate-grid,
    .flowcrm-license-grid,
    .flowcrm-related-list,
    .flowcrm-contact-mini-list,
    .flowcrm-migration-grid,
    .flowcrm-layout {
        grid-template-columns: 1fr;
    }

    .flowcrm-quick-grid {
        grid-template-columns: minmax(140px, 1fr) minmax(132px, .65fr);
    }

    .flowcrm-duration-stepper {
        width: 100%;
    }

    .flowcrm-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1500px) {
    .flowcrm-filter-grid {
        grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(132px, 1fr));
    }

    .flowcrm-case-detail-grid {
        grid-template-columns: 1fr;
    }

    .flowcrm-case-side-stack {
        min-width: 0;
    }

    .flowcrm-dossier-grid {
        grid-template-columns: repeat(3, minmax(140px, 1fr));
    }

    .flowcrm-contact-mini-list {
        grid-template-columns: 1fr;
    }

    .flowcrm-quick-action {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .flowcrm-quick-grid {
        grid-template-columns: minmax(128px, .8fr) 150px 136px minmax(220px, 1.2fr);
    }

    .flowcrm-quick-grid .card-action-btn {
        grid-column: 1 / -1;
        justify-self: start;
        width: min(220px, 100%);
    }
}

@media (max-width: 1100px) {
    .flowcrm-filter-card,
    .flowcrm-list-card,
    .flowcrm-detail-card {
        padding: 10px;
    }

    .flowcrm-filter-grid {
        grid-template-columns: 1fr;
    }

    .flowcrm-filter-card .modern-search {
        grid-column: auto;
    }

    .flowcrm-kpi-grid {
        grid-template-columns: 1fr;
    }

    .flowcrm-detail-head,
    .flowcrm-case-detail-head {
        display: grid;
        grid-template-columns: 1fr;
    }

    .flowcrm-detail-actions,
    .flowcrm-case-action-rail {
        justify-content: flex-start;
        width: 100%;
    }

    .flowcrm-quick-grid {
        grid-template-columns: 1fr;
    }

    .flowcrm-appointment-grid {
        grid-template-columns: 1fr 1fr;
    }

    .flowcrm-appointment-note-field,
    .flowcrm-appointment-grid .card-action-btn {
        grid-column: 1 / -1;
    }

    .flowcrm-workbook-state-strip {
        grid-template-columns: 1fr;
    }

    .flowcrm-workbook-create-grid {
        grid-template-columns: 1fr;
    }

    .flowcrm-quick-grid .flowcrm-note-input,
    .flowcrm-quick-grid .card-action-btn {
        grid-column: auto;
    }

    .flowcrm-duration-stepper {
        width: 100%;
    }
}

@media (max-width: 700px) {
    .flowcrm-module,
    .flowcrm-header-card,
    .flowcrm-detail,
    .flowcrm-detail-card,
    .flowcrm-detail-head,
    .flowcrm-case-detail-head,
    .flowcrm-case-identity,
    .flowcrm-detail-meta,
    .flowcrm-pill-row,
    .flowcrm-detail-actions,
    .flowcrm-case-action-rail,
    .flowcrm-quick-action,
    .flowcrm-quick-grid {
        min-width: 0;
        max-width: 100%;
    }

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

    .flowcrm-header-main {
        flex: 1 1 auto;
        width: 100%;
        max-width: 100%;
    }

    .flowcrm-header-actions {
        flex: 1 1 auto;
        width: 100%;
        max-width: 100%;
        justify-content: stretch;
    }

    .flowcrm-header-actions .card-action-btn {
        flex: 1 1 100%;
        max-width: 100%;
        min-width: 0;
        width: 100%;
    }

    .flowcrm-detail-head,
    .flowcrm-case-detail-head {
        grid-template-columns: minmax(0, 1fr);
        overflow-wrap: anywhere;
    }

    .flowcrm-case-action-rail {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .flowcrm-case-action-rail .card-action-btn {
        flex: 0 0 38px;
    }

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

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

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

    #flowCrmCompanyModal .modal-header {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    #flowCrmCompanyModal .flowcrm-customer-state-row {
        order: 3;
        justify-content: flex-start;
        width: 100%;
        margin-left: 0;
    }

    .flowcrm-filter-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .flowcrm-filter-toggle {
        width: 100% !important;
    }

    .flowcrm-filter-chips {
        justify-content: flex-start;
    }

    .flowcrm-header-main {
        align-items: flex-start;
    }

    .flowcrm-title {
        font-size: 21px;
    }

    .flowcrm-kpi-grid,
    .flowcrm-quick-grid,
    .flowcrm-dossier-grid,
    .flowcrm-profile-grid,
    .flowcrm-company-relation-card,
    .flowcrm-case-state-block,
    .flowcrm-field-grid,
    .flowcrm-problem-area-grid,
    .flowcrm-kpb-picker,
    .flowcrm-person-row-grid,
    .flowcrm-appointment-grid,
    .flowcrm-contact-grid {
        grid-template-columns: 1fr;
    }

    .flowcrm-contact-mail {
        grid-column: auto;
    }

    .flowcrm-close-menu,
    .flowcrm-close-menu .card-action-btn {
        width: 100%;
    }

    .flowcrm-form-section summary {
        align-items: flex-start;
    }

    .flowcrm-form-save-row .card-action-btn {
        width: 100%;
    }

    .flowcrm-commute-fields {
        grid-template-columns: 1fr;
    }

    .flowcrm-care-fields,
    .flowcrm-benefit-grid {
        grid-template-columns: 1fr;
    }
}

.flowcrm-skills-box {
    margin-top: 12px;
    margin-bottom: 14px;
    padding: 10px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #ffffff;
}

.flowcrm-section-head.is-plain {
    padding: 0 0 9px;
    border-bottom: 1px solid #e6eef8;
    background: transparent;
}

.flowcrm-skills-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.flowcrm-skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 7px;
}

.flowcrm-skill-tag {
    min-width: 0;
    max-width: 100%;
    padding: 4px 8px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.25;
}

.flowcrm-skill-tag.is-more {
    background: #ffffff;
    color: #64748b;
}

@media (max-width: 900px) {
    .flowcrm-skills-grid {
        grid-template-columns: 1fr;
    }
}
