/* Estilos generales */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
}

html, body, #root {
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: #000; /* fondo oscuro si lo necesitas */
}

.dashboard-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.header {
    background: linear-gradient(135deg, #2c3e50, #1a5276);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header-title {
    font-size: 1.8rem;
    font-weight: 700;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-date {
    font-size: 0.9rem;
    opacity: 0.9;
}

.refresh-button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-weight: 500;
}

.refresh-button:hover {
    background-color: #2980b9;
}

/* Tarjetas de resumen */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem 2rem;
}

.custom-tabs {
    background-color: #001f3f; /* fondo azul oscuro */
    color: white;
}

.custom-tab {
    color: white !important;
}

.card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.card h3 {
    font-size: 1rem;
    color: #7f8c8d;
    margin-bottom: 0.5rem;
}

.card h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
}

/* Contenedor principal */
.main-container {
    flex: 1;
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Fila de filtros */
.filters-row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    background-color: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.filter-container {
    display: flex;
    flex-direction: column;
    min-width: 200px;
    flex: 1;
}

.filter-container label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #34495e;
}

/* Filas flexibles para gráficos */
.flex-row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.chart-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    flex: 1;
    min-width: 300px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.chart-container:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.chart-container h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #34495e;
    font-weight: 500;
}

.full-width {
    width: 100%;
    flex-basis: 100%;
}

/* Tabla de estado-categoría */
.estado-categoria-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.estado-categoria-table th, 
.estado-categoria-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid gray;
}

.estado-categoria-table th {
    background-color: gray;
    font-weight: 500;
    position: sticky;
    top: 0;
}

.estado-categoria-table tr:nth-child(even) {
    background-color: gray;
}

.estado-categoria-table tr:hover {
    background-color: #f1f4f6;
}

/* Footer */
.footer {
    background-color: #34495e;
    color: white;
    text-align: center;
    padding: 1rem;
    font-size: 0.9rem;
    margin-top: auto;
}

/* Responsive design */
@media (max-width: 992px) {
    .chart-container {
        flex-basis: 100%;
    }
    
    .header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Personalizaciones de Dash */
.Select-control {
    border-radius: 4px;
    border: 1px solid #ddd;
}

.Select-placeholder,
.Select--single > .Select-control .Select-value {
    line-height: 36px;
}

/* Añade esto a tus estilos */
.dash-graph {
    flex: 1;
    height: 100%;
}

#tab-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-height: 0; /* Importante para que flex funcione bien */
}

.js-plotly-plot, .plot-container {
    height: 100%;
}

/* Personalización de tooltips */
.plotly .modebar {
    opacity: 0.3;
    transition: opacity 0.3s;
}

.plotly .modebar:hover {
    opacity: 1;
}   

