:root {
            --bg-light: #FAF8F5; /* Matching the image background */
            --text-dark: #1f2937;
            --text-muted: #6b7280;
            --border-color: #e5e7eb;
            --accent-gold: #cfa874; /* Beige/gold from image */
            --accent-dark: #27272a;
            --success: #16a34a;
        }

        body {
            font-family: 'Outfit', sans-serif;
            background-color: var(--bg-light);
            color: var(--text-dark);
            margin: 0;
            padding: 0;
        }

        .stats-container {
            width: 90%;
            max-width: 1600px;
            margin: 40px auto 80px;
            position: relative;
            z-index: 10;
        }

        /* ── CARDS ── */
        .dash-card {
            background: #fff;
            border-radius: 16px;
            padding: 24px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.02);
            border: 1px solid rgba(0,0,0,0.03);
            height: 100%;
            min-width: 0; /* Prevents card from stretching out of grid columns due to wide children */
        }

        .card-title {
            font-size: 15px;
            font-weight: 600;
            color: var(--text-dark);
            margin: 0 0 20px 0;
        }

        /* ── ROW 1: KPI CARDS ── */
        .kpi-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 24px;
            margin-bottom: 24px;
        }

        @media (max-width: 1200px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
        @media (max-width: 600px) { .kpi-grid { grid-template-columns: 1fr; } }

        .kpi-item {
            display: flex;
            align-items: center;
            gap: 20px;
        }

        .kpi-icon {
            width: 64px;
            height: 64px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            flex-shrink: 0;
        }

        .icon-dark { background: var(--accent-dark); color: #fff; }
        .icon-gold { background: var(--accent-gold); color: #fff; }

        .kpi-info {
            display: flex;
            flex-direction: column;
        }

        .kpi-label {
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: var(--text-dark);
            margin-bottom: 4px;
        }

        .kpi-value {
            font-size: 32px;
            font-weight: 700;
            color: #000;
            line-height: 1.1;
            margin-bottom: 6px;
        }

        .kpi-trend {
            font-size: 12px;
            color: var(--text-muted);
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .kpi-trend.up { color: var(--success); }

        /* ── ROW 2: CHARTS ── */
        .charts-grid {
            display: grid;
            grid-template-columns: 2fr 1.5fr 1.2fr;
            gap: 24px;
            margin-bottom: 24px;
        }

        @media (max-width: 1200px) {
            .charts-grid { grid-template-columns: 1fr 1fr; }
            .charts-grid > :first-child { grid-column: span 2; }
        }
        @media (max-width: 768px) {
            .charts-grid { grid-template-columns: 1fr; }
            .charts-grid > :first-child { grid-column: span 1; }
        }

        .chart-wrapper {
            position: relative;
            height: 250px;
            width: 100%;
        }
        
        .donut-chart-container {
            display: flex;
            align-items: center;
            gap: 20px;
            height: 250px;
        }
        @media (max-width: 576px) {
            .donut-chart-container {
                flex-direction: column !important;
                height: auto !important;
                gap: 16px !important;
            }
            .donut-chart-container > div:first-child {
                width: 100% !important;
                display: flex !important;
                justify-content: center !important;
            }
            .donut-chart-container > div:last-child {
                width: 100% !important;
            }
        }

        .donut-legend {
            margin-top: 10px;
        }
        .donut-legend-item {
            display: flex;
            align-items: center;
            margin-bottom: 8px;
            font-size: 13px;
        }
        .donut-legend-color {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            margin-right: 10px;
        }
        .donut-legend-text { flex: 1; color: var(--text-dark); font-weight: 500;}
        .donut-legend-val { color: var(--text-muted); font-size: 12px; }

        /* ── ROW 3: BOTTOM ── */
        .bottom-grid {
            display: grid;
            grid-template-columns: 1fr 1fr; /* Balanced 50/50 columns split */
            gap: 24px;
        }

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

        /* Table */
        .custom-table {
            width: 100%;
            border-collapse: collapse;
        }

        .custom-table th {
            text-align: left;
            font-size: 12px;
            font-weight: 600;
            color: var(--text-muted);
            padding: 12px 8px;
            border-bottom: 1px solid var(--border-color);
        }

        .custom-table td {
            font-size: 13px;
            color: var(--text-dark);
            padding: 12px 8px;
            border-bottom: 1px solid var(--border-color);
        }
        
        .custom-table tr:last-child td { border-bottom: none; }
        .custom-table td:last-child, .custom-table th:last-child { text-align: right; }

        /* Custom Table Columns Proportions */
        .custom-table th:nth-child(1), .custom-table td:nth-child(1) { width: 8%; }
        .custom-table th:nth-child(2), .custom-table td:nth-child(2) { width: 40%; }
        .custom-table th:nth-child(3), .custom-table td:nth-child(3) { width: 26%; }
        .custom-table th:nth-child(4), .custom-table td:nth-child(4) { width: 26%; }

        /* Insights */
        .insight-cols {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 20px;
            margin-top: 10px;
        }
        
        @media (max-width: 768px) { .insight-cols { grid-template-columns: 1fr; } }

        .insight-item {
            display: flex;
            gap: 16px;
            align-items: flex-start;
        }
        
        .insight-icon {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            background: var(--accent-dark);
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            flex-shrink: 0;
        }

        .insight-text h4 {
            font-size: 12px;
            font-weight: 600;
            color: var(--text-muted);
            margin: 0 0 6px;
        }

        .insight-text h3 {
            font-size: 18px;
            font-weight: 700;
            color: var(--text-dark);
            margin: 0 0 8px;
        }
        
        .insight-text h3.green { color: var(--success); }

        .insight-text p {
            font-size: 12px;
            color: var(--text-muted);
            line-height: 1.5;
            margin: 0;
        }

        /* ── RESPONSIVE MEDIA QUERIES (MOBILE OVERRIDES) ── */
        @media (max-width: 768px) {
            .stats-container {
                width: 100% !important;
                padding: 0 16px !important;
                margin: 20px auto 40px !important;
                box-sizing: border-box !important;
            }
            .dash-card {
                padding: 16px !important;
                border-radius: 14px !important;
            }
            .card-title {
                font-size: 14px !important;
                margin-bottom: 16px !important;
            }
            .kpi-grid {
                gap: 16px !important;
                margin-bottom: 16px !important;
            }
            .charts-grid {
                gap: 16px !important;
                margin-bottom: 16px !important;
            }
            .bottom-grid {
                gap: 16px !important;
            }
            .custom-table th, .custom-table td {
                padding: 8px 4px !important;
                font-size: 12px !important;
            }
            .insight-cols {
                gap: 16px !important;
            }
        }

        @media (max-width: 576px) {
            /* Compact 2x2 grid for KPI items */
            .kpi-grid {
                grid-template-columns: repeat(2, 1fr) !important;
                gap: 12px !important;
            }
            .kpi-item {
                flex-direction: column !important;
                align-items: flex-start !important;
                gap: 10px !important;
                padding: 14px !important;
                border-radius: 12px !important;
            }
            .kpi-icon {
                width: 44px !important;
                height: 44px !important;
                font-size: 18px !important;
            }
            .kpi-info {
                width: 100% !important;
            }
            .kpi-label {
                font-size: 9px !important;
                letter-spacing: 0.2px !important;
                margin-bottom: 2px !important;
                line-height: 1.2 !important;
            }
            .kpi-value {
                font-size: 22px !important;
                margin-bottom: 4px !important;
            }
            .kpi-trend {
                font-size: 10px !important;
                line-height: 1.2 !important;
                flex-wrap: wrap !important;
            }

            /* Donut chart canvas height fix on mobile */
            .donut-chart-container {
                flex-direction: column !important;
                height: auto !important;
                gap: 16px !important;
            }
            .donut-chart-container > div:first-child {
                width: 100% !important;
                height: 180px !important;
                display: flex !important;
                justify-content: center !important;
                align-items: center !important;
            }
            .donut-chart-container > div:last-child {
                width: 100% !important;
            }
            .donut-legend-item {
                margin-bottom: 6px !important;
                font-size: 12px !important;
            }
            
            /* Insights icons compact */
            .insight-icon {
                width: 40px !important;
                height: 40px !important;
                font-size: 16px !important;
            }
            .insight-text h3 {
                font-size: 16px !important;
                margin-bottom: 4px !important;
            }
            .insight-text p {
                font-size: 11.5px !important;
            }
        }