﻿/* ============================================================
          @@@@@@@@@@@@@@                                                                                      
       @@@@@@@@@@@@@@@@@@@@                                                                                   
     @@@@@@@@@@@@@@@@@@@@@@@@                                                                                 
   @@@@@@@@@@@@@  @@@@@@@@@@@@@                                                                               
  @@@@@@@@@@@@@    @@@@@@@@@@@@@                                                                              
 @@@@@@@@@@@@@      @@@@@@@@@@@@@                                                                             
@@@@@@@@@@@@@        @@@@@@@@@@@@@     +%@%%%@%*    *%@%%%@%*   @%%@%%% +%@%%%@# *@#    *@#  @#  #%%%%%%%#    
@@@@@@@@@@@@    @@    @@@@@@@@@@@@    *@#     *@#  #@#     #@%  @%*    *@#     %@  %%  %@*   @# #%       %%   
@@@@@@@@@@@    @@@@    @@@@@@@@@@@    @#       %@* %%       %@  @%     @#%%%%%%%%%  #%%#     @##@         @%  
@@@@@@@@@@    @@@@@@    @@@@@@@@@@    @#       #%* %@       %@  @%     %%          *%%%@+    @#*@#        @#  
@@@@@@@@@    @@@@@@@@    @@@@@@@@@    +@%+   +%#@* %@@=   +%@*  @%      @%*    %* %@*  #@#   @# #@#     #@#   
@@@@@@@@           @@@    @@@@@@@@      *%%%%% #%  %% #%%%%*    %#       +%%%%%+ #%      %#  %*   #%%%%%#     
 @@@@@@             @@@    @@@@@@                  %%                                                         
  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@                   %%                                                         
   @@@@@@@@@@@@@@@@@@@@@@@@@@@@                                                                               
     @@@@@@@@@@@@@@@@@@@@@@@@                                                                                 
       @@@@@@@@@@@@@@@@@@@@                                                                                   
          @@@@@@@@@@@@@@                                                                                      


   ============================================================ */

/* ===== ROOT VARIABLEN ===== */
:root {
    /* Farben */
    --primary-gradient: linear-gradient(135deg, #Cffe25, 0%, #d2ff00 100%);
    --primary-color: #d2ff00;
    --primary-dark: #b2c73;
    --primary-color-0: #f9ffe2;
    --primary-color-1: #f3ffcc;
    --primary-color-2: #e7ff9a;
    --primary-color-3: #daff64;
    --primary-color-4: #cfff38;
    --primary-color-5: #c8ff1d;
    --primary-color-6: #c2ff00;
    --primary-color-7: #ace300;
    --primary-color-8: #98ca00;
    --primary-color-9: #81ae00;
    --primary-button-bg: #c2ff00;
    --primary-button-txt: #000;
    --primary-button-hover: #98ca00;
    --success-color: #10b981;
    --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --warning-color: #f59e0b;
    --warning-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --danger-color: #ef4444;
    --danger-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --info-color: #06b6d4;
    --info-gradient: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    /* Graustufen */
    --primary-grey: #1a202c;
    --secondary-grey: #718096;
    --border-color: #e2e8f0;
    --hover-bg: #f7fafc;
    --text-primary: #1a202c;
    --text-secondary: #718096;
    --text-muted: #a0aec0;
    /* Abstände */
    --navbar-height: 70px;
    --sidebar-width: 260px;
    /* Schatten */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.15);
}

/* ===== GLOBALE RESETS ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* ===== SCHRIFTART: ROBOTO ===== */
body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f8f9fc;
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 1rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Alle Elemente verwenden Roboto */
input, textarea, select, button {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ===== TYPOGRAPHIE ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

h1 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 0.875rem;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

h4 {
    font-size: 1.1rem;
    margin-bottom: 0.625rem;
}

h5 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

h6 {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

/* ===== PAGE HEADER  ===== */
.page-header {
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color);

}

    .page-header h1 {
        font-size: 1.6rem;
        font-weight: 700;
        color: var(--text-primary);
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 5px;
    }

        .page-header h1 i {
            background: var(--primary-gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

    .page-header p {
        color: var(--text-secondary);
        margin: 0;
    }

/* ===== TOP NAVBAR ===== */
.top-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1030;
    display: flex;
    align-items: center;
    padding: 0 30px;
    box-shadow: var(--shadow-sm);
}

    .top-navbar .navbar-brand {
        display: flex;
        align-items: center;
        text-decoration: none;
    }

        .top-navbar .navbar-brand img {
            max-height: 40px;
            width: auto;
            margin-left: 30px;
        }

    /* Logo-Animation nur bei Toggle-Klick */
    .top-navbar.animated .navbar-brand img {
        transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Logo nach links wenn Sidebar minimiert */
    html.sidebar-is-collapsed .top-navbar .navbar-brand img {
        margin-left: -12px;
    }

    .top-navbar .navbar-right {
        margin-left: auto;
        display: flex;
        align-items: center;
        gap: 20px;
    }

.agency-badge {
    background: var(--primary-color);
    color: #111112;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s;
    cursor: pointer;
}

    .agency-badge:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(102, 126, 234, .3);
        color: #111112;
    }

/* ═══════════════════════════════════════════════════════════
   GLOBAL ESTATE FILTER
   ═══════════════════════════════════════════════════════════ */
.global-filter-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    z-index: 1060;
}

.global-filter-btn {
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

    .global-filter-btn:hover {
        border-color: var(--primary-color);
        color: var(--primary-color);
        background: rgba(102, 126, 234, 0.08);
    }

.global-filter-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f59e0b;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    max-width: 320px;
    white-space: nowrap;
}

    .global-filter-pill:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    }

.global-filter-pill-text {
    overflow: hidden;
    text-overflow: ellipsis;
}

.global-filter-pill-clear {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
    opacity: 0.8;
    cursor: pointer;
    margin-left: 4px;
    padding: 0 4px;
    color: #ffffff;
}

    .global-filter-pill-clear:hover {
        opacity: 1;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 50%;
    }

/* Dropdown panel */
.gf-panel {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 360px;
    max-height: 440px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
    flex-direction: column;
    overflow: hidden;
    z-index: 1061;
}

    .gf-panel.gf-panel-open {
        display: flex;
    }

.gf-panel-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

    .gf-panel-search input {
        border: none;
        outline: none;
        background: transparent;
        font-size: 0.84rem;
        flex: 1;
        color: var(--text-primary);
    }

.gf-panel-list {
    overflow-y: auto;
    flex: 1;
    max-height: 380px;
    padding: 6px 0;
}

.gf-empty {
    padding: 20px;
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

/* Tree rows */
.gf-row {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    font-size: 0.82rem;
    color: var(--text-primary);
    cursor: default;
    user-select: none;
}

.gf-row-icon {
    font-size: 16px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.gf-row-cli {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding-top: 8px;
}

.gf-row-est {
    font-weight: 600;
}

.gf-row-obj {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.gf-addr {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-left: 6px;
}

/* Clickable labels */
.gf-clickable {
    cursor: pointer;
    border-radius: 4px;
    padding: 1px 4px;
    transition: background 0.15s, color 0.15s;
}

    .gf-clickable:hover {
        background: rgba(102, 126, 234, 0.1);
        color: var(--primary-color);
    }

/* Chevron */
.gf-chev {
    font-size: 16px;
    color: var(--text-secondary);
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s, background 0.15s;
}

    .gf-chev:hover {
        background: rgba(102, 126, 234, 0.1);
        color: var(--primary-color);
    }

    .gf-chev.gf-chev-open {
        transform: rotate(90deg);
    }

.gf-chev-space {
    display: inline-block;
    width: 22px;
    flex-shrink: 0;
}

/* Nesting */
.gf-nest {
    padding-left: 18px;
}

/* Backdrop */
.gf-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1059;
}

    .gf-backdrop.gf-backdrop-open {
        display: block;
    }

/* User Avatar */
.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

    .user-avatar:hover {
        border-color: var(--primary-color);
        transform: scale(1.05);
    }

/* ═══════════════════════════════════════════════════════════
   TEAM MESSAGING
   ═══════════════════════════════════════════════════════════ */
.msg-icon-btn {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: background 0.2s;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
}

.msg-icon-btn:hover {
    background: var(--primary-color);
    color:#1a1a2e;
}

.msg-badge {
    position: absolute;
    top: 0;
    right: -2px;
    background: #e74c3c;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    border-radius: 8px;
    padding: 0 4px;
}

.msg-panel-overlay {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.15);
    z-index: 1049;
}

.msg-panel {
    position: fixed;
    top: var(--navbar-height);
    right: -400px;
    width: 380px;
    height: calc(100vh - var(--navbar-height));
    background: #fff;
    box-shadow: -4px 0 24px rgba(0,0,0,0.12);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    transition: right 0.25s ease;
}

.msg-panel.open {
    right: 0;
}

.msg-panel-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px 12px 24px;
    border-bottom: 1px solid var(--border-color, #dee2e6);
    background: #f8f9fa;
    flex-shrink: 0;
}

.msg-collapse-btn {
    position: absolute;
    left: -16px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: #d5d8dc;
    border: 2px solid #fff;
    cursor: pointer;
    padding: 0;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.15s;
    box-shadow: -2px 0 6px rgba(0,0,0,0.12);
    z-index: 1;
}

.msg-collapse-btn:hover {
    background: #bdc3c7;
    color: #222;
}

.msg-panel-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color, #dee2e6);
    flex-shrink: 0;
}

.msg-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 8px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #888;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
}

.msg-tab:hover { color: darkslategrey; }

