:root {
            --primary-blue: #2563eb;
            --secondary-blue: #1e40af;
            --accent-purple: #7c3aed;
            --success-green: #10b981;
            --warning-orange: #f59e0b;
            --danger-red: #ef4444;
            --bg-dark: #0f172a;
            --bg-light: #f8fafc;
        }

        body {
            font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            padding: 20px;
        }

        .dashboard-container {
            background: white;
            border-radius: 16px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
            overflow: hidden;
        }

        .dashboard-header {
            background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
            color: white;
            padding: 30px;
            position: relative;
            overflow: hidden;
        }

        .dashboard-header::before {
            content: '';
            position: absolute;
            top: -50%;
            right: -10%;
            width: 400px;
            height: 400px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 50%;
        }

        .dashboard-header h1 {
            font-size: 2rem;
            font-weight: 700;
            margin: 0;
            position: relative;
            z-index: 1;
        }

        .dashboard-header p {
            margin: 8px 0 0 0;
            opacity: 0.9;
            font-size: 1.1rem;
            position: relative;
            z-index: 1;
        }

        .config-btn {
            position: absolute;
            top: 30px;
            right: 30px;
            z-index: 2;
        }

        .metric-card {
            background: white;
            border-radius: 12px;
            padding: 20px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
            transition: all 0.3s ease;
            border: 1px solid #e2e8f0;
            height: 100%;
        }

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

        .metric-value {
            font-size: 2.5rem;
            font-weight: 700;
            margin: 10px 0;
        }

        .metric-label {
            color: #64748b;
            font-size: 0.9rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            font-weight: 600;
        }

        .metric-change {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 4px 10px;
            border-radius: 20px;
            font-size: 0.85rem;
            font-weight: 600;
            margin-top: 8px;
        }

        .metric-change.positive {
            background: #dcfce7;
            color: #166534;
        }

        .metric-change.negative {
            background: #fee2e2;
            color: #991b1b;
        }

        .chart-container {
            background: white;
            border-radius: 12px;
            padding: 20px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
            border: 1px solid #e2e8f0;
            height: 100%;
            max-height: 620px;
            overflow: hidden;
        }
        
        .chart-container canvas {
            max-height: 250px;
        }

        .chart-title {
            font-size: 1.1rem;
            font-weight: 600;
            margin-bottom: 16px;
            color: #1e293b;
        }

        .sankey-container {
            overflow-x: auto;
            overflow-y: hidden;
            position: relative;
            max-height: 620px;
        }

        #sankeyChart {
            min-height: 580px;
            display: block;
        }

        .journey-link {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            color: var(--primary-blue);
            text-decoration: none;
            font-weight: 500;
            font-size: 0.85rem;
            margin-top: 8px;
            transition: all 0.2s;
        }

        .journey-link:hover {
            color: var(--secondary-blue);
            gap: 10px;
        }

        .insight-card {
            background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
            border-left: 4px solid var(--warning-orange);
            padding: 14px;
            border-radius: 8px;
            margin-bottom: 12px;
        }

        .insight-card h6 {
            color: #92400e;
            font-weight: 600;
            margin-bottom: 6px;
            font-size: 0.95rem;
        }

        .insight-card p {
            color: #78350f;
            margin: 0;
            font-size: 0.875rem;
            line-height: 1.4;
        }

        .feedback-indicator {
            background: linear-gradient(135deg, #ddd6fe 0%, #c4b5fd 100%);
            border-left: 4px solid var(--accent-purple);
            padding: 10px 14px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 10px;
        }

        .feedback-indicator i {
            font-size: 1.3rem;
            color: var(--accent-purple);
        }

        .feedback-indicator strong {
            font-size: 0.9rem;
        }

        .feedback-indicator .text-muted {
            font-size: 0.85rem;
        }

        .channel-badge {
            display: inline-block;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: 600;
            margin: 2px;
        }

        .channel-paid {
            background: #dbeafe;
            color: #1e40af;
        }

        .channel-organic {
            background: #dcfce7;
            color: #166534;
        }

        .channel-social {
            background: #fce7f3;
            color: #9f1239;
        }

        .channel-email {
            background: #fef3c7;
            color: #92400e;
        }

        .channel-direct {
            background: #e0e7ff;
            color: #3730a3;
        }

        .modal-header {
            background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
            color: white;
        }

        .config-section {
            background: #f8fafc;
            padding: 20px;
            border-radius: 8px;
            margin-bottom: 20px;
        }

        .step-config {
            background: white;
            padding: 15px;
            border-radius: 6px;
            margin-bottom: 10px;
            border: 1px solid #e2e8f0;
        }

        #funnelDataConfig .form-control-sm,
        #costDataConfig .form-control-sm {
            font-size: 0.85rem;
        }

        #funnelDataConfig small,
        #costDataConfig small {
            font-size: 0.7rem;
            font-weight: 600;
            text-transform: uppercase;
            color: #64748b;
        }

        #funnelDataConfig .bg-white,
        #costDataConfig .bg-white {
            border: 1px solid #e2e8f0;
        }

        .icon-circle {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            margin-bottom: 12px;
        }

        .dropoff-card {
            background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
            border-left: 4px solid var(--danger-red);
            padding: 12px 14px;
            border-radius: 8px;
        }

        .dropoff-card h6 {
            font-size: 0.9rem;
            margin-bottom: 4px;
        }

        .dropoff-card .small {
            font-size: 0.83rem;
        }

        .dropoff-card .dropoff-rate {
            font-size: 1.4rem;
            font-weight: 700;
            color: var(--danger-red);
            line-height: 1;
        }
        
        .dropoff-card .d-flex {
            gap: 12px;
        }

        @media (max-width: 768px) {
            .dashboard-header h1 {
                font-size: 1.5rem;
            }
            
            .config-btn {
                position: static;
                margin-top: 20px;
            }
        }