
.app_search_separator {
    height: 2vh;
}

.app_search_kategorie {
    font-size: 1.2vw;
    font-weight: bold;
    color: var(--text-muted);
    margin-top: 1vh;
    margin-bottom: 1vh;
    margin-left: 1vw;
}

.app_current_planned_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app_current_show_all_planned {
    font-size: min(0.9vw, 12px);
    font-weight: normal;
    color: var(--text-link);
    cursor: pointer;
    margin-right: 1vw;
}

.app_current_show_all_planned:hover {
    text-decoration: underline;
}

.app_search_antilo_slash {
    color: #e53935;
}

.app_search_name {
    font-size: 1vw;
    font-weight: bold;
}

.app_search_company {
    font-size: 0.8vw;
    color: var(--text-muted);
}

.app_search_icon {
    width: 3vh;
    height: 3vh;
    border-radius: 50%;
    border: solid 1px;
    padding: 0.3vh;
}

.app_search_cmdlist {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: right;
}

.app_search_cmdicon {
    width: 3.5vh;
    height: 3.5vh;
    margin: 0.5vh;
    border-radius: 50%;
    border: solid 1px;
    border-color: transparent;
    padding: 0.5vh;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

@media (hover: hover) {
    .app_search_cmdicon:hover {
        border-color: var(--text-secondary);
        background-color: var(--bg-hover-icon);
        cursor: pointer;
    }
}

.app_search_left {
    width: 50%;
    white-space: nowrap; 
    overflow: hidden;
    text-overflow: ellipsis;
}

.app_search_no_result {
    height: 80dvh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
}

.app_search_nr_text_1 {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    font-size: 1.8vw;
    font-weight: bold;
    color: var(--text-muted);
}

.app_search_nr_text_2 {
     display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    font-size: 1.4vw;
    color: var(--text-muted);
}

.app_current_loading {
    height: 80dvh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2vh;
}

.app_current_loading_spinner {
    width: 8vw;
    height: 8vw;
    max-width: 80px;
    max-height: 80px;
}

.app_current_loading_text {
    font-size: 1.4vw;
    color: var(--text-muted);
}

.class_btn {
    border-radius: 2vh;
    border: solid 1px;
    border-color: var(--border-btn);
    text-align: center;
    background-color: transparent;
    color: var(--text-strong);
    width: 100%;
    max-width: 25vw;
    height: 4vh;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.class_btn_clickable {
    border-color: var(--border-btn-active);
    cursor: pointer;
}

@media (hover: hover) {
    .class_btn_clickable:hover {
        background-color: rgba(85, 85, 85, 0.483)
    }
}

.class_btn_left {
    flex: 1;
    height: 3.5vh;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    font-size: 1.5vh;
    min-width: 0;
}

.class_btn_right {
    width: 3vw;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
}

.class_btn_icon {
    width: 3vh;
    height: 3vh;
    border-radius: 50%;
    margin: 0.5vh;
    border: solid 1px;
    border-color: var(--border-btn);
}

@media (hover: hover) {
    .class_btn_icon:hover {
        background-color: rgb(0, 148, 0);
        cursor: pointer;
        border-color: green
    }
}


.app_cc {
    width: 8vw;
    border: none;
    height: 3vh;
    border: solid 1px;
    border-radius: 1.5vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-strong);
}

.app_cc_caller {
    font-size: 1vw;
    font-weight: bold;
    white-space: nowrap; 
    overflow: hidden;
    text-overflow:ellipsis;

}

.app_cc_extra {
    font-size: 0.8vw;
    color: var(--text-muted);
}

.app_cc_blue {
    border-color: blue;
    background-color: rgba(116, 116, 254, 0.4);
}

.app_cc_orange {
    border-color: orange;
    background-color: rgba(255, 165, 0, 0.4);
}

.app_cc_red {
    border-color: red;
    background-color: rgba(255, 0, 0, 0.4);
}

.app_cc_redbusy {
    border-color: red;
    background-color: rgba(255, 0, 0, 0.4);
    background: repeating-linear-gradient(
        135deg,              /* Winkel der Schraffur */
        #ff0000 0,             /* Startfarbe */
        #fba1a1 1px,           /* Linienbreite */
        transparent 2px,    /* Abstand zwischen Linien */
        transparent 10px    /* Abstand bis zur nächsten Linie */
    );
}

.app_cc_green {
    border-color: green;
    background-color: rgba(0, 136, 0, 0.4);
}

.app_cc_grey {
    border-color: rgb(120, 120, 120);
    background-color: rgba(120, 120, 120, 0.4);
}

.app_cc_in_progress {
    border: 2px solid #ff0000;
    background: linear-gradient(135deg, rgb(180, 100, 0), rgb(150, 70, 0));
    animation: border_pulse 1s ease-in-out infinite;
    box-shadow: 0 0 6px rgba(255, 0, 0, 0.6);
}

@keyframes border_pulse {
    0%, 100% {
        border-color: #ff0000;
        box-shadow: 0 0 6px rgba(255, 0, 0, 0.8);
    }
    50% {
        border-color: #ff6600;
        box-shadow: 0 0 10px rgba(255, 100, 0, 0.8);
    }
}

.app_cc_private {
    font-size: 0.7vw;
    padding: 0.2vh 0.4vw;
    border: 1px solid #9C27B0;
    border-radius: 0.5vh;
    background-color: rgba(156, 39, 176, 0.4);
    color: white;
    margin-left: 0.5vw;
}

.app_current_filter {
    position: sticky;
    top: 0;
    height: 4vh;
    width: 100%;
    background-color: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    z-index: 10;
    transition: height 0.3s ease;
    box-sizing: border-box;
}

.app_current_filter.collapsed {
    height: 0;
}

.app_current_filter_content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 1vw;
    opacity: 1;
    transition: opacity 0.3s ease;
    gap: 1vw;
}