.msg-tab.active {
    color: darkslategrey;
    border-bottom-color: var(--primary-color, #4361ee);
}

.msg-panel-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.msg-compose {
    display: flex;
    gap: 6px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color, #dee2e6);
    background: #fafafa;
    flex-shrink: 0;
}

.msg-compose-input {
    flex: 1;
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.82rem;
    resize: none;
    outline: none;
    overflow: hidden;
    min-height: 32px;
    max-height: 120px;
}

.msg-compose-input:focus {
    border-color: var(--primary-color, #4361ee);
}

.msg-compose-send {
    background: var(--primary-color, #4361ee);
    color: #344054;
    border: none;
    border-radius: 6px;
    width: 38px;
    height: 38px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    flex-shrink: 0;
    align-self: flex-end;
}

.msg-compose-send:hover { background: var(--primary-button-hover, #3a56d4); }

.chat-inline-image {
    max-width: 100%;
    max-height: 240px;
    border-radius: 6px;
    margin-top: 4px;
    cursor: pointer;
    display: block;
}

.msg-image-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,0.85);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.msg-image-lightbox img {
    max-width: 95vw;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.5);
}

.msg-image-lightbox-close {
    position: absolute;
    top: 16px;
    right: 24px;
    background: none;
    border: none;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    line-height: 1;
    z-index: 1;
}

.msg-image-preview {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: #f0f0f0;
    border-radius: 6px;
    margin-bottom: 4px;
}

.msg-image-preview img {
    max-height: 60px;
    max-width: 120px;
    border-radius: 4px;
}

.msg-image-preview-remove {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #888;
    padding: 0 4px;
}

.msg-feed {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.msg-item {
    display: flex;
    gap: 10px;
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}

.msg-item:hover { background: #f8f9fa; }

.msg-item.unread {
    background: #f0f4ff;
    border-left: 3px solid var(--primary-color, #4361ee);
}

.msg-item-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.msg-item-body { flex: 1; min-width: 0; }

.msg-item-header {
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.msg-item-time {
    color: #999;
    font-size: 0.7rem;
    margin-left: auto;
}

.msg-item-content {
    font-size: 0.82rem;
    color: #333;
    margin-top: 2px;
    word-break: break-word;
}

.msg-dm-badge {
    font-size: 0.6rem;
    background: #e8e8e8;
    color: #666;
    padding: 1px 5px;
    border-radius: 3px;
    font-weight: 600;
}

.msg-ref {
    font-size: 0.72rem;
    color: var(--primary-color, #4361ee);
    text-decoration: none;
}

.msg-ref:hover { text-decoration: underline; }

/* Chat member list */
.msg-member-list {
    overflow-y: auto;
    flex: 1;
}

.msg-member {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid #f0f0f0;
}

.msg-member:hover { background: #f0f4ff; }

.msg-member-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-color, #4361ee);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.msg-member-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.msg-member-name { font-size: 0.85rem; font-weight: 600; }
.msg-member-email { font-size: 0.72rem; color: #999; }

/* Tab unread badge */
.msg-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: #e74c3c;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    margin-left: 4px;
    vertical-align: middle;
}

/* Member unread badge (bottom-right of avatar) */
.msg-member-avatar {
    position: relative;
}

.msg-member-unread {
    position: absolute;
    bottom: -2px;
    right: -2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: #e74c3c;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

.msg-conv-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color, #dee2e6);
    background: #f8f9fa;
    flex-shrink: 0;
}

#msgConversation {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

#msgConversation .msg-feed {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

#msgConversation .msg-compose {
    border-top: 1px solid var(--border-color, #dee2e6);
    border-bottom: none;
}

/* ── Chat Bubbles (Conversation View) ── */
.chat-row {
    display: flex;
    padding: 6px 12px;
    gap: 8px;
}

.chat-row-other {
    align-items: flex-start;
    justify-content: flex-start;
}

.chat-row-me {
    flex-direction: column;
    align-items: flex-end;
}

.chat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color, #4361ee);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.chat-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.chat-body {
    max-width: 75%;
    min-width: 0;
}

.chat-meta,
.chat-meta-me {
    font-size: 0.7rem;
    color: #999;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-meta-me {
    justify-content: flex-end;
}

.chat-name {
    font-weight: 600;
    color: #555;
}

.chat-time {
    color: #aaa;
}

.chat-bubble {
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.82rem;
    line-height: 1.45;
    word-break: break-word;
    max-width: 75%;
}

.chat-bubble-other {
    background: #f0f0f0;
    color: #222;
    border-top-left-radius: 4px;
}

.chat-bubble-me {
    background: var(--primary-color, #4361ee);
    color: #222;
    border-top-right-radius: 4px;
    margin-left: auto;
}

/* Profilbild-Kreis im Modal */
.profile-pic-circle {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 3px solid var(--border-color);
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}

.profile-pic-initials {
    color: #fff;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 1px;
    line-height: 1;
}

/* Dropdown Menu */
.dropdown-menu-custom {
    position: absolute;
    top: 55px;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    min-width: 280px;
    display: none;
    z-index: 1040;
    overflow: hidden;
}

    .dropdown-menu-custom.show {
        display: block;
        animation: slideDown 0.2s ease;
    }

.dropdown-header-custom {
    padding: 20px;
    background: var(--primary-gradient);
    color: white;
}

    .dropdown-header-custom h6 {
        margin: 0 0 5px 0;
        font-weight: 600;
        font-size: 1rem;
    }

    .dropdown-header-custom small {
        opacity: 0.9;
        font-size: 0.85rem;
    }

.dropdown-item-custom {
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
}

    .dropdown-item-custom:hover {
        background: var(--hover-bg);
        color: var(--primary-color);
    }

    .dropdown-item-custom i {
        width: 20px;
        font-size: 1.1rem;
    }

/* ===== GOOGLE MATERIAL SYMBOLS - Zentrale Konfiguration ===== */
.material-symbols-rounded {
    font-family: 'Material Symbols Rounded';
    font-weight: normal;
    font-style: normal;
    font-size: 22px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: 'liga';
    font-variation-settings:
        'FILL' 0,
        'wght' 300,
        'GRAD' 0,
        'opsz' 24;
    /* FOUT Prevention: clip text fallback to icon size */
    width: 1em;
    height: 1em;
    overflow: hidden;
}

/* Filled variant fuer aktive/hover Icons */
.sidebar-menu > li > a.active > .material-symbols-rounded:first-child,
.sidebar-menu > li > a:hover > .material-symbols-rounded:first-child {
    font-variation-settings:
        'FILL' 1,
        'wght' 400,
        'GRAD' 0,
        'opsz' 24;
}

/* ===== SIDEBAR ===== */
/* Instant collapse before JS (prevents flash on page load) */
html.sidebar-is-collapsed .sidebar { width: 72px; overflow: visible; }
html.sidebar-is-collapsed .main-content { margin-left: 72px; }
html.sidebar-is-collapsed .sidebar-toggle { left: 58px; }
html.sidebar-is-collapsed .sidebar-toggle i { transform: rotate(180deg); }
html.sidebar-is-collapsed .sidebar-menu { padding: 0 8px; }
html.sidebar-is-collapsed .sidebar-menu > li > a { justify-content: center; padding: 10px; gap: 0; border-radius: 12px; }
html.sidebar-is-collapsed .sidebar-menu > li > a span:not(.material-symbols-rounded),
html.sidebar-is-collapsed .submenu-arrow { opacity: 0; width: 0; overflow: hidden; pointer-events: none; position: absolute; }
html.sidebar-is-collapsed .sidebar-menu .has-submenu > a { padding-right: 10px; }
html.sidebar-is-collapsed .submenu,
html.sidebar-is-collapsed .submenu.show { display: none; }

.sidebar {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--navbar-height));
    background: #1a1a2e;
    border-right: none;
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 1020;
    padding: 30px 0;
}

/* Transition only added after first paint via JS class */
.sidebar.animated {
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed {
    width: 72px;
    overflow: visible;
}

    .sidebar::-webkit-scrollbar { width: 4px; }
    .sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }
    .sidebar::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* Toggle Button (outside sidebar, fixed position) */
.sidebar-toggle {
    position: fixed;
    top: calc(var(--navbar-height) + 14px);
    left: calc(var(--sidebar-width) - 14px);
    width: 28px;
    height: 28px;
    margin-top: -5px;
    border-radius: 50%;
    background: #2d2d44;
    border: 2px solid #2d2d44;
    color: #8b8ba3;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.65rem;
    z-index: 1030;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.sidebar-toggle.animated {
    transition: left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

    .sidebar-toggle:hover {
        background: var(--primary-color);
        color: #1a1a2e;
        border-color: var(--primary-color);
    }

.sidebar.collapsed ~ .sidebar-toggle {
    left: 58px;
}

.sidebar.collapsed ~ .sidebar-toggle i {
    transform: rotate(180deg);
}

.sidebar-menu {
    list-style: none;
    padding: 0 10px;
}

    .sidebar-menu > li {
        margin-bottom: 4px;
    }

    .sidebar-menu a {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 10px 14px;
        color: #a0a0b8;
        text-decoration: none;
        transition: color 0.18s, background 0.18s;
        font-size: 0.88rem;
        font-weight: 500;
        border-radius: 10px;
        position: relative;
        white-space: nowrap;
    }

    .sidebar-menu a span {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .sidebar-menu a:hover {
        background: rgba(255,255,255,0.06);
        color: #fff;
    }

    .sidebar-menu a.active {
        background: rgba(210, 255, 0, 0.1);
        color: #fff !important;
    }

    /* Icon-Container (erstes Material Symbol im Link) */
    .sidebar-menu > li > a > .material-symbols-rounded:first-child {
        width: 36px;
        height: 36px;
        font-size: 22px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        flex-shrink: 0;
        background: rgba(255,255,255,0.04);
    }

    .sidebar-menu > li > a.active > .material-symbols-rounded:first-child,
    .sidebar-menu > li > a:hover > .material-symbols-rounded:first-child {
        background: var(--primary-color);
        color: #1a1a2e;
        box-shadow: 0 0 20px rgba(210, 255, 0, 0.3);
    }

    .sidebar-menu a .material-symbols-rounded {
        font-size: 20px;
    }

    /* Submenu */
    .sidebar-menu .has-submenu > a {
        padding-right: 36px;
    }

.submenu-arrow {
    position: absolute;
    right: 14px;
    transition: transform 0.25s ease;
    font-size: 14px !important;
    opacity: 0.4;
}

.has-submenu > a.expanded .submenu-arrow {
    transform: rotate(180deg);
}

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    list-style: none;
    padding: 0;
    margin: 2px 0 0 0;
    position: relative;
    margin-left: 33px;
    padding-left: 14px;
    border-left: 2px solid rgba(255,255,255,0.1);
}

    .submenu.show {
        max-height: 500px;
    }

    .submenu li {
        list-style: none;
        padding: 1px 0;
        position: relative;
    }

    .submenu li a {
        margin-left: 0;
        padding: 7px 14px;
        font-size: 0.85rem;
        font-weight: 400;
        border-radius: 8px;
        color: #7a7a96;
    }

    /* Icons in Submenu ausblenden */
    .submenu li a i {
        display: none;
    }

    .submenu li a:hover {
        background: rgba(255,255,255,0.04);
        color: #d0d0e0;
    }

    .submenu li a.active {
        background: rgba(210, 255, 0, 0.08);
        color: #fff;
        font-weight: 500;
    }

    /* Aktive Linie: dickere primary-color Linie neben aktivem Item */
    .submenu li.active-item {
        position: relative;
    }

    .submenu li:has(> a.active) {
        position: relative;
    }

    .submenu li:has(> a.active)::before {
        content: '';
        position: absolute;
        left: -15px;
        top: 4px;
        bottom: 4px;
        width: 3px;
        background: var(--primary-color);
        border-radius: 3px;
        box-shadow: 0 0 8px rgba(210, 255, 0, 0.4);
    }

    /* Hover: weisse dicke Linie (gleich wie active, aber weiss) */
    .submenu li:has(> a:hover)::before {
        content: '';
        position: absolute;
        left: -15px;
        top: 4px;
        bottom: 4px;
        width: 3px;
        background: #fff;
        border-radius: 3px;
        box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
    }

    /* Active hat Vorrang vor Hover */
    .submenu li:has(> a.active):has(> a:hover)::before {
        background: var(--primary-color);
        box-shadow: 0 0 8px rgba(210, 255, 0, 0.4);
    }

/* Collapsed: menu adjustments */
.sidebar.collapsed .sidebar-menu {
    padding: 0 8px;
}

.sidebar.collapsed .sidebar-menu > li > a {
    justify-content: center;
    padding: 10px;
    gap: 0;
    border-radius: 12px;
}

.sidebar.collapsed .sidebar-menu > li > a span:not(.material-symbols-rounded),
.sidebar.collapsed .submenu-arrow {
    opacity: 0;
    width: 0;
    overflow: hidden;
    pointer-events: none;
    position: absolute;
}

/* Collapsed: Tooltip on hover */
.sidebar.collapsed .sidebar-menu > li {
    position: relative;
}

.sidebar.collapsed .sidebar-menu > li > a::after {
    content: attr(data-title);
    position: absolute;
    left: 100%;
    margin-left: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #2d2d44;
    color: #fff;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
    z-index: 1060;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.sidebar.collapsed .sidebar-menu > li > a:hover::after {
    opacity: 1;
}

/* Hide tooltip for has-submenu items (flyout replaces it) */
.sidebar.collapsed .has-submenu > a::after {
    display: none;
}

/* Collapsed: Submenu as flyout */
.sidebar.collapsed .has-submenu {
    position: relative;
}

/* Hide ALL submenus completely in collapsed mode */
.sidebar.collapsed .submenu,
.sidebar.collapsed .submenu.show {
    display: none;
}

/* Show only on hover as flyout */
.sidebar.collapsed .has-submenu:hover > .submenu,
.sidebar.collapsed .has-submenu:hover > .submenu.show {
    display: block;
    position: absolute;
    left: 100%;
    top: 0;
    transform: none;
    margin-left: 12px;
    padding: 8px 8px 8px 0;
    background: #2d2d44;
    border-radius: 12px;
    border-left: none;
    min-width: 200px;
    max-height: none;
    overflow: visible;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 1060;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

/* Invisible hover bridge between icon and flyout */
.sidebar.collapsed .has-submenu::after {
    content: '';
    position: absolute;
    top: 0;
    left: 100%;
    width: 16px;
    height: 100%;
    background: transparent;
}

/* Reset expanded styles in flyout */
.sidebar.collapsed .submenu li {
    padding: 1px 0;
    position: relative;
}

.sidebar.collapsed .submenu li::before {
    display: none;
}

/* Flyout inner layout */
.sidebar.collapsed .has-submenu:hover > .submenu,
.sidebar.collapsed .has-submenu:hover > .submenu.show {
    padding: 8px 8px 8px 0;
    border-left: none;
}

/* Durchgehende graue Linie - eigenstaendig, losgeloest von Links */
.sidebar.collapsed .has-submenu:hover > .submenu::before,
.sidebar.collapsed .has-submenu:hover > .submenu.show::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    z-index: 0;
}

.sidebar.collapsed .submenu li a {
    display: block;
    padding: 7px 14px;
    margin-left: 26px;
    font-size: 0.82rem;
    font-weight: 400;
    color: #a0a0b8;
    border-radius: 8px;
    text-align: left;
}

/* No icons in flyout */
.sidebar.collapsed .submenu li a i {
    display: none;
}

.sidebar.collapsed .submenu li a:hover {
    background: rgba(255,255,255,0.04);
    color: #d0d0e0;
}

.sidebar.collapsed .submenu li a.active {
    color: #fff;
    font-weight: 500;
    background: rgba(210, 255, 0, 0.08);
}

/* Primary-Color Linie ueberlagert die graue Linie beim aktiven Item - NUR im Flyout-Hover */
.sidebar.collapsed .has-submenu:hover > .submenu li:has(> a.active)::before,
.sidebar.collapsed .has-submenu:hover > .submenu.show li:has(> a.active)::before {
    display: block;
    content: '';
    position: absolute;
    left: 14px;
    top: 3px;
    bottom: 3px;
    width: 3px;
    background: var(--primary-color);
    border-radius: 3px;
    box-shadow: 0 0 8px rgba(210, 255, 0, 0.4);
    z-index: 2;
}

/* Hover: weisse Linie im Flyout */
.sidebar.collapsed .has-submenu:hover > .submenu li:has(> a:hover)::before,
.sidebar.collapsed .has-submenu:hover > .submenu.show li:has(> a:hover)::before {
    display: block;
    content: '';
    position: absolute;
    left: 14px;
    top: 3px;
    bottom: 3px;
    width: 3px;
    background: #fff;
    border-radius: 3px;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
    z-index: 2;
}

/* Active hat Vorrang vor Hover im Flyout */
.sidebar.collapsed .has-submenu:hover > .submenu li:has(> a.active):has(> a:hover)::before,
.sidebar.collapsed .has-submenu:hover > .submenu.show li:has(> a.active):has(> a:hover)::before {
    background: var(--primary-color);
    box-shadow: 0 0 8px rgba(210, 255, 0, 0.4);
}

.sidebar.collapsed .submenu li a.active::before {
    display: none;
}

/* Main content shift */
.main-content {
    margin-left: var(--sidebar-width);
}

.main-content.animated {
    transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed ~ .main-content {
    margin-left: 72px;
}
/*=========LANGUAGE==========*/
/* ✅ Language Dropdown Styles */
.language-dropdown {
    position: relative;
    margin-right: 15px;
}

.language-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 16px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
}

    .language-button:hover {
        background: #f8fafc;
        border-color: #cbd5e1;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }

    .language-button .flag {
        font-size: 20px;
    }

    .language-button .lang-text {
        font-weight: 500;
    }

    .language-button i.fa-chevron-down {
        font-size: 10px;
        color: #64748b;
        transition: transform 0.2s ease;
    }

    .language-button:hover i.fa-chevron-down {
        transform: translateY(2px);
    }

.language-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    border: 1px solid #e2e8f0;
}

    .language-menu.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

.language-form {
    padding: 8px;
    margin: 0;
}

.language-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.15s ease;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    position: relative;
}

    .language-item:hover {
        background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    }

    .language-item.active {
        background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
        color: #6366f1;
    }

    .language-item .flag {
        font-size: 24px;
    }

    .language-item .lang-name {
        flex: 1;
    }

    .language-item i.fa-check {
        color: #6366f1;
        font-size: 14px;
    }

@media (max-width: 768px) {
    .language-button .lang-text {
        display: none;
    }

    .language-button {
        padding: 8px 12px;
    }
}
/* ===== MAIN CONTENT ===== */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--navbar-height);
    padding: 40px;
    min-height: calc(100vh - var(--navbar-height));
}

/* ===== BUTTONS ===== */
.btn {
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    font-family: 'Roboto', sans-serif;
}

    .btn:hover {
        transform: translateY(-1px);
    }

.btn-primary {
    background: var(--primary-gradient);
    color: black;
}

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
        background-color: var(--primary-button-hover);
        color:black;
    }

.btn-success {
    background: var(--success-gradient);
    color: white;
}

.btn-warning {
    background: var(--warning-gradient);
    color: white;
}

.btn-danger {
    background: var(--danger-gradient);
    color: white;
}

.btn-secondary {
    background: #e2e8f0;
    color: var(--text-secondary);
}

    .btn-secondary:hover {
        background: #cbd5e0;
    }

/* Outline Buttons */
.btn-outline-primary {
    border-color: #cbd5e0;
    color: #4a5568;
    background: transparent;
}

    .btn-outline-primary i {
        transition: color 0.2s ease;
    }

    .btn-outline-primary:hover {
        background: var(--primary-gradient) !important;
        border-color: var(--primary-color) !important;
        color: white !important;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    }

        .btn-outline-primary:hover i {
            color: white !important;
        }

.btn-outline-danger {
    border-color: #cbd5e0;
    color: #4a5568;
    background: transparent;
}

    .btn-outline-danger i {
        transition: color 0.2s ease;
    }

    .btn-outline-danger:hover {
        background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%) !important;
        border-color: #dc2626 !important;
        color: white !important;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
    }

        .btn-outline-danger:hover i {
            color: white !important;
        }

/* ===== CARDS ===== */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    background: white;
}

    .card:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-2px);
    }

.modern-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: all 0.2s ease;
}

    .modern-card:hover {
        box-shadow: 0 6px 18px rgba(0,0,0,0.08);
        transform: translateY(-1px);
    }

.card-header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 18px 20px;
    font-weight: 600;
    color: var(--text-primary);
    border-radius: 12px 12px 0 0;
}

    .card-header.bg-primary {
        background: var(--primary-gradient) !important;
        color: #fff;
        border: none;
    }

    .card-header h5 {
        margin: 0;
        display: flex;
        align-items: center;
        gap: 8px;
    }

        .card-header h5 i.fa-building {
            color: #4a5568 !important;
        }

    .card-header button {
        color: #4a5568 !important;
        text-decoration: none;
    }

        .card-header button:hover {
            color: #4a5568 !important;
        }

    .card-header small.text-muted {
        color: #718096 !important;
    }

        .card-header small.text-muted i {
            color: #718096 !important;
        }

.card-body {
    padding: 24px;
}

/* ===== FORM CONTROLS ===== */
.form-control, .form-select {
    border-radius: 8px;
    border: 2px solid var(--border-color);
    padding: 5px 14px;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    font-family: 'Roboto', sans-serif;
}

    .form-control:focus, .form-select:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        outline: none;
    }

    .form-control:disabled {
        background-color: #f7fafc;
        color: #718096;
        cursor: not-allowed;
    }

    .form-control::placeholder,
    .form-select::placeholder {
        color: #cbd5e0 !important;
        opacity: 1;
    }

.form-label {
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.required-star {
    color: #dc3545;
}

/* ===== TABLES ===== */
.table {
    border-radius: 12px;
    overflow: hidden;
}

    .table thead {
        background: var(--primary-gradient);
        color: #fff;
    }

        .table thead th {
            background: var(--hover-bg);
            border-bottom: 2px solid var(--border-color);
            color: var(--text-secondary);
            font-weight: 600;
            font-size: 0.85rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            padding: 12px 16px;
        }

    .table tbody td {
        padding: 12px 16px;
        border-bottom: 1px solid var(--border-color);
        color: var(--text-secondary);
    }

    .table tbody tr:hover,
    .table-hover tbody tr:hover {
        background: var(--hover-bg);
    }

/* ===== BADGES ===== */
.badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
}

    .badge.bg-primary {
        background-color: #4a5568 !important;
    }

/* ===== MODALS ===== */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 18px 50px rgba(0,0,0,0.25);
}

.modal-header, .modal-footer {
    border-color: var(--border-color);
    padding: 18px 22px;
}

/* Delete Modal */
.delete-modal .modal-header {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
    border-bottom: none;
}

    .delete-modal .modal-header .btn-close {
        filter: brightness(0) invert(1);
    }

.delete-modal .modal-body {
    padding: 30px;
    text-align: center;
}

.delete-modal .warning-icon {
    font-size: 4rem;
    color: #dc2626;
    margin-bottom: 20px;
}

.delete-modal .modal-body h5 {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.delete-modal .modal-body p {
    color: var(--text-secondary);
    margin-bottom: 0;
}

.delete-modal .btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
}

/* ===== ALERTS ===== */
.alert {
    border-radius: 12px;
    border: none;
    padding: 16px 20px;
    animation: fadeIn 0.3s ease;
}

.alert-info {
    background: #ebf8ff;
    color: #2c5282;
    border-left: 4px solid #3182ce;
}

.alert-success {
    background: #f0fff4;
    color: #22543d;
    border-left: 4px solid #38a169;
}

.alert-warning {
    background: #fffaf0;
    color: #744210;
    border-left: 4px solid #dd6b20;
}

.alert-danger {
    background: #fff5f5;
    color: #742a2a;
    border-left: 4px solid #e53e3e;
}

/* ===== FILE ITEMS  ===== */
.file-item {
    background: white;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

    .file-item:hover {
        background: var(--hover-bg);
        border-color: var(--primary-color);
        transform: translateX(3px);
    }

.file-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-icon {
    font-size: 1.5rem;
    width: 40px;
    text-align: center;
}

.file-details {
    flex: 1;
}

.file-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.file-meta {
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-top: 2px;
}

.file-actions {
    display: flex;
    gap: 8px;
}

/* File Preview Modal */
#filePreviewModal .modal-dialog {
    max-width: 90vw;
    max-height: 90vh;
    margin: 1.75rem auto;
}

