﻿
.dashboard-grid {
    display: grid;
    /* Smaller 2x2 grid aligned to the left */
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    width: 100%;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
}

/* Prevent grid items from expanding columns due to intrinsic content */
.dashboard-grid > * {
    min-width: 0;
}


.card--cars {
    grid-column: span 1;
}

.card--customers {
    grid-column: span 1;
}

.card--sales {
    grid-column: span 1;
}

.card--parts {
    grid-column: span 1;
}


.summary-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
    /* Keep all 4 blocks the same size */
    height: 240px;
}

.summary-card .card-body {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0.9rem;
}

.summary-card .btn {
    margin-top: auto;
    align-self: flex-start;
}

    .summary-card:hover {
        transform: translateY(-1px);
        box-shadow: 0 12px 24px rgba(0,0,0,0.15);
    }


.chart-container {
    width: 80%;
    max-width: 400px;
    margin: 0 0 1rem 0;
    height: 180px;
}


.summary-card .display-6 {
    font-size: 2.5rem;
    font-weight: 200;
    color: #333;
}


.recent-list li {
    margin-bottom: 0.3rem;
}


.card--sales {
    background: linear-gradient(135deg, #ffe5e0 0%, #fff5f5 100%);
}


.card--parts {
    background: #f0fcf5;
}

.sales-metrics {
    display: grid;
    gap: 0.35rem;
    margin: 0.25rem 0 0.5rem;
}

.sales-metric {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: baseline;
}

.sales-label {
    color: rgba(0, 0, 0, 0.65);
    font-size: 0.95rem;
}

.sales-value {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.sales-metric--nett .sales-value {
    font-size: 1.15rem;
}


.summary-card .card-title {
    font-weight: 600;
    letter-spacing: 0.5px;
}


#salesChart {
    width: 100% !important;
    height: 100% !important;
}

.sales-info-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: start;
    gap: 1rem;
}

.sales-stats {
    flex: 1;
    min-width: 200px;
    font-size: 0.95rem;
    color: #333;
}

    .sales-stats p {
        margin-bottom: 0.4rem;
    }

    .sales-stats hr {
        margin: 0.8rem 0;
    }


@media (max-width: 991.98px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: none;
    }
    
    .card--cars,
    .card--customers,
    .card--parts {
        grid-column: span 1;
    }
    
    .card--sales {
        grid-column: span 1;
    }

    .chart-container {
        width: 100%;
        max-width: none;
    }
}


@media (max-width: 767.98px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .card--cars,
    .card--customers,
    .card--parts,
    .card--sales {
        grid-column: span 1;
    }
}


@media (max-width: 575.98px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .card--cars,
    .card--customers,
    .card--parts,
    .card--sales {
        grid-column: span 1;
    }
    
    .sales-info-container {
        flex-direction: column;
    }

    .chart-container,
    .sales-stats {
        width: 100%;
        margin: 0 0 1rem;
    }
    
    .summary-card .display-6 {
        font-size: 2.5rem;
    }

    .summary-card .card-title {
        font-size: 1.1rem;
    }
}


