/* =========================
ANALYTICS SECTION
========================= */

.analytics-section {
    /*max-width: 1320px;*/
    margin: 40px auto;
    padding: 35px;
    border-radius: 22px;
    background: linear-gradient( to right, #ffffff 0%, #fff9ef 50%, #fff3df 100% );
    border: 1px solid #f3dfbf;
    box-shadow: 0 10px 30px rgba(0,0,0,.05);
}

.analytics-header {
    text-align: center;
    margin-bottom: 35px;
}

    .analytics-header h2 {
        font-size: 32px;
        font-weight: 800;
        color: #002147;
        margin-bottom: 10px;
    }

    .analytics-header p {
        color: #6b7280;
        font-size: 15px;
    }

.analytics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.analytics-card {
    background: #fff;
    border-radius: 22px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0,0,0,.06);
    position: relative;
    overflow: hidden;
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

    .card-top h4 {
        font-size: 22px;
        font-weight: 700;
        color: #002147;
    }

.live-badge {
    background: #e8fff0;
    color: #00a63e;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
}

    .live-badge i {
        font-size: 9px;
        margin-right: 5px;
    }

/* ======================
DONUT CHART
====================== */

.donut-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 25px 0;
}

.donut-chart {
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: conic-gradient( #002147 0% 21%, #d45b12 21% 35%, #F4CD81 35% 91%, #5b728a 91% 100% );
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

    .donut-chart::before {
        content: '';
        position: absolute;
        width: 160px;
        height: 160px;
        background: #fff;
        border-radius: 50%;
    }

.donut-center {
    position: relative;
    z-index: 2;
    text-align: center;
}

    .donut-center h3 {
        margin: 0;
        font-size: 38px;
        font-weight: 800;
        color: #002147;
    }

    .donut-center span {
        color: #6b7280;
        font-size: 14px;
    }

/* ======================
LEGEND
====================== */

.chart-legend {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 25px;
}

.legend-item {
    font-weight: 600;
    color: #374151;
}

.dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 10px;
}

.sc {
    background: #002147;
}

.st {
    background: #d45b12;
}

.obc {
    background: #F4CD81;
}

.gen {
    background: #5b728a;
}

/* ======================
RIGHT SIDE CARDS
====================== */

.caste-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-radius: 16px;
    margin-bottom: 18px;
    background: #f9fafb;
    transition: .3s;
}

    .caste-item:hover {
        transform: translateY(-3px);
    }

    .caste-item h5 {
        margin: 0;
        font-size: 20px;
        font-weight: 800;
    }

    .caste-item small {
        color: #6b7280;
    }

    .caste-item h3 {
        margin: 0;
        font-size: 28px;
        font-weight: 800;
        color: #002147;
    }

/* Left Border */

.sc-border {
    border-left: 6px solid #002147;
}

.st-border {
    border-left: 6px solid #d45b12;
}

.obc-border {
    border-left: 6px solid #F4CD81;
}

.gen-border {
    border-left: 6px solid #5b728a;
}

/* ======================
RESPONSIVE
====================== */

@media(max-width:991px) {

    .analytics-grid {
        grid-template-columns: 1fr;
    }
}

@media(max-width:576px) {

    .analytics-section {
        padding: 20px;
    }

    .analytics-header h2 {
        font-size: 24px;
    }

    .donut-chart {
        width: 220px;
        height: 220px;
    }

        .donut-chart::before {
            width: 130px;
            height: 130px;
        }
}