#filePreviewModal .modal-body {
    padding: 0;
    max-height: 80vh;
    overflow: auto;
}

#filePreviewModal img {
    width: 100%;
    height: auto;
    display: block;
}

#filePreviewModal iframe {
    width: 100%;
    height: 80vh;
    border: none;
}

#filePreviewModal .modal-xl {
    max-width: 95vw;
}

#pdfCanvas {
    display: none;
    margin: 0 auto;
}

#pdfLoadingIndicator {
    display: block;
}

#pdfControls button {
    min-width: 40px;
}

/* ===== LIEGENSCHAFT FORM SPEZIFISCH ===== */

/* EGID Search Container */
.egid-search-container {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    padding: 15px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    margin-bottom: 15px;
}

    .egid-search-container.hidden {
        display: none;
    }

    .egid-search-container .form-label {
        color: var(--text-primary);
        font-weight: 600;
        font-size: 0.9rem;
        margin-bottom: 10px;
        display: block;
    }

.search-btn {
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

    .search-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    }

/* OR Divider */
.or-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    gap: 15px;
}

    .or-divider::before,
    .or-divider::after {
        content: '';
        flex: 1;
        border-bottom: 2px solid var(--border-color);
    }

    .or-divider span {
        font-weight: 600;
        color: var(--text-secondary);
        font-size: 0.9rem;
        padding: 0 10px;
        background: white;
    }

/* Map Container */
.bereich-a .row {
    align-items: stretch;
}

.bereich-a .col-lg-5,
.bereich-a .col-lg-7 {
    display: flex;
    flex-direction: column;
}

.map-container {
    background: white;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 300px;
}

.map-title {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    flex-shrink: 0;
}

#map {
    flex: 1;
    width: 100%;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    min-height: 250px;
    max-height: 450px;
}

/* Tabs */
.editor-left-tabs .nav-tabs .nav-item {
    flex: 1 1 0;
}
.editor-left-tabs .nav-tabs .nav-link {
    width: 100%;
    text-align: center;
    white-space: nowrap;
}
.nav-tabs .nav-link {
    color: var(--text-secondary);
    border: none;
    padding: 12px 20px;
    font-weight: 500;
    transition: all 0.2s;
}

    .nav-tabs .nav-link:hover {
        color: var(--primary-grey);
        background: var(--hover-bg);
    }

    .nav-tabs .nav-link.active {
        color: var(--primary-grey);
        background: white;
        border-bottom: 3px solid var(--primary-color);
    }

.tab-content {
    padding: 20px 0;
}

.tab-badge {
    position: absolute;
    top: 0px;
    right: 0px;
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.7rem;
    color: white;
    z-index: 10;
    line-height: 1;
}

    .tab-badge.gray {
        background: #718096;
    }

    .tab-badge.red {
        background: #dc2626;
    }

/* Section Headers */
.section-header {
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 15px;
    margin-top: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-color);
}

/* Objekt Items */
.objekt-item {
    background: var(--hover-bg);
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
    border: 1px solid transparent;
}

    .objekt-item:hover {
        background: #e2e8f0;
        border-color: var(--primary-color);
        transform: translateX(3px);
    }

.objekt-info {
    flex: 1;
}

.objekt-nummer {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.objekt-bezeichnung {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 2px;
}

.objekt-meta {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

    .objekt-meta span {
        font-size: 0.75rem;
        color: var(--text-secondary);
        background: white;
        padding: 2px 8px;
        border-radius: 4px;
    }

/* Loading & Success Messages */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    z-index: 10;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.success-message {
    background: #d1fae5;
    border: 2px solid #10b981;
    color: #065f46;
    padding: 12px 16px;
    border-radius: 8px;
    display: none;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

    .success-message.show {
        display: flex;
    }

/* Adresse Compact */
.adresse-compact {
    background: white;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* EGID Badge */
.egid-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border: 1px solid var(--primary-color);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 500;
}

/* Wohnungen Selection */
.wohnungen-selection {
    background: #f7fafc;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    border: 1px solid var(--border-color);
}

.wohnung-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: white;
    border-radius: 6px;
    margin-bottom: 8px;
    border: 1px solid transparent;
    transition: all 0.2s;
}

    .wohnung-checkbox:hover {
        border-color: var(--primary-color);
        background: #fff;
    }

    .wohnung-checkbox input[type="checkbox"] {
        width: 18px;
        height: 18px;
        cursor: pointer;
    }

.wohnung-details {
    flex: 1;
    font-size: 0.9rem;
}

.wohnung-ewid {
    font-weight: 600;
    color: var(--text-primary);
}

.wohnung-info {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Bereich Aufteilung */
.bereich-a {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--border-color);
}

.bereich-b {
    margin-top: 20px;
}

/* Wohnungsliste Scrollbar */
#wohnungenList {
    max-height: 350px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
}

    #wohnungenList::-webkit-scrollbar {
        width: 8px;
    }

    #wohnungenList::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
    }

    #wohnungenList::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 4px;
    }

        #wohnungenList::-webkit-scrollbar-thumb:hover {
            background: var(--primary-dark);
        }

/* Manual Objekte Button */
.add-manual-objekt-btn {
    width: 100%;
    padding: 12px;
    border: 2px dashed var(--success-color);
    background: white;
    color: var(--success-color);
    border-radius: 8px;
    transition: all 0.2s;
    font-weight: 500;
    margin-top: 15px;
}

    .add-manual-objekt-btn:hover {
        background: var(--success-color);
        color: white;
        border-style: solid;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    }

.manual-objekt-item {
    background: #f0fdf4;
    border: 1px solid #86efac;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.manual-objekt-info {
    flex: 1;
}

.manual-objekt-nummer {
    font-weight: 600;
    color: var(--success-color);
}

.manual-objekt-details {
    font-size: 0.85rem;
    color: #166534;
    margin-top: 4px;
}

/* Objekte Liste Container */
#objekteListContainer {
    max-height: 350px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
}

    #objekteListContainer::-webkit-scrollbar {
        width: 8px;
    }

    #objekteListContainer::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
    }

    #objekteListContainer::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 4px;
    }

        #objekteListContainer::-webkit-scrollbar-thumb:hover {
            background: var(--primary-dark);
        }

/* Objekt Counter Badge */
.objekt-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
    margin-left: 10px;
    transition: all 0.3s ease;
}

    .objekt-counter.gray {
        background: linear-gradient(135deg, #718096 0%, #4a5568 100%);
        box-shadow: 0 2px 8px rgba(113, 128, 150, 0.3);
    }

    .objekt-counter.red {
        background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
        box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
        animation: pulse 2s ease-in-out infinite;
    }

.tab-header-with-counter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

    .tab-header-with-counter p {
        margin: 0;
        flex: 1;
    }

/* ===== ANIMATIONS ===== */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(220, 38, 38, 0.6);
    }
}

/* ===== TEXT UTILITIES ===== */
.text-muted {
    color: var(--text-muted) !important;
}

/* ===== NOT AUTHENTICATED LAYOUT ===== */
.not-authenticated {
    padding-top: var(--navbar-height);
}

    .not-authenticated .navbar {
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--border-color);
    }

    .not-authenticated .navbar-brand img {
        max-height: 35px;
        width: auto;
    }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .main-content {
        margin-left: 0;
        padding: 20px;
    }

    .sidebar {
        transform: translateX(-100%);
    }
}
/* ===== VERTRÄGE SPEZIFISCH ===== */
.vertrag-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .vertrag-meta small {
        color: var(--text-secondary);
        font-size: 0.85rem;
    }

/* Badge Status für Verträge */
.badge-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-block;
}

.badge-entwurf {
    background: #e2e8f0;
    color: #4a5568;
}

.badge-aktiv {
    background: #d1fae5;
    color: #065f46;
}

.badge-gekuendigt {
    background: #fed7aa;
    color: #92400e;
}

.badge-beendet {
    background: #fecaca;
    color: #991b1b;
}

/* Outline Success Button */
.btn-outline-success {
    border-color: #cbd5e0;
    color: #4a5568;
    background: transparent;
}

    .btn-outline-success i {
        transition: color 0.2s ease;
    }

    .btn-outline-success:hover {
        background: var(--success-gradient) !important;
        border-color: var(--success-color) !important;
        color: white !important;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    }

        .btn-outline-success:hover i {
            color: white !important;
        }

/* ===== DASHBOARD SPEZIFISCH ===== */
.dashboard-header {
    margin-bottom: 30px;
}

    .dashboard-header h1 {
        font-weight: 700;
        color: #1a202c;
        margin-bottom: 8px;
    }

.dashboard-subtitle {
    color: #718096;
    font-size: 0.95rem;
}

/* KPI Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.kpi-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .kpi-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: var(--card-gradient);
    }

    .kpi-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    }

    .kpi-card.primary::before {
        background: var(--primary-gradient);
    }

    .kpi-card.success::before {
        background: var(--success-gradient);
    }

    .kpi-card.warning::before {
        background: var(--warning-gradient);
    }

    .kpi-card.danger::before {
        background: var(--danger-gradient);
    }

    .kpi-card.info::before {
        background: var(--info-gradient);
    }

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

    .kpi-icon.primary {
        background: var(--primary-gradient);
        color:darkslategrey;
    }

    .kpi-icon.success {
        background: var(--success-gradient);
    }

    .kpi-icon.warning {
        background: var(--warning-gradient);
    }

    .kpi-icon.danger {
        background: var(--danger-gradient);
    }

    .kpi-icon.info {
        background: var(--info-gradient);
    }

.kpi-label {
    color: #718096;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 8px;
}

.kpi-trend {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 500;
}

    .kpi-trend.up {
        color: #10b981;
    }

    .kpi-trend.down {
        color: #ef4444;
    }

/* Charts Section */
.charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.chart-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
}

    .chart-card canvas {
        display: block;
        max-height: 300px !important;
        height: 300px !important;
    }

.chart-wrapper {
    position: relative;
    height: 300px;
    width: 100%;
}

.chart-header {
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
}

.chart-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a202c;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-subtitle {
    color: #718096;
    font-size: 0.85rem;
    margin-top: 4px;
}

/* Activity Feed */
.activity-feed {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
}

.activity-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #f7fafc;
}

    .activity-item:last-child {
        border-bottom: none;
    }

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
    color: white;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 4px;
}

.activity-description {
    color: #718096;
    font-size: 0.85rem;
}

.activity-time {
    color: #a0aec0;
    font-size: 0.75rem;
    margin-top: 4px;
}