.app_current_filter.collapsed .app_current_filter_content {
    opacity: 0;
    pointer-events: none;
}

.app_current_filter_search_wrapper {
    flex: 0 0 30%;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5vw;
}

 .app_current_filter_icon_group {
     display: flex;
     flex-direction: row;
     align-items: center;
     gap: 0;
 }

 .app_current_filter_icon_group .app_search_cmdicon {
     margin: 0;
 }

.app_current_filter_search {
    flex: 1;
    height: 2.5vh;
    background-color: transparent;
    outline: none;
    border: none;
    border-bottom: solid 1px;
    border-bottom-color: var(--border-input);
    padding: 0 0.5vw;
    color: var(--text-strong);
    font-size: 1vw;
}

.app_current_filter_search::placeholder {
    color: var(--text-placeholder);
}

.app_current_filter_search:focus {
    border-bottom-color: var(--text-strong);
}

.app_current_filter_clear {
    width: 2vh;
    height: 2vh;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

@media (hover: hover) {
    .app_current_filter_clear:hover {
        opacity: 1;
    }
}

.app_current_filter_bubbles {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5vw;
}

.app_current_filter_bubble {
    height: 2.25vh;
    padding: 0 0.9vw;
    border: 1px solid;
    border-radius: 1.125vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.64vw;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    color: white;
}

@media (hover: hover) {
    .app_current_filter_bubble:hover {
        opacity: 0.8;
    }
}

/* Filter bubble color groups */
.filter_all,
.filter_msg_all,
.filter_msg_read {
    border-color: rgb(150, 150, 150);
    background-color: rgba(150, 150, 150, 0.3);
}

.filter_all.active,
.filter_msg_all.active,
.filter_msg_read.active {
    border-color: rgb(200, 200, 200);
    background-color: rgba(150, 150, 150, 0.6);
}

.filter_planned,
.filter_answered,
.filter_msg_faxin {
    border-color: green;
    background-color: rgba(0, 136, 0, 0.4);
}

.filter_planned.active,
.filter_answered.active,
.filter_msg_faxin.active {
    border-color: rgb(0, 200, 0);
    background-color: rgba(0, 136, 0, 0.7);
}

.filter_missed,
.filter_busy {
    border-color: red;
    background-color: rgba(255, 0, 0, 0.4);
}

.filter_missed.active,
.filter_busy.active {
    border-color: rgb(255, 100, 100);
    background-color: rgba(255, 0, 0, 0.7);
}

.filter_dialed,
.filter_msg_faxout {
    border-color: blue;
    background-color: rgba(116, 116, 254, 0.4);
}

.filter_dialed.active,
.filter_msg_faxout.active {
    border-color: rgb(150, 150, 254);
    background-color: rgba(116, 116, 254, 0.7);
}

.filter_msg_voicemail {
    border-color: orange;
    background-color: rgba(255, 165, 0, 0.4);
}

.filter_msg_voicemail.active {
    border-color: rgb(255, 200, 100);
    background-color: rgba(255, 165, 0, 0.7);
}

.filter_msg_unread {
    border-color: rgb(255, 100, 100);
    background-color: rgba(255, 0, 0, 0.4);
}

.filter_msg_unread.active {
    border-color: rgb(255, 150, 150);
    background-color: rgba(255, 0, 0, 0.7);
}

.app_current_filter_toggle {
    width: 20%;
    height: 0.8vw;
    background-color: var(--bg-resize);
    border-radius: 0.4vw;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 0.5vh auto;
}

@media (hover: hover) {
    .app_current_filter_toggle:hover {
        background-color: var(--bg-resize-hover);
    }
}

.app_current_filter_toggle_icon {
    width: 1.5vh;
    height: 1.5vh;
    transform: rotate(180deg);
    transition: transform 0.3s ease;
}

.app_current_filter.collapsed .app_current_filter_toggle_icon {
    transform: rotate(0deg);
}

/* Apple AI Style - Animated Border für externe KI-Suche */
@property --ai-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes ai_border_spin {
    0% {
        --ai-angle: 0deg;
    }
    100% {
        --ai-angle: 360deg;
    }
}

@keyframes ai_border_pulse {
    0%, 100% {
        opacity: 0.8;
    }
    50% {
        opacity: 1;
    }
}

.app_content.ai_searching {
    position: relative;
    overflow: visible !important;
}

.app_content.ai_searching::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 10px;
    padding: 3px;
    background: conic-gradient(
        from var(--ai-angle),
        #ff6b6b,
        #feca57,
        #48dbfb,
        #ff9ff3,
        #54a0ff,
        #5f27cd,
        #ff6b6b
    );
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask-composite: exclude;
    animation: ai_border_spin 3s linear infinite, ai_border_pulse 2s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}

