/* Homepage sections — calm neutral surfaces with semantic accent rules */

.dashboard-section {
    padding: 16px 18px;
    border-radius: var(--radius, 10px);
    margin-bottom: 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--accent, #f97316);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.dashboard-section-title {
    margin: 0;
    color: var(--primary-dark, #1e3a8a);
    font-size: 15.5px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.section-bg-quick {
    border-left-color: var(--accent, #f97316);
}

.section-bg-daily {
    border-left-color: var(--info, #0284c7);
}

.section-bg-weekly {
    border-left-color: var(--primary, #1e40af);
}

.section-bg-monthly {
    border-left-color: var(--success, #059669);
}

.dashboard-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 28px 16px;
    color: #64748b;
}

.dashboard-loading .loading-spinner {
    margin: 0 auto 10px;
}

.dashboard-loading p {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.dashboard-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 24px 16px;
    color: #64748b;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius-sm, 8px);
}

.dashboard-empty p {
    margin: 0;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.5;
}

/* Compact spacing; holiday styles load after this file. */
#home-tab .dashboard-container {
    padding: 16px;
    background: #f8fafc;
}

#home-tab .dashboard-section {
    padding: 16px;
    margin-bottom: 14px;
}

#home-tab .dashboard-section:last-child {
    margin-bottom: 0;
}

#home-tab .quick-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 0;
}

#home-tab .stat-card {
    min-width: 0;
    min-height: 76px;
    padding: 12px 14px;
}

#home-tab .stat-card-value {
    overflow-wrap: anywhere;
}

@media (max-width: 768px) {
    #home-tab .dashboard-container {
        padding: 12px;
    }

    #home-tab .dashboard-section {
        padding: 13px 12px;
        margin-bottom: 12px;
    }

    #home-tab .quick-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px;
    }

    #home-tab .stat-card {
        min-height: 66px;
        padding: 10px 12px;
    }

    #home-tab .quick-stats-grid[data-total-count="3"] > .stat-card:last-child,
    #home-tab .quick-stats-grid[data-total-count="5"] > .stat-card:last-child {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        min-height: 52px;
    }

    #home-tab .quick-stats-grid[data-total-count="3"] > .stat-card:last-child .stat-card-label,
    #home-tab .quick-stats-grid[data-total-count="5"] > .stat-card:last-child .stat-card-label {
        margin-bottom: 0;
    }
}
