/* --- RESET BÁSICO Y FUENTES --- */
body, html {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f4f7f9;
    color: #333;
    font-size: 15px;
}

.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 15px;
}

/* --- CABECERA --- */
.report-header {
    text-align: center;
    margin-bottom: 25px;
    color: #2c3e50;
}

.report-header h1 {
    font-size: 2em;
    font-weight: 500;
}

/* --- TARJETAS GENERALES --- */
.card {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 20px;
    margin-bottom: 25px;
}

/* --- SECCIÓN DE FILTROS --- */
.filters-section {
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* Espacio entre grupos de filtros */
    align-items: flex-end; /* Alinea los elementos al final, útil para el botón */
}

.filter-group {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Permite que los grupos crezcan */
    min-width: 180px; /* Ancho mínimo para cada grupo */
}

.filter-group label {
    font-weight: 500;
    margin-bottom: 6px;
    color: #555;
    font-size: 0.9em;
}

.filter-group select,
.filter-group input[type="text"], /* Si añades inputs de texto */
.filter-group input[type="date"] { /* Si añades inputs de fecha */
    padding: 10px 12px;
    border: 1px solid #d1d9e0;
    border-radius: 5px;
    background-color: #fff;
    font-size: 0.95em;
    outline: none;
    transition: border-color 0.2s;
}

.filter-group select:focus,
.filter-group input:focus {
    border-color: #007bff; /* Azul primario de Bootstrap */
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* --- BOTONES --- */
.btn {
    padding: 10px 18px;
    font-size: 0.95em;
    font-weight: 500;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    text-align: center;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}
.btn:active {
    transform: translateY(1px);
}


/* --- ÁREA DE RESULTADOS DEL REPORTE --- */
.report-results h2 {
    text-align: center;
    color: #34495e;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.5em;
    font-weight: 500;
}

.loading-spinner, .error-message {
    text-align: center;
    padding: 20px;
    font-size: 1.1em;
    color: #777;
}
.error-message {
    color: #c0392b; /* Rojo para errores */
    background-color: #fdecea;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
}


/* --- KPIs --- */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Responsivo */
    gap: 20px;
    margin-bottom: 25px;
}

.kpi-card {
    background-color: #f8f9fa;
    border: 1px solid #e3e6f0;
    border-left: 5px solid #007bff; /* Color de acento */
    padding: 15px;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.kpi-card:nth-child(2n) { border-left-color: #28a745; } /* Verde */
.kpi-card:nth-child(3n) { border-left-color: #ffc107; } /* Amarillo */
.kpi-card:nth-child(4n) { border-left-color: #17a2b8; } /* Cian */


.kpi-value {
    font-size: 1.8em;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.kpi-label {
    font-size: 0.9em;
    color: #6c757d; /* Gris secundario */
}

/* --- TABLAS --- */
.table-responsive {
    overflow-x: auto; /* Permite scroll horizontal en tablas grandes */
    margin-top: 15px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

table th, table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

table th {
    background-color: #f0f3f5;
    font-weight: 600;
    color: #495057;
    white-space: nowrap; /* Evita que los encabezados se rompan */
}

table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

table tbody tr:hover {
    background-color: #e9ecef; /* Un gris claro al pasar el mouse */
}

.text-right {
    text-align: right !important;
}

/* --- GRÁFICOS (Placeholder si usas Chart.js, etc.) --- */
#chartContainer {
    margin-top: 25px;
    /* Define estilos para el contenedor del gráfico si es necesario */
}

/* --- MEDIA QUERIES (Ajustes básicos para responsividad) --- */
@media (max-width: 768px) {
    .filters-section {
        flex-direction: column; /* Apila los filtros verticalmente */
        align-items: stretch; /* Estira los elementos */
    }
    .filter-group {
        width: 100%; /* Cada filtro ocupa todo el ancho */
    }
    .kpi-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    .kpi-value {
        font-size: 1.5em;
    }
}