.buddylist_wrapper {
    display: flex;
    flex-direction: row;
    height: 90vh;
    overflow: visible;
}

.buddylist_resize_bar,
.phone_resize_bar {
    width: 0.8vw;
    height: 18vh;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    cursor: pointer;
    opacity: 1;
    background-color: var(--bg-resize);
    border-radius: 0.4vw;
    overflow: visible;
}

.buddylist_resize_bar:hover,
.phone_resize_bar:hover {
    background-color: var(--bg-resize-hover);
}

.buddylist_resize_icon,
.phone_resize_icon {
    width: 1.5vh;
    height: 1.5vh;
}

.buddylist_resize_icon {
    transform: rotate(90deg);
}

.phone_resize_icon {
    transform: rotate(-90deg);
}

.display_phone.hidden {
    width: 0;
    opacity: 0;
}

.buddylist_wrapper.collapsed #display_buddylist {
    width: 5vw;
    opacity: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.buddylist_wrapper.collapsed .buddylist_empty {
    display: none;
}

.buddylist_wrapper.collapsed .buddylist_add_more {
    width: 5vw;
    min-height: 3vh;
    padding: 0.5vh 0;
}

.buddylist_wrapper.collapsed .buddylist_add_more .buddylist_empty_text {
    display: none;
}

.buddylist_wrapper.collapsed .buddylist_add_more .buddylist_empty_add {
    width: 2vw;
    height: 2vw;
    font-size: 1.5vw;
}

.buddylist_wrapper.collapsed .buddylist_page_selector {
    margin-top: auto;
    width: 5vw;
}

.buddylist_item.buddylist_item_collapsed {
    width: 5vw !important;
    height: 5vh;
    justify-content: flex-start;
    gap: 0;
    padding: 0;
    cursor: grab;
}

.buddylist_item_collapsed .buddylist_item_status {
    width: 0.5vw;
    height: 100%;
}

