/* Additional styles for stats page */
.stats-container {
    padding: 20px 0;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 200px));
    gap: 15px;
    margin-bottom: 25px;
    justify-content: center;
}

.stat-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 12px 10px;
    text-align: center;
    box-shadow: 0 2px 3px rgba(0,0,0,0.1);
    border-left: 3px solid #274e13;
}

.stat-card h3 {
    color: #274e13;
    font-size: 15px;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.stat-card h3 i {
    font-size: 14px;
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 3px;
}

.stat-label {
    font-size: 11px;
    color: #666;
}

.stats-table-container {
    background-color: white;
    margin-bottom: 20px;
}

.stats-table {
    border-collapse: collapse;
    font-size: 16px;
    table-layout: auto; /* Allow columns to size based on content */
}

.stats-table th {
    background-color: #274e13;
    color: white;
    padding: 10px;
    text-align: left;
    font-weight: bold;
    font-size: 15px;
}

.stats-table th:first-child,
.stats-table td:first-child {
    width: 1%;
    white-space: nowrap; /* Keep position names on one line */
}

.stats-table th:nth-child(2),
.stats-table td:nth-child(2),
.stats-table th:nth-child(3),
.stats-table td:nth-child(3) {
    width: 1%; /* Make number columns as narrow as possible */
    white-space: nowrap; /* Keep numbers on one line */
    text-align: center;
}

.stats-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    font-size: 15px;
}

.stats-table tr:last-child td {
    border-bottom: none;
}

.category-name {
    font-weight: bold;
}

.category-name i {
    margin-right: 6px;
    font-size: 12px;
}

.number-cell {
    text-align: center;
    font-weight: bold;
}

.loading {
    text-align: center;
    padding: 30px;
    color: #666;
}

.loading i {
    font-size: 30px;
    color: #274e13;
    margin-bottom: 8px;
}

.section-title {
    color: #274e13;
    margin-bottom: 12px;
    font-size: 18px;
    border-bottom: 2px solid #274e13;
    padding-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i {
    font-size: 18px;
}

.stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.stats-section {
    min-width: 0; /* Prevents overflow */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .summary-cards {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .stat-card {
        padding: 10px 8px;
    }

    .stat-card h3 {
        font-size: 12px;
    }

    .stat-number {
        font-size: 20px;
    }

    .stat-label {
        font-size: 10px;
    }

    .stats-table {
        font-size: 13px;
    }

    .stats-table th,
    .stats-table td {
        padding: 6px 4px;
        font-size: 12px;
    }

    /* On mobile, allow wrapping if needed */
    .stats-table th:first-child,
    .stats-table td:first-child {
        white-space: normal;
    }

    .stats-table th:nth-child(2),
    .stats-table td:nth-child(2),
    .stats-table th:nth-child(3),
    .stats-table td:nth-child(3) {
        width: auto; /* Reset on mobile */
    }

    .stats-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}
