/* ================================================================
   EE Analysis Dashboard — Bold Light Theme
   Apple Health meets Stripe Analytics meets Linear
   ================================================================ */

/* ----------------------------------------------------------------
   1. CUSTOM PROPERTIES
   ---------------------------------------------------------------- */
:root {
    /* Colors */
    --dash-bg: #F8FAFC;
    --dash-bg-subtle: #F1F5F9;
    --dash-surface: #FFFFFF;
    --dash-surface-hover: #F8FAFC;
    --dash-border: rgba(0, 0, 0, 0.06);
    --dash-border-hover: rgba(0, 0, 0, 0.12);

    /* Brand */
    --dash-green: #10B981;
    --dash-green-dark: #059669;
    --dash-green-brand: #3FA14D;
    --dash-green-light: rgba(16, 185, 129, 0.06);
    --dash-cyan: #06B6D4;
    --dash-cyan-dark: #0891B2;
    --dash-cyan-light: rgba(6, 182, 212, 0.06);
    --dash-amber: #F59E0B;
    --dash-red: #EF4444;
    --dash-purple: #8B5CF6;

    /* Text */
    --dash-text: #0F172A;
    --dash-text-secondary: #475569;
    --dash-text-muted: #94A3B8;

    /* Shadows */
    --dash-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    --dash-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    --dash-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);

    /* Radii */
    --dash-radius: 12px;
    --dash-radius-sm: 8px;
    --dash-radius-lg: 16px;

    /* Font */
    --dash-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --dash-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
}

/* ----------------------------------------------------------------
   2. DASHBOARD SHELL
   ---------------------------------------------------------------- */
.ee-dashboard {
    font-family: var(--dash-font);
    color: var(--dash-text);
    background: linear-gradient(180deg, #F8FAFC 0%, #F1F5F9 100%);
    min-height: 100vh;
    padding: 24px 28px 40px;
    position: relative;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: 'tnum';
}

.ee-dashboard *, .ee-dashboard *::before, .ee-dashboard *::after {
    box-sizing: border-box;
}

.ee-dashboard h1, .ee-dashboard h2, .ee-dashboard h3, .ee-dashboard h4 {
    margin: 0;
    line-height: 1.3;
}

.ee-dashboard p { margin: 0 0 8px; }
.ee-dashboard ul { margin: 4px 0; padding-left: 20px; }
.ee-dashboard li { margin-bottom: 4px; }
.ee-dashboard a { color: var(--dash-green-brand); text-decoration: none; }
.ee-dashboard a:hover { text-decoration: underline; }

/* ----------------------------------------------------------------
   3. LOADING OVERLAY
   ---------------------------------------------------------------- */
.ee-dash-loading {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    inset: 0;
    background: rgba(248, 250, 252, 0.85);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 110;
    transition: opacity 0.4s ease;
}

.ee-dash-loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.ee-dash-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--dash-border);
    border-top-color: var(--dash-green-brand);
    border-radius: 50%;
    animation: ee-spin 0.7s linear infinite;
}

.ee-dash-spinner-sm {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid var(--dash-border);
    border-top-color: var(--dash-green-brand);
    border-radius: 50%;
    animation: ee-spin 0.7s linear infinite;
    vertical-align: middle;
}

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

/* ----------------------------------------------------------------
   4. HEADER
   ---------------------------------------------------------------- */
.ee-dash-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.ee-dash-header-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ee-dash-header-titles h1 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--dash-text);
}

.ee-dash-subtitle {
    font-size: 13px;
    color: var(--dash-text-muted);
}

.ee-dash-org-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--dash-green-brand);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.ee-dash-last-update {
    font-size: 11px;
    color: var(--dash-text-muted);
    font-variant-numeric: tabular-nums;
}

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

.ee-dash-header-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Select */
.ee-dash-select {
    font-family: var(--dash-font);
    font-size: 13px;
    padding: 7px 32px 7px 12px;
    border: 1px solid var(--dash-border);
    border-radius: var(--dash-radius-sm);
    background: var(--dash-surface);
    color: var(--dash-text);
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2394A3B8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: border-color 0.15s;
}

.ee-dash-select:hover { border-color: var(--dash-border-hover); }
.ee-dash-select:focus-visible { outline: 2px solid var(--dash-green-brand); outline-offset: 1px; }

/* Buttons */
.ee-dash-btn {
    font-family: var(--dash-font);
    font-size: 13px;
    font-weight: 600;
    padding: 7px 16px;
    border: none;
    border-radius: var(--dash-radius-sm);
    background: var(--dash-green-brand);
    color: #fff;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ee-dash-btn:hover { background: #358A42; }
.ee-dash-btn:active { background: #2D7738; }
.ee-dash-btn:focus-visible { outline: 2px solid var(--dash-green-brand); outline-offset: 2px; }
.ee-dash-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.ee-dash-btn.secondary {
    background: var(--dash-surface);
    color: var(--dash-text-secondary);
    border: 1px solid var(--dash-border);
}

.ee-dash-btn.secondary:hover { background: var(--dash-bg-subtle); border-color: var(--dash-border-hover); }

.ee-dash-btn-sm {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 6px;
}

/* ----------------------------------------------------------------
   5. TAB NAVIGATION — sleek underline style
   ---------------------------------------------------------------- */
.ee-dash-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--dash-border);
    margin-bottom: 20px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.ee-dash-tabs::-webkit-scrollbar { display: none; }

.ee-dash-tab {
    font-family: var(--dash-font);
    font-size: 13px;
    font-weight: 500;
    color: var(--dash-text-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
    position: relative;
}

.ee-dash-tab:hover { color: var(--dash-text-secondary); }

.ee-dash-tab.active {
    color: var(--dash-green-brand);
    font-weight: 600;
    border-bottom-color: var(--dash-green-brand);
}

.ee-dash-tab svg { opacity: 0.6; }
.ee-dash-tab.active svg { opacity: 1; }

.ee-dash-tab-badge {
    font-size: 10px;
    font-weight: 700;
    background: var(--dash-red);
    color: #fff;
    padding: 1px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    line-height: 1.4;
}

.ee-dash-tab:focus-visible { outline: 2px solid var(--dash-green-brand); outline-offset: -2px; border-radius: 4px; }

/* ----------------------------------------------------------------
   6. TAB PANELS
   ---------------------------------------------------------------- */
.ee-dash-tab-panels { position: relative; }

.ee-dash-tab-panel {
    display: none;
    animation: ee-fade-in 0.3s ease;
}

.ee-dash-tab-panel.active { display: block; }

@keyframes ee-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ----------------------------------------------------------------
   7. SECTIONS & CARDS
   ---------------------------------------------------------------- */
.ee-dash-section {
    margin-bottom: 16px;
}

.ee-dash-card {
    background: var(--dash-surface);
    border: 1px solid var(--dash-border);
    border-radius: var(--dash-radius);
    padding: 16px;
    box-shadow: var(--dash-shadow);
    transition: box-shadow 0.2s ease;
    overflow: hidden;
}

.ee-dash-card:hover {
    box-shadow: var(--dash-shadow-md);
}

/* Section header */
.ee-dash-section-header {
    margin-bottom: 12px;
}

.ee-dash-section-header h2 {
    font-size: 15px;
    font-weight: 700;
    color: var(--dash-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ee-dash-section-header-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ee-dash-section-header-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.ee-dash-section-header:has(.ee-dash-section-header-left) {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.ee-dash-section-desc {
    display: block;
    font-size: 12px;
    color: var(--dash-text-muted);
    margin-top: 2px;
}

.ee-dash-powered-by {
    font-size: 11px;
    color: var(--dash-text-muted);
}

.ee-dash-ai-provider {
    font-weight: 600;
    color: var(--dash-text-secondary);
}

.ee-dash-mwp-total {
    font-size: 12px;
    color: var(--dash-text-muted);
    margin-top: 4px;
}

.ee-dash-mwp-total strong {
    color: var(--dash-text);
    font-family: var(--dash-mono);
}

.ee-dash-count-badge {
    font-family: var(--dash-mono);
    font-size: 12px;
    font-weight: 700;
    background: rgba(239, 68, 68, 0.08);
    color: var(--dash-red);
    padding: 1px 8px;
    border-radius: 10px;
    vertical-align: middle;
}

/* Two-column layouts */
.ee-dash-two-col {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.ee-dash-two-col--equal {
    grid-template-columns: 1fr 1fr;
}

.ee-dash-card-wide { /* used in grid — no extra styling needed beyond marker */ }

/* ----------------------------------------------------------------
   8. AI BRIEFING — distinctive with left accent bar
   ---------------------------------------------------------------- */
.ee-dash-ai-briefing {
    border-left: 4px solid transparent;
    border-image: linear-gradient(to bottom, var(--dash-green-brand), var(--dash-green)) 1;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.02), rgba(63, 161, 77, 0.03));
}

.ee-dash-ai-content {
    font-size: 13px;
    color: var(--dash-text-secondary);
    line-height: 1.65;
}

.ee-dash-ai-content.ee-dash-collapsible.collapsed {
    display: none;
}

.ee-dash-ai-refresh {
    background: transparent;
    border: 1px solid var(--dash-border);
    color: var(--dash-text-muted);
}

.ee-dash-ai-refresh:hover { color: var(--dash-green-brand); border-color: var(--dash-green-brand); background: var(--dash-green-light); }

.ee-dash-collapse-toggle {
    background: transparent;
    border: 1px solid var(--dash-border);
    color: var(--dash-text-muted);
    font-size: 11px;
    line-height: 1;
}

.ee-dash-collapse-toggle:hover { border-color: var(--dash-border-hover); color: var(--dash-text-secondary); }

.ee-dash-ai-summary {
    margin-bottom: 12px;
}

.ee-dash-ai-warnings {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.ee-dash-ai-alert {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    border-radius: var(--dash-radius-sm);
    font-size: 13px;
}

.ee-dash-ai-alert.warning {
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.15);
}

.ee-dash-ai-alert.critical {
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.ee-dash-ai-alert-badge {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.8px;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 2px;
}

.ee-dash-ai-alert.warning .ee-dash-ai-alert-badge { background: rgba(245, 158, 11, 0.15); color: #B45309; }
.ee-dash-ai-alert.critical .ee-dash-ai-alert-badge { background: rgba(239, 68, 68, 0.15); color: #DC2626; }

.ee-dash-ai-alert-text { flex: 1; }

.ee-dash-ai-recommendations {
    margin-bottom: 12px;
}

.ee-dash-ai-recommendations h4 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--dash-text);
}

.ee-dash-ai-rec-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ee-dash-ai-rec-step {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--dash-text-secondary);
}

.ee-dash-ai-rec-num {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--dash-green-brand), var(--dash-green));
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ee-dash-ai-rec-text { flex: 1; padding-top: 1px; }

.ee-dash-ai-market {
    margin-bottom: 12px;
}

.ee-dash-ai-market h4 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--dash-text);
}

.ee-dash-ai-highlight {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 0;
    font-size: 13px;
    color: var(--dash-text-secondary);
    border-bottom: 1px solid var(--dash-border);
}

.ee-dash-ai-highlight:last-child { border-bottom: none; }

.ee-dash-ai-highlight-badge {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.8px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(6, 182, 212, 0.1);
    color: var(--dash-cyan-dark);
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 2px;
}

.ee-dash-ai-highlight-text { flex: 1; }

.ee-dash-ai-source-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 500;
    color: var(--dash-text-muted);
    background: var(--dash-bg-subtle);
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.15s;
    text-decoration: none;
}

