/* ==========================================================
   FlowDeal Dashboard — "Glass Morphism + Neon Surge" Theme
   Translucent glass containers, colored neon accents, subtle
   glow effects, layered transparency, and inner glows.
   See STYLE-GUIDE.md for the complete design specification.
   ========================================================== */

:root {
    /* Deep dark surfaces */
    --bg-void: #060608;
    --bg-base: #0a0a0f;
    --bg-raised: #0f0f16;
    --bg-elevated: #14141e;
    --bg-glass: rgba(10, 10, 16, 0.85);

    /* Borders with neon tints */
    --border-faint: rgba(255, 255, 255, 0.03);
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-neon: rgba(0, 255, 204, 0.15);
    --border-glow: rgba(0, 255, 204, 0.35);

    /* High-contrast text */
    --text-primary: #f1f5f9;
    --text-secondary: #a0a8c0;
    --text-muted: #505870;

    /* Neon accents */
    --neon-cyan: #00ffcc;
    --neon-cyan-dim: rgba(0, 255, 204, 0.08);
    --neon-cyan-med: rgba(0, 255, 204, 0.18);
    --neon-magenta: #ff0080;
    --neon-magenta-dim: rgba(255, 0, 128, 0.08);
    --neon-magenta-med: rgba(255, 0, 128, 0.18);
    --neon-purple: #7850ff;
    --neon-purple-dim: rgba(120, 80, 255, 0.08);
    --neon-lime: #80ff00;
    --neon-lime-dim: rgba(128, 255, 0, 0.08);
    --neon-blue: #00c8ff;
    --neon-blue-dim: rgba(0, 200, 255, 0.08);
    --neon-orange: #ff6020;
    --neon-orange-dim: rgba(255, 96, 32, 0.08);
    --neon-yellow: #ffe600;
    --neon-yellow-dim: rgba(255, 230, 0, 0.08);
    --neon-red: #ff3040;
    --neon-red-dim: rgba(255, 48, 64, 0.08);
    --neon-red-border: rgba(255, 48, 64, 0.3);

    /* Glow shadows */
    --glow-cyan: 0 0 30px rgba(0, 255, 204, 0.12), 0 0 80px rgba(0, 255, 204, 0.04);
    --glow-magenta: 0 0 30px rgba(255, 0, 128, 0.12), 0 0 80px rgba(255, 0, 128, 0.04);
    --glow-purple: 0 0 30px rgba(120, 80, 255, 0.12);

    /* Geometry */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Heatmap */
    --heatmap-cell-size: 48px;
    --heatmap-gap: 5px;
}

/* ---------- RESET ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; scrollbar-width: thin; scrollbar-color: var(--text-secondary) var(--bg-void); }
button, input, select, textarea { font-family: inherit; }

/* ---------- SKIP NAV ---------- */
.skip-nav {
    position: absolute; top: -100%; left: 16px; z-index: 200;
    padding: 12px 24px; background: var(--neon-cyan); color: var(--bg-void);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    font-weight: 800; font-size: 13px; text-decoration: none;
    transition: top 0.2s ease;
}
.skip-nav:focus { top: 0; }

/* ---------- BODY ---------- */
body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-void);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Particle canvas sits behind everything */
#particleCanvas {
    position: fixed; inset: 0;
    z-index: 0; pointer-events: none;
}

/* Animated gradient mesh */
body::before {
    content: '';
    position: fixed; inset: 0;
    background:
        radial-gradient(ellipse at 10% 0%, rgba(0, 255, 204, 0.05) 0%, transparent 40%),
        radial-gradient(ellipse at 90% 100%, rgba(255, 0, 128, 0.04) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 50%, rgba(120, 80, 255, 0.02) 0%, transparent 50%);
    animation: meshShift 20s ease-in-out infinite alternate;
    pointer-events: none; z-index: 0;
}

@keyframes meshShift {
    0% { opacity: 1; filter: hue-rotate(0deg); }
    100% { opacity: 0.8; filter: hue-rotate(15deg); }
}

body::after { display: none; }

/* ==================== LOGIN ==================== */
.login-container {
    display: flex; justify-content: center; align-items: center;
    min-height: 100vh; position: relative; z-index: 1;
}

.login-box {
    background: var(--bg-glass);
    backdrop-filter: blur(30px) saturate(1.5);
    padding: 52px 44px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-neon);
    box-shadow: var(--glow-cyan), 0 40px 80px rgba(0,0,0,0.6);
    width: 440px; max-width: 95vw;
    position: relative; overflow: hidden;
    animation: loginAppear 0.6s ease both;
}

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

.login-box::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, var(--neon-magenta), var(--neon-cyan), var(--neon-purple));
    animation: borderGlow 3s ease infinite;
}

@keyframes borderGlow {
    0%, 100% { opacity: 1; filter: brightness(1); }
    50% { opacity: 0.7; filter: brightness(1.5); }
}

.login-box h1 {
    margin-bottom: 6px; color: var(--text-primary);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 28px; font-weight: 700;
    letter-spacing: 1px;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 14px; margin-bottom: 36px;
}

.form-group { margin-bottom: 22px; }

.form-group label {
    display: block; margin-bottom: 8px;
    color: var(--neon-cyan);
    font-family: 'Fira Code', monospace;
    font-size: 10px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 2px;
}

.form-group input {
    width: 100%; padding: 14px 16px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    font-size: 15px; font-weight: 500;
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input::placeholder { color: var(--text-secondary); }

.form-group input:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 0 3px var(--neon-cyan-dim), 0 0 30px rgba(0, 255, 204, 0.08);
}

.btn {
    width: 100%; padding: 15px;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
    color: var(--bg-void); border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 2px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 24px rgba(0, 255, 204, 0.25);
    position: relative; overflow: hidden;
}