/* Auslastung Chart */
.auslastung-bar {
    height: 30px;
    background: #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.auslastung-fill {
    height: 100%;
    background: var(--success-gradient);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 12px;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    transition: width 1s ease;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.quick-action-btn {
    background: white;
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: #4a5568;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

    .quick-action-btn:hover {
        border-color: #667eea;
        background: #f7fafc;
        color: #667eea;
        transform: translateY(-2px);
    }

    .quick-action-btn i {
        font-size: 2rem;
    }

/* Dashboard Responsive */
@media (max-width: 1024px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .main-content {
        margin-left: 0;
        padding: 20px;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }

    .mietertyp-selector {
        flex-direction: column;
    }

    .mietertyp-option {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .radio-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-info {
        text-align: center;
        padding: 8px;
    }

    .btn-group {
        width: 100%;
    }

        .btn-group button {
            font-size: 0.875rem;
        }
}

/* ===== OBJEKTE VIEW - AKKORDEON LAYOUT ===== */

/* Anpassung der Spaltenbreiten im ausgeklappten Akkordeon */
.accordion-collapse .card-body .row.mb-4 > .col-md-6:first-child {
    flex: 0 0 40%;
    max-width: 40%;
}

.accordion-collapse .card-body .row.mb-4 > .col-md-6:last-child {
    flex: 0 0 60%;
    max-width: 60%;
}

/* Responsive: Bei kleineren Bildschirmen zurück auf 100% */
@media (max-width: 768px) {
    .accordion-collapse .card-body .row.mb-4 > .col-md-6:first-child,
    .accordion-collapse .card-body .row.mb-4 > .col-md-6:last-child {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .main-content {
        margin-left: 0;
        padding: 20px;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }

    .mietertyp-selector {
        flex-direction: column;
    }

    .mietertyp-option {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .radio-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-info {
        text-align: center;
        padding: 8px;
    }

    .btn-group {
        width: 100%;
    }

        .btn-group button {
            font-size: 0.875rem;
        }
}

/* ===== MIETER FORM STYLES (KOMPAKT) - ERSETZEN ===== */

/* ✅ Mietertyp Toggle - ZENTRIERT und je 35% Breite */
.mietertyp-toggle-wrapper {
    display: flex;
    justify-content: center; /* ✅ ZENTRIERT */
    margin-bottom: 20px;
}

    .mietertyp-toggle-wrapper .btn-group {
        display: flex;
        gap: 10px;
        width: 70%; /* Beide Buttons zusammen 70% */
    }

    .mietertyp-toggle-wrapper .btn {
        flex: 1; /* Jeder Button 35% (50% von 70%) */
        padding: 10px 20px;
        border: 2px solid var(--border-color);
        background: white;
        color: var(--text-secondary);
        border-radius: 8px;
        font-weight: 500;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

/* Bootstrap btn-check für versteckte Radio Buttons */
.btn-check {
    position: absolute;
    clip: rect(0,0,0,0);
    pointer-events: none;
}

    .btn-check:checked + .btn-outline-primary {
        background: var(--primary-gradient) !important;
        color: white !important;
        border-color: var(--primary-color) !important;
    }

    .btn-check + .btn-outline-primary i {
        transition: color 0.2s ease;
    }

    .btn-check:checked + .btn-outline-primary i {
        color: white !important;
    }

/* Felder Sichtbarkeit */
.fields-privatperson,
.fields-firma {
    display: none;
}

    .fields-privatperson.active,
    .fields-firma.active {
        display: block;
        animation: fadeIn 0.3s ease;
    }

/* Form Section - OHNE h6 Titel */
.form-section {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

    .form-section h6 {
        color: var(--primary-color);
        font-weight: 600;
        font-size: 1rem;
        margin-bottom: 15px;
        padding-bottom: 10px;
        border-bottom: 2px solid var(--border-color);
        display: flex;
        align-items: center;
        gap: 8px;
    }

        .form-section h6 i {
            font-size: 1.1rem;
        }

/* Radio Group für Adressauswahl */
.radio-group {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fc 0%, #f1f5f9 100%);
    border-radius: 10px;
    border: 2px solid var(--border-color);
}

.form-check-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: white;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
}

    .form-check-inline:hover {
        border-color: var(--primary-color);
        background: var(--hover-bg);
    }

.form-check-input:checked + .form-check-label {
    color: var(--primary-color);
    font-weight: 600;
}

.form-check-inline:has(.form-check-input:checked) {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
}

/* Address Fields */
.address-fields {
    transition: all 0.3s ease;
}

    .address-fields.disabled {
        opacity: 0.5;
        pointer-events: none;
    }

        .address-fields.disabled .form-control,
        .address-fields.disabled .form-select {
            background-color: #f7fafc;
            cursor: not-allowed;
        }

/* Filter Info */
.filter-info {
    padding: 12px 16px;
    background: var(--hover-bg);
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

/* Filtered Out Rows */
.filtered-out {
    display: none !important;
}

/* Required Fields Styling */
.privatperson-required,
.firma-required {
    border-left: 3px solid var(--primary-color);
}

/* ===== RESPONSIVE MIETER FORM ===== */
@media (max-width: 992px) {
    .mietertyp-toggle-wrapper .btn-group {
        width: 100%;
    }

    .radio-group {
        flex-direction: column;
        gap: 10px;
    }

    .form-check-inline {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .form-section {
        padding: 15px;
    }

    .modal-xl {
        max-width: 95%;
    }
}

/* ═══════════════════════════════════════════════════════════════
   📌 MERGE FIELD BADGES (im RTE)
   ═══════════════════════════════════════════════════════════════ */
.merge-field {
    display: inline-block;
    padding: 2px 8px;
    margin: 0 2px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 3px;
    cursor: default;
    user-select: none;
    white-space: nowrap;
}

.merge-field:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: scale(1.05);
    transition: all 0.2s ease;
}

/* ═══════════════════════════════════════════════════════════════
   🎨 DROPDOWN TREE STYLING
   ═══════════════════════════════════════════════════════════════ */
#merge-field-dropdown-container .e-ddt {
    min-width: 200px;
}

#merge-field-dropdown-container .e-ddt .e-input-group {
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
}

#merge-field-dropdown-container .e-ddt .e-input-group:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Tree-Knoten Styling */
.e-ddt-popup .e-treeview .e-list-text {
    font-size: 13px;
}

.e-ddt-popup .e-treeview .e-list-item {
    padding: 6px 10px;
}

.e-ddt-popup .e-treeview .e-list-item:hover {
    background-color: #f8f9fa;
}

/* Kategorie-Knoten (Bold) */
.e-ddt-popup .e-treeview .e-list-item[data-uid*="mieter"],
.e-ddt-popup .e-treeview .e-list-item[data-uid*="objekt"],
.e-ddt-popup .e-treeview .e-list-item[data-uid*="liegenschaft"],
.e-ddt-popup .e-treeview .e-list-item[data-uid*="vertrag"],
.e-ddt-popup .e-treeview .e-list-item[data-uid*="datum"] {
    font-weight: 600;
    color: #495057;
}

/* Feld-Knoten (Normal) */
.e-ddt-popup .e-treeview .e-list-item[data-uid*="-"] {
    font-weight: 400;
    color: #6c757d;
    padding-left: 30px;
}

/* ✅ GEÄNDERT: Vertikale Navigation - Limegreen statt Blau */
.vertical-tabs .nav-link.active {
    background-color: #32CD32; /* Limegreen statt #0d6efd */
    color: white;
    border-color: #32CD32;
}

.vertical-tabs .nav-link:hover {
    background-color: #f8f9fa;
    border-color: #32CD32; /* Limegreen Border */
}

/* ✅ GEÄNDERT: Toggle-Icon Hover - Limegreen statt Lila */
.toggle-icon:hover {
    color: #32CD32; /* Limegreen statt #667eea (lila) */
}

/* ✅ Optional: Auch die Haupt-Tabs (horizontal) */
.modern-tabs .nav-link.active {
    background-color: #32CD32 !important;
    border-bottom-color: #32CD32 !important;
    color: white !important;
}

.modern-tabs .nav-link:hover:not(.active) {
    border-bottom-color: #32CD32;
}

/* ═══════════════════════════════════════════════════════════════
   🔐 LOGIN PAGE STYLES
   ═══════════════════════════════════════════════════════════════ */

.login-page {
    margin: 0;
    padding: 0;
    background: linear-gradient(180deg, #d2ff00 90%, #b2c73a 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.login-container {
    width: 100%;
    max-width: 650px;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, #344054 0%, #344054 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

    .login-header .logo-container {
        margin-bottom: 20px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

        .login-header .logo-container img {
            max-width: 250px;
            height: auto;
            filter: brightness(0) invert(1);
        }

    .login-header p {
        margin: 0;
        opacity: 0.95;
        font-size: 1.1rem;
    }

.login-body {
    padding: 50px 40px;
}

.google-login-section {
    text-align: center;
}

.login-footer {
    text-align: center;
    padding: 20px;
    border-top: 1px solid #dee2e6;
    background: #f8f9fa;
}

    .login-footer a {
        color: #667eea;
        font-weight: 600;
        text-decoration: none;
    }

        .login-footer a:hover {
            text-decoration: underline;
        }

/* Google Account Container */
#google-account-container {
    background: #f8f9fa;
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 30px;
    margin: 30px 0;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

/* Google One Tap wird automatisch gestylt */
#g_id_onload {
    position: relative !important;
}

/* Loading Spinner für Login */
.login-page .loading-spinner {
    text-align: center;
    color: #667eea;
    padding: 20px;
}

    .login-page .loading-spinner i {
        font-size: 3rem;
        animation: spin 1s linear infinite;
    }

.info-text {
    color: #718096;
    font-size: 0.95rem;
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Alternative Login Button */
.alternative-login {
    margin-top: 20px;
}

.btn-google-alt {
    background: #4285f4;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

    .btn-google-alt:hover {
        background: #357ae8;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
    }

    .btn-google-alt i {
        font-size: 1.2rem;
    }

/* Google Error Alert auf Login-Seite */
#google-error {
    border-radius: 8px;
    margin-bottom: 20px;
}

/* ─── Provider Login Buttons ───────────────────────────────── */
#google-btn-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 44px;
    margin-bottom: 4px;
}

.btn-microsoft-login {
 display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 400px;
    padding: 10px 20px;
    background-color: #ffffff;
    color: #344054;
    border: 1px solid #d0d5dd;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Segoe UI', sans-serif;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

    .btn-microsoft-login:hover {
        background-color: #f3f3f3;
        box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    }

    .btn-microsoft-login:disabled {
        opacity: 0.7;
        cursor: not-allowed;
    }

.btn-email-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 400px;
    padding: 10px 20px;
    background-color: #ffffff;
    color: #344054;
    border: 1px solid #d0d5dd;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Segoe UI', sans-serif;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

    .btn-email-login:hover {
        background-color: #f9fafb;
        box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    }

    .btn-email-login.active {
        background-color: #f0f4ff;
        border-color: #667eea;
        color: #667eea;
    }

.btn-email-submit {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #344054 0%, #1d2939 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, box-shadow 0.2s;
    margin-top: 5px;
}

    .btn-email-submit:hover {
        opacity: 0.9;
        box-shadow: 0 4px 12px rgba(52, 64, 84, 0.3);
    }

    .btn-email-submit:disabled {
        opacity: 0.7;
        cursor: not-allowed;
    }

/* ═══════════════════════════════════════════════════════════════
   🚪 LOGOUT PAGE STYLES
   ═══════════════════════════════════════════════════════════════ */

.logout-page {
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #d2ff00 0%, #b2c73a 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.logout-container {
    width: 100%;
    max-width: 650px;
    padding: 20px;
    animation: fadeInUp 0.6s ease;
}

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

.logout-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    overflow: hidden;
}

.logout-header {
    background: linear-gradient(135deg, #344054 0%, #344054 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

    .logout-header .logo-container {
        margin-bottom: 20px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

        .logout-header .logo-container img {
            max-width: 250px;
            height: auto;
            filter: brightness(0) invert(1);
        }

    .logout-header .icon-container {
        width: 100px;
        height: 100px;
        margin: 0 auto 20px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        animation: pulse 2s infinite;
    }

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

    .logout-header .icon-container i {
        font-size: 3rem;
        color: white;
    }

    .logout-header h2 {
        margin: 0;
        font-size: 1.8rem;
        font-weight: 600;
    }

    .logout-header p {
        margin: 10px 0 0;
        opacity: 0.95;
        font-size: 1.1rem;
    }

.logout-body {
    padding: 50px 40px;
    text-align: center;
}

    .logout-body h3 {
        color: #333;
        font-size: 1.5rem;
        margin-bottom: 20px;
        font-weight: 600;
    }

    .logout-body p {
        color: #666;
        font-size: 1.1rem;
        line-height: 1.6;
        margin-bottom: 30px;
    }

.btn-logout {
    background: linear-gradient(135deg, #344054 0%, #344054 100%);
    color: white;
    border: none;
    padding: 14px 40px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 64, 84, 0.3);
    width: 100%;
    margin-bottom: 15px;
    text-decoration: none;
    display: inline-block;
}

    .btn-logout:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(52, 64, 84, 0.4);
        color: white;
    }

    .btn-logout i {
        margin-right: 10px;
    }

.logout-footer {
    text-align: center;
    padding: 20px;
    border-top: 1px solid #dee2e6;
    background: #f8f9fa;
}

    .logout-footer p {
        margin: 5px 0;
        color: #666;
        font-size: 0.95rem;
    }

    .logout-footer a {
        color: #344054;
        font-weight: 600;
        text-decoration: none;
    }

        .logout-footer a:hover {
            text-decoration: underline;
        }

/* Success State */
.logout-success .logout-header {
    background: linear-gradient(135deg, #344054 0%, #344054 100%);
}

.logout-success .btn-logout {
    background: linear-gradient(135deg, #344054 0%, #344054 100%);
}

/* 🔴 KNIGHT RIDER SCANNER ANIMATION */
.scanner-container {
    height: 5px;
    width: 100%;
    background: #1a1a1a;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.scanner-light {
    position: absolute;
    top: 0;
    left: -30%;
    height: 100%;
    width: 30%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 255, 0, 0.4) 20%,
        rgba(57, 255, 20, 0.8) 40%,
        rgba(255, 255, 255, 1) 50%,
        rgba(57, 255, 20, 0.8) 60%,
        rgba(0, 255, 0, 0.4) 80%,
        transparent 100%);
    animation: knightRiderScan 2s ease-in-out infinite;
    filter: blur(2px);
    box-shadow: 
        0 0 10px rgba(0, 255, 0, 0.8),
        0 0 20px rgba(0, 255, 0, 0.6),
        0 0 30px rgba(0, 255, 0, 0.4);
}

@keyframes knightRiderScan {
    0% {
        left: -30%;
    }
    45% {
        left: 100%;
    }
    55% {
        left: 100%;
    }
    100% {
        left: -30%;
    }
}

.countdown {
    font-size: 0.95rem;
    color: #888;
    margin-top: 20px;
}

/* ═══════════════════════════════════════════════════════════════
   📱 RESPONSIVE LOGOUT
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .logout-container {
        padding: 15px;
    }

    .logout-header {
        padding: 30px 20px;
    }

    .logout-body {
        padding: 30px 25px;
    }

    .logout-header h2 {
        font-size: 1.5rem;
    }

    .btn-logout {
        font-size: 1rem;
        padding: 12px 30px;
    }
}

/* Bewerbungskanal Filter Button */
.input-group .btn {
    border-left: 0;
    white-space: nowrap;
}

.input-group .btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-color: #28a745;
    color: white;
}

    .input-group .btn-success:hover {
        background: linear-gradient(135deg, #218838 0%, #1aa179 100%);
        border-color: #1e7e34;
    }

#objektInfo {
    display: block;
    margin-top: 0.5rem;
}

/* ═══════════════════════════════════════════════════════════
   KANBAN BOARD
   ═══════════════════════════════════════════════════════════ */

.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    height: 80vh;
    width: 100%;
    box-sizing: border-box;
    align-items: start;
}

.kanban-column {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    height: calc(63vh - 40px);
    min-height: 200px;
}

.kanban-header {
    padding: 12px 15px;
    font-weight: 600;
    color: #2d3748;
    border-radius: 8px 8px 0 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
}

.kanban-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
}

.kanban-header-line {
    height: 3px;
    border-radius: 2px;
    width: 100%;
}

.kanban-header[data-status="1"] .kanban-header-line { background: #9ca3af; }
.kanban-header[data-status="2"] .kanban-header-line { background: #3b82f6; }
.kanban-header[data-status="3"] .kanban-header-line { background: #f59e0b; }
.kanban-header[data-status="4"] .kanban-header-line { background: #10b981; }

/* Speichern-Button primary color */
.btn-save-primary {
    background-color: var(--primary-button-bg);
    color: var(--primary-button-txt);
    border-color: var(--primary-button-bg);
}
.btn-save-primary:hover, .btn-save-primary:focus {
    background-color: var(--primary-button-hover);
    border-color: var(--primary-button-hover);
    color: #000;
}

.kanban-items {
    flex: 1;
    padding: 10px;
    min-height: 100px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #e2e8f0 transparent;
}

.kanban-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    cursor: move;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

    .kanban-card:hover {
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        transform: translateY(-2px);
    }



.kanban-ghost {
    opacity: 0.4;
    background: #f1f5f9;
}

.kanban-drag {
    opacity: 0.8;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    transform: rotate(3deg);
}

/* Responsive Kanban */
@media (max-width: 1100px) {
    .kanban-board {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .kanban-board {
        grid-template-columns: 1fr;
    }
}

/* Kanban Filter-Bar */
.kanban-filter-bar {
    font-size: 0.875rem;
    border-color: #dee2e6 !important;
}

/* Hinweis "Erledigte ausgeblendet" in Erledigt-Spalte */
.kanban-hidden-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ced4da;
    padding: 18px 6px 10px;
    user-select: none;
    gap: 6px;
}

.kanban-hidden-hint .knh-icon {
    font-size: 1.7rem;
    line-height: 1;
}

.kanban-hidden-hint .knh-text {
    font-size: 0.75rem;
    text-align: center;
}

/* Ein/Ausblenden-Button im Erledigt-Header */
.kanban-toggle-done-btn {
    background: transparent;
    border: none;
    color: #6b7280;
    border-radius: 4px;
    padding: 0 4px;
    font-size: 0.75rem;
    cursor: pointer;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    transition: color 0.15s;
}

.kanban-toggle-done-btn:hover {
    color: #374151;
}

/* ═══════════════════════════════════════════════════════════
   KANBAN CARD - KOMPAKT & AUSKLAPPBAR
   ═══════════════════════════════════════════════════════════ */

.kanban-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: move;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

    .kanban-card:hover {
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        transform: translateY(-2px);
    }

/* Kompakte Ansicht */
.kanban-card-compact {
    padding: 10px 12px;
    cursor: pointer;
    user-select: none;
}

    .kanban-card-compact:hover {
        background: #f8fafc;
    }

    .kanban-card-compact strong {
        font-size: 0.95rem;
        color: #1e293b;
    }

.toggle-icon {
    font-size: 0.75rem;
    color: #64748b;
    transition: transform 0.2s ease;
    margin-left: 4px;
}

/* ═══════════════════════════════════════════════════════════
   KANBAN CARD v2 – Kompakte Clickable Card
   ═══════════════════════════════════════════════════════════ */

.kanban-card.kc2 {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: box-shadow .15s, transform .15s;
    box-shadow: 0 1px 3px rgba(0,0,0,.07);
    user-select: none;
}
.kanban-card.kc2:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,.13);
    transform: translateY(-2px);
}
.kc2-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 4px;
}
.kc2-title {
    font-weight: 600;
    font-size: .88rem;
    color: #1e293b;
    line-height: 1.35;
    flex: 1;
}
.kc2-priority {
    font-size: .7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
    white-space: nowrap;
}
.kc2-p-urgent { background: #fee2e2; color: #dc2626; }
.kc2-p-high   { background: #fef3c7; color: #d97706; }
.kc2-p-normal { background: #e0f2fe; color: #0284c7; }
.kc2-p-low    { background: #f1f5f9; color: #64748b; }

.kc2-location {
    font-size: .75rem;
    color: #64748b;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.kc2-tenant {
    font-size: .75rem;
    color: #6366f1;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.kc2-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #f1f5f9;
}

.kc2-foot-right {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.kc2-meta-icon {
    font-size: 0.7rem;
    color: #9ca3af;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.kc2-avatars {
    display: flex;
    gap: 3px;
    align-items: center;
}
.kc2-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #6366f1;
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    cursor: default;
}
.kc2-avatar-empty {
    background: #e2e8f0;
    color: #94a3b8;
    font-size: .72rem;
}
.kc2-due {
    font-size: .75rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 3px;
}
.kc2-due.overdue {
    color: #dc2626;
    font-weight: 600;
}

/* Abschliessen-Kreis auf Kanban-Card */
.kc2-complete-btn {
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #cbd5e1;
    font-size: 1rem;
    line-height: 1;
    /* Kollabiert wenn nicht aktiv – kein Platz, kein Shift des Titels */
    width: 0;
    overflow: hidden;
    opacity: 0;
    transition: width .15s, opacity .15s, color .15s;
}
.kanban-card .kc2-top:hover .kc2-complete-btn,
.kc2-complete-btn.is-completed {
    width: 1.2rem;
    opacity: 1;
    margin-right: 5px;
}
.kc2-complete-btn.is-completed {
    color: #22c55e;
}
.kc2-complete-btn:hover {
    color: #22c55e;
}
.kc2-title-done {
    text-decoration: line-through;
    color: #94a3b8;
}
.kc2-completed {
    opacity: .7;
}

/* Abschliessen-Kreis in Case-Detail-Modal */
.cd-complete-btn {
    background: none;
    border: none;
    padding: 0 2px;
    cursor: pointer;
    color: #cbd5e1;
    font-size: 1.25rem;
    line-height: 1;
    flex-shrink: 0;
    transition: color .15s;
}
.cd-complete-btn:hover,
.cd-complete-btn.is-completed {
    color: #22c55e;
}

/* ═══════════════════════════════════════════════════════════
   CASE THREAD – Kollaborations-UI
   ═══════════════════════════════════════════════════════════ */

/* Feed-Container */
.cd-thread-feed {
    padding: 16px 20px 8px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
    overflow-y: auto;
    position: relative;
    min-height: 0;
}

.cd-thread-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 8px;
}


.cd-thread-msg-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cd-thread-msg-body {
    flex: 1;
    min-width: 0;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0 10px 10px 10px;
    padding: 10px 14px;
}

.cd-thread-msg-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-size: .78rem;
    color: #94a3b8;
}

.cd-thread-msg-meta strong {
    color: #1e293b;
    font-size: .82rem;
}

.cd-thread-msg-time { font-size: .72rem; }

.cd-thread-msg-text {
    font-size: .86rem;
    color: #374151;
    line-height: 1.5;
    word-break: break-word;
    white-space: pre-wrap;
}

.cd-thread-msg-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.cd-thread-action-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: .75rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all .15s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.cd-thread-action-btn:hover { background: #e2e8f0; color: #475569; }
.cd-thread-action-btn.active { color: #f59e0b; }

/* Antworten – nur Einzug, keine sichtbare Linie */
.cd-thread-replies-wrap {
    display: flex;
    gap: 0;
    margin-top: 2px;
    padding-left: 42px;
}

.cd-reply-line { display: none; }


.cd-thread-reply .cd-msg-avatar {
    width: 26px;
    height: 26px;
    font-size: .65rem;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
}

/* ③ Kommentar-Pill – subtil dunklere Farbe (nur Thread-Messages) */
.cd-thread-msg .cd-msg-content {
    flex: 1;
    min-width: 0;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 4px 12px 12px 12px;
    padding: 4px 8px 8px;
    position: relative;
}

.cd-thread-reply .cd-msg-content {
    background: #eef2ff;
    border-color: #c7d2fe;
}

/* ② Reactions-Row unterhalb der Pill (leicht überschneidend) */
.cd-reactions-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px;
    padding-left: 40px;
    margin-top: -4px;
    position: relative;
    z-index: 1;
    min-height: 24px;
}

/* Reply-Count Button (Chat-Icon) */
.cd-reply-count-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1px 6px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8rem;
    color: #6366f1;
    font-weight: 500;
    transition: all 0.15s;
    line-height: 1.4;
    margin-right: 2px;
}

.cd-reply-count-btn:hover {
    background: #eef2ff;
    color: #4f46e5;
    border-color: #c7d2fe;
}

.cd-reply-count-btn i {
    font-size: 0.75rem;
}

.cd-reply-count-btn span {
    font-size: 0.75rem;
    font-weight: 600;
}

/* ④ Emoji-Add-Button (☺+) — overlaps pill bottom */
.cd-emoji-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    padding: 1px 6px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    cursor: pointer;
    font-size: .8rem;
    color: #94a3b8;
    transition: all .15s;
    line-height: 1.4;
}

.cd-emoji-add-btn:hover { color: #6366f1; border-color: #c7d2fe; background: #eef2ff; }

.cd-emoji-add-icon {
    font-size: 1rem;
    line-height: 1;
    color: #94a3b8;
}

/* ⑤/⑥ Drei-Punkte-Menü */
.cd-more-wrap { position: relative; }

.cd-more-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
    min-width: 170px;
    z-index: 300;
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.cd-more-item {
    background: none;
    border: none;
    text-align: left;
    padding: 7px 10px;
    border-radius: 5px;
    font-size: .82rem;
    color: #374151;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background .1s;
    width: 100%;
}

.cd-more-item:hover { background: #f1f5f9; }
.cd-more-item.danger { color: #dc2626; }
.cd-more-item.danger:hover { background: #fef2f2; }
.cd-more-item i { width: 14px; text-align: center; color: #94a3b8; }
.cd-more-item.danger i { color: #dc2626; }
.cd-more-sep { height: 1px; background: #f1f5f9; margin: 3px 0; }

/* Gelöschter Anhang im Thread */
.cd-att-deleted {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .75rem;
    color: #94a3b8;
    font-style: italic;
    padding: 3px 8px;
    background: #f8fafc;
    border: 1px dashed #e2e8f0;
    border-radius: 6px;
}

/* PDF-Anhang Button – subtil wie andere Anhänge */
.cd-att-pdf {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #475569;
    cursor: pointer;
}
.cd-att-pdf:hover { background: #eef2ff; border-color: #c7d2fe; color: #4f46e5; }
.cd-att-preview-hint {
    font-size: .68rem;
    opacity: .7;
    margin-left: 4px;
}

/* ── Lightbox ─────────────────────────────────────────────── */
.cd-lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cd-lightbox-box {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cd-lightbox-img {
    max-width: 90vw;
    max-height: 88vh;
    border-radius: 6px;
    object-fit: contain;
    box-shadow: 0 8px 40px rgba(0,0,0,.6);
}
.cd-lightbox-pdf { width: 85vw; height: 88vh; }
.cd-lightbox-iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 6px;
}

/* ── Inline-Editor ───────────────────────────────────────── */
.cd-inline-editor {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 2px;
}
.cd-inline-edit-input {
    min-height: 40px;
    max-height: 200px;
    overflow-y: auto;
    border: 1.5px solid #6366f1;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: .86rem;
    color: #374151;
    line-height: 1.5;
    outline: none;
    background: #fafafa;
    word-break: break-word;
}
.cd-inline-edit-actions {
    display: flex;
    gap: 6px;
}
.cd-inline-save-btn {
    padding: 4px 12px;
    background: #6366f1;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: .8rem;
    cursor: pointer;
    transition: background .15s;
}
.cd-inline-save-btn:hover { background: #4f46e5; }
.cd-inline-cancel-btn {
    padding: 4px 10px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #64748b;
    border-radius: 5px;
    font-size: .8rem;
    cursor: pointer;
    transition: background .15s;
}
.cd-inline-cancel-btn:hover { background: #e2e8f0; }

/* Emoji-Reaktionen */
.cd-reactions-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.cd-reaction-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: .82rem;
    cursor: pointer;
    transition: all .15s;
    line-height: 1.4;
}

.cd-reaction-chip:hover { background: #e0e7ff; border-color: #c7d2fe; }
.cd-reaction-chip.active { background: #e0e7ff; border-color: #6366f1; font-weight: 600; }
.cd-reaction-chip span { font-size: .75rem; color: #64748b; }

/* Emoji-Picker Popup */
.cd-emoji-picker-wrap { position: relative; }

.cd-emoji-picker {
    position: absolute;
    bottom: calc(100% + 4px);
    left: 0;
    right: auto;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 6px 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,.12);
    display: flex;
    gap: 4px;
    z-index: 200;
    white-space: nowrap;
}

.cd-emoji-opt {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 6px;
    transition: background .1s, transform .1s;
    line-height: 1;
}

.cd-emoji-opt:hover { background: #f1f5f9; transform: scale(1.2); }

/* Anhänge im Thread */

/* Composer */
.cd-thread-composer {
    border-top: 1px solid #e2e8f0;
    padding: 10px 16px 12px;
    background: #fff;
    position: relative;    /* Containing Block für Mention-Dropdown (position: absolute) */
    flex-shrink: 0;
    z-index: 10;           /* Composer liegt über dem Feed-Content */
}

.cd-reply-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 6px;
    padding: 5px 12px;
    margin-bottom: 8px;
    font-size: .8rem;
    color: #4f46e5;
}

.cd-reply-cancel {
    background: none;
    border: none;
    color: #6366f1;
    cursor: pointer;
    padding: 2px 4px;
    line-height: 1;
    font-size: .85rem;
}


/* Input-Wrapper */
.cd-thread-input-wrap {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 8px 10px;
    transition: border-color .15s;
    background: #fff;
}

.cd-thread-input-wrap:focus-within { border-color: #6366f1; }

.cd-thread-input {
    flex: 1;
    min-height: 32px;
    max-height: 120px;
    overflow-y: auto;
    outline: none;
    font-size: .86rem;
    color: #374151;
    line-height: 1.5;
    word-break: break-word;
}

.cd-thread-input:empty::before {
    content: attr(data-placeholder);
    color: #94a3b8;
    pointer-events: none;
}

.cd-thread-input-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.cd-thread-attach-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    cursor: pointer;
    border-radius: 6px;
    transition: all .15s;
}

.cd-thread-attach-btn:hover { background: #f1f5f9; color: #6366f1; }

.cd-thread-send {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color) ;
    color: #344054;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    transition: background .15s;
    flex-shrink: 0;
}

    .cd-thread-send:hover {
        background: var(--primary-button-hover);
    }

/* Attach-Vorschau */
.cd-thread-attach-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.cd-thread-attach-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: .78rem;
    color: #475569;
    max-width: 220px;
    overflow: hidden;
}

.cd-thread-attach-item img {
    border-radius: 4px;
    flex-shrink: 0;
}

.cd-thread-attach-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.cd-thread-attach-remove {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0 2px;
    font-size: .75rem;
    line-height: 1;
}

.cd-thread-attach-remove:hover { color: #dc2626; }

/* Drop-Zone */
.cd-thread-drop-zone {
    border: 2px dashed #6366f1;
    border-radius: 8px;
    padding: 20px;
    margin-top: 8px;
    background: #eef2ff;
    color: #4f46e5;
    text-align: center;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    font-weight: 500;
    gap: 6px;
}

/* ═══════════════════════════════════════════════════════════
   CASE AKTIVITÄT – reiner Log (rechts)
   ═══════════════════════════════════════════════════════════ */

.cd-activity-log {
    padding: 12px 20px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    overflow-y: auto;
}

.cd-act-entry {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    font-size: .82rem;
    position: relative;
}

.cd-act-entry:last-child { border-bottom: none; }

/* Timeline line + circle */
.cd-act-timeline {
    padding-left: 24px;
}

.cd-act-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #e2e8f0;
}

.cd-act-timeline:first-child::before {
    top: 14px;
}

.cd-act-timeline.cd-act-last::before {
    bottom: 50%;
}

.cd-act-dot {
    position: absolute;
    left: 2px;
    top: 12px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    background: #fff;
    flex-shrink: 0;
    z-index: 1;
}

.cd-act-last .cd-act-dot {
    background: #cbd5e1;
}

.cd-act-body {
    flex: 1;
    min-width: 0;
}

.cd-act-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.cd-act-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: .85rem;
}

.cd-act-content {
    flex: 1;
    min-width: 0;
}

.cd-act-user {
    font-weight: 600;
    color: #1e293b;
    margin-right: 4px;
}

.cd-act-desc { color: #64748b; }

.cd-act-time {
    font-size: .72rem;
    color: #94a3b8;
    white-space: nowrap;
    flex-shrink: 0;
}

.cd-act-empty { color: #94a3b8; font-size: .85rem; }

/* Activity file card */
.cd-act-file-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.cd-act-file-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    min-width: 140px;
    max-width: 220px;
}

.cd-act-file-thumb-wrap {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #f1f5f9;
}

.cd-act-file-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
}

.cd-act-file-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.cd-act-file-name {
    font-size: .78rem;
    font-weight: 500;
    color: #1e293b;
}

.cd-act-file-size {
    font-size: .7rem;
    color: #94a3b8;
}

/* Priority pill */
.cd-act-prio-pill {
    display: inline-block;
    padding: 1px 10px;
    border-radius: 12px;
    font-size: .75rem;
    font-weight: 600;
    color: #fff;
    margin-left: 2px;
}

.cd-modal-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.cd-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}
.cd-modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    outline: none;
    border-radius: 4px;
    min-width: 40px;
}
.cd-modal-title.cd-title-editing {
    white-space: normal;
    overflow: visible;
    border-bottom: 2px solid #6366f1;
    padding-bottom: 1px;
    cursor: text;
    background: #f8f7ff;
    padding: 2px 6px;
    border-radius: 4px 4px 0 0;
}
.cd-modal-title-input {
    font-size: 1.1rem;
    font-weight: 700;
    border: 2px solid #6366f1;
    border-radius: 6px;
    padding: 6px 10px;
    width: 100%;
    outline: none;
}
.cd-priority-badge {
    font-size: .72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 5px;
    flex-shrink: 0;
}
.cd-p-urgent { background: #fee2e2; color: #dc2626; }
.cd-p-high   { background: #fef3c7; color: #d97706; }
.cd-p-normal { background: #e0f2fe; color: #0284c7; }
.cd-p-low    { background: #f1f5f9; color: #64748b; }

/* Meta-Bar (Assignees, Labels, Due) */
.cd-meta-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 20px;
    padding: 14px 20px;
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
}
.cd-meta-label {
    font-size: .72rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .04em;
    display: block;
    margin-bottom: 5px;
}
.cd-assignees-wrap,
.cd-labels-wrap,
.cd-due-wrap {
    display: flex;
    flex-direction: column;
}
.cd-assignees {
    display: flex;
    align-items: center;
    gap: 0px;
    flex-wrap: wrap;
}
.cd-avatar-add,
.cd-label-add {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px dashed #cbd5e1;
    background: transparent;
    color: #94a3b8;
    font-size: .8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .15s;
}
.cd-avatar-add:hover,
.cd-label-add:hover {
    border-color: #6366f1;
    color: #6366f1;
    background: #eef2ff;
}
.cd-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    min-height: 26px;
}
.cd-label-pill {
    font-size: .72rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    color: #fff;
    cursor: pointer;
}
.cd-due-date {
    font-size: .85rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 5px;
    padding-top: 4px;
}
.cd-due-date.overdue { color: #dc2626; font-weight: 600; }

/* Inline Panels (legacy, nicht mehr in linker Section verwendet) */
.cd-inline-panel {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 20px;
}
.cd-inline-panel-title {
    font-size: .8rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 8px;
}
.cd-sidebar-dropdown-panel {
    margin-top: 4px;
    background: #e8eaed;
    border: 1px solid #d1d5db;
    border-radius: 0;
    overflow: hidden;
    animation: cdSlideDown .18s ease;
    transform-origin: top;
}
@keyframes cdSlideDown {
    from { opacity: 0; transform: scaleY(.92) translateY(-6px); }
    to   { opacity: 1; transform: scaleY(1)  translateY(0); }
}
.cd-sidebar-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 10px;
    background: #dde0e5;
    border-bottom: 1px solid #d1d5db;
    font-size: .75rem;
    font-weight: 600;
    color: #64748b;
}
.cd-sidebar-dropdown-close {
    margin-left: auto;
    cursor: pointer;
    color: #9ca3af;
    font-size: .8rem;
    line-height: 1;
    user-select: none;
    flex-shrink: 0;
    transition: color .1s;
}
.cd-sidebar-dropdown-close:hover {
    color: #374151;
}
.cd-panel-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 200px;
    overflow-y: auto;
    background: #e8eaed;
}
.cd-label-new-btn {
    background: none;
    border: none;
    color: #6366f1;
    font-size: .78rem;
    cursor: pointer;
    padding: 0;
}
.cd-panel-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 0;
    cursor: pointer;
    font-size: .84rem;
    transition: background .1s;
}
.cd-panel-item:hover  { background: #e0e7ff; }
.cd-panel-item.assigned { background: #eef2ff; font-weight: 600; }
.cd-panel-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #6366f1;
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cd-label-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}
.cd-label-badge {
    display: inline-block;
    font-size: .72rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 3px;
    margin: 1px 2px;
    white-space: nowrap;
}

/* Case Detail Modal – neues Split-Layout */
.cd-modal-dialog {
    max-width: 1120px;
}

.cd-modal-footer-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 10px 18px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    flex-shrink: 0;
}

/* Case-Picker (Assign Email to Case) */
.acp-case-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background .1s;
    border-bottom: 1px solid #f1f5f9;
}
.acp-case-row:hover { background: #f0f4ff; }
.acp-case-id {
    font-size: .72rem;
    font-weight: 700;
    color: #9ca3af;
    min-width: 36px;
    flex-shrink: 0;
    padding-top: 2px;
}
.acp-case-body { flex: 1; min-width: 0; }
.acp-case-title {
    font-size: .875rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.acp-case-meta {
    font-size: .75rem;
    color: #64748b;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.acp-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
}

.cd-modal-header-new {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
    flex-shrink: 0;
}

.cd-header-left,
.cd-header-right {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cd-header-right {
    justify-content: flex-end;
}

.cd-nav-tabs-bar {
    display: flex;
    align-items: center;
    gap: 2px;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
    padding: 0 14px;
    flex-shrink: 0;
}

.cd-nav-tab {
    border: none !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;
    color: #6b7280 !important;
    font-size: .84rem;
    font-weight: 500;
    padding: 10px 14px !important;
    background: transparent !important;
}

.cd-nav-tab:hover {
    color: #374151 !important;
    
}

.cd-nav-tab.active {
    color: #000 !important;
    border-bottom-color: var(--primary-color) !important;
    font-weight: 700;
}

.cd-sidebar {
    width: 34%;
    min-width: 260px;
    max-width: 380px;
    background: rgba(249, 250, 251, 0.9);
    padding: 18px;
    overflow-y: auto;
}

.cd-sidebar-title-row {
    margin-bottom: 14px;
}

.cd-sidebar-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cd-sidebar-row,
.cd-sidebar-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cd-inline-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.cd-sidebar-label {
    font-size: .76rem;
    font-weight: 600;
    color: #374151;
}

.cd-sidebar-value {
    font-size: .86rem;
    color: #1f2937;
}

/* Tab-Pane Inhalt – Scroll passiert im jeweiligen Pane */
.cd-tabs {
    border-bottom: 0;
    gap: 2px;
    flex-shrink: 0;
}
.cd-tabs .nav-link {
    font-size: .82rem;
    padding: 6px 12px;
    border-radius: 6px 6px 0 0;
    color: #64748b;
}
.cd-tabs .nav-link.active { color: #6366f1; font-weight: 600; }

.cd-tab-content {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
/* Bootstrap zeigt .tab-pane per default mit display:none –
   wir überschreiben es: active Pane als flex, alle anderen none */
.cd-tab-content .tab-pane {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: none;
    flex-direction: column;
}
.cd-tab-content .tab-pane.active { display: flex; }

/* Thread-Tab: overflow visible damit Mention-Dropdown NICHT geclippt wird */
#cd-thread { overflow: visible; }

/* Panes die selbst scrollen */
#cd-desc     { overflow-y: auto; }
#cd-activity { overflow: hidden; }


.cd-feed {
    padding: 12px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    overflow-y: auto;
}
.cd-feed-empty { justify-content: center; align-items: center; }
.cd-loading { padding: 20px; text-align: center; color: #94a3b8; }
.kc2-loading-sm { font-size: .75rem; color: #94a3b8; }

/* Nachrichten */
.cd-msg-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.cd-msg-body { flex: 1; min-width: 0; }
.cd-msg-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .78rem;
    color: #94a3b8;
    margin-bottom: 2px;
}
.cd-msg-meta strong { color: #1e293b; }
.cd-pin-btn {
    background: none;
    border: none;
    color: #cbd5e1;
    cursor: pointer;
    font-size: .78rem;
    padding: 0 2px;
    margin-left: auto;
    transition: color .15s;
}
.cd-pin-btn:hover, .cd-pin-btn.pinned { color: #f59e0b; }

/* Aktivitäts-Einträge (keine Nachricht) */
.cd-activity-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .8rem;
    color: #64748b;
    padding: 2px 0;
}
.cd-activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    flex-shrink: 0;
}
.cd-activity-text { flex: 1; }

/* Kommentar-Eingabe */
.cd-msg-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-top: 1px solid #f1f5f9;
    background: #fff;
    position: sticky;
    bottom: 0;
}
.cd-msg-input {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: .84rem;
    outline: none;
    transition: border-color .15s;
}
.cd-msg-input:focus { border-color: #6366f1; }
.cd-msg-send {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #6366f1;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    transition: background .15s;
    flex-shrink: 0;
}
.cd-msg-send:hover { background: #4f46e5; }

/* Dateien */
.cd-files-upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.2rem 1rem;
    margin: .75rem 1rem .5rem;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    transition: border-color .2s, background .2s;
    flex-shrink: 0;
    text-align: center;
}
.cd-files-upload-area.drag-over {
    border-color: #6366f1;
    background: #eef2ff;
}
.cd-file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 4px;
    border-bottom: 1px solid #f1f5f9;
    font-size: .83rem;
    transition: background .15s;
}
.cd-file-item:hover { background: #f8fafc; border-radius: 6px; }
.cd-file-icon-wrap { width: 28px; text-align: center; flex-shrink: 0; }
.cd-file-info { 
    display: flex; 
    flex-direction: column; 
    flex: 1;
    min-width: 0;
}
.cd-file-name { 
    font-weight: 500; 
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cd-file-meta { font-size: .72rem; color: #94a3b8; }
.cd-file-actions-wrap { display: flex; gap: 2px; flex-shrink: 0; }
.cd-file-action-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 5px 7px;
    border-radius: 4px;
    transition: color .15s, background .15s;
}
.cd-file-action-btn:hover { background: #f1f5f9; color: #6366f1; }
.cd-file-action-btn.danger:hover { color: #ef4444; }

/* ═══ Case Detail Modal - Formular-Felder (Create/Edit Mode) ═══ */
.cd-field-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 140px;
}

.cd-select,
.cd-input {
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.85rem;
    background: white;
    color: #1e293b;
    transition: border-color 0.2s ease;
}

.cd-select:hover,
.cd-input:hover {
    border-color: #6366f1;
}

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

.cd-select:disabled,
.cd-input:disabled {
    background: #f8fafc;
    color: #94a3b8;
    cursor: not-allowed;
}


    /* Checklist */
.cd-cl-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 0;
    border-bottom: 1px solid #f8fafc;
    font-size: .84rem;
}
.cd-cl-item.done .cd-cl-text { text-decoration: line-through; color: #94a3b8; }
.cd-cl-check { cursor: pointer; accent-color: #6366f1; }
.cd-cl-text { flex: 1; }
.cd-cl-del {
    background: none;
    border: none;
    color: #cbd5e1;
    cursor: pointer;
    font-size: .78rem;
    padding: 0 3px;
    transition: color .15s;
}
.cd-cl-del:hover { color: #dc2626; }
.cd-cl-add {
    display: flex;
    gap: 8px;
    padding: 10px 20px;
    border-top: 1px solid #f1f5f9;
}
.cd-cl-input {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: .83rem;
    outline: none;
}
.cd-cl-input:focus { border-color: #6366f1; }
.cd-cl-add-btn {
    background: #6366f1;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 5px 12px;
    cursor: pointer;
    font-size: .8rem;
}
.cd-cl-add-btn:hover { background: #4f46e5; }

/* Beschreibung */
.cd-desc-body {
     width: 95%;
    align-self: center;
    font-size: .88rem;
    color: #374151;
    line-height: 1.6;
    white-space: pre-wrap;
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}
.cd-desc-edit {
    width: 95%;
    align-self: center;
    padding: 12px;
    margin: 
    border: 2px solid #6366f1;
    border-radius: 8px;
    font-size: .88rem;
    line-height: 1.6;
    resize: vertical;
    outline: none;
}

/* Details Bereich (Legacy - wird durch kc2 ersetzt) */
.kanban-card-details {
    padding: 0 12px 12px 12px;
    border-top: 1px solid #f1f5f9;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }

    to {
        opacity: 1;
        max-height: 500px;
    }
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 6px 0;
    font-size: 0.85rem;
    border-bottom: 1px solid #f8fafc;
}

    .detail-row:last-of-type {
        border-bottom: none;
    }

.detail-label {
    color: #64748b;
    font-weight: 500;
    flex-shrink: 0;
    width: 100px;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .detail-label i {
        width: 14px;
        text-align: center;
        font-size: 0.8rem;
    }

.detail-value {
    flex: 1;
    color: #1e293b;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

    .detail-value span {
        word-break: break-word;
    }

    /* Copy Button */
    .detail-value .btn-link {
        color: #64748b;
        text-decoration: none;
        padding: 2px 4px;
        line-height: 1;
        transition: all 0.2s ease;
    }

        .detail-value .btn-link:hover {
            color: #667eea;
            background: #f1f5f9;
            border-radius: 4px;
        }

        .detail-value .btn-link i {
            font-size: 0.85rem;
        }

/* Badges in kompakter Ansicht */
.kanban-card-compact .badge {
    font-size: 0.7rem;
    padding: 3px 6px;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .detail-label {
        width: 100%;
        margin-bottom: 4px;
    }

    .detail-value {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Drag & Drop States bleiben gleich */
.kanban-ghost {
    opacity: 0.4;
    background: #f1f5f9;
}

.kanban-drag {
    opacity: 0.8;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    transform: rotate(3deg);
}

/* ═══════════════════════════════════════════════════════════
   CHANNEL STATUS STYLING
   ═══════════════════════════════════════════════════════════ */

.channel-closed {
    background: #e9ecef !important;
    opacity: 0.85;
    filter: grayscale(30%);
    transition: all 0.3s ease;
}

    .channel-closed:hover {
        opacity: 0.95;
        background: #dee2e6 !important;
    }

    .channel-closed .card-header {
        background: #f3f3f3 !important;
        border-left: 4px solid #6c757d;
    }

    .channel-closed h5 {
        color: #6c757d;
    }

/* Archiv Filter Button */
#archiveFilterBtn.active {
    background: var(--primary-gradient);
    color: white;
    border-color: var(--primary-color);
}
/* Archivieren-Button disabled State */
.btn-outline-secondary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════
   WORKSPACE SIDEBAR – MAILBOX HEADER & SUBFOLDER
   ═══════════════════════════════════════════════════════════ */
.wm-mailbox-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: background 0.15s;
    user-select: none;
}

.wm-mailbox-header:hover,
.wm-mailbox-header.active {
    background: var(--hover-bg);
    color: var(--primary-color);
}

.wm-mb-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.wm-subfolder {
    /* padding-left inline via RenderFolderTree */
    font-size: 0.82rem;
    opacity: 0.9;
}

.wm-count {
    font-size: 0.75rem;
    min-width: 18px;
    text-align: right;
}

.wm-add-folder-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 1px 3px;
    opacity: 0;
    transition: opacity 0.15s;
    cursor: pointer;
    border-radius: 3px;
    line-height: 1;
}

.wm-mailbox-header:hover .wm-add-folder-btn,
.wm-subfolder:hover .wm-add-folder-btn {
    opacity: 1;
}

.wm-add-folder-btn:hover {
    background: var(--hover-bg);
    color: var(--primary-color);
}

    .btn-outline-secondary:disabled:hover {
        background-color: transparent;
        border-color: #6c757d;
    }

/* ═══════════════════════════════════════════════════════════
   PUBLIC APPLICATION - CLOSED CHANNEL
   ═══════════════════════════════════════════════════════════ */

.public-application-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

    .public-application-page .card {
        border-radius: 15px;
        overflow: hidden;
    }

    .public-application-page .fa-lock,
    .public-application-page .fa-search {
        opacity: 0.2;
    }

    .public-application-page .alert {
        border-radius: 10px;
    }

/* Animation für Icons */
@keyframes pulse {
    0%, 100% {
        opacity: 0.2;
    }

    50% {
        opacity: 0.4;
    }
}

.public-application-page i.fa-5x {
    animation: pulse 3s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════════════════
   🆘 HILFE-BUTTON (Fixed, rechts unten)
   ═══════════════════════════════════════════════════════════ */

.help-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    cursor: pointer;
    z-index: 1050;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .help-button:hover {
        transform: scale(1.1) translateY(-2px);
        box-shadow: 0 6px 30px rgba(102, 126, 234, 0.6);
    }

    .help-button i {
        font-size: 1.8rem;
    }

    .help-button:active {
        transform: scale(0.95);
    }

/* Modal über dem Button */
#helpModal {
    z-index: 1060;
}

#helpModal .modal-dialog {
    z-index: 1061;
}

/* Video Container im Modal */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    background: #000;
    border-radius: 8px;
}

    .video-container iframe,
    .video-container video {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border: none;
    }

    .video-container p {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        margin: 0;
    }

/* Responsive Help Button */
@media (max-width: 768px) {
    .help-button {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }

        .help-button i {
            font-size: 1.5rem;
        }
}

/* ═══════════════════════════════════════════════════════════
WARTELISTEN CARDS
═══════════════════════════════════════════════════════════ */

.waitlist-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
    border-left: 4px solid var(--primary-color);
}

    .waitlist-card:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        transform: translateX(3px);
    }

    .waitlist-card.waitlist-archived {
        opacity: 0.6;
        filter: grayscale(30%);
    }

        .waitlist-card.waitlist-archived:hover {
            opacity: 0.8;
        }

    .waitlist-card h6 {
        color: var(--text-primary);
        font-weight: 600;
        margin-bottom: 8px;
    }

        .waitlist-card h6 i {
            color: var(--primary-color);
        }

    .waitlist-card .waitlist-entries {
        animation: slideDown 0.2s ease;
    }

/* Waitlist Archive Filter Button - ORANGE */
#waitlistArchiveFilterBtn.active {
    background-color: #fd7e14 !important;
    color: white !important;
    border-color: #fd7e14 !important;
}

/* Waitlist Card - klickbarer Bereich */
.waitlist-card .flex-grow-1[onclick] {
    transition: background 0.2s ease;
    border-radius: 6px;
    padding: 4px;
    margin: -4px;
}

.waitlist-card .flex-grow-1[onclick]:hover {
    background: var(--hover-bg);
}

.waitlist-card .flex-grow-1[onclick]:active {
    background: #e2e8f0;
}


/* Waitlist Liegenschaft Filter Button - ORANGE */
#waitlistLiegenschaftFilterBtn {
    position: relative;
}

#waitlistLiegenschaftFilterBtn.active {
    background-color: #fd7e14 !important;
    color: white !important;
    border-color: #fd7e14 !important;
    box-shadow: none !important;
}

#waitlistLiegenschaftFilterBtn.filtered::after {
    content: '';
    position: absolute;
    top: -4px;
    right: -4px;
    width: 12px;
    height: 12px;
    background-color: #fd7e14;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(253, 126, 20, 0.4);
}

/* Waitlist Filter Card Animation */
#waitlistFilterCard {
    animation: slideDown 0.3s ease;
}

/* Filter Reset Button (nur Icon) */
#waitlistFilterCard .btn-outline-secondary {
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#waitlistFilterCard .btn-outline-secondary i {
    font-size: 1.2rem;
}

/* Filter Inputs - kompakt */
#waitlistFilterCard .form-select,
#waitlistFilterCard .form-control {
    font-size: 0.9rem;
    padding: 8px 12px;
}

#waitlistFilterCard .form-label {
    font-size: 0.85rem;
    margin-bottom: 4px;
    font-weight: 600;
}

#waitlistFilterCard .form-label i {
    font-size: 0.8rem;
}

/* Live Search Input Styling */
#waitlistNameFilter {
    border: 2px solid var(--border-color);
    border-right: 0;
    transition: all 0.2s ease;
}

#waitlistNameFilter:focus {
    border-color: #667eea;
    box-shadow: none;
}

#waitlistNameFilter::placeholder {
    color: #cbd5e0;
    font-style: italic;
}

/* X-Button im Suchfeld - OHNE Bootstrap Transform */
#waitlistFilterCard .input-group .btn-outline-secondary {
    border: 2px solid var(--border-color);
    border-left: 0;
    padding: 8px 12px;
    background: white;
    color: #6c757d;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    transform: none !important;
}

#waitlistFilterCard .input-group .btn-outline-secondary:hover {
    background: #f8fafc !important;
    color: #667eea !important;
    border-color: var(--border-color) !important;
    transform: none !important;
    box-shadow: none !important;
}

#waitlistFilterCard .input-group .btn-outline-secondary:active,
#waitlistFilterCard .input-group .btn-outline-secondary:focus {
    transform: none !important;
    box-shadow: none !important;
}



/* ✅ PURPLE MARKIERUNG für gefilterte Cards */
.waitlist-card.filter-matched {
    border-left: 4px solid #667eea !important;
}

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


/* Hide archived waitlists by default */
.waitlist-card.waitlist-archived {
    display: none;
}

.show-archived .waitlist-card.waitlist-archived {
    display: block;
}

/* ═══════════════════════════════════════════════════════════
   PROSPECT PAGE - SYNCFUSION & FILTER STYLING
   ═══════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════
   SYNCFUSION EDITOR POPUP - COMPANY STYLING
   ═══════════════════════════════════════════════════════════ */

.e-schedule .e-quick-popup-wrapper .e-event-create,
.e-schedule .e-quick-popup-wrapper .e-event-save {
    background: linear-gradient(135deg, #Cffe25 0%, #d2ff00 100%) !important;
    border: none !important;
    color: #000 !important;
    font-weight: 600 !important;
    padding: 8px 20px !important;
    border-radius: 6px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.e-schedule .e-quick-popup-wrapper .e-event-create:hover,
.e-schedule .e-quick-popup-wrapper .e-event-save:hover {
    background: linear-gradient(135deg, #b8e41f 0%, #bcd900 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(210, 255, 0, 0.4) !important;
    color: #000 !important;
}

.e-schedule .e-quick-popup-wrapper .e-event-cancel {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: #fff !important;
    padding: 8px 20px !important;
    border-radius: 6px !important;
}

.e-schedule .e-quick-popup-wrapper .e-event-cancel:hover {
    background-color: #5a6268 !important;
}

.e-schedule .e-quick-popup-wrapper .e-popup-header {
    background: linear-gradient(135deg, #Cffe25 0%, #d2ff00 100%) !important;
    color: #000 !important;
    font-weight: 600 !important;
}

.e-schedule .e-quick-popup-wrapper .e-header-icon-wrapper {
    background-color: transparent !important;
}

.e-schedule .e-quick-popup-wrapper .e-close {
    color: #000 !important;
}

/* ═══════════════════════════════════════════════════════════
   FILTER STYLING - WARTELISTE
   ═══════════════════════════════════════════════════════════ */

/* Filter Panel - Labels hellgrau */
#waitlistFilterCard .form-label {
    color: #9ca3af !important;
    font-weight: 500;
    font-size: 0.85rem;
}

#waitlistFilterCard .form-label i {
    color: #9ca3af !important;
}

/* Excel-Export Button - Gleich groß wie Filter-Button */
#waitlistExcelExportBtn {
    background-color: #e9ecef !important;
    border-color: #dee2e6 !important;
    color: #495057 !important;
    transition: all 0.2s ease;
    padding: 10px 12px;
}

#waitlistExcelExportBtn:hover {
    background-color: #495057 !important;
    border-color: #495057 !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(73, 80, 87, 0.3);
}

#waitlistExcelExportBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#waitlistExcelExportBtn i {
    font-size: 1.1rem;
}

/* Filter-Button: Hellgrau vom Hintergrund abheben */
#waitlistLiegenschaftFilterBtn {
    background-color: #e9ecef !important;
    border-color: #dee2e6 !important;
    color: #495057 !important;
    transition: all 0.2s ease;
    padding: 10px 12px;
}

#waitlistLiegenschaftFilterBtn:hover {
    background-color: #495057 !important;
    border-color: #495057 !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(73, 80, 87, 0.3);
}

#waitlistLiegenschaftFilterBtn i {
    font-size: 1.1rem;
}

/* Filter-Button AKTIV/OFFEN: Orange ausgefüllt (überschreibt Bootstrap) */
button#waitlistLiegenschaftFilterBtn.filtered,
button#waitlistLiegenschaftFilterBtn.active,
.btn-outline-secondary#waitlistLiegenschaftFilterBtn.filtered,
.btn-outline-secondary#waitlistLiegenschaftFilterBtn.active {
    background-color: #fd7e14 !important;
    border-color: #fd7e14 !important;
    color: white !important;
    box-shadow: none !important;
}

button#waitlistLiegenschaftFilterBtn.filtered:hover,
button#waitlistLiegenschaftFilterBtn.active:hover,
.btn-outline-secondary#waitlistLiegenschaftFilterBtn.filtered:hover,
.btn-outline-secondary#waitlistLiegenschaftFilterBtn.active:hover {
    background-color: #e8590c !important;
    border-color: #e8590c !important;
    color: white !important;
    box-shadow: none !important;
}

/* Filter-Inputs mit aktivem Filter: Orange Markierung links */
.form-select.filter-active,
.form-control.filter-active {
    border-left: 4px solid #fd7e14 !important;
    padding-left: 8px;
    transition: border-left 0.3s ease;
}

/* Entferne ALLE Fokus-Rahmen für Filter-Inputs */
#waitlistFilterCard .form-select:focus,
#waitlistFilterCard .form-control:focus,
#waitlistLiegenschaftFilter:focus,
#waitlistObjektFilter:focus,
#waitlistNameFilter:focus {
    box-shadow: none !important;
    outline: none !important;
    border-color: #dee2e6 !important;
}

/* Fokus-Rahmen auch für filter-active Inputs entfernen */
#waitlistFilterCard .form-select.filter-active:focus,
#waitlistFilterCard .form-control.filter-active:focus {
    box-shadow: none !important;
    outline: none !important;
    border-left: 4px solid #fd7e14 !important;
    border-color: #dee2e6 !important;
}