.buddylist_item_collapsed .buddylist_buddy_nr {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.buddylist_buddy_nr {
    font-size: 1.2vh;
    color: var(--text-strong);
}

/* PDF Preview Modal */
.msg_pdf_overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-modal);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.msg_pdf_container {
    width: 80%;
    height: 90%;
    background-color: var(--bg-panel);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}

.msg_pdf_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1vh 1vw;
    border-bottom: 1px solid #333;
}

.msg_pdf_title {
    font-size: 1.2vw;
    font-weight: bold;
    color: white;
}

.msg_pdf_close {
    width: 2.5vh;
    height: 2.5vh;
    cursor: pointer;
    opacity: 0.7;
}

.msg_pdf_close:hover {
    opacity: 1;
}

.msg_pdf_frame {
    flex: 1;
    border: none;
    border-radius: 0 0 8px 8px;
}

.msg_unread {
    background-color: rgba(59, 130, 246, 0.1);
}

.app_msg_empty {
    text-align: center;
    color: rgb(177, 177, 177);
    padding: 2vh;
    font-size: 1vw;
}

/* Umleitungen App */
.app_uml_content {
    display: flex;
    flex-direction: column;
    gap: 1.5vw;
    padding: 1.5vw;
    overflow-y: auto;
    flex: 1;
    justify-content: center;
    height: 100%;
}

.app_uml_section {
    background-color: var(--bg-panel);
    opacity: 0.95;
    border: 1px solid var(--border-medium);
    border-radius: 0.5vw;
    padding: 1vw;
}

.app_uml_row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app_uml_label {
    display: flex;
    flex-direction: column;
    gap: 0.2vw;
}

.app_uml_title {
    font-size: min(1.2vw, 16px);
    font-weight: bold;
    color: var(--text-strong);
}

.app_uml_desc {
    font-size: min(0.9vw, 12px);
    color: var(--text-muted);
}

.app_uml_target_row {
    display: flex;
    align-items: center;
    gap: 0.5vw;
    margin-top: 0.8vw;
    position: relative;
}

.app_uml_time_row {
    display: flex;
    align-items: center;
    gap: 0.5vw;
    margin-top: 0.5vw;
}

.app_uml_target_label {
    font-size: min(1vw, 13px);
    color: var(--text-secondary);
    min-width: min(5vw, 65px);
}

.app_uml_input {
    flex: 1;
    padding: min(0.5vw, 8px);
    font-size: min(1vw, 14px);
    background-color: var(--bg-input);
    border: 1px solid var(--border-medium);
    border-radius: 0.3vw;
    color: var(--text-strong);
    outline: none;
}

.app_uml_input:focus {
    border-color: var(--border-hover);
}

.app_uml_input_clear {
    position: absolute;
    right: min(0.5vw, 8px);
    font-size: min(1.2vw, 16px);
    color: var(--text-placeholder);
    cursor: pointer;
    padding: 0 min(0.3vw, 4px);
    z-index: 1;
}

.app_uml_input_clear:hover {
    color: var(--text-strong);
}

.app_uml_suggestions {
    position: absolute;
    left: min(3.5vw, 45px);
    right: 0;
    top: 100%;
    max-height: 15vw;
    overflow-y: auto;
    background-color: var(--bg-panel);
    border: 1px solid var(--border-medium);
    border-radius: 0.3vw;
    z-index: 100;
    box-shadow: var(--shadow);
}

.app_uml_suggestions:empty {
    display: none;
}

.app_uml_suggestion_item {
    display: flex;
    justify-content: space-between;
    padding: min(0.5vw, 8px) min(0.8vw, 10px);
    cursor: pointer;
    transition: background-color 0.15s;
}

.app_uml_suggestion_item:hover {
    background-color: var(--bg-hover);
}

.app_uml_suggestion_name {
    font-size: min(1vw, 14px);
    color: var(--text-strong);
}

.app_uml_suggestion_number {
    font-size: min(0.9vw, 12px);
    color: var(--text-muted);
}

.app_uml_locked {
    opacity: 0.4;
    pointer-events: none;
}

.app_uml_locked .app_uml_input {
    cursor: not-allowed;
}

.app_uml_bubble_container {
    display: flex;
    flex-wrap: wrap;
    gap: min(0.5vw, 6px);
}

