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; /* Standardmäßig ausgeblendet */
    /* Optional: Füge eine Transition hinzu, um das Ein-/Ausblenden zu animieren */
    transition: all 0.3s ease-in-out;
}

#organizationSidebarSettingsContainer.visible {
    display: block; /* Sichtbar, wenn die Klasse 'visible' hinzugefügt wird */
}



.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%;
}


/*
.form-group {
    margin-bottom: 20px;
}


.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #555;
}


.form-group input[type="text"],
.form-group input[type="file"] {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.form-group input[type="text"]:focus,
.form-group input[type="file"]:focus {
    border-color: var(--secondary-color, #3bb2d0);
    outline: none;
}


.form-group input[type="color"] {
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 100%;
    height: 50px;
    cursor: pointer;
    background: none;
}

.form-group input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.form-group input[type="color"]::-webkit-color-swatch {
    border: none;
}

.form-group input[type="color"]:focus {
    border-color: var(--secondary-color, #3bb2d0);
    outline: none;
}

.organizationFormHeader {
    font-size: 22px;
    font-weight: 600;
    text-transform: uppercase;
}

#iframeHeader{
	margin-top: 50px;
}


#saveOrganizationSettings {
    margin: 0 auto;
}

#saveOrganizationSettings:hover {
    background-color: var(--secondary-color, #3bb2d0);
	color: var(--primary-color);
}

button#goProButton {
    position: absolute;
    top: 0px;
    height: 30px;
    left: 50%;
    transform: translate(-50%, 0px);
    border: none;
    padding: 0px 30px;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    font-size: 20px;
    border: 2px solid;
	display: none;
	cursor: pointer;
	transition: 0.5s;
}

button#goProButton:hover {
	transform: translate(-50%, 0px) scale(1.05); 
}

#ownerContactDropdown {
    height: 30px;
    border: none;
    color: var(--primary-color);
    font-weight: 700;
}


.current-logo img {
    display: block;
    margin: 0 auto 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}


::placeholder {
    color: #aaa;
    font-style: italic;
}


/* Organization settings responsive - moved to ee-responsive.css */

#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; /* Größe der Pfeile */
    color: gray; /* Standardfarbe der Pfeile */
    cursor: pointer; /* Mauszeiger ändern */
    user-select: none; /* Verhindert Textauswahl */
}

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

/* Optional: Hover-Effekt */
.arrow:hover {
    color: darkgray; /* Hover-Farbe */
    transform: scale(1.1); /* Vergrößerung bei 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 */
.organizationsContainer.list,
.sortContainerHeader {
    --col-name: minmax(160px, 1.5fr);
    --col-email: minmax(180px, 1.2fr);
    --col-phone: minmax(100px, 0.8fr);
    --col-status: 70px;
    --col-owner: 50px;
    --col-followup: 60px;
    --col-date: 80px;
    --col-actions: 90px;
}

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

/* ===== HEADER ROW - CSS GRID + STICKY ===== */
div#sortContainerHeader {
    display: grid !important;
    grid-template-columns: var(--col-name) var(--col-email) var(--col-phone) var(--col-status) 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;
    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-name) var(--col-email) var(--col-phone) var(--col-status) 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;
}

.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 ===== */
.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;
}

.organization-field.organizationName {
    font-weight: 600;
    color: var(--org-text-primary);
}

.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;
}

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

/* ===== QUICK ACTIONS ===== */
.organization-quick-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 4px 0;
}

.organization-quick-actions button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px 10px;
    border: none;
    border-radius: var(--org-radius-sm);
    background: var(--org-surface-secondary, #f5f5f7);
    color: var(--org-text-secondary, #6e6e73);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--org-transition-fast);
    min-width: auto;
}

.organization-quick-actions button:hover {
    background: var(--org-accent);
    color: white;
}

.organization-quick-actions button:hover svg {
    stroke: white;
}

.organization-quick-actions .project-count {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.organization-quick-actions svg {
    width: 14px;
    height: 14px;
    stroke: var(--org-text-secondary, #6e6e73);
    flex-shrink: 0;
}

.organization-trash-btn {
    background: rgba(255, 59, 48, 0.1) !important;
    color: #FF3B30 !important;
}

.organization-trash-btn:hover {
    background: #FF3B30 !important;
    color: white !important;
}

/* ===== 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);
}

.organization-field.organizationDate {
    margin-left: 10px;
    min-width: 70px !important;
}

.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: 200px;
}

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

#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: 60px;
    max-width: 80px;
}

.organizationFollowUp.followUp {
    color: red;
}

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


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

.organizationUserStatus.pending {
    background: #ffc800;
}

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

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

/* Projekt-Container (wird standardmäßig ausgeblendet) */
.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 */

/* Styles für das Popup */
.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;
}

/* Für den disabled-Zustand */
[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;
}

/* Schließen-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; /* Flexibles Layout für Mehrzeilen-Kürzungen */
    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; /* Für sanfte Übergänge */
    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; /* Ermöglicht die Anzeige von beliebig vielen Zeilen */
    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;
}


.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-Höhe */
    border: 3px solid rgba(255, 255, 255, 0.5); /* Halbtransparenter Rahmen */
    border-top-color: #fff; /* Farbe für die Vorderseite des Spinners */
    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; /* Überlagert den Button-Inhalt */
    animation: none; /* Keine Animation standardmäßig */
}