/* Gefilterte Liegenschaft-Cards: Orange Markierung links (NUR wenn Filter aktiv) */
.modern-card[data-liegenschaft-id] {
    border-left: 4px solid #dee2e6;
    transition: border-left 0.3s ease;
}

.modern-card[data-liegenschaft-id].filtered-result {
    border-left-color: #fd7e14 !important;
}

/* ═══════════════════════════════════════════════════════════
   TOGGLE-SWITCH STYLING - ARCHIVIERTE FILTER
   ═══════════════════════════════════════════════════════════ */

/* Container: Gleiche Höhe wie form-control (38px), weiß, kein Rahmen */
.archive-toggle-wrapper {
    display: flex;
    align-items: center;
    height: 38px;
    padding: 0.375rem 0.75rem;
    background-color: white;
    border: none;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

/* Toggle Switch - Custom Styling */
.archive-toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
    margin-right: 10px;
}

.archive-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* Slider (Hintergrund) - Helles Grau */
.archive-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e9ecef;
    border: 1px solid #dee2e6;
    transition: 0.3s;
    border-radius: 24px;
}

/* Runder Kreis - Dunkelgrau (inaktiv) */
.archive-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 2px;
    background-color: #6c757d;
    transition: 0.3s;
    border-radius: 50%;
}