.app_uml_bubble {
    padding: min(0.4vw, 6px) min(0.8vw, 10px);
    font-size: min(0.9vw, 12px);
    background-color: var(--bg-input);
    border: 1px solid var(--border-medium);
    border-radius: min(1vw, 15px);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.app_uml_bubble:hover {
    background-color: var(--bg-input-hover);
    color: var(--text-strong);
}

.app_uml_bubble_active {
    background-color: var(--bg-subtle-strong);
    border-color: var(--border-strong);
    color: var(--text-strong);
}

.app_uml_bubble_active:hover {
    background-color: var(--bg-hover);
}

.app_uml_status_toggle {
    padding: min(0.4vw, 6px) min(1vw, 12px);
    font-size: min(0.9vw, 12px);
    background-color: var(--bg-input);
    border: 1px solid var(--border-medium);
    border-radius: min(1vw, 15px);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    min-width: min(5vw, 60px);
    text-align: center;
}

.app_uml_status_toggle:hover {
    background-color: var(--bg-input-hover);
}

.app_uml_status_toggle.app_uml_status_active {
    background-color: #4CAF50;
    border-color: #4CAF50;
    color: #fff;
}

.app_uml_status_toggle.app_uml_status_active:hover {
    background-color: #45a049;
}

/* Ausnahme Picker Komponente */
.atg_picker {
    margin-top: 0.8vw;
    padding-top: 0.5vw;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.atg_picker_row {
    display: flex;
    align-items: center;
    gap: min(0.8vw, 10px);
}

.atg_picker_label {
    font-size: min(1vw, 13px);
    color: rgba(255,255,255,0.7);
    min-width: min(5vw, 65px);
}

.atg_picker_toggle {
    padding: min(0.4vw, 6px) min(1vw, 12px);
    font-size: min(0.9vw, 12px);
    background-color: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: min(1vw, 15px);
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    transition: all 0.15s ease;
    min-width: min(5vw, 60px);
    text-align: center;
}

.atg_picker_toggle:hover {
    background-color: rgba(255,255,255,0.25);
}

.atg_picker_toggle_active {
    background-color: #4CAF50;
    border-color: #4CAF50;
    color: #fff;
}

.atg_picker_toggle_active:hover {
    background-color: #45a049;
}

.atg_picker_content {
    margin-top: 0.5vw;
    margin-left: calc(min(5vw, 65px) + min(0.8vw, 10px));
}

.atg_picker_type_row {
    display: flex;
    gap: min(0.4vw, 5px);
    flex: 1;
}

.atg_picker_type {
    padding: min(0.3vw, 4px) min(0.6vw, 8px);
    font-size: min(0.8vw, 11px);
    background-color: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: min(0.6vw, 8px);
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.15s ease;
}

.atg_picker_type:hover {
    background-color: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.8);
}

.atg_picker_type_active {
    background-color: rgba(76, 175, 80, 0.3);
    border-color: #4CAF50;
    color: #fff;
}

.atg_picker_input_row {
    position: relative;
    display: flex;
    align-items: center;
}

.atg_picker_input {
    flex: 1;
    width: 100%;
    padding: min(0.4vw, 6px);
    font-size: min(0.9vw, 12px);
    background-color: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 0.3vw;
    color: #fff;
    outline: none;
    box-sizing: border-box;
}

.atg_picker_input:focus {
    border-color: rgba(255,255,255,0.3);
}

.atg_picker_input_clear {
    position: absolute;
    right: min(0.5vw, 8px);
    font-size: min(1.2vw, 16px);
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    padding: 0 min(0.3vw, 4px);
    z-index: 1;
}

.atg_picker_input_clear:hover {
    color: rgba(255,255,255,0.8);
}

.atg_picker_suggestions {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    max-height: 12vw;
    overflow-y: auto;
    background-color: rgb(40, 40, 40);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 0.3vw;
    z-index: 100;
    box-shadow: 0 0.3vw 0.8vw rgba(0,0,0,0.4);
}

.atg_picker_suggestions:empty {
    display: none;
}

.atg_picker_suggestion_item {
    display: flex;
    justify-content: space-between;
    padding: min(0.4vw, 6px) min(0.6vw, 8px);
    cursor: pointer;
    transition: background-color 0.15s;
}

.atg_picker_suggestion_item:hover {
    background-color: rgba(255,255,255,0.1);
}

.atg_picker_suggestion_name {
    font-size: min(0.9vw, 12px);
    color: #fff;
}

.atg_picker_suggestion_nr {
    font-size: min(0.8vw, 11px);
    color: rgba(255,255,255,0.5);
}

.atg_picker_selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: min(0.4vw, 6px);
    background-color: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.4);
    border-radius: 0.3vw;
    margin-top: 0.3vw;
}