/* 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; /* Maximalhöhe für das Dropdown */
    overflow-y: auto; /* Scrollbar für lange Listen */
    z-index: 1000;
    display: none; /* Standardmäßig ausgeblendet */
    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 für jede Organisation */
.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;
}


/* newOrganizationContainer aus dem Flex-Flow nehmen, damit es die Spaltenausrichtung nicht stört */
.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*/
.org-tabs {
    overflow: hidden;
    border-bottom: 1px solid #ccc;
    border-radius: 4px 4px 0 0;
    width: 100%;
}

/* Tab-Buttons */
.org-tab-button {
    background-color: inherit;
    float: left;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 14px 16px;
    transition: 0.3s;
    font-size: 16px;
}

/* Hover-Effekt für Tabs */
.org-tab-button:hover {
    background-color: #ddd;
}

/* Aktiver Tab */
.org-tab-button.active {
    background-color: #fff;
    border-bottom: 2px solid var(--secondary-color);
}

#b2bPartnerButton, #b2bLeadButton, #b2bTestPeriodButton {
    float: right;
}

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

/* Erster Tab wird standardmäßig angezeigt */
.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); /* Ursprüngliche Größe */
        opacity: 1; /* Voll sichtbar */
    }
    50% {
        transform: translateX(-50%) scale(1.1); /* Leicht vergrößert */
        opacity: 0.7; /* Leicht transparent */
    }
}

/* payment popup*/

/* Payment Popup CSS - Füge das in deine CSS-Datei ein */

.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 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);
}

/* Favorite Card */
.favorite-card {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: #fff;
}

.favorite-card .card-header {
    color: #fff;
}

.fav-star {
    color: #fbd38d;
    font-size: 16px;
    margin-right: 6px;
}

.fav-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

.fav-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    padding: 0 16px 12px;
    color: #fff;
}

.fav-metrics {
    display: flex;
    gap: 8px;
    padding: 0 16px 16px;
}

.fav-metric {
    flex: 1;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 10px;
    text-align: center;
}

.metric-val {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.metric-lbl {
    display: block;
    font-size: 10px;
    opacity: 0.8;
    margin-top: 2px;
    text-transform: uppercase;
}

.fav-btn {
    display: block;
    width: calc(100% - 32px);
    margin: 0 16px 16px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.fav-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
}

.fav-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

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

.contacts-card:not(.expanded) {
    max-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;
}

.date-picker {
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 12px;
    margin-left: auto;
}

.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-title {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #2d3748;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.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 für Owner - Freischalten/Sperren & Intern/Extern */
.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 für 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;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
}

.ee-notifications-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a2e;
    flex: 1;
}

.ee-notifications-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ee-notifications-scope-toggle {
    display: flex;
    background: #f1f3f4;
    border-radius: 8px;
    padding: 4px;
}

.ee-notifications-scope-toggle button {
    padding: 6px 12px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    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: 8px 16px;
    background: #f1f3f4;
    border: none;
    border-radius: 8px;
    color: #666;
    font-size: 13px;
    font-weight: 500;
    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: 24px;
}

.ee-notifications-date-header {
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 0;
    margin-bottom: 8px;
    border-bottom: 1px solid #f1f3f4;
}

.ee-notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.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: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ee-notification-icon svg {
    width: 20px;
    height: 20px;
    color: white;
    stroke: white;
}

.ee-notification-content {
    flex: 1;
    min-width: 0;
}

.ee-notification-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 4px;
    line-height: 1.4;
}

.ee-notification-message {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ee-notification-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    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: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
    padding-left: 12px;
}

.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: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 8px;
}

.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;
    gap: 0;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 20px;
}

.ee-notifications-tab {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    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: Grid ohne Status-Spalte ===== */
.is-b2b-partner div#sortContainerHeader {
    grid-template-columns: var(--col-name) var(--col-email) var(--col-phone) var(--col-owner) var(--col-followup) var(--col-date) var(--col-actions);
}
.is-b2b-partner .organizationsContainer.list .singleorganizationContainer {
    grid-template-columns: var(--col-name) var(--col-email) var(--col-phone) var(--col-owner) var(--col-followup) var(--col-date) var(--col-actions);
}