/* Aktiv: Hintergrund bleibt grau, Kreis wird orange */
input:checked + .archive-toggle-slider {
    background-color: #e9ecef;
    border-color: #fd7e14;
}

input:checked + .archive-toggle-slider:before {
    transform: translateX(24px);
    background-color: #fd7e14;
}

/* Hover Effekt */
.archive-toggle-slider:hover {
    background-color: #dee2e6;
}

/* Text neben Toggle */
.archive-toggle-label {
    font-size: 0.9rem;
    color: #495057;
    user-select: none;
    cursor: pointer;
    font-weight: 500;
}

/* Archivierte Wartelisten ausblenden (Standard) */
.waitlist-archived {
    display: none !important;
}

#waitlistAccordion.show-archived .waitlist-archived {
    display: block !important;
    opacity: 0.6;
}

/* Archivierte Interessenten ausblenden (Standard) */
.waitlist-entry-archived {
    display: none !important;
}

#waitlistAccordion.show-archived .waitlist-entry-archived {
    display: table-row !important;
    opacity: 0.6;
}

/* ═══════════════════════════════════════════════════════════
   DELETE CONFIRM - SLIDE-IN UX
   ═══════════════════════════════════════════════════════════ */

.entry-actions {
    position: relative;
    min-width: 150px;
    height: 42px;
    overflow: visible;
    display: flex;
    align-items: center;
}

