:root {
    /* ── de_core() Brand Palette ── */
    --primary-color: #3C94F8;
    --primary-bright: #60A8FF;
    --primary-deep: #2878E8;
    --secondary-color: #0F1117;
    --accent-color: #A855F7;
    --accent-teal: #06B6D4;
    --accent-green: #22D3A5;
    --text-color: #5A5C6E;
    --text-color-light: #FFFFFF;
    --text-primary: #0F1117;
    --text-secondary: #5A5C6E;
    --text-muted: #9698AA;
    --background-color: #F7F8FC;
    --card-background: #FFFFFF;
    --sidebar-background: #FFFFFF;
    --sidebar-hover-background: rgba(60,148,248,0.07);
    --sidebar-logo-bg: #1A1C20;
    --border-color: rgba(0,0,0,0.08);
    --input-background: #FFFFFF;
    --input-border: rgba(0,0,0,0.12);
    --positive-color: #22D3A5;
    --negative-color: #F43F5E;
    --neutral-color: #9698AA;
    --shadow-sm:  0 1px 4px rgba(15,17,23,0.06), 0 0 0 1px rgba(0,0,0,0.04);
    --shadow-md:  0 4px 16px rgba(15,17,23,0.10), 0 0 0 1px rgba(0,0,0,0.05);
    --shadow-lg:  0 12px 40px rgba(15,17,23,0.14), 0 0 0 1px rgba(0,0,0,0.06);
    --glow-blue:  0 4px 20px rgba(60,148,248,0.30);
    --glass-blur: 12px;
    --glass-border: 1px solid rgba(255,255,255,0.18);
    --gradient-brand: linear-gradient(135deg, #3C94F8 0%, #A855F7 50%, #06B6D4 100%);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    /* ── Typography ── */
    --font-heading: 'Space Grotesk', 'Arial', sans-serif;
    --font-body:    'Inter', system-ui, sans-serif;
    --font-mono:    'JetBrains Mono', 'Courier New', monospace;
}

body.dark-mode {
    /* Dark Mode */
    --primary-color: #60A8FF; /* brand-blue-bright — Signal Blue hell */
    --secondary-color: #F8FAFC; /* Slate 50 */
    --accent-color: #C47EFF; /* brand-purple-bright — Void Purple hell */
    --text-color: #CBD5E1; /* Slate 300 */
    --text-color-light: #1E293B; /* Slate 800 */
    --background-color: #0F172A; /* Slate 900 */
    --card-background: #1E293B; /* Slate 800 */
    --sidebar-background: rgba(30, 41, 59, 0.7); /* Glassmorphism dark */
    --sidebar-hover-background: rgba(51, 65, 85, 0.8); /* Slate 700 dark */
    --border-color: #334155; /* Slate 700 */
    --input-background: #1E293B;
    --input-border: #475569; /* Slate 600 */
    --positive-color: #22D3A5; /* brand success — Data Teal */
    --negative-color: #F87171; /* Red 400 */
    --neutral-color: #94A3B8; /* Slate 400 */
    --shadow-sm: 0 1px 4px rgba(15,17,23,0.22), 0 0 0 1px rgba(0,0,0,0.12);
    --shadow-md: 0 4px 16px rgba(15,17,23,0.32), 0 0 0 1px rgba(0,0,0,0.16);
    --shadow-lg: 0 12px 40px rgba(15,17,23,0.44), 0 0 0 1px rgba(0,0,0,0.20);
}

/* General Styles */
body {
    font-family: var(--font-body);
    margin: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-size: 16px;
    line-height: 1.6;
    font-weight: 400;
    letter-spacing: 0.01em;
    overflow-x: hidden; /* Prevent horizontal scroll on transitions */
}

.dashboard-container {
    display: flex;
    width: 100%;
}

/* Headings - Montserrat */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--secondary-color);
    transition: color 0.3s ease;
}

/* Sidebar */
.sidebar {
    width: 260px;
    min-width: 260px;
    background-color: var(--sidebar-background);
    backdrop-filter: blur(var(--glass-blur));
    border-right: none;
    box-shadow: var(--shadow-lg);
    padding: 0;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, transform 0.3s ease, width 0.3s ease, border-right 0.3s ease;
    position: sticky;
    top: 0;
    height: 100vh; /* Ensure sidebar takes full height */
    z-index: 1000;
}

.sidebar-header {
    padding: 0;
    text-align: center;
    flex-shrink: 0;
    overflow: hidden;
    background-color: transparent;
    border: none;
    margin-bottom: 11px; /* ~3mm gap above first menu item */
}

.sidebar-header h2 {
    margin: 0;
    font-size: 1.8rem;
    color: #fff;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    position: relative;
    overflow: hidden; /* For gradient hover effect */
}

.sidebar-nav li a .fa-icon {
    margin-right: 1rem;
    font-size: 1.2rem;
    width: 20px; /* Ensure consistent icon alignment */
    text-align: center;
}

.sidebar-nav li a:hover {
    background-color: var(--sidebar-hover-background);
    color: var(--primary-color);
    transform: translateX(5px);
}

.sidebar-nav li a.active {
    background: linear-gradient(90deg, var(--primary-color) 0%, rgba(255,255,255,0) 100%);
    color: var(--text-color-light);
    font-weight: 600;
}

.sidebar-nav li a.active .fa-icon {
    color: var(--text-color-light);
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    min-width: 0;
    padding: 2rem;
    background-color: var(--background-color);
    transition: background-color 0.3s ease;
}

/* Header/Topbar */
.header {
    background-color: var(--card-background);
    padding: 1.5rem 2rem;
    border-bottom: var(--border-color) solid 1px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: sticky;
    top: 0;
    z-index: 999;
}

.header-left {
    display: flex;
    align-items: center;
}

.breadcrumb {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-color);
}

.breadcrumb a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb span {
    margin: 0 0.5rem;
    color: var(--neutral-color);
}

.header-right {
    display: flex;
    align-items: center;
}

.search-bar {
    margin-right: 1.5rem;
    position: relative;
}

.search-bar input {
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    border: 1px solid var(--input-border);
    border-radius: 0.5rem;
    background-color: var(--input-background);
    color: var(--text-color);
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.search-bar input::placeholder {
    color: var(--neutral-color);
}

.search-bar input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.search-bar .fa-search {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--neutral-color);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-color-light);
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.user-avatar:hover {
    transform: scale(1.05);
}

/* KPI Cards */
.kpi-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.kpi-card {
    background-color: var(--card-background);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    background-image: none;
}

.kpi-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.kpi-card-icon {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 2.5rem;
    color: rgba(var(--primary-color-rgb), 0.2); /* Faded primary color */
}

.kpi-card h3 {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.kpi-card-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.kpi-card-change {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 600;
}

.kpi-card-change.positive {
    color: var(--positive-color);
}

.kpi-card-change.negative {
    color: var(--negative-color);
}

.kpi-card-change .fa-icon {
    margin-right: 0.5rem;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--card-background);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: background-color 0.3s ease;
}

.data-table th, .data-table td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background-color: var(--background-color);
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table tbody tr:nth-child(odd) {
    background-color: var(--card-background);
}

.data-table tbody tr:nth-child(even) {
    background-color: rgba(var(--background-color-rgb), 0.5); /* Lighter background for even rows */
}

.data-table tbody tr:hover {
    background-color: var(--sidebar-hover-background);
    cursor: pointer;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-color-light);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background-color: var(--primary-deep, #2878E8); /* brand-blue-deep */
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: var(--neutral-color);
    color: var(--text-color-light);
}

.btn-secondary:hover {
    background-color: #4B5563; /* Slate 700 */
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: rgba(var(--primary-color-rgb), 0.1);
    transform: translateY(-2px);
}

/* Hide all sections by default; JS/CSS shows only the active one */
.content-section {
    display: none;
    padding-top: 1.5rem;
}
.content-section.active {
    display: block;
}

/* Mobile Optimization (basic example) */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        height: 100vh;
        z-index: 1001;
    }

    .sidebar.open {
        transform: translateX(0%);
    }

    .main-content {
        margin-left: 0;
    }

    .header {
        padding: 1rem 1.5rem;
    }

    .header-left {
        width: 100%;
        justify-content: space-between;
    }

    .search-bar {
        margin-right: 1rem;
        flex-grow: 1;
    }

    .search-bar input {
        width: 100%;
    }

    .breadcrumb {
        display: none;
    }

    .user-avatar {
        margin-left: 1rem;
    }

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

    .data-table th, .data-table td {
        padding: 0.75rem 1rem;
    }

    /* Hamburger Menu Icon */
    .hamburger-menu {
        display: block;
        cursor: pointer;
        font-size: 1.5rem;
        color: var(--secondary-color);
        margin-right: 1rem;
    }
}

/* Utility for RGB conversion for rgba() */
:root {
    --primary-color-rgb: 79, 70, 229;
    --background-color-rgb: 241, 245, 249;
}
body.dark-mode {
    --primary-color-rgb: 129, 140, 248;
    --background-color-rgb: 15, 23, 42;
}

.hidden-mobile {
    display: block;
}

@media (max-width: 768px) {
    .hidden-mobile {
        display: none;
    }
}



/* ============================================================
   FEATURE 2: ALERT-CENTER STYLES
   ============================================================ */

/* Alert-Karten */
.alert-card {
    background-color: var(--input-background);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 15px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.3s ease;
    border-left: 5px solid var(--neutral-color);
}

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

.alert-card.alert-severity-critical {
    border-left-color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.04);
}

.alert-card.alert-severity-warning {
    border-left-color: #f39c12;
    background-color: rgba(243, 156, 18, 0.04);
}

.alert-card.alert-severity-info {
    border-left-color: #3498db;
    background-color: rgba(52, 152, 219, 0.04);
}

body.dark-mode .alert-card.alert-severity-critical {
    background-color: rgba(231, 76, 60, 0.1);
}

body.dark-mode .alert-card.alert-severity-warning {
    background-color: rgba(243, 156, 18, 0.1);
}

body.dark-mode .alert-card.alert-severity-info {
    background-color: rgba(52, 152, 219, 0.1);
}

.alert-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.alert-card-body {
    margin-bottom: 12px;
}

.alert-card-body strong {
    font-size: 1.05em;
    color: var(--secondary-color);
}

.alert-card-body p {
    margin: 6px 0;
    font-size: 0.92em;
    color: var(--text-color);
    line-height: 1.5;
}

.alert-meta {
    font-size: 0.8em;
    color: var(--neutral-color);
    font-family: 'Source Code Pro', monospace;
}

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

.alert-timestamp {
    font-size: 0.8em;
    color: var(--neutral-color);
}

/* Severity-Badges */
.alert-severity-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.alert-severity-badge.alert-severity-critical {
    background-color: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
}

.alert-severity-badge.alert-severity-warning {
    background-color: rgba(243, 156, 18, 0.15);
    color: #f39c12;
}

.alert-severity-badge.alert-severity-info {
    background-color: rgba(52, 152, 219, 0.15);
    color: #3498db;
}

/* Alert-Badge in Sidebar */
.alert-badge {
    display: inline-block;
    background: #e74c3c;
    color: #fff;
    border-radius: 50%;
    padding: 2px 7px;
    font-size: 0.75em;
    margin-left: 6px;
    font-weight: 700;
    animation: alertPulse 2s infinite;
}

@keyframes alertPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Bestätigen-Button */
.btn-acknowledge {
    background-color: #2ecc71;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 0.85em;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.btn-acknowledge:hover {
    background-color: #27ae60;
}

/* Alert-Regeln Grid */
.alert-rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
}

.alert-rule-card {
    background-color: var(--input-background);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 18px;
    transition: background-color 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
}

.alert-rule-card.rule-disabled {
    opacity: 0.55;
}

.alert-rule-card h4 {
    margin: 10px 0 6px 0;
    font-size: 1.05em;
    color: var(--secondary-color);
}

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

.rule-category {
    font-size: 0.8em;
    color: var(--neutral-color);
    font-weight: 600;
    text-transform: capitalize;
}

.rule-category i {
    margin-right: 4px;
}

.rule-description {
    font-size: 0.88em;
    color: var(--text-color);
    margin-bottom: 10px;
    line-height: 1.5;
}

.rule-condition {
    margin-bottom: 12px;
}

.rule-condition code {
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85em;
    font-family: 'Source Code Pro', 'Courier New', monospace;
    color: var(--primary-color);
}

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

.btn-toggle {
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 0.85em;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.btn-toggle.rule-enabled {
    background-color: rgba(231, 76, 60, 0.12);
    color: #e74c3c;
}

.btn-toggle.rule-enabled:hover {
    background-color: rgba(231, 76, 60, 0.25);
}

.btn-toggle.rule-disabled {
    background-color: rgba(46, 204, 113, 0.12);
    color: #2ecc71;
}

.btn-toggle.rule-disabled:hover {
    background-color: rgba(46, 204, 113, 0.25);
}

/* Alert-Historie Tabelle */
.alert-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.alert-history-table th {
    text-align: left;
    padding: 10px 12px;
    background-color: var(--sidebar-hover-background);
    font-weight: 600;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.alert-history-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
}

.alert-ack {
    color: var(--positive-color);
    font-weight: 600;
    font-size: 0.85em;
}

.alert-unack {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.85em;
}

/* Alert-Notification (Toast) */
.alert-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 14px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95em;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    opacity: 0;
    transform: translateX(100px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-notification.alert-notif-show {
    opacity: 1;
    transform: translateX(0);
}

.alert-notif-success {
    background-color: #2ecc71;
    color: #fff;
}

.alert-notif-warning {
    background-color: #f39c12;
    color: #fff;
}

.alert-notif-error {
    background-color: #e74c3c;
    color: #fff;
}

/* Responsive Alert-Center */
@media (max-width: 768px) {
    .alert-rules-grid {
        grid-template-columns: 1fr;
    }

    .alert-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .alert-history-table {
        font-size: 0.8em;
    }

    .alert-history-table th,
    .alert-history-table td {
        padding: 8px 6px;
    }

    .alert-notification {
        right: 10px;
        left: 10px;
        top: 10px;
    }
}


/* ============================================
   CHAT SECTION STYLES
   ============================================ */

.chat-container {
    display: flex;
    flex-direction: column;
    height: 70vh;
    max-height: 600px;
    padding: 0 !important;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--background-color);
}

.chat-message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 80%;
    animation: fadeIn 0.3s ease;
}

.chat-message.bot {
    align-self: flex-start;
}

.chat-message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
}

.chat-message.bot .chat-avatar {
    background: var(--gradient-primary);
    color: white;
}

.chat-message.user .chat-avatar {
    background: var(--gradient-success);
    color: white;
}

.chat-bubble {
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    line-height: 1.5;
    font-size: 14px;
}

.chat-message.bot .chat-bubble {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-top-left-radius: 4px;
    color: var(--text-color);
}

.chat-message.user .chat-bubble {
    background: var(--gradient-primary);
    color: white;
    border-top-right-radius: 4px;
}

.chat-input-area {
    display: flex;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background: var(--card-background);
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--input-border);
    border-radius: var(--radius-md);
    background: var(--input-background);
    color: var(--text-color);
    font-size: 14px;
    font-family: var(--font-body);
    transition: border-color var(--transition-fast);
    outline: none;
}

.chat-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.chat-send-btn {
    padding: 12px 20px !important;
    border-radius: var(--radius-md) !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-send-btn i {
    font-size: 16px;
}

/* Chat loading animation */
.chat-typing {
    display: flex;
    gap: 4px;
    padding: 8px 0;
}

.chat-typing span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: typing 1.4s infinite;
}

.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-8px); }
}


/* ============================================================
   FIXES: Class name aliases & missing rules
   ============================================================ */

/* Hide all sections by default; JS shows the active one */
.dashboard-section {
    display: none;
}
.dashboard-section.active {
    display: block;
}

/* nav.navigation → sidebar-nav equivalent */
nav.navigation {
    flex: 1;
    overflow-y: auto;
}
nav.navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
nav.navigation li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
nav.navigation li a:hover {
    background-color: var(--sidebar-hover-background);
    color: var(--primary-color);
    transform: translateX(5px);
}
nav.navigation li a.active {
    background: linear-gradient(90deg, var(--primary-color) 0%, rgba(255,255,255,0) 100%);
    color: var(--text-color-light);
    font-weight: 600;
}

/* .topbar → header equivalent */
.topbar {
    background-color: var(--card-background);
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 999;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* .kpi-grid → kpi-cards grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Chart layout */
.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.chart-card {
    background-color: var(--card-background);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: background-color 0.3s ease;
}
.chart-card h3 {
    margin: 0 0 1rem;
    font-size: 1rem;
    color: var(--secondary-color);
}
.chart-card canvas {
    height: 250px !important;
}

/* Section header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.section-header h2 {
    margin: 0;
}
.header-actions {
    display: flex;
    gap: 0.75rem;
}

/* KPI card sub-elements */
.kpi-icon-wrapper {
    font-size: 2rem;
    color: rgba(var(--primary-color-rgb), 0.25);
    margin-bottom: 0.75rem;
}
.kpi-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.kpi-label {
    font-size: 0.72rem;
    color: var(--secondary-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.65;
}
.kpi-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.1;
}
.kpi-trend {
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.kpi-trend.positive { color: var(--positive-color); }
.kpi-trend.negative { color: var(--negative-color); }

/* Sidebar overlay (mobile) */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1000;
}
.sidebar-overlay.active {
    display: block;
}

/* Hamburger button */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--secondary-color);
    cursor: pointer;
    padding: 0.4rem 0.6rem;
    border-radius: 0.4rem;
    transition: background-color 0.2s ease;
}
.hamburger-btn:hover {
    background-color: var(--sidebar-hover-background);
}
@media (max-width: 768px) {
    .hamburger-btn { display: block; }
}

/* User profile in topbar */
.user-profile {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
}
.user-profile img.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}
.user-name {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
}

/* Icon button (dark mode toggle etc.) */
.icon-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.45rem 0.75rem;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.icon-btn:hover {
    background-color: var(--sidebar-hover-background);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Search input */
.search-input {
    padding: 0.5rem 1rem 0.5rem 2.25rem;
    border: 1px solid var(--input-border);
    border-radius: 0.5rem;
    background-color: var(--input-background);
    color: var(--text-color);
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
    outline: none;
}
.search-input:focus {
    border-color: var(--primary-color);
}
.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--neutral-color);
    font-size: 0.85rem;
}

/* Sidebar footer */
.sidebar-footer {
    flex-shrink: 0;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
}
.sidebar-footer .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.5rem;
    color: var(--neutral-color);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease, background-color 0.2s ease;
}
.sidebar-footer .nav-link:hover {
    color: var(--primary-color);
    background-color: var(--sidebar-hover-background);
}
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1.5rem;
    color: var(--neutral-color);
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Table container */
.table-container {
    width: 100%;
    border-radius: 1rem;
    overflow-x: auto;
}
.table-container table {
    width: 100%;
    table-layout: auto;
    min-width: 0;
}
/* Kompakte Action-Buttons nebeneinander */
.actions-cell {
    white-space: nowrap;
}
.actions-cell .btn {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px 8px;
    font-size: 11px;
}

/* Responsive: kpi-grid and chart-grid on mobile */
@media (max-width: 768px) {
    .kpi-grid { grid-template-columns: 1fr 1fr; }
    .chart-grid { grid-template-columns: 1fr; }
    .topbar { padding: 0.75rem 1rem; }
    .user-name { display: none; }
}

/* ==========================================
   INTEGRATIONS-HUB
   ========================================== */
.integrations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}
.integration-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}
.integration-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
.integration-card.connected {
    border: 1px solid var(--border-color);
}
.integration-card.disconnected {
    opacity: 0.7;
}
.integration-card.testing {
    animation: pulse 1s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}
.integration-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}
.integration-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}
.integration-card h3 {
    margin: 0.5rem 0;
    font-size: 1.1rem;
}
.integration-category {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--bg-secondary, #f1f5f9);
}
.integration-meta {
    margin: 0.75rem 0;
    color: var(--text-muted, #94a3b8);
}
.integration-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}
.integration-detail {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* ==========================================
   ACTIVITY FEED
   ========================================== */
.activity-feed-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.activity-feed-container h3 {
    margin: 0 0 1rem 0;
}
.activity-feed {
    max-height: 300px;
    overflow-y: auto;
}
.activity-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}
.activity-item:hover {
    background: var(--bg-secondary, #f8fafc);
}
.activity-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}
.activity-text {
    flex: 1;
}
.activity-time {
    color: var(--text-muted, #94a3b8);
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* ==========================================
   DETAIL TABLES
   ========================================== */
.detail-content {
    max-height: 400px;
    overflow-y: auto;
}
.detail-section {
    margin-bottom: 1rem;
}
.detail-section h4 {
    margin: 0 0 0.5rem 0;
    text-transform: capitalize;
    color: var(--primary-color);
    font-size: 0.9rem;
}
.detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.detail-table td {
    padding: 0.35rem 0.5rem;
    border-bottom: 1px solid var(--border-color);
}
.detail-table td:first-child {
    font-weight: 500;
    color: var(--text-muted, #64748b);
    width: 40%;
}

/* ==========================================
   STOCK INDICATOR
   ========================================== */
.stock-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.stock-bar {
    height: 6px;
    border-radius: 3px;
    min-width: 40px;
    max-width: 80px;
    display: inline-block;
}

/* ==========================================
   TOAST NOTIFICATIONS
   ========================================== */
@keyframes toast-slide-in {
    from { transform: translateX(110px); opacity: 0; }
    to   { transform: translateX(0);     opacity: 1; }
}
.toast {
    background: #FFFFFF;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 16px rgba(15,17,23,0.10), 0 0 0 1px rgba(0,0,0,0.05);
    animation: toast-slide-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    min-width: 280px;
    max-width: 420px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    color: #5A5C6E;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.toast:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(15,17,23,0.13), 0 0 0 1px rgba(0,0,0,0.06);
}
.toast button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
    color: #9698AA;
    margin-left: auto;
    padding: 0 2px;
    line-height: 1;
    transition: color 0.15s ease;
}
.toast button:hover { color: #5A5C6E; }

/* ── Explicit Feedback Buttons ────────────────────────────── */
.fb-btn {
    background: none;
    border: 1px solid rgba(0,0,0,0.10);
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 14px;
    cursor: pointer;
    line-height: 1.6;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}
.fb-btn:hover { background: rgba(60,148,248,0.08); border-color: rgba(60,148,248,0.3); transform: translateY(-1px); }
.fb-btn:active { transform: translateY(0); }

/* ==========================================
   CHAT
   ========================================== */
.chat-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 250px);
    min-height: 400px;
}
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}
.chat-msg {
    display: flex;
    margin-bottom: 1rem;
}
.chat-msg.user {
    justify-content: flex-end;
}
.chat-msg.bot {
    justify-content: flex-start;
}
.chat-bubble {
    max-width: 70%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    line-height: 1.5;
    font-size: 0.95rem;
}
.chat-msg.user .chat-bubble {
    background: var(--primary-color);
    color: white;
    border-bottom-right-radius: 4px;
}
.chat-msg.bot .chat-bubble {
    background: #ffffff;
    color: #0f172a;
    border-bottom-left-radius: 4px;
    border: 1px solid #e2e8f0;
}
.chat-msg.typing .chat-bubble {
    animation: pulse 1.5s infinite;
}
.chat-form {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}
.chat-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    background: var(--card-bg);
    color: var(--text-primary);
}

/* ==========================================
   SETTINGS
   ========================================== */
.settings-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
}

/* ── KI-Engine ML-Status Cards ── */
.ml-card {
    background: #FFFFFF;
    border: 1px solid rgba(0,0,0,0.07);
    border-radius: 14px;
    padding: 20px 22px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(15,17,23,0.06), 0 0 0 1px rgba(0,0,0,0.04);
}
.ml-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.ml-card-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #0F1117;
    letter-spacing: -0.01em;
}
.ml-card-sub {
    font-size: 12px;
    color: #9698AA;
    margin-top: 3px;
}
.ml-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 99px;
    white-space: nowrap;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}