.ee-dash-ai-source-pill:hover { background: var(--dash-border); text-decoration: none; }

.ee-dash-ai-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--dash-border);
    font-size: 11px;
    color: var(--dash-text-muted);
}

.ee-dash-ai-powered, .ee-dash-ai-timestamp {
    font-size: 11px;
    color: var(--dash-text-muted);
}

/* ----------------------------------------------------------------
   9. HEALTH ROW & GAUGE
   ---------------------------------------------------------------- */
.ee-dash-health-row {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.ee-dash-health-gauge {
    background: var(--dash-surface);
    border-radius: var(--dash-radius-lg);
    padding: 20px;
    border: 1px solid var(--dash-border);
    box-shadow: var(--dash-shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    transition: box-shadow 0.2s;
}

.ee-dash-health-gauge:hover { box-shadow: var(--dash-shadow-md); }

.ee-dash-gauge-ring {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.ee-dash-gauge-ring::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    bottom: 8px;
    left: 8px;
    inset: 8px;
    border-radius: 50%;
    background: var(--dash-surface);
}

.ee-dash-gauge-value {
    position: relative;
    z-index: 1;
    font-family: var(--dash-mono);
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
}

.ee-dash-gauge-label {
    position: relative;
    z-index: 1;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-top: 2px;
}

/* ----------------------------------------------------------------
   10. CRITICAL ACTIONS
   ---------------------------------------------------------------- */
.ee-dash-filter-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.ee-dash-filter-tab {
    font-family: var(--dash-font);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border: 1px solid var(--dash-border);
    border-radius: 20px;
    background: transparent;
    color: var(--dash-text-muted);
    cursor: pointer;
    transition: all 0.15s;
}

.ee-dash-filter-tab:hover { border-color: var(--dash-border-hover); color: var(--dash-text-secondary); }

.ee-dash-filter-tab.active {
    background: var(--dash-green-brand);
    border-color: var(--dash-green-brand);
    color: #fff;
}

.ee-dash-critical-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 320px;
    overflow-y: auto;
}

.ee-dash-critical-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--dash-radius-sm);
    border-left: 3px solid transparent;
    background: var(--dash-bg-subtle);
    transition: background 0.15s;
}

.ee-dash-critical-item:hover { background: rgba(0, 0, 0, 0.03); }
.ee-dash-critical-item.critical { border-left-color: var(--dash-red); }
.ee-dash-critical-item.warning { border-left-color: var(--dash-amber); }
.ee-dash-critical-item.info { border-left-color: var(--dash-cyan); }

.ee-dash-critical-item .item-type {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.8px;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 2px;
}

.ee-dash-critical-item.critical .item-type { background: rgba(239, 68, 68, 0.1); color: #DC2626; }
.ee-dash-critical-item.warning .item-type { background: rgba(245, 158, 11, 0.1); color: #B45309; }
.ee-dash-critical-item.info .item-type { background: rgba(6, 182, 212, 0.1); color: var(--dash-cyan-dark); }

.ee-dash-critical-item .item-body {
    flex: 1;
    min-width: 0;
}

.ee-dash-critical-item .item-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--dash-text);
    text-decoration: none;
    display: block;
}

.ee-dash-critical-item .item-title:hover { color: var(--dash-green-brand); }

.ee-dash-critical-item .item-detail {
    font-size: 12px;
    color: var(--dash-text-muted);
    display: block;
    margin-top: 2px;
    white-space: nowrap;
}

.ee-dash-critical-item .item-snippet {
    font-size: 12px;
    color: var(--dash-text-muted);
    font-style: italic;
    margin: 4px 0 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ee-dash-success-msg {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: var(--dash-radius-sm);
    font-size: 13px;
    color: var(--dash-green-dark);
    font-weight: 500;
}

/* ----------------------------------------------------------------
   11. KPI STRIP — CSS Grid, uniform cards
   ---------------------------------------------------------------- */
.ee-dash-kpi-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.ee-dash-kpi-strip:empty {
    display: none;
}

.ee-dash-kpi-item {
    background: var(--dash-surface);
    border: 1px solid var(--dash-border);
    border-radius: var(--dash-radius);
    padding: 12px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-feature-settings: 'tnum';
}

.ee-dash-kpi-item:hover {
    border-color: var(--kpi-accent, var(--dash-border-hover));
    box-shadow: var(--dash-shadow);
}

/* Section tinting */
.ee-dash-kpi-strip[data-kpi-type="sales"] .ee-dash-kpi-item {
    background: rgba(16, 185, 129, 0.03);
}

.ee-dash-kpi-strip[data-kpi-type="pe"] .ee-dash-kpi-item {
    background: rgba(6, 182, 212, 0.03);
}

.ee-dash-kpi-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--dash-bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

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

.ee-dash-kpi-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.2px;
    color: var(--dash-text-secondary);
    margin-bottom: 4px;
    white-space: nowrap;
}

.ee-dash-kpi-number {
    font-family: var(--dash-mono);
    font-size: 24px;
    font-weight: 800;
    color: var(--dash-text);
    line-height: 1.1;
    white-space: nowrap;
    font-feature-settings: 'tnum';
}

/* Conditional formatting */
.ee-dash-kpi-number.status-good { color: #059669; }
.ee-dash-kpi-number.status-warn { color: #D97706; }
.ee-dash-kpi-number.status-bad { color: #DC2626; }

/* Trend */
.ee-dash-kpi-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 4px;
    white-space: nowrap;
}

.ee-dash-trend-up { color: #059669; }
.ee-dash-trend-down { color: #DC2626; }
.ee-dash-trend-neutral { color: var(--dash-text-muted); }
.ee-dash-trend-icon { display: inline-flex; }

/* Sparkline */
.ee-dash-kpi-sparkline {
    margin-top: 6px;
}

.ee-dash-sparkline { display: block; }

/* Progress ring */
.ee-dash-progress-ring {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: conic-gradient(var(--ring-color, #10B981) calc(var(--ring-pct, 0) * 1%), #E5E7EB 0);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ee-dash-progress-ring::after {
    content: '';
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: white;
}

/* ----------------------------------------------------------------
   12. SALES FUNNEL — trapezoid shapes
   ---------------------------------------------------------------- */
.ee-dash-funnel {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ee-dash-funnel-stage {
    position: relative;
    clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 8px 100%);
    animation: ee-slide-in 0.3s ease both;
}

@keyframes ee-slide-in {
    from { opacity: 0; transform: translateX(-12px); }
    to { opacity: 1; transform: translateX(0); }
}

.ee-dash-funnel-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ee-dash-funnel-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-radius: 6px;
    min-height: 40px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    transition: filter 0.15s;
}

.ee-dash-funnel-bar:hover { filter: brightness(1.08); }

.ee-dash-funnel-bar .funnel-phase {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ee-dash-funnel-bar .funnel-count {
    font-family: var(--dash-mono);
    font-weight: 700;
    white-space: nowrap;
}

.ee-dash-funnel-values {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
    min-width: 120px;
}

.ee-dash-funnel-values .funnel-provision {
    font-family: var(--dash-mono);
    font-size: 13px;
    font-weight: 600;
    color: var(--dash-text);
    white-space: nowrap;
}

.ee-dash-funnel-values .funnel-weighted {
    font-size: 11px;
    color: var(--dash-text-muted);
    white-space: nowrap;
}

/* Drop-off connectors */
.ee-dash-funnel-drop {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0 4px 20px;
}

.ee-dash-funnel-drop-line {
    width: 2px;
    height: 16px;
    background: var(--dash-border);
    border-radius: 1px;
}

.ee-dash-funnel-drop .drop-pct {
    font-size: 11px;
    font-weight: 600;
    color: var(--dash-text-muted);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ee-dash-funnel-drop.bottleneck .drop-pct {
    color: var(--dash-red);
}

/* ----------------------------------------------------------------
   13. FOLLOW-UPS
   ---------------------------------------------------------------- */
.ee-dash-toggle-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
}

.ee-dash-toggle-tab {
    font-family: var(--dash-font);
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border: 1px solid var(--dash-border);
    border-radius: 20px;
    background: transparent;
    color: var(--dash-text-muted);
    cursor: pointer;
    transition: all 0.15s;
}

.ee-dash-toggle-tab:hover { border-color: var(--dash-border-hover); color: var(--dash-text-secondary); }

.ee-dash-toggle-tab.active {
    background: var(--dash-green-brand);
    border-color: var(--dash-green-brand);
    color: #fff;
}

.ee-dash-followup-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 360px;
    overflow-y: auto;
}

.ee-dash-followup-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--dash-radius-sm);
    background: var(--dash-bg-subtle);
    font-size: 13px;
    transition: background 0.15s;
}

.ee-dash-followup-item:hover { background: rgba(0, 0, 0, 0.03); }

.ee-dash-followup-item .followup-date {
    font-size: 11px;
    font-weight: 700;
    color: var(--dash-text-muted);
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 60px;
}

.ee-dash-followup-item .followup-date.urgent { color: var(--dash-red); }
.ee-dash-followup-item .followup-date.soon { color: var(--dash-amber); }

.ee-dash-followup-item .followup-name {
    font-weight: 600;
    color: var(--dash-text);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: none;
}

.ee-dash-followup-item .followup-name:hover { color: var(--dash-green-brand); }

.ee-dash-followup-item .followup-contact {
    font-size: 11px;
    color: var(--dash-text-muted);
    white-space: nowrap;
}

.ee-dash-followup-item .followup-type {
    font-size: 10px;
    font-weight: 600;
    color: var(--dash-cyan-dark);
    background: var(--dash-cyan-light);
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

/* ----------------------------------------------------------------
   14. CHARTS
   ---------------------------------------------------------------- */
.ee-dash-chart-wrap {
    position: relative;
    min-height: 320px;
    border-radius: var(--dash-radius-sm);
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 49px,
        rgba(0, 0, 0, 0.015) 49px,
        rgba(0, 0, 0, 0.015) 50px
    );
    padding: 8px;
}

.ee-dash-chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}

/* ----------------------------------------------------------------
   15. LOST REASONS
   ---------------------------------------------------------------- */
.ee-dash-lost-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ee-dash-lost-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ee-dash-lost-item .lost-reason {
    font-size: 12px;
    color: var(--dash-text-secondary);
    min-width: 100px;
    flex-shrink: 0;
}

.ee-dash-lost-item .lost-bar-track {
    flex: 1;
    height: 6px;
    background: var(--dash-bg-subtle);
    border-radius: 3px;
    overflow: hidden;
}

.ee-dash-lost-item .lost-bar {
    height: 100%;
    background: var(--dash-red);
    border-radius: 3px;
    transition: width 0.5s ease;
    max-width: 100%;
}

.ee-dash-lost-item .lost-count {
    font-family: var(--dash-mono);
    font-size: 12px;
    font-weight: 700;
    color: var(--dash-text);
    min-width: 24px;
    text-align: right;
    white-space: nowrap;
}

/* ----------------------------------------------------------------
   16. STALE LEADS
   ---------------------------------------------------------------- */
.ee-dash-stale-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 400px;
    overflow-y: auto;
}

.ee-dash-stale-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--dash-radius-sm);
    background: var(--dash-bg-subtle);
    font-size: 13px;
    transition: background 0.15s;
}

