#dashboard .rz-chart {
    --rz-chart-axis-font-size: 12px !important;
}

#dashboard .rz-legend {
    --rz-chart-legend-font-size: 12px !important;
}

.dashboard-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 0 !important;
}

.dashboard-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 0 !important;
}

.dashboard-chart {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dashboard-chart:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.dashboard-card-body {
    padding: 1rem !important;
}

.left-dashboard-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: -0.5rem !important;
}

.left-dashboard-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.dashboard-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.top-section {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
}

.column-left {
    width: 25%;
    flex-shrink: 0;
}

.column-right {
    width: 75%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.title-row {
    width: 100%;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.divider {
    width: 100%;
    height: 2px;
    background-color: #e0e0e0;
}

.bottom-section {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
}

.bottom-left {
    width: 25%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.bottom-right {
    width: 75%;
    display: flex;
    gap: 1.5rem;
}

.chart-left {
    width: 58%;
}

.chart-right {
    width: 42%;
}

.column-left .d-flex.justify-content-between {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100%;
}

.column-left .position-relative {
    width: 80px;
    height: 80px;
}

.column-left svg {
    display: block;
    width: 100%;
    height: 100%;
}

.column-left .position-absolute.d-flex.justify-content-center.align-items-center {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

.column-left .position-absolute span {
    display: block;
    text-align: center;
    font-weight: bold;
    width: 100%;
}

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

    .column-left {
        aspect-ratio: 1 / 1;
        display: flex;
    }

    .column-left .dashboard-card {
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .column-left .dashboard-card .card-body {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .column-left .d-flex.justify-content-between {
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 1rem;
        text-align: center;
        width: 100%;
    }

    .column-left .d-flex.flex-column {
        align-items: center !important;
        width: 100%;
    }

    .column-left .position-relative {
        width: 60px;
        height: 60px;
        margin: 0 auto !important;
    }

    .bottom-section {
        flex-direction: column;
        gap: 1.5rem;
    }

    .bottom-left {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
    }

    .left-dashboard-card {
        width: calc(50% - 0.75rem);
        margin-bottom: 0 !important;
    }

    .bottom-right {
        width: 100%;
        flex-direction: row;
    }

    .chart-left {
        width: 58%;
    }

    .chart-right {
        width: 42%;
    }
}

@media (max-width: 991px) {
    .top-section, .bottom-section {
        flex-direction: column;
    }

    .column-left, .column-right, .bottom-left, .bottom-right {
        width: 100%;
    }

    .column-left {
        aspect-ratio: auto;
    }

    .column-left .d-flex.justify-content-between {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100%;
        text-align: left;
    }

    .column-left .d-flex.flex-column {
        align-items: flex-start !important;
        width: auto;
    }

    .column-left .position-relative {
        width: 80px;
        height: 80px;
        margin: 0 !important;
    }

    .bottom-right {
        flex-direction: column;
    }

    .chart-left, .chart-right {
        width: 100%;
    }
}

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

.dashboard-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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