/* Shine sweep effect */
.btn::after {
    content: '';
    position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transition: left 0.5s ease;
}

.btn:hover::after { left: 100%; }

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 40px rgba(0, 255, 204, 0.35), 0 0 60px rgba(0, 255, 204, 0.1);
}

.btn:active { transform: translateY(0); }

.error {
    margin-top: 16px; font-size: 13px; min-height: 20px;
    color: var(--neon-red); text-align: center;
}

/* Login brand with logo */
.login-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 6px;
}

.login-logo {
    width: 52px; height: 52px;
    border-radius: var(--radius-sm);
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(0, 255, 204, 0.4));
}

.forgot-password-link {
    text-align: center;
    margin-top: 20px;
}

.forgot-password-link a {
    color: var(--text-secondary);
    font-size: 13px;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-password-link a:hover {
    color: var(--neon-cyan);
}

.success-msg {
    color: var(--neon-cyan) !important;
}

#statTopCategory {
    text-transform: uppercase;
    font-size: 20px !important;
    letter-spacing: 1px;
}

/* ==================== DASHBOARD ==================== */
.dashboard { display: none; position: relative; z-index: 1; }
.dashboard.active { display: block; }

/* ==================== NAVBAR ==================== */
.navbar {
    background: rgba(6, 6, 8, 0.9);
    backdrop-filter: blur(20px) saturate(1.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0 32px;
    display: flex; justify-content: space-between; align-items: center;
    position: sticky; top: 0; z-index: 100;
    height: 75px;
}

/* Neon underline */
.navbar::after {
    content: '';
    position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), var(--neon-magenta), var(--neon-purple), transparent);
    opacity: 0.4;
    animation: navGlow 4s ease infinite;
}

@keyframes navGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.navbar-brand { display: flex; align-items: center; gap: 12px; }

.navbar-logo {
    width: 55px; height: 55px;
    border-radius: var(--radius-sm);
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(0, 255, 204, 0.3));
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(0, 255, 204, 0.3)); }
    50% { filter: drop-shadow(0 0 16px rgba(0, 255, 204, 0.5)); }
}

.navbar h1,
.navbar .navbar-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 17px; font-weight: 700;
    color: var(--neon-cyan);
    letter-spacing: 1px;
    text-shadow: 0 0 20px rgba(0, 255, 204, 0.3);
}

.navbar-actions { display: flex; gap: 8px; align-items: center; }

.nav-btn {
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: transparent;
    color: var(--text-secondary);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 11px; font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex; align-items: center; gap: 5px;
    text-transform: uppercase; letter-spacing: 1px;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-neon);
    color: var(--neon-cyan);
    box-shadow: 0 0 16px rgba(0, 255, 204, 0.08);
}

.nav-btn.primary {
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
    border: none; color: var(--bg-void);
    font-weight: 700;
    box-shadow: 0 2px 16px rgba(0, 255, 204, 0.2);
}

.nav-btn.primary:hover {
    box-shadow: 0 4px 30px rgba(0, 255, 204, 0.35);
    filter: brightness(1.1);
}

/* ==================== PAGE NAVIGATION ==================== */
.navbar-links { display: flex; gap: 2px; align-items: center; flex-wrap: wrap; }

.page-nav-link {
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 11px; font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    display: inline-flex; align-items: center; gap: 5px;
    text-transform: uppercase; letter-spacing: 0.5px;
    position: relative;
}

.page-nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
}

.page-nav-link.active {
    color: var(--neon-cyan);
    background: var(--neon-cyan-dim);
    border-color: var(--border-neon);
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.3);
}

/* Glow variants */
.page-nav-link.glow-purple:hover { color: var(--neon-purple); background: var(--neon-purple-dim); border-color: rgba(120, 80, 255, 0.2); text-shadow: 0 0 10px rgba(120, 80, 255, 0.3); }
.page-nav-link.glow-emerald:hover { color: var(--neon-lime); background: var(--neon-lime-dim); border-color: rgba(128, 255, 0, 0.2); text-shadow: 0 0 10px rgba(128, 255, 0, 0.3); }
.page-nav-link.glow-amber:hover { color: var(--neon-yellow); background: var(--neon-yellow-dim); border-color: rgba(255, 230, 0, 0.2); text-shadow: 0 0 10px rgba(255, 230, 0, 0.3); }
.page-nav-link.glow-rose:hover { color: var(--neon-magenta); background: var(--neon-magenta-dim); border-color: rgba(255, 0, 128, 0.2); text-shadow: 0 0 10px rgba(255, 0, 128, 0.3); }
.page-nav-link.glow-cyan:hover { color: var(--neon-cyan); background: var(--neon-cyan-dim); border-color: var(--border-neon); text-shadow: 0 0 10px rgba(0, 255, 204, 0.3); }

/* ==================== CONTENT AREA ==================== */
.content {
    padding: 24px 32px 40px;
    max-width: 1600px; margin: 0 auto;
}

/* ==================== BREADCRUMB ==================== */
.breadcrumb {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 20px;
    font-family: 'Fira Code', monospace;
    font-size: 11px; font-weight: 500;
    letter-spacing: 0.5px;
}

.breadcrumb svg { flex-shrink: 0; }

.breadcrumb-link {
    display: flex; align-items: center; gap: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.15s ease;
}

.breadcrumb-link:hover { color: var(--neon-cyan); }
.breadcrumb-link svg { color: var(--text-secondary); }
.breadcrumb-link:hover svg { color: var(--neon-cyan); }

.breadcrumb-sep { color: rgba(255, 255, 255, 0.15); }

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 600;
}

