footer, header {
    z-index: 2;
    position: relative;
}


/* Font sizes moved to ee-responsive.css */

h1 {
    font-size: 30px;
}

h2 {
    font-size: 1.3rem;
}

h3 {
    font-size: 22px;
}

h4 {
    font-size: 18px;
}

h5 {
    font-size: 16px;
}

h6 {
    font-size: 14px;
}


.et_pb_menu_0_tb_header.et_pb_menu ul li a{
	color: var(--primary-color)!important;
}



/*loading page*/

.userEmptyNote {
    margin-left: 5%;
	margin-right: 5%;
	width: 90%;
}

.userEmptyNoteInner {
    max-width: 500px;
    min-width: 300px;
    margin: 100px auto;
    padding: 40px;
    border: 2px solid var(--secondary-color);
    border-radius: 20px;
    color: var(--secondary-color);
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    background-color: var(--primary-color);
}


.userEmptyNote button {
    margin: 40px auto 0px auto;
}

/* call div */

div#callDisplay {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}


.call-info {
    margin-bottom: 10px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

div#openCallOrganization {
    border: 2px solid var(--secondary-color);
    padding: 5px 10px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    line-height: 20px;
    font-size: 15px;
    font-weight: 600;
    text-transform: capitalize;
}




/* overview */


#organizationSidebarSettingsContainer {
    display: none; /* Hidden by default */
    /* Optional: add a transition for show/hide animation */
    transition: all 0.3s ease-in-out;
}

#organizationSidebarSettingsContainer.visible {
    display: block; /* Visible when the 'visible' class is added */
}



.buttonStyling {
	 padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    font-size: 16px;
	font-weight: 800;
	text-transform: uppercase;
	cursor: Pointer;
	transition: 1s;
	display: flex;
    align-items: center;
    justify-content: center;
	border: 2px solid var(--secondary-color);
}

.noProjects {
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    padding-top: 20px;
}

.noProjects a{
    color: var(--secondary-color);
}

.organizationContainer {
    display: flex;
    width: 100%;
}


#companyBoxHeaderLogo {
    background-image: var(--logo-url);
    height: 50px;
    background-repeat: no-repeat;
    background-size: contain;
}

#companyBoxHeader{
	margin-bottom: 30px;
}
.boxHeader {
    font-size: 1rem;
    font-weight: bolder;
    margin-top: 30px;
    margin-bottom: 0px;
    color: var(--primary-color);
    text-transform: uppercase;
}



#newContactForm {
    overflow: hidden;
    transition: 0.5s ease-out;
    width: 100%;
    float: right;
    background: var(--primary-color);
    border-radius: 10px;
    color: var(--secondary-color);
    margin-bottom: 10px;
    position: relative;
    font-size: 12px;
	height: 0px;
	transition: 1s;
	opacity: 0;
}

#newContactForm.active{
	padding: 20px 0px;
    margin: 20px 0px;
	height: auto;
	opacity: 1;
}

#newContactButton {
        fill: var(--secondary-color);
    float: right;
    background-color: var(--primary-color);
    width: 2rem;
    height: 2rem;
    padding: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
	border-radius: 50%;
	position: relative;
	border: none;
    margin-top: -5px;
}

#newContactButton.iconToolTip::after, #resendInvitation.iconToolTip::after{
	background-color: var(--secondary-color);
	color: var(--primary-color);
	transform: translateX(-50%);
    left: -60px;
	position: absolute;
    text-align: center;
    top: -30px;
}

#connectionsContainer .detailBoxOneItem {
    margin-bottom: 10px;
}

.detailBoxOneItemContainer {
    width: 100%;
    float: left;
    line-height: 20px;
    font-size: 0.9rem;
    position: relative;
}

span.detailBoxOneItem {
    max-width: 150px;
    display: block;
    float: left;
    cursor: pointer;
    margin-bottom: 10px;
}

.iconDetailBoxOneSub {
    position: absolute;
    right: 0px;
    cursor: pointer;
    width: 20px;
    height: 20px;
    background-size: 10px;
    background-repeat: no-repeat;
    background-position: center;
    background-color: var(--primary-color);
    border-radius: 50%;
    transition: 0.5s;
    display: flex;
    justify-content: center;
    align-items: center;
    fill: var(--secondary-color);
}

#iconPhone {
    margin-right: 24px;
}

#iconMail {
    margin-right: 50px;
}

#resendInvitation svg {
    width: 15px;
    height: 15px;
    fill: var(--secondary-color);
}

.detailBox.open {
    opacity: 1;
    max-height: 500px;
    padding: 10px 5px;
}

.detailBox {
    opacity: 0;
    transition: 0.5s ease-out;
    width: 100%;
    float: right;
    background: var(--primary-color);
    border-radius: 10px;
    color: var(--secondary-color);
    margin-bottom: 10px;
    max-height: 0px;
    position: relative;
    font-size: 12px;
    overflow: auto;
}

.editIcon {
    width: 20px;
    height: 20px;
    position: absolute;
    top: 5px;
    right: 0px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    fill: var(--secondary-color);
    stroke: var(--secondary-color);
}

.detailBoxOneItemSubContainerDetails {
    display: flex;
    flex-direction: column;
    margin-top: 20px;
}

.detailBoxOneItemSubContainer {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    width: 100%;
    min-height: 20px;
}

.detailBoxOneLabelSub {
    min-width: 150px;
    text-align: left;
    font-weight: bold;
    padding-right: 10px;
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: 0;
}

.detailBoxOneValueSub {
    color: var(--third-color);
    font-size: 0.7rem;
    min-width: 80px;
    width: calc(20px + 30%);
}

.contactDetailBoxItemSubContainer {
    position: relative;
    margin-bottom: 15px;
    width: calc(50% - 20px);
    float: left;
    margin-left: 10px;
    margin-right: 10px;
}

.salutationForm {
    padding: 0px;
    margin-left: 10px;
    width: calc(100% - 20px) !important;
    margin-top: 10px;
}

.detailBoxOneItemSubContainer a {
    color: rgb(255 255 255);
    font-weight: 600;
}

.contactSaveButton {
    font-size: 12px;
    margin-left: auto;
    margin-right: 10px;
    padding: 5px 10px;
}

.contactDetailBoxInput {
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 12px;
    box-sizing: border-box;
}

.tooltip-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

.tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    text-align: center;
    padding: 5px 10px;
    border-radius: 5px;
    border: 2px solid var(--secondary-color);
    position: absolute;
    z-index: 1;
    bottom: 115%;
    left: 0%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip-container:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.disabled-email {
    background-color: #e0e0e0 !important;
    cursor: not-allowed;
    opacity: 0.5;
}





.spinnerResendEmail{
    width: 20px!important;
    height: 20px!important;
}*/


.organizationViewFullHeight {
    min-height: 100vh;
    min-width: 200px;
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: 150px;
    padding: 0px 5%;
}

.rightHeaderContainer {
    margin-bottom: 20px;
    width: 95%;
    height: 50px;
}

#testPeriodContainer {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
}

button#newAnalysisButton {
    float: right;
}




#organizationContainerOwned.active{
    opacity: 0;
    height: 0px;
	display: none;
}

#organizationContainerNotOwned.active{
    opacity: 0;
    height: 0px;
	display: none;
}

#showOwnCompaniesButton.active{
	transform: rotate(90deg);
}

#showNotOwnCompaniesButton.active{
	transform: rotate(90deg);
}





.showCompaniesButton svg {
    width: 20px;
    height: 20px;
}

.organizatinOwnedDivider{
	width: 100%;
}

.showCompaniesButton {
    float: right;
}

.organizationTeamHeader {
    float: left;
}




.analysis-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: -9;
	display: flex;
	opacity: 0;
	pointer-events: none;
	transition: 1s;
}

.analysis-overlay.active{
	z-index: 1000;
	opacity: 1;
	pointer-events: all;
}

.analysis-popup {
    background: var(--primary-color);
    width: 80vw;
    position: relative;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    z-index: 1001;
	border-radius: 20px;
}

.analysis-popup .analysis-close-btn {
    position: absolute;
    top: -30px;
    right: -30px;
    background: transparent;
    color: var(--secondary-color);
    border: none;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 600;
}

.analysis-popup .analysis-close-btn:hover {
    background: var(--primary-color);
}








.organizationViewContainer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    overflow:auto;
    position: relative;
    padding: 60px;
}


div#paginationOrganization {
    position: absolute;
    right: 0;
    top: 100px;
}







/* ============================================
   MODERN SEARCH & FILTERS
   ============================================ */

/* ===== ORGANIZATIONS TOOLBAR ===== */
.organizations-toolbar {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding-right: 130px; /* Space for viewToggle */
}

/* ===== MODERN SEARCH FIELD ===== */
.search-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 100%;
    max-width: 400px;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--org-text-muted, #aeaeb2);
    pointer-events: none;
    transition: color var(--org-transition-fast, 120ms ease-out);
    z-index: 1;
}