.atg_picker_selected:empty {
    display: none;
}

.atg_picker_selected_text {
    font-size: min(0.9vw, 12px);
    color: #fff;
}

.atg_picker_selected_remove {
    font-size: min(1.2vw, 16px);
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    padding: 0 min(0.3vw, 4px);
}

.atg_picker_selected_remove:hover {
    color: #ff6b6b;
}


/* ============================================================
   app_chat – WhatsApp-artiger Chat
   ============================================================ */

#app_chat {
    overflow: hidden;
}

.app_chat_wrapper {
    display: flex;
    flex-direction: row;
    height: 90vh;
    overflow: hidden;
}

/* ── Linke Spalte: Gesprächsliste ─────────────────────────── */

.app_chat_left {
    width: 28%;
    min-width: 180px;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-medium);
    height: 100%;
    overflow: hidden;
    flex-shrink: 0;
}

.app_chat_list_header {
    display: flex;
    align-items: center;
    min-height: 7vh;
    padding: 1.2vh 1vw;
    border-bottom: 1px solid var(--border-medium);
    flex-shrink: 0;
}

.app_chat_list_title {
    font-size: min(1.3vw, 17px);
    font-weight: bold;
    color: var(--text-strong);
    display: block;
    margin-bottom: 0.8vh;
}

.app_chat_search_row {
    display: flex;
    flex-direction: row;
    align-items: center;
    background-color: var(--bg-input);
    border: 1px solid var(--border-medium);
    border-radius: 2vh;
    padding: 0 0.6vw;
    gap: 0.4vw;
}

.app_chat_search_icon {
    width: 1.6vh;
    height: 1.6vh;
    opacity: 0.5;
    flex-shrink: 0;
    filter: var(--icon-filter);
}

.app_chat_search {
    flex: 1;
    height: 3vh;
    background-color: transparent;
    border: none;
    outline: none;
    color: var(--text-strong);
    font-size: min(0.9vw, 13px);
}

.app_chat_search::placeholder {
    color: var(--text-placeholder);
}

.app_chat_list {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
}

.app_chat_list::-webkit-scrollbar {
    display: none;
}

.app_chat_list_item {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 1vh 1vw;
    cursor: pointer;
    border-bottom: 1px solid var(--border-subtle);
    transition: background-color 0.15s;
    gap: 0.7vw;
}

@media (hover: hover) {
    .app_chat_list_item:hover {
        background-color: var(--bg-hover);
    }
}

.app_chat_list_item.active {
    background-color: var(--bg-subtle-strong);
}

.app_chat_list_empty {
    text-align: center;
    color: var(--text-muted);
    font-size: min(1vw, 13px);
    padding: 3vh 1vw;
}

/* ── Avatar ───────────────────────────────────────────────── */

.app_chat_avatar {
    width: min(4.5vh, 42px);
    height: min(4.5vh, 42px);
    border-radius: 50%;
    background: linear-gradient(135deg, #4a6fa5, #6a8fc5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: min(1.5vh, 15px);
    font-weight: bold;
    color: white;
    flex-shrink: 0;
    letter-spacing: 0.05em;
}

/* ── Listeneintrags-Inhalt ────────────────────────────────── */

.app_chat_item_content {
    flex: 1;
    min-width: 0;
}

.app_chat_item_top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.3vh;
}

.app_chat_item_name {
    font-size: min(1vw, 14px);
    font-weight: bold;
    color: var(--text-strong);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.app_chat_item_time {
    font-size: min(0.7vw, 11px);
    color: var(--text-muted);
    flex-shrink: 0;
    margin-left: 0.5vw;
}

.app_chat_item_bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4vw;
}