.ee-dash-stale-item:hover { background: rgba(0, 0, 0, 0.03); }

.ee-dash-stale-item .stale-days {
    font-family: var(--dash-mono);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
    background: var(--dash-bg-subtle);
    color: var(--dash-text-muted);
}

.ee-dash-stale-item .stale-days.warning { background: rgba(245, 158, 11, 0.1); color: #B45309; }
.ee-dash-stale-item .stale-days.critical { background: rgba(239, 68, 68, 0.1); color: #DC2626; }

.ee-dash-stale-item .stale-name {
    font-weight: 600;
    color: var(--dash-text);
    flex: 1;
    min-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
}

.ee-dash-stale-item .stale-name:empty::after {
    content: '\2014';
    color: var(--dash-text-muted);
}

.ee-dash-stale-item .stale-name:hover { color: var(--dash-green-brand); }

.ee-dash-stale-item .stale-msg {
    font-size: 11px;
    color: var(--dash-text-muted);
    font-style: italic;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ee-dash-stale-item .stale-contact {
    font-size: 11px;
    color: var(--dash-text-muted);
    white-space: nowrap;
}

.ee-dash-stale-item .stale-provision {
    font-family: var(--dash-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--dash-text);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ----------------------------------------------------------------
   17. PE PIPELINE — connected nodes with connectors
   ---------------------------------------------------------------- */
.ee-dash-pipeline-flow {
    padding: 8px 0;
}

/* PE Phase Matrix (parallel model) */
.ee-dash-pe-matrix {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 16px 8px;
}

.ee-dash-pe-phase-card {
    background: var(--dash-bg, #fff);
    border: 1px solid var(--dash-border, #e5e7eb);
    border-radius: 10px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: ee-fade-in 0.3s ease both;
    transition: box-shadow 0.2s;
}

.ee-dash-pe-phase-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ee-dash-pe-phase-header {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ee-dash-pe-phase-name {
    flex: 1;
}

.ee-dash-pe-phase-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ee-dash-pe-phase-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--dash-text, #1a1a1a);
    flex: 1;
}

.ee-dash-pe-phase-score {
    font-family: var(--dash-mono);
    font-size: 14px;
    font-weight: 700;
    color: var(--dash-text, #1a1a1a);
}

.ee-dash-pe-phase-bar {
    height: 6px;
    background: var(--dash-bg-tertiary, #f0f0f0);
    border-radius: 3px;
    overflow: hidden;
    display: flex;
}

.ee-dash-pe-phase-bar-completed {
    height: 100%;
    border-radius: 3px 0 0 3px;
    transition: width 0.4s ease;
}

.ee-dash-pe-phase-bar-progress {
    height: 100%;
    transition: width 0.4s ease;
}

.ee-dash-pe-phase-counts {
    display: flex;
    gap: 10px;
    font-size: 12px;
    font-family: var(--dash-mono);
}

.ee-dash-pe-count-done {
    color: #34C759;
    font-weight: 600;
}

.ee-dash-pe-count-wip {
    color: #FF9500;
    font-weight: 500;
}

.ee-dash-pe-count-todo {
    color: var(--dash-text-muted, #999);
    font-weight: 400;
}

.ee-dash-pe-phase-meta {
    display: flex;
    justify-content: space-between;
    font-family: var(--dash-mono);
    font-size: 11px;
    color: var(--dash-text-muted, #999);
}

/* ----------------------------------------------------------------
   18. PHASE DURATION / VELOCITY
   ---------------------------------------------------------------- */
.ee-dash-velocity-container {
    padding: 4px 0;
}

.ee-dash-velocity-chart {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ee-dash-velocity-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ee-dash-velocity-item .velocity-label {
    font-size: 12px;
    color: var(--dash-text-secondary);
    min-width: 110px;
    flex-shrink: 0;
    white-space: nowrap;
}

.ee-dash-velocity-item .velocity-bar-track {
    flex: 1;
    height: 8px;
    background: var(--dash-bg-subtle);
    border-radius: 4px;
    overflow: hidden;
}

.ee-dash-velocity-item .velocity-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
    background: #007AFF;
}

.ee-dash-velocity-item .velocity-bar.slow { background: var(--dash-amber); }
.ee-dash-velocity-item .velocity-bar.very-slow { background: var(--dash-red); }

.ee-dash-velocity-item .velocity-days {
    font-family: var(--dash-mono);
    font-size: 12px;
    font-weight: 700;
    color: var(--dash-text);
    min-width: 60px;
    text-align: right;
    white-space: nowrap;
}

/* ----------------------------------------------------------------
   19. BLOCKED PROJECTS
   ---------------------------------------------------------------- */
.ee-dash-blocked-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 360px;
    overflow-y: auto;
}

.ee-dash-blocked-item {
    padding: 8px 12px;
    border-radius: var(--dash-radius-sm);
    background: var(--dash-bg-subtle);
    border-left: 3px solid var(--dash-red);
    transition: background 0.15s;
}

.ee-dash-blocked-item:hover { background: rgba(0, 0, 0, 0.03); }

.ee-dash-blocked-item .blocked-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--dash-text);
    text-decoration: none;
    display: block;
}

.ee-dash-blocked-item .blocked-title:hover { color: var(--dash-green-brand); }

.ee-dash-blocked-item .blocked-detail {
    font-size: 12px;
    color: var(--dash-text-muted);
    margin-top: 2px;
    display: block;
}

/* ----------------------------------------------------------------
   20. ACTIVITY FEED — timeline with vertical line
   ---------------------------------------------------------------- */
.ee-dash-activity-feed {
    position: relative;
    padding-left: 24px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 520px;
    overflow-y: auto;
}

.ee-dash-activity-feed::before {
    content: '';
    position: absolute;
    left: 17px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--dash-green-brand), transparent);
    border-radius: 1px;
}

.ee-dash-activity-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--dash-radius-sm);
    transition: background 0.15s;
}

.ee-dash-activity-item:hover { background: rgba(0, 0, 0, 0.02); }

.ee-dash-activity-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 14px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--dash-green-brand);
    border: 2px solid white;
    box-shadow: 0 0 0 2px var(--dash-green-brand);
}

.ee-dash-activity-item .activity-type-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ee-dash-activity-item .activity-body {
    flex: 1;
    min-width: 0;
}

.ee-dash-activity-item .activity-header {
    font-size: 13px;
    color: var(--dash-text);
}

.ee-dash-activity-item .activity-org-link {
    font-weight: 600;
    color: var(--dash-text);
    text-decoration: none;
}

.ee-dash-activity-item .activity-org-link:hover { color: var(--dash-green-brand); }

.ee-dash-activity-item .activity-snippet {
    font-size: 12px;
    color: var(--dash-text-muted);
    font-style: italic;
    margin: 2px 0 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ee-dash-activity-item .activity-time {
    font-size: 11px;
    color: var(--dash-text-muted);
    white-space: nowrap;
    flex-shrink: 0;
    padding-top: 2px;
}

.ee-dash-load-more-wrap {
    text-align: center;
    margin-top: 10px;
}

.ee-dash-load-more {
    background: var(--dash-surface);
    color: var(--dash-text-secondary);
    border: 1px solid var(--dash-border);
}

.ee-dash-load-more:hover { background: var(--dash-bg-subtle); }

/* ----------------------------------------------------------------
   21. MARKET INTELLIGENCE
   ---------------------------------------------------------------- */
.ee-dash-intel-updated {
    font-size: 11px;
    color: var(--dash-text-muted);
}

.ee-dash-intel-trigger {
    font-family: var(--dash-font);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border: 1px solid var(--dash-green-brand);
    border-radius: var(--dash-radius-sm);
    background: transparent;
    color: var(--dash-green-brand);
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ee-dash-intel-trigger:hover { background: var(--dash-green-brand); color: #fff; }
.ee-dash-intel-trigger:disabled { opacity: 0.5; cursor: not-allowed; }

.ee-dash-intel-trigger-loading { display: inline-flex; align-items: center; gap: 6px; }

.ee-dash-intel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.ee-dash-intel-card {
    background: var(--dash-surface);
    border: 1px solid var(--dash-border);
    border-radius: var(--dash-radius);
    padding: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ee-dash-intel-card:hover {
    transform: scale(1.02);
    box-shadow: var(--dash-shadow-md);
}

.ee-dash-intel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.ee-dash-intel-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ee-dash-intel-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ee-dash-intel-relevance {
    display: inline-flex;
    gap: 1px;
}

.ee-dash-intel-star {
    color: var(--dash-amber);
    display: inline-flex;
}

.ee-dash-intel-time {
    font-size: 11px;
    color: var(--dash-text-muted);
    white-space: nowrap;
}

.ee-dash-intel-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--dash-text);
    margin-bottom: 6px;
    line-height: 1.35;
}

.ee-dash-intel-summary {
    font-size: 13px;
    color: var(--dash-text-secondary);
    line-height: 1.55;
    margin-bottom: 8px;
}

.ee-dash-intel-summary.truncated {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ee-dash-intel-expand {
    font-family: var(--dash-font);
    font-size: 12px;
    font-weight: 600;
    color: var(--dash-green-brand);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
}

.ee-dash-intel-expand:hover { text-decoration: underline; }
.ee-dash-intel-expand.expanded svg { transform: rotate(180deg); }

.ee-dash-intel-sources {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.ee-dash-intel-source-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 500;
    color: var(--dash-text-muted);
    background: var(--dash-bg-subtle);
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
    transition: background 0.15s;
    text-decoration: none;
}

.ee-dash-intel-source-pill:hover { background: var(--dash-border); text-decoration: none; }

/* ----------------------------------------------------------------
   22. TOOLTIP SYSTEM
   ---------------------------------------------------------------- */
.ee-dash-tooltip-trigger {
    position: relative;
}

.ee-dash-info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--dash-bg-subtle, #f1f5f9);
    border: 1px solid var(--dash-border, #e2e8f0);
    font-size: 10px;
    font-weight: 600;
    font-style: normal;
    color: var(--dash-text-muted, #94A3B8);
    vertical-align: middle;
    margin-left: 3px;
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    flex-shrink: 0;
}
.ee-dash-info-btn:hover {
    background: var(--dash-accent, #0EA5E9);
    color: #fff;
    border-color: var(--dash-accent, #0EA5E9);
    transform: scale(1.1);
}
.ee-dash-info-btn.active {
    background: var(--dash-accent, #0EA5E9);
    color: #fff;
    border-color: var(--dash-accent, #0EA5E9);
}

/* Info icon (kept for backward compat) */
.ee-dash-info-icon { display: none; }

/* N4 fix: Lowered z-index values (was 9998/9999) */
/* Popup overlay */
.ee-dash-popup-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 100;
}

/* Popup bubble */
.ee-dash-popup {
    position: fixed;
    z-index: 101;
    background: #fff;
    color: var(--dash-text, #1a1a1a);
    font-size: 13px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.55;
    padding: 12px 16px;
    border-radius: 10px;
    max-width: 300px;
    min-width: 180px;
    white-space: normal;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--dash-border, #e2e8f0);
    animation: eePopupIn 0.15s ease-out;
}
.ee-dash-popup-title {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--dash-text-muted, #94A3B8);
    margin-bottom: 4px;
}
.ee-dash-popup-text {
    color: var(--dash-text, #1a1a1a);
}
.ee-dash-popup-arrow {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #fff;
    border: 1px solid var(--dash-border, #e2e8f0);
    transform: rotate(45deg);
    border-right: none;
    border-top: none;
}
.ee-dash-popup-arrow.arrow-top {
    top: -6px;
    border-right: 1px solid var(--dash-border, #e2e8f0);
    border-top: 1px solid var(--dash-border, #e2e8f0);
    border-bottom: none;
    border-left: none;
}
.ee-dash-popup-arrow.arrow-bottom {
    bottom: -6px;
}
@keyframes eePopupIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Legacy tooltip kept hidden */
.ee-dash-tooltip-trigger .ee-dash-tooltip { display: none; }

/* Global tooltip container (for JS-positioned) */
#eeDashTooltip {
    position: fixed;
    z-index: 109;
    background: rgba(15, 23, 42, 0.95);
    color: #fff;
    font-size: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    max-width: 260px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

/* ----------------------------------------------------------------
   23. SKELETON LOADING
   ---------------------------------------------------------------- */
.ee-dash-skeleton {
    padding: 8px 0;
}

.ee-dash-skeleton--section { margin-bottom: 12px; }
.ee-dash-skeleton--critical { margin-top: 8px; }

.ee-dash-skeleton-host .ee-dash-skeleton-bar,
.ee-dash-skeleton-line {
    background: linear-gradient(90deg, #E8EDF3 25%, #F1F5F9 50%, #E8EDF3 75%);
    background-size: 200% 100%;
    animation: ee-shimmer 1.5s ease infinite;
    border-radius: 4px;
}

.ee-dash-skeleton-line { height: 14px; margin-bottom: 8px; }
.ee-dash-skeleton-line--full { width: 100%; }
.ee-dash-skeleton-line--3q { width: 75%; }
.ee-dash-skeleton-line--half { width: 50%; }

.ee-dash-skeleton-bar {
    border-radius: 4px;
}

.ee-dash-skeleton-kpi-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.ee-dash-skeleton-kpi {
    height: 80px;
    border-radius: var(--dash-radius);
    background: linear-gradient(90deg, #E8EDF3 25%, #F1F5F9 50%, #E8EDF3 75%);
    background-size: 200% 100%;
    animation: ee-shimmer 1.5s ease infinite;
}

@keyframes ee-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ----------------------------------------------------------------
   24. EMPTY & ERROR STATES
   ---------------------------------------------------------------- */
.ee-dash-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    text-align: center;
}

.ee-dash-empty-icon {
    color: var(--dash-text-muted);
    margin-bottom: 8px;
    opacity: 0.5;
}

.ee-dash-empty-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--dash-text-secondary);
    margin-bottom: 4px;
}

.ee-dash-empty-msg {
    font-size: 12px;
    color: var(--dash-text-muted);
    max-width: 320px;
}

/* Hide empty containers that cause gray blocks */
[data-kpi-mirror]:empty {
    display: none !important;
}

.ee-dash-skeleton[style*="display:none"] + .ee-dash-kpi-strip:empty,
.ee-dash-skeleton[style*="display: none"] + .ee-dash-kpi-strip:empty {
    display: none;
}

.ee-dash-lost-list {
    overflow: hidden;
}

.ee-dash-retry-btn {
    margin-top: 12px;
    font-size: 12px;
}

.ee-dash-placeholder {
    padding: 16px 0;
}

/* Global error */
.ee-dash-global-error {
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.18);
    border-radius: var(--dash-radius);
    padding: 12px 16px;
    margin-bottom: 16px;
    animation: ee-fade-in 0.3s ease;
}

.ee-dash-error-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ee-dash-error-icon { color: var(--dash-red); flex-shrink: 0; }
.ee-dash-error-msg { flex: 1; font-size: 13px; color: #991B1B; }

.ee-dash-error-retry {
    font-size: 12px;
    padding: 4px 10px;
    flex-shrink: 0;
}

/* ----------------------------------------------------------------
   25. FOOTER
   ---------------------------------------------------------------- */
.ee-dash-footer {
    text-align: center;
    padding: 20px 0 0;
    font-size: 11px;
    color: var(--dash-text-muted);
}

.ee-dash-footer-sep {
    margin: 0 6px;
}

/* ----------------------------------------------------------------
   26. RESPONSIVE
   ---------------------------------------------------------------- */
@media (max-width: 1200px) {
    .ee-dash-two-col,
    .ee-dash-two-col--equal {
        grid-template-columns: 1fr;
    }

    .ee-dash-intel-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}

@media (max-width: 768px) {
    .ee-dashboard {
        padding: 16px 14px 32px;
    }

    .ee-dash-header {
        flex-direction: column;
        gap: 10px;
    }

    .ee-dash-header-controls {
        flex-wrap: wrap;
    }

    .ee-dash-kpi-strip,
    .ee-dash-skeleton-kpi-strip {
        grid-template-columns: repeat(2, 1fr);
    }

    .ee-dash-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .ee-dash-health-row {
        flex-direction: column;
    }

    .ee-dash-health-gauge {
        min-width: unset;
        flex-direction: row;
        gap: 16px;
        padding: 16px;
    }

    .ee-dash-gauge-ring {
        width: 72px;
        height: 72px;
    }

    .ee-dash-pe-matrix {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .ee-dash-funnel-row {
        flex-direction: column;
        align-items: stretch;
    }

    .ee-dash-funnel-values {
        flex-direction: row;
        gap: 12px;
        min-width: unset;
        padding-left: 16px;
    }

    .ee-dash-stale-item {
        flex-wrap: wrap;
    }

    .ee-dash-stale-item .stale-msg { display: none; }

    .ee-dash-critical-item .item-detail {
        white-space: normal;
    }

    .ee-dash-intel-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .ee-dash-kpi-strip,
    .ee-dash-skeleton-kpi-strip {
        grid-template-columns: 1fr;
    }

    .ee-dashboard {
        padding: 12px 10px 24px;
    }

    .ee-dash-header-titles h1 {
        font-size: 18px;
    }

    .ee-dash-kpi-item {
        padding: 10px 12px;
    }

    .ee-dash-card {
        padding: 12px;
    }

    .ee-dash-followup-item .followup-contact { display: none; }
}

/* ----------------------------------------------------------------
   27. PRINT
   ---------------------------------------------------------------- */
@media print {
    .ee-dashboard {
        background: #fff;
        padding: 0;
    }

    .ee-dash-tabs,
    .ee-dash-header-controls,
    .ee-dash-btn,
    .ee-dash-load-more-wrap,
    .ee-dash-intel-trigger,
    .ee-dash-filter-tabs,
    .ee-dash-toggle-tabs,
    .ee-dash-section-header-actions,
    .ee-dash-loading {
        display: none !important;
    }

    .ee-dash-tab-panel {
        display: block !important;
        page-break-inside: avoid;
    }

    .ee-dash-card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }

    .ee-dash-two-col,
    .ee-dash-two-col--equal {
        grid-template-columns: 1fr 1fr;
    }

    .ee-dash-kpi-item:hover,
    .ee-dash-card:hover,
    .ee-dash-intel-card:hover {
        transform: none;
        box-shadow: none;
    }
}

/* ----------------------------------------------------------------
   28. ACCESSIBILITY — reduced motion
   ---------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .ee-dash-spinner, .ee-dash-spinner-sm {
        animation: none;
    }
}

/* Focus visible for interactive elements */
.ee-dash-btn:focus-visible,
.ee-dash-tab:focus-visible,
.ee-dash-filter-tab:focus-visible,
.ee-dash-toggle-tab:focus-visible,
.ee-dash-select:focus-visible,
.ee-dash-intel-trigger:focus-visible,
.ee-dash-intel-expand:focus-visible,
.ee-dash-load-more:focus-visible {
    outline: 2px solid var(--dash-green-brand);
    outline-offset: 2px;
}

/* Scrollbar styling for overflow containers */
.ee-dash-critical-items::-webkit-scrollbar,
.ee-dash-followup-list::-webkit-scrollbar,
.ee-dash-stale-list::-webkit-scrollbar,
.ee-dash-blocked-list::-webkit-scrollbar,
.ee-dash-activity-feed::-webkit-scrollbar {
    width: 4px;
}

.ee-dash-critical-items::-webkit-scrollbar-track,
.ee-dash-followup-list::-webkit-scrollbar-track,
.ee-dash-stale-list::-webkit-scrollbar-track,
.ee-dash-blocked-list::-webkit-scrollbar-track,
.ee-dash-activity-feed::-webkit-scrollbar-track {
    background: transparent;
}

.ee-dash-critical-items::-webkit-scrollbar-thumb,
.ee-dash-followup-list::-webkit-scrollbar-thumb,
.ee-dash-stale-list::-webkit-scrollbar-thumb,
.ee-dash-blocked-list::-webkit-scrollbar-thumb,
.ee-dash-activity-feed::-webkit-scrollbar-thumb {
    background: var(--dash-border);
    border-radius: 2px;
}

/* ----------------------------------------------------------------
   NOWRAP UTILITY CLASS
   ---------------------------------------------------------------- */
.nowrap {
    white-space: nowrap;
}

/* ----------------------------------------------------------------
   KPI STATUS CLASSES (conditional formatting)
   ---------------------------------------------------------------- */
.status-good {
    color: #10B981;
}
.status-warn {
    color: #F59E0B;
}
.status-bad {
    color: #EF4444;
}

/* ----------------------------------------------------------------
   PROGRESS RING (percentage KPIs)
   ---------------------------------------------------------------- */
.ee-dash-progress-ring {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: conic-gradient(
        var(--ring-color, #3FA14D) calc(var(--ring-pct, 0) * 3.6deg),
        #E5E7EB calc(var(--ring-pct, 0) * 3.6deg)
    );
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4px 0;
}
.ee-dash-progress-ring::before {
    content: '';
    position: absolute;
    top: 5px;
    right: 5px;
    bottom: 5px;
    left: 5px;
    inset: 5px;
    border-radius: 50%;
    background: var(--dash-card-bg, #fff);
}
.ee-dash-progress-ring-value {
    position: relative;
    z-index: 1;
    font-size: 13px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--dash-text, #1E293B);
}

/* ----------------------------------------------------------------
   ACTIVITY DATE GROUP SEPARATOR
   ---------------------------------------------------------------- */
.ee-dash-activity-date-group {
    font-size: 11px;
    font-weight: 600;
    color: var(--dash-text-muted, #94A3B8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 0 4px;
    border-bottom: 1px solid var(--dash-border, #E2E8F0);
    margin-bottom: 8px;
}
.ee-dash-activity-date-group:first-child {
    padding-top: 0;
}

/* ----------------------------------------------------------------
   OVERVIEW SUMMARY LINE
   ---------------------------------------------------------------- */
.ee-dash-overview-summary {
    padding: 12px 20px;
    background: var(--dash-card-bg, #fff);
    border: 1px solid var(--dash-border, #E2E8F0);
    border-radius: 10px;
    margin-bottom: 16px;
    text-align: center;
}
.ee-dash-overview-summary-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--dash-text, #1E293B);
}

/* ================================================================
   PHASE HEATMAP — parallel phase progress matrix
   ================================================================ */
.ee-dash-card-full {
    grid-column: 1 / -1;
}
.ee-dash-heatmap-container {
    width: 100%;
}

/* Summary row */
.ee-dash-heatmap-summary {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.ee-dash-heatmap-summary-item {
    flex: 1;
    min-width: 120px;
    background: var(--dash-bg-subtle, #F1F5F9);
    border-radius: 10px;
    padding: 12px 16px;
    text-align: center;
}
.heatmap-summary-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--dash-text-muted, #94A3B8);
    margin-bottom: 8px;
}
.heatmap-summary-bar {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 6px;
}
.heatmap-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
}
.heatmap-dot.heatmap-done {
    background: rgba(16, 185, 129, 0.15);
    color: var(--dash-green, #10B981);
}
.heatmap-dot.heatmap-wip {
    background: rgba(245, 158, 11, 0.15);
    color: var(--dash-amber, #F59E0B);
}
.heatmap-dot.heatmap-todo {
    background: rgba(148, 163, 184, 0.15);
    color: var(--dash-text-muted, #94A3B8);
}
.heatmap-summary-avg {
    font-size: 13px;
    font-weight: 600;
    color: var(--dash-text, #1E293B);
}

/* Table */
.ee-dash-heatmap-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.ee-dash-heatmap-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.ee-dash-heatmap-table th {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--dash-text-muted, #94A3B8);
    padding: 8px 12px;
    text-align: center;
    border-bottom: 2px solid var(--dash-border, rgba(0,0,0,0.06));
    white-space: nowrap;
}
.ee-dash-heatmap-table th:first-child,
.ee-dash-heatmap-table th:nth-child(2) {
    text-align: left;
}
.ee-dash-heatmap-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--dash-border, rgba(0,0,0,0.06));
    text-align: center;
    white-space: nowrap;
}
.ee-dash-heatmap-table tr:hover {
    background: var(--dash-bg-subtle, #F1F5F9);
}
.heatmap-project {
    text-align: left !important;
    font-weight: 500;
}
.heatmap-project a {
    color: var(--dash-text, #1E293B);
    text-decoration: none;
}
.heatmap-project a:hover {
    color: var(--dash-green, #10B981);
}
.heatmap-mwp {
    text-align: left !important;
    color: var(--dash-text-secondary, #64748B);
}

/* Heatmap cells — color-coded by score */
.heatmap-cell {
    font-weight: 600;
    border-radius: 6px;
    min-width: 54px;
}
.heatmap-cell-done {
    background: rgba(16, 185, 129, 0.15);
    color: var(--dash-green, #10B981);
}
.heatmap-cell-good {
    background: rgba(16, 185, 129, 0.08);
    color: var(--dash-green-dark, #059669);
}
.heatmap-cell-mid {
    background: rgba(245, 158, 11, 0.10);
    color: var(--dash-amber, #F59E0B);
}
.heatmap-cell-low {
    background: rgba(239, 68, 68, 0.08);
    color: var(--dash-red, #EF4444);
}
.heatmap-cell-zero {
    color: var(--dash-text-muted, #94A3B8);
}
.heatmap-cell-overall {
    font-weight: 700;
    background: var(--dash-bg-subtle, #F1F5F9);
    color: var(--dash-text, #1E293B);
}

/* ================================================================
   PIPELINE DASHBOARD v2 STYLES (integrated)
   Formerly in ee-pipeline-dashboard.css
   ================================================================ */

.ee-pipeline-dashboard {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    color: #1E293B;
    box-sizing: border-box;
}
@media (max-width: 768px) {
    .ee-pipeline-dashboard {
        padding: 12px;
    }
}
@media (max-width: 480px) {
    .ee-pipeline-dashboard {
        padding: 8px;
    }
}
/* Override Divi row width caps so dashboard uses full screen */
.et_pb_row:has(.ee-pipeline-dashboard),
.et_pb_section:has(.ee-pipeline-dashboard) > .et_pb_row,
.et_pb_section:has(.ee-pipeline-dashboard) .et_pb_row.et_pb_row_0 {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}
.et_pb_section:has(.ee-pipeline-dashboard) {
    padding-left: 0 !important;
    padding-right: 0 !important;
}
.et_pb_column:has(.ee-pipeline-dashboard) {
    width: 100% !important;
    max-width: 100% !important;
}
.ee-pipeline-loading {
    text-align: center;
    padding: 60px 20px;
    color: #64748B;
    font-size: 16px;
}
.ee-pipeline-loading-inline {
    padding: 20px;
    text-align: center;
    color: #64748B;
    font-size: 14px;
}
.ee-pipeline-error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 8px;
    padding: 16px;
    color: #991B1B;
    font-size: 14px;
}

/* KPIs */
.ee-pipeline-kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
@media (max-width: 1280px) {
    .ee-pipeline-kpis {
        grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    }
}
@media (max-width: 768px) {
    .ee-pipeline-kpis {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 16px;
    }
    .ee-pipeline-kpi { padding: 14px 10px; }
    .ee-pipeline-kpi-value { font-size: 20px !important; }
    .ee-pipeline-kpi-label { font-size: 11px !important; }
}
.ee-pipeline-kpi {
    position: relative;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}
.ee-pipeline-kpi-info-wrap {
    position: absolute;
    top: 8px;
    right: 8px;
    line-height: 0;
}
.ee-pipeline-kpi:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.ee-pipeline-kpi-value {
    font-size: 24px;
    font-weight: 700;
    color: #0F172A;
    line-height: 1.2;
}
.ee-pipeline-kpi-sub {
    font-size: 13px;
    color: #64748B;
    margin-top: 4px;
    min-height: 18px;
}
.ee-pipeline-kpi-sub-onhold {
    color: #DC2626;
    font-weight: 600;
}
.ee-pipeline-kpi-label {
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-top: 8px;
}

/* Funnel */
.ee-pipeline-funnel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 0;
}
.ee-pipeline-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #334155;
    margin: 0 0 16px 0;
}
.ee-pipeline-funnel-row {
    cursor: pointer;
    padding: 8px 0;
    border-radius: 6px;
    transition: background 0.15s;
}
.ee-pipeline-funnel-row:hover {
    background: rgba(241, 245, 249, 0.6);
}
.ee-pipeline-funnel-row.expanded {
    background: rgba(219, 234, 254, 0.3);
}
.ee-pipeline-funnel-bar-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}
.ee-pipeline-funnel-bar {
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    transition: width 0.5s ease;
}
.ee-pipeline-funnel-bar-text {
    font-size: 13px;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.ee-pipeline-funnel-info {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 200px;
}
.ee-pipeline-funnel-label {
    font-size: 14px;
    font-weight: 500;
    color: #334155;
}
.ee-pipeline-funnel-conv {
    font-size: 12px;
    color: #64748B;
}
.ee-pipeline-funnel-conv small {
    font-size: 10px;
    color: #94A3B8;
}
.ee-pipeline-funnel-total {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #E2E8F0;
    font-size: 13px;
    color: #64748B;
    text-align: center;
}

/* PE Sub-Phases */
.ee-pipeline-pe-sub {
    margin: 4px 0 4px 52px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.ee-pipeline-pe-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}
.ee-pipeline-pe-label {
    width: 50px;
    color: #64748B;
    flex-shrink: 0;
}
.ee-pipeline-pe-track {
    flex: 1;
    height: 6px;
    background: #E2E8F0;
    border-radius: 3px;
    max-width: 150px;
}
.ee-pipeline-pe-fill {
    height: 100%;
    background: #22C55E;
    border-radius: 3px;
    transition: width 0.4s ease;
}
.ee-pipeline-pe-count {
    color: #64748B;
    font-size: 11px;
    width: 40px;
    text-align: right;
}

/* Phase Detail Panel */
.ee-pipeline-phase-detail-wrap {
    margin-bottom: 24px;
}
.ee-pipeline-phase-detail-wrap:empty {
    margin-bottom: 0;
}
.ee-pipeline-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px 8px;
}
.ee-pipeline-detail-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #0F172A;
}
.ee-pipeline-detail-counts {
    font-size: 13px;
    color: #64748B;
}
.ee-pipeline-detail-filters {
    padding: 0 24px 12px;
    display: flex;
    gap: 8px;
}
.ee-pipeline-filter-btn {
    padding: 4px 12px;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    background: white;
    color: #64748B;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}
.ee-pipeline-filter-btn:hover {
    border-color: #94A3B8;
}
.ee-pipeline-filter-btn.active {
    background: #3B82F6;
    border-color: #3B82F6;
    color: white;
}
.ee-pipeline-detail-list {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 12px;
    overflow: hidden;
}
.ee-pipeline-detail-empty {
    padding: 24px;
    text-align: center;
    color: #94A3B8;
}
.ee-pipeline-detail-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.1s;
    border-bottom: 1px solid #F1F5F9;
}
.ee-pipeline-detail-row:last-child {
    border-bottom: none;
}
.ee-pipeline-detail-row:hover {
    background: #F8FAFC;
}
.ee-pipeline-traffic-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.ee-pipeline-detail-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #1E293B;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ee-pipeline-detail-project-sep {
    color: #CBD5E1;
    margin: 0 4px;
    font-weight: 300;
}
.ee-pipeline-detail-project-name {
    font-weight: 400;
    color: #64748B;
    font-size: 13px;
}
.ee-pipeline-detail-sub {
    display: flex;
    gap: 4px;
}
.ee-pipeline-sub-badge {
    display: inline-block;
    width: 20px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    font-size: 10px;
    font-weight: 600;
    border-radius: 3px;
    color: white;
}
.ee-pipeline-sub-done { background: #22C55E; }
.ee-pipeline-sub-prog { background: #3B82F6; }
.ee-pipeline-sub-wait { background: #CBD5E1; }
.ee-pipeline-detail-days {
    font-size: 13px;
    color: #64748B;
    width: 40px;
    text-align: right;
}
.ee-pipeline-detail-value {
    font-size: 13px;
    font-weight: 600;
    color: #0F172A;
    width: 80px;
    text-align: right;
}

/* Phase date badges in detail rows */
.ee-pipeline-detail-phase-dates {
    display: flex;
    flex-direction: column;
    gap: 2px;
    grid-column: 1 / -1;
    padding: 4px 0 2px 24px;
}
.ee-pipeline-detail-phase-dates .ee-pipeline-sub-badge {
    width: auto;
    height: auto;
    line-height: 1.4;
    text-align: left;
    font-size: 11px;
    font-weight: 500;
    border-radius: 4px;
    color: #334155;
    background: #F8FAFC;
    padding: 2px 8px;
    display: flex;
    gap: 4px;
    align-items: center;
}
.ee-pipeline-detail-phase-dates .ee-pipeline-sub-done {
    background: #F0FDF4;
    color: #15803D;
}
.ee-pipeline-detail-phase-dates .ee-pipeline-sub-prog {
    background: #EFF6FF;
    color: #1D4ED8;
}
.ee-pipeline-detail-phase-dates .ee-pipeline-sub-wait {
    background: #F8FAFC;
    color: #94A3B8;
}

/* Phase dates in brief popup - see main definition below */

/* Old v1 charts row removed — see "=== CHARTS V2 ===" section below. */

/* Modal */
.ee-pipeline-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    z-index: 104;
}
.ee-pipeline-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    z-index: 105;
    padding: 24px;
}
.ee-pipeline-brief-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
}
.ee-pipeline-brief-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #0F172A;
}
.ee-pipeline-brief-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #94A3B8;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}
.ee-pipeline-brief-close:hover {
    color: #475569;
}
.ee-pipeline-brief-subtitle {
    font-size: 14px;
    color: #64748B;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}
.ee-pipeline-brief-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
    margin-bottom: 24px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
}
.ee-pipeline-brief-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.ee-pipeline-brief-key {
    font-size: 11px;
    letter-spacing: 0.3px;
    color: #94A3B8;
    font-weight: 500;
}
.ee-pipeline-brief-val {
    font-size: 16px;
    font-weight: 600;
    color: #0F172A;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ee-pipeline-brief-phases {
    margin-bottom: 20px;
    padding: 0 4px;
}
.ee-pipeline-brief-phase {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-bottom: 8px;
    cursor: default;
}
.ee-pipeline-brief-phase-label {
    width: 110px;
    min-width: 110px;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 500;
    color: #64748B;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ee-pipeline-brief-phase-bar {
    flex: 1 1 0%;
    min-width: 60px;
    height: 10px;
    background: #F1F5F9;
    border-radius: 5px;
    overflow: hidden;
}
.ee-pipeline-brief-phase-fill {
    height: 100%;
    background: #3B82F6;
    border-radius: 5px;
    transition: width 0.4s ease;
}
.ee-pipeline-brief-phase-pct {
    width: 38px;
    min-width: 38px;
    flex-shrink: 0;
    text-align: right;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
}
.ee-pipeline-brief-phase-dates {
    font-size: 11px;
    color: #64748b;
    white-space: nowrap;
    margin-left: 120px;
}
.ee-pipeline-brief-pe-sub-header {
    font-size: 11px;
    font-weight: 600;
    color: #94A3B8;
    letter-spacing: 0.3px;
    margin: 12px 0 6px 0;
    padding-bottom: 4px;
    border-bottom: 1px solid #e2e8f0;
}
.ee-pipeline-brief-phase-sub {
    padding-left: 8px;
}
.ee-pipeline-detail-phase-summary {
    display: block;
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 320px;
}
.ee-pipeline-brief-actions {
    text-align: center;
    padding-top: 16px;
    margin-top: 4px;
    border-top: 1px solid #F1F5F9;
}
.ee-pipeline-btn-primary {
    display: inline-block;
    padding: 8px 24px;
    background: #3B82F6;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}
.ee-pipeline-btn-primary:hover {
    background: #2563EB;
    color: white;
    text-decoration: none;
}

/* Org Tab Enhancements */
.org-tab-count {
    display: inline-block;
    background: rgba(100, 116, 139, 0.15);
    color: #475569;
    font-size: 11px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 10px;
    margin-left: 4px;
}
.org-tab-count-red {
    background: rgba(239, 68, 68, 0.15);
    color: #DC2626;
}
/* Pipeline Responsive */
@media (max-width: 768px) {
    .ee-pipeline-kpis {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .ee-pipeline-kpi {
        padding: 14px;
    }
    .ee-pipeline-kpi-value {
        font-size: 18px;
    }
    .ee-pipeline-funnel-info {
        min-width: 120px;
    }
    .ee-pipeline-brief-grid {
        grid-template-columns: 1fr;
    }
    .ee-pipeline-modal {
        width: 95vw;
        padding: 16px;
    }
    .ee-pipeline-detail-row {
        flex-wrap: wrap;
    }
    .ee-pipeline-detail-days,
    .ee-pipeline-detail-value {
        width: auto;
    }
}
@media (max-width: 480px) {
    .ee-pipeline-kpis {
        grid-template-columns: 1fr;
    }
    .ee-pipeline-dashboard {
        padding: 10px;
    }
    .ee-pipeline-funnel {
        padding: 16px;
    }
    .ee-pipeline-pe-sub {
        margin-left: 20px;
    }
}
/* Mobile: allow horizontal scroll for any wide content (tables, funnel rows) */
@media (max-width: 768px) {
    .ee-pipeline-dashboard table,
    .ee-pipeline-funnel-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .ee-pipeline-funnel-row { flex-wrap: wrap; }
    .ee-pipeline-brief-grid { grid-template-columns: 1fr !important; }
}

/* Lost badge for funnel phases */
.ee-pipeline-lost-badge {
    color: #EF4444;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 8px;
    white-space: nowrap;
}

/* Phase Detail Filter Buttons */
.ee-pipeline-detail-filters {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}
.ee-pipeline-filter-btn {
    padding: 4px 12px;
    border: 1px solid #d1d5db;
    border-radius: 16px;
    background: white;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    color: #6b7280;
}
.ee-pipeline-filter-btn:hover {
    border-color: #9ca3af;
    color: #374151;
}
.ee-pipeline-filter-btn.active {
    background: #1e293b;
    color: white;
    border-color: #1e293b;
}
.ee-pipeline-filter-btn[data-pipe-filter="active"].active {
    background: #10B981;
    border-color: #10B981;
}
.ee-pipeline-filter-btn[data-pipe-filter="on_hold"].active {
    background: #F59E0B;
    border-color: #F59E0B;
}
.ee-pipeline-filter-btn[data-pipe-filter="lost"].active {
    background: #EF4444;
    border-color: #EF4444;
}

/* (old #eePipelineConvTrend removed — Charts V2) */

/* ======================================================================
   Pipeline v2.8: Date Filter, Conversion Funnel, Inline Steckbrief
   ====================================================================== */

/* Date Filter Bar */
.ee-pipeline-date-filter {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    padding: 8px 0;
}
.ee-date-btn {
    padding: 5px 14px;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    background: white;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    color: #6b7280;
}
.ee-date-btn:hover {
    border-color: #94a3b8;
    color: #334155;
}
.ee-date-btn.active {
    background: #1e293b;
    color: white;
    border-color: #1e293b;
}
.ee-date-input {
    padding: 4px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #334155;
}

/* Funnel: Bar Container with segments */
.ee-pipeline-funnel-bar-container {
    display: flex;
    height: 32px;
    border-radius: 6px;
    overflow: hidden;
    min-width: 60px;
    background: #e5e7eb;
    transition: width 0.4s ease;
}
.ee-pipeline-funnel-bar-container.is-empty {
    background: #eef0f3;
    width: 60px !important;
    flex: 0 0 60px;
    min-width: 60px;
    max-width: 60px;
}
.ee-pipeline-funnel-bar-segment {
    height: 100%;
    transition: width 0.4s ease;
    position: relative;
}
.ee-pipeline-bar-active {
    /* color set inline: #f59e0b amber */
}
.ee-pipeline-bar-onhold {
    /* color set inline: #ef4444 red */
}
.ee-pipeline-bar-lost {
    /* color set inline: #6b7280 gray */
}
.ee-pipeline-bar-moved {
    /* color set inline: #22c55e green */
}

/* Funnel header row with legend */
.ee-pipeline-funnel-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}
.ee-funnel-legend {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.ee-funnel-legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #94a3b8;
    white-space: nowrap;
}
.ee-funnel-legend-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Funnel Info — updated layout */
.ee-pipeline-funnel-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 200px;
    flex-shrink: 0;
    padding-left: 10px;
}
.ee-pipeline-funnel-total-ever {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    min-width: 30px;
}
.ee-pipeline-funnel-total-ever small {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
}
.ee-pipeline-funnel-breakdown {
    font-size: 0.75rem;
    color: #64748b;
    white-space: nowrap;
}
.ee-pipeline-active-badge {
    color: #f59e0b;
    font-weight: 500;
}
.ee-pipeline-moved-badge {
    color: #22c55e;
    font-weight: 500;
    margin-left: 4px;
}
.ee-pipeline-onhold-badge {
    color: #ef4444;
    font-weight: 500;
    margin-left: 4px;
}
.ee-pipeline-lost-badge {
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 4px;
    white-space: nowrap;
}
.ee-pipeline-funnel-conv {
    font-size: 0.75rem;
    font-weight: 600;
    color: #334155;
    margin-left: auto;
}

/* Phase Detail: Inline (not modal) */
.ee-pipeline-detail-inline {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
    animation: eePipelineSlideDown 0.25s ease;
}
@keyframes eePipelineSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Lost project rows */
.ee-pipeline-detail-row-lost {
    opacity: 0.75;
    background: rgba(239, 68, 68, 0.04) !important;
}
.ee-pipeline-detail-row-lost:hover {
    background: rgba(239, 68, 68, 0.08) !important;
}
.ee-pipeline-dot-lost {
    background: #EF4444 !important;
}
/* Moved on (Weiter) rows */
.ee-pipeline-detail-row-moved {
    opacity: 0.85;
    background: rgba(34, 197, 94, 0.04) !important;
}
.ee-pipeline-detail-row-moved:hover {
    background: rgba(34, 197, 94, 0.08) !important;
}
.ee-pipeline-dot-moved {
    background: #22c55e !important;
}
.ee-pipeline-detail-moved-phase {
    font-size: 0.78rem;
    color: #16a34a;
    font-weight: 500;
    font-style: italic;
    margin-left: 4px;
    white-space: nowrap;
}
.ee-pipeline-group-body-collapsed {
    max-height: 0 !important;
    overflow: hidden;
}
.ee-pipeline-lost-tag {
    display: inline-block;
    background: #FEE2E2;
    color: #DC2626;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
}
.ee-pipeline-detail-reason {
    font-size: 0.75rem;
    color: #9CA3AF;
    font-style: italic;
    margin-left: 8px;
}
.ee-pipeline-detail-kwp {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
    margin-left: 8px;
}
.ee-pipeline-filter-lost {
    /* already styled via data-pipe-filter */
}

/* Status Group Headers (collapsible categories) */
.ee-pipeline-group {
    margin-bottom: 8px;
}
.ee-pipeline-group:last-child {
    margin-bottom: 0;
}
.ee-pipeline-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    cursor: pointer;
    border-left: 4px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    margin-bottom: 2px;
    user-select: none;
    transition: background 0.15s;
}
.ee-pipeline-group-header:hover {
    background: rgba(255, 255, 255, 1);
}
.ee-pipeline-group-header-disabled {
    cursor: default;
    opacity: 0.45;
}
.ee-pipeline-group-header-disabled:hover {
    background: rgba(255, 255, 255, 0.9);
}
.ee-pipeline-group-toggle {
    font-size: 11px;
    color: #64748b;
    width: 14px;
    text-align: center;
    flex-shrink: 0;
}
.ee-pipeline-group-label {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}
.ee-pipeline-group-count {
    font-size: 13px;
    font-weight: 600;
}
.ee-pipeline-group-body {
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 0 0 10px 10px;
    margin-top: -2px;
}
.ee-pipeline-group-body:empty {
    display: none;
}
.ee-pipeline-group-collapsed + .ee-pipeline-group-body,
.ee-pipeline-group-header-disabled + .ee-pipeline-group-body {
    border: none;
}
.ee-pipeline-group-empty .ee-pipeline-group-body {
    display: none;
}

/* Selected project row */
.ee-pipeline-detail-row-selected {
    background: rgba(59, 130, 246, 0.08) !important;
    border-left: 3px solid #3B82F6;
}

/* Inline Steckbrief (replaces modal) */
.ee-pipeline-brief-inline-wrap {
    margin-top: 12px;
}
.ee-pipeline-brief-inline {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
    animation: eePipelineSlideDown 0.25s ease;
}
.ee-pipeline-brief-inline .ee-pipeline-brief-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.ee-pipeline-brief-inline .ee-pipeline-brief-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}
.ee-pipeline-brief-inline .ee-pipeline-brief-close {
    background: none;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 14px;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ee-pipeline-brief-inline .ee-pipeline-brief-close:hover {
    background: #f1f5f9;
}
.ee-pipeline-brief-inline .ee-pipeline-brief-subtitle {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ee-pipeline-brief-inline .ee-pipeline-brief-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px 16px;
    margin-bottom: 14px;
}
.ee-pipeline-brief-inline .ee-pipeline-brief-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ee-pipeline-brief-inline .ee-pipeline-brief-key {
    font-size: 11px;
    color: #94a3b8;
    letter-spacing: 0.3px;
}
.ee-pipeline-brief-inline .ee-pipeline-brief-val {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}
.ee-pipeline-brief-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    gap: 12px;
}
.ee-pipeline-brief-status-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #64748b;
}
.ee-pipeline-status-select {
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    background: white;
    cursor: pointer;
}

/* (old .ee-pipeline-lost-phase-* + duplicate .ee-pipeline-charts removed — Charts V2) */

/* Responsive for brief inline */
@media (max-width: 768px) {
    .ee-pipeline-brief-inline .ee-pipeline-brief-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .ee-pipeline-brief-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .ee-pipeline-date-filter {
        gap: 4px;
    }
    .ee-date-btn {
        padding: 4px 10px;
        font-size: 0.7rem;
    }
    .ee-pipeline-funnel-info {
        min-width: 160px;
    }
    .ee-pipeline-funnel-breakdown {
        display: none;
    }
}
@media (max-width: 480px) {
    .ee-pipeline-brief-inline .ee-pipeline-brief-grid {
        grid-template-columns: 1fr;
    }
    .ee-pipeline-funnel-total-ever {
        font-size: 13px;
    }
}

/* ======================================================================
   Pipeline v3: Popup, Funnel KPIs, Summary, Settings
   ====================================================================== */

/* Funnel Kennzahlen per stage */
.ee-pipeline-funnel-kpis {
    display: flex;
    gap: 12px;
    padding: 2px 0 4px 52px;
    margin-bottom: 2px;
}
.ee-pipeline-funnel-kpi-item {
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 500;
    white-space: nowrap;
}

/* Main-phase block: wraps PE+ rows + summary into one visual container */
.ee-pipeline-funnel-main-block {
    margin-top: 12px;
    padding: 10px 10px 0;
    background: #f0f7ff;
    border: 1px solid #c7dcf5;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.ee-pipeline-funnel-main-block .ee-pipeline-funnel-row {
    margin-left: 0;
}

/* Funnel Summary Row */
.ee-pipeline-funnel-summary {
    margin-top: 10px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: 10px;
    color: white;
}
.ee-pipeline-funnel-main-block .ee-pipeline-funnel-summary {
    margin: 10px -10px 0;
    border-radius: 0 0 12px 12px;
}
.ee-pipeline-funnel-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}
.ee-pipeline-summary-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}
.ee-pipeline-summary-value {
    font-size: 16px;
    font-weight: 400;
    color: white;
    font-variant-numeric: tabular-nums;
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
}
.ee-pipeline-summary-value strong {
    font-weight: 700;
    font-size: 16px;
}
.ee-pipeline-summary-potential {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 400;
}

/* Main-phase rows now inherit grouping from .ee-pipeline-funnel-main-block wrapper */
.ee-pipeline-funnel-row.is-main-phase {
    background: transparent;
    border-left: none;
    padding-left: 0;
}

/* "Weitere" bar segment — solid gray, dezent */
.ee-pipeline-bar-moved {
    background: #94a3b8;
}

/* Project Brief Popup Overlay */
.ee-pipeline-popup-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 108;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: eePipelineFadeIn 0.2s ease;
}
@keyframes eePipelineFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.ee-pipeline-popup-dialog {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    max-width: 680px;
    width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    padding: 32px;
    animation: eePipelineSlideUp 0.25s ease;
}
@keyframes eePipelineSlideUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
.ee-pipeline-popup-close {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.15s;
    flex-shrink: 0;
}
.ee-pipeline-popup-close:hover {
    background: #f1f5f9;
    color: #1e293b;
}

/* Settings Tab */
.ee-settings-probabilities {
    padding: 8px 0;
}
.ee-settings-grid {
    display: grid;
    gap: 12px;
    max-width: 500px;
}
.ee-settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 12px;
    background: var(--dash-surface-hover, #F8FAFC);
    border-radius: 8px;
    border: 1px solid var(--dash-border, rgba(0,0,0,0.06));
}
.ee-settings-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--dash-text, #0F172A);
    flex: 1;
}
.ee-settings-input-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
}
.ee-settings-input {
    width: 70px;
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-align: right;
    color: var(--dash-text, #0F172A);
    background: white;
}
.ee-settings-input:focus {
    outline: 2px solid var(--dash-green-brand, #3FA14D);
    outline-offset: 1px;
}
.ee-settings-pct {
    font-size: 14px;
    color: #64748b;
}
.ee-settings-actions {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.ee-settings-status {
    font-size: 14px;
    font-weight: 500;
}
.ee-settings-loading {
    padding: 20px;
    color: #64748b;
    font-size: 14px;
}

/* Responsive for funnel KPIs */
@media (max-width: 768px) {
    .ee-pipeline-funnel-kpis {
        padding-left: 20px;
        flex-wrap: wrap;
        gap: 6px;
    }
    .ee-pipeline-popup-dialog {
        padding: 20px;
        max-width: 95vw;
    }
    .ee-settings-row {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
}

/* PE Sub-Phase rows inside Funnel (indented under PE) */
.ee-pipeline-pe-sub-phases {
    margin: 2px 0 6px 52px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 12px;
    background: rgba(34, 197, 94, 0.04);
    border-left: 3px solid #22C55E;
    border-radius: 0 8px 8px 0;
}
.ee-pipeline-pe-sub-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #475569;
}
.ee-pipeline-pe-sub-marker {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    flex-shrink: 0;
}
.ee-pipeline-pe-sub-label {
    font-weight: 500;
    min-width: 100px;
}
.ee-pipeline-pe-sub-count {
    font-weight: 700;
    color: #0f172a;
    min-width: 24px;
}
.ee-pipeline-pe-sub-val {
    font-size: 12px;
    color: #64748b;
    margin-left: 4px;
}

/* Settings: indented PE sub-phase rows */
.ee-settings-row-sub {
    margin-left: 24px;
    border-left: 3px solid #22C55E;
    background: rgba(34, 197, 94, 0.03);
}

/* Settings: Auto-Pausierung section */
.ee-settings-auto-hold {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--dash-border, rgba(0,0,0,0.06));
    max-width: 500px;
}
.ee-settings-auto-hold-header {
    font-size: 15px;
    font-weight: 700;
    color: var(--dash-text, #0F172A);
    margin-bottom: 6px;
}
.ee-settings-auto-hold-desc {
    font-size: 13px;
    color: var(--dash-text-secondary, #475569);
    margin-bottom: 14px;
    line-height: 1.5;
}
.ee-settings-auto-hold-hint {
    font-size: 12px;
    color: var(--dash-text-muted, #94A3B8);
    margin-top: 8px;
    font-style: italic;
    line-height: 1.4;
}

/* Speed arrows in phase detail project list */
.ee-pipeline-speed-arrow {
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
    margin-right: 4px;
    line-height: 1;
}
.ee-pipeline-speed-fast {
    color: #22c55e;
}
.ee-pipeline-speed-slow {
    color: #ef4444;
}
.ee-pipeline-detail-avg {
    font-size: 11px;
    color: #94A3B8;
    font-weight: 400;
}

@media (max-width: 768px) {
    .ee-pipeline-pe-sub-phases {
        margin-left: 20px;
    }
}

/* ----------------------------------------------------------------
   INFO TOOLTIPS — Berechnungserklaerungen
   ---------------------------------------------------------------- */
.ee-info-tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid #64748b;
    color: #94a3b8;
    font-size: 9px;
    font-weight: 700;
    font-style: normal;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    cursor: pointer;
    vertical-align: middle;
    margin-left: 4px;
    flex-shrink: 0;
    transition: all 0.15s ease;
    line-height: 1;
    user-select: none;
}
.ee-info-tooltip-icon:hover,
.ee-info-tooltip-icon.active {
    color: #e2e8f0;
    border-color: #e2e8f0;
    background: rgba(255,255,255,0.08);
}
/* Inside light-bg contexts (summary, KPI cards) */
.ee-pipeline-funnel-summary .ee-info-tooltip-icon,
.ee-pipeline-kpis .ee-info-tooltip-icon {
    border-color: #cbd5e1;
    color: #94a3b8;
}
.ee-pipeline-funnel-summary .ee-info-tooltip-icon:hover,
.ee-pipeline-kpis .ee-info-tooltip-icon:hover {
    border-color: #0ea5e9;
    color: #0ea5e9;
    background: rgba(14,165,233,0.08);
}

.ee-info-tooltip-popup {
    position: fixed;
    z-index: 109;
    background: #1e293b;
    color: #e2e8f0;
    font-size: 13px;
    line-height: 1.5;
    padding: 14px 18px;
    border-radius: 8px;
    max-width: 450px;
    min-width: 220px;
    border: 1px solid #334155;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    white-space: normal;
    pointer-events: auto;
    animation: eeInfoFadeIn 0.12s ease-out;
}
@keyframes eeInfoFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ee-info-tooltip-popup .ee-info-title {
    font-size: 14px;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 6px;
    line-height: 1.3;
}
.ee-info-tooltip-popup .ee-info-line {
    margin: 2px 0;
}
.ee-info-tooltip-popup .ee-info-line.formula {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 12px;
    color: #93c5fd;
    background: rgba(255,255,255,0.04);
    border-radius: 4px;
    padding: 3px 6px;
    margin: 4px 0;
}
.ee-info-tooltip-popup .ee-info-line.example {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 12px;
    color: #86efac;
    background: rgba(34,197,94,0.06);
    border-radius: 4px;
    padding: 3px 6px;
    margin: 4px 0;
}
.ee-info-tooltip-popup .ee-info-line.note {
    font-size: 12px;
    color: #94a3b8;
    font-style: italic;
}

/* Consolidated tooltip section headers */
.ee-pipeline-funnel-summary-header,
.ee-pipeline-pe-sub-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.ee-pipeline-funnel-summary-header .ee-info-tooltip-icon,
.ee-pipeline-pe-sub-header .ee-info-tooltip-icon {
    margin-left: auto;
}
.ee-pipeline-funnel-header-row > .ee-info-tooltip-icon {
    margin-left: auto;
    flex-shrink: 0;
}

/* Mobile: full-width tooltip at bottom */
@media (max-width: 600px) {
    .ee-info-tooltip-popup {
        left: 8px !important;
        right: 8px !important;
        max-width: none;
        bottom: 12px !important;
        top: auto !important;
    }
}

/* ======================================================================
   === CHARTS V2 ===
   Phase-Activity Small Multiples, Conversion Funnel (trapezoidal),
   Lost over Time (stacked bars), Pipeline Forecast (line+band)
   ====================================================================== */
.ee-chv2 {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.ee-chv2__toolbar {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.ee-chv2-range-btn {
    padding: 6px 14px;
    border: 1px solid #d1d5db;
    border-radius: 16px;
    background: #fff;
    font-size: 0.8rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s;
}
.ee-chv2-range-btn:hover { border-color: #9ca3af; color: #334155; }
.ee-chv2-range-btn.active {
    background: #1e293b;
    border-color: #1e293b;
    color: #fff;
}
.ee-chv2__card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 12px;
    padding: 20px;
}
.ee-chv2__card h4 {
    margin: 0 0 14px 0;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}
.ee-chv2__empty {
    color: #94A3B8;
    font-size: 13px;
    text-align: center;
    padding: 28px 12px;
}
/* Phase Activity: single multi-line chart */
.ee-chv2__phase-activity {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 12px;
    padding: 16px;
}
.ee-chv2__phase-activity-canvas {
    position: relative;
    height: 320px;
    max-height: 360px;
}
.ee-chv2__phase-activity-canvas canvas { width: 100% !important; height: 100% !important; }
/* Row 2: Funnel + Lost side by side */
.ee-chv2__row2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
/* Horizontal-bar funnel */
.ee-chv2__funnel {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ee-chv2__funnel-row {
    display: grid;
    grid-template-columns: 130px 1fr 48px 48px;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 6px;
    border-left: 3px solid transparent;
    transition: background 0.15s;
    font-size: 12px;
    color: #1e293b;
}
.ee-chv2__funnel-row:hover { background: #f8fafc; }
.ee-chv2__funnel-row.is-pe {
    border-left-color: #22c55e;
    background: #f0fdf4;
}
.ee-chv2__funnel-row.is-empty { color: #94a3b8; }
.ee-chv2__funnel-label {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ee-chv2__funnel-track {
    position: relative;
    height: 22px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
}
.ee-chv2__funnel-bar {
    height: 100%;
    min-width: 2px;
    border-radius: 4px;
    transition: width 0.3s ease;
}
.ee-chv2__funnel-dash {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 8px;
    color: #cbd5e1;
    font-size: 16px;
    line-height: 1;
}
.ee-chv2__funnel-count { font-weight: 700; font-size: 13px; text-align: right; }
.ee-chv2__funnel-pct { color: #64748b; font-size: 11px; text-align: right; }
@media (max-width: 640px) {
    .ee-chv2__funnel-row { grid-template-columns: 90px 1fr 40px 40px; gap: 6px; font-size: 11px; }
}
/* Lost bars */
.ee-chv2__lost-body { position: relative; height: 240px; }
.ee-chv2__lost-body canvas { width: 100% !important; height: 100% !important; }
/* Forecast */
.ee-chv2__forecast-body { position: relative; height: 260px; }
.ee-chv2__forecast-body canvas { width: 100% !important; height: 100% !important; }

/* Responsive */
@media (max-width: 900px) {
    .ee-chv2__row2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .ee-chv2__phase-activity-canvas { height: 260px; }
}

/* ----------------------------------------------------------------
   M3: Dashboard Status Switch (Aktiv / On Hold / Lost)
   ---------------------------------------------------------------- */
.ee-pipeline-detail-status-switch {
    display: inline-flex;
    gap: 2px;
    margin-left: auto;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--dash-border, rgba(0,0,0,0.06));
}
.ee-dss-btn {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border: none;
    cursor: pointer;
    background: var(--dash-bg-subtle, #F1F5F9);
    color: var(--dash-text-muted, #64748B);
    transition: background 0.15s, color 0.15s;
    line-height: 1.4;
    white-space: nowrap;
}
.ee-dss-btn:hover {
    opacity: 0.85;
}
.ee-dss-btn.ee-dss-active.active {
    background: #10B981;
    color: #fff;
}
.ee-dss-btn.ee-dss-onhold.active {
    background: #F59E0B;
    color: #fff;
}
.ee-dss-btn.ee-dss-lost.active {
    background: #EF4444;
    color: #fff;
}
/* Hover on inactive buttons */
.ee-dss-btn.ee-dss-active:not(.active):hover { background: #D1FAE5; color: #065F46; }
.ee-dss-btn.ee-dss-onhold:not(.active):hover { background: #FEF3C7; color: #92400E; }
.ee-dss-btn.ee-dss-lost:not(.active):hover { background: #FEE2E2; color: #991B1B; }