.search-wrapper:focus-within .search-icon {
    color: var(--org-accent, #007AFF);
}

.searchField {
    width: 100%;
    height: 46px;
    padding: 0 44px 0 46px !important;
    border: 1px solid var(--org-border-light, rgba(0, 0, 0, 0.08));
    border-radius: var(--org-radius-lg, 14px);
    background: var(--org-surface-secondary, #f8f9fa);
    font-size: 15px;
    color: var(--org-text-primary, #1a1a1a);
    transition: all var(--org-transition-fast, 120ms ease-out);
    outline: none;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.searchField::placeholder {
    color: var(--org-text-muted, #aeaeb2);
    font-weight: 400;
}

.searchField:hover {
    background: var(--org-surface-primary, #ffffff);
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.searchField:focus {
    background: var(--org-surface-primary, #ffffff);
    border-color: var(--org-accent, #007AFF);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
}

.search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    padding: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--org-text-muted, #aeaeb2);
    border: none;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    color: white;
    cursor: pointer;
    transition: all var(--org-transition-fast, 120ms ease-out);
}

.search-clear:hover {
    background: var(--org-text-secondary, #6e6e73);
    transform: translateY(-50%) scale(1.1);
}

.search-wrapper:has(.searchField:not(:placeholder-shown)) .search-clear {
    display: flex;
}

p#noResultsMessage,
p.noResultsMessage {
    width: 100%;
    margin-top: 20px;
    padding: 40px 20px;
    text-align: center;
    color: var(--org-text-secondary, #6e6e73);
    font-size: 14px;
}

/* ===== FILTER CHIPS - Integrated with Search ===== */
.search-filters {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 12px;
    padding: 4px;
    background: var(--org-surface-secondary, #f5f5f7);
    border-radius: var(--org-radius-lg, 14px);
    flex-wrap: nowrap;
}

.filter-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 32px;
    padding: 0 12px;
    border-radius: var(--org-radius-md, 10px);
    background: transparent;
    color: var(--org-text-secondary, #6e6e73);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--org-transition-fast, 120ms ease-out);
    user-select: none;
    border: none;
    white-space: nowrap;
}

.filter-pill input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.filter-pill.active {
    background: var(--org-surface-primary, #ffffff);
    color: var(--org-text-primary, #1a1a1a);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.filter-pill:hover:not(.active) {
    color: var(--org-text-primary, #1a1a1a);
    background: rgba(255, 255, 255, 0.5);
}

.filter-pill .count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 9px;
    font-size: 10px;
    font-weight: 600;
}

.filter-pill.active .count {
    background: var(--org-accent, #007AFF);
    color: white;
}

/* Loading state */
.search-wrapper.loading .searchField {
    background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cstyle%3E@keyframes spin{to{transform:rotate(360deg)}}%3C/style%3E%3Cg fill='none' stroke='%23007AFF' stroke-width='2'%3E%3Ccircle cx='8' cy='8' r='6' stroke-opacity='0.25'/%3E%3Cpath d='M14 8a6 6 0 0 0-6-6' style='animation:spin .8s linear infinite;transform-origin:center'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 44px) center;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}



/*filter and sort*/

div#sortContainerHeader {
    display: flex;
    gap: var(--org-row-gap, 12px);
    background: var(--org-surface-secondary, #f5f5f7);
    box-shadow: none;
    flex-direction: row;
    padding: 12px 20px;
    min-width: 100%;
    flex-wrap: nowrap;
    align-items: center;
    border-bottom: 1px solid var(--org-border-light, rgba(0, 0, 0, 0.08));
    font-size: 0.85rem;
    color: var(--org-text-secondary, #86868b);
}


.sortContainerItem {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    margin-right: 10px;
    white-space: nowrap;
    max-width: 150px;
}

.sortContainerItem.organization-field {
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

svg#filterIcon {
    width: 12px;
    pointer-events: none;
    opacity: 0.6;
}

.sort-title {
    font-size: 0.8rem;
    font-weight: 600;
}

div#buttonSortItemContainer {
    width: 100px!important;
    margin-right: 0px;
    margin-left: auto;
}

#dateSortItemContainer {
    min-width: 70px !important;
    margin-left: 10px;
}



.arrow {
    font-size: 10px; /* Arrow size */
    color: gray; /* Standardfarbe der Pfeile */
    cursor: pointer; /* Change cursor */
    user-select: none; /* Verhindert Textauswahl */
}

.arrow.active {
    color: var(--secondary-color);
}

/* Optional: Hover-Effekt */
.arrow:hover {
    color: darkgray; /* Hover-Farbe */
    transform: scale(1.1); /* Scale up on hover */
}

/* Date Sort Popup - Modern Design */
.dateSort-popup, .followUpSort-popup {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    padding: 0;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    z-index: 1000;
    min-width: 320px;
    max-width: 500px;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    overflow: hidden;
    animation: filterPopupIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.dateSort-popup::before, .followUpSort-popup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--secondary-color, #667eea) 0%, #764ba2 100%);
}

.dateSort-popup .close-popup,
.followUpSort-popup .close-popup {
    position: absolute;
    right: 16px;
    top: 20px;
    width: 32px;
    height: 32px;
    background: #f1f5f9;
    border: none;
    border-radius: 10px;
    font-size: 20px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}

.dateSort-popup .close-popup:hover,
.followUpSort-popup .close-popup:hover {
    background: #fee2e2;
    color: #dc2626;
    transform: rotate(90deg);
}

.dateSort-popup > div:first-of-type,
.followUpSort-popup > div:first-of-type {
    padding: 24px 20px 20px;
}

.dateSort-popup label,
.followUpSort-popup label {
    display: block;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #64748b;
    margin-bottom: 8px;
    color: #555;
}

.dateSort-popup input[type="date"], .followUpSort-popup input[type="date"] {
    width: 100%;
    padding: 8px 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    transition: border-color 0.3s ease;
}

.dateSort-popup input[type="date"]:focus, .followUpSort-popup input[type="date"]:focus {
    border-color: #007bff; /* Fokusfarbe */
    outline: none;
}

.dateSort-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.dateSort-filters button {
    background: linear-gradient(135deg, var(--secondary-color, #667eea) 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.25);
}

.dateSort-filters button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.35);
}

.dateSort-filters button:active {
    transform: translateY(0);
}

.dateSort-popup .reset-filter,
.followUpSort-popup .reset-filter {
    margin-top: 16px;
    text-align: center;
}

.dateSort-popup .reset-filter button,
.followUpSort-popup .reset-filter button {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
    border: 2px solid #f87171;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.dateSort-popup .reset-filter button:hover,
.followUpSort-popup .reset-filter button:hover {
    background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
    border-color: #ef4444;
    transform: translateY(-2px);
}


/* Icon Sort Popup - Modern Design */
.iconSort-popup {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: none;
    padding: 0;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    z-index: 1000;
    min-width: 320px;
    max-width: 420px;
    overflow: hidden;
    animation: filterPopupIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes filterPopupIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

.iconSort-popup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--secondary-color, #667eea) 0%, #764ba2 100%);
}

.iconSort-popup .close-popup {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: #f1f5f9;
    border: none;
    border-radius: 10px;
    font-size: 20px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}

.iconSort-popup .close-popup:hover {
    background: #fee2e2;
    color: #dc2626;
    transform: rotate(90deg);
}

.sortCheckbox-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 24px 20px 20px;
}

/* Modern Toggle Checkbox */
.sortCheckbox {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    margin: 0 -4px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    border: 2px solid transparent;
}

.sortCheckbox:hover {
    background: #f1f5f9;
}

.sortCheckbox.active,
.sortCheckbox:has(.sortCheckbox-input:checked) {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-color: var(--secondary-color, #667eea);
}

.sortCheckbox-input {
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: var(--secondary-color, #667eea);
    flex-shrink: 0;
}

.sortCheckbox-input:checked {
    animation: checkPop 0.3s ease;
}

@keyframes checkPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.sortCheckbox label,
.sortCheckbox span {
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    transition: color 0.2s ease;
}

.sortCheckbox:has(.sortCheckbox-input:checked) label,
.sortCheckbox:has(.sortCheckbox-input:checked) span,
.sortCheckbox.active label,
.sortCheckbox.active span {
    color: var(--secondary-color, #667eea);
    font-weight: 600;
}

/* Owner Sort Popup - Modern Design */
.ownerSort-popup {
    position: fixed;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: none;
    padding: 0;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    z-index: 1000;
    min-width: 320px;
    max-width: 420px;
    overflow: hidden;
    animation: filterPopupIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.ownerSort-popup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--secondary-color, #667eea) 0%, #764ba2 100%);
}

.ownerSort-popup .close-popup {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: #f1f5f9;
    border: none;
    border-radius: 10px;
    font-size: 20px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}

.ownerSort-popup .close-popup:hover {
    background: #fee2e2;
    color: #dc2626;
    transform: rotate(90deg);
}

/* Owner Checkbox Styling */
.ownerCheckbox {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    margin: 0 -4px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    border: 2px solid transparent;
}

.ownerCheckbox:hover {
    background: #f1f5f9;
}

.ownerCheckbox:has(.ownerCheckbox-input:checked) {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-color: var(--secondary-color, #667eea);
}

.ownerCheckbox-input {
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: var(--secondary-color, #667eea);
    flex-shrink: 0;
}

.ownerCheckbox-input:checked {
    animation: checkPop 0.3s ease;
}

.ownerCheckbox label,
.ownerCheckbox span {
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    transition: color 0.2s ease;
}

.ownerCheckbox:has(.ownerCheckbox-input:checked) label,
.ownerCheckbox:has(.ownerCheckbox-input:checked) span {
    color: var(--secondary-color, #667eea);
    font-weight: 600;
}




/* ===== VIEW TOGGLE - Modern Toolbar ===== */
.viewToggle {
    display: flex;
    align-items: center;
    gap: 6px;
    position: absolute;
    right: 0;
    top: 0;
}

.viewToggleButton {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--org-radius-sm, 6px);
    background: var(--org-surface-secondary, #f8f9fa);
    border: 1px solid var(--org-border-light, rgba(0, 0, 0, 0.06));
    cursor: pointer;
    transition: all var(--org-transition-fast, 120ms ease-out);
}

.viewToggleButton:hover {
    background: var(--org-surface-primary, #ffffff);
    box-shadow: var(--org-shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.04));
    border-color: rgba(0, 0, 0, 0.1);
}

.viewToggleButton svg {
    display: block;
    width: 16px;
    height: 16px;
    stroke: var(--org-text-secondary, #6e6e73);
    transition: stroke var(--org-transition-fast, 120ms ease-out);
    flex-shrink: 0;
}

.viewToggleButton:hover svg {
    stroke: var(--org-accent, #007AFF);
}

/* Admin Toggle - Eye Icon States */
.viewToggleButton.admin-toggle.active {
    background: var(--org-accent, #007AFF);
    border-color: var(--org-accent, #007AFF);
}

.viewToggleButton.admin-toggle.active svg {
    stroke: #ffffff;
}

.viewToggleButton.admin-toggle:not(.active) {
    background: rgba(142, 142, 147, 0.12);
    border-color: transparent;
}

.viewToggleButton.admin-toggle:not(.active) svg {
    stroke: #8E8E93;
}

/* Trash Button */
#orgTrashBtn:hover {
    background: rgba(255, 59, 48, 0.08);
    border-color: rgba(255, 59, 48, 0.2);
}

#orgTrashBtn:hover svg {
    stroke: #FF3B30;
}

/* ===== ORGANIZATION VIEW WRAPPER ===== */
.organization-view-wrapper {
    border-radius: var(--org-radius-lg, 14px);
    box-shadow: var(--org-shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.04));
    border: 1px solid var(--org-border-light, rgba(0, 0, 0, 0.06));
    background: var(--org-surface-primary, #ffffff);
    /* No overflow - allow sticky to work */
}

/* Border radius on first/last children */
.organization-view-wrapper > *:first-child {
    border-radius: var(--org-radius-lg, 14px) var(--org-radius-lg, 14px) 0 0;
}

.organization-view-wrapper > *:last-child {
    border-radius: 0 0 var(--org-radius-lg, 14px) var(--org-radius-lg, 14px);
}

/* ============================================
   MODERN ORGANIZATION VIEW - CSS Grid Layout
   Clean, Minimal, Perfect Alignment
   ============================================ */

/* Design Tokens */
:root {
    --org-surface-primary: #ffffff;
    --org-surface-secondary: #f8f9fa;
    --org-surface-hover: rgba(0, 122, 255, 0.04);
    --org-text-primary: #1a1a1a;
    --org-text-secondary: #6e6e73;
    --org-text-muted: #aeaeb2;
    --org-border-light: rgba(0, 0, 0, 0.06);
    --org-accent: #007AFF;
    --org-accent-light: rgba(0, 122, 255, 0.1);
    --org-new-indicator: #34C759;
    --org-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --org-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --org-transition-fast: 120ms ease-out;
    --org-radius-sm: 6px;
    --org-radius-md: 10px;
    --org-radius-lg: 14px;
}

/* Grid Column Definitions — Projektliste v2
   --col-flag: 50px = Flag-Icon + Aging-Badge vertikal
   Ziel auf 1100px (grid nach 40px padding):
     Name ~280px | MWp ~105px | LK ~92px | Actions ~255px
   Fixed: flag(50) + owner(44) + fu(80) + date(72) = 246px
   fr: 1.5 + 0.3 + 0.25 + 0.85 = 2.9fr total
*/
.organizationsContainer.list,
.sortContainerHeader,
.ee-priority-list,
.ee-followup-due-list {
    --col-flag:     50px;
    --col-name:     minmax(140px, 1.5fr);
    --col-mwp:      minmax(88px, 0.3fr);
    --col-lk:       minmax(76px, 0.25fr);
    --col-owner:    44px;
    --col-followup: 80px;
    --col-date:     72px;
    --col-actions:  minmax(190px, 0.85fr);
    /* Legacy variables (no longer in grid template, kept for external references) */
    --col-email:    0px;
    --col-phone:    0px;
    --col-status:   0px;
}

/* Allgemeine Organisationen-Container */
.organizationsContainer {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: var(--org-surface-primary);
    border-radius: 0;
    position: relative; /* For skeleton overlay */
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Priority-/Follow-Up-Due-Listen liegen im DOM NEBEN .organization-view-wrapper,
   nicht innerhalb. Der Wrapper hat 1px border auf jeder Seite (= -2px Innenflaeche),
   weshalb seine inneren Grid-Zeilen (Header + Hauptliste) um 1px nach rechts
   verschoben und 2px schmaler sind als die Geschwister-Listen.
   Loesung: identische Aussenmasse durch transparenten 1px Border + identischen
   border-radius nachbilden, damit die geklonten Grid-Zeilen pixelgenau unter
   dem Sticky-Header stehen. */
.ee-priority-list,
.ee-followup-due-list {
    box-sizing: border-box;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    border-left: 1px solid transparent;
    border-right: 1px solid transparent;
}

/* ===== SUBLIST COLUMN HEADER =====
   Same grid tracks as main #sortContainerHeader so the cloned org rows below
   carry the same column labels visually. Lighter background + smaller height. */
.ee-sublist-column-header {
    display: grid;
    grid-template-columns: var(--col-flag) var(--col-name) var(--col-mwp) var(--col-lk) var(--col-owner) var(--col-followup) var(--col-date) var(--col-actions);
    gap: 0;
    padding: 0 20px;
    min-height: 28px;
    align-items: center;
    background: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid var(--org-border-light);
    box-sizing: border-box;
    width: 100%;
}
.ee-sublist-column-header > .organization-field {
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 600;
    color: var(--org-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    min-width: 0;
    max-width: none;
}

/* ===== HEADER ROW - CSS GRID + STICKY ===== */
div#sortContainerHeader {
    display: grid !important;
    grid-template-columns: var(--col-flag) var(--col-name) var(--col-mwp) var(--col-lk) var(--col-owner) var(--col-followup) var(--col-date) var(--col-actions);
    gap: 0;
    padding: 0 20px;
    background: var(--org-surface-secondary);
    border-bottom: 1px solid var(--org-border-light);
    min-height: 46px;
    align-items: center;
    margin: 0;
    border-radius: 0;
    box-sizing: border-box;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 10;
}

div#sortContainerHeader .sortContainerItem {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--org-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    margin: 0;
    max-width: none;
}

div#sortContainerHeader .sortContainerItem svg {
    width: 12px;
    height: 12px;
    opacity: 0.5;
}

div#sortContainerHeader .sort-arrows {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-left: 2px;
}

div#sortContainerHeader .arrow {
    font-size: 8px;
    line-height: 1;
    opacity: 0.4;
    transition: opacity var(--org-transition-fast), color var(--org-transition-fast);
}

div#sortContainerHeader .arrow:hover {
    opacity: 1;
    color: var(--org-accent);
}

/* ===== DATA ROWS - CSS GRID ===== */
.organizationsContainer.list .singleorganizationContainer {
    display: grid !important;
    grid-template-columns: var(--col-flag) var(--col-name) var(--col-mwp) var(--col-lk) var(--col-owner) var(--col-followup) var(--col-date) var(--col-actions);
    gap: 0;
    padding: 0 20px;
    min-height: 56px;
    align-items: center;
    background: var(--org-surface-primary);
    border-bottom: 1px solid var(--org-border-light);
    cursor: pointer;
    transition: background var(--org-transition-fast);
    position: relative;
    /* Identische Aussenmasse wie Header und Priority/Due-Listen — verhindert Spaltenverschub
       gegenueber den geklonten Reihen in .ee-priority-list / .ee-followup-due-list */
    box-sizing: border-box;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    margin: 0;
    flex: 0 0 auto;
}

.organizationsContainer.list .singleorganizationContainer:last-child {
    border-bottom: none;
}

.organizationsContainer.list .singleorganizationContainer:hover {
    background: var(--org-surface-hover);
}

/* ===== NEW INDICATOR - Subtle Left Accent ===== */
.singleorganizationContainer.is-new {
    background: linear-gradient(90deg, rgba(52, 199, 89, 0.08) 0%, transparent 20%);
}

.singleorganizationContainer.is-new::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--org-new-indicator);
    border-radius: 0 2px 2px 0;
}

.singleorganizationContainer.is-new:hover {
    background: linear-gradient(90deg, rgba(52, 199, 89, 0.12) 0%, var(--org-surface-hover) 20%);
}

/* ===== ORGANIZATION FIELDS ===== */
/* Higher specificity to override legacy rules below (line ~2322) that set
   margin-right:10px, max-width:150px, flex-shrink:0 — these break CSS Grid alignment */
.organizationsContainer.list .organization-field,
.ee-priority-list .organization-field,
.ee-followup-due-list .organization-field,
div#sortContainerHeader .organization-field {
    padding: 8px;
    font-size: 13px;
    color: var(--org-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    max-width: none;
    min-width: 0;
    flex-shrink: 1;
}

/* Note: The defensive .organizationDate margin/padding override that lived
   here was removed in the 2026-05-07 refactor — root cause was fixed at the
   legacy rule itself (see line ~2384). */

.organization-field.organizationName {
    font-weight: 600;
    color: var(--org-text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    min-width: 0;
}
.org-name-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex: 1;
}

.organization-field.organizationEmail a,
.organization-field.organizationPhone a {
    color: var(--org-text-secondary);
    text-decoration: none;
    transition: color var(--org-transition-fast);
}

.organization-field.organizationEmail a:hover,
.organization-field.organizationPhone a:hover {
    color: var(--org-accent);
}

/* Status Badge - Subtle Design */
.organization-field.organizationUserStatus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 500;
    border-radius: 4px;
    text-transform: lowercase;
    letter-spacing: 0.3px;
}

.organizationUserStatus.intern {
    background: rgba(52, 199, 89, 0.12);
    color: #2d8a4e;
}

.organizationUserStatus.extern {
    background: rgba(255, 59, 48, 0.1);
    color: #d63a32;
}

.organizationUserStatus.pending {
    background: rgba(255, 149, 0, 0.12);
    color: #cc7700;
}

/* Owner Initials - Modern Avatar Style */
.organization-field.organizationOwner {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    padding: 4px !important;
}

.owner-initial {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    font-size: 10px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    text-align: center;
    box-shadow: 0 1px 3px rgba(102, 126, 234, 0.3);
    flex-shrink: 0;
}

/* Stacked initials when more than 2 */
.organization-field.organizationOwner .owner-initial:nth-child(n+3) {
    margin-left: -8px;
}

/* FollowUp & Date */
.organization-field.organizationFollowUp,
.organization-field.organizationDate {
    font-size: 12px;
    color: var(--org-text-secondary);
    font-variant-numeric: tabular-nums;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    position: relative;
    z-index: 1;
}

.organizationFollowUp.followUp {
    color: #FF3B30;
    font-weight: 600;
}

/* ===== QUICK ACTIONS ===== */
/* ===== ACTIONS-SPALTE — alles in einer Zeile ===== */
.organization-quick-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
    padding: 0;
    flex-wrap: nowrap;
    overflow: hidden;
    height: 100%;
}

.organization-quick-actions > * {
    flex-shrink: 0;
}
/* Projekte-Button darf schrumpfen wenn Platz eng */
.organization-quick-actions .projects-popup-toggle {
    flex-shrink: 1;
    min-width: 36px;
}

/* Aging Badge — base styles (for flag cell and legacy views) */
.ee-aging-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 3px;
    flex-shrink: 0;
    white-space: nowrap;
}
/* Legacy: Badge noch im Name-Feld (Card-View, alte Views) */
.organization-field.organizationName .ee-aging-badge {
    min-width: 32px;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 4px;
}
.organization-field.organizationName .ee-aging-badge.ee-aging-placeholder {
    visibility: hidden;
}

/* Vertikale Ausrichtung aller Quick-Action-Kinder */
.organization-quick-actions .ee-row-status-btns {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    height: auto;
}
.organization-quick-actions button,
.organization-quick-actions .ee-bulk-checkbox {
    vertical-align: middle;
}

.organization-quick-actions .ee-row-status-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    line-height: 1;
    vertical-align: middle;
}

/* Bulk Checkbox — hidden by default, visible only in bulk mode */
.organization-quick-actions .ee-bulk-checkbox {
    display: none;
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: #6366f1;
    transition: opacity 0.15s;
}
.organizationsContainer.bulk-mode-active .organization-quick-actions .ee-bulk-checkbox,
.ee-priority-list.bulk-mode-active .organization-quick-actions .ee-bulk-checkbox,
.ee-followup-due-list.bulk-mode-active .organization-quick-actions .ee-bulk-checkbox {
    display: flex;
}

/* Flag-Icon als eigene Grid-Spalte ganz links */
.ee-flag-col {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.15s;
    flex-shrink: 0;
    padding: 0;
    position: relative;
    z-index: 3;
}
.singleorganizationContainer:hover .ee-flag-col { opacity: 0.3; }
.ee-flag-col:hover { opacity: 0.7 !important; }
.ee-flag-col.flagged { opacity: 1 !important; color: #dc2626; }

/* Projects button (green) */
.organization-quick-actions .projects-popup-toggle {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px 6px;
    border: none;
    border-radius: 5px;
    background: #16a34a;
    color: white;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    flex-shrink: 1;
    min-width: 36px;
    white-space: nowrap;
    line-height: 1;
}
.organization-quick-actions .projects-popup-toggle:hover { background: #15803d; }
.organization-quick-actions .projects-popup-toggle svg { stroke: white; width: 11px; height: 11px; }

/* Override-Buttons ← → */
.organization-quick-actions .ee-phase-override-btns {
    display: flex;
    gap: 1px;
    align-items: center;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.15s;
}
.singleorganizationContainer:hover .organization-quick-actions .ee-phase-override-btns { opacity: 1; }

/* Per-Row Status-Buttons */
.ee-row-status-btns {
    display: flex;
    gap: 2px;
    align-items: center;
    flex-shrink: 0;
}

.ee-row-status-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
    line-height: 1;
    padding: 0;
}

.ee-row-status-btn.ee-row-status-active {
    background: #ecfdf5;
    color: #059669;
}
.ee-row-status-btn.ee-row-status-active:hover {
    background: #059669;
    color: white;
}

.ee-row-status-btn.ee-row-status-onhold {
    background: #fffbeb;
    color: #d97706;
}
.ee-row-status-btn.ee-row-status-onhold:hover {
    background: #d97706;
    color: white;
}

.ee-row-status-btn.ee-row-status-lost {
    background: #fef2f2;
    color: #dc2626;
}
.ee-row-status-btn.ee-row-status-lost:hover {
    background: #dc2626;
    color: white;
}

.ee-row-status-btn.ee-row-status-reactivate {
    background: #ecfdf5;
    color: #059669;
    width: 28px;
    font-size: 13px;
}
.ee-row-status-btn.ee-row-status-reactivate:hover {
    background: #059669;
    color: white;
}

/* Bulk-Toggle-Button im Status-Switch */
.ee-status-btn.ee-bulk-toggle-btn {
    margin-left: 8px;
    border-left: 2px solid #e2e8f0;
    border-right: none;
    color: #6366f1;
    font-weight: 500;
}
.ee-status-btn.ee-bulk-toggle-btn:hover,
.ee-status-btn.ee-bulk-toggle-btn.active {
    background: #eef2ff;
    color: #4f46e5;
}

/* Trash-Button */
.organization-quick-actions button.organization-trash-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
    opacity: 0;
}
.singleorganizationContainer:hover .organization-quick-actions button.organization-trash-btn { opacity: 1; }
.organization-quick-actions button.organization-trash-btn:hover { background: #ef4444; color: white; }
.organization-quick-actions button.organization-trash-btn svg { stroke: currentColor; width: 13px; height: 13px; }

/* Alle anderen Buttons in Quick-Actions */
.organization-quick-actions button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px 8px;
    border: none;
    border-radius: 6px;
    background: var(--org-surface-secondary, #f5f5f7);
    color: var(--org-text-secondary, #6e6e73);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}
.organization-quick-actions button:hover { background: var(--org-accent); color: white; }
.organization-quick-actions button:hover svg { stroke: white; }
.organization-quick-actions svg { width: 13px; height: 13px; stroke: currentColor; flex-shrink: 0; }
.organization-quick-actions .project-count { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ==========================================================
   RESPONSIVE SYSTEM — 4 Breakpoints
   Desktop ≥1024px  : 8 Spalten, volle Breite (Default)
   Tablet 769-1023px: 8 Spalten, kompakter
   Mobile 481-768px : 5 Spalten (LK/VO/FU hidden), 1 Zeile
   iPhone ≤480px    : 2-Zeilen Card (Name+MWp / Datum+Actions)
   ========================================================== */

/* ── TIER 1: Tablet / Small Laptop (769–1023px) ── */
@media (min-width: 769px) and (max-width: 1023px) {
    .sortContainerHeader,
    .organizationsContainer.list .singleorganizationContainer,
    .ee-priority-list .ee-priority-item,
    .ee-followup-due-list .ee-followup-due-item {
        --col-flag:     44px;
        --col-name:     minmax(110px, 1.5fr);
        --col-mwp:      minmax(72px, 0.26fr);
        --col-lk:       minmax(62px, 0.2fr);
        --col-owner:    34px;
        --col-followup: 62px;
        --col-date:     62px;
        --col-actions:  minmax(158px, 0.74fr);
    }
}

/* ── TIER 2: Mobile Landscape / Kleines Tablet (481–768px) ──
   5 sichtbare Spalten: flag | name | mwp | date | actions
   LK, VO, FU werden aus dem Grid-Flow entfernt (display:none)
   Auto-Placement: flag→col1, name→col2, mwp→col3, date→col4, actions→col5 */
@media (max-width: 768px) {
    div#sortContainerHeader { display: none !important; }

    .organizationsContainer.list .singleorganizationContainer,
    .ee-priority-list .ee-priority-item,
    .ee-followup-due-list .ee-followup-due-item {
        display: grid !important;
        grid-template-columns: 40px 1fr 72px 58px auto;
        gap: 0;
        padding: 0 10px;
        min-height: 48px;
        align-items: center;
    }

    /* Ausblenden: LK, VO, FU → werden aus Grid-Flow entfernt */
    .organizationsContainer.list .organization-field.organizationLastContact,
    .organizationsContainer.list .organization-field.organizationOwner,
    .organizationsContainer.list .organization-field.organizationFollowUp,
    .ee-priority-list .ee-priority-item .organization-field.organizationLastContact,
    .ee-priority-list .ee-priority-item .organization-field.organizationOwner,
    .ee-priority-list .ee-priority-item .organization-field.organizationFollowUp,
    .ee-followup-due-list .ee-followup-due-item .organization-field.organizationLastContact,
    .ee-followup-due-list .ee-followup-due-item .organization-field.organizationOwner,
    .ee-followup-due-list .ee-followup-due-item .organization-field.organizationFollowUp {
        display: none !important;
    }

    /* MWp: right-aligned, smaller */
    .organizationsContainer.list .organization-field.organizationMwp,
    .ee-priority-list .ee-priority-item .organization-field.organizationMwp,
    .ee-followup-due-list .ee-followup-due-item .organization-field.organizationMwp {
        text-align: right;
        font-size: 11px;
        padding-right: 6px;
        color: var(--org-text-secondary);
    }

    /* Date: kleiner */
    .organizationsContainer.list .organization-field.organizationDate,
    .ee-priority-list .ee-priority-item .organization-field.organizationDate,
    .ee-followup-due-list .ee-followup-due-item .organization-field.organizationDate {
        font-size: 11px;
        color: var(--org-text-secondary);
        text-align: center;
    }

    /* Actions: KI-Button und Phase-Arrows ausblenden */
    .ee-ki-dump-btn,
    .ee-phase-override-btns { display: none !important; }

    .organization-quick-actions {
        gap: 4px;
        padding: 0 0 0 4px;
        flex-wrap: nowrap;
    }

    /* Flag-Zelle: kleiner */
    .ee-flag-cell {
        gap: 1px;
    }
    .ee-flag-cell .ee-aging-badge {
        font-size: 0.55rem;
        min-width: 22px;
        padding: 1px 2px;
    }
}

/* ── TIER 3: iPhone Portrait (≤480px) — 2-Zeilen Card-Layout ──
   Zeile 1: [Name links] [MWp rechts]
   Zeile 2: [Datum links] [Actions rechts]
   Grid: 1fr | auto mit 2 Reihen */
@media (max-width: 480px) {
    .organizationsContainer.list .singleorganizationContainer,
    .ee-priority-list .ee-priority-item,
    .ee-followup-due-list .ee-followup-due-item {
        display: grid !important;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        padding: 10px 14px;
        min-height: auto;
        gap: 3px 8px;
    }

    /* Flag: ausblenden (Badge-Info durch Namenszeile ersetzbar) */
    .organizationsContainer.list .ee-flag-cell,
    .ee-priority-list .ee-priority-item .ee-flag-cell,
    .ee-followup-due-list .ee-followup-due-item .ee-flag-cell {
        display: none !important;
    }

    /* Zeile 1 Links: Name */
    .organizationsContainer.list .organization-field.organizationName,
    .ee-priority-list .ee-priority-item .organization-field.organizationName,
    .ee-followup-due-list .ee-followup-due-item .organization-field.organizationName {
        grid-column: 1; grid-row: 1;
        font-size: 14px; font-weight: 600;
        padding: 0; min-width: 0;
        max-width: none; width: 100%;
    }

    /* Zeile 1 Rechts: MWp */
    .organizationsContainer.list .organization-field.organizationMwp,
    .ee-priority-list .ee-priority-item .organization-field.organizationMwp,
    .ee-followup-due-list .ee-followup-due-item .organization-field.organizationMwp {
        grid-column: 2; grid-row: 1;
        font-size: 12px; font-weight: 600;
        text-align: right;
        padding: 0 0 0 8px;
        white-space: nowrap;
        color: var(--org-text-secondary);
        align-self: center;
        max-width: none;
    }

    /* LK, VO, FU: ausblenden */
    .organizationsContainer.list .organization-field.organizationLastContact,
    .organizationsContainer.list .organization-field.organizationOwner,
    .organizationsContainer.list .organization-field.organizationFollowUp,
    .ee-priority-list .ee-priority-item .organization-field.organizationLastContact,
    .ee-priority-list .ee-priority-item .organization-field.organizationOwner,
    .ee-priority-list .ee-priority-item .organization-field.organizationFollowUp,
    .ee-followup-due-list .ee-followup-due-item .organization-field.organizationLastContact,
    .ee-followup-due-list .ee-followup-due-item .organization-field.organizationOwner,
    .ee-followup-due-list .ee-followup-due-item .organization-field.organizationFollowUp {
        display: none !important;
    }

    /* Zeile 2 Links: Datum */
    .organizationsContainer.list .organization-field.organizationDate,
    .ee-priority-list .ee-priority-item .organization-field.organizationDate,
    .ee-followup-due-list .ee-followup-due-item .organization-field.organizationDate {
        grid-column: 1; grid-row: 2;
        font-size: 11px;
        color: var(--org-text-secondary);
        padding: 0; align-self: center;
        max-width: none;
    }

    /* Zeile 2 Rechts: Actions */
    .organizationsContainer.list .organization-quick-actions,
    .ee-priority-list .ee-priority-item .organization-quick-actions,
    .ee-followup-due-list .ee-followup-due-item .organization-quick-actions {
        grid-column: 2; grid-row: 2;
        justify-content: flex-end;
        padding: 0; gap: 3px;
        flex-wrap: nowrap;
    }

    /* KI-Button und Pfeile auf iPhone ausblenden */
    .ee-ki-dump-btn,
    .ee-phase-override-btns { display: none !important; }

    /* Buttons kompakter */
    .organization-quick-actions button {
        padding: 4px 7px;
        min-height: 30px;
        font-size: 11px;
        gap: 3px;
    }
    .organization-quick-actions svg {
        width: 12px; height: 12px;
    }

    /* Follow-Up-Datum-Farbe erhalten */
    .organizationFollowUp.followUp { color: red; }
}

/* ===== B2B / ADMIN-ONLY STYLING ===== */
.singleorganizationContainer.organizationB2B::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--org-accent);
}

.singleorganizationContainer.organizationB2BWaiting::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #FF9500;
}

.singleorganizationContainer.notInOrganization::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #8E8E93;
}

/* Remove old styling conflicts */
.organizationStatusIconContainer {
    display: none;
}

.organizationStatusIcon {
    display: none;
}

/* Projects Button - Keep secondary color */
.organization-quick-actions .projects-popup-toggle {
    background: var(--secondary-color) !important;
    color: white !important;
}

.organization-quick-actions .projects-popup-toggle:hover {
    filter: brightness(1.1);
    transform: scale(1.02);
}

/* ============================================
   NOTIFICATION BADGES
   ============================================ */
.notification-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: 11px;
    font-weight: 600;
    color: white;
    background: #ef4444;
    border-radius: 10px;
    position: absolute;
    top: -4px;
    right: -4px;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.4);
    animation: badge-pulse 2s ease-in-out infinite;
}

.notification-badge.warning {
    background: #f59e0b;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.4);
}

.notification-badge.success {
    background: #10b981;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.4);
}

.notification-badge.info {
    background: var(--secondary-color);
    box-shadow: 0 2px 4px rgba(var(--secondary-color), 0.4);
}

@keyframes badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ============================================
   NEW ORGANIZATION BADGE (Modern Style)
   ============================================ */
.org-new-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
    border-radius: 4px;
    margin-left: 8px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 122, 255, 0.3);
}

/* Status Icon Badge Number */
.organizationStatusIcon .iconNumberCount {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 10px;
    font-weight: 600;
    color: white;
    background: var(--secondary-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Legacy rule — historic margin-left:10px / min-width:70px / padding-right:4px
   removed in 2026-05-07 refactor: those values break CSS Grid alignment in
   sortContainerHeader, main list, and sublists (date cell shifted 10px
   right of the column track). The grid track + .organization-field padding
   (8px) defined above is sufficient. Defensive override block at line ~1685
   is now obsolete and can be removed. */
.organization-field.organizationDate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.organizationStatus {
    display: none;
}

.organization-field a {
    color: var(--primary-color-70);
}

div#organizationIconContainer {
    min-width: 260px !important;
    overflow: inherit;
}


/* Felder der Organisation */
.organization-field {
    flex-shrink: 0;
    margin-right: 10px;
    text-align: left;
    white-space: nowrap;
    font-size: 0.9rem;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.organization-field.organizationEmail, #emailSortItemContainer {
    max-width: 170px;
}

.organization-field.organizationName, div#nameSortItemContainer {
    min-width: 150px;
    max-width: 240px;
}

#phoneSortItemContainer, .organization-field.organizationPhone {
    min-width: 100px;
    max-width: 130px;
}

#statusSortItemContainer, .organization-field.organizationUserStatus {
    min-width: 60px;
    max-width: 80px;
}

#ownerSortItemContainer, .organization-field.organizationOwner {
    min-width: 40px;
    max-width: 60px;
}

#followUpSortItemContainer, .organization-field.organizationFollowUp {
    min-width: 85px;
    max-width: 95px;
}

/* Override legacy min/max-width for fields inside CSS Grid rows — they conflict
   with grid-template-columns and cause column misalignment between lists */
.organizationsContainer.list .singleorganizationContainer .organization-field,
.ee-priority-list .singleorganizationContainer .organization-field,
.ee-followup-due-list .singleorganizationContainer .organization-field,
div#sortContainerHeader .organization-field {
    min-width: 0 !important;
    max-width: none !important;
}

.organizationFollowUp.followUp {
    color: #dc2626;
    font-weight: 700;
    background: rgba(220, 38, 38, 0.06);
    border-radius: 4px;
}

.chat-date-input.followUp{
    color: red;
}

/* =========================================================
   GRID LIST VIEW — Override legacy flex-width constraints
   Die alten max-width Werte (240px Name, 150px Base) stammen
   aus dem Flexbox-Layout und blockieren die Grid-Zellen.
   In list-grid all fields must fill their cell completely.
   ========================================================= */
.organizationsContainer.list .organization-field,
.sortContainerHeader .sortContainerItem.organization-field {
    max-width: none;
    min-width: 0;
    width: 100%;
    flex-shrink: unset;
    margin-right: 0;
}

/* Name: fills the grid cell completely as flex container */
.organizationsContainer.list .organization-field.organizationName {
    max-width: none;
    min-width: 0;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
}

/* MWp + LK: centered, no artificial limit */
.organizationsContainer.list .organization-field.organizationMwp,
.organizationsContainer.list .organization-field.organizationLastContact {
    max-width: none;
    min-width: 0;
    text-align: right;
    padding-right: 12px;
    color: var(--org-text-secondary);
    font-size: 12px;
}

/* Owner: bleibt schmal (Avatar-Zelle) */
.organizationsContainer.list .organization-field.organizationOwner {
    max-width: none;
    min-width: 0;
}

/* =================================================
   FLAG-ZELLE: Flag-Icon + Aging-Badge vertikal
   Badge wandert aus dem Name-Feld hierher →
   Name-Text fluchtet jetzt mit dem Header "NAME"
   ================================================= */
.ee-flag-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 100%;
    height: 100%;
}

/* Aging Badge innerhalb der Flag-Zelle (kompakt) */
.ee-flag-cell .ee-aging-badge {
    font-size: 0.62rem;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 3px;
    line-height: 1.3;
    white-space: nowrap;
    min-width: 26px;
    text-align: center;
}