.ml-badge-gray  { background: rgba(150,152,170,0.12); color: #9698AA; }
.ml-badge-green { background: rgba(34,211,165,0.12);  color: #0EA87C; }
.ml-badge-blue  { background: rgba(60,148,248,0.12);  color: #2878E8; }
.ml-badge-orange{ background: rgba(245,158,11,0.12);  color: #D97706; }
.ml-loading     { font-size: 13px; color: #9698AA; font-style: italic; }
.ml-info-row    { display: flex; align-items: center; gap: 8px; }
.ml-kpi-row {
    display: flex;
    gap: 0;
    border: 1px solid rgba(0,0,0,0.07);
    border-radius: 10px;
    overflow: hidden;
}
.ml-kpi {
    flex: 1;
    padding: 12px 16px;
    border-right: 1px solid rgba(0,0,0,0.07);
    text-align: center;
}
.ml-kpi:last-child { border-right: none; }
.ml-kpi-val   { font-size: 20px; font-weight: 700; color: #0F1117; font-family: 'Space Grotesk', sans-serif; }
.ml-kpi-label { font-size: 11px; color: #9698AA; margin-top: 3px; letter-spacing: 0.03em; }
.settings-group {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}
.settings-group:last-child {
    border-bottom: none;
}
.settings-group h3 {
    margin: 0 0 1rem 0;
    color: var(--primary-color);
}
.form-group {
    margin-bottom: 1rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 500;
    font-size: 0.9rem;
}
.form-input {
    width: 100%;
    max-width: 400px;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    background: var(--card-bg);
    color: var(--text-primary);
}
.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}
.toggle-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

/* ==========================================
   ADDITIONAL UI
   ========================================== */
.summary-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.75rem;
    background: var(--bg-secondary, #f1f5f9);
    border-radius: 20px;
    font-size: 0.85rem;
    margin-right: 0.5rem;
}
.header-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted, #94a3b8);
}
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted, #94a3b8);
    font-size: 1.1rem;
}
.badge-danger {
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 18px;
    min-width: 18px;
    padding: 0 5px;
    border-radius: 9999px;
    margin-left: 0.5rem;
    box-sizing: border-box;
}
.alert-actions {
    margin-top: 0.5rem;
}
.product-name {
    font-weight: 600;
}
.product-sku {
    font-size: 0.8rem;
    color: var(--text-muted, #94a3b8);
}
.customer-name {
    font-weight: 600;
}
.customer-email {
    font-size: 0.8rem;
    color: var(--text-muted, #94a3b8);
}
.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background 0.2s;
}
.btn-icon:hover {
    background: var(--bg-secondary, #f1f5f9);
}
.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 6px;
}
.btn-secondary {
    background: var(--bg-secondary, #e2e8f0);
    color: var(--text-primary);
    border: none;
    cursor: pointer;
}
.btn-secondary:hover {
    background: #cbd5e1;
}
.alerts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
/* ── Alert-Zeitlinie ──────────────────────────────────────── */
.al-timeline { display: flex; flex-direction: column; gap: 2px; }
.al-day-label {
    font-size: 11px; font-weight: 700; color: #475569;
    text-transform: uppercase; letter-spacing: .06em;
    padding: 14px 0 6px;
    border-bottom: 1px solid rgba(99,102,241,.1);
    margin-bottom: 4px;
}
.al-row {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 10px 4px;
    border-bottom: 1px solid rgba(148,163,184,.06);
}
.al-row:last-child { border-bottom: none; }
.al-dot-col { padding-top: 5px; flex-shrink: 0; }
.al-dot {
    display: block; width: 8px; height: 8px;
    border-radius: 50%;
}
.al-body { flex: 1; min-width: 0; }
.al-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.al-type-label {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .05em; color: #64748B;
}
.al-time { font-size: 11px; color: #475569; }
.al-title { font-size: 13px; font-weight: 600; color: var(--text-color); }
.al-msg { font-size: 12px; color: #64748B; margin-top: 2px; line-height: 1.4; }
.al-ack-btn {
    flex-shrink: 0; background: none; border: 1px solid rgba(148,163,184,.2);
    border-radius: 6px; color: #475569; font-size: 11px; padding: 4px 8px;
    cursor: pointer; transition: border-color .15s, color .15s;
}
.al-ack-btn:hover { border-color: #4ADE80; color: #4ADE80; }

.al-chronic-section {
    margin-top: 20px;
    border-top: 1px solid rgba(99,102,241,.1);
    padding-top: 12px;
}
.al-chronic-title {
    font-size: 12px; font-weight: 700; color: #475569;
    margin-bottom: 8px;
}
.al-chronic-hint { font-weight: 400; color: #374151; }
.al-chronic-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(148,163,184,.06);
    font-size: 12px;
}
.al-chronic-name { color: #94A3B8; }
.al-chronic-since { color: #475569; }

/* Legacy — nicht mehr gerendert aber CSS bleibt für Soul-Widget */
.alerts-grid { display: flex; flex-direction: column; gap: 8px; }
.alert-item { padding: 12px; border-radius: 8px; }
.alert-time { font-size: 11px; color: var(--text-muted, #94a3b8); }

/* ==========================================
   DASHBOARD SUBSECTION TILES
   ========================================== */

/* Section subheading (e.g. "Was ist heute wichtig") */
.subsection-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--neutral-color);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 2rem 0 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.subsection-title i {
    font-size: 0.9rem;
}

/* Challenge / action-plan tile: large coloured number */
.tile-number {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
    margin: 0.25rem 0;
}
.tile-number.severity-danger  { color: #EF4444; }
.tile-number.severity-warning { color: #F97316; }
.tile-number.severity-info    { color: var(--primary-color); }

/* Small description text inside the tile */
.tile-desc {
    font-size: 0.88rem;
    color: var(--text-color);
    line-height: 1.55;
    margin-top: 0.35rem;
    opacity: 0.82;
}

/* No left accent borders — tiles use severity class for colouring */

/* Priority badge positioned in top-right corner of action tile */
.tile-priority-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.55rem;
    border-radius: 99px;
}
.tile-priority-badge.danger  { background: rgba(239,68,68,0.12);  color: #EF4444; }
.tile-priority-badge.warning { background: rgba(249,115,22,0.12); color: #F97316; }
.tile-priority-badge.success { background: rgba(34,197,94,0.12);  color: #22C55E; }

/* Action tile title */
.tile-task-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--secondary-color);
    line-height: 1.3;
    margin: 0.5rem 0 0.25rem;
}

/* ==========================================
   INSIGHT PROSE (Proaktive Insights, Meta-BI, Szenario)
   ========================================== */

.scenario-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

#scenario-result {
    width: 100%;
    height: auto;
    overflow: visible;
}

.insight-prose {
    background: var(--card-background);
    border-radius: 1rem;
    padding: 2rem 2.5rem;
    box-shadow: var(--shadow-md);
    line-height: 1.75;
    color: var(--text-color);
    max-width: 100%;
    height: auto;
    overflow: visible;
}

.insight-prose h1,
.insight-prose h2,
.insight-prose h3,
.insight-prose h4 {
    font-family: var(--font-heading);
    color: var(--secondary-color);
    margin: 1.75rem 0 0.6rem;
    line-height: 1.25;
}
.insight-prose h1 { font-size: 1.5rem; }
.insight-prose h2 {
    font-size: 1.15rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border-color);
}
.insight-prose h3 { font-size: 1rem; color: var(--primary-color); }
.insight-prose h4 { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--neutral-color); }

.insight-prose p {
    margin: 0 0 1rem;
}
.insight-prose p:last-child { margin-bottom: 0; }

.insight-prose ul,
.insight-prose ol {
    margin: 0.5rem 0 1rem 1.5rem;
    padding: 0;
}
.insight-prose li {
    margin-bottom: 0.4rem;
}
.insight-prose li::marker {
    color: var(--primary-color);
}

.insight-prose strong {
    font-weight: 700;
    color: var(--secondary-color);
}
.insight-prose em {
    color: var(--neutral-color);
}

.insight-prose blockquote {
    border-left: 3px solid var(--primary-color);
    margin: 1rem 0;
    padding: 0.5rem 1.25rem;
    background: rgba(79, 70, 229, 0.05);
    border-radius: 0 0.5rem 0.5rem 0;
    color: var(--neutral-color);
    font-style: italic;
}

.insight-prose code {
    background: var(--background-color);
    padding: 0.15em 0.4em;
    border-radius: 0.25rem;
    font-size: 0.85em;
    color: var(--accent-color);
}

.insight-prose hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 1.5rem 0;
}

/* Data source badges (Meta-BI) */
.source-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
    font-size: 0.82rem;
    color: var(--neutral-color);
}
.source-badges i { margin-right: 0.25rem; }
.source-badge {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 99px;
    padding: 0.15rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--neutral-color);
    white-space: normal;
    text-align: center;
    line-height: 1.3;
}

/* Alert product list */
.alert-product-list {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.alert-product-list li {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    column-gap: 0.75rem;
    row-gap: 0.2rem;
    align-items: center;
}
.ap-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-color);
    grid-column: 1;
    grid-row: 1;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ap-stock {
    font-size: 0.78rem;
    color: var(--neutral-color);
    grid-column: 2;
    grid-row: 1;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
}
.ap-bar {
    grid-column: 1 / -1;
    grid-row: 2;
    height: 4px;
    background: var(--border-color);
    border-radius: 99px;
    overflow: hidden;
}
.ap-bar-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 0.4s ease;
}
.ap-bar-fill.bar-danger  { background: var(--danger-color, #e53e3e); }
.ap-bar-fill.bar-warning { background: var(--warning-color, #dd6b20); }

/* =====================================================
   ERP & FINANZEN SECTION
   ===================================================== */

/* Supplier cards grid */
.erp-supplier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.erp-supplier-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.1rem 1.2rem;
    box-shadow: var(--card-shadow);
}

.erp-supplier-card .supplier-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
}

.erp-supplier-card .supplier-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
}

.erp-supplier-card .supplier-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.erp-supplier-card .supplier-reliability {
    margin-top: 0.4rem;
}

.reliability-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.reliability-bar {
    height: 6px;
    background: var(--border-color);
    border-radius: 99px;
    overflow: hidden;
}

.reliability-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 0.5s ease;
}

.reliability-fill.bar-ok      { background: #10b981; }
.reliability-fill.bar-warning  { background: #f59e0b; }
.reliability-fill.bar-danger   { background: #ef4444; }

/* ERP source badge */
.source-badge {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 999px;
    background: rgba(99,102,241,0.12);
    color: #6366f1;
    border: 1px solid rgba(99,102,241,0.25);
    white-space: normal;
    text-align: center;
    line-height: 1.3;
}

/* Badge colours (already partially defined, extend) */
.badge-primary { background: rgba(99,102,241,0.15); color: #6366f1; }
.badge-success { background: rgba(16,185,129,0.15); color: #059669; }
.badge-warning { background: rgba(245,158,11,0.15); color: #d97706; }
.badge-danger  { background: rgba(239,68,68,0.15);  color: #dc2626; }
#alert-badge, #soul-alert-badge, #email-unread-badge {
    background: #ef4444 !important;
    color: #ffffff !important;
    align-items: center !important;
    justify-content: center !important;
    height: 18px !important;
    min-width: 18px !important;
    padding: 0 5px !important;
    border-radius: 9999px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
}
.badge-info    { background: rgba(59,130,246,0.15);  color: #2563eb; }
.ap-bar-fill.bar-ok      { background: var(--success-color, #38a169); }

/* Logo styling */
.sidebar-header img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0;
    object-fit: contain;
}


/* =====================================================================
   AI OUTPUT — clar_core() SIGNATURE DESIGN
   Applies to: .ai-output (wrapper class for all AI-generated content)
   Used in: Optimierungsfahrplan, Szenario-Planer, Proaktive Insights,
            KI-Chat, Meta-BI Insights
   ===================================================================== */

:root {
    --ai-cyan: #3C94F8;
    --ai-cyan-light: #60A8FF;
    --ai-cyan-dark: #2878E8;
    --ai-cyan-glow: rgba(60, 148, 248, 0.10);
    --ai-cyan-border: rgba(60, 148, 248, 0.22);
    --ai-cyan-accent: #3C94F8;
    --ai-font-prose: 'IBM Plex Serif', 'Georgia', serif;
    --ai-font-mono: 'JetBrains Mono', 'IBM Plex Mono', 'Fira Code', monospace;
    --ai-font-data: 'IBM Plex Mono', 'JetBrains Mono', monospace;
}

body.dark-mode {
    --ai-cyan: #60A8FF;
    --ai-cyan-light: #93C5FD;
    --ai-cyan-dark: #3C94F8;
    --ai-cyan-glow: rgba(60, 148, 248, 0.10);
    --ai-cyan-border: rgba(60, 148, 248, 0.20);
    --ai-cyan-accent: #60A8FF;
}

/* --- Base AI Output Container --- */
.ai-output {
    font-family:    var(--ai-font-prose);
    font-size:      0.95rem;
    line-height:    1.8;
    color:          #0f172a;
    position:       relative;
    letter-spacing: 0.005em;
    background:     #ffffff;
    border-radius:  8px;
    border:         1px solid #e2e8f0;
    padding:        1.25rem 1.5rem;
}

/* --- Terminal Prompt Indicator --- */
.ai-prompt-indicator {
    display: inline-block;
    width: auto;
    margin-right: 0.5rem;
    font-family: var(--ai-font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--ai-cyan);
    opacity: 0.9;
    vertical-align: baseline;
    letter-spacing: 0;
}
.ai-prompt-indicator::before {
    content: "de_core()";
    display: inline-block;
    padding: 0.1rem 0.45rem;
    background: var(--ai-cyan-glow);
    border: 1px solid var(--ai-cyan-border);
    border-radius: 4px;
    line-height: 1.4;
}
.ai-prompt-indicator::after {
    content: " >";
    color: var(--ai-cyan-accent);
    font-weight: 600;
}

/* --- insight-prose with AI styling --- */
.insight-prose.ai-output,
.ai-output .insight-prose {
    background:    #ffffff;
    color:         #0f172a;
    border-radius: 8px;
    border:        1px solid #e2e8f0;
    padding:       1.5rem 2rem;
}

/* --- AI Output Headings --- */
.ai-output h1,
.ai-output h2,
.ai-output h3,
.ai-output h4,
.ai-output h5 {
    font-family: var(--ai-font-mono);
    color: var(--ai-cyan-dark);
    letter-spacing: -0.01em;
    position: relative;
}
body.dark-mode .ai-output h1,
body.dark-mode .ai-output h2,
body.dark-mode .ai-output h3,
body.dark-mode .ai-output h4 {
    color: var(--ai-cyan-light);
}
.ai-output h1 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--ai-cyan-border);
}
.ai-output h2 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 1.5rem 0 0.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--ai-cyan-border);
}
.ai-output h3 {
    font-size: 1rem;
    font-weight: 500;
    margin: 1.25rem 0 0.4rem;
    color: var(--ai-cyan);
}
.ai-output h4 {
    font-size: 0.88rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ai-cyan-dark);
    opacity: 0.85;
}

/* --- AI Output Paragraphs --- */
.ai-output p {
    margin: 0 0 0.9rem;
    font-family: var(--ai-font-prose);
    line-height: 1.8;
}
.ai-output p:last-child { margin-bottom: 0; }

/* --- AI Output Lists --- */
.ai-output ul,
.ai-output ol {
    margin: 0.5rem 0 1rem 1.25rem;
    padding: 0;
}
.ai-output li {
    margin-bottom: 0.4rem;
    line-height: 1.7;
    font-family: var(--ai-font-prose);
}
.ai-output li::marker {
    color: var(--ai-cyan);
    font-weight: 600;
}
.ai-output ul li::marker {
    content: "\25B8\00a0";
    font-size: 0.85em;
}

/* --- AI Output Strong/Em --- */
.ai-output strong {
    font-weight: 600;
    color: var(--secondary-color);
}
.ai-output em {
    font-style: italic;
    color: var(--ai-cyan-dark);
}
body.dark-mode .ai-output em {
    color: var(--ai-cyan-light);
}

/* --- AI Output Blockquote --- */
.ai-output blockquote {
    border-left: 3px solid var(--ai-cyan);
    margin: 1rem 0;
    padding: 0.6rem 1.25rem;
    background: var(--ai-cyan-glow);
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: italic;
    color: var(--text-color);
}

/* --- AI Output Code --- */
.ai-output code {
    font-family: var(--ai-font-mono);
    background: var(--ai-cyan-glow);
    border: 1px solid var(--ai-cyan-border);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 0.82em;
    color: var(--ai-cyan-dark);
}
body.dark-mode .ai-output code {
    color: var(--ai-cyan-light);
}

.ai-output pre {
    background: #0d1117;
    border: 1px solid var(--ai-cyan-border);
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    overflow-x: auto;
    margin: 1rem 0;
}
.ai-output pre code {
    background: transparent;
    border: none;
    padding: 0;
    color: #e6edf3;
    font-size: 0.82rem;
    line-height: 1.6;
}

/* --- AI Output Tables --- */
.ai-output table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.88rem;
    border: 1px solid var(--ai-cyan-border);
    border-radius: 0.5rem;
    overflow: hidden;
}
.ai-output th {
    background: var(--ai-cyan-glow);
    color: var(--ai-cyan-dark);
    font-family: var(--ai-font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.65rem 0.9rem;
    text-align: left;
    border-bottom: 2px solid var(--ai-cyan-border);
}
body.dark-mode .ai-output th {
    color: var(--ai-cyan-light);
}
.ai-output td {
    padding: 0.55rem 0.9rem;
    border-bottom: 1px solid var(--border-color);
    font-family: var(--ai-font-prose);
}
.ai-output tr:last-child td {
    border-bottom: none;
}
.ai-output tbody tr:hover {
    background: var(--ai-cyan-glow);
}

/* --- AI Output HR --- */
.ai-output hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--ai-cyan-border), var(--ai-cyan), var(--ai-cyan-border), transparent);
    margin: 1.5rem 0;
}

/* --- Data/Numbers in AI output --- */
.ai-output .ai-data,
.ai-output [data-type="number"],
.ai-output .metric-value {
    font-family: var(--ai-font-data);
    font-weight: 500;
    color: var(--ai-cyan-dark);
    letter-spacing: 0.02em;
}
body.dark-mode .ai-output .ai-data,
body.dark-mode .ai-output [data-type="number"],
body.dark-mode .ai-output .metric-value {
    color: var(--ai-cyan-light);
}

/* --- Custom Icons replacing emojis --- */
.ai-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.3em;
    height: 1.3em;
    margin-right: 0.3rem;
    vertical-align: -0.15em;
    flex-shrink: 0;
}
.ai-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: var(--ai-cyan);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* --- Chat AI Bot Bubble Styling --- */
.chat-msg.bot .chat-bubble.ai-output {
    font-family:           var(--ai-font-prose);
    background:            #ffffff !important;
    border:                1px solid #e2e8f0 !important;
    border-left:           none !important;
    border-bottom-left-radius: 4px;
    color:                 #0f172a !important;
    font-size:             0.93rem;
    line-height:           1.7;
}

/* --- Loading State with AI Branding --- */
.ai-loading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem;
    color: var(--ai-cyan);
    font-family: var(--ai-font-mono);
    font-size: 0.85rem;
}
.ai-loading::before {
    content: "";
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid var(--ai-cyan-border);
    border-top-color: var(--ai-cyan);
    border-radius: 50%;
    animation: ai-spin 0.8s linear infinite;
}
@keyframes ai-spin {
    to { transform: rotate(360deg); }
}

/* --- Section-level AI container (for Insights, Scenario, etc.) --- */
.ai-output-section {
    position: relative;
    margin-top: 0.5rem;
}
.ai-output-section::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--ai-cyan), var(--ai-cyan-border), transparent);
    border-radius: 2px;
}

/* --- Animated subtle glow on fresh AI output --- */
@keyframes ai-fade-in {
    0% {
        opacity: 0;
        transform: translateY(6px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}
.ai-output {
    animation: ai-fade-in 0.4s ease-out;
}

/* --- Override insight-prose when inside ai-output --- */
.ai-output.insight-prose h1,
.ai-output.insight-prose h2,
.ai-output.insight-prose h3,
.ai-output.insight-prose h4 {
    font-family: var(--ai-font-mono);
}
.ai-output.insight-prose h1 {
    color: var(--ai-cyan-dark);
    border-bottom-color: var(--ai-cyan-border);
}
.ai-output.insight-prose h2 {
    color: var(--ai-cyan-dark);
    border-bottom-color: var(--ai-cyan-border);
}
.ai-output.insight-prose h3 {
    color: var(--ai-cyan);
}
.ai-output.insight-prose li::marker {
    color: var(--ai-cyan);
}
.ai-output.insight-prose strong {
    color: var(--secondary-color);
}
.ai-output.insight-prose blockquote {
    border-left-color: var(--ai-cyan);
    background: var(--ai-cyan-glow);
}
.ai-output.insight-prose code {
    background: var(--ai-cyan-glow);
    border: 1px solid var(--ai-cyan-border);
    color: var(--ai-cyan-dark);
}
body.dark-mode .ai-output.insight-prose h1,
body.dark-mode .ai-output.insight-prose h2 {
    color: var(--ai-cyan-light);
}
body.dark-mode .ai-output.insight-prose h3 {
    color: var(--ai-cyan);
}
body.dark-mode .ai-output.insight-prose code {
    color: var(--ai-cyan-light);
}

/* ========================================== */
/* MODAL STYLES */
/* ========================================== */
.btn-action {
    background-color: var(--primary-color);
    color: var(--text-color-light);
    border: none;
    padding: 6px 10px;
    margin-left: 4px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background-color 0.2s ease, transform 0.1s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.btn-action:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}
.btn-action i { font-size: 0.9rem; }
.btn-details { background-color: var(--neutral-color); }
.btn-details:hover { background-color: #7a8ba1; }
.btn-ai { background-color: var(--ai-cyan, #00e5ff); color: #0a0a1a; font-weight: 600; }
.btn-ai:hover { background-color: #33ecff; }
.actions-cell { white-space: nowrap; }

.spinner {
    border: 4px solid rgba(0, 229, 255, 0.2);
    border-top: 4px solid var(--ai-cyan, #00e5ff);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}
@keyframes slideInTop {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ========================================== */
/* MODAL STYLES */
/* ========================================== */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 10000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.7); /* Black w/ opacity */
    backdrop-filter: blur(5px); /* Subtle blur for background */
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background-color: var(--card-background);
    margin: 8% auto; /* 8% from the top and centered */
    padding: 30px;
    border: 1px solid var(--ai-cyan-border);
    border-radius: 12px;
    width: 90%; /* Could be more or less, depending on screen size */
    max-width: 800px;
    box-shadow: var(--shadow-lg);
    position: relative;
    animation: slideInTop 0.3s ease-out;
}

.modal-body {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 10px; /* For scrollbar */
}

.modal-body table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.modal-body th, .modal-body td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.modal-body th {
    color: var(--ai-cyan);
    font-family: var(--ai-font-heading);
    font-weight: 500;
}

.modal-body tr:last-child td {
    border-bottom: none;
}

.close-button {
    color: var(--text-color);
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-button:hover,
.close-button:focus {
    color: var(--negative-color);
    text-decoration: none;
}

/* ========================================== */
/* SLIDE PANEL STYLES (AI Analysis) */
/* ========================================== */
.slide-panel-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    animation: fadeIn 0.3s ease-out;
}

.slide-panel {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 450px; /* Adjust width as needed */
    max-width: 90vw;
    height: 100%;
    background-color: var(--card-background);
    border-left: 2px solid var(--ai-cyan-border);
    z-index: 9999;
    overflow-y: auto;
    padding: 25px;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
    transform: translateX(100%);
    animation: slideInRight 0.3s forwards;
    display: flex;
    flex-direction: column;
}

.slide-panel.open {
    transform: translateX(0%);
}

.slide-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.slide-panel-header h2 {
    color: var(--ai-cyan);
    margin: 0;
}

.close-slide-panel {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 32px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-slide-panel:hover {
    color: var(--negative-color);
}

.slide-panel-body {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 10px; /* For scrollbar */
}

.slide-panel-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    text-align: right;
    flex-shrink: 0;
}

/* ========================================== */
/* ACTION BUTTONS IN TABLES */
/* ========================================== */
.actions-cell {
    white-space: normal;
    text-align: center;
    line-height: 1.3;
}

.btn-action {
    background-color: var(--primary-color);
    color: var(--text-color-light);
    border: none;
    padding: 8px 12px;
    margin-left: 5px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s ease, transform 0.1s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-action:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

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

.btn-details {
    background-color: var(--neutral-color);
}

.btn-details:hover {
    background-color: #7a8ba1; /* Darker neutral */
}

.btn-ai {
    background-color: var(--ai-cyan);
    color: var(--secondary-color);
}

.btn-ai:hover {
    background-color: var(--ai-cyan-light);
}

/* Spinner for loading states */
.spinner {
    border: 4px solid rgba(0, 229, 255, 0.2); /* Light cyan */
    border-top: 4px solid var(--ai-cyan); /* Cyan */
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

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

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

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

/* ==================== MODAL SYSTEM ==================== */
.cc-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}

.cc-modal {
    background: var(--card-bg, var(--card-background, #1a1a2e));
    border: 1px solid var(--ai-cyan-border, var(--border-color, #0d7377));
    border-radius: 12px;
    width: 100%;
    max-width: 750px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideInTop 0.25s ease-out;
}

.cc-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--ai-cyan-border, var(--border-color, #0d7377));
    flex-shrink: 0;
}

.cc-modal-header h3 {
    margin: 0;
    font-family: var(--ai-font-heading, var(--font-heading, 'JetBrains Mono'));
    color: var(--ai-cyan, var(--primary-color, #00e5ff));
    font-size: 1.15rem;
    word-break: break-word;
}

.cc-modal-close {
    background: none;
    border: none;
    color: var(--text-color-light, #fff);
    font-size: 28px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    flex-shrink: 0;
    margin-left: 16px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.cc-modal-close:hover {
    opacity: 1;
}

.cc-modal-body {
    padding: 20px 24px 24px;
    overflow-y: auto;
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.cc-modal-body .ai-output {
    line-height: 1.7;
    font-family: var(--ai-font-body, var(--font-body, 'IBM Plex Serif'));
    color: var(--text-color-light, var(--text-color, #e0e0e0));
}

.cc-modal-body .detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.cc-modal-body .data-table {
    width: 100%;
    table-layout: auto;
}

@media (max-width: 600px) {
    .cc-modal {
        max-width: 100%;
        max-height: 90vh;
        border-radius: 8px;
    }
    .cc-modal-header {
        padding: 16px;
    }
    .cc-modal-body {
        padding: 16px;
    }
}


/* ===== MODAL DETAIL + KI-ANALYSE TABLES ===== */

/* Scrollable wrapper for wide tables */
.cc-modal-body .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0.75rem 0;
    border-radius: 6px;
}

/* Key-value info table (Details popup) */
.cc-modal-body .modal-info-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    table-layout: fixed;
}
.cc-modal-body .modal-info-table td {
    padding: 8px 10px;
    font-size: 0.875rem;
    vertical-align: top;
    border-bottom: 1px solid var(--border-color, #E2E8F0);
    line-height: 1.45;
    word-break: break-word;
    color: var(--text-color, #334155);
}
.cc-modal-body .modal-info-table td:first-child {
    width: 40%;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--neutral-color, #64748B);
    padding-right: 8px;
}
.cc-modal-body .modal-info-table tr:last-child td { border-bottom: none; }
.cc-modal-body .modal-info-table tr:hover td { background: rgba(0,0,0,0.03); }
body.dark-mode .cc-modal-body .modal-info-table td { color: #CBD5E1; }
body.dark-mode .cc-modal-body .modal-info-table td:first-child { color: #64748B; }
body.dark-mode .cc-modal-body .modal-info-table tr:hover td { background: rgba(255,255,255,0.04); }

/* History / orders / sales table */
.cc-modal-body .modal-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    min-width: 320px;
}
.cc-modal-body .modal-history-table th {
    font-size: 0.74rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 6px 8px;
    border-bottom: 2px solid var(--border-color, #E2E8F0);
    white-space: nowrap;
    color: var(--neutral-color, #64748B);
    background: rgba(0,0,0,0.03);
    text-align: left;
}
.cc-modal-body .modal-history-table td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--border-color, #E2E8F0);
    color: var(--text-color, #334155);
    white-space: nowrap;
}
.cc-modal-body .modal-history-table tr:last-child td { border-bottom: none; }
.cc-modal-body .modal-history-table tbody tr:hover td { background: rgba(0,0,0,0.03); }
body.dark-mode .cc-modal-body .modal-history-table th { background: rgba(255,255,255,0.04); color: #94A3B8; border-color: #334155; }
body.dark-mode .cc-modal-body .modal-history-table td { color: #CBD5E1; border-color: #334155; }
body.dark-mode .cc-modal-body .modal-history-table tbody tr:hover td { background: rgba(255,255,255,0.04); }

/* Section divider inside modal */
.cc-modal-body .modal-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--primary-color, #4F46E5);
    margin: 1.25rem 0 0.5rem;
    padding-bottom: 5px;
    border-bottom: 2px solid var(--primary-color, #4F46E5);
    opacity: 0.8;
}

/* FIX: AI output inside modal — use text-color not text-color-light */
.cc-modal-body .ai-output {
    color: var(--text-color, #334155) !important;
    line-height: 1.7;
}
body.dark-mode .cc-modal-body .ai-output { color: #CBD5E1 !important; }

.cc-modal-body .ai-output p,
.cc-modal-body .ai-output li,
.cc-modal-body .ai-output td,
.cc-modal-body .ai-output th {
    color: var(--text-color, #334155);
}
body.dark-mode .cc-modal-body .ai-output p,
body.dark-mode .cc-modal-body .ai-output li,
body.dark-mode .cc-modal-body .ai-output td,
body.dark-mode .cc-modal-body .ai-output th {
    color: #CBD5E1;
}
.cc-modal-body .ai-output h1,
.cc-modal-body .ai-output h2,
.cc-modal-body .ai-output h3,
.cc-modal-body .ai-output h4 {
    color: var(--primary-color, #4F46E5);
}
body.dark-mode .cc-modal-body .ai-output h1,
body.dark-mode .cc-modal-body .ai-output h2,
body.dark-mode .cc-modal-body .ai-output h3,
body.dark-mode .cc-modal-body .ai-output h4 {
    color: #818CF8;
}

/* AI tables inside modal — scrollable */
.cc-modal-body .ai-output table {
    display: block;
    overflow-x: auto;
    max-width: 100%;
    white-space: nowrap;
}
.cc-modal-body .ai-output table th,
.cc-modal-body .ai-output table td {
    white-space: normal;
    min-width: 80px;
}
.cc-modal-body .ai-output tbody tr.ai-empty-row { display: none; }

/* ===== INTERACTIVE DASHBOARD CARDS ===== */
.dash-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}
.dash-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.10);
}
.dash-card.completed {
  opacity: 0.5;
  transform: scale(0.97);
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.dash-card.completed::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  color: #22c55e;
  font-weight: bold;
}
.dash-card.fade-out {
  opacity: 0;
  max-height: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
  transition: opacity 0.5s ease, max-height 0.5s ease, padding 0.5s ease, margin 0.5s ease;
}

/* Urgency indicator */
.urgency-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.urgency-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.urgency-dot.urgent { background: #ef4444; }
.urgency-dot.this-week { background: #f97316; }
.urgency-dot.soon { background: #eab308; }
.urgency-dot.info { background: #22c55e; }
.urgency-label.urgent { color: #ef4444; }
.urgency-label.this-week { color: #f97316; }
.urgency-label.soon { color: #eab308; }
.urgency-label.info { color: #22c55e; }

/* Priority badge */
.priority-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.priority-badge.high { background: #fef2f2; color: #dc2626; }
.priority-badge.medium { background: #fff7ed; color: #ea580c; }
.priority-badge.recommendation { background: #eff6ff; color: #2563eb; }
.priority-badge.optional { background: #f3f4f6; color: #6b7280; }

/* Card title & desc */
.dash-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.3;
}
.dash-card-desc {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.5;
}
.dash-card-impact {
  font-size: 0.85rem;
  color: #059669;
  font-weight: 600;
  padding: 6px 0;
}

/* Card buttons */
.dash-card-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
}
.btn-card {
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
  border: 2px solid;
}
.btn-card.btn-details {
  background: transparent;
  border-color: #3b82f6;
  color: #3b82f6;
}
.btn-card.btn-details:hover {
  background: #3b82f6;
  color: #fff;
}
.btn-card.btn-done {
  background: transparent;
  border-color: #22c55e;
  color: #22c55e;
}
.btn-card.btn-done:hover {
  background: #22c55e;
  color: #fff;
}

/* ===== DETAIL MODAL ===== */
.detail-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.detail-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.detail-modal {
  background: #fff;
  border-radius: 16px;
  width: 90%;
  max-width: 560px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}
.detail-modal-overlay.active .detail-modal {
  transform: translateY(0);
}
.detail-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.detail-modal-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}
.detail-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #94a3b8;
  line-height: 1;
}
.detail-modal-close:hover { color: #1e293b; }
.detail-modal-body {
  padding: 24px;
}
.detail-modal-body h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #334155;
  margin: 16px 0 8px;
}
.detail-modal-body h4:first-child { margin-top: 0; }
.detail-modal-body p, .detail-modal-body li {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.6;
}
.detail-modal-body ol {
  padding-left: 20px;
}
.detail-modal-body ol li {
  margin-bottom: 6px;
}
.detail-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.btn-modal-navigate {
  padding: 10px 20px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
}
.btn-modal-navigate:hover { background: #2563eb; }
.btn-modal-close {
  padding: 10px 20px;
  background: #f1f5f9;
  color: #475569;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
}
.btn-modal-close:hover { background: #e2e8f0; }

/* ==========================================
   INTERACTIVE TILES - CHALLENGES & ACTION PLAN
   ========================================== */
.interactive-tile {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.4s;
}
.interactive-tile:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
.interactive-tile.tile-done {
    opacity: 0.4;
    pointer-events: none;
}

.tile-urgency-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}
.urgency-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}
.urgency-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-color);
    opacity: 0.75;
}

.tile-priority-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.tile-priority-badge.danger  { background: #fee2e2; color: #b91c1c; }
.tile-priority-badge.warning { background: #ffedd5; color: #c2410c; }
.tile-priority-badge.info    { background: #dbeafe; color: #1d4ed8; }
.tile-priority-badge.neutral { background: #f1f5f9; color: #64748b; }
body.dark-mode .tile-priority-badge.danger  { background: #450a0a; color: #fca5a5; }
body.dark-mode .tile-priority-badge.warning { background: #431407; color: #fdba74; }
body.dark-mode .tile-priority-badge.info    { background: #1e3a5f; color: #93c5fd; }
body.dark-mode .tile-priority-badge.neutral { background: #1e293b; color: #94a3b8; }

.tile-meta {
    font-size: 0.8rem;
    margin-top: 5px;
    color: var(--text-color);
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 4px;
}
.tile-meta-icon { font-style: normal; }

.tile-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.tile-btn {
    flex: 1;
    min-width: 100px;
    padding: 7px 10px;
    border: none;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
}
.tile-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.tile-btn-detail {
    background: #e0e7ff;
    color: #3730a3;
}
.tile-btn-detail:hover { background: #c7d2fe; }
.tile-btn-done {
    background: #dcfce7;
    color: #166534;
}
.tile-btn-done:hover { background: #bbf7d0; }
body.dark-mode .tile-btn-detail { background: #1e3a5f; color: #93c5fd; }
body.dark-mode .tile-btn-detail:hover { background: #1e40af; }
body.dark-mode .tile-btn-done { background: #14532d; color: #86efac; }
body.dark-mode .tile-btn-done:hover { background: #166534; }

/* ==========================================
   DETAIL MODAL
   ========================================== */
.detail-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.detail-modal-overlay.active {
    display: flex;
}
.detail-modal-overlay .modal-content {
    background: var(--card-background);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    max-width: 560px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    animation: modalSlideIn 0.22s ease;
}
@keyframes modalSlideIn {
    from { transform: translateY(24px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border-color);
}
.modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 0;
}
.modal-close-btn {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--text-color);
    padding: 4px 8px;
    border-radius: 6px;
    line-height: 1;
    transition: background 0.15s;
}
.modal-close-btn:hover { background: var(--border-color); }
.modal-body {
    padding: 20px 24px;
}
.modal-description {
    font-size: 0.95rem;
    color: var(--text-color);
    line-height: 1.6;
    margin: 0 0 16px;
}
.modal-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.modal-steps li {
    background: var(--background-color);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.9rem;
    color: var(--text-color);
    border-left: 3px solid var(--primary-color);
}
.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 14px 24px 20px;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
}

/* Detail Modal Footer */
.detail-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* ==========================================
   GLOBAL SEARCH DROPDOWN
   ========================================== */
.search-bar {
    position: relative;
}
.search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 380px;
    max-width: 520px;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    z-index: 9999;
    overflow: hidden;
    animation: searchDropFade 0.15s ease;
}
@keyframes searchDropFade {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.search-group-header {
    padding: 8px 14px 4px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--neutral-color);
    background: var(--background-color);
    border-top: 1px solid var(--border-color);
}
.search-group-header:first-child {
    border-top: none;
}
.search-item {
    padding: 9px 14px;
    cursor: pointer;
    transition: background 0.12s;
    border-bottom: 1px solid var(--border-color);
}
.search-item:last-of-type {
    border-bottom: none;
}
.search-item:hover {
    background: var(--sidebar-hover-background);
}
.search-item-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
}
.search-item-subtitle {
    font-size: 0.78rem;
    color: var(--neutral-color);
    margin-top: 2px;
}
.search-mark {
    background: transparent;
    color: var(--primary-color);
    font-weight: 700;
}
.search-more {
    padding: 7px 14px;
    font-size: 0.8rem;
    color: var(--primary-color);
    cursor: pointer;
    text-align: right;
    border-top: 1px solid var(--border-color);
    font-weight: 600;
}
.search-more:hover {
    background: var(--sidebar-hover-background);
}
.search-empty {
    padding: 22px 16px;
    text-align: center;
    color: var(--neutral-color);
    font-size: 0.88rem;
    line-height: 1.8;
}

/* ==========================================
   KANBAN BOARD
   ========================================== */
.kanban-toolbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.kanban-info {
    font-size: 0.85rem;
    color: var(--neutral-color);
}
.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    align-items: start;
}
@media (max-width: 900px) {
    .kanban-board { grid-template-columns: 1fr; }
}
.kanban-column {
    background:    var(--background-color);
    border-radius: 12px;
    border:        1px solid var(--border-color);
    min-height:    200px;
    max-height:    calc(100vh - 200px);
    overflow-y:    auto;
    display:       flex;
    flex-direction: column;
    transition:    border-color 0.2s, box-shadow 0.2s;
}
.kanban-column.kanban-drop-target {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-color)33;
}
.kanban-column-header {
    display:       flex;
    justify-content: space-between;
    align-items:   center;
    padding:       12px 16px;
    font-weight:   700;
    font-size:     0.9rem;
    border-radius: 11px 11px 0 0;
    border-bottom: 1px solid var(--border-color);
    position:      sticky;
    top:           0;
    z-index:       10;
}
.kanban-col-neu            { background: rgba(99,102,241,0.1);  color: var(--primary-color); }
.kanban-col-in_bearbeitung { background: rgba(249,115,22,0.1);  color: #f97316; }
.kanban-col-erledigt       { background: rgba(34,197,94,0.1);   color: #22c55e; }
.kanban-count {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1px 9px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-color);
}
.kanban-cards {
    padding:        10px;
    display:        flex;
    flex-direction: column;
    gap:            8px;
    min-height:     80px;
    flex:           1;
}
.kanban-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    cursor: grab;
    transition: box-shadow 0.15s, transform 0.15s;
    user-select: none;
}
.kanban-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.kanban-card.dragging {
    opacity: 0.5;
    cursor: grabbing;
    transform: rotate(1deg);
}
.kanban-card-prio {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid;
    margin-bottom: 7px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.kanban-card-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 5px;
    line-height: 1.35;
}
.kanban-card-desc {
    font-size: 0.78rem;
    color: var(--neutral-color);
    line-height: 1.45;
    margin-bottom: 6px;
}
.kanban-card-kpi, .kanban-card-meta {
    font-size: 0.74rem;
    color: var(--neutral-color);
    margin-top: 3px;
}
.kanban-card-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.kanban-btn {
    font-size: 0.74rem;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid;
    background: transparent;
    font-weight: 600;
    transition: background 0.15s;
}
.kanban-btn-start {
    color: var(--primary-color);
    border-color: var(--primary-color);
}
.kanban-btn-start:hover { background: var(--primary-color)1a; }
.kanban-btn-done {
    color: #22c55e;
    border-color: #22c55e44;
}
.kanban-btn-done:hover { background: #22c55e1a; }
.kanban-btn-delete {
    color: #ef4444;
    border-color: #ef444444;
}
.kanban-btn-delete:hover { background: #ef44441a; }

/* ─── Leads ─────────────────────────────────────── */
#section-leads .section-header { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; margin-bottom:24px; }
#leads-table-wrap table tbody tr:hover { background: rgba(99,102,241,.05); }
#leads-table-wrap table tbody tr:hover td { color: #F8FAFC; }
#lead-modal { display:none; }

/* ─── Shop Soul ──────────────────────────────────── */
.soul-widget {
    border-top: 1px solid rgba(99,102,241,.15);
    padding: 10px 14px 8px;
    margin: 4px 0 0;
    cursor: pointer;
    transition: background .2s;
}
.soul-widget:hover { background: rgba(99,102,241,.08); }
.soul-widget-header { display:flex; align-items:center; gap:7px; margin-bottom:3px; }
.soul-pulse {
    font-size: 20px;
    color: #6366f1;
    animation: soul-beat 2.8s ease-in-out infinite;
    transition: color .6s;
    line-height: 1;
}
@keyframes soul-beat {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: .2; transform: scale(.65); }
}
.soul-widget-title { font-size:15px; font-weight:600; color:#6366f1; letter-spacing:.3px; flex:1; }
.soul-widget-body { font-size:13px; color:#64748B; line-height:1.3; padding-left:27px; }
.soul-loading { color:#334155; font-style:italic; }

/* Toast — Brand-konform (de_core() CI) */
.soul-toast {
    background: #FFFFFF;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    padding: 12px 16px;
    color: #5A5C6E;
    font-size: 13px;
    font-family: 'Inter', system-ui, sans-serif;
    line-height: 1.5;
    min-width: 280px;
    max-width: 400px;
    pointer-events: all;
    box-shadow: 0 4px 16px rgba(15,17,23,0.10), 0 0 0 1px rgba(0,0,0,0.05);
    animation: toast-slide-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.soul-toast:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(15,17,23,0.13), 0 0 0 1px rgba(0,0,0,0.06);
}
.soul-toast b {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #3C94F8;
    margin-bottom: 3px;
}

/* Soul input */
.soul-input {
    width:100%; background:#0F172A; color:#CBD5E1;
    border:1px solid rgba(99,102,241,.3); border-radius:6px;
    padding:6px 10px; font-size:13px; margin-top:4px;
}
.soul-input:focus { outline:none; border-color:#6366f1; }

/* Diary */
.diary-entry {
    background:#1E293B; border-left:3px solid #6366f1;
    border-radius:0 8px 8px 0; padding:12px 16px; margin-bottom:12px;
}
.diary-entry-date { font-size:11px; color:#475569; margin-bottom:4px; }
.diary-entry-text { color:#CBD5E1; font-size:14px; line-height:1.5; }
.diary-entry-tags { margin-top:6px; display:flex; gap:6px; flex-wrap:wrap; }
.diary-tag { background:rgba(99,102,241,.2); color:#A78BFA; padding:2px 8px; border-radius:999px; font-size:11px; }
.diary-entry-score { font-size:11px; color:#64748B; margin-top:4px; }

/* Calendar */
.calendar-grid {
    display:grid; grid-template-columns:repeat(7,1fr); gap:2px; margin-bottom:16px;
}
.cal-day-header { text-align:center; font-size:11px; color:#475569; padding:4px; }
.cal-day {
    min-height:60px; background:#1E293B; border-radius:4px; padding:4px;
    position:relative; transition:background .15s;
}
.cal-day:hover { background:#263448; }
.cal-day.today { border:1px solid #6366f1; }
.cal-day.other-month { opacity:.35; }
.cal-day-num { font-size:11px; color:#64748B; }
.cal-event {
    font-size:10px; border-radius:3px; padding:1px 4px; margin-top:2px;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis; cursor:pointer;
}
.cal-event.red    { background:rgba(239,68,68,.25);  color:#fca5a5; }
.cal-event.orange { background:rgba(249,115,22,.25); color:#fdba74; }
.cal-event.blue   { background:rgba(99,102,241,.25); color:#a5b4fc; }
.cal-event.green  { background:rgba(34,197,94,.25);  color:#86efac; }
.cal-event.gray   { background:rgba(100,116,139,.2); color:#94A3B8; }
.upcoming-event {
    display:flex; align-items:flex-start; gap:10px;
    background:#1E293B; border-radius:8px; padding:10px 14px; margin-bottom:8px;
}
.upcoming-dot { width:10px; height:10px; border-radius:50%; margin-top:4px; flex-shrink:0; }
.upcoming-date { font-size:11px; color:#475569; }
.upcoming-title { color:#CBD5E1; font-size:13px; }

/* Soul patterns */
.pattern-card {
    background:#1E293B; border-radius:8px; padding:12px 16px; margin-bottom:10px;
    display:flex; align-items:flex-start; gap:12px;
}
.pattern-conf { font-size:20px; font-weight:700; color:#6366f1; min-width:48px; text-align:center; }
.pattern-body { flex:1; }
.pattern-desc { color:#CBD5E1; font-size:13px; line-height:1.4; }
.pattern-meta { font-size:11px; color:#475569; margin-top:4px; }
.pattern-actions { display:flex; gap:6px; margin-top:8px; }

/* Alert item */
.soul-alert-item {
    display:flex; align-items:flex-start; gap:10px;
    background:#1E293B; border-radius:8px; padding:10px 14px; margin-bottom:8px;
    border-left:3px solid #64748B;
}
.soul-alert-item.critical { border-left-color:#ef4444; }
.soul-alert-item.high     { border-left-color:#f97316; }
.soul-alert-item.medium   { border-left-color:#eab308; }
.soul-alert-item.low      { border-left-color:#22c55e; }
.soul-alert-msg { flex:1; color:#CBD5E1; font-size:13px; }
.soul-alert-ts  { font-size:11px; color:#475569; }

/* ─── Tab System ─────────────────────────────────── */
.tab-bar {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid rgba(99,102,241,.2);
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.tab-btn {
    background: none;
    border: none;
    color: #64748B;
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color .15s, border-color .15s;
    white-space: nowrap;
}
.tab-btn:hover { color: #CBD5E1; }
.tab-btn.active { color: #A78BFA; border-bottom-color: #6366f1; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ===== UX STREAMLINE 2026-04-19 ===== */

/* Compact KPI Bar */
.kpi-compact-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.kpi-compact-card {
    flex: 1;
    min-width: 110px;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .15s;
}
.kpi-compact-card:hover { box-shadow: var(--shadow-md); }
.kpi-compact-label {
    font-size: 11px;
    color: var(--neutral-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.kpi-compact-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color);
}
.kpi-compact-period {
    font-size:  10px;
    color:      var(--neutral-color);
    opacity:    0.75;
    margin-top: 1px;
}

/* 2-Column today grid */
.dashboard-today-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 8px;
    align-items: start;
}
@media (max-width: 900px) {
    .dashboard-today-grid { grid-template-columns: 1fr; }
}
.today-col { min-width: 0; }

/* Mini calendar link */
.mini-cal-link {
    font-size: 12px;
    color: var(--primary-color);
    text-decoration: none;
    opacity: 0.7;
    transition: opacity .15s;
}
.mini-cal-link:hover { opacity: 1; }

/* Mini calendar list */
.mini-calendar-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.mini-cal-event {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 10px;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 13px;
}
.mini-cal-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 4px;
    flex-shrink: 0;
}
.mini-cal-date {
    font-size: 11px;
    color: var(--neutral-color);
}
.mini-cal-title {
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mini-cal-soul-badge {
    font-size: 10px;
    color: #818CF8;
    background: rgba(99,102,241,0.1);
    padding: 1px 6px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Challenges all-done state */
.challenges-all-done {
    text-align: center;
    padding: 24px 16px;
    border: 1px dashed var(--positive-color);
    border-radius: 12px;
    background: rgba(34,197,94,0.05);
}

/* Chart section collapsible */
.chart-section {
    margin-top: 12px;
    border-top: 1px solid var(--border-color);
}
.chart-section summary {
    cursor: pointer;
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 600;
    padding: 10px 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
}
.chart-section summary::-webkit-details-marker { display: none; }
.chart-section summary::before {
    content: '▶';
    font-size: 10px;
    transition: transform 0.2s;
    display: inline-block;
}
.chart-section[open] summary::before { transform: rotate(90deg); }

/* Calendar day interactivity */
.cal-day {
    cursor: pointer;
    position: relative;
}
.cal-day:hover { background: rgba(99,102,241,0.07); border-radius: 6px; }
.cal-day-add-hint {
    display: none;
    position: absolute;
    bottom: 2px;
    right: 3px;
    font-size: 9px;
    color: var(--primary-color);
    opacity: 0.7;
}
.cal-day:hover .cal-day-add-hint { display: block; }

/* Calendar add popup */
.cal-add-popup {
    position: fixed;
    background: var(--card-background);
    border: 1px solid rgba(99,102,241,0.4);
    border-radius: 12px;
    padding: 18px;
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    min-width: 280px;
    max-width: 340px;
}
.cal-add-popup h4 {
    margin: 0 0 12px;
    color: var(--text-color);
    font-size: 14px;
}
.cal-add-popup-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

/* Unified chat mode toggle */
.chat-mode-bar {
    display: inline-flex;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
}
.chat-mode-btn {
    background: none;
    border: none;
    padding: 7px 16px;
    font-size: 13px;
    cursor: pointer;
    color: var(--neutral-color);
    transition: background .15s, color .15s;
}
.chat-mode-btn.active {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}
.chat-mode-hint {
    font-size: 12px;
    color: var(--neutral-color);
    margin: 0 0 10px;
}

/* ── Wochenpuls (kein eigenes CSS nötig — nutzt .ai-output) ── */

/* ── Szenario-Presets ─────────────────────────────────────── */
.scenario-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}
.scenario-preset-btn {
    background: rgba(99,102,241,.08);
    border: 1px solid rgba(99,102,241,.25);
    border-radius: 20px;
    color: #A5B4FC;
    font-size: 12px;
    padding: 6px 14px;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    white-space: nowrap;
}
.scenario-preset-btn:hover {
    background: rgba(99,102,241,.2);
    border-color: rgba(99,102,241,.5);
    color: white;
}

/* ============================================================
   GLASKUGEL — System Radar + Living Causal Graph
   ============================================================ */

.glaskugel-container {
    background: linear-gradient(135deg,
        rgba(99,102,241,.07) 0%,
        rgba(168,85,247,.04) 50%,
        rgba(15,23,42,0)    100%);
    border:        1px solid rgba(99,102,241,.18);
    border-radius: 16px;
    padding:       20px 20px 16px;
    margin-bottom: 20px;
    position:      relative;
    overflow:      hidden;
}

.glaskugel-container::before {
    content:        '';
    position:       absolute;
    top: -50%; left: -15%;
    width: 55%; height: 60%;
    background: radial-gradient(ellipse,
        rgba(99,102,241,.07) 0%, transparent 70%);
    pointer-events: none;
}

.glaskugel-header {
    display:         flex;
    align-items:     center;
    gap:             8px;
    margin-bottom:   16px;
    flex-wrap:       wrap;
}

.glaskugel-title {
    font-size:      13px;
    font-weight:    700;
    color:          #A78BFA;
    text-transform: uppercase;
    letter-spacing: .08em;
    flex:           1;
}

.glaskugel-update-ts {
    font-size: 11px;
    color:     #475569;
}

.glaskugel-grid {
    display:               grid;
    grid-template-columns: 1fr 1fr;
    gap:                   20px;
    align-items:           start;
}

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

/* ── Left column ── */
.glaskugel-left {
    display:         flex;
    flex-direction:  column;
    align-items:     center;
    gap:             14px;
}

.gk-score-block {
    text-align: center;
    padding:    4px 0;
}

.gk-score-num {
    font-size:   52px;
    font-weight: 800;
    font-family: 'Montserrat', sans-serif;
    line-height: 1;
    transition:  color .6s ease;
}

.gk-score-label {
    font-size:   16px;
    font-weight: 600;
    color:       #CBD5E1;
    margin-top:  6px;
    letter-spacing: .03em;
}

.gk-score-30d {
    font-size:   15px;
    margin-top:  5px;
    letter-spacing: 0.01em;
}

.gk-score-30d-label {
    font-size:  13px;
    color:      #64748B;
    font-weight: 400;
}

.gk-score-sublabel {
    font-size:  13px;
    color:      #64748B;
    margin-top: 4px;
}

.gk-radar-wrap {
    width:    100%;
    max-width: 420px;
}

.gk-leverage {
    width: 100%;
}

.gk-leverage-card {
    background:    #1E1B4B;
    border:        2px solid #6366f1;
    border-radius: 8px;
    padding:       12px 16px;
}

.gk-leverage-badge {
    font-size:      13px;
    text-transform: uppercase;
    letter-spacing: .07em;
    color:          #C7D2FE;
    margin-bottom:  5px;
    font-weight:    700;
}

.gk-leverage-name {
    font-size:   18px;
    font-weight: 800;
    color:       #FFFFFF;
    margin-bottom: 5px;
}

.gk-leverage-detail {
    font-size: 14px;
    color:     #C7D2FE;
}

.gk-leverage-detail strong {
    color: #FFFFFF;
    font-weight: 700;
}

/* ── Right column ── */
.glaskugel-right {
    display:        flex;
    flex-direction: column;
    align-items:    center;
    gap:            12px;
}

.gk-canvas-wrap {
    width:     100%;
    display:   flex;
    justify-content: center;
    overflow:  visible;
}

.gk-canvas {
    max-width: 100%;
    display:   block;
}

/* ── Causal paths list ── */
.gk-paths {
    width: 100%;
}

.gk-paths-title {
    font-size:      12px;
    text-transform: uppercase;
    letter-spacing: .07em;
    color:          #94A3B8;
    margin-bottom:  8px;
    font-weight:    600;
}

.gk-path {
    display:       flex;
    align-items:   flex-start;
    gap:           8px;
    padding:       8px 12px;
    border-radius: 6px;
    margin-bottom: 6px;
    font-size:     13px;
    line-height:   1.5;
}

.gk-path-risk {
    background:   rgba(127,29,29,0.55);
    border-left:  3px solid #f87171;
}

.gk-path-opp {
    background:   rgba(20,83,45,0.55);
    border-left:  3px solid #4ade80;
}

.gk-path-icon {
    flex-shrink: 0;
    margin-top:  2px;
}

.gk-path-risk .gk-path-icon  { color: #fca5a5; }
.gk-path-opp  .gk-path-icon  { color: #86efac; }

.gk-path-msg { color: #F1F5F9; }

.gk-path-risk .gk-path-msg { color: #FEF2F2; }
.gk-path-opp  .gk-path-msg { color: #F0FDF4; }

.gk-no-paths {
    font-size:  13px;
    color:      #94A3B8;
    text-align: center;
    padding:    12px 0;
}

.gk-loading {
    font-size:  13px;
    color:      #64748B;
    padding:    8px 0;
    text-align: center;
}

/* ── Glaskugel Score-Sublabel & Graph Legend ── */
.gk-score-sublabel {
    font-size:      13px;
    color:          #64748B;
    margin-top:     4px;
    line-height:    1.5;
    max-width:      300px;
    text-align:     center;
}

.gk-graph-legend {
    width:          100%;
    background:     rgba(30,41,59,0.9);
    border:         1px solid rgba(99,102,241,.25);
    border-radius:  8px;
    padding:        12px 14px;
}

.gk-legend-title {
    font-size:      11px;
    text-transform: uppercase;
    letter-spacing: .07em;
    color:          #94A3B8;
    margin-bottom:  10px;
    font-weight:    600;
}

.gk-legend-row {
    display:        flex;
    align-items:    flex-start;
    gap:            10px;
    margin-bottom:  8px;
    font-size:      12px;
    color:          #CBD5E1;
    line-height:    1.5;
}

.gk-legend-dot {
    flex-shrink:    0;
    width:          14px;
    height:         14px;
    border-radius:  50%;
    margin-top:     2px;
}

.gk-legend-node {
    background:     rgba(99,102,241,.4);
    border:         2px solid #818CF8;
}

.gk-legend-arrow {
    flex-shrink:    0;
    font-size:      16px;
    font-weight:    900;
    line-height:    1;
    width:          16px;
    text-align:     center;
}

.gk-legend-green { color: #4ade80; }
.gk-legend-red   { color: #f87171; }
.gk-legend-gray  { color: #64748B; }

.gk-section-title {
    font-size:      20px;
    font-weight:    800;
    color:          #000000;
    margin-bottom:  10px;
    text-align:     center;
    width:          100%;
}

.gk-section-subtitle {
    font-size:  12px;
    font-weight: 400;
    color:      #64748B;
    margin-top: 3px;
}

/* ── Glaskugel Calibration Badge ── */
.gk-calibration-badge {
    font-size:     11px;
    padding:       3px 10px;
    border-radius: 20px;
    font-weight:   600;
    white-space:   nowrap;
}
.gk-cal-live {
    background: #166534;
    border:     1px solid #22c55e;
    color:      #ffffff;
}
.gk-cal-hypothesis {
    background: #78350f;
    border:     1px solid #f59e0b;
    color:      #ffffff;
}

/* ── K4: Kruse-Intelligenz-Index ─────────────────────────────── */
.kruse-index-card {
    background:    linear-gradient(135deg, rgba(139,92,246,.08), rgba(6,182,212,.05));
    border:        1px solid rgba(139,92,246,.22);
    border-radius: 12px;
    padding:       18px 20px 14px;
    margin-bottom: 14px;
}
.kruse-index-header {
    display:         flex;
    justify-content: space-between;
    align-items:     center;
    margin-bottom:   16px;
}
.kruse-index-title {
    font-size:    12px;
    font-weight:  700;
    color:        #c4b5fd;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.kruse-gesamt-badge {
    font-size:     20px;
    font-weight:   800;
    color:         #fff;
    letter-spacing: -.02em;
    min-width:     36px;
    text-align:    right;
}
.kruse-index-content { display: flex; flex-direction: column; gap: 6px; }
.kruse-dim-row {
    display:     flex;
    align-items: center;
    gap:         10px;
}
.kruse-dim-label {
    font-size:   11px;
    font-weight: 600;
    color:       #94a3b8;
    width:       88px;
    flex-shrink: 0;
}
.kruse-bar-wrap {
    flex:          1;
    background:    rgba(255,255,255,0.05);
    border-radius: 4px;
    height:        6px;
    overflow:      hidden;
}
.kruse-bar {
    height:        100%;
    width:         0%;
    border-radius: 4px;
    transition:    width 1.1s cubic-bezier(.22,1,.36,1);
}
.kruse-bar-erregung  { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.kruse-bar-vernetzung { background: linear-gradient(90deg, #06b6d4, #67e8f9); }
.kruse-bar-bewertung  { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.kruse-pct {
    font-size:   11px;
    font-weight: 700;
    color:       #cbd5e1;
    width:       32px;
    text-align:  right;
    flex-shrink: 0;
    font-family: 'JetBrains Mono', monospace;
}
.kruse-note {
    font-size:   10px;
    color:       #475569;
    padding-left: 98px;
    margin-bottom: 2px;
    min-height:  14px;
}
.kruse-sub-details {
    padding-left: 98px;
    margin-bottom: 6px;
    display:       flex;
    flex-direction: column;
    gap:           3px;
}
.kruse-sub-item {
    display:     flex;
    align-items: center;
    gap:         6px;
    height:      16px;
}
.kruse-sub-label {
    font-size:       9px;
    color:           #334155;
    width:           72px;
    flex-shrink:     0;
    text-transform:  uppercase;
    letter-spacing:  0.04em;
}
.kruse-sub-bar-wrap {
    flex:         1;
    background:   rgba(255,255,255,0.04);
    border-radius: 2px;
    height:       4px;
    overflow:     hidden;
}
.kruse-sub-bar {
    height:       100%;
    border-radius: 2px;
    width:        0;
    transition:   width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.kruse-sub-bar-resonanz { background: linear-gradient(90deg, #0891b2, #06b6d4); }
.kruse-sub-bar-struktur { background: linear-gradient(90deg, #06b6d4, #67e8f9); opacity: .75; }
.kruse-sub-bar-limbisch { background: linear-gradient(90deg, #7c3aed, #8b5cf6); }
.kruse-sub-bar-weltbild { background: linear-gradient(90deg, #8b5cf6, #a78bfa); opacity: .75; }
.kruse-sub-val {
    font-size:   9px;
    color:       #475569;
    white-space: nowrap;
    min-width:   52px;
    text-align:  right;
}
.kruse-index-footer {
    font-size:   10px;
    color:       #334155;
    margin-top:  12px;
    text-align:  right;
    font-style:  italic;
}

/* ── K3: Meta-Konfidenz Badge ────────────────────────────────── */
.gk-meta-konfidenz-badge {
    font-size:     11px;
    padding:       3px 10px;
    border-radius: 20px;
    font-weight:   600;
    white-space:   nowrap;
    background:    rgba(124, 58, 237, 0.12);
    border:        1px solid rgba(139, 92, 246, 0.35);
    color:         #c4b5fd;
    cursor:        default;
}

/* ── Chat AI bubble: force black text on white regardless of dark mode ── */
.chat-msg.bot .chat-bubble.ai-output,
.chat-msg.bot .chat-bubble.ai-output *,
body.dark-mode .chat-msg.bot .chat-bubble.ai-output,
body.dark-mode .chat-msg.bot .chat-bubble.ai-output h1,
body.dark-mode .chat-msg.bot .chat-bubble.ai-output h2,
body.dark-mode .chat-msg.bot .chat-bubble.ai-output h3,
body.dark-mode .chat-msg.bot .chat-bubble.ai-output h4 {
    color: #0f172a !important;
}

/* Kategorie-Donut: quadratischer Wrapper übernimmt Größe */
#categoryChart { height: auto !important; }

/* ================================================================
   AGENT INBOX
   ================================================================ */
.agent-inbox-card {
    background: linear-gradient(135deg, rgba(99,102,241,.10), rgba(168,85,247,.06));
    border: 1px solid rgba(99,102,241,.28);
    border-radius: 14px;
    margin-bottom: 20px;
    overflow: hidden;
    transition: box-shadow .2s;
}
.agent-inbox-card:focus-within {
    box-shadow: 0 0 0 2px rgba(99,102,241,.35);
}
.agent-inbox-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(99,102,241,.15);
    background: rgba(99,102,241,.07);
    user-select: none;
}
.agent-inbox-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #A5B4FC;
    letter-spacing: .3px;
    display: flex;
    align-items: center;
    gap: 7px;
}
.agent-pulse {
    color: #818CF8;
    animation: agent-beat 2s infinite;
    font-size: 10px;
}
@keyframes agent-beat {
    0%,100% { opacity: 1; }
    50%      { opacity: .3; }
}
.agent-inbox-badge {
    margin-left: 4px;
    font-size: 11px;
    color: #64748B;
    flex: 1;
}
.agent-inbox-toggle-btn {
    background: none;
    border: none;
    color: #64748B;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: color .15s;
    line-height: 1;
}
.agent-inbox-toggle-btn:hover { color: #A5B4FC; }

.agent-inbox-body {
    display: flex;
    flex-direction: column;
    max-height: 625px;
    transition: max-height .3s ease, padding .3s ease;
}
.agent-inbox-body.collapsed {
    max-height: 0;
    overflow: hidden;
}
.agent-inbox-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px 6px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 60px;
    max-height: 445px;
    scroll-behavior: smooth;
}
.agent-inbox-empty {
    color: #475569;
    font-size: 13px;
    text-align: center;
    padding: 16px 0;
}
/* Individual messages */
.inbox-msg {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    animation: inbox-in .25s ease;
}
@keyframes inbox-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.inbox-msg.agent { flex-direction: row; }
.inbox-msg.user  { flex-direction: row-reverse; }

.inbox-msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    margin-top: 2px;
}
.inbox-msg.agent .inbox-msg-avatar {
    background: linear-gradient(135deg,#3C94F8,#60A8FF);
    color: #fff;
}
.inbox-msg.user .inbox-msg-avatar {
    background: rgba(71,85,105,.4);
    color: #94a3b8;
}
.inbox-msg-bubble {
    max-width: 78%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.55;
    word-break: break-word;
}
.inbox-msg.agent .inbox-msg-bubble {
    background: rgba(60,148,248,.12);
    border: 1px solid rgba(60,148,248,.22);
    color: #CBD5E1;
    border-top-left-radius: 3px;
}
.inbox-msg.user .inbox-msg-bubble {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    border-top-right-radius: 3px;
    text-align: left;
}
/* type badges */
.inbox-msg-type {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    margin-bottom: 4px;
    letter-spacing: .4px;
    text-transform: uppercase;
}
.inbox-type-briefing { background: rgba(34,197,94,.15); color: #4ade80; }
.inbox-type-alert    { background: rgba(239,68,68,.15);  color: #f87171; }
.inbox-type-reminder { background: rgba(249,115,22,.15); color: #fb923c; }
.inbox-msg-ts {
    font-size: 10px;
    color: #475569;
    margin-top: 3px;
    display: block;
}
/* Tool actions pill */
.inbox-tool-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 99px;
    font-size: 11px;
    color: #0f172a;
    padding: 2px 8px;
    margin-top: 5px;
}
/* Thinking indicator */
.inbox-thinking {
    display: flex;
    gap: 4px;
    padding: 6px 0;
}
.inbox-thinking span {
    width: 6px;
    height: 6px;
    background: #3C94F8;
    border-radius: 50%;
    animation: inbox-dot .9s infinite;
}
.inbox-thinking span:nth-child(2) { animation-delay: .2s; }
.inbox-thinking span:nth-child(3) { animation-delay: .4s; }
@keyframes inbox-dot {
    0%,80%,100% { transform: scale(.6); opacity: .4; }
    40%          { transform: scale(1);   opacity: 1;   }
}
/* Form */
.agent-inbox-form {
    display: flex;
    gap: 8px;
    padding: 10px 14px 12px;
    border-top: 1px solid rgba(99,102,241,.12);
    background: rgba(15,23,42,.3);
}
.agent-inbox-input {
    flex: 1;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #0f172a;
    font-size: 13px;
    padding: 7px 12px;
    outline: none;
    transition: border-color .15s;
    font-family: 'Source Sans Pro', sans-serif;
}
.agent-inbox-input:focus { border-color: #6366f1; box-shadow: 0 0 0 2px rgba(99,102,241,.15); }
.agent-inbox-input::placeholder { color: #94a3b8; }
.agent-inbox-send-btn {
    flex-shrink: 0;
    padding: 7px 14px;
}

/* ═══════════════════════════════════════════════════════════════
   EMAIL MODULE
   ═══════════════════════════════════════════════════════════════ */

.email-layout {
    display: grid;
    grid-template-columns: 190px 1fr 2fr;
    gap: 0;
    height: calc(100vh - 180px);
    min-height: 500px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 12px;
    overflow: hidden;
}

/* Folder sidebar */
.email-folders {
    background: #1e293b;
    border-right: 1px solid #334155;
    padding: 12px 8px;
    overflow-y: auto;
}
.email-folder-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border-radius: 6px;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, color .15s;
    margin-bottom: 2px;
    justify-content: space-between;
}
.email-folder-item:hover  { background: #334155; color: #f1f5f9; }
.email-folder-item.active { background: #6366f1; color: #ffffff; font-weight: 700; }
.email-folder-badge {
    background: #ef4444;
    color: #fff;
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

/* Email list panel */
.email-list-panel {
    display: flex;
    flex-direction: column;
    border-right: 1px solid #334155;
    overflow: hidden;
    background: #0f172a;
}
.email-list-toolbar {
    display: flex;
    gap: 6px;
    padding: 10px;
    border-bottom: 1px solid #334155;
    background: #1e293b;
    flex-shrink: 0;
}
.email-list { flex: 1; overflow-y: auto; background: #0f172a; }
.email-list-item {
    padding: 11px 14px;
    border-bottom: 1px solid #1e293b;
    cursor: pointer;
    transition: background .12s;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 2px 8px;
}
.email-list-item:hover            { background: #1e293b; }
.email-list-item.email-item-selected { background: #312e81; }
.email-item-unread .email-item-from    { color: #ffffff; font-weight: 700; }
.email-item-unread .email-item-subject { color: #e2e8f0; font-weight: 600; }
.email-item-from {
    font-size: 13px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    grid-column: 1;
    grid-row: 1;
}
.email-item-subject {
    font-size: 13px;
    color: #cbd5e1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    grid-column: 1;
    grid-row: 2;
}
.email-item-date {
    font-size: 11px;
    color: #64748b;
    text-align: right;
    white-space: nowrap;
    grid-column: 2;
    grid-row: 1;
}
.email-list-empty, .email-list-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #475569;
    font-size: 13px;
    gap: 10px;
    padding: 40px;
}

/* Preview pane */
.email-preview-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #0f172a;
}
.email-preview-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #475569;
    font-size: 13px;
    gap: 12px;
}
#email-preview-content {
    display: none;
    flex-direction: column;
    height: 100%;
}
.email-preview-header {
    padding: 16px 20px;
    border-bottom: 1px solid #334155;
    background: #1e293b;
    flex-shrink: 0;
}
.email-preview-subject {
    font-size: 17px;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 10px;
    line-height: 1.3;
}
.email-preview-meta {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #94a3b8;
    gap: 8px;
    margin-bottom: 4px;
}
.email-preview-meta strong { color: #cbd5e1; }
.email-preview-actions {
    display: flex;
    gap: 6px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.email-preview-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    color: #e2e8f0;
    font-size: 14px;
    line-height: 1.7;
    background: #0f172a;
}
.email-preview-body pre {
    white-space: pre-wrap;
    font-family: inherit;
    margin: 0;
    color: #e2e8f0;
}
.email-preview-body iframe { display: block; width: 100%; border: none; border-radius: 6px; }

/* ── Compose modal ───────────────────────────────────────────── */
.email-compose-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.75);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.email-compose-inner {
    background: #1e293b;
    border: 1px solid #6366f1;
    border-radius: 12px;
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
.email-compose-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #334155;
    font-weight: 700;
    font-size: 15px;
    color: #f1f5f9;
    background: #0f172a;
    flex-shrink: 0;
}
.email-compose-field {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    border-bottom: 1px solid #334155;
    flex-shrink: 0;
    background: #1e293b;
}
.email-compose-field label {
    width: 60px;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}
.email-compose-field .form-input {
    flex: 1;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 7px 10px;
    font-size: 14px;
    color: #f1f5f9 !important;
}
.email-compose-field .form-input:focus {
    outline: none;
    border-color: #6366f1;
    background: #0f172a;
    color: #f1f5f9 !important;
}
.email-compose-field .form-input::placeholder { color: #475569; }
.email-compose-body {
    flex: 1;
    padding: 14px 18px;
    background: #0f172a;
    border: none;
    border-top: 1px solid #334155;
    resize: none;
    color: #f1f5f9;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.7;
    min-height: 220px;
}
.email-compose-body:focus { outline: none; }
.email-compose-body::placeholder { color: #475569; }
.email-compose-footer {
    display: flex;
    gap: 8px;
    padding: 12px 18px;
    border-top: 1px solid #334155;
    background: #0f172a;
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 900px) {
    .email-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        height: auto;
    }
    .email-folders { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; border-right: none; border-bottom: 1px solid rgba(99,102,241,.12); }
    .email-folder-item { flex: 0 0 auto; }
    .email-preview-panel { min-height: 300px; }
}

/* ═══════════════════════════════════════════════════════════════
   COMMAND CENTER
   ═══════════════════════════════════════════════════════════════ */

.cc-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.cc-kpi-card {
    background: linear-gradient(135deg, rgba(30,41,59,0.95), rgba(15,23,42,0.95));
    border: 1px solid rgba(99,102,241,0.2);
    border-radius: 14px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}
.cc-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.cc-kpi-green  { border-left: 3px solid #22c55e; }
.cc-kpi-yellow { border-left: 3px solid #f59e0b; }
.cc-kpi-red    { border-left: 3px solid #ef4444; }

.cc-kpi-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.cc-kpi-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(99,102,241,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #818cf8;
}

.cc-kpi-green-dot  { width: 10px; height: 10px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 6px #22c55e88; }
.cc-kpi-yellow-dot { width: 10px; height: 10px; border-radius: 50%; background: #f59e0b; box-shadow: 0 0 6px #f59e0b88; }
.cc-kpi-red-dot    { width: 10px; height: 10px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 6px #ef444488; }

.cc-kpi-label {
    font-size: 12px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.cc-kpi-value {
    font-size: 28px;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 8px;
    font-family: 'JetBrains Mono', monospace;
}

.cc-kpi-trend {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}

.cc-trend-up   { color: #22c55e; }
.cc-trend-down { color: #ef4444; }
.cc-trend-neutral { color: #94a3b8; }

.cc-kpi-period {
    font-size: 11px;
    color: #475569;
    margin-bottom: 8px;
}

.cc-kpi-detail {
    font-size: 11px;
    color: #64748b;
    border-top: 1px solid rgba(99,102,241,0.12);
    padding-top: 8px;
    margin-top: 4px;
    line-height: 1.4;
}

.cc-edit-hint {
    background: rgba(99,102,241,0.06);
    border: 1px solid rgba(99,102,241,0.15);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 12px;
    color: #64748b;
    margin-top: 16px;
}
.cc-edit-hint code {
    background: rgba(99,102,241,0.15);
    color: #a5b4fc;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 11px;
}

/* ═══════════════════════════════════════════════════════════════
   SALES & CRM HUB
   ═══════════════════════════════════════════════════════════════ */

.sales-pipeline {
    background: rgba(15,23,42,0.6);
    border: 1px solid rgba(99,102,241,0.15);
    border-radius: 12px;
    padding: 20px;
}

.sales-pipeline-stages {
    display: flex;
    align-items: stretch;
    gap: 0;
    overflow-x: auto;
}

.sales-stage-block {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 120px;
}

.sales-stage-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
}

.sales-stage-name {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
}

.sales-stage-count {
    font-size: 22px;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 2px;
}

.sales-stage-value {
    font-size: 12px;
    color: #64748b;
}

.sales-stage-bar {
    width: 100%;
    margin-bottom: 8px;
    transition: height 0.3s;
}

.sales-stage-arrow {
    color: #334155;
    font-size: 18px;
    padding: 0 4px;
    flex-shrink: 0;
}

.sales-stage-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.sales-stage-select {
    background: #1E293B;
    color: #CBD5E1;
    border: 1px solid #334155;
    border-radius: 4px;
    padding: 3px 6px;
    font-size: 12px;
    cursor: pointer;
}
.sales-stage-select:focus { outline: none; border-color: #6366f1; }

@media (max-width: 768px) {
    .cc-kpi-grid { grid-template-columns: 1fr 1fr; }
    .sales-pipeline-stages { flex-direction: column; }
    .sales-stage-arrow { transform: rotate(90deg); }
}

/* ===== FINANZEN ===== */
.fin-kpi-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}
.fin-kpi-card {
    background: rgba(99,102,241,.08);
    border: 1px solid rgba(99,102,241,.2);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}
.fin-kpi-label {
    font-size: 11px;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 6px;
}
.fin-kpi-value {
    font-size: 20px;
    font-weight: 700;
    color: #E2E8F0;
}
.fin-breakeven-bar {
    background: rgba(15,23,42,.4);
    border: 1px solid rgba(99,102,241,.2);
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 24px;
}
.fin-breakeven-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13px;
    color: #94A3B8;
}
.fin-status-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}
.fin-badge-green  { background: rgba(52,211,153,.15); color: #34D399; border: 1px solid rgba(52,211,153,.3); }
.fin-badge-yellow { background: rgba(251,191, 36,.15); color: #FBBF24; border: 1px solid rgba(251,191,36,.3); }
.fin-badge-red    { background: rgba(248,113,113,.15); color: #F87171; border: 1px solid rgba(248,113,113,.3); }
.fin-progress-track {
    position: relative;
    height: 10px;
    background: rgba(255,255,255,.06);
    border-radius: 5px;
    overflow: visible;
    margin-bottom: 6px;
}
.fin-progress-fill {
    height: 100%;
    background: linear-gradient(90deg,#6366f1,#818CF8);
    border-radius: 5px;
    transition: width .6s ease;
}
.fin-breakeven-marker {
    position: absolute;
    top: -4px;
    width: 3px;
    height: 18px;
    background: #FBBF24;
    border-radius: 2px;
    transform: translateX(-50%);
    z-index: 2;
}
.fin-progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #64748B;
    margin-top: 4px;
}
.fin-charts-row {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
.fin-chart-card {
    background: rgba(15,23,42,.5);
    border: 1px solid rgba(99,102,241,.15);
    border-radius: 10px;
    padding: 20px;
}
.fin-cat-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.fin-cat-name {
    font-size: 12px;
    color: #94A3B8;
    width: 120px;
    flex-shrink: 0;
}
.fin-cat-bar-wrap {
    flex: 1;
    height: 8px;
    background: rgba(255,255,255,.05);
    border-radius: 4px;
    overflow: hidden;
}
.fin-cat-bar {
    height: 100%;
    background: linear-gradient(90deg,#818CF8,#6366f1);
    border-radius: 4px;
    transition: width .5s ease;
}
.fin-cat-pct {
    font-size: 12px;
    color: #94A3B8;
    width: 36px;
    text-align: right;
    flex-shrink: 0;
}

/* ===== MARKETING ===== */
.mkt-calendar-grid {
    background: rgba(15,23,42,.4);
    border: 1px solid rgba(99,102,241,.15);
    border-radius: 10px;
    overflow: hidden;
}
.mkt-cal-header, .mkt-cal-row {
    display: grid;
    grid-template-columns: 100px 1fr 120px 80px 100px;
    gap: 12px;
    padding: 10px 16px;
    align-items: center;
    font-size: 13px;
}
.mkt-cal-header {
    background: rgba(99,102,241,.15);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #64748B;
    font-weight: 600;
}
.mkt-cal-row {
    border-top: 1px solid rgba(255,255,255,.04);
    color: #CBD5E1;
}
.mkt-cal-row:hover { background: rgba(99,102,241,.06); }
.mkt-cal-date   { color: #6366f1; font-family: 'JetBrains Mono', monospace; font-size: 12px; }
.mkt-cal-title  { font-weight: 500; }
.mkt-cal-channel { color: #94A3B8; font-size: 12px; }
.mkt-type-pill {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}
.mkt-status-pill {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 10px;
}
.mkt-status-planned  { background: rgba(99,102,241,.15); color: #818CF8; }
.mkt-status-progress { background: rgba(251,191,36,.15);  color: #FBBF24; }
.mkt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.mkt-table th {
    text-align: left;
    padding: 10px 14px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #64748B;
    font-weight: 600;
    background: rgba(99,102,241,.1);
    border-bottom: 1px solid rgba(99,102,241,.2);
}
.mkt-table td {
    padding: 10px 14px;
    color: #CBD5E1;
    border-bottom: 1px solid rgba(255,255,255,.04);
}
.mkt-table tr:hover td { background: rgba(99,102,241,.05); }
.mkt-val-green  { color: #34D399; font-weight: 600; }
.mkt-val-yellow { color: #FBBF24; font-weight: 600; }
.mkt-val-red    { color: #F87171; font-weight: 600; }
.mkt-task-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(15,23,42,.4);
    border: 1px solid rgba(99,102,241,.12);
    border-radius: 8px;
    margin-bottom: 8px;
    transition: opacity .2s;
}
.mkt-task-row.mkt-task-done { opacity: .45; }
.mkt-task-check {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #6366f1;
}
.mkt-task-title { font-size: 14px; color: #E2E8F0; font-weight: 500; margin-bottom: 4px; }
.mkt-task-meta  { font-size: 12px; color: #64748B; }
.mkt-prio-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    text-transform: uppercase;
}
.mkt-prio-high   { background: rgba(248,113,113,.2); color: #F87171; }
.mkt-prio-mid    { background: rgba(251,191,36,.2);  color: #FBBF24; }
.mkt-prio-low    { background: rgba(52,211,153,.2);  color: #34D399; }

@media (max-width: 900px) {
    .fin-kpi-row { grid-template-columns: repeat(3, 1fr); }
    .fin-charts-row { flex-direction: column; }
    .mkt-cal-header, .mkt-cal-row { grid-template-columns: 90px 1fr 100px; }
    .mkt-cal-type, .mkt-cal-status { display: none; }
    .ops-kpi-row { grid-template-columns: repeat(3, 1fr); }
    .rm-tl-track { flex-direction: column; }
    .rm-ms-kpi-row { flex-direction: column; gap: 8px; }
}

/* ============================================================
   OPERATIONS
   ============================================================ */
.ops-kpi-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}
.ops-kpi-card {
    background: rgba(15,23,42,.6);
    border: 1px solid rgba(99,102,241,.15);
    border-radius: 12px;
    padding: 18px 16px;
    text-align: center;
}
.ops-kpi-icon { font-size: 22px; margin-bottom: 6px; }
.ops-kpi-value { font-size: 28px; font-weight: 700; color: #f1f5f9; }
.ops-kpi-label { font-size: 11px; color: #64748b; margin-top: 4px; text-transform: uppercase; letter-spacing: .05em; }

.ops-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.ops-table thead th {
    text-align: left;
    padding: 10px 12px;
    color: #94a3b8;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
    border-bottom: 1px solid rgba(99,102,241,.15);
    white-space: nowrap;
}
.ops-table tbody tr {
    border-bottom: 1px solid rgba(255,255,255,.04);
    transition: background .15s;
}
.ops-table tbody tr:hover { background: rgba(99,102,241,.06); }
.ops-table tbody td { padding: 10px 12px; color: #e2e8f0; vertical-align: middle; }

.ops-product-name { font-weight: 600; color: #f1f5f9; }
.ops-sku { font-size: 11px; color: #64748b; margin-top: 2px; }
.ops-unit { color: #94a3b8; font-size: 11px; }

.ops-cat-pill {
    background: rgba(99,102,241,.12);
    color: #a78bfa;
    border-radius: 20px;
    padding: 2px 9px;
    font-size: 11px;
    white-space: nowrap;
}
.ops-fill-bar {
    display: inline-block;
    width: 72px;
    height: 6px;
    background: rgba(255,255,255,.1);
    border-radius: 3px;
    overflow: hidden;
    vertical-align: middle;
    margin-right: 4px;
}
.ops-fill-inner { height: 100%; border-radius: 3px; transition: width .4s; }
.ops-fill-pct { font-size: 11px; color: #94a3b8; }

.ops-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 20px;
    padding: 2px 9px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.ops-status-ok  { background: rgba(34,197,94,.15);  color: #22C55E; }
.ops-status-low { background: rgba(251,191,36,.15);  color: #FBBF24; }
.ops-status-out { background: rgba(239,68,68,.15);   color: #EF4444; }

.ops-supplier-notes { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.ops-supplier-note {
    background: rgba(15,23,42,.5);
    border-left: 3px solid rgba(99,102,241,.4);
    padding: 8px 12px;
    font-size: 12px;
    color: #94a3b8;
    border-radius: 0 6px 6px 0;
}
.ops-supplier-note strong { color: #e2e8f0; }

.ops-task-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(15,23,42,.5);
    border: 1px solid rgba(99,102,241,.1);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 10px;
    transition: border-color .2s;
}
.ops-task-row:hover { border-color: rgba(99,102,241,.3); }
.ops-task-done { opacity: .5; }
.ops-task-inprog { border-left: 3px solid #6366F1; }
.ops-task-left { padding-top: 2px; }
.ops-task-check { width: 16px; height: 16px; cursor: pointer; accent-color: #6366f1; }
.ops-task-body { flex: 1; }
.ops-task-title { font-weight: 600; color: #f1f5f9; margin-bottom: 4px; }
.ops-task-desc { font-size: 12px; color: #94a3b8; margin-bottom: 8px; }
.ops-task-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11px; color: #64748b; }

.ops-prio-badge {
    display: inline-block;
    border-radius: 20px;
    padding: 1px 8px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.ops-prio-crit { background: rgba(239,68,68,.2);  color: #EF4444; }
.ops-prio-high { background: rgba(251,191,36,.2);  color: #FBBF24; }
.ops-prio-mid  { background: rgba(99,102,241,.2);  color: #818CF8; }
.ops-prio-low  { background: rgba(100,116,139,.2); color: #94A3B8; }

.ops-cat-chip { font-size: 11px; color: #64748b; }
.ops-inprog-badge {
    background: rgba(99,102,241,.2);
    color: #818CF8;
    border-radius: 20px;
    padding: 1px 7px;
    font-size: 10px;
    font-weight: 600;
}

/* ============================================================
   STRATEGIE & ROADMAP
   ============================================================ */
.rm-phase-header {
    background: rgba(15,23,42,.6);
    border: 1px solid rgba(99,102,241,.2);
    border-radius: 12px;
    padding: 18px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 14px;
}
.rm-phase-info { display: flex; align-items: center; gap: 12px; }
.rm-phase-badge {
    background: rgba(99,102,241,.2);
    color: #A78BFA;
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
}
.rm-phase-title { font-size: 16px; font-weight: 600; color: #f1f5f9; }
.rm-phase-progress { display: flex; align-items: center; gap: 12px; }
.rm-phase-progress-label { font-size: 11px; color: #64748b; white-space: nowrap; }
.rm-progress-bar-track {
    width: 160px;
    height: 8px;
    background: rgba(255,255,255,.08);
    border-radius: 4px;
    overflow: hidden;
}
.rm-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366F1, #A78BFA);
    border-radius: 4px;
    transition: width .6s ease;
}
.rm-phase-progress-pct { font-size: 14px; font-weight: 700; color: #A78BFA; min-width: 40px; }

/* Timeline */
.rm-timeline {
    background: rgba(15,23,42,.5);
    border: 1px solid rgba(99,102,241,.12);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 28px;
    overflow-x: auto;
}
.rm-tl-track {
    display: flex;
    align-items: flex-start;
    gap: 0;
    min-width: 600px;
}
.rm-tl-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    cursor: pointer;
    position: relative;
}
.rm-tl-item:hover .rm-tl-dot { transform: scale(1.2); }
.rm-tl-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    z-index: 2;
    transition: transform .2s;
    flex-shrink: 0;
}
.rm-tl-active .rm-tl-dot { box-shadow: 0 0 0 6px rgba(99,102,241,.2); }
.rm-tl-line {
    position: absolute;
    top: 14px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: rgba(255,255,255,.08);
    z-index: 1;
}
.rm-tl-label { text-align: center; padding: 0 6px; }
.rm-tl-phase { font-size: 10px; color: #64748b; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px; }
.rm-tl-title { font-size: 11px; color: #cbd5e1; font-weight: 500; line-height: 1.3; }
.rm-tl-active .rm-tl-title { color: #A78BFA; font-weight: 700; }

/* Milestone Cards */
.rm-milestone-cards { display: flex; flex-direction: column; gap: 16px; margin-bottom: 28px; }
.rm-ms-card {
    background: rgba(15,23,42,.55);
    border: 1px solid rgba(99,102,241,.12);
    border-radius: 12px;
    overflow: hidden;
}
.rm-ms-done  { border-color: rgba(34,197,94,.2); }
.rm-ms-active{ border-color: rgba(99,102,241,.35); box-shadow: 0 0 0 1px rgba(99,102,241,.15); }
.rm-ms-planned{ opacity: .75; }

.rm-ms-card-header {
    padding: 14px 18px 12px;
    border-bottom: 1px solid rgba(255,255,255,.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.rm-ms-card-title { font-size: 15px; font-weight: 700; color: #f1f5f9; }
.rm-ms-card-meta { display: flex; align-items: center; gap: 8px; }
.rm-ms-phase-tag {
    font-size: 10px;
    color: #64748b;
    border: 1px solid rgba(100,116,139,.3);
    border-radius: 20px;
    padding: 2px 8px;
}
.rm-ms-status-pill {
    font-size: 10px;
    font-weight: 700;
    border-radius: 20px;
    padding: 2px 9px;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.rm-ms-done.rm-ms-status-pill, .rm-ms-done .rm-ms-status-pill { background: rgba(34,197,94,.15); color: #22C55E; }
.rm-ms-active.rm-ms-status-pill, .rm-ms-active .rm-ms-status-pill { background: rgba(99,102,241,.2); color: #818CF8; }
.rm-ms-planned.rm-ms-status-pill, .rm-ms-planned .rm-ms-status-pill { background: rgba(100,116,139,.15); color: #94A3B8; }

.rm-ms-card-body { padding: 16px 18px; }
.rm-ms-desc { font-size: 13px; color: #94a3b8; margin: 0 0 14px; line-height: 1.5; }

.rm-ms-progress-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.rm-ms-progress-label { font-size: 11px; color: #64748b; white-space: nowrap; min-width: 70px; }
.rm-ms-progress-track {
    flex: 1;
    height: 8px;
    background: rgba(255,255,255,.07);
    border-radius: 4px;
    overflow: hidden;
}
.rm-ms-progress-fill { height: 100%; border-radius: 4px; transition: width .5s; }
.rm-ms-progress-pct { font-size: 12px; font-weight: 700; color: #e2e8f0; min-width: 36px; text-align: right; }

.rm-ms-kpi-row { display: flex; gap: 20px; margin-bottom: 14px; flex-wrap: wrap; }
.rm-ms-kpi { min-width: 140px; }
.rm-ms-kpi-label { font-size: 10px; color: #64748b; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 3px; }
.rm-ms-kpi-val { font-size: 12px; color: #e2e8f0; font-weight: 500; }

.rm-ms-tasks { border-top: 1px solid rgba(255,255,255,.05); padding-top: 12px; }
.rm-ms-tasks-header { font-size: 11px; color: #64748b; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.rm-ms-task-item {
    font-size: 12px;
    color: #cbd5e1;
    padding: 4px 0;
    display: flex;
    align-items: center;
    gap: 7px;
}
.rm-ms-task-done { color: #64748b; text-decoration: line-through; }

/* Strategic Notes */
.rm-notes-card {
    background: rgba(15,23,42,.55);
    border: 1px solid rgba(99,102,241,.15);
    border-radius: 12px;
    padding: 18px 20px;
}
.rm-notes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.rm-notes-header h3 { font-size: 14px; font-weight: 600; color: #f1f5f9; margin: 0; }
.rm-notes-textarea {
    width: 100%;
    min-height: 180px;
    background: rgba(0,0,0,.3);
    border: 1px solid rgba(99,102,241,.2);
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 13px;
    font-family: 'Source Sans Pro', sans-serif;
    line-height: 1.6;
    padding: 12px 14px;
    resize: vertical;
    box-sizing: border-box;
    outline: none;
    transition: border-color .2s;
}
.rm-notes-textarea:focus { border-color: rgba(99,102,241,.5); }
.rm-notes-hint { font-size: 11px; color: #475569; margin-top: 6px; }

/* ── Auto-Refresh & Last-Updated ─────────────────────────────────── */
.auto-refresh-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

/* ── ? Info-Button ── */
.refresh-info-btn {
    color: #64748b;
    font-size: 13px;
    padding: 3px 4px;
    line-height: 1;
    transition: color 0.18s;
}
.refresh-info-btn:hover { color: #3C94F8; }

/* ── Info-Popover Card ── */
.refresh-info-popover {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 290px;
    background: #1a1a2e;
    border: 1px solid rgba(60,148,248,0.22);
    border-radius: 12px;
    padding: 16px 18px;
    z-index: 2000;
    box-shadow: 0 12px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(60,148,248,0.06);
    animation: rip-fade-in 0.15s ease;
}
.refresh-info-popover::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 14px;
    width: 10px;
    height: 10px;
    background: #1a1a2e;
    border-left: 1px solid rgba(60,148,248,0.22);
    border-top: 1px solid rgba(60,148,248,0.22);
    transform: rotate(45deg);
}
@keyframes rip-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.rip-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #3C94F8;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 7px;
}
.rip-intro {
    font-size: 12px;
    color: #cbd5e1;
    line-height: 1.6;
    margin: 0 0 10px;
}
.rip-list {
    list-style: none;
    margin: 0 0 10px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.rip-list li {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.5;
    padding-left: 10px;
    border-left: 2px solid rgba(60,148,248,0.30);
}
.rip-list li strong { color: #e2e8f0; }
.rip-key {
    display: inline-block;
    font-weight: 700;
    color: #e2e8f0;
    margin-right: 4px;
}
.rip-note {
    font-size: 11px;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    gap: 6px;
    align-items: flex-start;
}
.rip-note .fa-info-circle { color: #3C94F8; margin-top: 1px; flex-shrink: 0; }
.refresh-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
    letter-spacing: 0.01em;
}
.auto-refresh-btn {
    color: var(--text-muted);
    font-size: 14px;
    transition: color 0.18s ease, transform 0.3s ease;
}
.auto-refresh-btn:hover { color: var(--primary-color); }
.auto-refresh-btn.active {
    color: #22C55E;
}
.auto-refresh-btn.active #auto-refresh-icon {
    animation: spin-slow 4s linear infinite;
}
@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
.auto-refresh-select {
    background: var(--bg-elevated, #F0F2F8);
    border: 1px solid var(--border-color, rgba(0,0,0,0.08));
    border-radius: var(--radius-sm, 8px);
    color: var(--text-secondary);
    font-size: 11px;
    font-family: var(--font-body);
    padding: 4px 8px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.18s ease;
}
.auto-refresh-select:focus { border-color: rgba(60,148,248,0.50); }

/* ══ Supplier-Select Sheet ══════════════════════════════════════════ */
.sso-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 9050;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.sso-panel {
    background: #111118;
    border: 1px solid rgba(60,148,248,0.18);
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0,0,0,0.6);
    animation: sso-slide-in 0.18s ease;
}
@keyframes sso-slide-in {
    from { opacity:0; transform:translateY(12px); }
    to   { opacity:1; transform:translateY(0); }
}
.sso-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px 20px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sso-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #f1f5f9;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sso-title .fa-truck { color: #06b6d4; }
.sso-subtitle {
    font-size: 12px;
    color: #64748b;
    margin-top: 3px;
}
.sso-close-btn {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 16px;
    cursor: pointer;
    padding: 2px 4px;
    transition: color 0.15s;
    flex-shrink: 0;
}
.sso-close-btn:hover { color: #f1f5f9; }
.sso-loading {
    text-align: center;
    padding: 36px 20px;
    color: #64748b;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.sso-groups {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.sso-group {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(60,148,248,0.12);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.15s;
}
.sso-group:hover { border-color: rgba(60,148,248,0.28); }
.sso-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.sso-group-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    gap: 7px;
}
.sso-group-name .fa-industry { color: #06b6d4; font-size: 12px; }
.sso-group-name .fa-question-circle { color: #475569; font-size: 12px; }
.sso-email-btn {
    background: transparent;
    border: 1px solid rgba(6,182,212,0.40);
    color: #06b6d4;
    border-radius: 7px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.sso-email-btn:hover {
    background: rgba(6,182,212,0.10);
    border-color: rgba(6,182,212,0.65);
}
.sso-products {
    padding: 8px 14px 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.sso-product {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
}
.sso-product-name {
    color: #94a3b8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 260px;
}
.sso-product-days {
    font-weight: 700;
    font-size: 11px;
    border-radius: 4px;
    padding: 2px 7px;
    white-space: nowrap;
    flex-shrink: 0;
}
.sso-days-critical { background: rgba(244,63,94,0.12); color: #f43f5e; }
.sso-days-warn     { background: rgba(245,158,11,0.12); color: #f59e0b; }
.sso-days-ok       { background: rgba(34,211,165,0.10); color: #22d3a5; }
.sso-empty {
    text-align: center;
    padding: 32px 20px;
    color: #64748b;
    font-size: 13px;
}

.section-last-updated {
    font-size: 11px;
    color: #64748B;
    font-weight: 400;
    white-space: nowrap;
    margin-left: auto;
    padding-left: 12px;
}
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

/* ================================================================
   OPERATIONS + ROADMAP — neue Komponenten (2026-04-24)
   ================================================================ */

/* Tab-Bar (Operations + Roadmap) */
.ops-tab-bar { display:flex; gap:4px; border-bottom:1px solid rgba(99,102,241,.2); margin-bottom:20px; overflow-x:auto; }
.ops-tab-btn { background:none; border:none; border-bottom:2px solid transparent; padding:8px 16px; font-size:13px; font-weight:600; cursor:pointer; transition:color .15s,border-color .15s; white-space:nowrap; }
.ops-tab-btn i { margin-right:6px; }

/* Edit / Delete row buttons */
.ops-edit-btn { background:rgba(99,102,241,.15); color:#A78BFA; border:1px solid rgba(99,102,241,.3); border-radius:6px; padding:4px 8px; font-size:11px; cursor:pointer; transition:background .15s; }
.ops-edit-btn:hover { background:rgba(99,102,241,.3); }
.ops-del-btn  { background:rgba(239,68,68,.12);  color:#f87171;  border:1px solid rgba(239,68,68,.25); border-radius:6px; padding:4px 8px; font-size:11px; cursor:pointer; transition:background .15s; }
.ops-del-btn:hover { background:rgba(239,68,68,.25); }

/* Deployment-Log status pills */
.dep-status-pill { display:inline-flex; align-items:center; gap:5px; padding:3px 9px; border-radius:999px; font-size:11px; font-weight:600; }
.dep-status-deployed { background:rgba(34,197,94,.15);  color:#4ade80; border:1px solid rgba(34,197,94,.3); }
.dep-status-failed   { background:rgba(239,68,68,.15);  color:#f87171; border:1px solid rgba(239,68,68,.3); }
.dep-status-rollback { background:rgba(251,191,36,.15); color:#fbbf24; border:1px solid rgba(251,191,36,.3); }
.dep-status-pending  { background:rgba(148,163,184,.12);color:#94a3b8; border:1px solid rgba(148,163,184,.25); }

/* Support-Ticket priority badges */
.tkt-prio-badge { display:inline-block; padding:2px 8px; border-radius:999px; font-size:11px; font-weight:700; }
.prio-hoch    { background:rgba(239,68,68,.15);  color:#f87171; border:1px solid rgba(239,68,68,.3); }
.prio-mittel  { background:rgba(251,191,36,.12); color:#fbbf24; border:1px solid rgba(251,191,36,.3); }
.prio-niedrig { background:rgba(100,116,139,.12);color:#94a3b8; border:1px solid rgba(100,116,139,.25); }

/* Support-Ticket status badges */
.tkt-status-badge { display:inline-block; padding:2px 8px; border-radius:999px; font-size:11px; font-weight:600; }
.tkt-offen    { background:rgba(99,102,241,.15); color:#A78BFA; border:1px solid rgba(99,102,241,.3); }
.tkt-inprog   { background:rgba(251,191,36,.12); color:#fbbf24; border:1px solid rgba(251,191,36,.3); }
.tkt-geloest  { background:rgba(34,197,94,.12);  color:#4ade80; border:1px solid rgba(34,197,94,.3); }

/* Feature Requests grid */
.fr-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:16px; }
.fr-card { background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.08); border-radius:10px; padding:16px; display:flex; flex-direction:column; gap:8px; transition:border-color .2s; }
.fr-card:hover { border-color:rgba(99,102,241,.4); }
.fr-card-header { display:flex; justify-content:space-between; align-items:center; }
.fr-card-title  { font-size:14px; font-weight:700; color:#e2e8f0; }
.fr-card-desc   { font-size:12px; color:#94a3b8; line-height:1.5; }
.fr-card-footer { display:flex; justify-content:space-between; align-items:center; margin-top:4px; }
.fr-customer    { font-size:11px; color:#64748b; }
.fr-customer i  { margin-right:3px; }
.fr-actions     { display:flex; gap:6px; }

/* Feature status pills */
.fr-status-pill { display:inline-block; padding:2px 8px; border-radius:999px; font-size:11px; font-weight:600; }
.fr-offen   { background:rgba(99,102,241,.15); color:#A78BFA; border:1px solid rgba(99,102,241,.3); }
.fr-inplan  { background:rgba(251,191,36,.12); color:#fbbf24; border:1px solid rgba(251,191,36,.3); }
.fr-done    { background:rgba(34,197,94,.12);  color:#4ade80; border:1px solid rgba(34,197,94,.3); }
.fr-reject  { background:rgba(100,116,139,.12);color:#64748b; border:1px solid rgba(100,116,139,.25); }

/* Bug severity badges */
.sev-badge { display:inline-block; padding:2px 8px; border-radius:999px; font-size:11px; font-weight:700; }
.sev-kritisch { background:rgba(239,68,68,.2);  color:#f87171; border:1px solid rgba(239,68,68,.4); text-transform:uppercase; letter-spacing:.04em; }
.sev-hoch     { background:rgba(249,115,22,.15);color:#fb923c; border:1px solid rgba(249,115,22,.3); }
.sev-mittel   { background:rgba(251,191,36,.12);color:#fbbf24; border:1px solid rgba(251,191,36,.3); }
.sev-niedrig  { background:rgba(100,116,139,.12);color:#94a3b8; border:1px solid rgba(100,116,139,.25); }

/* Roadmap phase badge */
.rm-phase-badge { display:inline-block; padding:4px 12px; border-radius:999px; font-size:12px; font-weight:700; background:rgba(99,102,241,.2); color:#A78BFA; border:1px solid rgba(99,102,241,.4); white-space:nowrap; }



/* ════════════════════════════════════════════════════════
   de_core() BRAND REDESIGN 2026 — override layer
   ════════════════════════════════════════════════════════ */

/* Fonts */
body {
    font-family: var(--font-body);
    background-color: var(--background-color);
    color: var(--text-color);
}
h1,h2,h3,h4,h5,h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    letter-spacing: -0.025em;
    line-height: 1.2;
}

/* ── Sidebar ── */
.sidebar {
    background-color: #FFFFFF !important;
    backdrop-filter: none !important;
    border-right: 1px solid rgba(0,0,0,0.08) !important;
    box-shadow: 2px 0 20px rgba(15,17,23,0.06) !important;
}

/* Logo area — stays dark (brand rule) */
.sidebar-header {
    background-color: #1A1C20 !important;
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
    margin-bottom: 8px !important;
}

/* Nav links */
.sidebar-nav li a {
    color: #5A5C6E !important;
    border-radius: 10px !important;
    margin: 2px 10px !important;
    padding: 0.7rem 1rem !important;
    font-size: 0.925rem !important;
    font-weight: 500 !important;
    border-left: 3px solid transparent !important;
    transition: background-color 0.15s ease, color 0.15s ease !important;
}
.sidebar-nav li a:hover {
    background-color: rgba(60,148,248,0.07) !important;
    color: #3C94F8 !important;
    transform: none !important;
}
.sidebar-nav li a.active {
    background: linear-gradient(90deg,rgba(60,148,248,0.13) 0%,rgba(60,148,248,0.04) 100%) !important;
    color: #3C94F8 !important;
    font-weight: 600 !important;
    border-left: 3px solid #3C94F8 !important;
}
.sidebar-nav li a.active i,
.sidebar-nav li a.active .fa-icon { color: #3C94F8 !important; }
.sidebar-nav li a i { transition: color 0.15s ease; }

/* ── Header / Topbar ── */
.header {
    background: #FFFFFF !important;
    border-bottom: 1px solid rgba(0,0,0,0.08) !important;
    box-shadow: 0 1px 8px rgba(15,17,23,0.06) !important;
}

/* ── Section titles ── */
.section-header {
    margin-bottom: 1.75rem !important;
    padding-bottom: 1rem !important;
    border-bottom: 2px solid rgba(0,0,0,0.06) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}
.section-header h2 {
    font-family: var(--font-heading) !important;
    font-weight: 700 !important;
    font-size: 1.5rem !important;
    color: #0F1117 !important;
    letter-spacing: -0.025em !important;
    margin: 0 !important;
}

/* ── KPI Cards — colorful top accents ── */
.kpi-card {
    background: #FFFFFF !important;
    border-radius: 16px !important;
    border-top: 3px solid #3C94F8 !important;
    box-shadow: 0 1px 4px rgba(15,17,23,0.06), 0 0 0 1px rgba(0,0,0,0.04) !important;
    transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.2s ease !important;
}
.kpi-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 28px rgba(60,148,248,0.14), 0 0 0 1px rgba(60,148,248,0.10) !important;
}
.kpi-card:nth-child(2) { border-top-color: #A855F7 !important; }
.kpi-card:nth-child(2):hover { box-shadow: 0 8px 28px rgba(168,85,247,0.14), 0 0 0 1px rgba(168,85,247,0.10) !important; }
.kpi-card:nth-child(3) { border-top-color: #06B6D4 !important; }
.kpi-card:nth-child(3):hover { box-shadow: 0 8px 28px rgba(6,182,212,0.14), 0 0 0 1px rgba(6,182,212,0.10) !important; }
.kpi-card:nth-child(4) { border-top-color: #22D3A5 !important; }
.kpi-card:nth-child(4):hover { box-shadow: 0 8px 28px rgba(34,211,165,0.14), 0 0 0 1px rgba(34,211,165,0.10) !important; }
.kpi-card:nth-child(5) { border-top-color: #F59E0B !important; }
.kpi-card:nth-child(5):hover { box-shadow: 0 8px 28px rgba(245,158,11,0.14), 0 0 0 1px rgba(245,158,11,0.10) !important; }

.kpi-card h3 {
    font-family: var(--font-body) !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    color: #9698AA !important;
    text-transform: uppercase !important;
    letter-spacing: 0.07em !important;
    margin-bottom: 0.5rem !important;
}
.kpi-card-value {
    font-family: var(--font-heading) !important;
    font-size: 2.1rem !important;
    font-weight: 700 !important;
    color: #0F1117 !important;
    letter-spacing: -0.03em !important;
    line-height: 1.1 !important;
}
.kpi-card-icon { color: rgba(60,148,248,0.15) !important; }
.kpi-card:nth-child(2) .kpi-card-icon { color: rgba(168,85,247,0.15) !important; }
.kpi-card:nth-child(3) .kpi-card-icon { color: rgba(6,182,212,0.15) !important; }

/* ── Buttons ── */
.btn-primary {
    background: linear-gradient(135deg,#3C94F8,#2878E8) !important;
    color: #FFFFFF !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 14px rgba(60,148,248,0.30) !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease !important;
    border: none !important;
}
.btn-primary:hover {
    background: linear-gradient(135deg,#60A8FF,#3C94F8) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 22px rgba(60,148,248,0.40) !important;
}
.btn-outline {
    border: 1.5px solid #3C94F8 !important;
    color: #3C94F8 !important;
    border-radius: 10px !important;
    background: transparent !important;
}
.btn-outline:hover {
    background: rgba(60,148,248,0.08) !important;
    transform: translateY(-1px) !important;
}

/* ── Cards / Chart containers ── */
.chart-card, .card, .glass-card,
.content-card, .section-card {
    background: #FFFFFF !important;
    border-radius: 16px !important;
    box-shadow: 0 1px 4px rgba(15,17,23,0.06), 0 0 0 1px rgba(0,0,0,0.04) !important;
}

/* ── Inputs / Search ── */
.search-bar input, input[type="text"], input[type="search"],
input[type="email"], textarea, select {
    border: 1.5px solid rgba(0,0,0,0.12) !important;
    border-radius: 10px !important;
    background: #FFFFFF !important;
    color: #0F1117 !important;
    font-family: var(--font-body) !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}
.search-bar input:focus, input:focus, textarea:focus, select:focus {
    border-color: #3C94F8 !important;
    box-shadow: 0 0 0 3px rgba(60,148,248,0.18) !important;
    outline: none !important;
}

/* ── Focus visible ── */
*:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(60,148,248,0.35) !important;
}

/* ── Badges ── */
.badge-danger { background: #F43F5E !important; }
.badge-warning { background: #F59E0B !important; }
.badge-success { background: #22D3A5 !important; color: #fff !important; }

/* ── Tab buttons ── */
.tab-btn.active, .tab-link.active {
    color: #3C94F8 !important;
    border-bottom-color: #3C94F8 !important;
    font-weight: 600 !important;
}
.tab-btn:hover, .tab-link:hover { color: #3C94F8 !important; }

/* ── Tables ── */
.data-table th {
    background: #F7F8FC !important;
    color: #9698AA !important;
    font-size: 0.78rem !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    font-weight: 600 !important;
}
.data-table tbody tr:hover { background: rgba(60,148,248,0.05) !important; }

/* ── User avatar ── */
.user-avatar {
    background: linear-gradient(135deg,#3C94F8,#A855F7) !important;
    box-shadow: 0 2px 8px rgba(60,148,248,0.30) !important;
}

/* ── Soul widget ── */
.soul-widget {
    margin: 8px 10px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    background: #F7F8FC !important;
}

/* ════════════════════════════════════════════════════════ */

/* ════ WAVE 2: Component Deep-Fix ════════════════════════════════════════════ */

/* ── Agent Inbox Card (OpenClaw Briefing Widget) ── */
.agent-inbox-card {
    background: #FFFFFF !important;
    border: 1px solid rgba(60,148,248,0.20) !important;
    border-radius: 14px !important;
    box-shadow: 0 1px 4px rgba(15,17,23,0.06), 0 0 0 1px rgba(60,148,248,0.08) !important;
}
.agent-inbox-card:focus-within {
    box-shadow: 0 0 0 3px rgba(60,148,248,0.18) !important;
}
.agent-inbox-header {
    background: linear-gradient(90deg,rgba(60,148,248,0.07),rgba(168,85,247,0.04)) !important;
    border-bottom: 1px solid rgba(60,148,248,0.12) !important;
}
.agent-inbox-title {
    font-family: 'Space Grotesk', sans-serif !important;
    color: #3C94F8 !important;
    font-weight: 600 !important;
}
.agent-pulse { color: #3C94F8 !important; }
.agent-inbox-badge { color: #9698AA !important; }
.agent-inbox-toggle-btn { color: #9698AA !important; }
.agent-inbox-toggle-btn:hover { color: #3C94F8 !important; }
.agent-inbox-input {
    background: #F7F8FC !important;
    border: 1.5px solid rgba(0,0,0,0.10) !important;
    color: #0F1117 !important;
    font-family: 'Inter', sans-serif !important;
}
.agent-inbox-input::placeholder { color: #9698AA !important; }
.agent-inbox-input:focus { border-color: #3C94F8 !important; }
.inbox-type-briefing { background: rgba(60,148,248,0.12) !important; color: #3C94F8 !important; }

/* ── Command Center KPI Cards ── */
.cc-kpi-card {
    background: #FFFFFF !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    border-radius: 14px !important;
    box-shadow: 0 1px 4px rgba(15,17,23,0.06), 0 0 0 1px rgba(0,0,0,0.04) !important;
    transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.2s ease !important;
}
.cc-kpi-card:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 20px rgba(60,148,248,0.12), 0 0 0 1px rgba(60,148,248,0.08) !important;
}
.cc-kpi-green  { border-left: 3px solid #22D3A5 !important; }
.cc-kpi-yellow { border-left: 3px solid #F59E0B !important; }
.cc-kpi-red    { border-left: 3px solid #F43F5E !important; }
.cc-kpi-value {
    font-family: 'Space Grotesk', sans-serif !important;
    color: #0F1117 !important;
    font-size: 26px !important;
    font-weight: 700 !important;
    letter-spacing: -0.03em !important;
}
.cc-kpi-label {
    color: #9698AA !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0.06em !important;
}
.cc-kpi-icon {
    background: rgba(60,148,248,0.10) !important;
    color: #3C94F8 !important;
}
.cc-kpi-period { color: #9698AA !important; }
.cc-trend-up   { color: #22D3A5 !important; }
.cc-trend-down { color: #F43F5E !important; }
.cc-trend-neutral { color: #9698AA !important; }

/* ── KPI Value (main dashboard tiles) ── */
.kpi-value {
    font-family: 'Space Grotesk', sans-serif !important;
    color: #0F1117 !important;
    font-weight: 700 !important;
    letter-spacing: -0.03em !important;
}
.kpi-label {
    font-family: 'Inter', sans-serif !important;
    color: #9698AA !important;
}
.kpi-trend.positive { color: #22D3A5 !important; }
.kpi-trend.negative { color: #F43F5E !important; }

/* ── All indigo remnants → brand blue ── */
.cal-day:hover { background: rgba(60,148,248,0.07) !important; }
.mini-cal-soul-badge {
    color: #3C94F8 !important;
    background: rgba(60,148,248,0.10) !important;
}
.cal-add-popup { border-color: rgba(60,148,248,0.30) !important; }

/* ── Section content background ── */
.content-section {
    background: transparent !important;
}
.main-content {
    background-color: #F7F8FC !important;
    padding: 1.75rem 2rem !important;
}

/* ── Kanban / Action Plan ── */
.kanban-column {
    background: #F0F2F8 !important;
    border-radius: 14px !important;
    border: 1px solid rgba(0,0,0,0.06) !important;
}
.kanban-card {
    background: #FFFFFF !important;
    border-radius: 10px !important;
    box-shadow: 0 1px 4px rgba(15,17,23,0.06) !important;
    border: 1px solid rgba(0,0,0,0.06) !important;
}
.kanban-card:hover {
    box-shadow: 0 4px 14px rgba(60,148,248,0.12) !important;
    transform: translateY(-2px) !important;
}

/* ── Chart cards ── */
.chart-card {
    background: #FFFFFF !important;
    border-radius: 16px !important;
    box-shadow: 0 1px 4px rgba(15,17,23,0.06), 0 0 0 1px rgba(0,0,0,0.04) !important;
}
.chart-card h3 {
    font-family: 'Space Grotesk', sans-serif !important;
    color: #0F1117 !important;
    font-weight: 600 !important;
}

/* ── Action Preview cards ── */
.action-preview-card, .preview-card {
    background: #FFFFFF !important;
    border-radius: 12px !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    box-shadow: 0 1px 4px rgba(15,17,23,0.06) !important;
}

/* ── Topbar search refinement ── */
.search-bar input {
    background: #F0F2F8 !important;
    border: 1.5px solid transparent !important;
    border-radius: 10px !important;
    color: #0F1117 !important;
    font-family: 'Inter', sans-serif !important;
}
.search-bar input:focus {
    background: #FFFFFF !important;
    border-color: #3C94F8 !important;
}

/* ── Topbar / header right side ── */
.header-right .btn { font-family: 'Space Grotesk', sans-serif !important; }

/* ── Section header border pop ── */
.section-header {
    border-bottom: 2px solid rgba(60,148,248,0.10) !important;
}

/* ── Alert cards / timeline ── */
.alert-card, .alert-item {
    background: #FFFFFF !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 4px rgba(15,17,23,0.06) !important;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #F0F2F8; }
::-webkit-scrollbar-thumb { background: rgba(60,148,248,0.25); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(60,148,248,0.45); }

/* ════════════════════════════════════════════════════════════════════════════ */

/* ════ WAVE 3: Glaskugel + Kausal-Graph + Finale Fixes ═══════════════════════ */

/* ── Glaskugel Container: dark oval weg, weißes Card ── */
.glaskugel-container {
    background: #FFFFFF !important;
    border: 1px solid rgba(60,148,248,0.15) !important;
    border-radius: 16px !important;
    box-shadow: 0 1px 4px rgba(15,17,23,0.06), 0 0 0 1px rgba(0,0,0,0.04) !important;
}
.glaskugel-container::before {
    background: none !important;
    display: none !important;
}
.glaskugel-title {
    font-family: 'Space Grotesk', sans-serif !important;
    color: #5A5C6E !important;
    font-size: 12px !important;
    letter-spacing: 0.07em !important;
    font-weight: 600 !important;
}
.gk-score-num {
    font-family: 'Space Grotesk', sans-serif !important;
    letter-spacing: -0.04em !important;
}
.gk-score-label {
    color: #5A5C6E !important;
    font-family: 'Inter', sans-serif !important;
}
.gk-score-sublabel {
    color: #9698AA !important;
    font-family: 'Inter', sans-serif !important;
}
.glaskugel-update-ts { color: #9698AA !important; }

/* ── Kausal-Graph container ── */
.kausal-graph-container, .kausal-container, #kausal-graph-wrap, .gk-canvas {
    background: transparent !important;
}
.glaskugel-right { background: transparent !important; }

/* ── Leverage / Score bars ── */
.gk-leverage-bar-track {
    background: rgba(0,0,0,0.06) !important;
}

/* ── Challenge / "Was ist heute wichtig" Kacheln ── */
.challenge-card, .challenge-item {
    background: #FFFFFF !important;
    border-radius: 12px !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    box-shadow: 0 1px 4px rgba(15,17,23,0.06) !important;
}
.challenge-card:hover {
    box-shadow: 0 4px 16px rgba(60,148,248,0.12) !important;
    transform: translateY(-2px) !important;
}

/* ── Action Preview / Optimierungsfahrplan ── */
.action-preview-item {
    background: #FFFFFF !important;
    border-radius: 10px !important;
    border-left: 3px solid #3C94F8 !important;
    box-shadow: 0 1px 4px rgba(15,17,23,0.06) !important;
    padding: 10px 14px !important;
    margin-bottom: 8px !important;
}

/* ── Nächste 7 Tage / Aufgaben ── */
.task-item, .todo-item, .week-task {
    background: #FFFFFF !important;
    border-radius: 8px !important;
    border: 1px solid rgba(0,0,0,0.07) !important;
    margin-bottom: 6px !important;
}

/* ── Tabs aktiv ── */
.tab-btn {
    font-family: 'Space Grotesk', sans-serif !important;
    font-weight: 500 !important;
    color: #9698AA !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    transition: color 0.15s ease, border-color 0.15s ease !important;
}
.tab-btn.active {
    color: #3C94F8 !important;
    border-bottom-color: #3C94F8 !important;
    font-weight: 600 !important;
}
.tab-btn:hover { color: #3C94F8 !important; }

/* ── Soul widget (Sidebar) ── */
.soul-widget {
    background: linear-gradient(135deg,rgba(60,148,248,0.06),rgba(168,85,247,0.04)) !important;
    border: 1px solid rgba(60,148,248,0.15) !important;
    border-radius: 12px !important;
}
.soul-widget-title {
    font-family: 'Space Grotesk', sans-serif !important;
    color: #3C94F8 !important;
    font-weight: 600 !important;
    font-size: 12px !important;
}

/* ── Modals ── */
.modal-content, .modal-box {
    background: #FFFFFF !important;
    border-radius: 16px !important;
    box-shadow: 0 24px 64px rgba(15,17,23,0.18) !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
}

/* ── Breadcrumb ── */
.breadcrumb { font-family: 'Inter', sans-serif !important; font-size: 13px !important; }
.breadcrumb a { color: #9698AA !important; }
.breadcrumb a:hover { color: #3C94F8 !important; }
.breadcrumb span { color: #C8CAD4 !important; }

/* ── Topbar section title ── */
.header h1, .header-title {
    font-family: 'Space Grotesk', sans-serif !important;
    font-weight: 700 !important;
    font-size: 1.25rem !important;
    color: #0F1117 !important;
    letter-spacing: -0.02em !important;
}

/* ── Date/time label (oben rechts) ── */
.last-updated-label, .header-date {
    font-family: 'Inter', sans-serif !important;
    color: #9698AA !important;
    font-size: 12px !important;
}

/* ── Primary color als Akzent für Restfälle ── */
a { color: #3C94F8 !important; }
a:hover { color: #2878E8 !important; }

/* ════════════════════════════════════════════════════════════════════════════ */

/* ════ WAVE 4: SYSTEM-KORREKTUR — Alle bisherigen Fehler bereinigen ══════════

   1. Nav: Alles schwarz — kein Blau
   2. AI-Output: Cyan komplett weg, Brand-CI
   3. Farbige Karten-Borders: alle entfernt
   4. Dots: neutralisiert
   ══════════════════════════════════════════════════════════════════════════ */

/* ── 1. NAV: alles schwarz, kein Blau ──────────────────────────────────────── */

.sidebar-nav li a {
    color: #374151 !important;
    border-left: 3px solid transparent !important;
    background: transparent !important;
    font-weight: 500 !important;
}
.sidebar-nav li a i {
    color: #6B7280 !important;
}
.sidebar-nav li a:hover {
    background-color: #F3F4F6 !important;
    color: #111827 !important;
    transform: none !important;
}
.sidebar-nav li a:hover i { color: #374151 !important; }

/* Aktiver Eintrag: schwarz + fett + dezente Linie — KEIN Blau im Text */
.sidebar-nav li a.active {
    background: #F3F4F6 !important;
    color: #111827 !important;
    font-weight: 700 !important;
    border-left: 3px solid #111827 !important;
}
.sidebar-nav li a.active i { color: #111827 !important; }

/* Allgemeine Link-Überschreibung aus Wave 1 rückgängig */
a { color: inherit !important; }
a:hover { color: inherit !important; }
.breadcrumb a { color: #9698AA !important; }
.breadcrumb a:hover { color: #374151 !important; }

/* ── 2. FARBIGE KARTEN-BORDERS: alle entfernt ──────────────────────────────── */

/* Meine eigenen nth-child border-top/border-left Regeln überschreiben */
.kpi-card,
.kpi-card:nth-child(1),
.kpi-card:nth-child(2),
.kpi-card:nth-child(3),
.kpi-card:nth-child(4),
.kpi-card:nth-child(5),
.kpi-card:nth-child(6) {
    border-top: none !important;
    border-left: none !important;
    border: 1px solid rgba(0,0,0,0.07) !important;
    box-shadow: 0 1px 4px rgba(15,17,23,0.06) !important;
}
.kpi-card:nth-child(2):hover,
.kpi-card:nth-child(3):hover,
.kpi-card:nth-child(4):hover,
.kpi-card:nth-child(5):hover {
    box-shadow: 0 4px 16px rgba(15,17,23,0.10) !important;
}
.action-preview-item { border-left: none !important; border: 1px solid rgba(0,0,0,0.07) !important; }

/* ── 3. AI-OUTPUT: Cyan weg, Brand-CI ──────────────────────────────────────── */

/* Override alle --ai-cyan Variablen */
.ai-output,
.ai-output *,
.insight-prose,
.insight-prose * {
    --ai-cyan:        #3C94F8;
    --ai-cyan-light:  #60A8FF;
    --ai-cyan-dark:   #0F1117;
    --ai-cyan-glow:   rgba(0,0,0,0.03);
    --ai-cyan-border: rgba(0,0,0,0.08);
    --ai-cyan-accent: #374151;
}

/* AI Output Container */
.ai-output {
    font-family: 'Inter', system-ui, sans-serif !important;
    font-size: 0.925rem !important;
    line-height: 1.75 !important;
    color: #374151 !important;
    background: #FFFFFF !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    border-radius: 12px !important;
    padding: 1.25rem 1.5rem !important;
    box-shadow: 0 1px 4px rgba(15,17,23,0.06) !important;
}

/* AI Headings: dunkel, Space Grotesk */
.ai-output h1,
.ai-output h2,
.ai-output h3,
.ai-output h4,
.ai-output h5 {
    font-family: 'Space Grotesk', sans-serif !important;
    color: #111827 !important;
    letter-spacing: -0.02em !important;
}
.ai-output h1 {
    font-size: 1.25rem !important;
    border-bottom: 1px solid rgba(0,0,0,0.08) !important;
    padding-bottom: 0.5rem !important;
}
.ai-output h2 {
    font-size: 1.05rem !important;
    border-bottom: 1px solid rgba(0,0,0,0.06) !important;
    padding-bottom: 0.35rem !important;
}
.ai-output h3 { font-size: 0.95rem !important; color: #374151 !important; }
.ai-output h4 {
    font-size: 0.8rem !important;
    color: #6B7280 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
}

/* AI Prompt Indicator: de_core() Badge */
.ai-prompt-indicator { color: #374151 !important; }
.ai-prompt-indicator::before {
    background: rgba(0,0,0,0.04) !important;
    border: 1px solid rgba(0,0,0,0.10) !important;
    color: #374151 !important;
}
.ai-prompt-indicator::after { color: #9698AA !important; }

/* AI Tables */
.ai-output table { border-collapse: collapse !important; width: 100% !important; }
.ai-output th {
    background: #F3F4F6 !important;
    color: #374151 !important;
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    padding: 8px 12px !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
}
.ai-output td {
    padding: 8px 12px !important;
    border: 1px solid rgba(0,0,0,0.07) !important;
    color: #374151 !important;
    font-family: 'Inter', sans-serif !important;
}
.ai-output tr:nth-child(even) td { background: #F9FAFB !important; }

/* AI Code blocks */
.ai-output code, .ai-output pre {
    font-family: 'JetBrains Mono', monospace !important;
    background: #F3F4F6 !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    border-radius: 6px !important;
    color: #374151 !important;
    font-size: 0.85rem !important;
}

/* AI Lists */
.ai-output ul li::marker, .ai-output ol li::marker { color: #9698AA !important; }
.ai-output strong { color: #111827 !important; }
.ai-output blockquote {
    border-left: 3px solid rgba(0,0,0,0.15) !important;
    color: #6B7280 !important;
    background: #F9FAFB !important;
}

/* ── 4. DOTS: neutralisiert ────────────────────────────────────────────────── */

/* Soul-Pulse Dot: kein Farbglühen mehr */
.soul-pulse {
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background: #D1D5DB !important;
    box-shadow: none !important;
    animation: none !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
}
/* Soul-Pulse Statusfarben: dezent */
.soul-pulse.green  { background: #22D3A5 !important; }
.soul-pulse.yellow { background: #F59E0B !important; }
.soul-pulse.red    { background: #F43F5E !important; }

/* Agent-Pulse Dot */
.agent-pulse {
    font-size: 7px !important;
    color: #9698AA !important;
    animation: none !important;
}

/* Status-Dots in Alerts und Hinweisen */
.alert-dot, .status-dot, .hint-dot,
[class*="-dot"]:not(.cc-kpi-green-dot):not(.cc-kpi-yellow-dot):not(.cc-kpi-red-dot) {
    width: 6px !important;
    height: 6px !important;
    background: #D1D5DB !important;
    box-shadow: none !important;
    animation: none !important;
}

/* Core Widget Dot */
.soul-widget-header .soul-pulse,
#soul-widget .soul-pulse { animation: none !important; }

/* ── 5. BUTTONS: Primär-Button Blau bleiben — aber konsistent ─────────────── */
.btn-primary {
    background: #111827 !important;
    color: #FFFFFF !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
}
.btn-primary:hover {
    background: #374151 !important;
    box-shadow: 0 4px 14px rgba(0,0,0,0.20) !important;
    transform: translateY(-1px) !important;
}
/* Ausnahme: Senden-Button im Chat darf Blau sein */
.agent-inbox-send-btn,
.chat-send-btn,
[class*="send"] .btn-primary,
button[type="submit"].btn-primary {
    background: #3C94F8 !important;
    box-shadow: 0 2px 8px rgba(60,148,248,0.25) !important;
}
.agent-inbox-send-btn:hover,
button[type="submit"].btn-primary:hover {
    background: #2878E8 !important;
}

/* ── 6. KACHELN: sauber weiß ohne Schmuck ──────────────────────────────────── */
.cc-kpi-green  { border-left: none !important; border-top: 3px solid #22D3A5 !important; }
.cc-kpi-yellow { border-left: none !important; border-top: 3px solid #F59E0B !important; }
.cc-kpi-red    { border-left: none !important; border-top: 3px solid #F43F5E !important; }

/* Challenge/Alert Kacheln: keine farbigen Borders */
.challenge-card, .challenge-item,
.alert-card, .alert-item,
.hint-card, .proactive-card {
    border: 1px solid rgba(0,0,0,0.07) !important;
    border-left: none !important;
    border-top: none !important;
}

/* ── 7. TAB-BUTTONS: neutral ───────────────────────────────────────────────── */
.tab-btn, .tab-link {
    color: #6B7280 !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 500 !important;
    border-bottom: 2px solid transparent !important;
}
.tab-btn.active, .tab-link.active {
    color: #111827 !important;
    border-bottom-color: #111827 !important;
    font-weight: 600 !important;
}
.tab-btn:hover, .tab-link:hover { color: #374151 !important; }

/* ════════════════════════════════════════════════════════════════════════════ */

/* ════ WAVE 5: Dot-Fix + Restfälle ══════════════════════════════════════════ */

/* Soul-Pulse-Dot: inline style.color wird durch !important überschrieben */
#soul-pulse-dot,
.soul-pulse {
    font-size: 7px !important;
    color: #D1D5DB !important;   /* inline style.color override */
    animation: none !important;
    opacity: 0.8 !important;
    vertical-align: middle !important;
}

/* Sende-Button Chat: bleibt blau */
#agent-inbox-form button[type="submit"],
.chat-form button[type="submit"] {
    background: #3C94F8 !important;
}

/* Soul-Widget: kein farbiger Rahmen */
.soul-widget {
    background: #F9FAFB !important;
    border: 1px solid rgba(0,0,0,0.07) !important;
}
.soul-widget-title {
    color: #374151 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
}

/* Alert-Rows in Soul und Planer: keine Colored Bullets */
.alert-row-dot, .sensor-dot, .muster-dot,
.proactive-dot, .hint-marker {
    width: 6px !important;
    height: 6px !important;
    background: #D1D5DB !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    animation: none !important;
    flex-shrink: 0 !important;
}

/* Challenge-Kacheln: Status-Icons neutral */
.challenge-icon, .challenge-status-dot {
    color: #9698AA !important;
    font-size: 14px !important;
}

/* Farbige Badge-Tags in Soul-Output (Fakta etc.) */
.soul-tag, .reflexion-tag, .output-tag {
    background: #F3F4F6 !important;
    color: #374151 !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
}

/* Allgemeiner Reset für farbige Kreise/Dots in Alerts */
[class*="severity-dot"],
[class*="alert-dot"],
[class*="status-circle"],
[class*="event-dot"] {
    background: #D1D5DB !important;
    box-shadow: none !important;
    animation: none !important;
}

/* Severity-Farben: NUR für echte kritische Zustände, sehr klein */
.severity-critical > [class*="dot"], .severity-high > [class*="dot"] {
    background: #F43F5E !important;
}
.severity-warning > [class*="dot"] {
    background: #F59E0B !important;
}

/* Section Icons in Überschriften: neutral grau */
.section-header h2 i,
.section-header h2 .fas,
.section-header h2 .far {
    color: #9698AA !important;
    font-size: 1.1rem !important;
    margin-right: 8px !important;
}

/* Tab-Icons neutral */
.tab-btn i, .tab-link i { color: #9698AA !important; font-size: 13px !important; margin-right: 5px !important; }
.tab-btn.active i, .tab-link.active i { color: #374151 !important; }

/* Sidebar Icons: neutral grau (für den Fall von Überschreibungen) */
.sidebar-nav li a i,
.sidebar-nav li a .fas,
.sidebar-nav li a .far {
    color: #9698AA !important;
    width: 18px !important;
    text-align: center !important;
    margin-right: 10px !important;
    font-size: 14px !important;
}
.sidebar-nav li a.active i,
.sidebar-nav li a.active .fas { color: #374151 !important; }

/* ════════════════════════════════════════════════════════════════════════════ */

/* ════ WAVE 6: Soul-Dot blau + animiert, Mood-Emoji weg ══════════════════════ */

/* Soul-Pulse-Dot in Sidebar: BLAU + Animation zurück */
#soul-pulse-dot,
.soul-pulse {
    font-size: 9px !important;
    color: #3C94F8 !important;
    animation: soul-beat 2.8s ease-in-out infinite !important;
    opacity: 1 !important;
    vertical-align: middle !important;
}
@keyframes soul-beat {
    0%, 100% { opacity: 1;   transform: scale(1);    }
    50%       { opacity: 0.4; transform: scale(0.6); }
}

/* Mood-Emoji in Soul-Seiten-Überschrift: verstecken */
#soul-widget-mood-big {
    display: none !important;
}

/* Soul Sensor Event Spans: sauber */
#soul-alerts-list span[style*="border-radius:4px"] {
    background: #F3F4F6 !important;
    color: #374151 !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
}

/* Alert-Rows Confirm-Button: neutral */
#soul-alerts-list button,
#planer-alerts-list button {
    background: transparent !important;
    border: 1px solid rgba(0,0,0,0.15) !important;
    color: #374151 !important;
}

/* Proaktive Hinweise Header-Label */
#planer-alerts-list [style*="letter-spacing:.08em"] {
    color: #374151 !important;
    font-family: 'Space Grotesk', sans-serif !important;
}

/* ════════════════════════════════════════════════════════════════════════════ */

/* ════ WAVE 7: Kalender + Upcoming + Restfälle ════════════════════════════════ */

/* ── Kalender: dunkle Zellen → hell ── */
.cal-day {
    background: #F9FAFB !important;
    border-radius: 6px !important;
    border: 1px solid rgba(0,0,0,0.05) !important;
    transition: background 0.15s ease !important;
}
.cal-day:hover {
    background: rgba(60,148,248,0.06) !important;
    border-color: rgba(60,148,248,0.15) !important;
}
.cal-day.today {
    border: 1.5px solid #3C94F8 !important;
    background: rgba(60,148,248,0.04) !important;
}
.cal-day.other-month { opacity: 0.4 !important; }
.cal-day-num {
    font-size: 11px !important;
    color: #9698AA !important;
    font-family: 'Inter', sans-serif !important;
}
.cal-day-header {
    color: #9698AA !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    font-size: 11px !important;
    letter-spacing: 0.04em !important;
}

/* Kalender Events: auf hellem Hintergrund */
.cal-event { border-radius: 4px !important; font-size: 10px !important; }
.cal-event.red    { background: rgba(244,63,94,0.12) !important;  color: #E11D48 !important; }
.cal-event.orange { background: rgba(245,158,11,0.12) !important; color: #D97706 !important; }
.cal-event.blue   { background: rgba(60,148,248,0.12) !important; color: #2563EB !important; }
.cal-event.green  { background: rgba(34,211,165,0.12) !important; color: #059669 !important; }
.cal-event.pink   { background: rgba(236,72,153,0.12) !important; color: #DB2777 !important; }
.cal-event.purple { background: rgba(168,85,247,0.12) !important; color: #7C3AED !important; }

/* ── Kalender: Interaktivität ── */
.cal-event {
    cursor: pointer !important;
    transition: opacity 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease !important;
    user-select: none !important;
}
.cal-event:hover {
    opacity: 0.82 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 8px rgba(15,17,23,0.10) !important;
}
.cal-event-done {
    opacity: 0.45 !important;
    text-decoration: line-through !important;
}
.cal-event-dragging {
    opacity: 0.35 !important;
    transform: scale(0.95) !important;
}
.cal-day-dragover {
    background: rgba(60,148,248,0.10) !important;
    border-color: rgba(60,148,248,0.35) !important;
    border-style: dashed !important;
}
@keyframes calDetailIn {
    from { opacity: 0; transform: translate(-50%,-48%) scale(0.96); }
    to   { opacity: 1; transform: translate(-50%,-50%) scale(1); }
}

/* Kalender Legende */
.cal-legend-dot { width: 8px !important; height: 8px !important; border-radius: 50% !important; }

/* ── Upcoming Events: weiße Cards ── */
.upcoming-event {
    background: #FFFFFF !important;
    border: 1px solid rgba(0,0,0,0.07) !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    margin-bottom: 6px !important;
    box-shadow: 0 1px 3px rgba(15,17,23,0.05) !important;
}
.upcoming-title {
    color: #111827 !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 13px !important;
    font-weight: 500 !important;
}
.upcoming-date {
    color: #9698AA !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 11px !important;
}
.upcoming-dot {
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
    margin-top: 5px !important;
}

/* ── Planer Tab "Alerts": Hinweise-Liste sauber ── */
#planer-alerts-list > div[style*="background:#0f172a"],
#planer-alerts-list > div[style*="background: #0f172a"] {
    background: #FFFFFF !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    color: #111827 !important;
}

/* ── Soul Alerts auf der Soul-Seite ── */
#soul-alerts-list > div[style*="background:#0f172a"],
#soul-alerts-list > div[style*="background: #0f172a"] {
    background: #FFFFFF !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
}

/* ── Planer Nav-Badge: bleibt rot aber kleiner ── */
#alert-badge {
    font-size: 10px !important;
    padding: 1px 5px !important;
    min-width: 16px !important;
}

/* ── Calendar Legend Labels ── */
.cal-legend { font-family: 'Inter', sans-serif !important; font-size: 12px !important; color: #6B7280 !important; }

/* ── Cal-Add Popup: hell ── */
.cal-add-popup {
    background: #FFFFFF !important;
    border: 1px solid rgba(0,0,0,0.10) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(15,17,23,0.12) !important;
}

/* ════════════════════════════════════════════════════════════════════════════ */

/* ════ WAVE 8: Soul-Dot definitiv fix — alle Konflikte aufgelöst ══════════════

   Problem: Wave 5 hatte animation:none auf #soul-widget .soul-pulse (Spez 1,1,0)
   welche Wave 6's #soul-pulse-dot (Spez 1,0,0) geschlagen hat.
   Lösung: höchste Spezifizität + JS setzt jetzt immer Brand Blue.
   ══════════════════════════════════════════════════════════════════════════ */

/* Alle alten soul-pulse Regeln mit maximaler Spezifität überschreiben */
.sidebar .soul-widget #soul-pulse-dot,
.sidebar .soul-widget .soul-pulse,
#soul-widget #soul-pulse-dot,
#soul-widget .soul-pulse {
    font-size: 12px !important;
    color: #3C94F8 !important;
    animation: soul-beat-v8 2.8s ease-in-out infinite !important;
    display: inline-block !important;
    opacity: 1 !important;
    background: none !important;
    width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
    vertical-align: middle !important;
    line-height: 1 !important;
}

@keyframes soul-beat-v8 {
    0%, 100% { opacity: 1;   transform: scale(1); }
    50%       { opacity: 0.3; transform: scale(0.55); }
}

/* Soul Widget container sauber */
.soul-widget {
    background: #F9FAFB !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    border-radius: 10px !important;
    margin: 8px 10px !important;
    padding: 10px 12px !important;
}
.soul-widget:hover {
    background: rgba(60,148,248,0.05) !important;
    border-color: rgba(60,148,248,0.15) !important;
}
.soul-widget-title {
    font-family: 'Inter', sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    letter-spacing: 0 !important;
}
.soul-widget-body {
    font-size: 12px !important;
    color: #9698AA !important;
    padding-left: 20px !important;
}

/* ════════════════════════════════════════════════════════════════════════════ */

/* ════ WAVE 9: Dot vertikal zentriert + große Puls-Animation ═════════════════ */

.soul-widget-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 7px !important;
    margin-bottom: 3px !important;
}

.sidebar .soul-widget #soul-pulse-dot,
.sidebar .soul-widget .soul-pulse,
#soul-widget #soul-pulse-dot,
#soul-widget .soul-pulse {
    display: inline-flex !important;
    align-self: center !important;
    vertical-align: middle !important;
    line-height: 1 !important;
    font-size: 10px !important;
    color: #3C94F8 !important;
    animation: soul-pulse-grow 2.4s ease-in-out infinite !important;
}

@keyframes soul-pulse-grow {
    0%   { transform: scale(1);   opacity: 1; }
    35%  { transform: scale(3.8); opacity: 0.7; }
    65%  { transform: scale(0.4); opacity: 0.3; }
    100% { transform: scale(1);   opacity: 1; }
}

/* ════════════════════════════════════════════════════════════════════════════ */

/* ════ WAVE 10: Dot transform-origin fix + größerer Gap ══════════════════════ */

.soul-widget-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 14px !important;
    margin-bottom: 3px !important;
}

.sidebar .soul-widget #soul-pulse-dot,
.sidebar .soul-widget .soul-pulse,
#soul-widget #soul-pulse-dot,
#soul-widget .soul-pulse {
    display: inline-block !important;
    flex-shrink: 0 !important;
    width: 10px !important;
    height: 10px !important;
    font-size: 10px !important;
    line-height: 10px !important;
    text-align: center !important;
    color: #3C94F8 !important;
    transform-origin: center center !important;
    animation: soul-pulse-grow 2.4s ease-in-out infinite !important;
    vertical-align: middle !important;
    position: relative !important;
    top: 0 !important;
}

@keyframes soul-pulse-grow {
    0%   { transform: scale(1);   opacity: 1; }
    35%  { transform: scale(3.8); opacity: 0.7; }
    65%  { transform: scale(0.4); opacity: 0.3; }
    100% { transform: scale(1);   opacity: 1; }
}

/* ════════════════════════════════════════════════════════════════════════════ */

/* ════════════════════════════════════════════════════════════════════════════
   WAVE FINAL: Vollständige CI-Bereinigung
   - Email: komplett hell
   - Kanban: neutrale Spaltenköpfe
   - Einstellungen: dunkle Überschriften
   - Indigo-Reste: alle weg
   ════════════════════════════════════════════════════════════════════════════ */

/* ── 1. EMAIL: komplett hell ─────────────────────────────────────────────── */

.email-layout {
    background: #FFFFFF !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    border-radius: 12px !important;
}
.email-folders {
    background: #F9FAFB !important;
    border-right: 1px solid rgba(0,0,0,0.08) !important;
}
.email-folder-item {
    color: #374151 !important;
    border-radius: 8px !important;
}
.email-folder-item:hover {
    background: rgba(60,148,248,0.07) !important;
    color: #111827 !important;
}
.email-folder-item.active {
    background: rgba(60,148,248,0.12) !important;
    color: #3C94F8 !important;
    font-weight: 600 !important;
}
.email-folder-badge {
    background: #F43F5E !important;
    color: #fff !important;
}
.email-list-panel {
    background: #FFFFFF !important;
    border-right: 1px solid rgba(0,0,0,0.08) !important;
}
.email-list-toolbar {
    background: #F9FAFB !important;
    border-bottom: 1px solid rgba(0,0,0,0.08) !important;
}
.email-list {
    background: #FFFFFF !important;
}
.email-list-item {
    border-bottom: 1px solid rgba(0,0,0,0.06) !important;
}
.email-list-item:hover {
    background: #F9FAFB !important;
}
.email-list-item.email-item-selected {
    background: rgba(60,148,248,0.08) !important;
}
.email-item-unread .email-item-from {
    color: #111827 !important;
    font-weight: 700 !important;
}
.email-item-unread .email-item-subject {
    color: #374151 !important;
    font-weight: 600 !important;
}
.email-item-from {
    color: #374151 !important;
    font-size: 13px !important;
}
.email-item-subject {
    color: #6B7280 !important;
    font-size: 13px !important;
}
.email-item-date {
    color: #9698AA !important;
}
.email-list-empty, .email-list-loading {
    color: #9698AA !important;
}
.email-preview-panel {
    background: #FFFFFF !important;
}
.email-preview-empty {
    color: #9698AA !important;
}
.email-preview-header {
    background: #F9FAFB !important;
    border-bottom: 1px solid rgba(0,0,0,0.08) !important;
}
.email-preview-subject {
    color: #111827 !important;
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 16px !important;
}
.email-preview-meta {
    color: #6B7280 !important;
}
.email-preview-meta strong {
    color: #374151 !important;
}
.email-preview-body {
    background: #FFFFFF !important;
    color: #374151 !important;
}
.email-preview-body pre {
    color: #374151 !important;
}
.email-compose-inner {
    background: #FFFFFF !important;
    border: 1px solid rgba(0,0,0,0.10) !important;
    box-shadow: 0 20px 60px rgba(15,17,23,0.18) !important;
}
.email-compose-header {
    background: #F9FAFB !important;
    border-bottom: 1px solid rgba(0,0,0,0.08) !important;
    color: #111827 !important;
}
.email-compose-field label {
    color: #374151 !important;
}
.email-compose-field .form-input,
.email-compose-body {
    background: #FFFFFF !important;
    border: 1px solid rgba(0,0,0,0.10) !important;
    color: #111827 !important;
}
.email-compose-field .form-input::placeholder,
.email-compose-body::placeholder {
    color: #9698AA !important;
}
.email-compose-field .form-input:focus {
    border-color: #3C94F8 !important;
    box-shadow: 0 0 0 3px rgba(60,148,248,0.15) !important;
}
.email-compose-footer {
    background: #F9FAFB !important;
    border-top: 1px solid rgba(0,0,0,0.08) !important;
}

/* ── 2. KANBAN: neutrale Spaltenköpfe ────────────────────────────────────── */

.kanban-col-neu {
    background: #F9FAFB !important;
    color: #374151 !important;
    border-bottom: 1px solid rgba(0,0,0,0.08) !important;
}
.kanban-col-in_bearbeitung {
    background: #F9FAFB !important;
    color: #374151 !important;
    border-bottom: 1px solid rgba(0,0,0,0.08) !important;
}
.kanban-col-erledigt {
    background: #F9FAFB !important;
    color: #374151 !important;
    border-bottom: 1px solid rgba(0,0,0,0.08) !important;
}
.kanban-column {
    background: #F7F8FC !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
}
.kanban-column.kanban-drop-target {
    border-color: #3C94F8 !important;
    box-shadow: 0 0 0 2px rgba(60,148,248,0.20) !important;
}
.kanban-card {
    background: #FFFFFF !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
}
.kanban-card:hover {
    box-shadow: 0 4px 14px rgba(60,148,248,0.10) !important;
    transform: translateY(-2px) !important;
}
.kanban-count {
    background: #FFFFFF !important;
    border: 1px solid rgba(0,0,0,0.10) !important;
    color: #374151 !important;
}

/* Kanban Priority Badges: dezent */
.tile-priority-badge.danger  { background: rgba(244,63,94,0.08)  !important; color: #E11D48 !important; }
.tile-priority-badge.warning { background: rgba(245,158,11,0.08) !important; color: #D97706 !important; }
.tile-priority-badge.info    { background: rgba(60,148,248,0.08) !important; color: #2563EB !important; }
.tile-priority-badge.neutral { background: #F3F4F6 !important; color: #6B7280 !important; }
.tile-priority-badge.success { background: rgba(34,211,165,0.08) !important; color: #059669 !important; }

/* ── 3. EINSTELLUNGEN: dunkle Überschriften ──────────────────────────────── */

.settings-group h3 {
    color: #111827 !important;
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em !important;
}
.settings-group {
    border-bottom: 1px solid rgba(0,0,0,0.08) !important;
    padding-bottom: 1.5rem !important;
}
.form-input:focus {
    border-color: #3C94F8 !important;
    box-shadow: 0 0 0 3px rgba(60,148,248,0.15) !important;
    outline: none !important;
}

/* Einstellungen Tab active: schwarz */
.settings-tabs .tab-btn.active,
[data-settings-tab].active,
.settings-tab.active {
    color: #111827 !important;
    border-bottom-color: #111827 !important;
}

/* ── 4. INSIGHT-PROSE & andere Überschriften ─────────────────────────────── */

.insight-prose h3 { color: #374151 !important; }
.insight-prose h2 { color: #111827 !important; }
.insight-prose h4 { color: #6B7280 !important; }

/* ── 5. HARDCODIERTES INDIGO: alles weg ──────────────────────────────────── */

/* pattern-conf score number */
.pattern-conf { color: #3C94F8 !important; }

/* Wochenpuls und andere Spezial-Scores */
[class*="score-num"]:not(.gk-score-num) { color: #111827 !important; }

/* Kpi values that still use primary-color */
.kpi-value, .cc-kpi-value { color: #111827 !important; }

/* Outline-Buttons: neutral statt indigo */
.btn-outline {
    border: 1.5px solid rgba(0,0,0,0.18) !important;
    color: #374151 !important;
    background: transparent !important;
}
.btn-outline:hover {
    background: #F3F4F6 !important;
    border-color: rgba(0,0,0,0.25) !important;
    transform: none !important;
}

/* Primär-Buttons: einheitlich dunkel AUSSER Senden/Submit in Chats */
.btn-primary {
    background: #111827 !important;
    color: #FFFFFF !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.20) !important;
}
.btn-primary:hover {
    background: #374151 !important;
    box-shadow: 0 3px 8px rgba(0,0,0,0.25) !important;
    transform: translateY(-1px) !important;
}
/* Ausnahme: Chat Senden-Button bleibt brand blue */
.agent-inbox-send-btn,
#chat-send-btn,
button.btn-primary[type="submit"] {
    background: #3C94F8 !important;
    box-shadow: 0 2px 8px rgba(60,148,248,0.25) !important;
}
.agent-inbox-send-btn:hover,
button.btn-primary[type="submit"]:hover {
    background: #2878E8 !important;
}

/* ── 6. ALLGEMEIN: verbleibende primary-color Text-Nutzungen ─────────────── */

/* Breadcrumb */
.breadcrumb a { color: #9698AA !important; }
.breadcrumb a:hover { color: #374151 !important; }

/* Chart section links */
.chart-section summary { color: #374151 !important; }

/* Toggle/Switch aktiv */
input[type="checkbox"]:checked {
    accent-color: #3C94F8 !important;
}

/* Modals: alle Modals hell */
.modal, .modal-overlay {
    background: rgba(15,17,23,0.50) !important;
}
.modal-content, .modal-box, .modal-inner,
[class*="modal-inner"],
[class*="modal-content"] {
    background: #FFFFFF !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    border-radius: 16px !important;
    box-shadow: 0 24px 64px rgba(15,17,23,0.18) !important;
    color: #374151 !important;
}
[class*="modal-header"],
[class*="modal-title"] {
    color: #111827 !important;
    font-family: 'Space Grotesk', sans-serif !important;
    border-bottom: 1px solid rgba(0,0,0,0.08) !important;
}
[class*="modal-body"] { color: #374151 !important; }
[class*="modal-footer"] {
    border-top: 1px solid rgba(0,0,0,0.08) !important;
    background: #F9FAFB !important;
}

/* ── 7. DETAIL-POPUP (Universal Modal) ───────────────────────────────────── */

#universal-modal .modal-content,
#detail-modal .modal-content,
.modal-dialog {
    background: #FFFFFF !important;
    border-radius: 16px !important;
    color: #374151 !important;
    box-shadow: 0 24px 64px rgba(15,17,23,0.18) !important;
}

/* ── 8. TOPBAR verfeinert ────────────────────────────────────────────────── */

.header {
    background: #FFFFFF !important;
    border-bottom: 1px solid rgba(0,0,0,0.08) !important;
    box-shadow: 0 1px 8px rgba(15,17,23,0.05) !important;
}

/* ════════════════════════════════════════════════════════════════════════════ */

/* ════════════════════════════════════════════════════════════════════════════
   WAVE CI-FINAL: Vollständige Corporate Identity — alle Reste
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Modal-Buttons: einheitlich ──────────────────────────────────────────── */
.tile-btn.tile-btn-done,
.btn-modal-close,
#modal-close-footer {
    background: #F3F4F6 !important;
    color: #374151 !important;
    border: 1px solid rgba(0,0,0,0.10) !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    padding: 10px 20px !important;
    cursor: pointer !important;
}
.tile-btn.tile-btn-done:hover,
.btn-modal-close:hover,
#modal-close-footer:hover {
    background: #E5E7EB !important;
    color: #111827 !important;
}
.btn-modal-navigate {
    background: #111827 !important;
    color: #FFFFFF !important;
    border: none !important;
    border-radius: 8px !important;
}
.btn-modal-navigate:hover {
    background: #374151 !important;
}

/* Detail Modal step items: neutraler linker Balken */
.detail-modal-body ol li {
    border-left: 3px solid rgba(0,0,0,0.10) !important;
    padding: 6px 10px !important;
    margin-bottom: 8px !important;
    border-radius: 0 6px 6px 0 !important;
    background: #F9FAFB !important;
    color: #374151 !important;
    list-style: none !important;
}

/* ── Karte/Card Buttons: neutral ─────────────────────────────────────────── */
.btn-card.btn-details {
    border-color: rgba(0,0,0,0.18) !important;
    color: #374151 !important;
    background: transparent !important;
}
.btn-card.btn-details:hover {
    background: #F3F4F6 !important;
    color: #111827 !important;
}
.btn-card.btn-done {
    border-color: rgba(0,0,0,0.18) !important;
    color: #374151 !important;
    background: transparent !important;
}
.btn-card.btn-done:hover {
    background: #F3F4F6 !important;
    color: #111827 !important;
}

/* ── Tagebuch: dunkel → hell ─────────────────────────────────────────────── */
.diary-entry {
    background: #FFFFFF !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    border-left: 3px solid rgba(0,0,0,0.12) !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    margin-bottom: 10px !important;
    box-shadow: 0 1px 3px rgba(15,17,23,0.05) !important;
}
.diary-entry-date { color: #9698AA !important; font-size: 11px !important; }
.diary-entry-text { color: #374151 !important; font-size: 14px !important; line-height: 1.6 !important; }
.diary-tag {
    background: #F3F4F6 !important;
    color: #374151 !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    padding: 2px 8px !important;
    border-radius: 999px !important;
    font-size: 11px !important;
}
.diary-entry-score { color: #9698AA !important; }

/* Soul Input */
.soul-input {
    background: #FFFFFF !important;
    border: 1px solid rgba(0,0,0,0.12) !important;
    color: #374151 !important;
    border-radius: 6px !important;
}
.soul-input:focus {
    border-color: #3C94F8 !important;
    outline: none !important;
}

/* ── Soul Alert Items: dunkel → hell ─────────────────────────────────────── */
.soul-alert-item {
    background: #FFFFFF !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    border-left: 3px solid rgba(0,0,0,0.12) !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    margin-bottom: 8px !important;
    box-shadow: 0 1px 3px rgba(15,17,23,0.05) !important;
}
.soul-alert-item.critical { border-left-color: #F43F5E !important; }
.soul-alert-item.high     { border-left-color: #F59E0B !important; }
.soul-alert-item.medium   { border-left-color: rgba(0,0,0,0.20) !important; }
.soul-alert-item.low      { border-left-color: rgba(0,0,0,0.12) !important; }
.soul-alert-msg { color: #374151 !important; }
.soul-alert-ts  { color: #9698AA !important; }

/* ── Soul Pattern Cards: dunkel → hell ───────────────────────────────────── */
.pattern-card {
    background: #FFFFFF !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    margin-bottom: 10px !important;
    box-shadow: 0 1px 3px rgba(15,17,23,0.05) !important;
}
.pattern-conf {
    color: #3C94F8 !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    font-family: 'Space Grotesk', sans-serif !important;
}
.pattern-desc { color: #374151 !important; font-size: 13px !important; }
.pattern-meta { color: #9698AA !important; font-size: 11px !important; }
.pattern-actions button {
    background: #F3F4F6 !important;
    color: #374151 !important;
    border: 1px solid rgba(0,0,0,0.10) !important;
    border-radius: 6px !important;
    padding: 4px 10px !important;
    font-size: 12px !important;
}
.pattern-actions button:hover {
    background: #E5E7EB !important;
    color: #111827 !important;
}

/* ── Tab-Bar: neutrales System ───────────────────────────────────────────── */
.tab-bar {
    border-bottom: 1px solid rgba(0,0,0,0.08) !important;
}
.tab-btn:hover { color: #374151 !important; }
.tab-btn.active {
    color: #111827 !important;
    border-bottom-color: #111827 !important;
    font-weight: 600 !important;
}

/* ── Integrationen Verbunden-Status ──────────────────────────────────────── */
.integration-status-connected,
.status-connected,
[class*="status"][class*="connected"],
.integration-card.connected .integration-status {
    color: #22D3A5 !important;
}
.integration-status-disconnected,
.status-disconnected {
    color: #9698AA !important;
}

/* ── Szenario Suggestion Chips ───────────────────────────────────────────── */
.scenario-chip, .suggestion-chip {
    background: #F3F4F6 !important;
    color: #374151 !important;
    border: 1px solid rgba(0,0,0,0.10) !important;
    border-radius: 999px !important;
}
.scenario-chip:hover, .suggestion-chip:hover {
    background: #E5E7EB !important;
}

/* ── Urgency Dots: dezenter ──────────────────────────────────────────────── */
.urgency-dot.urgent    { background: #F43F5E !important; }
.urgency-dot.this-week { background: #F59E0B !important; }
.urgency-dot.soon      { background: #F59E0B !important; }
.urgency-dot.info      { background: #9698AA !important; }
.urgency-label.urgent    { color: #F43F5E !important; }
.urgency-label.this-week { color: #F59E0B !important; }
.urgency-label.soon      { color: #F59E0B !important; }
.urgency-label.info      { color: #9698AA !important; }

/* ── Kanban "Erledigt" Button ────────────────────────────────────────────── */
.kanban-btn-done {
    background: transparent !important;
    border: 1px solid rgba(0,0,0,0.15) !important;
    color: #374151 !important;
    border-radius: 6px !important;
}
.kanban-btn-done:hover {
    background: #F3F4F6 !important;
    color: #111827 !important;
}

/* ── Alle verbleibenden inline-dark Elemente ─────────────────────────────── */
/* CSS override für alle noch dunklen Inline-Style-Container */
[style*="background:#0f172a"],
[style*="background: #0f172a"],
[style*="background:#1e293b"],
[style*="background: #1e293b"],
[style*="background:#1E293B"],
[style*="background:#14532d"] {
    background: #FFFFFF !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    color: #374151 !important;
}

/* ── Scrollbar konsistent ────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.25); }

/* ════════════════════════════════════════════════════════════════════════════ */

/* ════ WAVE LAST: Letzte gezielte Korrekturen ═════════════════════════════ */

/* Modal Buttons: tile-btn-detail (→ Optimierungsfahrplan) + tile-btn-done (Schließen) */
.tile-btn-detail,
.tile-btn-detail:hover,
#modal-section-link {
    background: #F3F4F6 !important;
    color: #374151 !important;
    border: 1px solid rgba(0,0,0,0.12) !important;
}
.tile-btn-detail:hover, #modal-section-link:hover {
    background: #E5E7EB !important;
    color: #111827 !important;
}
.tile-btn-done,
#modal-close-footer {
    background: #F3F4F6 !important;
    color: #374151 !important;
    border: 1px solid rgba(0,0,0,0.10) !important;
}
.tile-btn-done:hover, #modal-close-footer:hover {
    background: #E5E7EB !important;
    color: #111827 !important;
}

/* Email badge: verstecken wenn leer */
.email-folder-badge:empty {
    display: none !important;
}
.email-folder-badge {
    background: #F43F5E !important;
    color: #fff !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    min-width: 0 !important;
    padding: 1px 6px !important;
}

/* Email Posteingang active: sauber brand blue, kein roter Indikator */
.email-folder-item.active {
    background: rgba(60,148,248,0.10) !important;
    color: #3C94F8 !important;
    font-weight: 600 !important;
    border-left: 3px solid #3C94F8 !important;
    border-radius: 8px !important;
}
.email-folder-item.active::before,
.email-folder-item.active::after { display: none !important; }

/* ════════════════════════════════════════════════════════════════════════ */

/* ════ WAVE GK: Glaskugel-Bereich vollständige CI-Anpassung ══════════════════ */

/* ── Score (links): Space Grotesk statt Montserrat ───────────────────────── */
.gk-score-num {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 52px !important;
    font-weight: 700 !important;
    letter-spacing: -0.04em !important;
    line-height: 1 !important;
    color: #111827 !important;
}
.gk-score-label {
    font-family: 'Inter', sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #5A5C6E !important;
    margin-top: 6px !important;
    letter-spacing: 0.01em !important;
}
.gk-score-sublabel {
    font-family: 'Inter', sans-serif !important;
    font-size: 12px !important;
    color: #9698AA !important;
}

/* ── Leverage Karten (links unten) ──────────────────────────────────────── */
.gk-leverage-card {
    background: #F9FAFB !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    border-radius: 8px !important;
}
.gk-leverage-name {
    font-family: 'Inter', sans-serif !important;
    color: #374151 !important;
    font-size: 12px !important;
}
.gk-leverage-detail {
    color: #9698AA !important;
    font-size: 11px !important;
}
.gk-leverage-detail strong { color: #374151 !important; }
.gk-leverage-badge {
    font-family: 'Space Grotesk', sans-serif !important;
    font-weight: 700 !important;
    font-size: 14px !important;
}

/* ── Kausal-Graph Titel (rechts) ─────────────────────────────────────────── */
.gk-section-title {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    letter-spacing: -0.02em !important;
    text-align: left !important;
}
.gk-section-subtitle {
    font-family: 'Inter', sans-serif !important;
    font-size: 12px !important;
    color: #9698AA !important;
    margin-top: 2px !important;
}

/* ── Kausal-Pfade (unterhalb des Graphen) ────────────────────────────────── */
.gk-paths-title {
    font-family: 'Inter', sans-serif !important;
    font-size: 11px !important;
    color: #6B7280 !important;
    letter-spacing: 0.07em !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
}
.gk-path {
    border-radius: 8px !important;
    padding: 8px 12px !important;
    font-size: 12px !important;
}
.gk-path-risk {
    background: rgba(244,63,94,0.07) !important;
    border-left: 3px solid #F43F5E !important;
}
.gk-path-opp {
    background: rgba(34,211,165,0.07) !important;
    border-left: 3px solid #22D3A5 !important;
}
.gk-path-msg {
    font-family: 'Inter', sans-serif !important;
    color: #374151 !important;
    line-height: 1.5 !important;
}
.gk-path-risk .gk-path-msg { color: #9F1239 !important; }
.gk-path-opp  .gk-path-msg { color: #065F46 !important; }
.gk-path-risk .gk-path-icon { color: #F43F5E !important; }
.gk-path-opp  .gk-path-icon { color: #22D3A5 !important; }
.gk-no-paths {
    font-family: 'Inter', sans-serif !important;
    color: #9698AA !important;
    font-size: 13px !important;
}
.gk-loading { color: #9698AA !important; }

/* ── Graph-Legende (unterhalb) ───────────────────────────────────────────── */
.gk-graph-legend {
    background: #F9FAFB !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    border-radius: 8px !important;
    padding: 12px 14px !important;
}
.gk-legend-title {
    font-family: 'Inter', sans-serif !important;
    font-size: 11px !important;
    color: #6B7280 !important;
    letter-spacing: 0.06em !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
}
.gk-legend-body {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    padding: 10px 0 4px !important;
}
.gk-legend-row {
    font-family: 'Inter', sans-serif !important;
    font-size: 12px !important;
    color: #374151 !important;
    line-height: 1.5 !important;
}
.gk-legend-node {
    background: rgba(60,148,248,0.20) !important;
    border: 2px solid #3C94F8 !important;
}
.gk-legend-arrow { font-weight: 700 !important; }
.gk-legend-green { color: #22D3A5 !important; }
.gk-legend-red   { color: #F43F5E !important; }
.gk-legend-gray  { color: #9698AA !important; }

/* ── Calibration Badge ───────────────────────────────────────────────────── */
.gk-cal-live {
    background: rgba(34,211,165,0.10) !important;
    border: 1px solid #22D3A5 !important;
    color: #065F46 !important;
    font-family: 'Inter', sans-serif !important;
}
.gk-cal-hypothesis {
    background: rgba(245,158,11,0.10) !important;
    border: 1px solid #F59E0B !important;
    color: #92400E !important;
    font-family: 'Inter', sans-serif !important;
}

/* ── KPI Compact Bar (unterhalb der Glaskugel) ───────────────────────────── */
.kpi-compact-card {
    background: #FFFFFF !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    border-radius: 10px !important;
    box-shadow: 0 1px 4px rgba(15,17,23,0.06) !important;
}
.kpi-compact-label {
    font-family: 'Inter', sans-serif !important;
    font-size: 11px !important;
    color: #9698AA !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}
.kpi-compact-value {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    letter-spacing: -0.02em !important;
}
.kpi-compact-period {
    font-family: 'Inter', sans-serif !important;
    font-size: 10px !important;
    color: #9698AA !important;
    opacity: 1 !important;
}

/* ── Glaskugel Header Titel ───────────────────────────────────────────────── */
.glaskugel-title {
    font-family: 'Inter', sans-serif !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #6B7280 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.07em !important;
}
.glaskugel-update-ts {
    font-family: 'Inter', sans-serif !important;
    font-size: 11px !important;
    color: #9698AA !important;
}

/* ── Subsection Titles (Was ist heute wichtig / Nächste 7 Tage) ─────────── */
.subsection-title {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #111827 !important;
    letter-spacing: -0.01em !important;
}
.subsection-title i {
    color: #9698AA !important;
    font-size: 13px !important;
    margin-right: 6px !important;
}

/* ════════════════════════════════════════════════════════════════════════════ */

/* ════ WAVE GK2: Korrekturen ═════════════════════════════════════════════════ */

/* ── Kausal-Graph Titel: zurück zu zentriert + richtige Größe ────────────── */
.gk-section-title {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    letter-spacing: -0.02em !important;
    text-align: center !important;
    width: 100% !important;
    margin-bottom: 8px !important;
}
.gk-section-subtitle {
    font-family: 'Inter', sans-serif !important;
    font-size: 12px !important;
    color: #9698AA !important;
    text-align: center !important;
    margin-top: 2px !important;
}

/* ── Calibration Badge: Gelb → Brand Blue ───────────────────────────────── */
.gk-cal-hypothesis {
    background: rgba(60,148,248,0.10) !important;
    border: 1px solid #3C94F8 !important;
    color: #2878E8 !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
}
.gk-cal-live {
    background: rgba(34,211,165,0.10) !important;
    border: 1px solid #22D3A5 !important;
    color: #065F46 !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
}

/* ════════════════════════════════════════════════════════════════════════════ */

/* ════ WAVE TITLE: Kausal-Graph Überschrift = Score-Zahl Größe ══════════════ */

.gk-section-title {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 52px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    letter-spacing: -0.04em !important;
    line-height: 1 !important;
    text-align: center !important;
    width: 100% !important;
    margin-bottom: 4px !important;
}

/* ════════════════════════════════════════════════════════════════════════════ */

/* ════ WAVE TITLE2: Kausal-Graph Überschrift ausgewogen ═════════════════════ */

.gk-section-title {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 28px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    letter-spacing: -0.025em !important;
    line-height: 1.15 !important;
    text-align: center !important;
    width: 100% !important;
    margin-bottom: 6px !important;
}

.gk-section-subtitle {
    font-family: 'Inter', sans-serif !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    color: #9698AA !important;
    text-align: center !important;
    line-height: 1.5 !important;
    margin-top: 0 !important;
    margin-bottom: 12px !important;
    width: 100% !important;
    display: block !important;
}

/* ════════════════════════════════════════════════════════════════════════════ */

/* ════ WAVE: Brand CI — KPI-Kacheln & Kennzahlen-Bereich ════════════════════ */

/* ── 1. kpi-compact-bar — Kacheln unterhalb der Glaskugel ────────────────── */

.kpi-compact-bar {
    display: flex !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
    margin-bottom: 24px !important;
}

.kpi-compact-card {
    flex: 1 !important;
    min-width: 120px !important;
    background: #FFFFFF !important;
    border: 1px solid rgba(0,0,0,0.07) !important;
    border-radius: 12px !important;
    padding: 14px 16px 12px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
    box-shadow: 0 1px 4px rgba(15,17,23,0.06), 0 0 0 1px rgba(0,0,0,0.04) !important;
    transition: box-shadow 0.18s ease, transform 0.15s ease, border-color 0.18s ease !important;
    position: relative !important;
    overflow: hidden !important;
}

.kpi-compact-card:hover {
    box-shadow: 0 4px 16px rgba(15,17,23,0.10), 0 0 0 1px rgba(60,148,248,0.15) !important;
    transform: translateY(-2px) !important;
    border-color: rgba(60,148,248,0.18) !important;
}

.kpi-compact-label {
    font-family: 'Inter', sans-serif !important;
    font-size: 10px !important;
    font-weight: 500 !important;
    color: #9698AA !important;
    text-transform: uppercase !important;
    letter-spacing: 0.07em !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    opacity: 1 !important;
}

.kpi-compact-label i {
    color: #3C94F8 !important;
    font-size: 9px !important;
    opacity: 0.85 !important;
}

.kpi-compact-value {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #0F1117 !important;
    letter-spacing: -0.025em !important;
    line-height: 1.2 !important;
}

.kpi-compact-period {
    font-family: 'Inter', sans-serif !important;
    font-size: 10px !important;
    color: #9698AA !important;
    opacity: 1 !important;
    margin-top: 1px !important;
    letter-spacing: 0 !important;
}

/* ── 2. kpi-card — Kennzahlen & Charts Bereich (ERP-Kacheln) ─────────────── */

/* Hard-Reset aller border-top/color nth-child Overrides */
.kpi-card,
.kpi-card:nth-child(1),
.kpi-card:nth-child(2),
.kpi-card:nth-child(3),
.kpi-card:nth-child(4),
.kpi-card:nth-child(5),
.kpi-card:nth-child(6) {
    background: #FFFFFF !important;
    border: 1px solid rgba(0,0,0,0.07) !important;
    border-top: 1px solid rgba(0,0,0,0.07) !important;
    border-left: 1px solid rgba(0,0,0,0.07) !important;
    border-radius: 12px !important;
    padding: 20px !important;
    box-shadow: 0 1px 4px rgba(15,17,23,0.06), 0 0 0 1px rgba(0,0,0,0.04) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    transition: box-shadow 0.18s ease, transform 0.15s ease !important;
    overflow: hidden !important;
    position: relative !important;
}

.kpi-card:hover,
.kpi-card:nth-child(1):hover,
.kpi-card:nth-child(2):hover,
.kpi-card:nth-child(3):hover,
.kpi-card:nth-child(4):hover,
.kpi-card:nth-child(5):hover,
.kpi-card:nth-child(6):hover {
    box-shadow: 0 4px 16px rgba(15,17,23,0.10), 0 0 0 1px rgba(60,148,248,0.12) !important;
    transform: translateY(-2px) !important;
}

.kpi-icon-wrapper {
    width: 38px !important;
    height: 38px !important;
    border-radius: 10px !important;
    background: rgba(60,148,248,0.08) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
    color: #3C94F8 !important;
    margin-bottom: 0 !important;
    flex-shrink: 0 !important;
}

.kpi-icon-wrapper .kpi-icon,
.kpi-icon-wrapper i {
    color: #3C94F8 !important;
    font-size: 15px !important;
}

.kpi-content {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
}

.kpi-label {
    font-family: 'Inter', sans-serif !important;
    font-size: 10px !important;
    font-weight: 500 !important;
    color: #9698AA !important;
    text-transform: uppercase !important;
    letter-spacing: 0.07em !important;
    opacity: 1 !important;
}

.kpi-value {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 26px !important;
    font-weight: 700 !important;
    color: #0F1117 !important;
    letter-spacing: -0.025em !important;
    line-height: 1.1 !important;
}

.kpi-trend {
    font-family: 'Inter', sans-serif !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.kpi-trend.positive { color: #22D3A5 !important; }
.kpi-trend.negative { color: #F43F5E !important; }

/* ── kpi-sub — Unterzeile in ERP-Kacheln ──────────────────────────────────── */
.kpi-sub {
    font-family: 'Inter', sans-serif !important;
    font-size: 10px !important;
    font-weight: 400 !important;
    color: #9698AA !important;
    margin-top: 2px !important;
    line-height: 1.3 !important;
}

/* ── kpi-card row-Layout (Kennzahlen + ERP-Tab) ─────────────────────────── */
.collapsible-section .kpi-card,
.collapsible-section .kpi-card:nth-child(1),
.collapsible-section .kpi-card:nth-child(2),
.collapsible-section .kpi-card:nth-child(3),
.collapsible-section .kpi-card:nth-child(4),
.collapsible-section .kpi-card:nth-child(5),
.collapsible-section .kpi-card:nth-child(6),
#erp-fin-grid .kpi-card,
#erp-fin-grid .kpi-card:nth-child(1),
#erp-fin-grid .kpi-card:nth-child(2),
#erp-fin-grid .kpi-card:nth-child(3),
#erp-fin-grid .kpi-card:nth-child(4),
#erp-fin-grid .kpi-card:nth-child(5),
#erp-fin-grid .kpi-card:nth-child(6),
#erp-supplier-grid .kpi-card,
#erp-supplier-grid .kpi-card:nth-child(1),
#erp-supplier-grid .kpi-card:nth-child(2),
#erp-supplier-grid .kpi-card:nth-child(3),
#erp-supplier-grid .kpi-card:nth-child(4),
#erp-supplier-grid .kpi-card:nth-child(5),
#erp-supplier-grid .kpi-card:nth-child(6) {
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 10px !important;
    padding: 16px 18px !important;
    text-align: left !important;
}
.collapsible-section .kpi-icon-wrapper,
#erp-fin-grid .kpi-icon-wrapper,
#erp-supplier-grid .kpi-icon-wrapper {
    width: 34px !important;
    height: 34px !important;
    flex-shrink: 0 !important;
    margin-top: 2px !important;
    margin-bottom: 0 !important;
}
.collapsible-section .kpi-content,
#erp-fin-grid .kpi-content,
#erp-supplier-grid .kpi-content {
    flex: 1 !important;
    min-width: 0 !important;
    gap: 3px !important;
}
.collapsible-section .kpi-value,
#erp-fin-grid .kpi-value,
#erp-supplier-grid .kpi-value {
    font-size: 20px !important;
}

/* ── 3. chart-card — Charts in der Kennzahlen-Sektion ─────────────────────── */

.chart-card {
    background: #FFFFFF !important;
    border: 1px solid rgba(0,0,0,0.07) !important;
    border-radius: 12px !important;
    padding: 20px 20px 20px !important;
    box-shadow: 0 1px 4px rgba(15,17,23,0.06), 0 0 0 1px rgba(0,0,0,0.04) !important;
    transition: box-shadow 0.18s ease !important;
}

.chart-card h3 {
    font-family: 'Inter', sans-serif !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #9698AA !important;
    text-transform: uppercase !important;
    letter-spacing: 0.07em !important;
    margin: 0 0 20px !important;
}

.chart-card canvas {
    height: 260px !important;
}

/* ── 4. chart-section summary toggle ─────────────────────────────────────── */

.chart-section {
    margin-top: 16px !important;
    border-top: 1px solid rgba(0,0,0,0.07) !important;
    padding-top: 2px !important;
}

.chart-section summary {
    font-family: 'Inter', sans-serif !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    color: #9698AA !important;
    letter-spacing: 0.03em !important;
    padding: 10px 0 !important;
    cursor: pointer !important;
    user-select: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    transition: color 0.18s ease !important;
    list-style: none !important;
}

.chart-section summary:hover {
    color: #3C94F8 !important;
}

.chart-section summary i {
    color: #3C94F8 !important;
    font-size: 11px !important;
}

/* ════════════════════════════════════════════════════════════════════════════ */

/* ════ WAVE: Alle farbigen border-left entfernen (site-wide) ════════════════ */

.gk-path, .gk-path-risk, .gk-path-opp,
.gk-path-card, .gk-path-card.gk-path-risk, .gk-path-card.gk-path-opp,
.cc-kpi-green, .cc-kpi-yellow, .cc-kpi-red,
.action-preview-item,
.toast-success, .toast-error, .toast-info, .toast-warning,
.agent-inbox-card,
.ops-task-inprog,
.alert-card, .alert-item {
    border-left: none !important;
}

/* ════ WAVE: Kausalpfade — einklappbarer Gesamtbereich ══════════════════════ */

/* Section toggle */
.gk-paths-section {
    margin-top: 8px !important;
    border-top: 1px solid rgba(0,0,0,0.07) !important;
}

.gk-paths-toggle {
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    padding: 10px 0 !important;
    cursor: pointer !important;
    list-style: none !important;
    user-select: none !important;
    transition: opacity 0.15s ease !important;
}
.gk-paths-toggle:hover { opacity: 0.75 !important; }
.gk-paths-toggle::-webkit-details-marker { display: none !important; }

.gk-paths-toggle-icon {
    font-size: 11px !important;
    color: #3C94F8 !important;
}

.gk-paths-title {
    font-family: 'Inter', sans-serif !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #5A5C6E !important;
    text-transform: uppercase !important;
    letter-spacing: 0.07em !important;
    flex: 1 !important;
}

.gk-paths-count {
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 10px !important;
    font-weight: 500 !important;
    color: #FFFFFF !important;
    background: #3C94F8 !important;
    border-radius: 10px !important;
    padding: 1px 7px !important;
    flex-shrink: 0 !important;
}

.gk-paths-chevron {
    font-size: 9px !important;
    color: var(--primary-color) !important;
    flex-shrink: 0 !important;
    transition: transform 0.20s ease !important;
}
.gk-paths-section[open] .gk-paths-chevron {
    transform: rotate(180deg) !important;
}

/* Cards list */
.gk-paths-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
    padding-bottom: 4px !important;
}

/* Individual card */
.gk-path-card {
    background: #FFFFFF !important;
    border: 1px solid rgba(0,0,0,0.07) !important;
    border-left: none !important;
    border-radius: 10px !important;
    padding: 9px 12px !important;
    box-shadow: 0 1px 3px rgba(15,17,23,0.05) !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 9px !important;
    transition: box-shadow 0.15s ease !important;
}
.gk-path-card:hover {
    box-shadow: 0 2px 8px rgba(15,17,23,0.09) !important;
}

.gk-path-icon {
    font-size: 11px !important;
    flex-shrink: 0 !important;
    margin-top: 2px !important;
    width: 13px !important;
    text-align: center !important;
}
.gk-path-risk .gk-path-icon { color: #F43F5E !important; }
.gk-path-opp  .gk-path-icon { color: #22D3A5 !important; }

.gk-path-content {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
    flex: 1 !important;
    min-width: 0 !important;
}

.gk-path-summary {
    font-family: 'Inter', sans-serif !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    color: #374151 !important;
    line-height: 1.5 !important;
}

.gk-path-meta-row {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}

.gk-path-route {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #5A5C6E !important;
    flex: 1 !important;
}
.gk-path-arrow { color: #C4C6D2 !important; }

.gk-path-type-badge {
    font-family: 'Inter', sans-serif !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    border-radius: 4px !important;
    padding: 1px 6px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    flex-shrink: 0 !important;
}
.gk-badge-risk { color: #F43F5E !important; background: rgba(244,63,94,0.08) !important; }
.gk-badge-opp  { color: #22D3A5 !important; background: rgba(34,211,165,0.08) !important; }

.gk-path-lag-detail {
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 10px !important;
    color: #9698AA !important;
    display: flex !important;
    align-items: center !important;
    gap: 3px !important;
    flex-shrink: 0 !important;
}

/* ════════════════════════════════════════════════════════════════════════════ */

/* ════ WAVE: Soul-Widget — Alignment + Smooth Animation ═════════════════════ */

/* 1. Header als Grid — Dot in fester Spalte, Titel mit Abstand rechts */
.soul-widget-header {
    display: grid !important;
    grid-template-columns: 22px 1fr !important;
    align-items: center !important;
    gap: 0 !important;
    margin-bottom: 2px !important;
}

/* 2. Body linksbündig mit Titel-Text */
.soul-widget-body,
#soul-widget-body {
    padding-left: 22px !important;
    font-size: 12px !important;
    color: #9698AA !important;
}

/* 3. Dot: echter CSS-Kreis, ~1mm höher, höchste Spezifität */
.sidebar .soul-widget #soul-pulse-dot,
.sidebar .soul-widget .soul-pulse,
#soul-widget #soul-pulse-dot,
#soul-widget .soul-pulse {
    font-size: 0 !important;
    color: transparent !important;
    display: inline-block !important;
    width: 10px !important;
    height: 10px !important;
    line-height: 10px !important;
    border-radius: 50% !important;
    background: #3C94F8 !important;
    transform-origin: center center !important;
    position: relative !important;
    top: -3px !important;
    will-change: transform !important;
    animation: soul-ripple-v11 2.0s linear infinite !important;
    opacity: 1 !important;
    flex-shrink: 0 !important;
}

/* Farb-Varianten */
.sidebar .soul-widget #soul-pulse-dot.green,
#soul-widget #soul-pulse-dot.green  { background: #22D3A5 !important; }
.sidebar .soul-widget #soul-pulse-dot.yellow,
#soul-widget #soul-pulse-dot.yellow { background: #F59E0B !important; }
.sidebar .soul-widget #soul-pulse-dot.red,
#soul-widget #soul-pulse-dot.red    { background: #F43F5E !important; }

/* 4. Puls-Animation: nur transform, linear (GPU-only, kein Pause an Keyframes) */
@keyframes soul-ripple-v11 {
    0%   { transform: scale(1);    }
    30%  { transform: scale(1.25); }
    65%  { transform: scale(0.42); }
    100% { transform: scale(1);    }
}

/* ════════════════════════════════════════════════════════════════════════════ */

/* ════ WAVE: Karte — CartoDB Positron + Premium Tooltips ════════════════════ */

#countryMap {
    border-radius: 10px !important;
    overflow: hidden !important;
}

.leaflet-tooltip.map-tt {
    background: rgba(15,17,23,0.93) !important;
    border: 1px solid rgba(255,255,255,0.09) !important;
    border-radius: 10px !important;
    padding: 10px 14px !important;
    box-shadow: 0 8px 24px rgba(15,17,23,0.28) !important;
    color: #FFFFFF !important;
    pointer-events: none !important;
}
.leaflet-tooltip.map-tt::before {
    border-top-color: rgba(15,17,23,0.93) !important;
}
.mtt-country {
    font-family: 'Inter', sans-serif !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    color: #9698AA !important;
    text-transform: uppercase !important;
    letter-spacing: 0.07em !important;
    margin-bottom: 4px !important;
}
.mtt-revenue {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #FFFFFF !important;
    letter-spacing: -0.02em !important;
    line-height: 1.2 !important;
}
.mtt-orders {
    font-family: 'Inter', sans-serif !important;
    font-size: 11px !important;
    color: #9698AA !important;
    margin-top: 3px !important;
}

.leaflet-control-zoom {
    border: none !important;
    box-shadow: 0 1px 4px rgba(15,17,23,0.10), 0 0 0 1px rgba(0,0,0,0.06) !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}
.leaflet-control-zoom a {
    background: #FFFFFF !important;
    color: #374151 !important;
    border: none !important;
    border-bottom: 1px solid rgba(0,0,0,0.07) !important;
    width: 28px !important;
    height: 28px !important;
    line-height: 28px !important;
    font-size: 16px !important;
    transition: background 0.15s ease !important;
}
.leaflet-control-zoom a:hover { background: #F0F2F8 !important; }
.leaflet-control-zoom-out { border-bottom: none !important; }

.leaflet-control-attribution {
    font-size: 9px !important;
    background: rgba(255,255,255,0.70) !important;
    color: #9698AA !important;
    padding: 1px 6px !important;
    border-radius: 4px 0 0 0 !important;
}
.leaflet-control-attribution a { color: #9698AA !important; }

/* ════════════════════════════════════════════════════════════════════════════ */

/* ── INTEGRATION LIVE-API BADGES & LAYOUT ──────────────────────────── */
.intg-category-group { margin-bottom: 28px; }
.intg-category-header {
    font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    color: #64748B; border-bottom: 1px solid #1e1e2e; padding-bottom: 8px; margin-bottom: 12px;
    display: flex; align-items: center; gap: 8px;
}
.intg-cat-count {
    background: #1e1e2e; color: #7c3aed; font-size: 10px;
    padding: 1px 6px; border-radius: 9px; font-weight: 600;
}
.intg-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}
.intg-icon-wrap { font-size: 1.5rem; margin-bottom: 4px; opacity: 0.85; }
.intg-name { font-size: 13px; font-weight: 600; color: #CBD5E1; margin: 6px 0 4px; }
.intg-desc { font-size: 11px; color: #475569; line-height: 1.4; margin: 0 0 8px; }

/* Status badges */
.intg-status-badge {
    display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 0.05em;
    padding: 2px 8px; border-radius: 10px; text-transform: uppercase;
}
.badge-live         { background: rgba(34,197,94,0.15); color: #22c55e; border: 1px solid rgba(34,197,94,0.3); }
.badge-configured   { background: rgba(60,148,248,0.15); color: #3C94F8; border: 1px solid rgba(60,148,248,0.3); }
.badge-demo         { background: rgba(124,58,237,0.12); color: #8b5cf6; border: 1px solid rgba(124,58,237,0.25); }
.badge-inactive     { background: rgba(71,85,105,0.15); color: #64748B; border: 1px solid rgba(71,85,105,0.3); }

/* Card state tinting */
.intg-badge-live     { border-color: rgba(34,197,94,0.25) !important; }
.intg-badge-configured { border-color: rgba(60,148,248,0.25) !important; }
.intg-badge-demo     { border-color: rgba(124,58,237,0.2); }
.intg-badge-inactive { opacity: 0.65; }

/* Demo/Live mode summary pills */
.badge-demo-mode { background: rgba(124,58,237,0.15); color: #8b5cf6; font-size: 11px; padding: 2px 8px; border-radius: 10px; }
.badge-live-mode { background: rgba(34,197,94,0.15); color: #22c55e; font-size: 11px; padding: 2px 8px; border-radius: 10px; }

/* Danger-soft button for disconnect */
.btn-danger-soft {
    background: transparent; border: 1px solid rgba(239,68,68,0.4);
    color: #ef4444; border-radius: 6px; padding: 4px 10px; font-size: 12px; cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.btn-danger-soft:hover { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.6); }

/* Summary stat colors */
.summary-stat.live   strong { color: #22c55e; }
.summary-stat.demo   strong { color: #8b5cf6; }
.summary-stat.inactive strong { color: #64748B; }

/* ════════════════════════════════════════════════════════════════════════════
   DARK MODE — Vollständiges Override aller WAVE-Blöcke
   Muss am Ende stehen damit !important greift
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Grundstruktur ── */
body.dark-mode {
    background-color: #0F172A !important;
    color: #CBD5E1 !important;
}
body.dark-mode .main-content {
    background-color: #0F172A !important;
}
body.dark-mode .sidebar {
    background-color: #1E293B !important;
    border-right-color: #334155 !important;
}
body.dark-mode .header {
    background: #1E293B !important;
    border-bottom-color: #334155 !important;
    box-shadow: 0 1px 8px rgba(0,0,0,0.4) !important;
}

/* ── Texte ── */
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3,
body.dark-mode h4, body.dark-mode h5, body.dark-mode h6 {
    color: #F1F5F9 !important;
}
body.dark-mode .section-header h2 { color: #F1F5F9 !important; }
body.dark-mode .header h1, body.dark-mode .header-title { color: #F1F5F9 !important; }
body.dark-mode .kpi-card-value, body.dark-mode .kpi-value,
body.dark-mode .cc-kpi-value { color: #F1F5F9 !important; }
body.dark-mode .chart-card h3 { color: #F1F5F9 !important; }
body.dark-mode .kpi-card h3 { color: #94A3B8 !important; }
body.dark-mode p, body.dark-mode li, body.dark-mode td, body.dark-mode span:not([class*="badge"]):not([class*="pill"]):not([class*="dot"]):not([class*="tag"]) {
    color: inherit;
}

/* ── Karten & Container ── */
body.dark-mode .kpi-card,
body.dark-mode .chart-card, body.dark-mode .card,
body.dark-mode .glass-card, body.dark-mode .content-card,
body.dark-mode .section-card,
body.dark-mode .cc-kpi-card,
body.dark-mode .agent-inbox-card,
body.dark-mode .glaskugel-container,
body.dark-mode .challenge-card, body.dark-mode .challenge-item,
body.dark-mode .action-preview-card, body.dark-mode .preview-card,
body.dark-mode .action-preview-item,
body.dark-mode .task-item, body.dark-mode .todo-item, body.dark-mode .week-task,
body.dark-mode .alert-card, body.dark-mode .alert-item,
body.dark-mode .modal-content, body.dark-mode .modal-box,
body.dark-mode .intg-card {
    background: #1E293B !important;
    border-color: #334155 !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4) !important;
}
body.dark-mode .kpi-card:nth-child(n) {
    border: 1px solid #334155 !important;
}

/* ── Kanban ── */
body.dark-mode .kanban-column {
    background: #162032 !important;
    border-color: #334155 !important;
}
body.dark-mode .kanban-card {
    background: #1E293B !important;
    border-color: #334155 !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3) !important;
}

/* ── Inputs & Forms ── */
body.dark-mode .search-bar input,
body.dark-mode input[type="text"],
body.dark-mode input[type="search"],
body.dark-mode input[type="email"],
body.dark-mode input[type="password"],
body.dark-mode input[type="number"],
body.dark-mode textarea, body.dark-mode select {
    background: #0F172A !important;
    border-color: #334155 !important;
    color: #CBD5E1 !important;
}
body.dark-mode .search-bar input:focus,
body.dark-mode input:focus, body.dark-mode textarea:focus, body.dark-mode select:focus {
    background: #1E293B !important;
    border-color: #3C94F8 !important;
}
body.dark-mode .search-bar input::placeholder,
body.dark-mode input::placeholder, body.dark-mode textarea::placeholder {
    color: #475569 !important;
}
body.dark-mode .agent-inbox-input {
    background: #0F172A !important;
    border-color: #334155 !important;
    color: #CBD5E1 !important;
}

/* ── Tabellen ── */
body.dark-mode .data-table th {
    background: #162032 !important;
    color: #64748B !important;
}
body.dark-mode .data-table td { color: #CBD5E1 !important; }
body.dark-mode .data-table tbody tr:hover { background: rgba(60,148,248,0.07) !important; }

/* ── Nav Links ── */
body.dark-mode .sidebar-nav li a {
    color: #94A3B8 !important;
    background: transparent !important;
}
body.dark-mode .sidebar-nav li a i { color: #64748B !important; }
body.dark-mode .sidebar-nav li a:hover {
    background-color: rgba(255,255,255,0.06) !important;
    color: #F1F5F9 !important;
}
body.dark-mode .sidebar-nav li a:hover i { color: #94A3B8 !important; }
body.dark-mode .sidebar-nav li a.active {
    background: rgba(60,148,248,0.15) !important;
    color: #60A5FA !important;
    border-left-color: #3C94F8 !important;
}
body.dark-mode .sidebar-nav li a.active i { color: #60A5FA !important; }

/* ── Soul Widget ── */
body.dark-mode .soul-widget {
    background: linear-gradient(135deg,rgba(60,148,248,0.10),rgba(168,85,247,0.06)) !important;
    border-color: rgba(60,148,248,0.25) !important;
}

/* ── Agent Inbox Header ── */
body.dark-mode .agent-inbox-header {
    background: linear-gradient(90deg,rgba(60,148,248,0.12),rgba(168,85,247,0.06)) !important;
    border-bottom-color: rgba(60,148,248,0.20) !important;
}

/* ── Glaskugel ── */
body.dark-mode .glaskugel-container {
    background: #1E293B !important;
    border-color: rgba(60,148,248,0.20) !important;
}
body.dark-mode .glaskugel-title { color: #94A3B8 !important; }
body.dark-mode .gk-score-label  { color: #94A3B8 !important; }
body.dark-mode .gk-score-sublabel { color: #64748B !important; }
body.dark-mode .gk-leverage-bar-track { background: rgba(255,255,255,0.08) !important; }

/* ── Scrollbar ── */
body.dark-mode ::-webkit-scrollbar-track { background: #1E293B; }
body.dark-mode ::-webkit-scrollbar-thumb { background: rgba(60,148,248,0.35); }

/* ── Integrations ── */
body.dark-mode .intg-category-title { color: #94A3B8 !important; }
body.dark-mode .intg-card-name { color: #F1F5F9 !important; }

/* ── Search Dropdown ── */
body.dark-mode .search-dropdown {
    background: #1E293B !important;
    border-color: #334155 !important;
}
body.dark-mode .search-item:hover { background: rgba(255,255,255,0.05) !important; }
body.dark-mode .search-item-title { color: #F1F5F9 !important; }
body.dark-mode .search-item-subtitle { color: #64748B !important; }
body.dark-mode .search-group-header { color: #475569 !important; }

/* ── Modal ── */
body.dark-mode .cc-modal-overlay { background: rgba(0,0,0,0.7) !important; }
body.dark-mode .cc-modal-body { background: #1E293B !important; color: #CBD5E1 !important; }
body.dark-mode .cc-modal-header { border-bottom-color: #334155 !important; }

/* ── Breadcrumb ── */
body.dark-mode .breadcrumb a { color: #64748B !important; }
body.dark-mode .breadcrumb a:hover { color: #94A3B8 !important; }

/* ── Action-Plan Preview ── */
body.dark-mode .action-preview-item {
    background: #1E293B !important;
    border-color: #334155 !important;
}

/* ── Kanban column header ── */
body.dark-mode .kanban-col-header { color: #94A3B8 !important; }

/* ── Email section ── */
body.dark-mode .email-list-item { background: #1E293B !important; border-color: #334155 !important; }
body.dark-mode .email-detail    { background: #1E293B !important; }
body.dark-mode .email-folder-item { color: #94A3B8 !important; }
body.dark-mode .email-folder-item:hover { background: rgba(255,255,255,0.05) !important; }

/* ── Ops / Operations ── */
body.dark-mode .ops-tab-btn { color: #64748B !important; }
body.dark-mode .ops-tab-btn.active { color: #3C94F8 !important; }

/* ── ML Output Components ── */

/* SHAP customer risk card */
.shap-card {
    background: #FAFBFC;
    border: 1px solid rgba(0,0,0,0.07);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 10px;
    transition: box-shadow .15s ease;
}
.shap-card:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

/* Safety stock widget */
.safety-stock-widget {
    background: #F7F8FC;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 8px;
}
.safety-stock-widget .ss-kpi {
    text-align: center;
}
.safety-stock-widget .ss-kpi-val {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.1;
}
.safety-stock-widget .ss-kpi-label {
    font-size: 11px;
    color: #9698AA;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* Loss leader badge card */
.loss-leader-badge {
    background: linear-gradient(135deg, rgba(167,139,250,.06) 0%, rgba(60,148,248,.04) 100%);
    border: 1px solid rgba(167,139,250,.25);
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 12px;
    transition: box-shadow .15s ease;
}
.loss-leader-badge:hover {
    box-shadow: 0 4px 16px rgba(167,139,250,.12);
}
.loss-leader-tag {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 99px;
    background: rgba(167,139,250,.15);
    color: #A78BFA;
}

/* KM survival chart container */
.km-chart-container {
    position: relative;
    height: 200px;
    margin-top: 12px;
}

/* Dark mode variants */
body.dark-mode .shap-card {
    background: #1E293B;
    border-color: rgba(255,255,255,0.08);
}
body.dark-mode .safety-stock-widget {
    background: #1A2235;
    border-color: rgba(255,255,255,0.07);
}
body.dark-mode .loss-leader-badge {
    background: linear-gradient(135deg, rgba(167,139,250,.08) 0%, rgba(60,148,248,.05) 100%);
    border-color: rgba(167,139,250,.2);
}

/* ── Glaskugel Zukunft: Crystal-Ball Vision ──────────────────────────────── */
.gk-zukunft {
    margin-top: 28px;
    border-top: 1px solid rgba(60,148,248,0.15);
    padding-top: 22px;
}

.gk-zukunft-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.gk-zukunft-divider-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #3C94F8;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 7px;
}

.gk-demo-badge {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #F59E0B;
    background: rgba(245,158,11,0.12);
    border: 1px solid rgba(245,158,11,0.35);
    border-radius: 5px;
    padding: 2px 8px;
}

.gk-tl-loading {
    color: #64748b;
    font-size: 12px;
    font-style: italic;
    padding: 8px 0;
}

/* Timeline: outer container with breathing room above/below */
.gk-timeline-wrap {
    position: relative;
    overflow: visible;
    padding-top: 59px;
    padding-bottom: 155px;
    margin-bottom: 8px;
}

/* Ambient glow behind the track */
.gk-timeline-wrap::before {
    content: '';
    position: absolute;
    inset: 40px -24px 10px;
    background:
        radial-gradient(ellipse 80% 40% at 25% 55%, rgba(124,58,237,0.07) 0%, transparent 70%),
        radial-gradient(ellipse 80% 40% at 75% 45%, rgba(6,182,212,0.06) 0%, transparent 70%);
    pointer-events: none;
    border-radius: 20px;
}

/* ── Timeline rail: just track + dots, cards overflow outside ───── */
.gk-timeline-rail {
    position: relative;
    height: 240px;
    margin: 0 10px;
    overflow: visible;
}

/* Glowing gradient track: purple → blue → teal */
.gk-tl-track-line {
    position: absolute;
    top: calc(50% - 1.5px);
    left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        rgba(124,58,237,0.0),
        rgba(124,58,237,0.60) 12%,
        rgba(60,148,248,0.75) 50%,
        rgba(6,182,212,0.60) 88%,
        rgba(6,182,212,0.0)
    );
    border-radius: 3px;
    box-shadow:
        0 0 14px rgba(60,148,248,0.35),
        0 0 32px rgba(60,148,248,0.14),
        0 1px 4px rgba(60,148,248,0.18);
    overflow: hidden;
}

/* Animated shimmer sweep */
.gk-tl-track-line::after {
    content: '';
    position: absolute;
    top: -2px; bottom: -2px;
    width: 100px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.50), transparent);
    animation: gkTrackShimmer 3.8s infinite linear;
    border-radius: 3px;
}

@keyframes gkTrackShimmer {
    0%   { left: -100px; }
    100% { left: calc(100% + 100px); }
}

/* Axis ticks — float BELOW the rail, clear of below-cards */
.gk-tl-axis {
    position: absolute;
    bottom: -120px;
    left: 0; right: 0;
    height: 22px;
    border-top: 1px solid rgba(60,148,248,0.13);
}

.gk-tl-tick {
    position: absolute;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 500;
    color: #64748b;
    top: 5px;
    white-space: nowrap;
    letter-spacing: 0.04em;
}

/* Pin: centered exactly on track */
.gk-ev-pin {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
}

/* Glow dot — 40px with breathing animation */
.gk-ev-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    transition: transform 0.22s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.22s ease;
    position: relative;
    z-index: 5;
    flex-shrink: 0;
    animation: gkDotBreath 4.5s ease-in-out infinite;
}

.gk-ev-dot:hover {
    transform: scale(1.20);
}

@keyframes gkDotBreath {
    0%, 100% { opacity: 1.0; }
    50%       { opacity: 0.75; }
}

/* Connector: from dot edge to card */
.gk-ev-connector {
    position: absolute;
    width: 2px;
    left: 50%;
    transform: translateX(-50%);
    height: 22px;
    opacity: 0.50;
    border-radius: 2px;
}

.gk-ev-conn-above { bottom: 100%; }
.gk-ev-conn-below { top: 100%; }

/* Card: glassmorphism, always visible, colored top accent */
.gk-ev-card-glass {
    position: absolute;
    width: 144px;
    left: 50%;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255,255,255,0.75);
    border-radius: 13px;
    padding: 10px 13px 9px;
    box-shadow:
        0 1px 2px rgba(15,23,42,0.04),
        0 4px 14px rgba(15,23,42,0.09),
        0 16px 40px rgba(15,23,42,0.08),
        inset 0 1px 0 rgba(255,255,255,1);
    z-index: 6;
}

.gk-ev-card-above {
    bottom: calc(100% + 22px);
    transform: translateX(-50%);
    animation: gkCardAbove 0.48s cubic-bezier(0.22,1,0.36,1) both;
}

.gk-ev-card-below {
    top: calc(100% + 22px);
    transform: translateX(-50%);
    animation: gkCardBelow 0.48s cubic-bezier(0.22,1,0.36,1) both;
}

@keyframes gkCardAbove {
    from { opacity: 0; transform: translateX(-50%) translateY(-16px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes gkCardBelow {
    from { opacity: 0; transform: translateX(-50%) translateY(16px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Card content */
.gk-ev-day-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    border-radius: 4px;
    padding: 1px 6px;
    margin-bottom: 5px;
    letter-spacing: 0.04em;
}

.gk-ev-demo-tag {
    font-size: 9px;
    font-weight: 700;
    color: #F59E0B;
    background: rgba(245,158,11,0.15);
    border-radius: 3px;
    padding: 1px 4px;
    letter-spacing: 0.06em;
}

.gk-ev-card-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    letter-spacing: -0.01em;
    margin-bottom: 3px;
}

.gk-ev-card-detail {
    font-size: 11px;
    color: #64748b;
    line-height: 1.4;
    margin-bottom: 5px;
}

.gk-ev-card-impact {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.gk-ev-impact-suffix {
    display: block;
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 10px;
    font-weight: 400;
    color: #94a3b8;
    letter-spacing: 0;
    margin-top: 1px;
}

/* Bottom row: scenarios + hebel */
.gk-bottom-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

@media (max-width: 860px) {
    .gk-bottom-row { grid-template-columns: 1fr; }
}

.gk-block-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Scenario cards */
.gk-scenarios-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.gk-scenario-card {
    border: 1px solid;
    border-radius: 10px;
    padding: 12px 13px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.gk-sc-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.gk-sc-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: -0.01em;
    flex: 1;
}

.gk-sc-prob {
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
}

.gk-sc-delta-wrap {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    margin: 2px 0 4px;
}

.gk-sc-delta {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    flex-shrink: 0;
}

.gk-sc-delta-label {
    font-size: 10px;
    color: #64748b;
    line-height: 1.35;
    font-weight: 500;
}

.gk-sc-driver {
    font-size: 11px;
    color: #94A3B8;
    line-height: 1.4;
}

/* Hebel list */
.gk-hebel-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gk-hebel-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(248,250,252,0.93);
    border: 1px solid rgba(60,148,248,0.18);
    border-radius: 10px;
    padding: 11px 13px;
    transition: background 0.15s, border-color 0.15s;
}

.gk-hebel-item:hover {
    background: rgba(255,255,255,0.97);
    border-color: rgba(60,148,248,0.32);
}

.gk-hebel-rank {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 50%;
    background: rgba(60,148,248,0.18);
    color: #3C94F8;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.gk-hebel-body {
    flex: 1;
    min-width: 0;
}

.gk-hebel-action {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.01em;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.gk-hebel-detail {
    font-size: 12px;
    color: #475569;
    line-height: 1.5;
}

.gk-hebel-cta {
    margin-top: 8px;
    background: transparent;
    border: 1px solid rgba(60,148,248,0.40);
    color: #3C94F8;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: 0.02em;
    transition: border-color 0.18s, background 0.18s, color 0.18s;
}
.gk-hebel-cta:hover {
    background: rgba(60,148,248,0.10);
    border-color: rgba(60,148,248,0.65);
}
.gk-hebel-cta:active {
    background: rgba(60,148,248,0.18);
}

.gk-hebel-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    flex-shrink: 0;
}

.gk-hebel-impact-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
}

.gk-hebel-impact {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 15px;
    font-weight: 800;
    color: #22D3A5;
    letter-spacing: -0.03em;
    white-space: nowrap;
}

.gk-hebel-impact-label {
    font-size: 9px;
    color: #64748b;
    line-height: 1.3;
    text-align: right;
    white-space: nowrap;
}

.gk-hebel-urgency {
    font-size: 10px;
    font-weight: 700;
    border: 1px solid;
    border-radius: 5px;
    padding: 2px 7px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ── Nachfrage-Prognose · Laufzeit-Monitor ───────────────────────── */
.gk-puls-section {
    margin-bottom: 24px;
}

/* Grid: 2–4 cards per row depending on screen width */
.gk-puls-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

/* Individual product card */
.gk-puls-card {
    border: 1px solid;
    border-radius: 11px;
    padding: 13px 14px 11px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: filter 0.15s;
}

.gk-puls-card:hover {
    filter: brightness(1.07);
}

/* Header: product name + severity badge */
.gk-puls-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.gk-puls-card-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.01em;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.gk-puls-sev {
    font-size: 10px;
    font-weight: 700;
    border: 1px solid;
    border-radius: 4px;
    padding: 2px 7px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Sparkline section */
.gk-puls-spark-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gk-puls-spark-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 4px;
}

.gk-puls-spark-label {
    font-size: 10px;
    color: #64748b;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 600;
}

.gk-puls-spark-legend {
    font-size: 10px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 2px;
    white-space: nowrap;
}

.gk-puls-spark {
    width: 100%;
    border-radius: 5px;
    overflow: hidden;
}

.gk-puls-spark-stat {
    font-size: 11px;
    color: #94A3B8;
    line-height: 1.4;
}

.gk-puls-spark-stat strong {
    color: #CBD5E1;
    font-weight: 700;
}

/* Laufzeit bar section */
.gk-puls-bar-section {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.gk-puls-bar-urgency {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.gk-puls-bar-track {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.08);
    border-radius: 4px;
    overflow: hidden;
}

.gk-puls-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gk-puls-bar-ends {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    font-weight: 600;
    color: #374151;
}

@media (max-width: 1100px) {
    .gk-puls-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .gk-puls-cards { grid-template-columns: 1fr; }
}
/* ═══════════════════════════════════════════════════════════════
   NEXUS — Business Digital Twin
   ═══════════════════════════════════════════════════════════════ */

.nexus-card {
    background: #111118;
    border: 1px solid rgba(124,58,237,0.20);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 4px 32px rgba(0,0,0,0.45), 0 0 0 1px rgba(124,58,237,0.08);
}

/* Control bar */
.nexus-control-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    gap: 14px;
    flex-wrap: wrap;
}
.nexus-card-title {
    font-family: Montserrat, sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #e2e2f0;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
}
.nexus-card-sub {
    font-size: 11px;
    font-weight: 400;
    color: #64748b;
    letter-spacing: 0;
}

/* Scenario chips */
.nexus-scenario-chips { display: flex; gap: 6px; }
.nexus-chip {
    padding: 5px 13px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.11);
    background: transparent;
    color: #94a3b8;
    font-size: 12px;
    font-family: Montserrat, sans-serif;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.nexus-chip.active {
    background: rgba(124,58,237,0.14);
    border-color: rgba(124,58,237,0.50);
    color: #c4b5fd;
}
.nexus-chip:hover:not(.active) { border-color: rgba(255,255,255,0.22); color: #cbd5e1; }

/* Right controls */
.nexus-right-controls { display: flex; align-items: center; gap: 10px; }

/* Mode badge */
.nexus-mode-badge {
    font-size: 11px;
    font-family: Montserrat, sans-serif;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    letter-spacing: 0.03em;
    white-space: nowrap;
}
.nexus-mode-badge.live       { background: rgba(34,211,165,0.10); color: #22D3A5; border: 1px solid rgba(34,211,165,0.28); }
.nexus-mode-badge.simulation { background: rgba(234,179,8,0.10);  color: #EAB308; border: 1px solid rgba(234,179,8,0.28); }
.nexus-mode-badge.zeitreise  { background: rgba(96,165,250,0.10); color: #60A5FA; border: 1px solid rgba(96,165,250,0.28); }

/* Layer bar */
.nexus-layer-bar { display: flex; gap: 4px; }
.nexus-layer-btn {
    width: 30px; height: 30px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.10);
    background: transparent;
    color: #64748b;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    display: flex; align-items: center; justify-content: center;
}
.nexus-layer-btn:hover  { background: rgba(255,255,255,0.06); color: #94a3b8; }
.nexus-layer-btn.active { background: rgba(124,58,237,0.14); border-color: rgba(124,58,237,0.40); color: #c4b5fd; }

/* Viewport */
.nexus-viewport {
    position: relative;
    height: 560px;
}
.nexus-canvas-wrap {
    width: 100%;
    height: 100%;
}

/* Score overlay */
.nexus-score-overlay {
    position: absolute;
    top: 16px; left: 20px;
    display: flex; flex-direction: column; gap: 2px;
    pointer-events: none;
    z-index: 2;
}
.nexus-so-lbl {
    font-size: 10px;
    font-family: Montserrat, sans-serif;
    color: #475569;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}
.nexus-so-val {
    font-size: 38px;
    font-family: Montserrat, sans-serif;
    font-weight: 700;
    color: #22D3A5;
    line-height: 1;
    letter-spacing: -0.03em;
}

/* JARVIS Panel */
.nexus-jarvis-panel {
    position: absolute;
    right: 0; top: 36px; bottom: 100px;
    width: 300px;
    background: rgba(10,10,20,0.88);
    backdrop-filter: blur(12px);
    border-left: 1px solid rgba(124,58,237,0.18);
    border-bottom: 1px solid rgba(124,58,237,0.10);
    display: flex; flex-direction: column;
    z-index: 8;
    transition: transform 0.28s cubic-bezier(0.22,1,0.36,1);
}
.nexus-jarvis-panel.collapsed { transform: translateX(100%); }
.nexus-jarvis-header {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: 12px; font-family: Montserrat, sans-serif;
    font-weight: 600; color: #c4b5fd;
}
.nexus-jarvis-header button {
    margin-left: auto;
    background: transparent; border: none;
    color: #64748b; cursor: pointer; font-size: 14px;
}
.nexus-jarvis-header button:hover { color: #94a3b8; }
.nexus-jarvis-auto {
    flex: 1; padding: 12px 14px;
    overflow-y: auto; font-size: 12px;
}
.nexus-jarvis-idle { color: #475569; font-style: italic; }
.nexus-auto-alert {
    background: rgba(124,58,237,0.08);
    border: 1px solid rgba(124,58,237,0.16);
    border-radius: 8px; padding: 10px 12px; margin-bottom: 8px;
}
.nexus-auto-title { color: #e2e2f0; font-weight: 600; font-size: 12px; margin-bottom: 4px; }
.nexus-auto-body  { color: #94a3b8; font-size: 11px; line-height: 1.5; }
.nexus-auto-secondary { color: #64748b; font-size: 11px; padding: 4px 0; border-top: 1px solid rgba(255,255,255,0.05); }
.nexus-jarvis-query {
    display: flex; gap: 6px; padding: 10px 14px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.nexus-jarvis-query input {
    flex: 1; background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 8px; padding: 7px 10px;
    color: #e2e2f0; font-size: 12px; font-family: inherit;
    outline: none;
}
.nexus-jarvis-query input:focus { border-color: rgba(124,58,237,0.40); }
.nexus-jarvis-query button {
    background: rgba(124,58,237,0.20);
    border: 1px solid rgba(124,58,237,0.30);
    border-radius: 8px; padding: 7px 11px;
    color: #c4b5fd; cursor: pointer; font-size: 14px;
    transition: background 0.15s;
}
.nexus-jarvis-query button:hover { background: rgba(124,58,237,0.32); }

/* Node labels (CSS2D) */
.nexus-node-label {
    color: #94a3b8;
    font-size: 10px;
    font-family: Montserrat, sans-serif;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-shadow: 0 1px 4px #080810, 0 0 8px #080810;
    pointer-events: none;
    white-space: nowrap;
}

/* Scenario footer */
.nexus-scenario-footer {
    display: flex; align-items: center; gap: 16px;
    padding: 9px 20px;
    border-top: 1px solid rgba(255,255,255,0.06);
    font-size: 12px; font-family: Montserrat, sans-serif;
}
.nexus-sf-delta  { font-weight: 700; color: #22D3A5; }
.nexus-sf-driver { color: #94a3b8; }
.nexus-sf-horizon { margin-left: auto; color: #475569; font-size: 11px; }

/* ─── NEXUS HUD v2 — overrides ─────────────────────────────────────────────── */

/* Canvas: subtle scanline texture for HUD feel */
.nexus-canvas-wrap {
    position: relative;
}
.nexus-canvas-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px, transparent 3px,
        rgba(0,212,255,0.009) 3px, rgba(0,212,255,0.009) 4px
    );
    pointer-events: none;
    z-index: 1;
}

/* Score overlay — aerospace monospace */
.nexus-so-lbl {
    font-family: 'Courier New', Courier, monospace !important;
    font-size: 9px !important;
    color: rgba(0,212,255,0.50) !important;
    letter-spacing: 0.16em !important;
}
.nexus-so-val {
    font-family: 'Courier New', Courier, monospace !important;
    font-size: 38px !important;
    letter-spacing: -0.01em !important;
    text-shadow: 0 0 22px currentColor !important;
}

/* Node labels — ALL CAPS monospace */
.nexus-node-label {
    font-family: 'Courier New', Courier, monospace !important;
    font-size: 9px !important;
    letter-spacing: 0.14em !important;
    color: rgba(232,234,240,0.60) !important;
    text-shadow: 0 0 10px rgba(0,212,255,0.25) !important;
    text-transform: uppercase !important;
}

/* Mode badge — monospace */
.nexus-mode-badge {
    font-family: 'Courier New', Courier, monospace !important;
    font-size: 11px !important;
    letter-spacing: 0.08em !important;
    padding: 4px 10px !important;
    border-radius: 4px !important;
}
.nexus-mode-badge.live       { color: #22D3A5; border: 1px solid rgba(34,211,165,0.30); }
.nexus-mode-badge.simulation { color: #FFB703; border: 1px solid rgba(255,183,3,0.30); }
.nexus-mode-badge.zeitreise  { color: #00D4FF; border: 1px solid rgba(0,212,255,0.30); }

/* Scenario chips — monospace */
.nexus-chip {
    font-family: 'Courier New', Courier, monospace !important;
    font-size: 10px !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    padding: 5px 12px !important;
    border-radius: 3px !important;
    border: 1px solid rgba(0,212,255,0.18) !important;
    background: transparent !important;
    color: rgba(232,234,240,0.50) !important;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.nexus-chip.active,
.nexus-chip:hover {
    color: rgba(0,212,255,0.90) !important;
    border-color: rgba(0,212,255,0.45) !important;
    background: rgba(0,212,255,0.06) !important;
}

/* Layer buttons */
.nexus-layer-btn {
    font-size: 13px !important;
    padding: 4px 9px !important;
    border-radius: 3px !important;
    border: 1px solid rgba(255,255,255,0.10) !important;
    background: transparent !important;
    color: rgba(232,234,240,0.40) !important;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.nexus-layer-btn.active,
.nexus-layer-btn:hover {
    color: rgba(0,212,255,0.85) !important;
    border-color: rgba(0,212,255,0.40) !important;
    background: rgba(0,212,255,0.07) !important;
}

/* Timeline strip */
.nexus-timeline-strip {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 56px;
    background: linear-gradient(to top, rgba(5,5,8,0.94) 40%, transparent 100%);
    border-top: 1px solid rgba(0,212,255,0.10);
    z-index: 3;
    pointer-events: none;
}
.nexus-timeline-svg {
    width: 100%; height: 100%;
    display: block;
}
.nexus-timeline-playhead {
    position: absolute;
    top: 0; bottom: 0; right: 0;
    width: 1px;
    background: rgba(0,212,255,0.65);
    box-shadow: 0 0 6px rgba(0,212,255,0.45);
}
.nexus-timeline-label {
    position: absolute;
    bottom: 6px; left: 14px;
    font-family: 'Courier New', monospace;
    font-size: 8px;
    color: rgba(0,212,255,0.35);
    letter-spacing: 0.14em;
    pointer-events: none;
}

/* JARVIS alerts — HUD style */
.nexus-jarvis-idle {
    display: block;
    font-family: 'Courier New', monospace !important;
    font-size: 10px !important;
    letter-spacing: 0.08em !important;
    color: rgba(0,212,255,0.30) !important;
    text-transform: uppercase !important;
    padding: 8px 0 !important;
}
.nexus-jarvis-alert {
    background: rgba(124,58,237,0.07);
    border: 1px solid rgba(124,58,237,0.18);
    border-radius: 4px;
    padding: 8px 10px;
    margin-bottom: 8px;
}
.nexus-jarvis-title {
    display: block;
    font-family: 'Courier New', monospace;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: rgba(196,181,253,0.90);
    margin-bottom: 5px;
}
.nexus-jarvis-msg {
    display: block;
    font-family: inherit;
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.55;
}

/* ── Data chips ────────────────────────────────────────────────── */
.nexus-data-chip {
    background: transparent;
    border: none;
    border-top: 2px solid var(--chip-accent, rgba(0,212,255,0.45));
    border-radius: 0;
    padding: 3px 6px 2px;
    min-width: 54px;
    text-align: center;
}
.nexus-dc-label {
    font-family: 'Courier New', monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.09em;
    color: rgba(255,255,255,0.70);
    text-transform: uppercase;
    margin-bottom: 2px;
    text-shadow: 0 1px 4px #000, 0 0 8px #000;
}
.nexus-dc-value {
    font-family: 'Courier New', monospace;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    text-shadow: 0 0 10px currentColor;
}
.nexus-dc-trend {
    font-family: 'Courier New', monospace;
    font-size: 9px;
    letter-spacing: 0.05em;
    margin-top: 2px;
    text-shadow: 0 1px 4px #000;
}
.nexus-dc-trend.up { color: #22D3A5; }
.nexus-dc-trend.dn { color: #F43F5E; }
.nexus-dc-trend.nt { color: #FFB703; }

/* ── Ghost & future temporal labels ───────────────────────────── */
.nexus-ghost-label {
    font-family: 'Courier New', monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.10em;
    color: rgba(0,212,255,0.55);
    text-shadow: 0 0 6px rgba(0,212,255,0.35);
    text-transform: uppercase;
    pointer-events: none;
    white-space: nowrap;
}
.nexus-future-label {
    font-family: 'Courier New', monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.10em;
    color: rgba(255,183,3,0.80);
    text-shadow: 0 0 6px rgba(255,183,3,0.40);
    text-transform: uppercase;
    pointer-events: none;
    white-space: nowrap;
}

/* ── Lock-On Detail Panel ──────────────────────────────────────── */
.nexus-detail-panel {
    position: absolute;
    top: 44px;
    left: 0;
    width: 220px;
    max-height: calc(100% - 120px);
    background: rgba(10,10,20,0.94);
    border: 1px solid var(--dp-accent, rgba(124,58,237,0.32));
    border-left: none;
    border-radius: 0 6px 6px 0;
    z-index: 10;
    transform: translateX(-100%);
    transition: transform 0.32s cubic-bezier(0.16,1,0.3,1);
    padding: 12px 14px;
    backdrop-filter: blur(10px);
    overflow-y: auto;
    pointer-events: all;
}
.nexus-detail-panel.visible { transform: translateX(0); }

.nexus-dp-header {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
}
.nexus-dp-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 6px currentColor;
}
.nexus-dp-title {
    font-family: 'Courier New', monospace;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.70);
    flex: 1;
}
.nexus-dp-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.30);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0 2px;
    transition: color 0.15s;
}
.nexus-dp-close:hover { color: #F43F5E; }

.nexus-dp-score-row {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin-bottom: 6px;
}
.nexus-dp-big {
    font-family: 'Courier New', monospace;
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
}
.nexus-dp-unit {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: rgba(255,255,255,0.28);
}
.nexus-dp-trend {
    font-family: 'Courier New', monospace;
    font-size: 9px;
    margin-left: auto;
}
.nexus-dp-trend.up { color: #22D3A5; }
.nexus-dp-trend.dn { color: #F43F5E; }
.nexus-dp-trend.nt { color: #FFB703; }

.nexus-dp-progress {
    height: 2px;
    background: rgba(255,255,255,0.07);
    border-radius: 1px;
    margin-bottom: 12px;
    overflow: hidden;
}
.nexus-dp-progress-fill {
    height: 100%;
    border-radius: 1px;
    transition: width 0.6s ease;
}
.nexus-dp-sec {
    font-family: 'Courier New', monospace;
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: rgba(255,255,255,0.22);
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding-bottom: 4px;
    margin-bottom: 6px;
    margin-top: 8px;
}
.nexus-dp-driver {
    font-size: 10px;
    color: #94a3b8;
    padding: 3px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    display: flex;
    align-items: center;
    gap: 4px;
}
.nexus-dp-coef {
    margin-left: auto;
    font-family: 'Courier New', monospace;
    font-size: 9px;
    color: rgba(255,255,255,0.35);
}
.nexus-dp-lever {
    font-size: 10px;
    color: #94a3b8;
    padding: 3px 0;
    line-height: 1.4;
}
.nexus-dp-empty {
    font-size: 10px;
    color: #475569;
    font-style: italic;
}

/* ── Copilot conversation messages ─────────────────────────────── */
.nexus-cm {
    font-size: 10px;
    line-height: 1.55;
    padding: 5px 0 5px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    word-break: break-word;
}
.nexus-cm-user {
    font-family: 'Courier New', monospace;
    color: rgba(0,212,255,0.70);
    font-size: 9px;
    letter-spacing: 0.04em;
}
.nexus-cm-bot {
    color: #cbd5e1;
}
.nexus-cm-err {
    color: #F43F5E;
    font-style: italic;
}

/* Thinking animation */
.nexus-cm-thinking {
    display: flex;
    gap: 4px;
    padding: 6px 0;
    align-items: center;
}
.nexus-think-dot {
    width: 4px; height: 4px;
    border-radius: 50%;
    background: rgba(0,212,255,0.55);
    animation: nexus-think-blink 1.1s ease-in-out infinite;
}
.nexus-think-dot:nth-child(2) { animation-delay: 0.18s; }
.nexus-think-dot:nth-child(3) { animation-delay: 0.36s; }
@keyframes nexus-think-blink {
    0%, 80%, 100% { opacity: 0.25; transform: scale(0.8); }
    40%           { opacity: 1;    transform: scale(1.15); }
}

/* ── 3B: HUD Narration Bar ─────────────────────────────────────── */
.nexus-narration {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 26px;
    z-index: 4;
    overflow: hidden;
    background: linear-gradient(to bottom, rgba(5,5,8,0.88) 60%, transparent 100%);
    border-bottom: 1px solid rgba(0,212,255,0.07);
    pointer-events: none;
}
.nexus-narration-track {
    display: flex;
    align-items: center;
    height: 100%;
    white-space: nowrap;
    animation: nexus-ticker 72s linear infinite;
    padding-left: 16px;
}
.nexus-narr-item {
    font-family: 'Courier New', monospace;
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: rgba(0,212,255,0.48);
    white-space: nowrap;
}
.nexus-narr-item:first-child { color: rgba(0,212,255,0.70); }
.nexus-narr-sep {
    font-size: 10px;
    color: rgba(0,212,255,0.18);
    padding: 0 8px;
}
@keyframes nexus-ticker {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ── 3A: Simulation slider + ripple table ──────────────────────── */
.nexus-dp-sim-hdr { margin-top: 12px; }

.nexus-dp-sim {
    padding-top: 4px;
}
.nexus-dp-sim-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.nexus-dp-sim-lbl {
    font-family: 'Courier New', monospace;
    font-size: 9px;
    color: rgba(255,255,255,0.35);
    letter-spacing: 0.06em;
}
.nexus-dp-sim-val {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: 700;
    color: rgba(255,183,3,0.85);
    min-width: 28px;
    text-align: right;
}

.nexus-sim-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 3px;
    background: rgba(255,255,255,0.10);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    margin-bottom: 10px;
}
.nexus-sim-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--track-color, #FFB703);
    box-shadow: 0 0 6px var(--track-color, #FFB703);
    cursor: pointer;
    border: none;
}
.nexus-sim-slider::-moz-range-thumb {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--track-color, #FFB703);
    box-shadow: 0 0 6px var(--track-color, #FFB703);
    cursor: pointer;
    border: none;
}
.nexus-sim-slider::-webkit-slider-runnable-track {
    background: rgba(255,255,255,0.10);
    border-radius: 2px;
}

.nexus-ripple-table {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 6px;
}
.nexus-rpl-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 9px;
    padding: 3px 0;
    color: rgba(255,255,255,0.45);
    font-family: 'Courier New', monospace;
    letter-spacing: 0.05em;
}
.nexus-rpl-val {
    font-weight: 700;
    font-size: 10px;
}
.nexus-rpl-val.up { color: #22D3A5; }
.nexus-rpl-val.dn { color: #F43F5E; }
.nexus-rpl-val.nt { color: #FFB703; }

/* sim-mode chip pulse */
.nexus-dc-trend.sim {
    animation: nexus-sim-pulse 1.2s ease-in-out infinite;
}
@keyframes nexus-sim-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.55; }
}

/* ── Narration bar (static, no scroll) ────────────────────────── */
.nexus-narration {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 36px !important;
    z-index: 4;
    overflow: hidden;
    background: linear-gradient(to bottom, rgba(5,5,8,0.94) 70%, transparent 100%) !important;
    border-bottom: 1px solid rgba(0,212,255,0.08) !important;
    pointer-events: none;
    display: flex !important;
    align-items: center !important;
    padding: 0 16px !important;
    gap: 0 !important;
}
.nexus-narr-item {
    font-family: 'Courier New', monospace !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    letter-spacing: 0.09em !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
    padding: 3px 10px !important;
    border-radius: 4px !important;
    border: 1px solid transparent !important;
}
.nexus-narr-item.ok    {
    color: rgba(34,211,165,0.90) !important;
    background: rgba(34,211,165,0.08) !important;
    border-color: rgba(34,211,165,0.18) !important;
}
.nexus-narr-item.warn  {
    color: rgba(255,183,3,0.90) !important;
    background: rgba(255,183,3,0.08) !important;
    border-color: rgba(255,183,3,0.20) !important;
}
.nexus-narr-item.crit  {
    color: rgba(244,63,94,0.95) !important;
    background: rgba(244,63,94,0.10) !important;
    border-color: rgba(244,63,94,0.25) !important;
}
.nexus-narr-item.hebel {
    color: rgba(0,212,255,0.90) !important;
    background: rgba(0,212,255,0.07) !important;
    border-color: rgba(0,212,255,0.18) !important;
}
.nexus-narr-item.stat  {
    color: rgba(148,163,184,0.65) !important;
    background: transparent !important;
    border-color: transparent !important;
}
.nexus-narr-sep {
    font-size: 10px !important;
    color: rgba(0,212,255,0.15) !important;
    padding: 0 10px !important;
    flex-shrink: 0 !important;
}

/* Score overlay — pushed below narration bar */
.nexus-score-overlay {
    top: 44px !important;
}

/* ── Timeline cursor for ZEITREISE ────────────────────────────── */
.nexus-timeline-strip {
    height: 100px !important;
    pointer-events: all !important;
    cursor: ew-resize !important;
}
.nexus-tl-cursor {
    position: absolute;
    top: 0; bottom: 0;
    width: 28px;
    pointer-events: none;
    z-index: 5;
    transform: translateX(-50%);
}
.nexus-tl-cursor-line {
    position: absolute;
    top: 0; bottom: 0;
    left: 50%;
    width: 1px;
    transform: translateX(-50%);
    background: linear-gradient(to bottom,
        rgba(0,212,255,0.95) 0%,
        rgba(0,212,255,0.60) 55%,
        rgba(0,212,255,0.10) 100%);
    box-shadow: 0 0 5px rgba(0,212,255,0.50), 0 0 14px rgba(0,212,255,0.18);
}
.nexus-tl-cursor-head {
    position: absolute;
    top: 18%;
    left: 50%;
    width: 7px; height: 7px;
    transform: translate(-50%, -50%) rotate(45deg);
    background: rgba(0,212,255,0.97);
    box-shadow: 0 0 8px rgba(0,212,255,0.95), 0 0 18px rgba(0,212,255,0.45);
}
.nexus-tl-cursor-label {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-family: 'Courier New', monospace;
    font-size: 5.5px;
    letter-spacing: 0.18em;
    color: rgba(255,183,3,0.60);
    text-transform: uppercase;
    pointer-events: none;
}

/* ── Interaction hints ─────────────────────────────────────────── */
.nexus-hint {
    position: absolute;
    bottom: 108px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 16px;
    pointer-events: none;
    z-index: 4;
    animation: nexus-hint-fade 3s ease-out 1.5s forwards;
    opacity: 0;
    animation-fill-mode: both;
}
@keyframes nexus-hint-fade {
    0%   { opacity: 0; transform: translateX(-50%) translateY(4px); }
    15%  { opacity: 1; transform: translateX(-50%) translateY(0); }
    80%  { opacity: 1; }
    100% { opacity: 0; }
}
.nexus-hint-item {
    font-family: 'Courier New', monospace;
    font-size: 9px;
    letter-spacing: 0.10em;
    color: rgba(0,212,255,0.45);
    background: rgba(5,5,8,0.80);
    border: 1px solid rgba(0,212,255,0.15);
    border-radius: 3px;
    padding: 4px 9px;
    white-space: nowrap;
    text-transform: uppercase;
}
.nexus-hint-item strong {
    color: rgba(0,212,255,0.80);
    font-weight: 700;
}

/* ── Critical node badge ───────────────────────────────────────── */
.nexus-crit-badge {
    font-family: 'Courier New', monospace;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #F43F5E;
    background: rgba(244,63,94,0.12);
    border: 1px solid rgba(244,63,94,0.35);
    border-radius: 3px;
    padding: 2px 5px;
    text-transform: uppercase;
    pointer-events: none;
    white-space: nowrap;
    animation: nexus-crit-strobe 1.4s ease-in-out infinite;
}
@keyframes nexus-crit-strobe {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.45; }
}

/* ── Telegram status badge ─────────────────────────────────────── */
.nexus-tg-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.10);
    background: transparent;
    color: rgba(255,255,255,0.28);
    font-size: 13px;
    cursor: pointer;
    transition: color 0.18s, border-color 0.18s, background 0.18s;
    flex-shrink: 0;
}
.nexus-tg-badge:hover {
    color: rgba(255,255,255,0.55);
    border-color: rgba(255,255,255,0.22);
}
.nexus-tg-badge.active {
    color: #29B6F6;
    border-color: rgba(41,182,246,0.40);
    background: rgba(41,182,246,0.08);
    box-shadow: 0 0 8px rgba(41,182,246,0.22);
}
.nexus-tg-badge.inactive {
    color: rgba(255,255,255,0.20);
    border-color: rgba(255,255,255,0.08);
}

/* ── Panel tab toggle (always visible) ────────────────────────── */
.nexus-panel-tab {
    position: absolute;
    right: 300px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(10,10,20,0.88);
    border: 1px solid rgba(124,58,237,0.30);
    border-right: none;
    border-radius: 6px 0 0 6px;
    color: #c4b5fd;
    z-index: 9;
    padding: 10px 5px;
    font-size: 13px;
    cursor: pointer;
    transition: right 0.28s cubic-bezier(0.22,1,0.36,1), background 0.15s;
    line-height: 1;
    backdrop-filter: blur(8px);
}
.nexus-panel-tab:hover {
    background: rgba(124,58,237,0.18);
    color: #e9d5ff;
}

/* ── Return-to-live button ─────────────────────────────────────── */
.nexus-return-btn {
    font-family: 'Courier New', monospace;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: rgba(0,212,255,0.75);
    background: rgba(0,212,255,0.08);
    border: 1px solid rgba(0,212,255,0.28);
    border-radius: 3px;
    padding: 4px 10px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.nexus-return-btn:hover {
    background: rgba(0,212,255,0.15);
    color: rgba(0,212,255,1.00);
}


/* ═══════════════════════════════════════════════════════════════
   NEXUS Phase 3+4 — JARVIS Upgrade + Synthetic History Markers
   ═══════════════════════════════════════════════════════════════ */

/* ── Confidence dot ─────────────────────────────────────────── */
.nexus-conf {
    display: inline-block;
    font-size: 8px;
    vertical-align: middle;
    margin-right: 4px;
    cursor: help;
    filter: drop-shadow(0 0 3px currentColor);
}

/* ── JARVIS Chat: action cards ─────────────────────────────── */
.nexus-jarvis-actions {
    flex-direction: column;
    gap: 6px;
    padding: 8px 12px;
    border-top: 1px solid rgba(124,58,237,0.20);
}
.nexus-ac {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(124,58,237,0.08);
    border: 1px solid rgba(124,58,237,0.22);
    border-radius: 6px;
    padding: 8px 10px;
    transition: border-color 0.15s;
}
.nexus-ac:hover { border-color: rgba(124,58,237,0.45); }
.nexus-ac-icon { font-size: 16px; flex-shrink: 0; }
.nexus-ac-body { flex: 1; min-width: 0; }
.nexus-ac-title {
    font-size: 11px;
    font-weight: 700;
    color: #e2d9f3;
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nexus-ac-desc {
    font-size: 9.5px;
    color: rgba(180,160,220,0.65);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nexus-ac-btn {
    flex-shrink: 0;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #a78bfa;
    background: rgba(124,58,237,0.15);
    border: 1px solid rgba(124,58,237,0.35);
    border-radius: 4px;
    padding: 4px 10px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.nexus-ac-btn:hover { background: rgba(124,58,237,0.28); color: #ddd6fe; }
.nexus-ac-btn:disabled { opacity: 0.4; cursor: default; }

/* ── Synthetic history date marker ──────────────────────────── */
.nexus-synth-marker {
    position: absolute;
    bottom: 108px;
    transform: translateX(-50%);
    font-family: 'Courier New', monospace;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: rgba(6,182,212,0.88);
    background: rgba(5,5,12,0.82);
    border: 1px solid rgba(6,182,212,0.35);
    border-radius: 3px;
    padding: 2px 7px;
    pointer-events: none;
    z-index: 12;
    white-space: nowrap;
    backdrop-filter: blur(4px);
}
.nexus-synth-marker.is-synth {
    color: rgba(167,139,250,0.90);
    background: rgba(5,5,12,0.82);
    border-color: rgba(124,58,237,0.40);
}
.nexus-synth-marker.is-future {
    color: rgba(255,183,3,0.90);
    background: rgba(5,5,12,0.82);
    border-color: rgba(255,183,3,0.38);
}

/* ── JARVIS chip strip (dynamic suggestions) ─────────────────── */
.nexus-jarvis-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 8px 0 4px;
}
.nexus-suggest-chip {
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: rgba(6,182,212,0.85);
    background: rgba(6,182,212,0.07);
    border: 1px solid rgba(6,182,212,0.22);
    border-radius: 12px;
    padding: 3px 9px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.nexus-suggest-chip:hover {
    background: rgba(6,182,212,0.15);
    color: rgba(6,182,212,1);
}

/* ── Mode badge: PROGNOSE variant ───────────────────────────── */
.nexus-mode-badge.prognose {
    background: rgba(249,115,22,0.12);
    border-color: rgba(249,115,22,0.35);
    color: rgba(249,115,22,0.90);
}

/* ── JARVIS send button icon fix ────────────────────────────── */
#nexus-jarvis-send { display: flex; align-items: center; justify-content: center; }
#nexus-jarvis-send .fa-paper-plane { font-size: 11px; }

/* ── JARVIS markdown rendering inside chat ──────────────────── */
.nexus-cm-bot h2, .nexus-cm-bot h3 {
    font-size: 10px; font-weight: 700; color: #e2e8f0;
    margin: 6px 0 3px; letter-spacing: 0.04em;
}
.nexus-cm-bot strong { color: #f1f5f9; font-weight: 700; }
.nexus-cm-bot p { margin: 3px 0; }
.nexus-cm-bot ul, .nexus-cm-bot ol { margin: 3px 0; padding-left: 14px; }
.nexus-cm-bot li { margin: 2px 0; }
.nexus-cm-bot table {
    width: 100%; border-collapse: collapse;
    margin: 5px 0; font-size: 9px;
}
.nexus-cm-bot th {
    background: rgba(6,182,212,0.12);
    color: rgba(6,182,212,0.9);
    padding: 2px 6px; text-align: left;
    font-weight: 700; letter-spacing: 0.04em;
}
.nexus-cm-bot td {
    padding: 2px 6px; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.nexus-cm-bot code {
    background: rgba(255,255,255,0.06); border-radius: 2px;
    padding: 1px 4px; font-family: 'Courier New', monospace; font-size: 9px;
}

/* ── Future layer labels: scenario color variants ───────────── */
.nexus-future-label.pessimistic {
    color: rgba(255,96,64,0.85);
    text-shadow: 0 0 6px rgba(255,96,64,0.45);
}
.nexus-future-label.optimistic {
    color: rgba(34,211,165,0.85);
    text-shadow: 0 0 6px rgba(34,211,165,0.40);
}

/* ── Mode badge: scenario PROGNOSE variants ─────────────────── */
.nexus-mode-badge.prognose.pessimistic {
    background: rgba(255,96,64,0.12);
    border-color: rgba(255,96,64,0.40);
    color: rgba(255,96,64,0.95);
}
.nexus-mode-badge.prognose.optimistic {
    background: rgba(34,211,165,0.12);
    border-color: rgba(34,211,165,0.40);
    color: rgba(34,211,165,0.95);
}
.nexus-mode-badge.pfad {
    background: rgba(0,212,255,0.10);
    border-color: rgba(0,212,255,0.45);
    color: #00D4FF;
    text-shadow: 0 0 8px rgba(0,212,255,0.6);
}

/* ── Optimal Path Trace: ETA Overlay ────────────────────────── */
.nexus-path-eta {
    position: absolute;
    bottom: 54px;
    right: 14px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    pointer-events: none;
    z-index: 12;
}
.nexus-path-eta-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    background: rgba(5,5,8,0.72);
    border: 1px solid rgba(0,212,255,0.30);
    border-radius: 6px;
    padding: 7px 11px 6px;
    backdrop-filter: blur(8px);
    box-shadow: 0 0 18px rgba(0,212,255,0.12), inset 0 0 12px rgba(0,212,255,0.04);
}
.nexus-path-eta-label {
    font-family: 'Montserrat', monospace;
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: rgba(0,212,255,0.60);
    text-transform: uppercase;
}
.nexus-path-eta-days {
    font-family: 'Montserrat', monospace;
    font-size: 18px;
    font-weight: 700;
    color: #00D4FF;
    letter-spacing: -0.02em;
    line-height: 1;
    text-shadow: 0 0 12px rgba(0,212,255,0.70);
}
.nexus-path-eta-diff {
    font-family: 'Montserrat', monospace;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.10em;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
}
.nexus-path-eta-diff.easy   { background: rgba(34,211,165,0.15); color: #22D3A5; border: 1px solid rgba(34,211,165,0.30); }
.nexus-path-eta-diff.medium { background: rgba(255,183,3,0.15);  color: #FFB703; border: 1px solid rgba(255,183,3,0.30); }
.nexus-path-eta-diff.hard   { background: rgba(244,63,94,0.15);  color: #F43F5E; border: 1px solid rgba(244,63,94,0.30); }

/* ── Optimal Path Trace: Node label (CSS2D) ─────────────────── */
.nexus-path-label {
    font-family: 'Montserrat', monospace;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.10em;
    color: #00D4FF;
    text-shadow: 0 0 10px rgba(0,212,255,0.85), 0 0 20px rgba(0,212,255,0.45);
    background: rgba(0,212,255,0.08);
    border: 1px solid rgba(0,212,255,0.25);
    border-radius: 3px;
    padding: 2px 6px;
    pointer-events: none;
    white-space: nowrap;
    text-transform: uppercase;
}

/* ─── EVENT HORIZON ──────────────────────────────────────────────────────── */

.nexus-eh-label {
    font-family: 'Montserrat', monospace;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.10em;
    color: rgba(255, 183, 3, 0.65);
    text-shadow: 0 0 7px rgba(255, 183, 3, 0.35);
    pointer-events: none;
    white-space: nowrap;
}
.nexus-eh-label-now { color: rgba(255, 183, 3, 0.90); }
.nexus-eh-label-end { color: rgba(255, 183, 3, 0.45); }

.nexus-eh-pin-label {
    font-family: 'Montserrat', monospace;
    font-size: 7px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.45);
    pointer-events: none;
    white-space: nowrap;
}

/* Popup event card */
.nexus-eh-card {
    position: fixed;
    z-index: 9999;
    width: 284px;
    background: rgba(8, 8, 18, 0.97);
    border: 1px solid rgba(255, 183, 3, 0.20);
    border-radius: 11px;
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.80),
        0 0 0 1px rgba(255, 183, 3, 0.06),
        inset 0 1px 0 rgba(255,255,255,0.04);
    backdrop-filter: blur(16px);
    overflow: hidden;
    animation: nexus-eh-card-in 0.16s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes nexus-eh-card-in {
    from { opacity: 0; transform: scale(0.90) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.nexus-eh-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 12px 10px;
    background: rgba(255, 183, 3, 0.07);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.nexus-eh-card-header.eh-danger   { background: rgba(255, 68, 68, 0.11); border-bottom-color: rgba(255, 68, 68, 0.15); }
.nexus-eh-card-header.eh-positive { background: rgba(34, 211, 165, 0.09); border-bottom-color: rgba(34, 211, 165, 0.15); }
.nexus-eh-card-header.eh-info     { background: rgba(6, 182, 212, 0.09); border-bottom-color: rgba(6,182,212,0.15); }

.nexus-eh-card-icon {
    font-size: 15px;
    flex-shrink: 0;
    line-height: 1;
}
.nexus-eh-card-title {
    flex: 1;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.025em;
    color: rgba(255, 255, 255, 0.93);
    line-height: 1.35;
}
.nexus-eh-card-days {
    font-family: 'Montserrat', monospace;
    font-size: 11px;
    font-weight: 800;
    color: rgba(255, 183, 3, 0.85);
    flex-shrink: 0;
    letter-spacing: 0.04em;
}
.nexus-eh-card-close {
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.35);
    font-size: 17px;
    line-height: 1;
    padding: 0 2px;
    transition: color 0.15s;
    flex-shrink: 0;
}
.nexus-eh-card-close:hover { color: rgba(255, 255, 255, 0.80); }

.nexus-eh-card-body {
    padding: 10px 13px 8px;
}
.nexus-eh-card-detail {
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.62);
    line-height: 1.55;
    margin-bottom: 7px;
}
.nexus-eh-card-impact {
    font-family: 'Montserrat', monospace;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.02em;
}
.nexus-eh-card-impact.pos { color: #22D3A5; }
.nexus-eh-card-impact.neg { color: #FF6B6B; }

.nexus-eh-card-actions {
    display: flex;
    gap: 7px;
    padding: 7px 12px 11px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.nexus-eh-btn {
    flex: 1;
    padding: 7px 8px;
    border-radius: 7px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    text-align: center;
    white-space: nowrap;
}
.nexus-eh-btn-jarvis {
    background: rgba(124, 58, 237, 0.12);
    border: 1px solid rgba(124, 58, 237, 0.38);
    color: #a78bfa;
}
.nexus-eh-btn-jarvis:hover {
    background: rgba(124, 58, 237, 0.25);
    border-color: rgba(124, 58, 237, 0.65);
    color: #c4b5fd;
    transform: translateY(-1px);
}
.nexus-eh-btn-sim {
    background: rgba(255, 183, 3, 0.09);
    border: 1px solid rgba(255, 183, 3, 0.32);
    color: rgba(255, 183, 3, 0.88);
}
.nexus-eh-btn-sim:hover {
    background: rgba(255, 183, 3, 0.20);
    border-color: rgba(255, 183, 3, 0.58);
    color: #FFB703;
    transform: translateY(-1px);
}


/* ═══════════════════════════════════════════════════════════════════
   KPI HERO BAR — Phase 1 (Brand-aligned)
   ═══════════════════════════════════════════════════════════════════ */

.kpi-hero-bar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}
@media (max-width: 1400px) { .kpi-hero-bar { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 900px)  { .kpi-hero-bar { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .kpi-hero-bar { grid-template-columns: 1fr; } }

.kpi-hero-tile {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 14px 12px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.18s ease, transform 0.18s ease;
    cursor: default;
    position: relative;
    overflow: hidden;
}
.kpi-hero-tile:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.kpi-hero-tile.kpi-hero-danger { border-color: rgba(244,63,94,0.25); }
.kpi-hero-tile.kpi-hero-warn   { border-color: rgba(245,158,11,0.20); }
.kpi-hero-tile.kpi-hero-ok     { border-color: rgba(34,211,165,0.20); }
.kpi-hero-tile.kpi-hero-signal { border-color: var(--border-color); }

.kpi-hero-icon-wrap {
    font-size: 15px;
    color: rgba(60,148,248,0.18);
    flex-shrink: 0;
    margin-top: 3px;
}
.kpi-hero-content { min-width: 0; flex: 1; }

.kpi-hero-label {
    font-size: 10px;
    font-weight: 700;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--neutral-color);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.kpi-hero-value {
    font-size: 18px;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--text-primary);
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.kpi-hero-sub {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kpi-hero-danger .kpi-hero-value { color: var(--negative-color); }
.kpi-hero-warn   .kpi-hero-value { color: #F59E0B; }
.kpi-hero-ok     .kpi-hero-value { color: var(--accent-green); }

/* ═══════════════════════════════════════════════════════════════════
   ZUKUNFTS-RADAR — Phase 1 (Brand-aligned)
   ═══════════════════════════════════════════════════════════════════ */

.zukunft-radar {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
}
.zr-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}
.zr-title {
    font-size: 12px;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.zr-title i { color: var(--primary-color); margin-right: 6px; }
.zr-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: 4px;
}
.zr-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
@media (max-width: 900px) { .zr-grid { grid-template-columns: 1fr; } }

.zr-col {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 160px;
}
.zr-col-soon { opacity: 0.6; }

.zr-col-head { display: flex; align-items: center; gap: 8px; }
.zr-col-icon { font-size: 13px; color: var(--primary-color); }
.zr-col-icon.cyan   { color: var(--accent-teal); }
.zr-col-icon.amber  { color: #F59E0B; }
.zr-col-icon.purple { color: var(--accent-color); }

.zr-col-title {
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-secondary);
    flex: 1;
}
.zr-col-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: var(--background-color);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}
.zr-col-badge.cyan   { background: rgba(6,182,212,0.08);   color: var(--accent-teal);  border-color: rgba(6,182,212,0.2); }
.zr-col-badge.amber  { background: rgba(245,158,11,0.08);  color: #D97706;              border-color: rgba(245,158,11,0.2); }
.zr-col-badge.purple { background: rgba(168,85,247,0.08);  color: var(--accent-color);  border-color: rgba(168,85,247,0.2); }
.zr-col-badge.green  { background: rgba(34,211,165,0.08);  color: var(--accent-green);  border-color: rgba(34,211,165,0.2); }
.zr-col-badge.red    { background: rgba(244,63,94,0.08);   color: var(--negative-color); border-color: rgba(244,63,94,0.2); }

.zr-col-body { flex: 1; display: flex; flex-direction: column; gap: 5px; }

.zr-skeleton, .zr-empty {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    padding: 20px 0;
}
.zr-market-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 16px 0;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}
.zr-market-hint { font-size: 10px; margin-top: 4px; color: var(--neutral-color); }

.zr-item {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
}
.zr-item-critical { border-color: rgba(244,63,94,0.25); }
.zr-item-warn     { border-color: rgba(245,158,11,0.20); }
.zr-item-ok       { border-color: rgba(34,211,165,0.20); }

.zr-item-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.zr-item-name { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.zr-item-days { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

.zr-item-bar-track {
    height: 3px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 6px;
}
.zr-item-bar-fill          { height: 100%; border-radius: 3px; background: var(--primary-color); transition: width 0.4s ease; }
.zr-item-critical .zr-item-bar-fill { background: var(--negative-color); }
.zr-item-warn     .zr-item-bar-fill { background: #F59E0B; }
.zr-item-ok       .zr-item-bar-fill { background: var(--accent-green); }

.zr-action-btn {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--card-background);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-heading);
    color: var(--text-primary);
    cursor: pointer;
    width: 100%;
    justify-content: center;
    transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.zr-action-btn:hover {
    background: rgba(60,148,248,0.06);
    border-color: rgba(60,148,248,0.30);
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}
.zr-action-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(60,148,248,0.30);
}

/* ═══════════════════════════════════════════════════════════════════
   NEXUS TEASER — Phase 1 (Brand-aligned)
   ═══════════════════════════════════════════════════════════════════ */

.nexus-details-wrapper { margin-bottom: 16px; }
.nexus-details-wrapper summary { list-style: none; }
.nexus-details-wrapper summary::-webkit-details-marker { display: none; }

.nexus-teaser-summary {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 14px 18px;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.18s ease, border-color 0.18s ease;
    user-select: none;
}
.nexus-teaser-summary:hover {
    border-color: rgba(60,148,248,0.30);
    box-shadow: var(--shadow-md);
}
details[open] .nexus-teaser-summary {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    border-bottom-color: var(--border-color);
    box-shadow: none;
}
.nt-left { display: flex; align-items: center; gap: 14px; min-width: 200px; }
.nt-atom-icon { font-size: 20px; color: var(--primary-color); opacity: 0.7; }
.nt-name {
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.nt-badge {
    font-size: 9px;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    background: rgba(60,148,248,0.10);
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: 1px solid rgba(60,148,248,0.20);
}
.nt-tagline { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.nt-center { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.nt-score-wrap { display: flex; align-items: baseline; gap: 8px; }
.nt-score-lbl {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--neutral-color);
}
.nt-score-val {
    font-size: 18px;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--text-primary);
}
.nt-score-bar-track {
    height: 3px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
    width: 140px;
}
.nt-score-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: var(--primary-color);
    transition: width 0.6s ease;
}
.nt-insight { font-size: 12px; color: var(--text-secondary); font-weight: 500; }
.nt-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.nt-open-hint {
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 600;
    white-space: nowrap;
    font-family: var(--font-heading);
}
.nexus-details-wrapper .nexus-card {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    border-top: none;
    margin-top: 0;
}

/* ── Gesamt-Score Info Button ─────────────────────────────── */
.kpi-info-btn {
    background: none;
    border: none;
    padding: 0 0 0 4px;
    cursor: pointer;
    color: var(--neutral-color);
    font-size: 10px;
    line-height: 1;
    vertical-align: middle;
    transition: color 0.18s ease, transform 0.15s ease;
}
.kpi-info-btn:hover { color: var(--primary-color); transform: scale(1.2); }
.kpi-info-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(60,148,248,0.30); border-radius: 50%; }

/* ── Gesamt-Score Tooltip Popover ─────────────────────────── */
.gesamt-score-tooltip {
    position: fixed;
    z-index: 9999;
    max-width: 300px;
    pointer-events: auto;
}
.gst-body {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-lg);
}
.gst-title {
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--text-primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.gst-title i { color: var(--primary-color); }
.gst-text { font-size: 12px; color: var(--text-secondary); line-height: 1.6; margin: 0 0 8px 0; }
.gst-note { color: var(--primary-color); font-weight: 500; font-style: italic; margin-bottom: 10px; }
.gst-close { font-size: 10px; color: var(--text-muted); text-align: center; margin-top: 8px; cursor: pointer; }

/* ═══════════════════════════════════════════════════════════════════
   COLLAPSIBLE SECTION — unified <details> design (Brand-aligned)
   ═══════════════════════════════════════════════════════════════════ */

.collapsible-section { margin-top: 12px; margin-bottom: 4px; }

.collapsible-summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-heading);
    letter-spacing: 0.03em;
    color: var(--text-secondary);
    user-select: none;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.collapsible-summary::-webkit-details-marker { display: none; }
/* Icon links: volle Sichtbarkeit — klare Sektion-Kennung, kein grauer Indikator */
.collapsible-summary i { font-size: 13px; color: var(--primary-color); opacity: 1; }

/* Pfeil rechts: Brand Blue — klar als Öffnen/Schließen-Aktion erkennbar */
.collapsible-summary::after {
    content: '›';
    margin-left: auto;
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
    opacity: 1;
    transition: transform 0.2s ease;
    display: inline-block;
    line-height: 1;
}
.collapsible-section[open] .collapsible-summary::after {
    transform: rotate(90deg);
    opacity: 1;
}
.collapsible-summary:hover {
    background: rgba(60,148,248,0.04);
    border-color: rgba(60,148,248,0.20);
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
}
.collapsible-summary:hover::after { opacity: 1; }
.collapsible-section[open] .collapsible-summary {
    background: rgba(60,148,248,0.04);
    border-color: rgba(60,148,248,0.18);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    color: var(--text-primary);
    box-shadow: none;
}
.collapsible-summary:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(60,148,248,0.25);
}

/* ═══════════════════════════════════════════════════════════════════
   KPI HERO BAR — override block (keeps previously added overrides)
   ═══════════════════════════════════════════════════════════════════ */

/* ── chart-section.collapsible-section: alle chart-section summary Overrides neutralisieren ── */
.chart-section.collapsible-section {
    border-top: none !important;
    padding-top: 0 !important;
    margin-top: 12px !important;
}
.chart-section.collapsible-section summary {
    /* Reset aller .chart-section summary Overrides → identisch mit .collapsible-summary */
    font-family: var(--font-heading) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--text-secondary) !important;
    letter-spacing: 0.03em !important;
    padding: 12px 16px !important;
    border-top: none !important;
    gap: 10px !important;
}
.chart-section.collapsible-section summary i {
    font-size: 13px !important;
    color: var(--primary-color) !important;
}
.chart-section.collapsible-section summary:hover {
    color: var(--text-primary) !important;
}
/* Kein doppelter Pfeil — ::before entfernen, ::after bleibt */
.chart-section.collapsible-section summary::before {
    display: none !important;
}

/* ── NEXUS expand-indicator: gleiche Optik wie › bei Glaskugel/Kennzahlen ── */
.nt-open-hint {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: var(--primary-color) !important;
    display: inline-block !important;
    transition: transform 0.2s ease !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    font-family: inherit !important;
}
details[open] .nexus-teaser-summary .nt-open-hint {
    transform: rotate(90deg);
}

/* ═══════════════════════════════════════════════════════════════════
   PHASE 4 — Forecasting-Tiefe
   ═══════════════════════════════════════════════════════════════════ */

/* Bestellmengen-Empfehlung im Zukunfts-Radar */
.zr-item-order-hint {
    font-size: 10px;
    font-weight: 600;
    color: var(--primary-color);
    opacity: 0.75;
    margin-top: 3px;
    letter-spacing: 0.03em;
}

/* ── Sort arrows ─────────────────────────────────────────────────── */
.sort-icon {
    display: inline-block;
    margin-left: 5px;
    font-size: 13px;
    vertical-align: middle;
    line-height: 1;
    transition: color 0.15s, opacity 0.15s;
}
.sort-icon-idle {
    color: var(--secondary-color);
    opacity: 0.55;
}
.data-table th:hover .sort-icon-idle {
    opacity: 0.85;
    color: var(--text-primary);
}
.sort-icon-active {
    color: var(--primary-color);
    opacity: 1;
    font-weight: 700;
}
.data-table th.sort-active {
    color: var(--primary-color);
}

.data-table.dt-versand { table-layout: fixed !important; width: 100%; }
.data-table.dt-versand td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============================================================
   UX SESSION A — Help-System, KPI-Actions, Notification
   ============================================================ */

/* Help-Chip: kleines ?-Icon neben Widget-Titeln */
.help-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(99,102,241,0.15);
    border: 1px solid rgba(99,102,241,0.30);
    color: #818CF8;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    margin-left: 6px;
    vertical-align: middle;
    line-height: 1;
    transition: background 0.15s, border-color 0.15s;
    flex-shrink: 0;
}
.help-chip:hover {
    background: rgba(99,102,241,0.28);
    border-color: rgba(99,102,241,0.55);
    color: #a5b4fc;
}

/* Help-Popup */
.help-popup {
    position: fixed;
    z-index: 8500;
    max-width: 280px;
    background: #1a1a2e;
    border: 1px solid rgba(99,102,241,0.35);
    border-radius: 10px;
    padding: 12px 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.45), 0 0 0 1px rgba(99,102,241,0.12);
    font-size: 12px;
    color: #94A3B8;
    line-height: 1.65;
    pointer-events: none;
}
.help-popup-title {
    font-weight: 700;
    font-size: 12px;
    color: #E2E8F0;
    margin-bottom: 5px;
    font-family: 'Space Grotesk', sans-serif;
}

/* KPI Action-Link */
.kpi-action-link {
    display: inline-block;
    margin-top: 5px;
    font-size: 11px;
    color: #3C94F8;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: color 0.15s;
}
.kpi-action-link:hover { color: #60a5fa; text-decoration: underline; }

/* Core Heartbeat Notification Bar */
/* ── Onboarding / Lernphase Banner ─────────────────────────────── */
.onboarding-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    background: linear-gradient(135deg, rgba(6,182,212,0.08) 0%, rgba(6,182,212,0.04) 100%);
    border: 1px solid rgba(6,182,212,0.25);
    border-radius: 10px;
    margin-bottom: 16px;
    position: relative;
}
.onboarding-banner-icon {
    color: #06b6d4;
    font-size: 18px;
    flex-shrink: 0;
}
.onboarding-banner-body {
    flex: 1;
    font-size: 13px;
    color: #cbd5e1;
    line-height: 1.4;
}
.onboarding-banner-body strong {
    color: #06b6d4;
    font-weight: 700;
}
.onboarding-banner-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.onboarding-banner-progress-bar {
    width: 80px;
    height: 4px;
    background: rgba(6,182,212,0.15);
    border-radius: 2px;
    overflow: hidden;
}
.onboarding-banner-progress-fill {
    height: 100%;
    background: #06b6d4;
    border-radius: 2px;
    transition: width 0.4s ease;
}
.onboarding-banner-days {
    font-size: 11px;
    color: rgba(6,182,212,0.7);
    white-space: nowrap;
}
.onboarding-banner-close {
    background: none;
    border: none;
    color: rgba(100,116,139,0.6);
    cursor: pointer;
    font-size: 13px;
    padding: 2px 4px;
    flex-shrink: 0;
    transition: color 0.2s;
}
.onboarding-banner-close:hover { color: #94a3b8; }

.core-notification-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: linear-gradient(90deg, rgba(60,148,248,0.10), rgba(60,148,248,0.04));
    border: 1px solid rgba(60,148,248,0.25);
    border-radius: 10px;
    margin-bottom: 14px;
    font-size: 13px;
    color: #94A3B8;
}
.core-notification-bar .cnb-icon { color: #3C94F8; font-size: 15px; }
.core-notification-bar .cnb-text { flex: 1; }
.core-notification-bar .cnb-link {
    color: #3C94F8;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    font-size: 12px;
}
.core-notification-bar .cnb-close {
    background: none;
    border: none;
    color: #475569;
    cursor: pointer;
    font-size: 14px;
    padding: 0 2px;
    transition: color 0.15s;
}
.core-notification-bar .cnb-close:hover { color: #94A3B8; }