.action-buttons {
    display: flex;
    gap: 5px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    align-items: center;
}

.delete-confirm {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #fff3cd;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #ffc107;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    height: 38px;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.delete-confirm.show {
    transform: translateX(0);
}

.action-buttons.hiding {
    transform: translateX(-100%);
    opacity: 0;
}

.confirm-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: #dc3545;
    white-space: nowrap;
}

.confirm-delete-btn,
.cancel-delete-btn {
    padding: 4px 8px !important;
    font-size: 0.85rem;
}

/* Verhindere Orange Border auf Table-Rows */
#waitlistAccordion table tbody tr {
    border-left: none !important;
}

/* ═══════════════════════════════════════════════════════════
   COLLAPSE INDICATOR - DREIECK UNTEN ZENTRIERT
   ═══════════════════════════════════════════════════════════ */

.collapse-indicator {
    color: #e9e9e9;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2px 0;
    margin-top: -10px;
}

.collapse-indicator .btn-link {
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.2s ease;
    width: 28px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: none;
}

.collapse-indicator .btn-link:hover {
    color: #64748b;
    transform: scale(1.15);
}

.collapse-indicator .btn-link:focus {
    outline: none;
    box-shadow: none;
}

/* Chevron Icons - Wireframe V-Dreiecke */
.collapse-icon-down,
.collapse-icon-up {
    font-size: 0.9rem;
    font-weight: 900;
    transition: all 0.3s ease;
}

/* Standard: Pfeil runter sichtbar */
.collapse-indicator .btn-link.collapsed .collapse-icon-down {
    display: inline-block;
}

.collapse-indicator .btn-link.collapsed .collapse-icon-up {
    display: none;
}

/* Ausgeklappt: Pfeil hoch sichtbar */
.collapse-indicator .btn-link:not(.collapsed) .collapse-icon-down {
    display: none;
}

.collapse-indicator .btn-link:not(.collapsed) .collapse-icon-up {
    display: inline-block;
}

/* ═══════════════════════════════════════════════════════════
   TEAM MEMBER CARDS - MODERN UX
   ═══════════════════════════════════════════════════════════ */

.team-member-card {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 24px 20px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

    .team-member-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 24px rgba(0,0,0,0.12);
        border-color: var(--primary-color);
    }

    .team-member-card.team-member-inactive {
        opacity: 0.65;
        filter: grayscale(30%);
    }

        .team-member-card.team-member-inactive:hover {
            opacity: 0.85;
        }

.team-card-avatar-wrapper {
    position: relative;
    margin-bottom: 16px;
}

.team-card-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transition: all 0.3s ease;
}

.team-member-card:hover .team-card-avatar {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.team-card-2fa-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.team-card-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.3;
}

.team-card-role {
    margin-bottom: 12px;
}

    .team-card-role .badge {
        font-size: 0.75rem;
        padding: 4px 10px;
        border-radius: 20px;
        font-weight: 600;
    }

.team-card-email {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 12px;
    word-break: break-word;
}

    .team-card-email i {
        flex-shrink: 0;
        font-size: 0.8rem;
    }

.team-card-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    width: 100%;
}

.team-card-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.team-card-actions {
    display: flex;
    gap: 6px;
    width: 100%;
    margin-top: auto;
}

    .team-card-actions .btn {
        padding: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

        .team-card-actions .btn i {
            font-size: 0.9rem;
        }

@media (max-width: 992px) {
    .team-member-card {
        max-width: 280px;
        margin: 0 auto;
    }
}

/* ═══════════════════════════════════════════════════════════
   CASE DETAIL MODAL - THREAD DESIGN (Full Width)
   ═══════════════════════════════════════════════════════════ */

/* Thread Message Container - Full Width */
.cd-thread-msg {
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease;
}

.cd-thread-msg:hover {
    background: #f8fafc;
}

/* Message Row mit Avatar + Content */
.cd-msg-row {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

/* Avatar - Initialen nur */
.cd-msg-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

/* Message Content - Volle Breite */
.cd-msg-content {
    flex: 1;
    min-width: 0;
}

/* Header: Name + Zeit + Actions */
.cd-msg-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.cd-msg-author {
    font-weight: 700;
    color: #1e293b;
    font-size: 0.95rem;
}

.cd-msg-time {
    font-size: 0.75rem;
    color: #94a3b8;
}

.cd-msg-edited {
    font-size: 0.7rem;
    color: #94a3b8;
    font-style: italic;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.cd-msg-edited i {
    font-size: 0.65rem;
}

.cd-msg-pinned {
    color: #f59e0b;
    font-size: 0.75rem;
    margin-left: 4px;
}

/* Action Buttons */
.cd-msg-actions {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

.cd-msg-btn {
    background: white;
    border: 1px solid #e2e8f0;
    color: #64748b;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.cd-msg-btn:hover {
    background: #f1f5f9;
    border-color: #6366f1;
    color: #6366f1;
}

.cd-msg-btn.pinned {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #f59e0b;
}

.cd-msg-btn i {
    font-size: 0.8rem;
}

/* Message Text - Volle Breite */
.cd-msg-text {
    color: #334155;
    line-height: 1.5;
    word-wrap: break-word;
    white-space: pre-line;
    font-size: 0.82rem;
    margin: 0;
    padding: 0;
    padding: 0;
}

/* Expand/Collapse Button für lange Texte */
.cd-msg-expand-btn {
    background: none;
    border: none;
    color: #6366f1;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0;
    margin-top: 4px;
    display: block;
    transition: color 0.2s ease;
}

.cd-msg-expand-btn:hover {
    color: #4f46e5;
    text-decoration: underline;
}

/* Inline Images 2 */

.cd-thread-images {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.cd-inline-image-preview,
.cd-inline-image {
    max-width: 200px;
    max-height: 200px;
    width: auto;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid #e2e8f0;
    transition: all 0.2s ease;
    object-fit: cover;
}

.cd-inline-image-preview:hover,
.cd-inline-image:hover {
    border-color: #6366f1;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

/* File Attachments */
.cd-thread-attachments {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 6px;
    margin-top: 10px;
}

.cd-thread-attach-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: #f1f5f9;
    border-radius: 6px;
    color: #475569;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    max-width: fit-content;
}

.cd-thread-attach-link:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.cd-thread-attach-link i {
    color: #6366f1;
}

.cd-thread-attach-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
    padding: 5px 12px;
    font-size: .78rem;
    color: #374151;
    max-width: 100%;
}

.cd-thread-attach-pill:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #111827;
}

.cd-thread-attach-pill .cd-att-preview-hint {
    font-size: .65rem;
    background: #e5e7eb;
    color: #4b5563;
    border-radius: 999px;
    padding: 2px 7px;
    opacity: 1;
    margin-left: 2px;
}

/* Gelöschte Dateien/Bilder */
.cd-attach-deleted,
.cd-img-deleted {
    background: #fef2f2;
    border: 1px dashed #f87171;
    color: #991b1b;
    cursor: not-allowed;
    opacity: 0.7;
}

.cd-img-deleted {
    width: 200px;
    height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.75rem;
    border-radius: 8px;
    margin: 2px;
}

.cd-img-deleted i {
    font-size: 2rem;
    color: #dc2626;
}

/* Reply Toggle (jetzt IN Reactions-Row) */
.cd-reply-toggle {
    margin: 0;
    padding: 1px 6px;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #6366f1;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 20px;
    transition: all 0.15s;
    line-height: 1.4;
}

.cd-reply-toggle:hover {
    background: #eef2ff;
    color: #4f46e5;
    border-color: #c7d2fe;
}

.cd-reply-toggle i {
    font-size: 0.65rem;
    transition: transform 0.2s ease;
}

/* Replies Container */
.cd-thread-replies {
    margin-top: 8px;
    margin-left: 52px;
    padding-left: 16px;
    border-left: 2px solid #e2e8f0;
}

.cd-thread-replies.collapsed {
    display: none !important;
}

.cd-thread-replies:not(.collapsed) + .cd-reply-toggle i,
.cd-thread-replies:not(.collapsed) ~ .cd-reply-toggle i {
    transform: rotate(180deg);
}

.cd-thread-reply {
    padding-top: 8px;
    border-bottom: none;
}

.cd-thread-reply:last-child {
    padding-bottom: 0;
}

/* Assignee Avatars - Initialen */
.cd-avatar {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    margin-right: 2px;
    transition: transform 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.cd-avatar:hover {
    transform: scale(1.08);
}

.cd-avatar-remove {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.cd-avatar:hover .cd-avatar-remove {
    display: flex;
}

/* Lightbox */
.cd-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
    cursor: pointer;
}

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

.cd-lightbox-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    cursor: default;
}

.cd-lightbox-content img {
    max-width: 100%;
    max-height: 95vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.cd-lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.cd-lightbox-close:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

/* Thread Feed */
.cd-thread-feed::-webkit-scrollbar {
    width: 10px;
}

.cd-thread-feed::-webkit-scrollbar-track {
    background: #f8fafc;
    border-radius: 5px;
}

.cd-thread-feed::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
}

.cd-thread-feed::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Mention Dropdown */
.cd-mention-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    max-height: 240px;
    overflow-y: auto;
    z-index: 1000;
    min-width: 240px;
    margin-bottom: 8px;
}

.cd-mention-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.cd-mention-item:hover,
.cd-mention-item.active {
    background: #f1f5f9;
}

.cd-mention-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.cd-mention-pill {
    background: #e0e7ff;
    color: #4f46e5;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ═══════════════════════════════════════════════════
   NUMMER INPUT - SPINNER VERBERGEN & STEP BUTTONS STYLING
   ═══════════════════════════════════════════════════ */

/* Chrome, Safari, Edge, Opera */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type="number"] {
    -moz-appearance: textfield;
}

/* Step-Buttons für Nummer-Inputs (z.B. Stockwerk, Zimmerzahl) */
.input-group-sm .btn-outline-secondary[onclick*="step"] {
    background-color: #e8e8e8;
    color: #333;
    border-color: var(--border-color);
    padding: 0.375rem 0.5rem;
    transition: all 0.2s ease;
    margin-left: 0;
    border-left: 2px solid #fff;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.input-group-sm .btn-outline-secondary[onclick*="step"]:first-of-type {
    border-left: 1px solid var(--border-color);
}

.input-group-sm .btn-outline-secondary[onclick*="step"]:hover {
    background-color: #666;
    color: #fff;
    border-color: var(--border-color);
    border-left-color: #fff;
}

.input-group-sm .btn-outline-secondary[onclick*="step"]:hover:first-of-type {
    border-left-color: var(--border-color);
}

.input-group-sm .btn-outline-secondary[onclick*="step"]:active {
    background-color: #555;
    border-color: var(--border-color);
    border-left-color: #fff;
}

.input-group-sm .btn-outline-secondary[onclick*="step"]:active:first-of-type {
    border-left-color: var(--border-color);
}

/* ═══════════════════════════════════════════════════
   LIEGENSCHAFT EDITOR
   ═══════════════════════════════════════════════════ */

.liegenschaft-editor {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 130px);
    overflow: hidden;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.editor-split {
    display: flex;
    flex: 1;
    min-height: 0;
    height: calc(88vh - 140px);
    max-height: calc(88vh - 140px);
    overflow: hidden;
    gap: 30px;
    padding: 0px 0px 20px 0px;
}

.editor-left {
    width: 30%;
    min-width: 280px;
    max-width: 400px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: relative;
}

.editor-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 12px 12px 0 0;
    z-index: 1;
}

.editor-left-section {
    padding: 10px 16px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.editor-left-section .form-label {
    margin-bottom: 3px;
    font-size: 0.78rem;
    color: #6c757d;
}

.editor-left-tabs {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-top:15px;
}

.editor-left-tabs .nav-tabs {
    flex-shrink: 0;
    border-bottom: 1px solid #dee2e6;
    background: #f9f9f9;
    
}

.editor-left-tabs .nav-tabs .nav-link {
    padding: 8px 6px;
    font-size: 0.82rem;
    color: #6c757d;
    border: none;
    border-radius: 0;
    flex: 1 1 0;
    text-align: center;
}

.editor-left-tabs .nav-tabs .nav-link.active {
    color: #333;
    background: #fff;
    border-bottom: 2px solid var(--primary-color, #d2ff00);
    font-weight: 600;
}

.editor-left-tabs .nav-tabs .nav-link i {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 2px;
}

.editor-left-tabs .tab-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
}

.editor-right {
    flex: 1;
    overflow: hidden;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: relative;
    display: flex;
    flex-direction: column;
}

.editor-right::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--info-gradient);
    border-radius: 12px 12px 0 0;
    z-index: 1;
}

.editor-right-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
    background: #fff;
    border-radius: 12px 12px 0 0;
}