/* Name text: does NOT grow (icons stay next to text) */
.organizationsContainer.list .org-name-text {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Header Flag-Zelle: gleiche Breite wie Datenzelle (50px) */
.ee-header-flag-col {
    width: 100%;
}


.organizationUserStatus {
    color: #ffffff;
    text-align: center;
    border-radius: 10px;
    font-weight: 400;
}

.organizationUserStatus.pending {
    background: #ffc800;
}

.organizationUserStatus.extern {
    background: #09dd01;
}
.organizationUserStatus.intern {
    background: #ff1500;
}

/* ============================================
   PROJEKTLISTE V2 — Neue Spalten & KI-Button
   ============================================ */

/* Kontakt-Icons im Namensfeld — permanent sichtbar */
.org-contact-icons {
    display: inline-flex;
    gap: 3px;
    flex-shrink: 0;
    margin-left: 6px;
    opacity: 0.55;
    transition: opacity 0.12s;
}
.singleorganizationContainer:hover .org-contact-icons {
    opacity: 1;
}
.org-contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 5px;
    color: #9ca3af;
    text-decoration: none;
    transition: background 0.12s, color 0.12s;
    flex-shrink: 0;
}
.org-contact-icon:hover {
    background: #f0f0f0;
    color: #374151;
}
.org-contact-icon--email:hover { color: #2563eb; }
.org-contact-icon--phone:hover { color: #16a34a; }
.org-contact-icon--empty { width: 22px; height: 22px; pointer-events: none; }

/* MWp column — compact, right-aligned */
#mwpSortItemContainer {
    justify-content: flex-end;
}
.organization-field.organizationMwp {
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    font-variant-numeric: tabular-nums;
    text-align: right;
    padding-right: 10px;
    white-space: nowrap;
    overflow: hidden;
}
.organization-field.organizationMwp[data-mwp="0"],
.organization-field.organizationMwp:empty {
    color: #d1d5db;
}

/* Letzter-Kontakt-Spalte */
#lastContactSortItemContainer {
    font-size: 10px;
}
.organization-field.organizationLastContact {
    font-size: 12px;
    color: var(--org-text-secondary);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.organization-field.organizationLastContact.lastContact-overdue {
    color: #ef4444;
    font-weight: 600;
}

/* KI-Button — im Quick-Actions Bereich */
.ee-ki-dump-btn {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    border: 1px solid #e5e7eb;
    background: #fff;
    cursor: pointer;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.ee-ki-dump-btn:hover {
    background: #fef9c3;
    border-color: #fbbf24;
    color: #d97706;
}
.ee-ki-dump-btn.ee-ki-loading {
    pointer-events: none;
    color: #fbbf24;
    border-color: #fbbf24;
    animation: eeKiSpin 1s linear infinite;
}
@keyframes eeKiSpin {
    0%   { opacity: 1; }
    50%  { opacity: 0.4; }
    100% { opacity: 1; }
}

/* KI-Label im Actions-Header */
.ee-actions-header-ki {
    margin-left: auto;
    color: var(--org-text-secondary);
    opacity: 0.5;
    display: flex;
    align-items: center;
}
.ee-bulk-select-all-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* KI-Popup */
.ee-ki-dump-popup {
    position: fixed;
    z-index: 99999;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.06);
    padding: 20px;
    max-width: 420px;
    min-width: 300px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: eeKiPopupIn 0.18s ease;
}
@keyframes eeKiPopupIn {
    from { opacity: 0; transform: translate(-50%, -48%) scale(0.97); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.ee-ki-dump-popup__header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.ee-ki-dump-popup__icon {
    font-size: 16px;
    line-height: 1;
}
.ee-ki-dump-popup__title {
    font-weight: 700;
    font-size: 14px;
    color: #111827;
    flex: 1;
}
.ee-ki-dump-popup__close {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #9ca3af;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.15s, color 0.15s;
}
.ee-ki-dump-popup__close:hover {
    background: #f3f4f6;
    color: #374151;
}
.ee-ki-dump-popup__org {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f3f4f6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ee-ki-dump-popup__body {
    min-height: 60px;
}
.ee-ki-dump-popup__loading {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #6b7280;
    font-size: 13px;
}
.ee-ki-loading-dots {
    display: inline-flex;
    gap: 4px;
}
.ee-ki-loading-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fbbf24;
    animation: eeKiDot 1.2s infinite;
}
.ee-ki-loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.ee-ki-loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes eeKiDot {
    0%, 80%, 100% { opacity: 0.2; transform: scale(0.85); }
    40%            { opacity: 1;   transform: scale(1); }
}
.ee-ki-dump-popup__text {
    font-size: 13.5px;
    line-height: 1.65;
    color: #1f2937;
    margin: 0;
    white-space: pre-wrap;
}
.ee-ki-dump-popup__footer {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
.ee-ki-dump-popup__hub-btn {
    font-size: 12px;
    font-weight: 500;
    color: var(--primary-color, #16a34a);
    background: transparent;
    border: 1px solid var(--primary-color, #16a34a);
    border-radius: 7px;
    padding: 5px 12px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.ee-ki-dump-popup__hub-btn:hover {
    background: var(--primary-color, #16a34a);
    color: white;
}
.ee-ki-dump-popup__error {
    color: #ef4444;
    font-size: 13px;
}

/* AI popup overlay (click outside to close) */
.ee-ki-dump-overlay {
    position: fixed;
    inset: 0;
    z-index: 99998;
    background: transparent;
}

/* ============================================
   RESPONSIVE BREAKPOINTS - Moved to ee-responsive.css
   ============================================ */

/* Project container (hidden by default) */
.singleorganizationProjects {
    display: none;
    margin-top: 10px;
    padding: 10px;
    background-color: #e9ecef;
    border-radius: 5px;
}

/* Popup-Hintergrund - Modern Glassmorphism Design */
.projects-popup-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 41, 59, 0.9) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: popupFadeIn 0.2s ease-out;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.projects-popup-inner-content {
    min-width: 400px;
    max-height: calc(100% - 80px);
    height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: popupSlideIn 0.25s ease-out;
}

/* Popup-Inhalt */

/* Popup styles */
.organizationCategoryPopup-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.organizationCategoryPopup-content {
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    width: 80%;
    display: flex;
    flex-direction: column;
}


.organizationCategoryPopup-header {
    border-bottom: 1px solid #e0e0e0;
    padding: 15px 20px;
}

.organizationCategoryPopup-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.organizationCategoryPopup-body {
    padding: 20px;
    position: relative;
}

.organizationCategoryPopup-loading-spinner {
    text-align: center;
    padding: 20px;
    font-style: italic;
    color: #666;
}

.organizationCategoryPopup-text-field {
    min-height: 100px;
    border: 1px solid #ccc;
    padding: 8px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    background-color: #fff;
    max-height: 50vh;
}

.organizationCategoryPopup-text-field ul {
    line-height: 15px!important;
    padding: 0px !important;
}

.organizationCategoryPopup-text-field h2 {
    padding: 0px;
    line-height: 20px;
    font-size: 20px;
}
.organizationCategoryPopup-text-field h1 {
    padding: 0px;
    line-height: 20px;
    font-size: 20px;
}


.organizationCategoryPopup-text-field p {
    line-height: 15px!important;
    padding: 0px!important;
    margin: 0px !important;
}

/* Disabled state */
[contenteditable="false"].organizationCategoryPopup-text-field {
    background-color: #f0f0f0;
    color: #666;
    cursor: not-allowed;
}

.organizationCategoryPopup-text-field:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.organizationCategoryPopup-footer {
    border-top: 1px solid #e0e0e0;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
}

/* Button Styles */
.organizationCategoryPopup-btn-cancel {
    padding: 8px 15px;
    background-color: #f5f5f5;
    border: 1px solid #ccc;
    border-radius: 4px;
    color: #333;
    cursor: pointer;
    transition: background-color 0.3s;
}

.organizationCategoryPopup-btn-cancel:hover {
    background-color: #e5e5e5;
}

.organizationCategoryPopup-btn-submit {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

.organizationCategoryPopup-btn-success {
    background-color: #4CAF50;
}

.organizationCategoryPopup-btn-success:hover {
    background-color: #45a049;
}

.organizationCategoryPopup-btn-danger {
    background-color: #f44336;
}

.organizationCategoryPopup-btn-danger:hover {
    background-color: #d32f2f;
}





.projects-popup-content {
    position: relative;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    min-width: 400px;
    overflow-y: auto;
    width: 90vw;
}

.projects-popup-content.followUp{
    border: 5px solid red;
}

/* Modern Popup Header Section */
div#projectsPopupHeader {
    height: 100%;
    flex: 1;
    overflow: auto;
    display: flex;
    gap: 32px;
    padding: 64px 40px 24px 40px;
    max-height: 80vh;
    min-height: 60vh;
    scrollbar-width: thin;
    scrollbar-color: #e2e8f0 transparent;
}

div#projectsPopupHeader::-webkit-scrollbar {
    width: 6px;
}

div#projectsPopupHeader::-webkit-scrollbar-track {
    background: transparent;
}

div#projectsPopupHeader::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 3px;
}

div#projectsPopupHeaderGradient {
    width: 100%;
    height: 24px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
    position: relative;
    z-index: 1;
}

/* Modern Projects Container */
div#projectsPopupContainer {
    position: relative;
    z-index: 0;
    padding-top: 16px;
    margin-top: 0;
    min-width: 200px;
    height: auto;
    flex: 0 1 auto;
    min-height: 200px;
    overflow: auto;
    padding-bottom: 24px;
}

/* Close button - modern design */
.projects-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border: none;
    border-radius: 12px;
    font-size: 24px;
    cursor: pointer;
    font-weight: 300;
    color: #64748b;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.projects-popup-close:hover {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.projects-popup-close:active {
    transform: scale(0.95);
}

/* Dynamischer Projekte-Container */
#projectsPopupContainerInner {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin: auto;
    margin-bottom: 40px;
}

/* Modern Chat/CRM Container */

.chat-display {
    flex: 1;
    padding: 16px;
    border-radius: 16px;
    overflow-y: auto;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.chat-display::-webkit-scrollbar {
    width: 6px;
}

.chat-display::-webkit-scrollbar-track {
    background: transparent;
}

.chat-display::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.chat-display::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.chat-message {
    margin: 16px 0;
    padding: 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    animation: messageSlideIn 0.2s ease-out;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message h1, .chat-message h2, .chat-message h3, .chat-message h4, .chat-message h5, .chat-message h6 {
    margin: 0;
    font-weight: 600;
    font-size: 16px;
    color: inherit;
}

.chat-message h1 {
    font-size: 20px;
}

.chat-message h2 {
    font-size: 18px;
}

.chat-message h3 {
    font-size: 16px;
}

.chat-message h4 {
    font-size: 16px;
}

.chat-message.sent {
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    margin-left: auto;
    width: 90%;
    border: 1px solid #e2e8f0;
    color: #334155;
}

#message-0 {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #f1f5f9;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

div#message-text-0 {
    -webkit-line-clamp: unset;
    margin: 8px;
    line-height: 1.6;
}

/* Modern Chat Message Meta */
.chat-message-meta {
    position: absolute;
    font-size: 12px;
    width: 100%;
    display: flex;
    align-items: center;
}

span.chat-message-name {
    position: absolute;
    left: -44px;
    top: -8px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--secondary-color, #6366f1) 0%, #4f46e5 100%);
    color: white;
    border-radius: 12px;
    padding: 0;
    cursor: default;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    font-size: 11px;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

span.chat-message-datetime {
    position: absolute;
    right: 10px;
    top: -30px;
    font-weight: 500;
    color: #64748b;
    font-size: 11px;
    background: rgba(241, 245, 249, 0.9);
    padding: 4px 10px;
    border-radius: 6px;
}

.chat-input.placeholder {
    color: #aaa; /* Placeholder-Farbe */
}

/* Modern Toggle More Button */
button.toggle-more {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(99, 102, 241, 0.05) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 8px;
    padding: 6px 14px;
    font-weight: 500;
    font-size: 12px;
    color: #6366f1;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-top: 8px;
}

button.toggle-more:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(99, 102, 241, 0.1) 100%);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

button.toggle-more:active {
    transform: translateY(0);
}

.toggle-container {
    display: flex;
    justify-content: flex-start;
    margin-top: 4px;
}

.toggle-more .toggle-icon {
    display: inline-block;
    margin-left: 4px;
    transition: transform 0.2s ease;
    font-size: 10px;
}

.toggle-more:hover .toggle-icon {
    transform: translateY(2px);
}

.toggle-more .toggle-text {
    font-weight: 500;
}

/* Modern Chat Message Type Icons */
.message-type-icons-chat {
    display: flex;
    gap: 4px;
    position: absolute;
    left: 0;
    top: -8px;
}

span.chat-message-icon {
    width: 22px;
    height: 22px;
    fill: #cbd5e1;
    padding: 4px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

span.chat-message-icon:hover {
    fill: var(--secondary-color, #6366f1);
    background: rgba(99, 102, 241, 0.1);
}

span.chat-message-icon svg {
    width: 14px;
    height: 14px;
}

.chat-message-icon.active {
    fill: var(--secondary-color, #6366f1);
    background: rgba(99, 102, 241, 0.1);
}

.chat-message-container.blurred {
    filter: blur(2px);
    position: relative;
}

.delete-chat-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.8);
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.delete-chat-icon svg {
    width: 24px;
    height: 24px;
}






.chat-message-text {
    margin: 5px;
    /*display: -webkit-box; /* Flex layout for multi-line truncation */
    display: flex;
    flex-direction: column;
    -webkit-box-orient: vertical; /* Textfluss vertikal anordnen */
    overflow: hidden; /* Text, der nicht passt, ausblenden */
    text-overflow: ellipsis; /* Drei Punkte am Ende anzeigen */
    -webkit-line-clamp: 2; /* Maximale Anzahl der sichtbaren Zeilen */
    cursor: pointer; /* Zeigt, dass der Text interaktiv ist */
    transition: all 0.3s ease; /* Smooth transitions */
    padding: 5px;
    padding-top: 10px;
}

.chat-message-text p {
    padding: 1px;
}

.chat-message-text.expanded {
    -webkit-line-clamp: unset; /* Hebt die Begrenzung der Zeilen auf */
    display: block; /* Allows display of any number of lines */
    overflow: visible;
}

/* Modern Message Action Icons */
.edit-message-icon {
    width: 36px;
    height: 36px;
    fill: white;
    padding: 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: all 0.15s ease;
}

.edit-message-icon:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.save-icon {
    width: 28px;
    height: 28px;
    padding: 6px;
    fill: #22c55e;
    background: rgba(34, 197, 94, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.save-icon:hover {
    background: rgba(34, 197, 94, 0.2);
}

.delete-icon {
    width: 36px;
    height: 36px;
    fill: #f87171;
    padding: 8px;
    border-radius: 10px;
    background: rgba(248, 113, 113, 0.15);
    cursor: pointer;
    transition: all 0.15s ease;
}

.delete-icon:hover {
    fill: #ef4444;
    background: rgba(239, 68, 68, 0.25);
    transform: scale(1.05);
}

.more-icon {
    width: 24px;
    height: 24px;
    padding: 4px;
    fill: #64748b;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.more-icon:hover {
    fill: #334155;
    background: rgba(100, 116, 139, 0.1);
}

.action-icons {
    opacity: 0;
    transition: all 0.2s ease;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.95) 100%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 16px;
    display: flex;
    justify-content: center;
    gap: 20%;
    align-items: center;
    pointer-events: none;
}

.action-icons.active {
    opacity: 1;
    pointer-events: all;
}

.show-more-option-icons {
    position: absolute;
    right: 12px;
    top: 8px;
    display: flex;
    gap: 4px;
}


/* Modern Chat Popup Container */
.chat-popup-container {
    width: calc(60% - 30px);
    margin-left: auto;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 10px 15px -3px rgba(0, 0, 0, 0.08);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 0;
    height: 100%;
    border: 1px solid rgba(226, 232, 240, 0.5);
}

div#chatInputContainer {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    box-shadow:
        0 -2px 10px rgba(0, 0, 0, 0.03),
        0 2px 4px rgba(0, 0, 0, 0.02);
    border-radius: 16px;
    padding: 12px 16px;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.15s ease;
}

div#chatInputContainer:focus-within {
    border-color: var(--secondary-color, #6366f1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Oberste Zeile mit dem Eingabefeld */
/* Modern Chat Input Area */
.chat-input-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    padding: 12px 16px;
    margin-top: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: all 0.15s ease;
}

.chat-input-container:focus-within {
    border-color: var(--secondary-color, #6366f1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.input-row {
    display: flex;
    align-items: center;
    width: 100%;
}

.chat-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    padding: 8px 12px;
    resize: none;
    max-height: 200px;
    overflow-y: auto;
    border-radius: 10px;
    color: #334155;
    line-height: 1.5;
}

/* Placeholder-Stil */
.chat-input::placeholder {
    color: #94a3b8;
}

.chat-input[placeholder]:empty:before {
    content: attr(placeholder);
    color: #94a3b8;
}

/* Untere Zeile mit den Icons und dem Senden-Button */
.icon-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
}

.message-type-icons {
    display: flex;
    gap: 8px;
}

.message-type-icons .icon, .icon-chat-datepicker {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    fill: #94a3b8;
    border-radius: 8px;
    transition: all 0.15s ease;
    background: transparent;
}

.message-type-icons .icon:hover, .icon-chat-datepicker:hover {
    background: #f1f5f9;
    fill: var(--secondary-color, #6366f1);
}

.message-type-icons .icon svg, .icon-chat-datepicker svg {
    width: 20px;
    height: 20px;
}

.date-picker-container {
    display: flex;
    gap: 8px;
    margin: auto;
    justify-content: center;
    align-items: center;
}

.date-picker-container input#chat-date-input {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
    padding: 6px 10px;
    background: #f8fafc;
    color: #334155;
    transition: all 0.15s ease;
}

.date-picker-container input#chat-date-input:focus {
    outline: none;
    border-color: var(--secondary-color, #6366f1);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

input[type="date"]::-webkit-calendar-picker-indicator {
    display: none;
}

/* =========================================================
 * Org-Popup Follow-up Enhancements (Schritt 8)
 * ========================================================= */
.ee-followup-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #64748b;
    margin-bottom: 4px;
    text-align: center;
}
.ee-followup-countdown {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    margin-top: 4px;
    color: #64748b;
}
.ee-followup-countdown.is-upcoming { color: #2e7d32; }
.ee-followup-countdown.is-soon     { color: #e65100; }
.ee-followup-countdown.is-overdue  { color: #c62828; font-weight: 600; }
.ee-followup-countdown.is-none     { color: #9e9e9e; }

.date-picker-container.ee-followup-overdue {
    border-left: 3px solid #c62828;
    padding-left: 8px;
    border-radius: 4px;
}

.message-type-icons .icon.active {
    fill: var(--secondary-color, #6366f1);
    background: rgba(99, 102, 241, 0.1);
}

#aiSvgIcon {
    width: 36px;
    height: 36px;
    margin-left: auto;
    margin-top: 12px;
    margin-right: 8px;
    fill: #94a3b8;
    border-radius: 10px;
    padding: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

#aiSvgIcon:hover {
    background: #f1f5f9;
}

#aiSvgIcon.active {
    fill: var(--secondary-color, #6366f1);
    background: rgba(99, 102, 241, 0.1);
}

/* Modern Send Button */
.send-message-button {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--secondary-color, #6366f1) 0%, #4f46e5 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.15s ease;
    fill: white;
    position: relative;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.send-message-button svg {
    width: 22px;
    height: 22px;
}

.send-message-button:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.send-message-button:active {
    transform: translateY(0);
}

/* Spinner mit `::after` erzeugen */
.send-message-button::after {
    content: '';
    position: absolute;
    top: 50%; /* Zentriere den Spinner vertikal */
    left: 50%; /* Zentriere den Spinner horizontal */
    width: 24px; /* Spinner-Breite */
    height: 24px; /* Spinner height */
    border: 3px solid rgba(255, 255, 255, 0.5); /* Halbtransparenter Rahmen */
    border-top-color: #fff; /* Spinner front color */
    border-radius: 50%; /* Macht den Spinner rund */
    transform: translate(-50%, -50%) scale(0); /* Spinner verstecken */
    transition: transform 0.3s ease; /* Animation beim Erscheinen */
    z-index: 1; /* Overlays button content */
    animation: none; /* No animation by default */
}

/* Aktiviert den Spinner */
.send-message-button.loading::after {
    transform: translate(-50%, -50%) scale(1); /* Spinner anzeigen */
    animation: spinSendButton 1s linear infinite; /* Rotation starten */
}

/* Spinner-Animation */
@keyframes spinSendButton {
    from {
        transform: translate(-50%, -50%) rotate(0deg); /* Initialer Zustand */
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg); /* Endzustand */
    }
}

/* Button-Inhalt bei aktiviertem Spinner ausblenden */
.send-message-button.loading {
    fill: transparent; /* Text unsichtbar machen */
}



/* project popup left side informations*/
.projects-popup-details {
    width: 40%;
    float: left;
    position: relative;
    overflow-y: auto;
    flex: 1;
    height: 100%;
}

/* Modern Organization Status Bar */
.projects-popup-organization-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    position: absolute;
    top: 16px;
    width: calc(100% - 80px);
}

.status-select-container select {
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background-color: #f8fafc;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s ease;
    font-weight: 500;
}

.status-select-container select:hover {
    border-color: #cbd5e1;
    background-color: #ffffff;
}

.status-select-container select:focus {
    outline: none;
    border-color: var(--secondary-color, #6366f1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Modern Lost Customer Button */
.lost-customer-btn {
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
    border: 1px solid #fca5a5;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lost-customer-btn:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border-color: #b91c1c;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
    transform: translateY(-1px);
}

.lost-customer-btn:active {
    transform: translateY(0);
}

/* Modern Status Select Container */
.status-select-container {
    display: flex;
    justify-content: flex-start;
    gap: 12px;
}

/* Responsive Anpassung - moved to ee-responsive.css */


div#projectsPopupDetailsOneEE {
    padding: 10px;
    margin: 10px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
}

div#organizationSHeaderEE {
    color: var(--secondary-color);
    font-size: 18px;
    font-weight: 600;
    margin-top: 10px;
    text-align: center;
}

div#organizationStatusContainer {
    display: flex;
    justify-content: space-around;
    margin: 20px 0px;
}

div#testPeriodInfo {
    font-weight: 600;
    text-align: center;
    margin: 10px;
}

input#testPeriodDate {
    border: none;
    border-radius: 5px;
}




/* Modern Map Container - Full size in new layout */
div#projectPopupDetailsMap {
    height: 100%;
    width: 100%;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    border: none;
}

/* Modern Organization Name Input */
input#projects-popup-organization-name {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
}

/* Modern Address Input */
input#projects-popup-organization-address {
    font-size: 14px;
    color: #64748b;
    height: 46px;
}

.projects-popup-details h2 {
    font-size: 16px;
    color: #334155;
    font-weight: 600;
}

/* Modern Contact Details Container */
div#projectPopupDetailsContact {
    margin: 14px;
    overflow-y: auto;
    position: relative;
    padding: 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

/* Modern Field Groups */
.projects-popup-field-group,
.projects-popup-field-group-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.projects-popup-field-group label {
    min-width: 80px;
    font-weight: 600;
    color: #64748b;
    font-size: 13px;
}

/* Modern Input Fields */
.projects-popup-input {
    background-color: transparent;
    border: none !important;
    border-bottom: 2px solid #e2e8f0 !important;
    color: #334155;
    width: 100%;
    cursor: pointer;
    padding: 8px 8px !important;
    font-size: 14px;
    transition: all 0.15s ease;
}

.projects-popup-input:hover {
    border-bottom-color: #cbd5e1 !important;
}

.projects-popup-input:focus,
.projects-popup-input-active {
    border-bottom-color: var(--secondary-color, #6366f1) !important;
    outline: none !important;
    cursor: text !important;
    background-color: transparent;
}

/* Modern Rating Stars */
div#organizationRatingContainer {
    display: flex;
    justify-content: center;
    position: absolute;
    right: 16px;
    gap: 4px;
}

.ratingIcon {
    width: 22px;
    height: 22px;
    fill: #e2e8f0;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 2px;
}

.ratingIcon:hover {
    fill: var(--secondary-color, #6366f1);
    transform: scale(1.15);
}

.ratingIcon.active {
    fill: var(--secondary-color, #6366f1);
}


/* Modern Contact Container */
.projects-popup-contact {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: calc(100% - 60px);
    padding: 8px 0;
    position: relative;
    height: auto;
    min-height: 40px;
}

.projects-popup-contact.blurred {
    filter: blur(4px);
    pointer-events: none;
    transition: filter 0.2s ease;
}

.projects-popup-contact.blurredSave {
    filter: blur(4px);
    pointer-events: none;
}

/* Modern Contact Rows */
.projects-popup-contact-row {
    display: flex;
    gap: 16px;
    justify-content: space-between;
    align-items: center;
    min-height: 40px;
}

/* Modern Contact Fields */
.projects-popup-contact-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
}

/* Modern Contact Action Buttons */
.projects-popup-contact-button {
    padding: 0;
    background: linear-gradient(135deg, var(--secondary-color, #6366f1) 0%, #4f46e5 100%);
    fill: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    transition: all 0.15s ease;
    margin: auto;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.25);
}

button.projects-popup-contact-button svg {
    fill: white;
    height: 16px;
    width: 16px;
}

.projects-popup-contact-button:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.projects-popup-contact-button:active {
    transform: translateY(0);
}

/* Modern Popup Overlay */
.projects-popup-overlay {
    position: absolute;
    left: 50%;
    top: 50%;
    margin: auto;
    width: 320px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow:
        0 10px 25px -5px rgba(0, 0, 0, 0.1),
        0 8px 10px -6px rgba(0, 0, 0, 0.05);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translate(-50%, -50%);
    padding: 8px;
}

div#phone-popup {
    width: 220px;
}

/* Modern Contact Action Container */
.projects-popup-contact-action {
    position: absolute;
    top: 50%;
    right: -56px;
    transform: translateY(-50%);
    display: flex;
    gap: 8px;
    height: auto;
}

/* Input-Feld im Popup */
.projects-popup-overlay input {
    flex: 1;
    padding: 5px 10px !important;
    font-size: 14px;
    border: none;
    border-bottom: 2px solid #ddd;
    outline: none;
    transition: border-color 0.3s ease;
    height: 40px;
    max-width: calc(100% - 40px);
    border-radius: 20px;
}

.projects-popup-overlay input:focus {
    border-color: #4caf50;
}

/* Icon-Button im Popup */
.projects-popup-icon-button {
    background-color: var(--primary-color);
    fill: var(--third-color);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
    position: absolute;
    right: 0;
    top: 0;
}

.projects-popup-icon-button:hover {
    background-color: #45a049;
}

.projects-popup-address-container {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.address-suggestions {
    position: absolute;
    top: 100%; /* Direkt unter dem Input-Feld */
    left: 0;
    right: 0;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    max-height: 200px; /* Max dropdown height */
    overflow-y: auto; /* Scrollbar for long lists */
    z-index: 1000;
    display: none; /* Hidden by default */
    list-style: none;
    margin: 0;
    padding: 0;
}

.address-suggestions li {
    padding: 10px;
    cursor: pointer;
}

.address-suggestions li:hover {
    background-color: #f0f0f0;
}

ul#address-suggestions {
    list-style: none;
    width: 90%;
    background: var(--third-color);
}


/*prject List*/

div#singleProjectsContainer {
    min-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Container for each organization */
.singleorganizationContainer {
    display: flex; /* Flexbox aktivieren */
    flex-direction: row; /* Inhalte nebeneinander */
    align-items: center; /* Vertikale Zentrierung */
    gap: 15px; /* Abstand zwischen den Spalten */
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1);
    min-width: 100%;
    flex: 0 0 auto;
    position: relative;
    cursor: pointer;
}

.organizationB2B, .organizationB2BWaiting {
        background: rgb(0 9 18 / 60%);
        backdrop-filter: blur(5px);
        color: var(--header-color-light) !important;
}


.organizationB2BWaiting {
}

.notInOrganization {
    border: 1px solid red;
    opacity: 0.4;
}


/* Remove newOrganizationContainer from flex flow so it does not break column alignment */
.newOrganizationContainer {
    position: absolute;
    left: 0;
    top: 0;
    pointer-events: none;
}

.newIconSvg {
    width: 30px;
    fill: green;
    position: absolute;
    left: 0px;
    top: -10px;
}

.projects-popup-toggle {
    padding: 5px 10px;
    font-size: 14px;
    width: 130px;
}



/* Modern Project Cards */
.project-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.04),
        0 4px 6px -1px rgba(0, 0, 0, 0.05);
    min-width: 100%;
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: all 0.15s ease;
    animation: cardSlideIn 0.2s ease-out backwards;
}

.project-row:nth-child(1) { animation-delay: 0.02s; }
.project-row:nth-child(2) { animation-delay: 0.04s; }
.project-row:nth-child(3) { animation-delay: 0.06s; }
.project-row:nth-child(4) { animation-delay: 0.08s; }
.project-row:nth-child(5) { animation-delay: 0.1s; }
.project-row:nth-child(n+6) { animation-delay: 0.12s; }

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-row:hover {
    transform: translateY(-2px);
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.04),
        0 10px 20px -5px rgba(0, 0, 0, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
}