/* ==================== STATS GRID ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-bottom: 24px; margin-top: 24px;
}

.stat-card {
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.04) 0%,
        rgba(255, 255, 255, 0.015) 50%,
        rgba(255, 255, 255, 0.03) 100%
    );
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 22px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top-color: rgba(255, 255, 255, 0.14);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.stat-card.clickable { cursor: pointer; }

.stat-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 3px;
    border-radius: 14px 14px 0 0;
    pointer-events: none;
    z-index: 2;
}

.stat-card::after {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, transparent 100%);
    pointer-events: none;
    border-radius: 14px 14px 0 0;
}

.stat-card.clickable:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 255, 204, 0.15);
    border-top-color: rgba(0, 255, 204, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Non-clickable stat cards also need tooltip overflow */
.stat-card:hover { overflow: visible; }

.stat-card h3 {
    color: var(--text-primary);
    font-family: 'Fira Code', monospace;
    font-size: 9px; margin-bottom: 10px;
    font-weight: 500; text-transform: uppercase; letter-spacing: 2.5px;
    position: relative; z-index: 1;
}

.stat-card .value {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 28px; font-weight: 800;
    letter-spacing: -1px;
    position: relative; z-index: 1;
}

.stat-card .value.value-small {
    font-size: 14px; letter-spacing: 0; font-weight: 600;
}

.stat-card .stat-icon {
    position: absolute; top: 16px; right: 16px;
    font-size: 18px; opacity: 0.3;
    transition: all 0.3s ease;
}

.stat-card:hover .stat-icon { opacity: 0.5; transform: scale(1.2); }

/* Icon inherits value color per variant */
.stat-card.success .stat-icon { color: var(--neon-cyan); }
.stat-card.primary .stat-icon { color: var(--neon-blue); }
.stat-card.warning .stat-icon { color: var(--neon-yellow); }
.stat-card.info .stat-icon    { color: var(--neon-blue); }
.stat-card.purple .stat-icon  { color: var(--neon-purple); }
.stat-card.secondary .stat-icon { color: var(--text-secondary); }