.editor-right-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 24px;
    min-height: 0;
}

/* Gebäude hinzufügen Button */
.btn-add-gebaeude {
    color: #696969;
    font-weight: 500;
    background: transparent;
    border: none;
    box-shadow: none;
}
.btn-add-gebaeude:hover {
    background: #e9ecef;
    color: #333;
}

/* Objekt anlegen Icon-Button (grau, hover primary) */
.btn-add-objekt-icon {
    color: #999;
    background: transparent;
    border: none;
}
.btn-add-objekt-icon:hover {
    color: var(--primary-color, #667eea);
}

/* Gebäude-Erfassungskarte slide-down */
.add-gebaeude-card {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.9s ease, opacity 0.5s ease;
}
.add-gebaeude-card.show {
    max-height: 600px;
    opacity: 1;
}

/* Tabs */
.editor-left-tabs .nav-tabs .nav-item {
    flex: 1 1 0;
}
.editor-left-tabs .nav-tabs .nav-link {
    width: 100%;
    text-align: center;
    white-space: nowrap;
}

.gebaeude-card .card-header:hover {
    background: #eef0f2 !important;
}

.gebaeude-card .collapse.show > .card-body {
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Gebaeude vertikale Tabs */
.gebaeude-card .geb-vtabs {
    flex: 0 0 auto;
    height: 300px;
    border-bottom: 1px solid #eee;
    border-top: 1px solid #dadada;
    overflow: hidden;
}

.geb-vtabs-nav {
    flex-shrink: 0;
    background: #f8f9fa;
    border-right: 1px solid #eee;
    padding: 8px 0;
    min-width: 110px;
}

.geb-vtabs-nav .nav-link {
    border-radius: 0;
    font-size: 0.85rem;
    padding: 7px 12px;
    color: #6c757d;
    text-align: left;
    border-left: 3px solid transparent;
    transition: all 0.15s;
}

.geb-vtabs-nav .nav-link:hover {
    background: #e9ecef;
    color: #333;
}

.geb-vtabs-nav .nav-link.active {
    background: #fff;
    color: #333;
    font-weight: 600;
    border-left: 4px solid #3498db;
}

.geb-vtabs-nav .nav-link i {
    margin-right: 4px;
    width: 14px;
    text-align: center;
}

.geb-vtabs-content {
    flex: 1;
    padding: 12px 16px;
    min-height: 0;
    overflow: hidden;
}

.geb-vtabs-content > .tab-pane {
    height: 100%;
    overflow: hidden;
}

.geb-vtabs-content .d-flex > div:first-child {
    flex: 0 0 45%;
    min-height: 180px;
}

.geb-map {
    width: 100% !important;
    height: 220px !important;
    min-height: 180px;
}

/* Estate list grid layout - shared between header and data rows */
.estate-grid-row {
    display: flex;
    align-items: center;
    width: 100%;
}
.estate-col-name {
    flex: 0 1 400px;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
    padding-left: 20px;
}
.estate-col-client {
    flex: 0 0 auto;
    font-size: 0.85rem;
    text-align: left;
    margin-left: 30px;
    margin-right: 30px;
}
.estate-cols-stats {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    margin-left: auto;
}
/* Spacer between left group (name+client) and right group (stats+contracts+actions) */
.estate-col-stat {
    width: 50px;
    flex-shrink: 0;
    text-align: center;
}
.estate-cols-contracts {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    width: 200px;
}
.estate-col-contract {
    width: 50px;
    flex-shrink: 0;
    text-align: center;
}
.estate-col-actions {
    width: 90px;
    flex-shrink: 0;
    text-align: center;
    margin-left: 20px;
    padding-right: 0;
}
.estate-col-chevron {
    width: 30px;
    flex-shrink: 0;
    text-align: center;
    margin-left: 0;
}
.estate-collapse-chevron .material-symbols-rounded {
    transition: transform 0.2s ease;
}
.estate-collapse-chevron:not(.collapsed) .material-symbols-rounded {
    transform: rotate(180deg);
}

/* Wireframe / Outline Badges */
.badge-outline-danger {
    background: transparent !important;
    color: #dc3545 !important;
    border: 1px solid #dc3545;
}
.badge-outline-success {
    background: transparent !important;
    color: #198754 !important;
    border: 1px solid #198754;
}
.badge-outline-warning {
    background: transparent !important;
    color: #ffc107 !important;
    border: 1px solid #ffc107;
}
.badge-outline-secondary {
    background: transparent !important;
    color: #6c757d !important;
    border: 1px solid #6c757d;
}
.badge-outline-dark {
    background: transparent !important;
    color: #212529 !important;
    border: 1px solid #212529;
}
.estate-col-collapse {
    flex: 1 1 0;
    min-width: 0;
    border: none;
    background: none;
}
.estate-grid-header {
    align-items: flex-end;
}

/* Header label styling */
.estate-header-label {
    font-size: 0.8rem;
    font-weight: 400;
    color: #6c757d;
    user-select: none;
}
.estate-header-label-sortable {
    cursor: pointer;
}
.estate-header-icon {
    font-size: 22px;
}
.estate-header-label .sort-arrows {
    display: inline-flex;
    flex-direction: column;
    vertical-align: middle;
    line-height: 0;
    margin-left: 2px;
}
.estate-header-label .sort-arrow-up {
    font-size: 18px;
    line-height: 1;
    color: #ccc;
    font-variation-settings: 'FILL' 0;
}
.estate-header-label .sort-arrow-down {
    font-size: 18px;
    line-height: 1;
    color: #ccc;
    margin-top: -6px;
    font-variation-settings: 'FILL' 0;
}
.estate-header-underline {
    height: 2px;
    border-radius: 1px;
    margin-top: 2px;
}
.estate-header-underline-primary {
    background: var(--primary-color);
}
.estate-header-underline-dark {
    background: #6c757d;
}

/* Square action buttons */
.estate-col-actions .btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Responsive: 1. stats/contracts hide first, 2. mandant second, 3. name stays */
@media (max-width: 1400px) {
    .estate-cols-stats,
    .estate-cols-contracts { display: none !important; }
    .estate-col-actions {
        margin-left: auto;
    }
}
@media (max-width: 1000px) {
    .estate-mandant-col,
    .estate-mandant-header,
    .estate-col-client { display: none !important; }
}

.geb-objekte {
    padding: 0;
}

/* Stockwerk-Filter Nav */
.geb-floor-nav {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    background: #f8f9fa;
    border-right: 1px solid #eee;
    padding: 8px 0;
    min-width: 80px;
    max-width: 90px;
    max-height: 350px;
    overflow-y: auto;
}

.geb-floor-btn {
    border: none;
    background: none;
    padding: 8px 10px;
    font-size: 0.85rem;
    color: #6c757d;
    text-align: left;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
    width: 100%;
    display: block;
}

.geb-floor-btn:hover {
    background: #e9ecef;
    color: #333;
}

.geb-floor-btn.active {
    background: #fff;
    color: #1e293b;
    font-weight: 600;
    border-left: 4px solid #3498db;
}

.geb-floor-btn i {
    margin-right: 3px;
    font-size: 0.65rem;
}

/* Springende Punkte fuer Autocomplete-Ladeindikator */
.egrid-dots-loader { display: inline-flex; gap: 3px; align-items: center; }
.egrid-dots-loader span {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--primary-color, #6c757d);
    animation: egridDotBounce 1.1s infinite ease-in-out;
}
.egrid-dots-loader span:nth-child(1) { animation-delay: 0s; }
.egrid-dots-loader span:nth-child(2) { animation-delay: 0.18s; }
.egrid-dots-loader span:nth-child(3) { animation-delay: 0.36s; }
@keyframes egridDotBounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
    40%            { transform: translateY(-5px); opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════════
   ESTATE PAGE
   ═══════════════════════════════════════════════════════════════ */

/* Slide-down filter panel */
.estate-filter-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.estate-filter-panel.open {
    max-height: 200px;
}

/* Unified icon buttons (square, rounded, icon-only) */
.estate-icon-btn {
    width: 38px;
    height: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    color: #555;
    border: none;
    border-radius: 10px;
    line-height: 1;
    transition: background .2s, color .2s;
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
.estate-icon-btn .material-symbols-rounded {
    font-size: 20px;
    vertical-align: middle;
}
.estate-icon-btn:hover {
    background: #e0e0e0;
    color: #333;
}
.estate-icon-btn-create:hover {
    background: var(--primary-button-bg);
}
.estate-icon-btn-save {
    color: #ccc;
    cursor: default;
}
.estate-icon-btn-save:hover {
    background: #f0f0f0;
    color: #ccc;
}
.estate-icon-btn-save.ready {
    color: #555;
    background: var(--primary-button-bg);
    cursor: pointer;
}
.estate-icon-btn-save.ready:hover {
    background: var(--primary-color);
    color: #555;
}

.estate-btn-create {
    background: var(--primary-button-bg);
    color: var(--primary-button-txt);
    box-shadow: 0 2px 4px rgba(0,0,0,.15);
    padding: 6px 10px;
    line-height: 1;
    transition: background .2s;
}

.estate-btn-create:hover {
    background: var(--primary-color);
}

.estate-btn-create-gray {
    background: transparent;
    color: #696969;
    box-shadow: none;
}
.estate-btn-create-gray:hover {
    background: #6c757d;
    color: #fff !important;
}
.estate-btn-create-gray:hover .material-symbols-rounded:not(.estate-btn-plus-badge) {
    color: #fff !important;
}
.estate-btn-create-gray .estate-btn-plus-badge {
    color: #fff;
    background: #888;
}
.estate-btn-create-gray:hover .estate-btn-plus-badge {
    color: #6c757d;
    background: #fff;
}

.estate-btn-plus-badge {

 position: absolute;
    top: 20px;
    right: 8px;
    font-size: 9px !important;
    color: #f0f0f0;
    /* border-color: var(--primary-color); */
    /* border-width: 5px; */
    background: #5c6064;
    border-radius: 50%;
    line-height: 1;
    padding: 0;
    width: 9px;
    height: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
}

.estate-btn-filter {
    background: #f0f0f0;
    color: #555;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,.15);
    transition: background .2s, box-shadow .2s;
    padding: 6px 10px;
    line-height: 1;
}

.estate-btn-filter:hover {
    background: #e0e0e0;
    color: #333;
    box-shadow: 0 4px 8px rgba(0,0,0,.2);
}

.estate-btn-filter.btn-warning {
    background: #ff9800;
    color: #fff;
    border-color: #ff9800;
}

.estate-btn-filter.btn-warning:hover {
    background: #e68900;
    color: #fff;
}

.estate-filter-clear-badge {
    display: none;
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ff9800;
    color: #fff;
    font-size: 13px;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,.3);
    z-index: 1;
}

.estate-filter-clear-badge:hover {
    background: #e68900;
}

.estate-spinner {
    animation: estate-spin 1s linear infinite;
}

@keyframes estate-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.estate-header {
    background: #feffff;
    border-bottom: 1px solid #ddd;
    padding: 12px 5px;
    border-left: 4px solid var(--primary-color);
}

.estate-header .estate-egrid {
    font-size: 0.75rem;
}

.estate-edit-icon {
    position: relative;
    display: inline-block;
}

.estate-edit-icon .fa-plus {
    position: absolute;
    top: -5px;
    right: -7px;
    font-size: 0.5em;
}

.gebaeude-card > .card-header {
    background: #f8f9fa;
    border-left: 4px solid #3498db;
    padding: 5px 0px 5px 0px;
}

.gebaeude-card .gebaeude-meta {
    font-size: 0.8rem;
}

.gebaeude-card .gebaeude-detail-table {
    font-size: 0.85rem;
}

.gebaeude-card .gebaeude-detail-label {
    width: 40%;
}

.estate-objekte-scroll {
    max-height: calc(300px - 20px);
    overflow-y: auto;
}


/* Objekt-Anlegen Slide-in Panel */
.add-objekt-slide {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: #fff;
    z-index: 10;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}
.add-objekt-slide.show {
    transform: translateX(0);
}
.geb-vtabs-content-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    min-width: 0;
}

/* Estate Kennzahlen-Spalten (einheitliche Breite fuer Header und Datenzeilen) */
.estate-stats-cols {
    min-width: 480px;
}

.estate-stats-cols-geb {
    min-width: 400px;
}

.estate-objekte-scroll thead {
    background: #fff !important;
}

.estate-objekte-scroll thead tr {
    background: #fff !important;
}

.estate-objekte-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff !important;
    color: #bbb !important;
    font-size: 0.65rem !important;
    font-weight: 400 !important;
    text-transform: none !important;
    letter-spacing: 0.02em !important;
    padding: 2px 8px 4px 8px !important;
    border-bottom: 2px solid #e0e0e0 !important;
    border-left: 5px solid #fff !important;
}

.estate-objekte-scroll thead th:first-child {
    border-left: none !important;
}

.objekt-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    color: #6c757d;
}

.estate-map-marker {
    background: #55595c;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}

.estate-map-marker i,
.estate-map-marker span {
    transform: rotate(45deg);
    font-size: 18px;
    color: var(--primary-color, #d200ff);
}

/* ═══════════════════════════════════════════════════════════
   OBJEKTMANAGER PAGE
   ═══════════════════════════════════════════════════════════ */
.objmgr-page { padding-bottom: 2rem; }

.objmgr-split {
    display: flex;
    gap: 30px;
    height: calc(88vh - 140px);
    max-height: calc(88vh - 140px);
    min-height: 400px;
    overflow: hidden;
    padding: 0px 0px 20px 0px;
}

.objmgr-left {
    width: 30%;
    min-width: 280px;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.objmgr-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 12px 12px 0 0;
    z-index: 1;
}

.objmgr-left-header {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color, #dee2e6);
    background: #f8f9fa;
}

.objmgr-left-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.objmgr-right {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow-y: auto;
    padding: 16px;
    position: relative;
}

.objmgr-right::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--info-gradient);
    border-radius: 12px 12px 0 0;
    z-index: 1;
}

.objmgr-group { margin-bottom: 8px; }

.objmgr-group-header {
    font-size: 0.75rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 8px 2px;
}

.objmgr-item {
    padding: 8px 10px;
    border-radius: 0;
    cursor: pointer;
    transition: background 0.15s;
    margin-bottom: 2px;
    border-left: 4px solid transparent;
}

.objmgr-item:hover { background: #f5f6f8; }

.objmgr-item-menu {
    opacity: 0;
    transition: opacity 0.15s;
}
.objmgr-item:hover .objmgr-item-menu,
.objmgr-item .objmgr-item-menu[aria-expanded="true"] {
    opacity: 1;
}

.objmgr-item.active {
    background: #f5f6f8;
    border-left: 4px solid #3498db;
    padding-left: 6px;
}

.objmgr-item-name {
    font-weight: 600;
    font-size: 0.85rem;
}

.objmgr-item-sub {
    font-size: 0.75rem;
    color: #888;
}

/* Detail panel */
.objmgr-detail {}

.objmgr-right .nav-tabs {
    border-bottom: 2px solid #dee2e6;
}

.objmgr-right .nav-tabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    color: #6c757d;
    transition: all 0.15s;
}

.objmgr-right .nav-tabs .nav-link:hover {
    border-bottom-color: #a0c4e8;
    color: #333;
}

.objmgr-right .nav-tabs .nav-link.active {
    border-bottom-color: #3498db;
    color: #333;
    font-weight: 600;
    background: transparent;
}

.objmgr-tab-content {
    padding: 8px 0;
    max-height: calc(100vh - 340px);
    overflow-y: auto;
}

/* Timeline */
.objmgr-timeline-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: 6px;
    background: #fafafa;
    padding: 8px;
}

.objmgr-timeline {
    position: relative;
    min-height: 60px;
}

.objmgr-tl-header {
    position: relative;
    height: 28px;
    margin-bottom: 4px;
}

.objmgr-tl-tick {
    position: absolute;
    top: 0;
}

.objmgr-tl-tick-line {
    width: 1px;
    height: 24px;
    background: #ddd;
}

.objmgr-tl-tick-label {
    font-size: 0.65rem;
    color: #999;
    white-space: nowrap;
    margin-top: 2px;
}

.objmgr-tl-bars {
    position: relative;
    height: 36px;
}

.objmgr-tl-bar {
    position: absolute;
    top: 4px;
    height: 28px;
    border-radius: 4px;
    opacity: 0.85;
    display: flex;
    align-items: center;
    overflow: hidden;
    cursor: default;
    transition: opacity 0.15s;
}

.objmgr-tl-bar:hover { opacity: 1; }

.objmgr-tl-bar-label {
    font-size: 0.65rem;
    color: #fff;
    padding: 0 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.objmgr-tl-today {
    position: absolute;
    top: 0;
    width: 2px;
    height: 36px;
    background: #333;
    z-index: 2;
}

.objmgr-tl-today::after {
    content: 'Heute';
    position: absolute;
    top: -16px;
    left: -12px;
    font-size: 0.6rem;
    color: #333;
    white-space: nowrap;
}

.objmgr-legend-box {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    vertical-align: middle;
    margin-right: 4px;
}