select.project-organization-dropdown {
    border-radius: 10px;
    padding: 10px 14px;
    width: 100%;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 14px;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s ease;
}

select.project-organization-dropdown:hover {
    border-color: #cbd5e1;
    background: #ffffff;
}

select.project-organization-dropdown:focus {
    outline: none;
    border-color: var(--secondary-color, #6366f1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.project-delete-button {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 1px solid #fca5a5;
    color: #dc2626;
    cursor: pointer;
    margin-left: 8px;
    flex-shrink: 0;
    padding: 10px 16px;
    border-radius: 10px;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 12px;
    margin-right: 12px;
    width: auto;
    min-width: 90px;
    transition: all 0.15s ease;
    letter-spacing: 0.5px;
}

.project-delete-button:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    border-color: #b91c1c;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

.project-delete-button:active {
    transform: translateY(0);
}

.project-field {
    flex: 1;
    padding: 0 12px;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
    color: #334155;
}

/* Modern Favorite Icon */
.favIcon {
    max-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    fill: #cbd5e1;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.favIcon:hover {
    fill: var(--secondary-color, #6366f1);
    background: rgba(99, 102, 241, 0.08);
    transform: scale(1.1);
}

.favIcon svg {
    width: 18px;
    height: 18px;
}

.favIcon.active {
    fill: var(--secondary-color, #6366f1);
}

.favIcon.active:hover {
    fill: #4f46e5;
}



/* Modern Action Button */
.project-button {
    flex-shrink: 0;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--secondary-color, #6366f1) 0%, var(--secondary-color, #4f46e5) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 12px;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: 600;
    width: auto;
    min-width: 130px;
    letter-spacing: 0.5px;
    transition: all 0.15s ease;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
}

.project-button:hover {
    background: linear-gradient(135deg, var(--secondary-color, #4f46e5) 0%, #4338ca 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
}

.project-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
}

#project-index {
    max-width: 40px;
}

#project-size, #project-timeStamp {
    max-width: 100px;
}

.organizationName {
    font-weight: 600;
}


.singleorganizationContainer h2 {
    text-align: left;
    font-weight: 600;
    font-size: 1rem;
    color: var(--primary-color);
    padding: 0px;
}

.singleorganizationContainer p {
    font-size: 1rem;
    font-weight: 500;
    padding: 0px;
    text-align: left;
}

/*organization tabs — horizontally scrollable, never wrapping or clipping */
/* IMPORTANT: This tab bar must ALWAYS be visible, even when the Pipeline Board
   is active.  The board replaces tab CONTENT, never the tab BUTTONS. */
.org-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    border-bottom: 1px solid #ccc;
    border-radius: 4px 4px 0 0;
    width: 100%;
    gap: 0;
}

/* Hide scrollbar — Webkit (Chrome, Safari, Edge) */
.org-tabs::-webkit-scrollbar {
    display: none;
}

/* Tab-Buttons */
.org-tab-button {
    background-color: inherit;
    flex-shrink: 0;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 14px 16px;
    transition: 0.3s;
    font-size: 16px;
    white-space: nowrap;
}

/* Tab hover effect */
.org-tab-button:hover {
    background-color: #ddd;
}

/* Aktiver Tab */
.org-tab-button.active {
    background-color: #fff;
    border-bottom: 2px solid var(--secondary-color);
}
.org-tab-button.org-tab-empty {
    opacity: 0.4;
    font-style: italic;
}
.org-tab-button.org-tab-empty.active {
    opacity: 0.7;
}


/* B2B buttons — left-aligned next to mode toggle (no margin-left:auto) */

/* Tab-Inhalt */
.org-tab-content {
    display: none;
    padding-top: 20px;
    flex-wrap: wrap;
    justify-content: flex-start;
    min-width: 100%;
}

/* First tab shown by default */
.org-tab-content:first-of-type {
    display: block;
}



/* Modern Spinner */

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(99, 102, 241, 0.1);
    border-top: 3px solid var(--secondary-color, #6366f1);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    position: absolute;
    left: calc(50% - 18px);
    top: calc(50% - 18px);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-spinner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    animation: fadeIn 0.15s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}




/* Tab tooltips responsive - moved to ee-responsive.css */






@keyframes pulse {
    0%, 100% {
        transform: translateX(-50%) scale(1); /* Original size */
        opacity: 1; /* Voll sichtbar */
    }
    50% {
        transform: translateX(-50%) scale(1.1); /* Slightly enlarged */
        opacity: 0.7; /* Leicht transparent */
    }
}

/* payment popup*/

/* Payment Popup CSS */

.paymentPopup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.paymentPopup-container {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
}

.paymentPopup-header {
    background: linear-gradient(135deg, var(--primary-color, #007bff), var(--secondary-color, #28a745));
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    text-align: center;
    position: relative;
}

.paymentPopup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.paymentPopup-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.paymentPopup-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: var(--header-color-light);
}

.paymentPopup-subtitle {
    margin: 8px 0 0 0;
    font-size: 16px;
    opacity: 0.9;
}

.paymentPopup-content {
    display: flex;
    min-height: 400px;
}

.paymentPopup-section {
    flex: 1;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.paymentPopup-section.left {
    background-color: #f8f9fa;
    border-right: 2px solid #e9ecef;
}

.paymentPopup-section.right {
    background-color: white;
}

.paymentPopup-option-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.paymentPopup-option-price {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--primary-color, #007bff);
}

.paymentPopup-option-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
    text-align: left;
}

.paymentPopup-consent-container {
    margin-bottom: 25px;
    text-align: left;
}

.paymentPopup-consent-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12px;
    color: #555;
    line-height: 1.4;
}

.paymentPopup-consent-checkbox input[type="checkbox"] {
    margin-top: 3px;
    accent-color: var(--primary-color, #007bff);
}

.paymentPopup-button {
    background: var(--primary-color, #007bff);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 200px;
    position: relative;
    overflow: hidden;
}

.paymentPopup-button:hover {
    background: var(--secondary-color, #28a745);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

.paymentPopup-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.paymentPopup-button.premium {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
}

.paymentPopup-button.premium:hover {
    background: linear-gradient(135deg, #ee5a24, #ff6b6b);
}

.paymentPopup-loading {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.paymentPopup-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color, #007bff);
    border-radius: 50%;
    animation: paymentPopupSpin 1s linear infinite;
}

.paymentPopup-section.active{
    flex-direction: row;
    text-align: left;
}

.paymentPopup-rightInner.active{
    width: 50%;
}

@keyframes paymentPopupSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.paymentPopup-features {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    text-align: left;
}

.paymentPopup-features li {
    padding: 8px 0;
    position: relative;
    padding-left: 25px;
    font-size: 14px;
    color: #555;
    list-style: none;
}

.paymentPopup-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--secondary-color, #28a745);
    font-weight: bold;
}

.paymentPopup-woocommerce-container {
    display: none;
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
}

/* Payment popup responsive - moved to ee-responsive.css */


/* Skeleton Loading Container */
.organizationsContainerLoadingOverlay {
    width: 100%;
    background: #fff;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.organizationsContainerLoadingOverlay:not(.active) {
    display: none;
}

.organizationsContainerLoadingOverlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Skeleton Zeilen */
.skeleton-row {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 0.5px solid #f0f0f0;
    gap: 15px;
    margin-bottom: 20px;
}

.skeleton-row:last-child {
    border-bottom: none;
}

/* Skeleton Items */
.skeleton-item {
    background: linear-gradient(
            90deg,
            #f0f0f0 0%,
            #e0e0e0 50%,
            #f0f0f0 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
    height: 20px;
}

/* Shimmer Animation */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Spalten-Proportionen */
.skeleton-name {
    flex: 0 0 150px;
}

.skeleton-email {
    flex: 0 0 150px;
}

.skeleton-phone {
    flex: 0 0 140px;
}

.skeleton-status {
    flex: 0 0 72px;
    height: 24px;
    border-radius: 8%;
}

.skeleton-vo {
    flex: 0 0 40px;
}

.skeleton-fu {
    flex: 0 0 40px;
}

.skeleton-progress {
    flex: 0 0 260px;
}

.skeleton-date {
    flex: 0 0 79px;
}

.skeleton-actions {
    flex: 0 0 130px;
}


/* =====================================================
   NEW DASHBOARD LAYOUT - Project Popup Redesign
   ===================================================== */

/* Main Popup Container Override */
.projects-popup-container {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.projects-popup-content {
    width: 95vw;
    height: 92vh;
    background: #f8fafc;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

.projects-popup-inner-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    max-height: none;
    min-width: auto;
}

/* Close Button */
.projects-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    color: #64748b;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.projects-popup-close:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* ========================================
   MODERN POPUP DASHBOARD - Clean Design
   ======================================== */

.popup-dashboard {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #f0f4f8;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    gap: 12px;
}

/* Header - Floating Box */
.popup-header {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 412px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    z-index: 100;
    gap: 16px;
}

.header-left {
    flex: 1;
    min-width: 0;
}

.org-name-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.org-name-container input {
    font-size: 18px;
    font-weight: 600;
    color: #1a202c;
    border: none;
    background: transparent;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
    min-width: 200px;
}

.org-name-container input:hover,
.org-name-container input:focus {
    background: rgba(0, 0, 0, 0.04);
    outline: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Test Period Indicator */
.test-period-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    border-radius: 20px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    animation: pulse-glow 2s ease-in-out infinite;
}

.test-period-indicator .indicator-dot {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    animation: pulse-dot 1.5s ease-in-out infinite;
}

.test-period-indicator .indicator-text {
    white-space: nowrap;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(72, 187, 120, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(72, 187, 120, 0); }
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.8); }
}

/* Contacts Rating - Stars in contacts header */
.contacts-rating {
    display: flex;
    gap: 2px;
}

.contacts-rating .ratingIcon {
    width: 18px;
    height: 18px;
    fill: #cbd5e0;
    cursor: pointer;
    transition: all 0.15s;
}

.contacts-rating .ratingIcon:hover,
.contacts-rating .ratingIcon.active {
    fill: var(--secondary-color, #6366f1);
    transform: scale(1.1);
}

/* Header left section for contacts card */
.header-left-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dropdown,
.owner-dropdown select {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s;
}

.status-dropdown:hover,
.owner-dropdown select:hover {
    border-color: #a0aec0;
}

.status-dropdown:focus,
.owner-dropdown select:focus {
    outline: none;
    border-color: var(--secondary-color, #6366f1);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.header-icon-btn,
.header-lost-btn,
.header-close-btn {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.header-icon-btn {
    background: #f7fafc;
    color: #718096;
}

.header-icon-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.header-icon-btn:hover {
    background: #edf2f7;
    color: #4a5568;
}

.header-icon-btn.active {
    background:var(--secondary-color, #6366f1);
    color: #fff;
}

.header-icon-btn.has-badge {
    position: relative;
}

.header-icon-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.4);
    animation: ee-badge-pulse 2s infinite;
}

.header-icon-badge:empty {
    display: none;
}

.header-lost-btn {
    background: #fff5f5;
    color: #c53030;
}

.header-lost-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.header-lost-btn:hover {
    background: #fed7d7;
}

.header-close-btn {
    background: #f7fafc;
    color: #a0aec0;
}

.header-close-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

/* Organization Tasks Button - in rightHeaderContainer next to Neue Analyse */
button.org-tasks-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    display: inline-flex;
    align-items: center;
    margin-right: 10px;
}

button.org-tasks-btn:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%) !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

button.org-tasks-btn svg {
    stroke: white;
}

/* Close button outside popup - top right corner */
.popup-close-outside {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 30px;
    height: 30px;
    border: none;
    background: #fff;
    border-bottom-left-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.2s;
    transform: scale(0.8);
}

.mapboxgl-ctrl-top-right {
    display: none;
}

.popup-close-outside svg {
    width: 18px;
    height: 18px;
    stroke: #718096;
}

.popup-close-outside:hover {
    background: #fed7d7;
    transform: scale(1.1);
}

.popup-close-outside:hover svg {
    stroke: #c53030;
}

/* Assigned user initials badge */
.assigned-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--secondary-color, #6366f1) 0%, var(--primary-color) 100%);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 50%;
    letter-spacing: 0.5px;
    pointer-events: none; /* Prevent blocking clicks on adjacent elements */
    flex-shrink: 0;
}

/* Ensure B2B settings button is always clickable */
#b2bSettingsBtn {
    position: relative;
    z-index: 10;
}

/* Settings Panel - Modern Design */
.settings-panel {
    position: absolute;
    top: 80px;
    right: 428px;
    width: 340px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
    z-index: 200;
    animation: settingsSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes settingsSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: linear-gradient(135deg, var(--secondary-color, #667eea) 0%, #764ba2 100%);
    border-radius: 20px 20px 0 0;
    color: white;
}

.panel-header span {
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.3px;
}

.panel-header button {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    cursor: pointer;
    font-size: 20px;
    color: white;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.panel-header button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.panel-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.panel-body label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: -6px;
}

.panel-body select,
.panel-body input[type="date"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #2d3748;
    background: #fff;
    transition: all 0.2s;
    cursor: pointer;
    -webkit-appearance: none;
}

.panel-body select:focus,
.panel-body input:focus {
    outline: none;
    border-color: var(--secondary-color, #6366f1);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 0;
    font-size: 14px !important;
    text-transform: none !important;
    color: #4a5568 !important;
}

.checkbox-row input {
    width: 18px;
    height: 18px;
    accent-color: var(--secondary-color, #6366f1);
}

.date-info {
    font-size: 12px;
    color: #718096;
}

.date-info.active { color: #38a169; }
.date-info.expired { color: #e53e3e; }

/* Settings Sections - Modern Design */
.settings-section {
    padding: 16px;
    margin: 0 -4px;
    background: #f8fafc;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.settings-section:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.settings-section:first-child {
    margin-top: 0;
}

.settings-section:last-child {
    margin-bottom: 0;
}

.settings-section-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--secondary-color, #667eea);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-section-title::before {
    content: '';
    width: 4px;
    height: 16px;
    background: linear-gradient(135deg, var(--secondary-color, #667eea) 0%, #764ba2 100%);
    border-radius: 2px;
}

.settings-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #2d3748;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.settings-select:focus {
    outline: none;
    border-color: var(--secondary-color, #6366f1);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Owner dropdown in settings */
.settings-section .owner-dropdown select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #2d3748;
    background: #fff;
}

/* Lost button in settings */
.lost-btn-settings {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    margin-top: 8px;
    border: 1px solid #fed7d7;
    background: #fff5f5;
    border-radius: 8px;
    color: #c53030;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.lost-btn-settings:hover {
    background: #fed7d7;
    border-color: #fc8181;
}

.lost-btn-settings svg {
    stroke: currentColor;
}

/* Settings Action Buttons (Merge, Trash) - Modern Design */
.settings-actions-section {
    margin-top: 4px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%) !important;
    border-color: rgba(102, 126, 234, 0.2) !important;
}

.settings-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.settings-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.settings-action-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.25s;
}

.settings-action-btn:hover::before {
    opacity: 1;
}

.settings-action-btn:active {
    transform: scale(0.98);
}

.settings-action-btn svg {
    flex-shrink: 0;
    transition: transform 0.25s;
}

.settings-action-btn:hover svg {
    transform: scale(1.1);
}

.settings-action-btn.merge-btn {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border: 2px solid #60a5fa;
    color: #1d4ed8;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.settings-action-btn.merge-btn:hover {
    background: linear-gradient(135deg, #bfdbfe 0%, #93c5fd 100%);
    border-color: #3b82f6;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.25);
    transform: translateY(-2px);
}

.settings-action-btn.trash-btn {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 2px solid #f87171;
    color: #dc2626;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15);
}

.settings-action-btn.trash-btn:hover {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-color: #ef4444;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.25);
    transform: translateY(-2px);
}

.settings-action-btn.lost-btn {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    color: #b45309;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}

.settings-action-btn.lost-btn:hover {
    background: linear-gradient(135deg, #fde68a 0%, #fcd34d 100%);
    border-color: #d97706;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.25);
    transform: translateY(-2px);
}

.settings-action-btn.onhold-btn {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #38bdf8;
    color: #0369a1;
    box-shadow: 0 2px 8px rgba(56, 189, 248, 0.15);
}

.settings-action-btn.onhold-btn:hover {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    border-color: #0ea5e9;
    box-shadow: 0 4px 16px rgba(56, 189, 248, 0.25);
    transform: translateY(-2px);
}

/* Settings form elements - consistent width */
.settings-panel .settings-select,
.settings-panel .settings-input,
.settings-panel select,
.settings-panel input[type="date"] {
    width: 100%;
    box-sizing: border-box;
}

/* Main Body - Full screen for map */
.popup-body {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

/* Map Container - Full Background */
.map-container {
    position: absolute;
    inset: 0;
    background: #e2e8f0;
}

.map-view {
    width: 100%;
    height: 100%;
}

/* Floating Sidebar */
.floating-sidebar {
    position: absolute;
    top: 16px;
    right: 16px;
    bottom: 16px;
    width: 380px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 50;
    overflow-y: auto;
    padding-right: 4px;
}

/* Allow notes to break out of sidebar when expanded */
.floating-sidebar.notes-expanded {
    overflow: visible;
}

.floating-sidebar::-webkit-scrollbar {
    width: 4px;
}

.floating-sidebar::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

/* Sidebar Cards */
.sidebar-card {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

.sidebar-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    font-weight: 600;
    font-size: 13px;
    color: #4a5568;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* [REMOVED v2.11.0] Favorite Card Styles -- abgeloest durch Activity Panel (M2). */

/* Contacts Card */
.contacts-card {
    display: flex;
    flex-direction: column;
}

.contacts-card:not(.expanded) {
    max-height: none;
    min-height: 260px;
}

.contacts-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
}

.count-badge {
    background: var(--secondary-color, #6366f1);
    color: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

/* Contact Item - Clean Design */
.contact-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 10px;
    transition: all 0.2s;
}

.contact-card:hover {
    border-color: var(--secondary-color, #6366f1)
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.contact-card:last-child {
    margin-bottom: 0;
}

.contact-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.contact-salutation {
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 12px;
    background: #f7fafc;
    color: #4a5568;
    cursor: pointer;
}

.contact-salutation:hover {
    border-color: #cbd5e0;
}

.contact-name-input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    background: #f7fafc;
    color: #2d3748;
    width: calc(50% - 40px);
}

.contact-name-input:hover {
    border-color: #cbd5e0;
}

.contact-name-input:focus,
.contact-salutation:focus {
    outline: none;
    border-color: var(--secondary-color, #6366f1);
    background: #fff;
}

.contact-expand-icon {
    color: #a0aec0;
    font-size: 10px;
    cursor: pointer;
    padding: 4px;
}

.contact-card-body {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #edf2f7;
}

.contact-card-body.expanded {
    display: block;
}

.contact-info-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f7fafc;
    padding: 8px 12px;
    border-radius: 8px;
}

.contact-info-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-info-icon svg {
    width: 16px;
    height: 16px;
    fill: var(--secondary-color, #6366f1);
}

.contact-info-input {
    flex: 1;
    padding: 4px 0;
    border: none;
    border-radius: 0;
    font-size: 13px;
    background: transparent;
    color: #2d3748;
    width: 100%;
}

.contact-info-input:focus {
    outline: none;
}

.contact-info-input::placeholder {
    color: #a0aec0;
}

.contact-action-link {
    padding: 6px 10px;
    text-decoration: none;
    font-size: 14px;
    background: #edf2f7;
    border-radius: 6px;
    transition: all 0.2s;
}

.contact-action-link:hover {
    background: var(--secondary-color, #6366f1);
}

/* Contact Status Badges */
.contact-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-left: auto;
    flex-shrink: 0;
}

.contact-status-badge.internal {
    background: #e2e8f0;
    color: #64748b;
}

.contact-status-badge.external {
    background: #dcfce7;
    color: #16a34a;
}

.contact-status-badge.invited {
    background: #fef3c7;
    color: #d97706;
}

/* Contact Action Buttons Row */
.contact-actions-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
}

.contact-action-btn {
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
    color: #4a5568;
}

.contact-action-btn svg {
    flex-shrink: 0;
}

.contact-action-btn:hover {
    border-color: #cbd5e0;
    background: #f7fafc;
}

.contact-action-btn.invite {
    color: #2563eb;
    border-color: #bfdbfe;
    background: #eff6ff;
}

.contact-action-btn.invite:hover {
    background: #dbeafe;
    border-color: #93c5fd;
}

.contact-action-btn.convert {
    color: #7c3aed;
    border-color: #ddd6fe;
    background: #f5f3ff;
}

.contact-action-btn.convert:hover {
    background: #ede9fe;
    border-color: #c4b5fd;
}

.contact-action-btn.danger {
    color: #dc2626;
    border-color: #fecaca;
    background: #fef2f2;
}

.contact-action-btn.danger:hover {
    background: #fee2e2;
    border-color: #fca5a5;
}

/* Add Contact Button */
.add-contact-btn {
    width: 100%;
    padding: 12px 16px;
    margin-top: 12px;
    border: 2px dashed #cbd5e0;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    transition: all 0.2s;
}

.add-contact-btn:hover {
    border-color: var(--primary-color, #3fa14d);
    color: var(--primary-color, #3fa14d);
    background: rgba(63, 161, 77, 0.05);
}

.add-contact-btn svg {
    stroke: currentColor;
}

/* Contact Card Header - Compact */
.contact-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
}

.contact-name-display {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #2d3748;
}

/* Contact Form Grid - Vertical Layout */
.contact-form-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-form-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-form-row label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Notification Toggle */
.contact-notification-row {
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
}

.contact-notification-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    transition: opacity 0.2s;
}

.contact-notification-toggle.saved .contact-notif-label::after {
    content: ' ✓';
    color: #34C759;
}

.contact-notif-checkbox {
    display: none;
}

.contact-notif-slider {
    position: relative;
    width: 36px;
    height: 20px;
    background: #cbd5e0;
    border-radius: 10px;
    flex-shrink: 0;
    transition: background 0.2s;
}

.contact-notif-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.contact-notif-checkbox:checked + .contact-notif-slider {
    background: #007AFF;
}

.contact-notif-checkbox:checked + .contact-notif-slider::after {
    transform: translateX(16px);
}

.contact-notif-label {
    font-size: 12px;
    font-weight: 500;
    color: #4a5568;
    text-transform: none;
    letter-spacing: 0;
}

.contact-input {
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: #f8fafc;
    color: #2d3748;
    transition: all 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.contact-input:hover {
    border-color: #cbd5e0;
}

.contact-input:focus {
    outline: none;
    border-color: var(--secondary-color, #6366f1);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.contact-input-with-action {
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-input-with-action .contact-input {
    flex: 1;
}

.contact-quick-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #64748b;
    text-decoration: none;
    transition: all 0.2s;
    flex-shrink: 0;
}

.contact-quick-action:hover {
    background: var(--secondary-color, #6366f1);
    color: #fff;
}

.contact-quick-action svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Notes Card */
.notes-card {
    flex: 1;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.notes-card.expanded {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    /* Extend left beyond sidebar - sidebar is at right:16px, width:380px */
    /* So we need to extend left by: (popup-width - 32px) - 380px */
    /* Using calc with vw as approximation for popup width */
    left: calc(-95vw + 412px);
    width: auto;
    z-index: 150;
    max-height: none;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
}

/* Contacts Card Expanded */
.contacts-card.expanded {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    left: calc(-95vw + 412px);
    width: auto;
    z-index: 150;
    max-height: none !important;
    height: auto;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
}

.contacts-card.expanded .contacts-list,
.contacts-card.expanded #projectPopupDetailsContact {
    max-height: none !important;
    height: calc(100% - 60px);
    overflow-y: auto;
}

/* Grid layout for expanded contacts */
.contacts-card.expanded .contacts-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    align-content: start;
}

.contacts-card.expanded .contact-card {
    margin-bottom: 0;
    max-width: 450px;
}

.floating-sidebar.contacts-expanded {
    overflow: visible;
}

.expand-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.expand-btn svg {
    width: 14px;
    height: 14px;
    stroke: #ffffff;
}

.expand-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

.expand-btn.active {
    background: var(--secondary-color, #6366f1);
}

.expand-btn.active svg {
    stroke: #fff;
}

.notes-display {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    min-height: 100px;
}

.notes-input-area {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 12px 16px;
}

.notes-input {
    width: 100%;
    min-height: 40px;
    max-height: 80px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 13px;
    resize: none;
    margin-bottom: 10px;
    outline: none;
}

.notes-input:focus {
    border-color: var(--secondary-color, #6366f1);
}

.notes-input:empty:before {
    content: attr(placeholder);
    color: #a0aec0;
}

.notes-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.message-type-icons {
    display: flex;
    gap: 4px;
}

.type-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    background: #f7fafc;
    transition: all 0.2s;
}

.type-icon svg {
    width: 16px;
    height: 16px;
    fill: #718096;
}

.type-icon:hover {
    background: #edf2f7;
}

.type-icon:hover svg {
    fill: #4a5568;
}

.type-icon.active {
    background: #ebf4ff;
    box-shadow: inset 0 0 0 2px var(--secondary-color, #6366f1);
}

.type-icon.active svg {
    fill: var(--secondary-color, #6366f1);
}

/* AI Toggle Icon */
.ai-toggle-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    background: #f7fafc;
    transition: all 0.2s;
    margin-left: 4px;
}

.ai-toggle-icon svg {
    width: 18px;
    height: 18px;
    stroke: #718096;
}

.ai-toggle-icon:hover {
    background: #edf2f7;
}

.ai-toggle-icon:hover svg {
    stroke: #4a5568;
}

.ai-toggle-icon.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.ai-toggle-icon.active svg {
    stroke: #ffffff;
}

.notes-actions input.date-picker {
    width: 150px;
    flex: 0 0 150px;
    height: 32px;
    box-sizing: border-box;
    padding: 0 10px 0 34px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 12px;
    line-height: 30px;
    color: #334155;
    background-color: #f7fafc;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4' width='18' height='18' rx='2' ry='2'/><line x1='16' y1='2' x2='16' y2='6'/><line x1='8' y1='2' x2='8' y2='6'/><line x1='3' y1='10' x2='21' y2='10'/></svg>");
    background-repeat: no-repeat;
    background-position: 10px center;
    background-size: 16px 16px;
    margin-left: auto;
    cursor: pointer;
    transition: all 0.15s ease;
}

.notes-actions input.date-picker::placeholder {
    color: #94a3b8;
}

.notes-actions input.date-picker:hover {
    border-color: #cbd5e1;
    background-color: #edf2f7;
}

.notes-actions input.date-picker:focus {
    outline: none;
    border-color: var(--secondary-color, #6366f1);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.notes-actions input.date-picker.followUp {
    color: #ef4444;
    border-color: #fecaca;
    background-color: #fef2f2;
}

.send-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--secondary-color, #6366f1);
    color: #fff;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
}

.send-btn:hover {
    background: #5a67d8;
    transform: scale(1.05);
}

/* Floating Projects Panel */
.floating-projects {
    position: absolute;
    bottom: 16px;
    left: 16px;
    right: 412px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    max-height: 45%;
    display: flex;
    flex-direction: column;
    z-index: 50;
    transition: all 0.3s ease;
}

.projects-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.projects-title {
    font-weight: 600;
    font-size: 14px;
    color: #2d3748;
}

.projects-count {
    background: var(--secondary-color, #6366f1);
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.projects-grid {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Project Item */
.project-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #f7fafc;
    border-radius: 12px;
    transition: all 0.2s;
    cursor: pointer;
}

.project-item:hover {
    background: #edf2f7;
    transform: translateX(4px);
}

.project-item.is-favorite {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border: 1px solid #d6bcfa;
}

.project-fav-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #cbd5e0;
    transition: all 0.2s;
    flex-shrink: 0;
}

.project-fav-btn:hover {
    color: #f6ad55;
    transform: scale(1.1);
}

.project-fav-btn.active {
    background: #faf5ff;
    color: #f6ad55;
}

.project-item-main {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.project-item-number {
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 600;
    color: #4a5568;
    background: #edf2f7;
    border-radius: 4px;
    padding: 2px 6px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.project-item-title {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #2d3748;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* MaStR-Indikator in der Org-Projektliste (nur EE-intern) */
.mastr-org-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    margin-right: 4px;
    cursor: help;
}
.mastr-org-icon.is-in-betrieb {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.12);
}
.mastr-org-icon.is-in-planung {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.12);
}
.mastr-org-icon.is-unconfirmed {
    border: 2px solid #ef4444;
}

.project-item-size {
    font-size: 13px;
    color: #718096;
    font-weight: 500;
}

.project-item-actions {
    display: flex;
    gap: 6px;
}

.project-action-btn {
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s;
}

.project-action-btn:hover {
    border-color: var(--secondary-color, #6366f1);
    color: var(--secondary-color, #6366f1);
}

.project-action-btn.primary {
    background: var(--secondary-color, #6366f1);
    border-color: var(--secondary-color, #6366f1);
    color: #fff;
}

.project-action-btn.primary:hover {
    background: var(--secondary-color, #6366f1);
}

.project-action-btn.danger {
    color: #e53e3e;
    border-color: #fed7d7;
}

.project-action-btn.danger:hover {
    background: #fed7d7;
}

/* Map button for centering on project */
.project-action-btn.map-btn {
    padding: 6px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f9ff;
    border-color: #bae6fd;
    color: #0284c7;
}

.project-action-btn.map-btn:hover {
    background: #0284c7;
    border-color: #0284c7;
    color: #fff;
}

.project-action-btn.map-btn svg {
    stroke: currentColor;
}

/* Project item highlight animation when map is centered */
.project-item.map-highlighted {
    animation: highlight-pulse 0.5s ease-out;
    background: linear-gradient(135deg, #ebf8ff 0%, #bee3f8 100%) !important;
    border: 2px solid #0284c7 !important;
    border-radius: 12px;
}

@keyframes highlight-pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.4); }
    50% { transform: scale(1.02); box-shadow: 0 0 0 10px rgba(2, 132, 199, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(2, 132, 199, 0); }
}

/* Projektentwicklung Checkbox - EE Users only */
.project-dev-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-radius: 20px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    color: #92400e;
    transition: all 0.2s ease;
    white-space: nowrap;
    margin-left: 8px;
}

.project-dev-checkbox:hover {
    background: linear-gradient(135deg, #fde68a 0%, #fcd34d 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.project-dev-checkbox input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0;
    cursor: pointer;
    accent-color: #f59e0b;
}

.project-dev-checkbox:has(input:checked) {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-color: #10b981;
    color: #065f46;
}

.project-dev-checkbox:has(input:checked):hover {
    background: linear-gradient(135deg, #a7f3d0 0%, #6ee7b7 100%);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.project-dev-label {
    user-select: none;
}

/* Visual feedback when Projektentwicklung is active */
.project-dev-checkbox.active {
    animation: devModeActivate 0.4s ease;
}

@keyframes devModeActivate {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Gray out other elements when dev mode is active */
.project-item-meta.dev-mode-active .project-item-status {
    opacity: 0.3;
    pointer-events: none;
}

.project-item-meta.dev-mode-active .project-unlock-toggle,
.project-item-meta.dev-mode-active .project-visibility-toggle {
    opacity: 0.5;
}

/* Toggle switches for owner - Enable/Lock & Internal/External */
.project-unlock-toggle,
.project-visibility-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    margin-left: 6px;
}

.project-unlock-toggle {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.project-unlock-toggle:has(input:checked) {
    background: #d1fae5;
    border-color: #6ee7b7;
    color: #065f46;
}

/* Forced active state when Projektentwicklung is enabled */
.project-unlock-toggle.forced-active {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-color: #10b981;
    color: #065f46;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.project-unlock-toggle.disabled {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.project-unlock-toggle.disabled .toggle-slider {
    opacity: 0.5;
}

.project-unlock-toggle.forced-active .toggle-label {
    font-weight: 600;
}

.project-visibility-toggle {
    background: #e0e7ff;
    border: 1px solid #a5b4fc;
    color: #3730a3;
}

.project-visibility-toggle:has(input:checked) {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1e40af;
}

.project-unlock-toggle:hover,
.project-visibility-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.project-unlock-toggle input[type="checkbox"],
.project-visibility-toggle input[type="checkbox"] {
    display: none;
}

.project-unlock-toggle .toggle-slider,
.project-visibility-toggle .toggle-slider {
    position: relative;
    width: 28px;
    height: 14px;
    background: #cbd5e1;
    border-radius: 7px;
    transition: all 0.2s ease;
}

.project-unlock-toggle .toggle-slider::after,
.project-visibility-toggle .toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.project-unlock-toggle:has(input:checked) .toggle-slider {
    background: #10b981;
}

.project-unlock-toggle:has(input:checked) .toggle-slider::after {
    left: 16px;
}

.project-visibility-toggle:has(input:checked) .toggle-slider {
    background: #3b82f6;
}

.project-visibility-toggle:has(input:checked) .toggle-slider::after {
    left: 16px;
}

.project-unlock-toggle .toggle-label,
.project-visibility-toggle .project-visibility-label {
    user-select: none;
    min-width: 45px;
}

.project-visibility-label.internal {
    color: #6b7280;
}

.project-visibility-label.external {
    color: #1e40af;
}

/* Disabled state for toggle */
.project-unlock-toggle:has(input:disabled) {
    opacity: 0.5;
    cursor: not-allowed;
}

.project-unlock-toggle:has(input:disabled):hover {
    transform: none;
    box-shadow: none;
}

/* Disabled Button Style */
.project-action-btn.primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #94a3b8;
}

.project-action-btn.primary:disabled:hover {
    transform: none;
    box-shadow: none;
}

.no-projects {
    text-align: center;
    padding: 40px 20px;
    color: #a0aec0;
}


/* ============================================================================
   PROJECTS PAGINATION
   ============================================================================ */

.projects-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px;
    margin-top: 8px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.pagination-btn {
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease, opacity 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: #5a6fd6;
}

.pagination-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.pagination-info {
    font-size: 14px;
    color: #495057;
    font-weight: 500;
}

.pagination-total {
    color: #6c757d;
    font-weight: 400;
}

/* ============================================================================
   ORGANIZATIONS LIST PAGINATION - Modern Design
   ============================================================================ */

.organizations-pagination-wrapper {
    padding: 14px 20px;
    margin: 0;
    background: var(--org-surface-primary, #ffffff);
}

.organizations-pagination-wrapper.top {
    border-bottom: 1px solid var(--org-border-light, rgba(0, 0, 0, 0.06));
}

.organizations-pagination-wrapper.bottom {
    border-top: 1px solid var(--org-border-light, rgba(0, 0, 0, 0.06));
}

.organizations-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

/* Per-Page Selector */
.org-pagination-perpage {
    display: flex;
    align-items: center;
    gap: 8px;
}

.org-pagination-perpage label {
    font-size: 12px;
    color: var(--org-text-secondary, #6e6e73);
    font-weight: 500;
}

.org-perpage-select {
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--org-border-light, rgba(0, 0, 0, 0.08));
    border-radius: var(--org-radius-sm, 6px);
    background: var(--org-surface-secondary, #f8f9fa);
    font-size: 13px;
    color: var(--org-text-primary, #1a1a1a);
    cursor: pointer;
    transition: all var(--org-transition-fast, 120ms ease-out);
    min-width: 65px;
    outline: none;
}

.org-perpage-select:hover {
    border-color: rgba(0, 0, 0, 0.15);
}

.org-perpage-select:focus {
    border-color: var(--org-accent, #007AFF);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* Navigation Buttons */
.org-pagination-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    background: var(--org-surface-secondary, #f8f9fa);
    padding: 3px;
    border-radius: var(--org-radius-sm, 6px);
}

.org-pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    color: var(--org-text-secondary, #6e6e73);
    border: none;
    border-radius: var(--org-radius-sm, 6px);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all var(--org-transition-fast, 120ms ease-out);
}

.org-pagination-btn:hover:not(:disabled) {
    background: var(--org-accent, #007AFF);
    color: white;
}

.org-pagination-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.org-pagination-btn:disabled {
    color: var(--org-text-muted, #aeaeb2);
    cursor: not-allowed;
    opacity: 0.5;
}

/* Page Input */
.org-pagination-page-input {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 8px;
}

.org-page-input {
    width: 44px;
    height: 28px;
    padding: 0 6px;
    border: 1px solid var(--org-border-light, rgba(0, 0, 0, 0.08));
    border-radius: var(--org-radius-sm, 6px);
    background: var(--org-surface-primary, #ffffff);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    color: var(--org-text-primary, #1a1a1a);
    transition: all var(--org-transition-fast, 120ms ease-out);
    -moz-appearance: textfield;
    outline: none;
}

.org-page-input::-webkit-outer-spin-button,
.org-page-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.org-page-input:hover {
    border-color: rgba(0, 0, 0, 0.15);
}

.org-page-input:focus {
    border-color: var(--org-accent, #007AFF);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.org-page-separator {
    color: var(--org-text-muted, #aeaeb2);
    font-weight: 500;
    font-size: 13px;
}

.org-pagination-page-input .orgTotalPages {
    font-size: 13px;
    font-weight: 500;
    color: var(--org-text-secondary, #6e6e73);
}

/* Info Section */
.org-pagination-info {
    font-size: 12px;
    color: var(--org-text-secondary, #6e6e73);
    font-weight: 500;
    white-space: nowrap;
}

.org-pagination-info .orgCurrentCount {
    color: var(--org-text-primary, #1a1a1a);
    font-weight: 600;
}

.org-pagination-info .orgTotalCount {
    color: var(--org-text-primary, #1a1a1a);
    font-weight: 600;
}

/* Pagination: Hidden elements */
.pagination-hidden {
    display: none !important;
}

#paginationOrganization {
    text-align: center;
    font-size: 14px;
    color: #495057;
}

/* Pagination responsive - moved to ee-responsive.css */

.loading-projects {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-size: 14px;
}

/* ============================================================================
   ORGANIZATION SIDE MENU - Fixed left sidebar with Tasks & Notes
   ============================================================================ */

.ee-org-side-menu {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 89;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
    background: #fff;
    border-radius: 0 16px 16px 0;
    box-shadow: 2px 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-left: none;
    will-change: transform;
}

.ee-org-side-menu-item {
    position: relative;
    display: flex;
    align-items: center;
    padding: 6px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    height: 38px;
    overflow: visible;
}

.ee-org-side-menu-item:hover {
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.ee-org-side-menu-item svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* Label text - clip with width */
.ee-org-side-menu-item-text {
    white-space: nowrap;
    font-weight: 500;
    font-size: 14px;
    width: 0;
    opacity: 0;
    margin-left: 0;
    display: inline-block;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.2s ease 0.05s,
                margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* On MENU hover: expand ALL labels */
.ee-org-side-menu:hover .ee-org-side-menu-item-text {
    width: 140px;
    opacity: 1;
    margin-left: 10px;
}

/* Notes button - different gradient */
.ee-org-side-menu-item.notes {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.ee-org-side-menu-item.notes:hover {
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
}

/* Badge for unread comments */
.ee-org-side-menu-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
    animation: ee-badge-pulse 2s infinite;
    z-index: 10;
}

.ee-org-side-menu-badge:empty,
.ee-org-side-menu-badge[data-count="0"] {
    display: none;
}

@keyframes ee-badge-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Notifications button style */
.ee-org-side-menu-item.notifications {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.ee-org-side-menu-item.notifications:hover {
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

/* ============================================================================
   NOTIFICATIONS POPUP
   ============================================================================ */

.ee-notifications-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: ee-notifications-fade-in 0.2s ease;
}

@keyframes ee-notifications-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ee-notifications-popup {
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: ee-notifications-slide-up 0.3s ease;
}

@keyframes ee-notifications-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ee-notifications-header {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px 24px;
    border-bottom: 1px solid #e9ecef;
}

/* Top row: tab navigation grows to fill, close button sits flush right. */
.ee-notifications-header-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ee-notifications-header-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
}

.ee-notifications-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a2e;
    flex: 1;
}

/* Second row: scope toggle pinned left, action buttons grouped right. */
.ee-notifications-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Pushes the "Mark read"/"Delete all" buttons to the right edge. */  
.ee-notifications-scope-toggle {
    margin-right: auto;
}

.ee-notifications-scope-toggle {
    display: flex;
    background: #f1f3f4;
    border-radius: 8px;
    padding: 4px;
}

.ee-notifications-scope-toggle button {
    padding: 6px 14px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}

.ee-notifications-scope-toggle button.active {
    background: #fff;
    color: #1a1a2e;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ee-notifications-mark-all-btn {
    padding: 7px 14px;
    background: #f1f3f4;
    border: none;
    border-radius: 8px;
    color: #666;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}

.ee-notifications-mark-all-btn:hover {
    background: #e9ecef;
    color: #333;
}

.ee-notifications-close-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #f1f3f4;
    color: #666;
    font-size: 20px;
    line-height: 1;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ee-notifications-close-btn:hover {
    background: #e9ecef;
    color: #333;
}

.ee-notifications-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.ee-notifications-loading,
.ee-notifications-empty,
.ee-notifications-error {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-size: 14px;
}

.ee-notifications-date-group {
    margin-bottom: 12px;
}

.ee-notifications-date-header {
    font-size: 11px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 0 6px;
    margin-bottom: 4px;
    border-bottom: 1px solid #f1f3f4;
}

.ee-notification-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.ee-notification-item + .ee-notification-item {
    margin-top: 8px;
}

.ee-notification-item:hover {
    background: #f8f9fa;
}

.ee-notification-item.unread {
    background: rgba(102, 126, 234, 0.05);
}

.ee-notification-item.unread:hover {
    background: rgba(102, 126, 234, 0.1);
}

.ee-notification-item.priority-high {
    border-left: 3px solid #f59e0b;
}

.ee-notification-item.priority-urgent {
    border-left: 3px solid #ef4444;
}

.ee-notification-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 1px;
}

.ee-notification-icon svg {
    width: 16px;
    height: 16px;
    color: white;
    stroke: white;
}

.ee-notification-content {
    flex: 1;
    min-width: 0;
}

.ee-notification-title {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 1px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ee-notification-message {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 2px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ee-notification-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 11px;
    color: #adb5bd;
}

.ee-notification-meta span {
    display: flex;
    align-items: center;
}

.ee-notification-org {
    background: #f1f3f4;
    padding: 2px 8px;
    border-radius: 4px;
}

.ee-notification-unread-dot {
    width: 8px;
    height: 8px;
    background: #667eea;
    border-radius: 50%;
    flex-shrink: 0;
}

.ee-notification-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    margin-left: auto;
    padding-left: 8px;
}

.ee-notification-delete-btn {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: #adb5bd;
    border-radius: 6px;
    transition: all 0.2s ease;
    opacity: 0;
}

.ee-notification-item:hover .ee-notification-delete-btn {
    opacity: 1;
}

.ee-notification-delete-btn:hover {
    background: #fee2e2;
    color: #dc2626;
}

.ee-notification-delete-btn svg {
    width: 16px;
    height: 16px;
    display: block;
}

/* Link/Open button */
.ee-notification-link-btn {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: #adb5bd;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.ee-notification-link-btn:hover {
    background: #e0f2fe;
    color: #0284c7;
}

.ee-notification-link-btn svg {
    width: 16px;
    height: 16px;
    display: block;
}

.ee-notifications-delete-all-btn {
    background: none;
    border: 1px solid #fca5a5;
    color: #dc2626;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ee-notifications-delete-all-btn:hover {
    background: #fee2e2;
    border-color: #dc2626;
}

.ee-notifications-settings-link {
    padding: 16px 24px;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.ee-notifications-settings-link a {
    color: #667eea;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.ee-notifications-settings-link a:hover {
    text-decoration: underline;
}

/* ============================================================================
   NOTIFICATIONS SETTINGS POPUP
   ============================================================================ */

.ee-notifications-settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ee-notifications-settings-popup {
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.ee-notifications-settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
}

.ee-notifications-settings-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
}

.ee-notifications-settings-content {
    padding: 20px 24px;
}

.ee-notifications-settings-content hr {
    border: none;
    border-top: 1px solid #e9ecef;
    margin: 16px 0;
}

.ee-notifications-setting {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    cursor: pointer;
}

.ee-notifications-setting input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.ee-notifications-setting span {
    font-size: 14px;
    color: #333;
}

.ee-notifications-settings-footer {
    padding: 16px 24px;
    border-top: 1px solid #e9ecef;
    text-align: right;
}

.ee-notifications-settings-save {
    padding: 10px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.ee-notifications-settings-save:hover {
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* ===== EMAIL TEMPLATE EDITOR ===== */

/* Tab Navigation */
.ee-notifications-tabs {
    display: flex;
    flex: 1;
    gap: 0;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 0;
}

.ee-notifications-tab {
    flex: 1;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}

.ee-notifications-tab:hover {
    color: #334155;
}

.ee-notifications-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Tab Content */
.ee-notifications-tab-content {
    display: none;
}

.ee-notifications-tab-content.active {
    display: block;
}

/* Email Templates Container */
.ee-email-templates {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 8px;
}

.ee-email-templates::-webkit-scrollbar {
    width: 6px;
}

.ee-email-templates::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.ee-email-templates::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.ee-email-templates::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Template Card */
.ee-template-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s;
}

.ee-template-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Template Header */
.ee-template-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
    transition: background 0.2s;
}

.ee-template-header:hover {
    background: #f1f5f9;
}

.ee-template-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ee-template-name {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}

.ee-template-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ee-template-badge.customized {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.ee-template-badge.default {
    background: #e2e8f0;
    color: #64748b;
}

.ee-template-toggle {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: transparent;
    transition: all 0.2s;
}

.ee-template-header:hover .ee-template-toggle {
    background: rgba(102, 126, 234, 0.1);
}

.ee-template-toggle svg {
    width: 20px;
    height: 20px;
    stroke: #64748b;
    transition: transform 0.3s;
}

.ee-template-card.expanded .ee-template-toggle svg {
    transform: rotate(180deg);
}

/* Template Editor */
.ee-template-editor {
    display: none;
    padding: 20px;
    background: #fff;
}

.ee-template-card.expanded .ee-template-editor {
    display: block;
}

.ee-template-field {
    margin-bottom: 16px;
}

.ee-template-field:last-of-type {
    margin-bottom: 20px;
}

.ee-template-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}

.ee-template-field input,
.ee-template-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    background: #f8fafc;
    transition: all 0.2s;
    box-sizing: border-box;
}

.ee-template-field input:hover,
.ee-template-field textarea:hover {
    border-color: #cbd5e1;
}

.ee-template-field input:focus,
.ee-template-field textarea:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.ee-template-field textarea {
    min-height: 80px;
    resize: vertical;
    line-height: 1.5;
}

/* Template Actions */
.ee-template-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.ee-template-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.ee-template-btn.save {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.ee-template-btn.save:hover {
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transform: translateY(-1px);
}

.ee-template-btn.reset {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.ee-template-btn.reset:hover {
    background: #e2e8f0;
    color: #475569;
}

/* Loading State */
.ee-email-templates .loading {
    text-align: center;
    padding: 40px;
    color: #64748b;
}

/* Empty State */
.ee-email-templates-empty {
    text-align: center;
    padding: 40px;
    color: #94a3b8;
    font-size: 14px;
}

/* =============================================
   RESPONSIVE FILTER STYLES - Moved to ee-responsive.css
   ============================================= */

/* ===== B2B PARTNER: gleiches Grid-Template wie Standard ===== */
.is-b2b-partner div#sortContainerHeader {
    grid-template-columns: var(--col-flag) var(--col-name) var(--col-mwp) var(--col-lk) var(--col-owner) var(--col-followup) var(--col-date) var(--col-actions);
}
.is-b2b-partner .organizationsContainer.list .singleorganizationContainer {
    grid-template-columns: var(--col-flag) var(--col-name) var(--col-mwp) var(--col-lk) var(--col-owner) var(--col-followup) var(--col-date) var(--col-actions);
}

/* [REMOVED v2.11.0] Pipeline v2 Machbarkeitsanalyse-Card Styles -- abgeloest durch Activity Panel (M2). */

/* Pipeline v2: Pipeline Status Dropdown */
.ee-pipeline-status-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 10px;
}
.ee-pipeline-status-current {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    user-select: none;
    transition: opacity 0.15s;
}
.ee-pipeline-status-current:hover {
    opacity: 0.85;
}
.ee-pipeline-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.ee-pipeline-status-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    min-width: 160px;
    margin-top: 4px;
    overflow: hidden;
}
.ee-pipeline-status-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.1s;
}
.ee-pipeline-status-option:hover {
    background: #f3f4f6;
}
.ee-pipeline-status-option.ee-pipeline-status-selected {
    font-weight: 700;
}

/* Lost Reason Dialog */
.ee-lost-reason-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 100010;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ee-lost-reason-dialog {
    background: white;
    border-radius: 12px;
    padding: 24px;
    width: 380px;
    max-width: 90vw;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}
.ee-lost-reason-dialog h4 {
    margin: 0 0 16px;
    font-size: 1rem;
    color: #1f2937;
}
.ee-lost-reason-select,
.ee-lost-phase-select,
.ee-lost-reason-text {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 10px;
    box-sizing: border-box;
}
.ee-lost-reason-label {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
    margin: 6px 0 4px;
    font-weight: 500;
}
.ee-lost-reason-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}
.ee-lost-reason-cancel {
    padding: 6px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 0.8rem;
}
.ee-lost-reason-save {
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    background: #EF4444;
    color: white;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
}
.ee-lost-reason-save:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Bulk Follow-Up Dialog */
.ee-bulk-followup-dialog {
    background: white;
    border-radius: 12px;
    padding: 24px;
    width: 340px;
    max-width: 90vw;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}
.ee-bulk-followup-dialog h4 {
    margin: 0 0 8px;
    font-size: 1rem;
    color: #1f2937;
}
.ee-bulk-followup-info {
    margin: 0 0 14px;
    font-size: 0.8rem;
    color: #6b7280;
}
.ee-bulk-followup-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 14px;
    box-sizing: border-box;
    cursor: pointer;
    background: #f9fafb;
}
.ee-bulk-followup-input:hover {
    border-color: #9ca3af;
}
.ee-bulk-followup-save {
    background: #2563eb !important;
    color: white !important;
}

/* Pipeline v2: Solateur Comparison Widget */
.ee-solateur-widget {
    background: linear-gradient(135deg, #eff6ff, #eef2ff);
    border: 1px solid #93c5fd;
    border-radius: 12px;
    padding: 16px;
    margin: 12px 0;
}
.ee-solateur-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.ee-solateur-header h4 {
    margin: 0;
    font-size: 0.9rem;
    color: #1e40af;
}
.ee-solateur-add-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
}
.ee-solateur-add-btn:hover {
    background: #2563eb;
}
.ee-solateur-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}
.ee-solateur-table th {
    text-align: left;
    padding: 6px 8px;
    font-size: 0.7rem;
    color: #6b7280;
    text-transform: uppercase;
    border-bottom: 1px solid #93c5fd;
}
.ee-solateur-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}
.ee-solateur-row.ee-solateur-cheapest td {
    background: #f0fdf4;
}
.ee-solateur-notes-row td {
    padding: 2px 8px 6px;
    color: #6b7280;
    font-style: italic;
    border-bottom: 1px solid #e5e7eb;
}
.ee-solateur-notes-row.ee-solateur-cheapest td {
    background: #f0fdf4;
}
.ee-solateur-company {
    font-weight: 600;
}
.ee-solateur-best-badge {
    display: inline-block;
    background: #10B981;
    color: white;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 600;
    margin-left: 4px;
    vertical-align: middle;
}
.ee-solateur-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 600;
}
.ee-solateur-actions {
    display: flex;
    gap: 4px;
}
.ee-solateur-edit-btn,
.ee-solateur-del-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    color: #6b7280;
    opacity: 0.6;
}
.ee-solateur-edit-btn:hover,
.ee-solateur-del-btn:hover {
    opacity: 1;
}
.ee-solateur-del-btn:hover {
    color: #EF4444;
}
.ee-solateur-empty {
    text-align: center;
    color: #6b7280;
    padding: 16px;
    font-size: 0.8rem;
}

/* Solateur Form Overlay */
.ee-solateur-form-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 100010;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ee-solateur-form-dialog {
    background: white;
    border-radius: 12px;
    padding: 24px;
    width: 440px;
    max-width: 92vw;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}
.ee-solateur-form-dialog h4 {
    margin: 0 0 16px;
    font-size: 1rem;
    color: #1f2937;
}
.ee-solateur-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.ee-solateur-form-grid label {
    display: flex;
    flex-direction: column;
    font-size: 0.78rem;
    font-weight: 600;
    color: #374151;
    gap: 3px;
}
.ee-solateur-form-grid input,
.ee-solateur-form-grid select,
.ee-solateur-form-grid textarea {
    padding: 7px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.82rem;
    box-sizing: border-box;
}
.ee-solateur-notes-field {
    grid-column: 1 / -1;
}
.ee-solateur-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
}
.ee-solateur-form-cancel {
    padding: 6px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 0.8rem;
}
.ee-solateur-form-save {
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    background: #3b82f6;
    color: white;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
}
.ee-solateur-form-save:hover {
    background: #2563eb;
}

/* Invoice card enhancements */
.invoice-kwp-price {
    font-size: 0.78rem;
    color: #6b7280;
    margin-top: 2px;
}
.invoice-status-badge {
    display: inline-block;
}


/* Pipeline v2: read-only phase badge (replaces projectStatus dropdown) */
.settings-phase-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 6px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #111827;
    font-size: 13px;
    font-weight: 500;
    min-height: 32px;
}
.settings-phase-badge-value {
    text-transform: none;
}
.settings-phase-hint {
    line-height: 1.3;
}

/* ============================================================================
   Follow-Up Datepicker — custom modal (Safari-safe)
   ============================================================================ */
.ee-fu-datepicker-overlay {
    position: fixed;
    inset: 0;
    background: transparent;
    display: none;
    z-index: 100010;
}
.ee-fu-datepicker-overlay.open {
    display: block;
}
.ee-fu-datepicker-card {
    position: absolute;
    width: 320px;
    max-width: calc(100vw - 32px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.05);
    padding: 16px;
    font-family: inherit;
    color: #0f172a;
    box-sizing: border-box;
    animation: eeFuSlideIn 0.12s ease-out;
}
@keyframes eeFuSlideIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.ee-fu-datepicker-header {
    display: grid;
    grid-template-columns: 32px 1fr 32px 32px;
    align-items: center;
    gap: 4px;
    margin-bottom: 12px;
}
.ee-fu-title {
    text-align: center;
    font-weight: 600;
    font-size: 15px;
    color: #0f172a;
}
.ee-fu-nav,
.ee-fu-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.ee-fu-nav:hover,
.ee-fu-close:hover {
    background: #f1f5f9;
    color: #0f172a;
}
.ee-fu-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 4px;
}
.ee-fu-weekdays span {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    padding: 6px 0;
}
.ee-fu-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}
.ee-fu-day {
    border: none;
    background: transparent;
    border-radius: 6px;
    padding: 0;
    height: 36px;
    font-size: 13px;
    color: #334155;
    cursor: pointer;
    transition: background 0.1s ease, color 0.1s ease;
    font-family: inherit;
}
.ee-fu-day:hover {
    background: #eef2ff;
    color: #1e293b;
}
.ee-fu-day-other {
    color: #cbd5e1;
}
.ee-fu-day-today {
    font-weight: 700;
    color: #6366f1;
}
.ee-fu-day-selected,
.ee-fu-day-selected:hover {
    background: #6366f1;
    color: #fff;
}
.ee-fu-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}
.ee-fu-btn {
    flex: 1;
    border: 1px solid #6366f1;
    background: #6366f1;
    color: #fff;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
}
.ee-fu-btn:hover {
    background: #4f46e5;
    border-color: #4f46e5;
}
.ee-fu-btn-ghost {
    background: transparent;
    color: #64748b;
    border-color: #e2e8f0;
}
.ee-fu-btn-ghost:hover {
    background: #f1f5f9;
    color: #334155;
    border-color: #cbd5e1;
}

/* ==========================================
   M2: Phase Override Buttons (Styles in organization-quick-actions oben)
   ========================================== */
.ee-phase-prev,
.ee-phase-next {
    width: 24px;
    height: 24px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.15s;
    padding: 0;
}
.ee-phase-prev:hover,
.ee-phase-next:hover {
    background: #e0e7ff;
    border-color: #6366f1;
    color: #4338ca;
}

/* ==========================================
   M2: Phase Status Switch (Segmented Control)
   ========================================== */
/* Status-Switch + Toolbar-Icons auf einer Zeile */
.ee-status-toolbar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 8px 0 4px;
    flex-wrap: wrap;
}
.ee-inline-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
}
.ee-phase-status-switch {
    display: flex;
    gap: 0;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    width: fit-content;
    background: #f8fafc;
}
.ee-status-btn {
    padding: 6px 14px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s;
    border-right: 1px solid #e2e8f0;
    font-family: inherit;
}
.ee-status-btn:last-child {
    border-right: none;
}
.ee-status-btn:hover {
    background: #f3f4f6;
}
.ee-status-btn.active[data-status="active"] {
    background: #ecfdf5;
    color: #059669;
    font-weight: 600;
}
.ee-status-btn.active[data-status="on_hold"] {
    background: #fffbeb;
    color: #d97706;
    font-weight: 600;
}
.ee-status-btn.active[data-status="lost"] {
    background: #fef2f2;
    color: #dc2626;
    font-weight: 600;
}
.ee-status-count {
    background: rgba(0,0,0,0.08);
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 16px;
    text-align: center;
}
.ee-status-btn.active .ee-status-count {
    background: rgba(0,0,0,0.1);
}

/* On-Hold reason dialog save button override (amber instead of red) */
.ee-onhold-reason-save {
    background: #d97706 !important;
}
.ee-onhold-reason-save:hover {
    background: #b45309 !important;
}

/* Status filter message */
.ee-status-filter-message {
    border: 1px dashed #e2e8f0;
    border-radius: 10px;
    margin: 8px 0;
}
.ee-status-filter-message p {
    margin: 0;
}

/* ==========================================
   M3: Simple Completion (Machbarkeitsanalyse)
   ========================================== */
.ee-simple-completion .ee-simple-completion-form {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.ee-simple-completion .ee-completion-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: rgba(255,255,255,0.8);
}
.ee-simple-completion .ee-completion-field input[type="date"] {
    width: 100%;
    max-width: 260px;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
}
.ee-simple-complete-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    background: #10b981;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    width: fit-content;
    transition: background 0.15s;
}
.ee-simple-complete-btn:hover:not(:disabled) {
    background: #059669;
}
.ee-simple-complete-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.ee-simple-complete-btn svg {
    width: 16px;
    height: 16px;
}
.ee-simple-upload-accordion {
    margin: 0 20px 20px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    overflow: hidden;
}
.ee-simple-upload-accordion summary {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    user-select: none;
}
.ee-simple-upload-accordion summary:hover {
    color: rgba(255,255,255,0.7);
}

/* ==========================================
   M4: Priority (Flagged) List
   ========================================== */
/* Priority List — elegant purple theme, same grid as org list */
.ee-priority-list {
    margin: 0 0 8px;
    padding: 6px 0;
    background: linear-gradient(135deg, #faf5ff 0%, #f5f3ff 100%);
    /* 1px transparent links/rechts spiegelt die Border der .organization-view-wrapper
       wider, damit die geklonten Grid-Zeilen pixelgenau unter dem Sticky-Header stehen.
       Siehe Erklaerung am Anfang der Datei (~ Zeile 1506). */
    border-left: 1px solid transparent;
    border-right: 1px solid transparent;
    border-bottom: none;
    border-radius: 0;
    border-top: 2px solid #7c3aed;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
    overflow: visible;
    isolation: isolate;
}
.ee-priority-list-header {
    font-size: 0.72rem;
    font-weight: 700;
    color: #6d28d9;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 4px;
    padding: 0 20px;
}
/* Priority-Item: geklonter singleorganizationContainer — exakt gleiche Grid-Regeln wie Hauptliste */
.ee-priority-list .singleorganizationContainer,
.ee-priority-list .ee-priority-item {
    display: grid !important;
    grid-template-columns: var(--col-flag) var(--col-name) var(--col-mwp) var(--col-lk) var(--col-owner) var(--col-followup) var(--col-date) var(--col-actions);
    align-items: center;
    gap: 0;
    padding: 0 20px;
    min-height: 56px;
    border-radius: 0 !important;
    cursor: pointer;
    font-size: 13px;
    color: #1f2937;
    transition: background 0.1s;
    background: transparent !important;
    border-bottom: 1px solid rgba(139,92,246,0.1) !important;
    /* Kein linker farbiger Rand-Effekt in Priority-Liste */
    box-shadow: none !important;
    /* Identische Aussenmasse wie Hauptliste */
    box-sizing: border-box;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    margin: 0;
}
.ee-priority-list .singleorganizationContainer:hover,
.ee-priority-item:hover {
    background: rgba(124,58,237,0.06) !important;
}
/* Phase-Override-Buttons in Priority-Liste immer sichtbar (Trash folgt Hover-Pattern der Hauptliste) */
.ee-priority-list .singleorganizationContainer .ee-phase-override-btns {
    opacity: 1 !important;
}
.ee-priority-item .ee-pi-flag {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #dc2626;
}
.ee-priority-item .ee-pi-name-col {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
}
.ee-pi-name-col .ee-aging-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 4px;
    flex-shrink: 0;
}
.ee-priority-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ee-pi-email, .ee-pi-phone {
    font-size: 0.78rem;
    color: #374151;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 4px;
}
.ee-pi-owner, .ee-pi-followup, .ee-pi-date {
    font-size: 0.75rem;
    color: #6b7280;
    padding: 0 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ee-pi-city { color: #6b7280; font-size: 0.75rem; padding: 0 8px; }
.ee-pi-aging {
    background: #f3f4f6;
    color: #374151;
    font-size: 0.7rem;
    padding: 1px 5px;
    border-radius: 4px;
    font-weight: 600;
}
.ee-pi-note { color: #9ca3af; font-size: 0.75rem; margin-left: 2px; }
.ee-priority-item .ee-pi-status { padding: 0 8px; }
.ee-priority-item .ee-pi-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
    overflow: hidden;
}
.ee-pi-actions .projects-popup-toggle {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px 6px;
    border: none;
    border-radius: 5px;
    background: #16a34a;
    color: white;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1;
}
.ee-pi-actions .projects-popup-toggle:hover { background: #15803d; }
.ee-pi-actions .projects-popup-toggle svg { stroke: white; width: 11px; height: 11px; }
.ee-pi-actions .ee-row-status-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    line-height: 1;
}
.ee-pi-actions .ee-row-status-btn.ee-row-status-onhold {
    background: #fffbeb;
    color: #d97706;
}
.ee-pi-actions .ee-row-status-btn.ee-row-status-lost {
    background: #fef2f2;
    color: #dc2626;
}
.ee-pi-actions .ee-row-status-btn.ee-row-status-reactivate {
    background: #ecfdf5;
    color: #059669;
    width: 28px;
    font-size: 13px;
}
.ee-pi-actions .ee-row-status-btn:hover { opacity: 0.8; }
.ee-pi-row-status {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}
.ee-auto-new-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: #f97316;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ==========================================
   Follow-Up Due List — orange/red theme
   ========================================== */
.ee-followup-due-list {
    margin: 0 0 8px;
    padding: 6px 0;
    background: linear-gradient(135deg, #fff7ed 0%, #fef3e2 100%);
    /* 1px transparent links/rechts spiegelt die Border der .organization-view-wrapper
       wider, damit die geklonten Grid-Zeilen pixelgenau unter dem Sticky-Header stehen. */
    border-left: 1px solid transparent;
    border-right: 1px solid transparent;
    border-bottom: none;
    border-radius: 0;
    border-top: 2px solid #ea580c;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
    overflow: visible;
    isolation: isolate;
}
.ee-followup-due-list-header {
    font-size: 0.72rem;
    font-weight: 700;
    color: #c2410c;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 4px;
    padding: 0 20px;
}
.ee-followup-due-list-header .ee-followup-due-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #ea580c;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 9px;
    margin-left: 6px;
}
/* Sublist title bar — title left, "Mehrfach" toggle right.
   Used by both Priority and Due lists for visual consistency with the main
   toolbar's status-switch row. */
.ee-sublist-title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.ee-sublist-title-bar .ee-sublist-title-text {
    flex: 1 1 auto;
    min-width: 0;
}

/* Bulk-Toggle Button in Priority/Due-List Headers */
.ee-sublist-bulk-btn {
    background: none;
    border: 1px solid currentColor;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 0.7rem;
    cursor: pointer;
    opacity: 0.6;
    margin-left: 8px;
    vertical-align: middle;
    color: inherit;
    transition: opacity 0.15s, background 0.15s;
}
.ee-sublist-bulk-btn:hover {
    opacity: 1;
}

/* Mehrfach-toggle active state — works for the main toolbar button AND the
   per-sublist buttons. When the corresponding list is in bulk-mode, the
   button gets `.active` from `eeToggleBulkModeFor` and visually fills in. */
.ee-mehrfach-toggle-btn.active {
    opacity: 1;
    background: rgba(99, 102, 241, 0.12);
    color: #4338ca;
    border-color: #6366f1;
}
.ee-mehrfach-toggle-btn.active:hover {
    background: rgba(99, 102, 241, 0.2);
}
/* Follow-Up Due Item: geklonter singleorganizationContainer — exakt gleiche Grid-Regeln wie Hauptliste */
.ee-followup-due-list .singleorganizationContainer,
.ee-followup-due-list .ee-followup-due-item {
    display: grid !important;
    grid-template-columns: var(--col-flag) var(--col-name) var(--col-mwp) var(--col-lk) var(--col-owner) var(--col-followup) var(--col-date) var(--col-actions);
    align-items: center;
    gap: 0;
    padding: 0 20px;
    min-height: 56px;
    border-radius: 0 !important;
    cursor: pointer;
    font-size: 13px;
    color: #1f2937;
    transition: background 0.1s;
    background: transparent !important;
    border-bottom: 1px solid rgba(234,88,12,0.1) !important;
    box-shadow: none !important;
    /* Identische Aussenmasse wie Hauptliste */
    box-sizing: border-box;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    margin: 0;
}
.ee-followup-due-list .singleorganizationContainer:hover,
.ee-followup-due-item:hover {
    background: rgba(234,88,12,0.06) !important;
}
/* Phase-Override-Buttons in Follow-Up Due Liste immer sichtbar (Trash folgt Hover-Pattern der Hauptliste) */
.ee-followup-due-list .singleorganizationContainer .ee-phase-override-btns {
    opacity: 1 !important;
}
/* Highlight the followUp column in red */
.ee-followup-due-list .singleorganizationContainer .organizationFollowUp,
.ee-followup-due-item .organizationFollowUp {
    color: #dc2626 !important;
    font-weight: 700 !important;
}

/* Header checkbox for Bulk Select All — visible only in bulk mode */
.ee-bulk-select-all-wrap .ee-bulk-select-all {
    display: none;
    width: 14px;
    height: 14px;
    cursor: pointer;
    accent-color: #7c3aed;
}
.sortContainerHeader.bulk-mode-active .ee-bulk-select-all {
    display: flex;
}
/* Header flag column placeholder */
.sortContainerHeader .ee-header-flag-col {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}
/* Legacy .ee-pin-icon removed — replaced by .ee-flag-col in grid */
.ee-priority-item .ee-dismiss-flag {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #9ca3af;
    padding: 2px 4px;
}
.ee-priority-item .ee-dismiss-flag:hover {
    color: #ef4444;
}

/* Bulk Mode Toggle Button */
.ee-toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    margin-left: 8px;
}
.ee-toolbar-btn:hover { background: #f3f4f6; border-color: #9ca3af; }
.ee-toolbar-btn.active {
    background: #6366f1;
    color: #fff;
    border-color: #6366f1;
}

/* ==========================================
   M4: Global Search
   ========================================== */
.ee-global-search-wrap {
    position: relative;
    width: 100%;
    margin-bottom: 4px;
}
.ee-global-search-wrap .ee-global-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #9ca3af;
    pointer-events: none;
    transition: color 0.15s;
}
.ee-global-search-wrap:focus-within .ee-global-search-icon {
    color: var(--org-accent, #007AFF);
}
.ee-global-search-wrap #ee-global-search {
    width: 100%;
    height: 46px;
    padding: 0 44px 0 38px;
    border: 1px solid var(--org-border-light, rgba(0, 0, 0, 0.08));
    border-radius: var(--org-radius-lg, 14px);
    font-size: 15px;
    background: var(--org-surface-secondary, #f8f9fa);
    color: var(--org-text-primary, #1a1a1a);
    transition: all var(--org-transition-fast, 120ms ease-out);
    box-sizing: border-box;
    outline: none;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}
.ee-global-search-wrap #ee-global-search:hover {
    background: var(--org-surface-primary, #ffffff);
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.ee-global-search-wrap #ee-global-search:focus {
    background: var(--org-surface-primary, #ffffff);
    border-color: var(--org-accent, #007AFF);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
    outline: none;
}
.ee-global-search-wrap .ee-global-search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #9ca3af;
    padding: 4px 8px;
    line-height: 1;
}
.ee-global-search-wrap .ee-global-search-clear:hover {
    color: #374151;
}
/* Global search filter pills */
#ee-global-search-filters {
    margin-bottom: 12px;
    margin-left: 0;
}
.ee-tabs-dimmed .org-tab-button {
    opacity: 0.4;
    pointer-events: none;
}
.ee-tabs-dimmed .org-tab-button.ee-search-tab {
    opacity: 1;
    pointer-events: auto;
}
.ee-search-tab {
    background: #eef2ff !important;
    color: #4338ca !important;
    font-weight: 600 !important;
}
/* ===== GLOBAL SEARCH RESULTS (v2 — eigenstaendige Tabelle) ===== */
.ee-search-results {
    background: var(--org-surface-primary, #fff);
    border-radius: var(--org-radius-lg, 14px);
    border: 1px solid var(--org-border-light, #e5e7eb);
    margin-top: 8px;
    overflow: hidden;
}

.ee-search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--org-surface-secondary, #f9fafb);
    border-bottom: 1px solid var(--org-border-light, #e5e7eb);
}

.ee-search-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ee-search-count {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

.ee-search-legend {
    display: flex;
    gap: 10px;
    font-size: 11px;
    color: #6b7280;
}
.ee-search-legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
}
.ee-search-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.ee-search-table {
    width: 100%;
    border-collapse: collapse;
}

.ee-search-table th {
    text-align: left;
    padding: 8px 12px;
    font-size: 11px;
    text-transform: uppercase;
    color: #9ca3af;
    border-bottom: 1px solid var(--org-border-light, #e5e7eb);
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.ee-search-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 13px;
    color: #374151;
    vertical-align: top;
}

.ee-search-row {
    cursor: pointer;
    transition: background 0.12s;
}
.ee-search-row:hover {
    background: #f0fdf4;
}

.ee-search-name {
    font-weight: 500;
}

.ee-search-email {
    color: #6b7280;
    font-size: 11px;
}

.ee-search-table mark {
    background: #fef08a;
    padding: 0 2px;
    border-radius: 2px;
    color: inherit;
}

.ee-search-empty {
    padding: 40px;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
}

/* Match-type dots */
.ee-search-match-types {
    white-space: nowrap;
}
.ee-search-match-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 3px;
}

/* Phase badges */
.ee-search-phase-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 600;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    min-width: 60px;
    text-align: center;
}
.ee-search-phase--lead {
    background: #dbeafe;
    color: #1d4ed8;
}
.ee-search-phase--sales,
.ee-search-phase--feasibility,
.ee-search-phase--proposal,
.ee-search-phase--solateur_signed {
    background: #fef3c7;
    color: #b45309;
}
.ee-search-phase--projectdevelopment {
    background: #e0e7ff;
    color: #4338ca;
}
.ee-search-phase--construction {
    background: #fce7f3;
    color: #be185d;
}
.ee-search-phase--operation {
    background: #d1fae5;
    color: #047857;
}
.ee-search-phase--unassigned {
    background: #f1f5f9;
    color: #64748b;
}

/* Responsive: auf kleinen Screens weniger Spalten */
@media (max-width: 1024px) {
    .ee-search-table th:nth-child(5),
    .ee-search-table td:nth-child(5),
    .ee-search-table th:nth-child(8),
    .ee-search-table td:nth-child(8) {
        display: none;
    }
}
@media (max-width: 768px) {
    .ee-search-table th:nth-child(4),
    .ee-search-table td:nth-child(4),
    .ee-search-table th:nth-child(6),
    .ee-search-table td:nth-child(6),
    .ee-search-table th:nth-child(7),
    .ee-search-table td:nth-child(7) {
        display: none;
    }
    .ee-search-header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
}

/* ===== SEARCH FALLBACK: Phase Badges ===== */
.ee-search-phase-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 600;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    min-width: 60px;
    text-align: center;
}
.ee-search-phase--lead {
    background: #dbeafe;
    color: #1d4ed8;
}
.ee-search-phase--sales,
.ee-search-phase--feasibility,
.ee-search-phase--proposal,
.ee-search-phase--solateur_signed {
    background: #fef3c7;
    color: #b45309;
}
.ee-search-phase--projectdevelopment {
    background: #e0e7ff;
    color: #4338ca;
}
.ee-search-phase--construction {
    background: #fce7f3;
    color: #be185d;
}
.ee-search-phase--operation {
    background: #d1fae5;
    color: #047857;
}
.ee-search-phase--unassigned {
    background: #f1f5f9;
    color: #64748b;
}
.ee-search-fallback {
    cursor: pointer;
    transition: background 0.15s;
}
.ee-search-fallback:hover {
    background: #f8fafc !important;
}

/* ==========================================
   M5: Aging Badges
   ========================================== */
.ee-aging-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    margin-left: 4px;
}
.ee-aging-badge.green {
    background: #ecfdf5;
    color: #059669;
}
.ee-aging-badge.yellow {
    background: #fffbeb;
    color: #d97706;
}
.ee-aging-badge.red {
    background: #fef2f2;
    color: #dc2626;
}

/* ==========================================
   M5: Bulk Actions Bar
   ========================================== */
.ee-bulk-action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1e293b;
    color: #fff;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.25);
    transform: translateY(100%);
    transition: transform 0.2s ease;
}
.ee-bulk-action-bar.visible {
    transform: translateY(0);
}
.ee-bulk-action-bar .ee-bulk-count {
    font-weight: 600;
    font-size: 0.9rem;
    margin-right: 8px;
    white-space: nowrap;
}
.ee-bulk-action-bar button {
    padding: 6px 16px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: inherit;
    transition: background 0.15s;
}
.ee-bulk-action-bar button:hover {
    background: rgba(255,255,255,0.2);
}
.ee-bulk-action-bar .ee-bulk-close {
    margin-left: auto;
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 20px;
    cursor: pointer;
}
.singleorganizationContainer .ee-bulk-checkbox {
    display: none;
    width: 16px;
    height: 16px;
    margin-right: 6px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: #6366f1;
}
.organizationsContainer.bulk-mode-active .singleorganizationContainer .ee-bulk-checkbox,
.ee-priority-list.bulk-mode-active .singleorganizationContainer .ee-bulk-checkbox,
.ee-followup-due-list.bulk-mode-active .singleorganizationContainer .ee-bulk-checkbox {
    display: flex;
}

/* ==========================================
   M5: Audit Log Timeline
   ========================================== */
.ee-audit-timeline {
    padding: 16px 0;
}
.ee-audit-entry {
    display: flex;
    gap: 12px;
    padding: 10px 16px;
    border-left: 2px solid #e5e7eb;
    margin-left: 8px;
    position: relative;
}
.ee-audit-entry::before {
    content: '';
    width: 10px;
    height: 10px;
    background: #d1d5db;
    border-radius: 50%;
    position: absolute;
    left: -6px;
    top: 14px;
}
.ee-audit-entry.multi-jump::before {
    background: #f97316;
}
.ee-audit-entry .ee-audit-date {
    font-size: 0.75rem;
    color: #9ca3af;
    white-space: nowrap;
    min-width: 80px;
}
.ee-audit-entry .ee-audit-detail {
    font-size: 0.85rem;
    color: #374151;
}
.ee-audit-entry .ee-audit-arrow {
    color: #6b7280;
    font-weight: 600;
}
.ee-audit-entry.multi-jump .ee-audit-detail {
    color: #f97316;
    font-weight: 600;
}

/* M6 Kanban Board (.ee-kanban-*) and View Toggle (.ee-view-toggle*) REMOVED in v2.23.0.
   Replaced by Pipeline Board (ee-pipeline-board.css). */

/* ==========================================
   M4c: Sales Settings Page
   ========================================== */
.ee-sales-settings {
    padding: 24px;
}
.ee-sales-settings h2 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #1e293b;
}
.ee-sales-settings .ee-reasons-section {
    margin-bottom: 32px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}
.ee-reasons-section .ee-reasons-header {
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    font-size: 0.9rem;
    color: #334155;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ee-reasons-section .ee-reason-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.85rem;
}
.ee-reason-row:last-child {
    border-bottom: none;
}
.ee-reason-row .ee-reason-label {
    flex: 1;
    color: #334155;
}
.ee-reason-row .ee-reason-order {
    font-size: 0.75rem;
    color: #94a3b8;
    min-width: 30px;
    text-align: center;
}
.ee-reason-row .ee-reason-toggle {
    position: relative;
    width: 36px;
    height: 20px;
}
.ee-reason-row .ee-reason-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.ee-reason-row .ee-reason-toggle .slider {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #cbd5e1;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s;
}
.ee-reason-row .ee-reason-toggle .slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 2px;
    bottom: 2px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}
.ee-reason-row .ee-reason-toggle input:checked + .slider {
    background: #10b981;
}
.ee-reason-row .ee-reason-toggle input:checked + .slider::before {
    transform: translateX(16px);
}
.ee-reason-row .ee-reason-actions {
    display: flex;
    gap: 4px;
}
.ee-reason-row .ee-reason-actions button {
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    padding: 4px;
    font-size: 14px;
    transition: color 0.15s;
}
.ee-reason-row .ee-reason-actions button:hover {
    color: #374151;
}
.ee-reasons-section .ee-add-reason-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    color: #6366f1;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.1s;
}
.ee-add-reason-btn:hover {
    background: #f8fafc;
}
/* Drag handle for reason reordering */
.ee-reason-drag-handle {
    cursor: grab;
    color: #cbd5e1;
    font-size: 14px;
    padding: 2px 4px;
    user-select: none;
    transition: color 0.15s;
    flex-shrink: 0;
}
.ee-reason-drag-handle:hover {
    color: #64748b;
}
.ee-reason-row.sortable-ghost {
    opacity: 0.4;
    background: #f1f5f9;
}
.ee-reason-row.sortable-chosen {
    background: #f8fafc;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* ── Popup Status Banner Container (absolut unter popup-header) ── */
#ee-popup-status-banner-container {
    position: absolute;
    left: 16px;
    right: 412px;
    z-index: 101;
    pointer-events: none;
}
#ee-popup-status-banner-container:empty {
    display: none;
}

/* ── Popup Status Banner (On Hold / Lost) ── */
.ee-popup-status-banner {
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.4;
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
    pointer-events: all;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}
.ee-popup-status-banner .ee-popup-status-icon {
    font-size: 14px;
    flex-shrink: 0;
}
.ee-popup-status-banner strong {
    font-weight: 600;
}
.ee-popup-status-detail {
    display: block;
    width: 100%;
    margin-top: 2px;
    opacity: 0.85;
    font-size: 12px;
}
.ee-status-on-hold {
    background: #fef3c7;
    color: #92400e;
    border-left: 3px solid #f59e0b;
}
.ee-status-lost {
    background: #fee2e2;
    color: #991b1b;
    border-left: 3px solid #ef4444;
}

/* ============================================================
 * AI Summary Widget (Org Popup)
 * ============================================================ */
.ee-popup-ai-btn {
    color: #7c3aed !important;
}
.ee-popup-ai-btn:hover {
    background: #f5f3ff !important;
    color: #6d28d9 !important;
}
.ee-popup-ai-btn.is-loading {
    opacity: 0.6;
    cursor: not-allowed;
}
.ee-popup-ai-btn svg {
    width: 18px;
    height: 18px;
}

.ee-ai-widget {
    display: flex;
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 100px;
    left: 16px;
    right: 412px;
    padding: 14px 20px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    z-index: 99;
    border-left: 4px solid #7c3aed;
    flex-direction: column;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    pointer-events: none;
}
.ee-ai-widget.is-visible {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}
@keyframes eeAiWidgetFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ee-ai-widget-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #7c3aed;
}
.ee-ai-widget-icon {
    font-size: 16px;
    line-height: 1;
}
.ee-ai-widget-title {
    font-size: 13px;
    font-weight: 700;
}
.ee-ai-widget-actions {
    margin-left: auto;
    display: flex;
    gap: 4px;
}
.ee-ai-widget-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: #6b7280;
    padding: 4px 8px;
    border-radius: 6px;
    line-height: 1;
    min-width: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s ease, color 0.12s ease;
}
.ee-ai-widget-actions button:hover {
    background: rgba(124, 58, 237, 0.1);
    color: #7c3aed;
}

.ee-ai-widget-body {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.6;
    color: #1f2937;
    max-height: 400px;
    overflow-y: auto;
}
.ee-ai-widget-text {
    margin: 0;
    white-space: pre-wrap;
}
.ee-ai-widget-meta {
    margin-top: 8px;
    font-size: 10px;
    color: #9ca3af;
}

.ee-ai-widget.is-collapsed .ee-ai-widget-body {
    display: none;
}

.ee-ai-widget.is-loading .ee-ai-widget-body::after {
    content: '\25CC';
    animation: eeAiWidgetBlink 0.7s infinite;
    color: #7c3aed;
    margin-left: 2px;
}
@keyframes eeAiWidgetBlink {
    50% { opacity: 0; }
}

.ee-ai-widget-typing {
    color: #7c3aed;
    font-style: italic;
}
.ee-ai-widget-typing::after {
    content: '';
    display: inline-block;
    width: 4px;
    height: 13px;
    background: #7c3aed;
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: eeAiWidgetBlink 0.7s step-end infinite;
}

/* ============================================================
 * Contact Compact List
 * ============================================================ */

.contact-list-compact {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 10px;
}

.contact-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.contact-list-item:hover {
    background: #f7fafc;
    border-color: var(--secondary-color, #6366f1);
    box-shadow: 0 1px 4px rgba(99, 102, 241, 0.1);
}

.contact-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.contact-status-dot.internal {
    background: #22c55e;
}

.contact-status-dot.invited {
    background: #f59e0b;
}

.contact-status-dot.external {
    background: #3b82f6;
}

.contact-list-name {
    font-size: 13px;
    font-weight: 500;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.contact-list-meta {
    font-size: 12px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
    flex-shrink: 0;
}

.contact-list-arrow {
    font-size: 20px;
    color: #cbd5e1;
    flex-shrink: 0;
    line-height: 1;
    transition: color 0.15s;
}

.contact-list-item:hover .contact-list-arrow {
    color: var(--secondary-color, #6366f1);
}

/* ============================================================
 * Contact Detail Popup (Modal)
 * ============================================================ */

#ee-contact-detail-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100002;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ee-cdp-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
}

.ee-cdp-card {
    position: relative;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    width: 460px;
    max-width: 92vw;
    max-height: 85vh;
    overflow-y: auto;
    animation: eeContactPopupIn 0.2s ease-out;
}

@keyframes eeContactPopupIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.ee-cdp-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid #edf2f7;
}

.ee-cdp-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ee-cdp-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f1f5f9;
    border-radius: 8px;
    font-size: 20px;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
    line-height: 1;
}

.ee-cdp-close:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.ee-cdp-body {
    padding: 16px 20px 20px;
}

.ee-cdp-body .contact-form-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ee-cdp-body .contact-form-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ee-cdp-body .contact-form-row label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ee-cdp-body .contact-input {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    background: #f8fafc;
    color: #1e293b;
    transition: border-color 0.15s;
}

.ee-cdp-body .contact-input:focus {
    outline: none;
    border-color: var(--secondary-color, #6366f1);
    background: #fff;
}

.ee-cdp-body .contact-input-with-action {
    display: flex;
    gap: 8px;
    align-items: center;
}

.ee-cdp-body .contact-input-with-action .contact-input {
    flex: 1;
}

.ee-cdp-body .contact-quick-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #64748b;
    transition: all 0.15s;
    flex-shrink: 0;
}

.ee-cdp-body .contact-quick-action:hover {
    background: var(--secondary-color, #6366f1);
    color: #fff;
}

.ee-cdp-body .contact-quick-action svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.ee-cdp-body .contact-actions-row {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #edf2f7;
    flex-wrap: wrap;
}

.ee-cdp-body .contact-notification-row {
    margin-top: 4px;
}

.ee-cdp-card.blurredSave {
    opacity: 0.6;
    pointer-events: none;
}

/* ============================================================
   FOCUS DASHBOARD — openOrganizationFocusView()
   Standalone overlay, kein TasksNotes-Dependency
   ============================================================ */

/* ---- OVERLAY ---- */
#ee-focus-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #F8FAFC;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    color: #1E293B;
}

/* ---- HEADER ---- */
.ee-focus-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 20px;
    height: 56px;
    background: #fff;
    border-bottom: 1px solid #E2E8F0;
    flex-shrink: 0;
}
.ee-focus-header-logo {
    color: var(--primary-color, #2d7a3e);
    display: flex;
    align-items: center;
}
.ee-focus-header-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0F172A;
    white-space: nowrap;
}
.ee-focus-header-subtitle {
    font-size: 0.72rem;
    color: #94A3B8;
    white-space: nowrap;
}

/* View toggle */
.ee-focus-view-toggle {
    display: flex;
    background: #F1F5F9;
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
    flex-shrink: 0;
}
.ee-focus-vtoggle {
    background: none;
    border: none;
    padding: 5px 14px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 500;
    color: #64748B;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.ee-focus-vtoggle:hover  { color: #1E293B; }
.ee-focus-vtoggle.active { background: #fff; color: #1E293B; font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

/* Header actions */
.ee-focus-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}
.ee-focus-search {
    height: 32px;
    padding: 0 12px;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    font-size: 0.82rem;
    width: 200px;
    color: #1E293B;
    background: #F8FAFC;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
}
.ee-focus-search:focus { border-color: var(--primary-color, #2d7a3e); background: #fff; box-shadow: 0 0 0 3px rgba(45,122,62,0.08); }

/* GroupBy select */
.ee-focus-groupby {
    height: 32px;
    padding: 0 10px;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    font-size: 0.78rem;
    color: #475569;
    background: #F8FAFC;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s;
}
.ee-focus-groupby:focus { border-color: var(--primary-color, #2d7a3e); }

.ee-focus-new-btn {
    height: 32px;
    padding: 0 14px;
    background: var(--primary-color, #2d7a3e);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.15s;
}
.ee-focus-new-btn:hover { opacity: 0.88; }

.ee-focus-ai-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    color: #64748B;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}
.ee-focus-ai-btn:hover   { background: #F1F5F9; color: #1E293B; border-color: #CBD5E1; }
.ee-focus-ai-btn.loading { opacity: 0.5; cursor: wait; }

.ee-focus-refresh-btn,
.ee-focus-close-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    color: #64748B;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}
.ee-focus-refresh-btn:hover,
.ee-focus-close-btn:hover { background: #F1F5F9; color: #1E293B; border-color: #CBD5E1; }

/* ---- KPI BAR ---- */
.ee-focus-kpi-bar {
    display: flex;
    gap: 1px;
    background: #E2E8F0;
    border-bottom: 1px solid #E2E8F0;
    flex-shrink: 0;
}
.ee-focus-kpi {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: #fff;
    cursor: pointer;
    transition: background 0.12s;
    border-bottom: 2px solid transparent;
}
.ee-focus-kpi:hover  { background: #F8FAFC; }
.ee-focus-kpi.active { background: #F8FAFC; border-bottom-color: var(--primary-color, #2d7a3e); }
.ee-focus-kpi.overdue.active { border-bottom-color: #EF4444; }
.ee-focus-kpi.today.active   { border-bottom-color: #F59E0B; }
.ee-focus-kpi.week.active    { border-bottom-color: #3B82F6; }
.ee-focus-kpi-num {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
    color: #0F172A;
}
.ee-focus-kpi.overdue .ee-focus-kpi-num { color: #EF4444; }
.ee-focus-kpi.today   .ee-focus-kpi-num { color: #D97706; }
.ee-focus-kpi.week    .ee-focus-kpi-num { color: #3B82F6; }
.ee-focus-kpi-label {
    font-size: 0.75rem;
    color: #64748B;
    font-weight: 500;
}

/* ---- BODY ---- */
.ee-focus-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ---- LEFT: Task Feed ---- */
.ee-focus-feed {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.ee-focus-feed-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.ee-focus-feed-scroll::-webkit-scrollbar { width: 5px; }
.ee-focus-feed-scroll::-webkit-scrollbar-thumb { background: #E2E8F0; border-radius: 4px; }

/* Group */
.ee-focus-group { margin-bottom: 10px; }
.ee-focus-group-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0 4px;
    margin-bottom: 2px;
    border-bottom: 1px solid #F1F5F9;
}
.ee-focus-group-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.ee-focus-group-dot.overdue { background: #EF4444; }
.ee-focus-group-dot.today   { background: #F59E0B; }
.ee-focus-group-dot.week    { background: #3B82F6; }
.ee-focus-group-dot.later   { background: #CBD5E1; }
.ee-focus-group-dot.done    { background: #10B981; }
.ee-focus-group-dot.none    { background: #E2E8F0; }
.ee-focus-group-dot.person  { background: #8B5CF6; }
.ee-focus-group-dot.project { background: var(--primary-color, #2d7a3e); }
.ee-focus-group-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex: 1;
}
.ee-focus-group-count {
    font-size: 0.72rem;
    color: #94A3B8;
    background: #F1F5F9;
    border-radius: 10px;
    padding: 1px 7px;
}

/* Task card — compact row style */
.ee-focus-task-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    background: #fff;
    border: 1px solid #F1F5F9;
    border-radius: 4px;
    margin-bottom: 1px;
    cursor: pointer;
    transition: background 0.1s, border-color 0.1s;
    position: relative;
    min-height: 32px;
}
.ee-focus-task-card:hover { background: #F8FAFC; border-color: #E2E8F0; }
.ee-focus-task-card.is-completed { opacity: 0.55; }
.ee-focus-task-card.is-completed .ee-focus-task-title { text-decoration: line-through; color: #94A3B8; }

/* Tagesfunnel cards: slightly more padding */
.ee-focus-tagesfunnel .ee-focus-task-card {
    padding: 6px 10px;
    border-color: #E2E8F0;
    margin-bottom: 2px;
}

/* Status dot */
.ee-focus-status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.ee-focus-status-dot.overdue    { background: #EF4444; }
.ee-focus-status-dot.today      { background: #F59E0B; }
.ee-focus-status-dot.in_progress{ background: #F59E0B; }
.ee-focus-status-dot.not_started{ background: #CBD5E1; }
.ee-focus-status-dot.completed  { background: #10B981; }
.ee-focus-status-dot.on_hold    { background: #94A3B8; }
.ee-focus-status-dot.week       { background: #3B82F6; }
.ee-focus-status-dot.later      { background: #CBD5E1; }
.ee-focus-status-dot.none       { background: #E2E8F0; }

/* Task info — inline: title + badges in one row */
.ee-focus-task-info {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
}
.ee-focus-task-title {
    font-size: 0.8rem;
    font-weight: 500;
    color: #1E293B;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
    min-width: 0;
}
.ee-focus-org-badge {
    font-size: 0.62rem;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}
.ee-focus-project-badge {
    font-size: 0.62rem;
    color: #64748B;
    background: #F1F5F9;
    padding: 1px 6px;
    border-radius: 8px;
    white-space: nowrap;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}
.ee-focus-date-badge {
    font-size: 0.68rem;
    font-weight: 500;
    padding: 1px 7px;
    border-radius: 10px;
    white-space: nowrap;
}
.ee-focus-date-badge.overdue { background: #FEE2E2; color: #EF4444; }
.ee-focus-date-badge.today   { background: #FEF3C7; color: #D97706; }
.ee-focus-date-badge.week    { background: #DBEAFE; color: #3B82F6; }
.ee-focus-date-badge.later   { background: #F1F5F9; color: #64748B; }
.ee-focus-date-badge.nodate  { background: #F1F5F9; color: #CBD5E1; }
.ee-focus-comment-badge {
    font-size: 0.62rem;
    color: #94A3B8;
    padding: 1px 5px;
    border-radius: 8px;
    background: #F8FAFC;
    flex-shrink: 0;
}
.ee-focus-comment-badge.has-unread { background: #DBEAFE; color: #3B82F6; font-weight: 600; }
.ee-focus-comment-badge.has-unread::before { content: '· '; }

/* Task right (avatar + actions) */
.ee-focus-task-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.ee-focus-avatar {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: #E2E8F0;
    color: #64748B;
    font-size: 0.58rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-transform: uppercase;
}
.ee-focus-avatar.unassigned { background: #F1F5F9; color: #CBD5E1; }

.ee-focus-task-actions { display: flex; gap: 4px; }
.ee-focus-action-btn {
    height: 22px;
    padding: 0 8px;
    border: 1px solid #E2E8F0;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 500;
    cursor: pointer;
    background: #fff;
    color: #475569;
    white-space: nowrap;
    transition: all 0.12s;
}
.ee-focus-action-btn:hover       { background: #F8FAFC; border-color: #CBD5E1; }
.ee-focus-action-btn.done:hover  { background: #ECFDF5; border-color: #10B981; color: #10B981; }
.ee-focus-action-btn.start:hover { background: #EFF6FF; border-color: #3B82F6; color: #3B82F6; }
.ee-focus-action-btn.stop        { color: #D97706; }
.ee-focus-action-btn.stop:hover  { background: #FFFBEB; border-color: #F59E0B; color: #D97706; }

/* Empty state */
.ee-focus-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #94A3B8;
    padding: 60px 20px;
}
.ee-focus-empty-icon { opacity: 0.5; }
.ee-focus-empty-text { font-size: 0.85rem; }

/* Spinner */
.ee-focus-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}
.ee-focus-spinner {
    width: 22px; height: 22px;
    border: 2px solid #E2E8F0;
    border-top-color: var(--primary-color, #2d7a3e);
    border-radius: 50%;
    animation: ee-focus-spin 0.7s linear infinite;
}
@keyframes ee-focus-spin { to { transform: rotate(360deg); } }

/* ---- RIGHT: Project Sidebar ---- */
.ee-focus-sidebar {
    width: 270px;
    flex-shrink: 0;
    background: #fff;
    border-left: 1px solid #E2E8F0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.ee-focus-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94A3B8;
    border-bottom: 1px solid #F1F5F9;
    flex-shrink: 0;
}
.ee-focus-sidebar-hint {
    font-size: 0.62rem;
    color: #CBD5E1;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    font-style: italic;
}
.ee-focus-sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ee-focus-sidebar-scroll::-webkit-scrollbar { width: 4px; }
.ee-focus-sidebar-scroll::-webkit-scrollbar-thumb { background: #E2E8F0; border-radius: 4px; }

.ee-focus-proj-card {
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.15s;
}
.ee-focus-proj-card:hover { border-color: #CBD5E1; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.ee-focus-proj-card.is-active { border-color: var(--primary-color, #2d7a3e); background: rgba(45,122,62,0.04); }

.ee-focus-proj-org-name {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #1E293B;
    display: flex;
    align-items: center;
    gap: 5px;
}
.ee-focus-proj-org-contact {
    font-size: 0.75rem;
    color: #9CA3AF;
    margin-top: 2px;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ee-focus-proj-item { margin-bottom: 7px; }
.ee-focus-proj-item:last-child { margin-bottom: 0; }
.ee-focus-proj-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3px;
}
.ee-focus-proj-name {
    font-size: 0.72rem;
    color: #475569;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 130px;
}
.ee-focus-proj-stats {
    font-size: 0.68rem;
    color: #94A3B8;
    white-space: nowrap;
    flex-shrink: 0;
}
.ee-focus-proj-bar {
    height: 3px;
    background: #F1F5F9;
    border-radius: 2px;
    overflow: hidden;
}
.ee-focus-proj-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}
.ee-focus-proj-bar-fill.healthy  { background: #10B981; }
.ee-focus-proj-bar-fill.warning  { background: #F59E0B; }
.ee-focus-proj-bar-fill.critical { background: #EF4444; }
.ee-focus-proj-bar-fill.empty    { background: #CBD5E1; }

.ee-focus-sidebar-reset {
    width: 100%;
    background: #F1F5F9;
    color: #475569;
    border: none;
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: background 0.12s;
}
.ee-focus-sidebar-reset:hover { background: #E2E8F0; }

/* ============================================================
   FOCUS DASHBOARD — View Toggle, Kanban, Gantt
   ============================================================ */

/* Kanban */
.ee-focus-kanban-wrap {
    display: flex;
    gap: 12px;
    height: 100%;
    padding: 16px 20px;
    overflow-x: auto;
    align-items: flex-start;
}
.ee-focus-kb-col {
    flex: 1;
    min-width: 260px;
    max-width: 380px;
    background: #F8FAFC;
    border-radius: 12px;
    border: 1px solid #E2E8F0;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 200px);
    overflow: hidden;
}
.ee-focus-kb-col-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
    border-bottom: 1px solid #E2E8F0;
    flex-shrink: 0;
}
.ee-focus-kb-col-count {
    background: #E2E8F0;
    color: #64748B;
    border-radius: 10px;
    padding: 1px 8px;
    font-size: 0.7rem;
}
.ee-focus-kb-col-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.ee-focus-kb-col-body::-webkit-scrollbar { width: 4px; }
.ee-focus-kb-col-body::-webkit-scrollbar-thumb { background: #E2E8F0; border-radius: 4px; }
.ee-focus-kb-empty {
    font-size: 0.78rem;
    color: #CBD5E1;
    text-align: center;
    padding: 24px 0;
}

/* ============================================================
   FOCUS DASHBOARD — Gantt / Timeline
   ============================================================ */
.ee-gantt-scroll-wrap {
    flex: 1;
    overflow: auto;
    position: relative;
    background: #fff;
}
.ee-gantt-inner { position: relative; }

/* Sticky header row */
.ee-gantt-header-row {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 8;
    background: #F8FAFC;
    border-bottom: 1px solid #E2E8F0;
}
.ee-gantt-corner {
    position: sticky;
    left: 0;
    z-index: 12;
    background: #F8FAFC;
    border-right: 1px solid #E2E8F0;
    flex-shrink: 0;
}
.ee-gantt-grid-head { overflow: hidden; flex-shrink: 0; }
.ee-gantt-week-label {
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
    font-size: 0.68rem;
    font-weight: 600;
    color: #64748B;
    border-right: 1px solid #E2E8F0;
    height: 24px;
    white-space: nowrap;
    overflow: hidden;
}
.ee-gantt-day-col {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: #94A3B8;
    border-right: 1px solid #F1F5F9;
    height: 24px;
    flex-shrink: 0;
}
.ee-gantt-day-col.today   { background: rgba(45,122,62,0.08); color: var(--primary-color, #2d7a3e); font-weight: 700; }
.ee-gantt-day-col.weekend { background: #FAFAFA; color: #CBD5E1; }

/* Gantt rows */
.ee-gantt-row {
    display: flex;
    border-bottom: 1px solid #F1F5F9;
    min-height: 40px;
}
.ee-gantt-row:hover .ee-gantt-label-cell { background: #F8FAFC !important; }
.ee-gantt-org-row { background: #F8FAFC; min-height: 30px; }
.ee-gantt-org-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    padding: 0 12px;
}

/* Sticky label cell */
.ee-gantt-label-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    position: sticky;
    left: 0;
    z-index: 5;
    background: #fff;
    box-shadow: 2px 0 6px rgba(0,0,0,0.04);
    border-right: 1px solid #E2E8F0;
    flex-shrink: 0;
}
.ee-gantt-label-inner {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}
.ee-gantt-task-title {
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #1E293B;
}
.ee-gantt-task-meta {
    font-size: 0.65rem;
    color: #94A3B8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Bar area */
.ee-gantt-bar-cell { position: relative; }
.ee-gantt-day-bg {
    position: absolute; top: 0; bottom: 0;
    border-right: 1px solid #F8FAFC;
}
.ee-gantt-day-bg.weekend { background: rgba(0,0,0,0.015); }
.ee-gantt-today-line-row {
    position: absolute; top: 0; bottom: 0;
    width: 2px;
    background: var(--primary-color, #2d7a3e);
    opacity: 0.4;
    z-index: 2;
}
.ee-gantt-bar {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    height: 22px;
    border-radius: 5px;
    z-index: 3;
    display: flex;
    align-items: center;
    overflow: hidden;
    cursor: pointer;
    transition: opacity 0.12s, box-shadow 0.12s;
}
.ee-gantt-bar:hover { opacity: 0.85; box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.ee-gantt-bar.is-overdue { opacity: 0.9; }
.ee-gantt-bar-label {
    font-size: 0.68rem;
    font-weight: 500;
    color: #fff;
    padding: 0 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================================
   FOCUS DASHBOARD — KI-Analyse Modal
   ============================================================ */
#ee-focus-ai-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ee-ai-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.ee-ai-modal-box {
    position: relative;
    z-index: 1;
    width: 680px;
    max-width: 95vw;
    max-height: 86vh;
    background: #fff;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 80px rgba(0,0,0,0.25);
    animation: ee-ai-modal-in 0.25s cubic-bezier(0.34,1.56,0.64,1);
    overflow: hidden;
}
@keyframes ee-ai-modal-in {
    from { opacity:0; transform:scale(0.94) translateY(16px); }
    to   { opacity:1; transform:scale(1) translateY(0); }
}
.ee-ai-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    background: #0F172A;
    color: #fff;
    flex-shrink: 0;
}
.ee-ai-modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 0.95rem;
}
.ee-ai-modal-icon { font-size: 1.1rem; }
.ee-ai-modal-subtitle {
    font-size: 0.72rem;
    opacity: 0.5;
    font-weight: 400;
    background: rgba(255,255,255,0.1);
    padding: 2px 8px;
    border-radius: 10px;
}
.ee-ai-modal-close {
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    width: 30px; height: 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
}
.ee-ai-modal-close:hover { background: rgba(255,255,255,0.2); }
.ee-ai-modal-body { flex:1; overflow-y:auto; padding:22px; min-height:0; }
.ee-ai-modal-body::-webkit-scrollbar { width: 5px; }
.ee-ai-modal-body::-webkit-scrollbar-thumb { background: #E2E8F0; border-radius: 4px; }
.ee-ai-modal-loading {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 14px; padding: 50px 20px;
    color: #64748B; font-size: 0.85rem;
}
.ee-ai-modal-content {}
.ee-ai-modal-content h3.ee-focus-ai-h3 {
    font-size: 0.8rem; font-weight: 700; color: #475569;
    text-transform: uppercase; letter-spacing: 0.07em;
    margin: 20px 0 8px; padding-bottom: 5px;
    border-bottom: 1px solid #F1F5F9;
}
.ee-ai-modal-content h3.ee-focus-ai-h3:first-child { margin-top: 0; }
.ee-ai-modal-content ul { margin: 5px 0 12px 16px; padding: 0; }
.ee-ai-modal-content li { margin-bottom: 5px; color: #374151; font-size: 0.85rem; line-height: 1.55; }
.ee-ai-modal-content p  { margin: 0 0 8px; color: #374151; font-size: 0.85rem; line-height: 1.6; }
.ee-ai-modal-content strong { color: #0F172A; }
.ee-ai-modal-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 22px; border-top: 1px solid #F1F5F9;
    font-size: 0.72rem; color: #94A3B8;
    flex-shrink: 0; background: #FAFAFA;
}
.ee-focus-ai-rerun {
    background: #fff; border: 1px solid #E2E8F0; color: #475569;
    padding: 4px 12px; border-radius: 6px; cursor: pointer;
    font-size: 0.75rem; font-weight: 500; transition: all 0.12s;
}
.ee-focus-ai-rerun:hover { border-color: #94A3B8; color: #1E293B; }
.ee-focus-ai-error {
    padding: 20px; color: #DC2626; font-size: 0.82rem;
    background: #FEF2F2; border-radius: 10px; border: 1px solid #FECACA; line-height: 1.5;
}
.ee-focus-ai-error small { color: #9CA3AF; display: block; margin-top: 4px; }

/* Streaming cursor */
.ee-ai-cursor {
    display: inline-block; color: #475569;
    animation: ee-ai-cursor-blink 0.75s step-end infinite;
    margin-left: 1px;
}
@keyframes ee-ai-cursor-blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* Dots loader (shared) */
.ee-focus-ai-dots { display: flex; gap: 5px; }
.ee-focus-ai-dots span {
    width: 8px; height: 8px; background: #CBD5E1;
    border-radius: 50%; animation: ee-ai-dot-bounce 1.2s ease-in-out infinite;
}
.ee-focus-ai-dots span:nth-child(1) { animation-delay: 0s; }
.ee-focus-ai-dots span:nth-child(2) { animation-delay: 0.2s; }
.ee-focus-ai-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes ee-ai-dot-bounce {
    0%,80%,100% { transform:scale(0.7); opacity:0.4; }
    40%         { transform:scale(1.1); opacity:1; }
}

/* ============================================================
   FOCUS DASHBOARD — Tagesfunnel & Chronological Layout
   ============================================================ */

/* Tagesfunnel — prominenter Bereich oben, kompakt */
.ee-focus-tagesfunnel {
    background: #FFF7ED;
    border-left: 3px solid #EF4444;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 12px;
}
.ee-focus-tagesfunnel.is-empty {
    background: #F0FDF4;
    border-left-color: #10B981;
    padding: 6px 12px;
}
.ee-focus-tagesfunnel-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #92400E;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}
.ee-focus-tagesfunnel.is-empty .ee-focus-tagesfunnel-header {
    color: #065F46;
    margin-bottom: 2px;
}
.ee-focus-tagesfunnel-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #EF4444;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    flex-shrink: 0;
}
.ee-focus-tagesfunnel-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #10B981;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    flex-shrink: 0;
}
.ee-focus-tagesfunnel-hint {
    font-size: 0.65rem;
    color: #B45309;
    margin-bottom: 4px;
    font-style: italic;
}
.ee-focus-tagesfunnel-done-msg {
    font-size: 0.72rem;
    color: #059669;
    font-style: italic;
    padding: 2px 0;
}

/* Chronologische Liste darunter */
.ee-focus-chronological {
    margin-bottom: 10px;
}

/* ============================================================
   FOCUS DASHBOARD — Prominente Datumsspalte auf Task-Card
   ============================================================ */
.ee-focus-date-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 78px;
    max-width: 90px;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
    text-align: center;
    gap: 0;
}
.ee-focus-date-col-date {
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.2;
}
.ee-focus-date-col-rel {
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.1;
}

/* Date-col Farbvarianten */
.ee-focus-date-col.is-overdue {
    background: #FEE2E2;
}
.ee-focus-date-col.is-overdue .ee-focus-date-col-date { color: #991B1B; }
.ee-focus-date-col.is-overdue .ee-focus-date-col-rel  { color: #EF4444; }

.ee-focus-date-col.is-today {
    background: #FEF3C7;
}
.ee-focus-date-col.is-today .ee-focus-date-col-date { color: #78350F; }
.ee-focus-date-col.is-today .ee-focus-date-col-rel  { color: #F59E0B; }

.ee-focus-date-col.is-normal {
    background: #F1F5F9;
}
.ee-focus-date-col.is-normal .ee-focus-date-col-date { color: #334155; }
.ee-focus-date-col.is-normal .ee-focus-date-col-rel  { color: #64748B; }

.ee-focus-date-col.is-none {
    background: #F1F5F9;
}
.ee-focus-date-col.is-none .ee-focus-date-col-date { color: #CBD5E1; }
.ee-focus-date-col.is-none .ee-focus-date-col-rel  { color: #94A3B8; }

.ee-focus-date-col.is-done {
    background: #DCFCE7;
}
.ee-focus-date-col.is-done .ee-focus-date-col-date { color: #166534; }
.ee-focus-date-col.is-done .ee-focus-date-col-rel  { color: #10B981; }

/* ============================================================
   FOCUS DASHBOARD — User-Filter Dropdown
   ============================================================ */
.ee-focus-user-filter {
    height: 32px;
    padding: 0 10px;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    font-size: 0.78rem;
    color: #475569;
    background: #F8FAFC;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s;
    max-width: 180px;
}
.ee-focus-user-filter:focus {
    border-color: var(--primary-color, #2d7a3e);
}

/* ============================================================
   FOCUS DASHBOARD — Completed Toggle (zuklappbar)
   ============================================================ */
.ee-focus-completed-toggle {
    margin-top: 8px;
    border-top: 1px solid #E2E8F0;
    padding-top: 4px;
}
.ee-focus-completed-toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 0 4px;
    width: 100%;
    text-align: left;
}
.ee-focus-completed-toggle-btn:hover {
    color: #475569;
}
.ee-focus-completed-toggle-arrow {
    display: inline-block;
    font-size: 0.6rem;
    transition: transform 0.2s ease;
}
.ee-focus-completed-toggle-arrow.is-open {
    transform: rotate(90deg);
}
.ee-focus-completed-body {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.2s ease;
    max-height: 2000px;
    opacity: 1;
}
.ee-focus-completed-body.is-collapsed {
    max-height: 0;
    opacity: 0;
}

/* ============================================================
   FOCUS DASHBOARD — Sidebar org-filter active state
   ============================================================ */

/* ============================================================
   Follow-Up in Lost / On-Hold Dialogs
   ============================================================ */
.ee-lost-followup-row {
    display: flex;
    gap: 6px;
    align-items: center;
}
.ee-lost-reason-followup {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.85rem;
    background: #f9fafb;
    cursor: pointer;
}
.ee-lost-followup-clear {
    width: 32px;
    height: 32px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #f9fafb;
    color: #6b7280;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ee-lost-followup-clear:hover {
    background: #fee2e2;
    color: #ef4444;
    border-color: #fca5a5;
}

/* ============================================================
   FOCUS DASHBOARD — Dark Mode
   ============================================================ */
@media (prefers-color-scheme: dark) {

    /* Overlay background */
    #ee-focus-overlay {
        background: #0f172a;
        color: #e2e8f0;
    }

    /* Header */
    .ee-focus-header {
        background: #1e293b;
        border-bottom-color: #334155;
    }
    .ee-focus-header-title {
        color: #f1f5f9;
    }
    .ee-focus-header-subtitle {
        color: #64748b;
    }

    /* View toggle */
    .ee-focus-view-toggle {
        background: #334155;
    }
    .ee-focus-vtoggle {
        color: #94a3b8;
    }
    .ee-focus-vtoggle:hover {
        color: #e2e8f0;
    }
    .ee-focus-vtoggle.active {
        background: #1e293b;
        color: #f1f5f9;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }

    /* Search */
    .ee-focus-search {
        border-color: #334155;
        background: #1e293b;
        color: #e2e8f0;
    }
    .ee-focus-search::placeholder {
        color: #64748b;
    }
    .ee-focus-search:focus {
        background: #0f172a;
    }

    /* GroupBy select */
    .ee-focus-groupby {
        border-color: #334155 !important;
        background: #1e293b !important;
        color: #e2e8f0 !important;
        color-scheme: dark;
    }
    .ee-focus-groupby option {
        background: #1e293b !important;
        color: #e2e8f0 !important;
    }

    /* Action buttons (AI, refresh, close) */
    .ee-focus-ai-btn,
    .ee-focus-refresh-btn,
    .ee-focus-close-btn {
        background: #1e293b;
        border-color: #334155;
        color: #94a3b8;
    }
    .ee-focus-ai-btn:hover,
    .ee-focus-refresh-btn:hover,
    .ee-focus-close-btn:hover {
        background: #334155;
        color: #e2e8f0;
        border-color: #475569;
    }

    /* KPI bar */
    .ee-focus-kpi-bar {
        background: #334155;
        border-bottom-color: #334155;
    }
    .ee-focus-kpi {
        background: #1e293b;
    }
    .ee-focus-kpi:hover {
        background: #0f172a;
    }
    .ee-focus-kpi.active {
        background: #0f172a;
    }
    .ee-focus-kpi-num {
        color: #f1f5f9;
    }
    /* Colored KPI nums stay visible — EF4444, D97706, 3B82F6 are bright enough */
    .ee-focus-kpi-label {
        color: #94a3b8;
    }

    /* Body */
    .ee-focus-body {
        background: #0f172a;
    }
    .ee-focus-feed {
        background: #0f172a;
    }
    .ee-focus-feed-scroll::-webkit-scrollbar-thumb {
        background: #475569;
    }

    /* Group headers */
    .ee-focus-group-header {
        color: #94a3b8;
        background: #0f172a;
    }
    .ee-focus-group-title {
        color: #cbd5e1;
    }
    .ee-focus-group-count {
        color: #64748b;
    }

    /* Task card */
    .ee-focus-task-card {
        background: #1e293b;
        border-color: #334155;
    }
    .ee-focus-task-card:hover {
        background: #253348;
        border-color: #475569;
    }
    .ee-focus-task-card.is-completed .ee-focus-task-title {
        color: #64748b;
    }

    /* Tagesfunnel task-card override */
    .ee-focus-tagesfunnel .ee-focus-task-card {
        background: #1e293b;
        border-color: #334155;
    }

    /* Task info */
    .ee-focus-task-title {
        color: #e2e8f0;
    }

    /* Org badge */
    .ee-focus-org-badge {
        background: #334155;
        color: #94a3b8;
    }

    /* Project badge */
    .ee-focus-project-badge {
        background: rgba(45, 122, 62, 0.15);
        color: #4ade80;
    }

    /* Date badge — dark variants */
    .ee-focus-date-badge {
        background: #334155;
        color: #94a3b8;
    }
    .ee-focus-date-badge.overdue { background: rgba(239, 68, 68, 0.15); color: #f87171; }
    .ee-focus-date-badge.today   { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
    .ee-focus-date-badge.week    { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
    .ee-focus-date-badge.later   { background: #334155; color: #94a3b8; }
    .ee-focus-date-badge.nodate  { background: #334155; color: #475569; }

    /* Comment badge */
    .ee-focus-comment-badge {
        background: #334155;
        color: #94a3b8;
    }
    .ee-focus-comment-badge.has-unread {
        background: rgba(59, 130, 246, 0.15);
        color: #60a5fa;
    }

    /* Avatar */
    .ee-focus-avatar.unassigned {
        background: #334155;
        color: #64748b;
    }

    /* Action buttons */
    .ee-focus-action-btn {
        background: #1e293b;
        border-color: #334155;
        color: #94a3b8;
    }
    .ee-focus-action-btn:hover {
        background: #334155;
        border-color: #475569;
    }
    .ee-focus-action-btn.done:hover  { background: rgba(16, 185, 129, 0.12); border-color: #10b981; color: #4ade80; }
    .ee-focus-action-btn.start:hover { background: rgba(59, 130, 246, 0.12); border-color: #3b82f6; color: #60a5fa; }
    .ee-focus-action-btn.stop        { color: #fbbf24; }
    .ee-focus-action-btn.stop:hover  { background: rgba(245, 158, 11, 0.12); border-color: #f59e0b; color: #fbbf24; }

    /* Empty state */
    .ee-focus-empty {
        color: #64748b;
    }

    /* Loading spinner */
    .ee-focus-spinner {
        border-color: #334155;
        border-top-color: var(--primary-color, #4ade80);
    }

    /* Tagesfunnel */
    .ee-focus-tagesfunnel {
        background: rgba(239, 68, 68, 0.08);
        border-left-color: #ef4444;
    }
    .ee-focus-tagesfunnel.is-empty {
        background: rgba(16, 185, 129, 0.08);
        border-left-color: #10b981;
    }
    .ee-focus-tagesfunnel-header {
        color: #fbbf24;
    }
    .ee-focus-tagesfunnel.is-empty .ee-focus-tagesfunnel-header {
        color: #4ade80;
    }
    .ee-focus-tagesfunnel-icon {
        background: #ef4444;
        color: #fff;
    }
    .ee-focus-tagesfunnel-hint {
        color: #fbbf24;
    }
    .ee-focus-tagesfunnel-done-msg {
        color: #4ade80;
    }

    /* Date column — dark variants */
    .ee-focus-date-col.is-overdue {
        background: rgba(239, 68, 68, 0.12);
    }
    .ee-focus-date-col.is-overdue .ee-focus-date-col-date { color: #f87171; }
    .ee-focus-date-col.is-overdue .ee-focus-date-col-rel  { color: #ef4444; }

    .ee-focus-date-col.is-today {
        background: rgba(245, 158, 11, 0.12);
    }
    .ee-focus-date-col.is-today .ee-focus-date-col-date { color: #fbbf24; }
    .ee-focus-date-col.is-today .ee-focus-date-col-rel  { color: #f59e0b; }

    .ee-focus-date-col.is-normal {
        background: rgba(148, 163, 184, 0.08);
    }
    .ee-focus-date-col.is-normal .ee-focus-date-col-date { color: #cbd5e1; }
    .ee-focus-date-col.is-normal .ee-focus-date-col-rel  { color: #94a3b8; }

    .ee-focus-date-col.is-none {
        background: rgba(148, 163, 184, 0.05);
    }
    .ee-focus-date-col.is-none .ee-focus-date-col-date { color: #475569; }
    .ee-focus-date-col.is-none .ee-focus-date-col-rel  { color: #475569; }

    .ee-focus-date-col.is-done {
        background: rgba(16, 185, 129, 0.1);
    }
    .ee-focus-date-col.is-done .ee-focus-date-col-date { color: #4ade80; }
    .ee-focus-date-col.is-done .ee-focus-date-col-rel  { color: #10b981; }

    /* User-Filter dropdown */
    .ee-focus-user-filter {
        border-color: #334155 !important;
        background: #1e293b !important;
        color: #e2e8f0 !important;
        color-scheme: dark;
    }
    .ee-focus-user-filter option {
        background: #1e293b !important;
        color: #e2e8f0 !important;
    }

    /* Completed toggle */
    .ee-focus-completed-toggle {
        border-top-color: #334155;
    }
    .ee-focus-completed-toggle-btn {
        color: #94a3b8;
    }
    .ee-focus-completed-toggle-btn:hover {
        color: #cbd5e1;
    }

    /* Sidebar */
    .ee-focus-sidebar {
        background: #1e293b;
        border-left-color: #334155;
    }
    .ee-focus-sidebar-header {
        color: #e2e8f0;
    }
    .ee-focus-sidebar-hint {
        color: #64748b;
    }
    .ee-focus-sidebar-scroll::-webkit-scrollbar-thumb {
        background: #475569;
    }
    .ee-focus-proj-card {
        background: #0f172a;
        border-color: #334155;
    }
    .ee-focus-proj-card:hover {
        border-color: #475569;
    }
    .ee-focus-proj-card.is-active {
        border-color: var(--primary-color, #4ade80);
        background: rgba(45, 122, 62, 0.08);
    }
    .ee-focus-proj-org-name {
        color: #cbd5e1;
    }
    .ee-focus-proj-org-contact {
        color: #6B7280;
    }
    .ee-focus-proj-name {
        color: #94a3b8;
    }
    .ee-focus-proj-stats {
        color: #64748b;
    }
    .ee-focus-proj-bar {
        background: #334155;
    }
    .ee-focus-sidebar-reset {
        background: #334155;
        color: #94a3b8;
    }
    .ee-focus-sidebar-reset:hover {
        background: #475569;
    }

    /* Kanban */
    .ee-focus-kanban-wrap {
        background: #0f172a;
    }
    .ee-focus-kb-col {
        background: #1e293b;
        border-color: #334155;
    }
    .ee-focus-kb-col-header {
        background: #1e293b;
        color: #e2e8f0;
        border-bottom-color: #334155;
    }
    .ee-focus-kb-col-count {
        background: #334155;
        color: #94a3b8;
    }
    .ee-focus-kb-col-body {
        background: #0f172a;
    }
    .ee-focus-kb-col-body::-webkit-scrollbar-thumb {
        background: #475569;
    }
    .ee-focus-kb-empty {
        color: #475569;
    }

    /* AI Modal */
    #ee-focus-ai-modal {
        background: rgba(0, 0, 0, 0.6);
    }
    .ee-ai-modal-content {
        background: #1e293b;
        color: #e2e8f0;
        border-color: #334155;
    }
    .ee-focus-ai-h3 {
        color: #f1f5f9;
    }
    .ee-focus-ai-rerun {
        background: #334155;
        border-color: #475569;
        color: #94a3b8;
    }
    .ee-focus-ai-rerun:hover {
        border-color: #64748b;
        color: #e2e8f0;
    }
    .ee-focus-ai-error {
        color: #f87171;
    }
    .ee-focus-ai-error small {
        color: #64748b;
    }

    /* Follow-Up in Lost / On-Hold Dialogs — Dark Mode */
    .ee-lost-reason-followup {
        background: #1e293b;
        border-color: #334155;
        color: #e2e8f0;
    }
    .ee-lost-followup-clear {
        background: #1e293b;
        border-color: #334155;
        color: #94a3b8;
    }
    .ee-lost-followup-clear:hover {
        background: #450a0a;
        color: #f87171;
    }
} /* end @media (prefers-color-scheme: dark) */

/* ====================================================================== */
/* Marketing-Onepager — Button + Auswahl-Dialog                           */
/* ====================================================================== */
.project-action-btn.onepager-btn {
    background: #0069B3;
    color: #fff;
    border: none;
}
.project-action-btn.onepager-btn:hover {
    background: #00528c;
}
.project-action-btn.onepager-btn svg {
    stroke: #fff;
}

.onepager-dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
}
.onepager-dialog {
    background: #fff;
    border-radius: 12px;
    width: 480px;
    max-width: 92vw;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}
.onepager-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
}
.onepager-dialog-header h3 {
    margin: 0;
    font-size: 16px;
    color: #0f172a;
}
.onepager-dialog-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #64748b;
}
.onepager-dialog-close:hover {
    color: #0f172a;
}
.onepager-dialog-body {
    padding: 16px 20px;
    overflow-y: auto;
}
.onepager-section-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin: 14px 0 8px;
}
.onepager-section-label:first-child {
    margin-top: 0;
}
.onepager-project-list {
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}
.onepager-project-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
}
.onepager-project-row:last-child {
    border-bottom: none;
}
.onepager-project-row:hover {
    background: #f8fafc;
}
.onepager-project-title {
    flex: 1;
    font-size: 14px;
    color: #0f172a;
}
.onepager-project-size {
    font-size: 12px;
    color: #64748b;
}
.onepager-model-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.onepager-model-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #0f172a;
}
.onepager-model-row:hover {
    background: #f8fafc;
}
.onepager-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}
.onepager-status {
    margin-top: 14px;
    font-size: 13px;
    color: #334155;
    min-height: 18px;
}
.onepager-result-ok {
    margin-top: 6px;
    color: #16a34a;
    font-size: 13px;
}
.onepager-result-ok a {
    color: #16a34a;
    text-decoration: underline;
}
.onepager-result-err {
    margin-top: 6px;
    color: #dc2626;
    font-size: 13px;
}
.onepager-existing-list {
    margin-top: 8px;
    max-height: 320px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 2px;
}
.onepager-existing-empty {
    grid-column: 1 / -1;
    padding: 14px 12px;
    font-size: 12px;
    color: #94a3b8;
    text-align: center;
    border: 1px dashed #e2e8f0;
    border-radius: 8px;
}
/* Onepager-Card: gleiche Optik wie die Modell-Auswahl-Boxen (weiss, #e2e8f0, radius 8px) */
.onepager-card {
    position: relative;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    outline: none;
}
.onepager-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.10);
    transform: translateY(-1px);
}
.onepager-card:focus-visible {
    border-color: #3FA14D;
    box-shadow: 0 0 0 2px rgba(63, 161, 77, 0.35);
}
.onepager-card.is-downloading {
    opacity: 0.6;
    pointer-events: none;
}
.onepager-card-preview {
    position: relative;
    height: 132px;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
    border-top: 3px solid var(--op-accent, #64748b);
    overflow: hidden;
}
.onepager-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
}
.onepager-card-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}
.onepager-card-model {
    font-size: 12px;
    font-weight: 600;
    color: #0f172a;
    flex-shrink: 0;
}
.onepager-card-name {
    font-size: 11px;
    color: #94a3b8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.onepager-card-del {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.9);
    color: #94a3b8;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
    transition: background 0.15s ease, color 0.15s ease;
}
.onepager-card-del:hover {
    background: #fee2e2;
    color: #dc2626;
}
.onepager-card-del:disabled {
    opacity: 0.5;
    cursor: default;
}
.onepager-dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid #e2e8f0;
}

/* ── Breiteres Popup fuer die Modell-Auswahl ───────────────────────── */
.onepager-dialog.onepager-dialog-wide {
    width: 900px;
    max-width: calc(100vw - 40px);
}

/* ── Modell-Auswahl (Buttons/Karten statt Checkbox) ────────────────── */
.onepager-pref-hint {
    font-size: 12px;
    color: #64748b;
    margin: -2px 0 10px;
    line-height: 1.4;
}
.onepager-model-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.onepager-model-card {
    position: relative;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    padding: 14px 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.onepager-model-card.is-preferred {
    border-color: var(--op-accent, #3FA14D);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--op-accent, #3FA14D) 30%, transparent),
                0 6px 18px rgba(15, 23, 42, 0.08);
}
.onepager-model-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    /* Platz fuer den "Praeferiert"-Button oben rechts (sonst Titel-Kollision) */
    padding-right: 92px;
    min-height: 24px;
}
.onepager-model-card-title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    /* Titel ("Projektentwicklung") soll IMMER einzeilig bleiben */
    white-space: nowrap;
}
.onepager-model-card-desc {
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
    flex: 1;
}
/* "Praeferiert"-Button oben rechts in der Karte */
.onepager-model-pref {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #94a3b8;
    border-radius: 999px;
    padding: 3px 9px 3px 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}
.onepager-model-pref:hover {
    border-color: var(--op-accent, #3FA14D);
    color: var(--op-accent, #3FA14D);
}
.onepager-model-pref-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #fff;
    flex-shrink: 0;
    transition: background 0.15s ease;
}
.onepager-model-card.is-preferred .onepager-model-pref {
    border-color: var(--op-accent, #3FA14D);
    background: var(--op-accent, #3FA14D);
    color: #fff;
}
.onepager-model-card.is-preferred .onepager-model-pref-check {
    background: rgba(255, 255, 255, 0.35);
    color: #fff;
}
/* "Onepager erstellen"-Button unten in der Karte */
.onepager-model-gen {
    margin-top: 2px;
    width: 100%;
    border: 1px solid var(--op-accent, #0069B3);
    background: #fff;
    color: var(--op-accent, #0069B3);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.onepager-model-gen:hover {
    background: var(--op-accent, #0069B3);
    color: #fff;
}
.onepager-model-gen:disabled {
    opacity: 0.6;
    cursor: default;
}

/* ── Vorschau statt Auto-Download (Card-Optik) ─────────────────────── */
.onepager-card-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--op-accent, #64748b);
}
.onepager-card-eye {
    display: inline-flex;
    opacity: 0.85;
}
.onepager-card-eye-label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.02em;
}
.onepager-card:hover .onepager-card-eye {
    opacity: 1;
}
/* Download-Button (nur dieser laedt herunter) — unten rechts in der Preview-Flaeche */
.onepager-card-dl {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
    opacity: 0;
    transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.onepager-card:hover .onepager-card-dl,
.onepager-card:focus-within .onepager-card-dl {
    opacity: 1;
}
.onepager-card-dl:hover {
    background: var(--op-accent, #0069B3);
    color: #fff;
}

/* ── Grosse PDF-Vorschau (Overlay/Modal) ───────────────────────────── */
.onepager-preview-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100010;
    padding: 24px;
}
.onepager-preview-modal {
    background: #fff;
    border-radius: 12px;
    width: 820px;
    max-width: 96vw;
    height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}
.onepager-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
}
.onepager-preview-title {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.onepager-preview-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.onepager-preview-dl {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #0069B3;
    background: #0069B3;
    color: #fff;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.onepager-preview-dl:hover {
    background: #00528c;
}
.onepager-preview-close {
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    padding: 0 4px;
}
.onepager-preview-close:hover {
    color: #0f172a;
}
.onepager-preview-body {
    flex: 1;
    background: #525659;
    min-height: 0;
}
.onepager-preview-frame {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}