/* Color variants with inner glow */
.stat-card.success { box-shadow: inset 0 0 30px rgba(0, 255, 204, 0.03), 0 4px 20px rgba(0, 0, 0, 0.12); }
.stat-card.success::before { background: linear-gradient(90deg, #00ffcc, #34d399); }
.stat-card.success .value { color: var(--neon-cyan); text-shadow: 0 0 24px rgba(0, 255, 204, 0.25); }

.stat-card.primary { box-shadow: inset 0 0 30px rgba(0, 200, 255, 0.03), 0 4px 20px rgba(0, 0, 0, 0.12); }
.stat-card.primary::before { background: linear-gradient(90deg, #38bdf8, #00ffcc); }
.stat-card.primary .value { color: var(--neon-blue); text-shadow: 0 0 24px rgba(0, 200, 255, 0.25); }

.stat-card.warning { box-shadow: inset 0 0 30px rgba(255, 230, 0, 0.03), 0 4px 20px rgba(0, 0, 0, 0.12); }
.stat-card.warning::before { background: linear-gradient(90deg, #fbbf24, #fb923c); }
.stat-card.warning .value { color: var(--neon-yellow); text-shadow: 0 0 24px rgba(255, 230, 0, 0.25); }

.stat-card.info { box-shadow: inset 0 0 30px rgba(0, 200, 255, 0.03), 0 4px 20px rgba(0, 0, 0, 0.12); }
.stat-card.info::before { background: linear-gradient(90deg, #00c8ff, #00ffcc); }
.stat-card.info .value { color: var(--neon-blue); text-shadow: 0 0 24px rgba(0, 200, 255, 0.25); }

.stat-card.purple { box-shadow: inset 0 0 30px rgba(120, 80, 255, 0.03), 0 4px 20px rgba(0, 0, 0, 0.12); }
.stat-card.purple::before { background: linear-gradient(90deg, #a78bfa, #f472b6); }
.stat-card.purple .value { color: var(--neon-purple); text-shadow: 0 0 24px rgba(120, 80, 255, 0.25); }

.stat-card.secondary { box-shadow: inset 0 0 30px rgba(160, 168, 192, 0.02), 0 4px 20px rgba(0, 0, 0, 0.12); }
.stat-card.secondary::before { background: linear-gradient(90deg, #a0a8c0, #505870); }
.stat-card.secondary .value { color: var(--text-secondary); }

/* ==================== PIPELINE FLOW ==================== */
.pipeline-flow-section {
    background:
        linear-gradient(90deg, var(--neon-magenta), var(--neon-cyan), var(--neon-purple)) top / 100% 3px no-repeat,
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.04) 0%,
            rgba(255, 255, 255, 0.015) 50%,
            rgba(255, 255, 255, 0.03) 100%
        );
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 32px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top-color: rgba(255, 255, 255, 0.14);
    margin-bottom: 20px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

@keyframes neonBorderFlow {
    0% { background-position: 0% 0%; }
    100% { background-position: 300% 0%; }
}

.pipeline-flow-section h2 {
    margin-bottom: 28px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 12px; font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
    display: flex; align-items: center; gap: 10px;
    position: relative; z-index: 1;
}

.pipeline-flow-section h2 .section-icon,
.heatmap-header h2 .section-icon,
.bottleneck-header h2 .section-icon,
.activity-feed-header h2 .section-icon {
    width: 18px; height: 18px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 6px currentColor);
}

.pipeline-row {
    display: flex; justify-content: center; gap: 14px;
    margin-bottom: 14px; flex-wrap: wrap;
}

.pipeline-box {
    padding: 20px 34px;
    border-radius: var(--radius-md);
    color: white; cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center; min-width: 180px;
    position: relative;
    overflow: hidden;
}

.pipeline-box::before {
    content: '';
    position: absolute; inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, transparent 40%);
    pointer-events: none;
}

/* Holographic shimmer removed — caused rendering artifacts outside box bounds */

.pipeline-box:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 16px 48px rgba(0,0,0,0.4);
    overflow: visible;
}

.pipeline-box .stage-label {
    font-family: 'Fira Code', monospace;
    font-size: 8px; opacity: 0.6;
    text-transform: uppercase; letter-spacing: 3px;
    margin-bottom: 4px; font-weight: 500;
}

.pipeline-box .stage-value {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 36px; font-weight: 700;
    margin: 4px 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.pipeline-box .stage-name {
    font-size: 12px; font-weight: 600; opacity: 0.9;
}

.pipeline-box .stage-pending {
    font-family: 'Fira Code', monospace;
    font-size: 10px; opacity: 0.55;
    border-top: 1px solid rgba(255,255,255,0.12);
    padding-top: 8px; margin-top: 8px;
}

/* Pipeline box colors — vivid saturated gradients */
.pipeline-box.skipped { background: linear-gradient(135deg, #2a2a35, #3a3a48); box-shadow: 0 4px 20px rgba(0,0,0,0.3); }
.pipeline-box.duplicate { background: linear-gradient(135deg, #4a1a6a, #6a2a8a); box-shadow: 0 4px 20px rgba(74, 26, 106, 0.4); }
.pipeline-box.discovered { background: linear-gradient(135deg, #6020c0, #8040e0); box-shadow: 0 4px 20px rgba(96, 32, 192, 0.3); }
.pipeline-box.scored { background: linear-gradient(135deg, #d01060, #f02080); box-shadow: 0 4px 20px rgba(208, 16, 96, 0.3); }
.pipeline-box.awaiting { background: linear-gradient(135deg, #c08000, #e0a000); animation: awaitingPulse 2s ease-in-out infinite; box-shadow: 0 4px 20px rgba(192, 128, 0, 0.3); }
@keyframes awaitingPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.85; } }
.pipeline-ai-arrow { margin-top: 16px; margin-bottom: 4px; width: 100%; text-align: center; color: rgba(255,255,255,0.18); }
.pipeline-ai-status-row { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 8px; }
.pipeline-ai-status-row > .pipeline-box { min-width: unset !important; }
.pipeline-box.mismatch { background: linear-gradient(135deg, #b05000, #e06800); animation: awaitingPulse 2s ease-in-out infinite; box-shadow: 0 4px 20px rgba(224, 104, 0, 0.3); }
.pipeline-box.ai-rejected { background: linear-gradient(135deg, #a01030, #d02040); box-shadow: 0 4px 20px rgba(208, 32, 64, 0.3); }
.pipeline-box.images { background: linear-gradient(135deg, #00a060, #00d080); box-shadow: 0 4px 20px rgba(0, 160, 96, 0.3); }
.pipeline-box.links { background: linear-gradient(135deg, #d09000, #f0b020); box-shadow: 0 4px 20px rgba(208, 144, 0, 0.3); }
.pipeline-box.ai { background: linear-gradient(135deg, #0060e0, #0090ff); box-shadow: 0 4px 20px rgba(0, 96, 224, 0.3); }
.pipeline-box.ready { background: linear-gradient(135deg, #4040e0, #6060ff); box-shadow: 0 4px 20px rgba(64, 64, 224, 0.3); }
.pipeline-box.inserted { background: linear-gradient(135deg, #1060d0, #2080f0); box-shadow: 0 4px 20px rgba(16, 96, 208, 0.3); }
.pipeline-box.published { background: linear-gradient(135deg, #00a050, #00cc70); box-shadow: 0 4px 20px rgba(0, 160, 80, 0.3); }

.pipeline-arrow { display: flex; justify-content: center; margin: 10px 0; }
.pipeline-arrow svg { width: 18px; height: 18px; color: var(--neon-cyan); opacity: 0.3; filter: drop-shadow(0 0 4px rgba(0, 255, 204, 0.3)); }

.pipeline-stage-2 {
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 24px; margin: 14px 0;
    background: rgba(0, 255, 204, 0.015);
}

.pipeline-stage-2 .stage-title {
    text-align: center; margin-bottom: 18px;
    font-family: 'Fira Code', monospace;
    font-size: 9px; font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 3px;
}

.mode-indicator {
    display: inline-block; padding: 3px 10px;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 9px; font-weight: 700; letter-spacing: 1.5px;
    margin-left: 10px; vertical-align: middle;
}

.mode-indicator.manual { background: var(--neon-yellow-dim); color: var(--neon-yellow); border: 1px solid rgba(255, 230, 0, 0.25); }
.mode-indicator.ai { background: rgba(0, 150, 255, 0.1); color: var(--neon-blue); border: 1px solid rgba(0, 150, 255, 0.3); }
.mode-indicator.auto { background: rgba(0, 255, 204, 0.08); color: var(--neon-cyan); border: 1px solid var(--border-neon); }

.pipeline-stage-2-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px;
}

.pipeline-metrics {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px; padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 24px;
}

.pipeline-metric { text-align: center; position: relative; }

.pipeline-metric .metric-label {
    font-family: 'Fira Code', monospace;
    font-size: 8px; color: var(--text-secondary);
    margin-bottom: 6px; text-transform: uppercase; letter-spacing: 2px;
}

.pipeline-metric .metric-value {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 24px; font-weight: 700;
}

.pipeline-metric .metric-value.green { color: var(--neon-cyan); text-shadow: 0 0 15px rgba(0, 255, 204, 0.2); }
.pipeline-metric .metric-value.blue { color: var(--neon-blue); text-shadow: 0 0 15px rgba(0, 200, 255, 0.2); }
.pipeline-metric .metric-value.purple { color: var(--neon-purple); text-shadow: 0 0 15px rgba(120, 80, 255, 0.2); }
.pipeline-metric .metric-value.orange { color: var(--neon-orange); text-shadow: 0 0 15px rgba(255, 96, 32, 0.2); }

/* ==================== 3D CHART CARDS ==================== */
.pipeline-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px; margin-bottom: 60px;
    perspective: 1200px;
}

.pipeline-chart-card {
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.04) 0%,
        rgba(255, 255, 255, 0.015) 50%,
        rgba(255, 255, 255, 0.03) 100%
    );
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top-color: rgba(255, 255, 255, 0.14);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    /* [tooltip-fix] removed transform-style: preserve-3d — it creates a 3D stacking
       context that clips ApexCharts tooltips. The tilt-3d class on the element
       still applies preserve-3d during hover via effects.js. */
    position: relative;
    overflow: visible;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* 3D depth shadow layers */
.pipeline-chart-card::before {
    content: '';
    position: absolute; inset: 4px;
    background: var(--bg-base);
    border-radius: var(--radius-md);
    z-index: -1;
    filter: blur(8px);
    opacity: 0.5;
}

.pipeline-chart-card::after {
    content: '';
    position: absolute; inset: -1px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(0, 255, 204, 0.08), transparent, rgba(255, 0, 128, 0.05));
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pipeline-chart-card:hover::after { opacity: 1; }

.pipeline-chart-card:hover {
    border-color: rgba(0, 255, 204, 0.15);
    border-top-color: rgba(0, 255, 204, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), 0 0 20px rgba(0, 255, 204, 0.04);
    transform: translateY(-2px);
}

.pipeline-chart-card h4 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 12px; font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
    margin-bottom: 16px;
    display: flex; align-items: center; gap: 10px;
    position: relative; z-index: 1;
}

.pipeline-chart-card h4 .section-icon {
    width: 18px; height: 18px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 6px currentColor);
}

.pipeline-chart-wrap { height: 200px; position: relative; z-index: 1; overflow: visible; }

/* Allow donut legend to display all items without scrolling */
#pipelineDonutChart .apexcharts-legend { overflow: visible !important; height: auto !important; max-height: none !important; }

/* Ensure ApexCharts tooltips always render on top */
.apexcharts-tooltip { z-index: 10 !important; }

/* ==================== CALENDAR HEATMAP ==================== */
.heatmap-section {
    background:
        linear-gradient(90deg, #fbbf24, #fb923c) top / 100% 3px no-repeat,
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.04) 0%,
            rgba(255, 255, 255, 0.015) 50%,
            rgba(255, 255, 255, 0.03) 100%
        );
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top-color: rgba(255, 255, 255, 0.14);
    margin-top: 20px; overflow: visible;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Glass sheen */
.heatmap-section::after {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 40%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, transparent 100%);
    pointer-events: none;
    border-radius: 16px 16px 0 0;
}

.heatmap-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; position: relative; z-index: 1; }

.heatmap-header h2 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 12px; font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
    margin: 0;
    display: flex; align-items: center; gap: 10px;
}

.heatmap-subtitle {
    font-family: 'Fira Code', monospace;
    font-size: 9px; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 1.5px;
}

.heatmap-container { display: flex; gap: 0; align-items: stretch; }
.heatmap-grid-wrap { flex: 1; overflow: visible; padding-bottom: 6px; }

.heatmap-grid {
    display: grid; grid-template-rows: repeat(7, 1fr);
    grid-auto-flow: column; grid-auto-columns: 1fr;
    gap: var(--heatmap-gap); width: 100%;
}

.heatmap-cell {
    width: 100%; aspect-ratio: 1;
    max-width: var(--heatmap-cell-size); max-height: var(--heatmap-cell-size);
    border-radius: 3px;
    transition: all 0.15s ease;
    cursor: default; position: relative; justify-self: center;
}

.heatmap-cell:hover { transform: scale(1.4); z-index: 5; }

/* Neon cyan heatmap scale */
.heatmap-cell.level-0 { background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08); }
.heatmap-cell.level-1 { background: rgba(0, 255, 204, 0.1); border: 1px solid rgba(0, 255, 204, 0.2); }
.heatmap-cell.level-2 { background: rgba(0, 255, 204, 0.25); border: 1px solid rgba(0, 255, 204, 0.35); }
.heatmap-cell.level-3 { background: rgba(0, 255, 204, 0.45); border: 1px solid rgba(0, 255, 204, 0.55); box-shadow: 0 0 6px rgba(0, 255, 204, 0.15); }
.heatmap-cell.level-4 { background: var(--neon-cyan); border: 1px solid #40ffd8; box-shadow: 0 0 12px rgba(0, 255, 204, 0.35); }
.heatmap-cell.future { background: transparent; border: 1px dashed rgba(255, 255, 255, 0.08); }
.heatmap-cell.today { box-shadow: 0 0 0 2px var(--neon-magenta), 0 0 10px rgba(255, 0, 128, 0.2); }

.heatmap-cell .heatmap-tip {
    display: none;
    position: absolute; bottom: calc(100% + 6px); left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 30, 0.95);
    color: var(--text-primary);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-family: 'Fira Code', monospace;
    font-size: 9px; white-space: nowrap;
    border: 1px solid var(--border-neon);
    box-shadow: 0 8px 24px rgba(0,0,0,0.5), 0 0 10px rgba(0, 255, 204, 0.05);
    z-index: 50; pointer-events: none;
}

.heatmap-cell:hover .heatmap-tip { display: block; }

.heatmap-day-labels {
    display: grid; grid-template-rows: repeat(7, 1fr);
    gap: var(--heatmap-gap); padding-right: 10px;
    max-height: calc(var(--heatmap-cell-size) * 7 + var(--heatmap-gap) * 6);
}

.heatmap-day-labels span {
    display: flex; align-items: center;
    font-family: 'Fira Code', monospace;
    font-size: 9px; color: var(--text-secondary); font-weight: 500;
}

.heatmap-legend { display: flex; align-items: center; gap: 4px; margin-top: 12px; justify-content: flex-end; }
.heatmap-legend span { font-family: 'Fira Code', monospace; font-size: 9px; color: var(--text-secondary); }
.heatmap-legend .heatmap-cell { width: 12px; height: 12px; min-width: 12px; aspect-ratio: unset; cursor: default; }
.heatmap-legend .heatmap-cell:hover { transform: none; }

.heatmap-stats { display: flex; gap: 20px; margin-top: 12px; }
.heatmap-stat { font-size: 12px; color: var(--text-secondary); }
.heatmap-stat strong { color: var(--text-primary); font-weight: 700; }
.heatmap-error { color: var(--text-secondary); font-size: 12px; padding: 20px; }
.heatmap-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }

/* ==================== BOTTLENECK INDICATOR ==================== */
.bottleneck-section {
    background:
        linear-gradient(90deg, #fb923c, #ef4444) top / 100% 3px no-repeat,
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.04) 0%,
            rgba(255, 255, 255, 0.015) 50%,
            rgba(255, 255, 255, 0.03) 100%
        );
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 24px; border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top-color: rgba(255, 255, 255, 0.14);
    margin-top: 20px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Glass sheen */
.bottleneck-section::after {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 40%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, transparent 100%);
    pointer-events: none;
    border-radius: 16px 16px 0 0;
}

.bottleneck-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; position: relative; z-index: 1; }

.bottleneck-header h2 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 12px; font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
    margin: 0;
    display: flex; align-items: center; gap: 10px;
}

.bottleneck-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px; margin-bottom: 16px;
}

.bottleneck-stage {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(12px);
    border-radius: 14px;
    padding: 16px; text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.06);
    position: relative; transition: all 0.2s ease;
}

.bottleneck-stage.critical {
    border-color: var(--neon-red-border);
    background: var(--neon-red-dim);
    animation: bottleneckPulse 1.5s ease-in-out infinite;
}

.bottleneck-stage.warning {
    border-color: rgba(255, 230, 0, 0.2);
    background: var(--neon-yellow-dim);
}

.bottleneck-stage.healthy { border-color: rgba(0, 255, 204, 0.15); }

@keyframes bottleneckPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 48, 64, 0.15); }
    50% { box-shadow: 0 0 0 6px rgba(255, 48, 64, 0), 0 0 20px rgba(255, 48, 64, 0.05); }
}

.bottleneck-stage .stage-name {
    font-family: 'Fira Code', monospace;
    font-size: 8px; font-weight: 500;
    text-transform: uppercase; letter-spacing: 2px;
    color: var(--text-secondary); margin-bottom: 8px;
}

.bottleneck-stage .stage-count {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 28px; font-weight: 700; line-height: 1; margin-bottom: 4px;
}

.bottleneck-stage.critical .stage-count { color: var(--neon-red); text-shadow: 0 0 15px rgba(255, 48, 64, 0.3); }
.bottleneck-stage.warning .stage-count { color: var(--neon-yellow); text-shadow: 0 0 15px rgba(255, 230, 0, 0.2); }
.bottleneck-stage.healthy .stage-count { color: var(--neon-cyan); text-shadow: 0 0 15px rgba(0, 255, 204, 0.2); }

.bottleneck-stage .stage-label { font-family: 'Fira Code', monospace; font-size: 7px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1.5px; }
.bottleneck-stage .stage-status { font-family: 'Fira Code', monospace; font-size: 7px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; margin-top: 6px; }
.bottleneck-stage.critical .stage-status { color: var(--neon-red); }
.bottleneck-stage.warning .stage-status { color: var(--neon-yellow); }
.bottleneck-stage.healthy .stage-status { color: var(--neon-cyan); }

.bottleneck-alert {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px; border-radius: var(--radius-md);
    font-size: 13px; font-weight: 500;
}

.bottleneck-alert.critical { background: var(--neon-red-dim); border: 1px solid var(--neon-red-border); color: var(--neon-red); }
.bottleneck-alert.warning { background: var(--neon-yellow-dim); border: 1px solid rgba(255, 230, 0, 0.2); color: var(--neon-yellow); }
.bottleneck-alert.healthy { background: var(--neon-cyan-dim); border: 1px solid var(--border-neon); color: var(--neon-cyan); }

.bottleneck-timing { display: flex; gap: 16px; margin-top: 12px; }
.bottleneck-timing-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-secondary); }
.bottleneck-timing-item strong { color: var(--text-primary); font-family: 'Fira Code', monospace; }

/* ==================== ACTIVITY FEED ==================== */
.activity-feed {
    background:
        linear-gradient(90deg, #38bdf8, #00ffcc) top / 100% 3px no-repeat,
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.04) 0%,
            rgba(255, 255, 255, 0.015) 50%,
            rgba(255, 255, 255, 0.03) 100%
        );
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 24px; border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top-color: rgba(255, 255, 255, 0.14);
    margin-top: 20px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Glass sheen */
.activity-feed::after {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 40%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, transparent 100%);
    pointer-events: none;
    border-radius: 16px 16px 0 0;
}

.activity-feed-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; position: relative; z-index: 1; }

.activity-feed-header h2 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 12px; font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
    margin: 0;
    display: flex; align-items: center; gap: 10px;
}

.feed-live-dot {
    width: 7px; height: 7px;
    background: var(--neon-cyan);
    border-radius: 50%; display: inline-block; margin-right: 8px;
    animation: livePulse 2s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(0, 255, 204, 0.4);
}

@keyframes livePulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(0, 255, 204, 0.4); }
    50% { opacity: 0.4; box-shadow: 0 0 16px rgba(0, 255, 204, 0.1); }
}

.activity-refresh-btn {
    padding: 7px 14px;
    background: transparent; border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    color: var(--text-secondary); font-size: 11px; font-weight: 600;
    cursor: pointer; transition: all 0.12s ease;
}

.activity-refresh-btn:hover, .activity-refresh-btn:focus {
    border-color: var(--border-neon); color: var(--neon-cyan);
}

.activity-list { max-height: 400px; overflow-y: auto; padding-right: 4px; position: relative; z-index: 1; }

.activity-item {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 10px 12px; border-radius: var(--radius-sm);
    transition: background 0.12s ease;
    border-left: 2px solid transparent;
}

.activity-item.activity-border-posted { border-left-color: var(--neon-cyan); }
.activity-item.activity-border-content_ready { border-left-color: var(--neon-purple); }
.activity-item.activity-border-scored { border-left-color: var(--neon-blue); }
.activity-item.activity-border-skipped { border-left-color: var(--text-secondary); }
.activity-item.activity-border-discovered { border-left-color: var(--neon-magenta); }

.activity-item:hover { background: rgba(0, 255, 204, 0.02); }
.activity-item + .activity-item { border-top: 1px solid rgba(255, 255, 255, 0.06); }

.activity-icon {
    width: 30px; height: 30px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; flex-shrink: 0; margin-top: 2px;
}

.activity-icon.discovered { background: var(--neon-magenta-dim); border: 1px solid rgba(255, 0, 128, 0.2); }
.activity-icon.scored { background: var(--neon-blue-dim); border: 1px solid rgba(0, 200, 255, 0.2); }
.activity-icon.content_ready { background: var(--neon-purple-dim); border: 1px solid rgba(120, 80, 255, 0.2); }
.activity-icon.awaiting_approval { background: var(--neon-orange-dim); border: 1px solid rgba(255, 96, 32, 0.2); }
.activity-icon.posted { background: var(--neon-cyan-dim); border: 1px solid var(--border-neon); }
.activity-icon.skipped { background: rgba(80, 88, 112, 0.1); border: 1px solid rgba(80, 88, 112, 0.15); }

.activity-thumb {
    width: 36px; height: 36px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.activity-body { flex: 1; min-width: 0; }
.activity-title { font-size: 12px; color: var(--text-primary); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-meta { display: flex; gap: 8px; align-items: center; margin-top: 3px; }

.activity-badge {
    font-family: 'Fira Code', monospace;
    font-size: 8px; font-weight: 600;
    padding: 2px 8px; border-radius: 3px;
    text-transform: uppercase; letter-spacing: 0.8px;
}

.activity-badge.discovered { background: var(--neon-magenta-dim); color: var(--neon-magenta); }
.activity-badge.scored { background: var(--neon-blue-dim); color: var(--neon-blue); }
.activity-badge.content_ready { background: var(--neon-purple-dim); color: var(--neon-purple); }
.activity-badge.posted { background: var(--neon-cyan-dim); color: var(--neon-cyan); }
.activity-badge.skipped { background: rgba(80, 88, 112, 0.1); color: var(--text-secondary); }
.activity-badge.awaiting_approval { background: var(--neon-orange-dim); color: var(--neon-orange); }

.activity-time { font-family: 'Fira Code', monospace; font-size: 9px; color: var(--text-secondary); }
.activity-score { font-family: 'Fira Code', monospace; font-size: 9px; color: var(--neon-cyan); font-weight: 600; }
.activity-empty { text-align: center; padding: 40px 20px; color: var(--text-secondary); font-size: 13px; }

.activity-summary {
    display: flex; gap: 16px; margin-bottom: 16px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    position: relative; z-index: 1;
}

.activity-summary-item { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.activity-summary-item .count { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 18px; }
.activity-summary-item .count-discovered { color: var(--neon-magenta); }
.activity-summary-item .count-scored { color: var(--neon-blue); }
.activity-summary-item .count-ready { color: var(--neon-purple); }
.activity-summary-item .count-posted { color: var(--neon-cyan); }
.activity-summary-item .count-skipped { color: var(--text-secondary); }
.activity-summary-item .label { color: var(--text-secondary); font-size: 11px; }

/* ==================== TOAST ==================== */
.toast-notification {
    position: fixed; right: 24px; color: white;
    padding: 14px 24px; border-radius: var(--radius-md);
    z-index: 2000; max-width: 400px;
    font-size: 13px; font-weight: 600;
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    transition: bottom 0.3s ease;
}

.toast-notification.toast-exit { opacity: 0; transform: translateX(120%); transition: all 0.3s ease; }
.toast-notification.toast-success { background: linear-gradient(135deg, #00a060, #00d080); box-shadow: 0 8px 30px rgba(0, 160, 96, 0.35), 0 0 30px rgba(0, 255, 204, 0.08); }
.toast-notification.toast-error { background: linear-gradient(135deg, #d01020, #f02040); box-shadow: 0 8px 30px rgba(208, 16, 32, 0.35), 0 0 30px rgba(255, 0, 128, 0.08); }
.toast-notification.toast-info { background: linear-gradient(135deg, #0060e0, #0090ff); box-shadow: 0 8px 30px rgba(0, 96, 224, 0.35); }
.toast-notification.toast-warning { background: linear-gradient(135deg, #c08000, #e0a000); box-shadow: 0 8px 30px rgba(192, 128, 0, 0.35); }

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-void); }
::-webkit-scrollbar-thumb { background: var(--text-secondary); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--neon-cyan); }

/* ==================== FORM CONTROLS ==================== */
select option { background: var(--bg-void); color: var(--text-primary); }
.filters input[type="date"] { min-width: 150px; color-scheme: dark; }
.filter-label { color: var(--text-secondary); font-family: 'Fira Code', monospace; font-size: 9px; font-weight: 500; text-transform: uppercase; letter-spacing: 2px; display: flex; align-items: center; padding: 0 4px; }
.channel-category-label { display: block; font-family: 'Fira Code', monospace; font-size: 9px; color: var(--neon-cyan); font-weight: 600; margin-top: 2px; letter-spacing: 0.5px; }
.row-num { color: var(--text-secondary); font-family: 'Fira Code', monospace; font-size: 11px; font-weight: 600; }

/* ==================== PIPELINE HEADER & CHARTS ==================== */
.pipeline-header-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
.pipeline-header-row h2 { margin: 0; }
.pipeline-filter-group { display: flex; gap: 8px; align-items: center; }

.pipeline-date-label {
    color: var(--text-secondary); font-family: 'Fira Code', monospace;
    font-size: 9px; font-weight: 500; text-transform: uppercase; letter-spacing: 2px;
}

.pipeline-select {
    padding: 8px 14px; background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08); border-radius: var(--radius-sm);
    color: var(--text-primary); font-size: 12px; font-weight: 500;
    cursor: pointer; transition: border-color 0.12s ease;
}

.pipeline-select:focus { border-color: var(--neon-cyan); outline: none; box-shadow: 0 0 10px rgba(0, 255, 204, 0.08); }

.pipeline-apply-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
    border: none; border-radius: var(--radius-sm);
    color: var(--bg-void); font-size: 11px; font-weight: 700;
    cursor: pointer; transition: all 0.15s ease;
    text-transform: uppercase; letter-spacing: 1px;
}

.pipeline-apply-btn:hover { box-shadow: 0 4px 20px rgba(0, 255, 204, 0.3); filter: brightness(1.1); }
.pipeline-apply-btn:focus-visible { outline: 2px solid var(--neon-magenta); outline-offset: 2px; }
.pipeline-select:focus-visible { outline: 2px solid var(--neon-magenta); outline-offset: 2px; }

/* ==================== ANIMATIONS ==================== */
@keyframes slideIn {
    from { transform: translateX(120%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

@keyframes surgeIn {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Staggered entrance */
.stats-grid { animation: surgeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) both; animation-delay: 0.05s; }
.pipeline-flow-section { animation: surgeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) both; animation-delay: 0.12s; }
.heatmap-section { animation: surgeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) both; animation-delay: 0.19s; }
.bottleneck-section { animation: surgeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) both; animation-delay: 0.26s; }
.activity-feed { animation: surgeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) both; animation-delay: 0.33s; }

/* 3D tilt class for JS-controlled elements */
.tilt-3d {
    transition: transform 0.15s ease;
    transform-style: preserve-3d;
    will-change: transform;
}

/* [tooltip-fix] Chart cards must NOT use preserve-3d — it creates a stacking
   context that clips ApexCharts tooltips. The 3D tilt hover still works via
   the perspective() in the inline transform set by effects.js. */
.pipeline-chart-card.tilt-3d {
    transform-style: flat;
}

/* Scroll reveal */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
    .pipeline-charts-grid { grid-template-columns: 1fr; perspective: none; }
    .pipeline-stage-2-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
    .heatmap-container { overflow-x: auto; }
    .activity-summary { flex-wrap: wrap; }
}

@media (max-width: 768px) {
    .navbar { padding: 10px 16px; flex-wrap: wrap; gap: 8px; height: auto; }
    .navbar-links { order: 3; width: 100%; justify-content: center; gap: 2px; }
    .navbar-links .page-nav-link { padding: 5px 9px; font-size: 9px; }
    .navbar h1, .navbar .navbar-title { font-size: 14px; }
    .content { padding: 0 16px 16px; margin-top: 0; }
    .stat-card .value { font-size: 24px; }
    .pipeline-box { min-width: 140px; padding: 14px 20px; }
    .pipeline-box .stage-value { font-size: 28px; }
    .bottleneck-grid { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
    .pipeline-metrics { grid-template-columns: repeat(2, 1fr); }
    .pipeline-filter-group { flex-wrap: wrap; }
    .navbar { backdrop-filter: none; background: rgba(6, 6, 8, 0.98); }
    #particleCanvas { display: none; }
}

/* ==================== CARD TOOLTIPS ==================== */
.card-tip {
    display: none;
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 30, 0.95);
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-family: 'Fira Code', monospace;
    font-size: 10px;
    line-height: 1.5;
    white-space: nowrap;
    border: 1px solid var(--border-neon);
    box-shadow: 0 8px 24px rgba(0,0,0,0.5), 0 0 12px rgba(0, 255, 204, 0.05);
    z-index: 60;
    pointer-events: none;
    letter-spacing: 0.2px;
}

.card-tip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--border-neon);
}

.stat-card:hover .card-tip,
.pipeline-box:hover .card-tip,
.pipeline-metric:hover .card-tip {
    display: block;
    animation: tipFadeIn 0.15s ease both;
}

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

/* ==================== GLASS TOOLTIPS (data-tip) ==================== */
[data-tip] { position: relative; }
[data-tip]::before {
    content: attr(data-tip);
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--text-primary);
    padding: 5px 12px;
    border-radius: 6px;
    font-family: 'Fira Code', monospace;
    font-size: 9px;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 50;
    pointer-events: none;
}
[data-tip]:hover::before { display: block; }

/* ==================== ROUND ACTION BUTTONS (modal) ==================== */
.pm-round-act {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.pm-round-act:hover {
    transform: scale(1.12);
    background: rgba(255,255,255,0.08) !important;
    box-shadow: 0 0 12px rgba(255,255,255,0.12), inset 0 0 8px rgba(255,255,255,0.04) !important;
}

/* ==================== UTILITY ==================== */
.initially-hidden { display: none !important; }

/* ==================== REDUCED MOTION ==================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    #particleCanvas { display: none; }
}

.nav-approval-badge {
    background: var(--neon-yellow-dim);
    color: var(--neon-yellow);
    padding: 2px 7px; border-radius: 3px;
    font-size: 9px; font-weight: 800;
    font-family: 'Fira Code', monospace;
    margin-left: 4px;
}