.app_chat_item_preview {
    font-size: min(0.8vw, 12px);
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.app_chat_unread_badge {
    background-color: #25D366;
    color: white;
    border-radius: 1vh;
    min-width: 1.8vh;
    height: 1.8vh;
    padding: 0 0.4vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: min(0.7vw, 10px);
    font-weight: bold;
    flex-shrink: 0;
}

/* ── Rechte Spalte: Gesprächsansicht ─────────────────────── */

.app_chat_right {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    min-width: 0;
    min-height: 0;
}

.app_chat_view_header {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 1.2vh 1.5vw;
    border-bottom: 1px solid var(--border-medium);
    gap: 1vw;
    flex-shrink: 0;
    min-height: 7vh;
}

.app_chat_placeholder_header {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: center;
}

.app_chat_placeholder_text {
    color: var(--text-muted);
    font-size: min(1vw, 14px);
}

.app_chat_header_avatar {
    width: min(5vh, 46px);
    height: min(5vh, 46px);
    font-size: min(1.7vh, 16px);
}

.app_chat_header_info {
    flex: 1;
    min-width: 0;
}

.app_chat_header_name {
    font-size: min(1.1vw, 15px);
    font-weight: bold;
    color: var(--text-strong);
}

.app_chat_header_sub {
    font-size: min(0.8vw, 11px);
    color: var(--text-muted);
    margin-top: 0.2vh;
}

/* ── Nachrichtenfläche ────────────────────────────────────── */

.app_chat_messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 1.5vh 1.5vw;
    display: flex;
    flex-direction: column;
    gap: 0.4vh;
    scrollbar-width: none;
}

.app_chat_messages::-webkit-scrollbar {
    display: none;
}

.app_chat_date_sep {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1vh 0;
}

.app_chat_date_sep span {
    font-size: min(0.75vw, 11px);
    color: var(--text-muted);
    background-color: var(--bg-panel);
    padding: 0.3vh 1vw;
    border-radius: 1vh;
    border: 1px solid var(--border-medium);
}

.app_chat_msg_row {
    display: flex;
}

.app_chat_msg_row.msg_in {
    justify-content: flex-start;
}

.app_chat_msg_row.msg_out {
    justify-content: flex-end;
}

.app_chat_bubble {
    max-width: 65%;
    padding: 0.8vh 0.9vw;
    border-radius: 1.2vh;
    position: relative;
}

.app_chat_bubble.bubble_in {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-medium);
    border-bottom-left-radius: 0.25vh;
}

.app_chat_bubble.bubble_out {
    background-color: rgba(37, 211, 102, 0.15);
    border: 1px solid rgba(37, 211, 102, 0.35);
    border-bottom-right-radius: 0.25vh;
}

.app_chat_bubble_text {
    font-size: min(1vw, 14px);
    color: var(--text-strong);
    word-break: break-word;
    line-height: 1.45;
}

.app_chat_bubble_time {
    font-size: min(0.65vw, 10px);
    color: var(--text-muted);
    text-align: right;
    margin-top: 0.3vh;
}

/* ── Eingabebereich ───────────────────────────────────────── */

.app_chat_input_area {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 1vh 1.5vw;
    border-top: 1px solid var(--border-medium);
    gap: 0.8vw;
    flex-shrink: 0;
    opacity: 0.4;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

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

.app_chat_input {
    flex: 1;
    height: 4vh;
    background-color: var(--bg-input);
    border: 1px solid var(--border-medium);
    border-radius: 2vh;
    padding: 0 1vw;
    color: var(--text-strong);
    font-size: min(1vw, 14px);
    outline: none;
    transition: border-color 0.2s ease;
}

.app_chat_input::placeholder {
    color: var(--text-placeholder);
}

.app_chat_input:focus {
    border-color: var(--border-hover);
}

.app_chat_send_btn {
    width: min(4.5vh, 42px);
    height: min(4.5vh, 42px);
    border-radius: 50%;
    background-color: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.15s ease;
}

@media (hover: hover) {
    .app_chat_send_btn:hover {
        background-color: #1aad54;
    }
}

.app_chat_send_icon {
    width: min(2.2vh, 20px);
    height: min(2.2vh, 20px);
    filter: invert(1) brightness(2);
    transform: rotate(90deg);
}
