* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
.header {
    text-align: center;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}
.header h1 {
    font-size: 2em;
    margin-bottom: 10px;
}
.header .info {
    font-size: 0.9em;
    opacity: 0.9;
}
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.chart-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}
.chart-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}
.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}
.chart-title {
    color: #333;
    font-size: 1.1em;
    font-weight: bold;
}
.chart-subtitle {
    color: #666;
    font-size: 0.85em;
}
.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: bold;
    background: #4caf50;
    color: white;
}
.legend-custom {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    font-size: 0.85em;
    color: #666;
    flex-wrap: wrap;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}
.legend-color {
    width: 20px;
    height: 12px;
    border-radius: 2px;
}
canvas {
    max-height: 300px;
    margin: 10px 0;
}

/* Controles de gráficas */
.chart-controls {
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.8rem;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chart-controls label {
    font-weight: 500;
    color: #333;
    white-space: nowrap;
}

.chart-controls select,
.chart-controls input[type="datetime-local"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9em;
    min-width: 180px;
}

.chart-controls select {
    min-width: 280px;
}

.chart-controls button {
    padding: 8px 20px;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
    white-space: nowrap;
}

.chart-controls button:hover {
    background: #1976D2;
}

@media (max-width: 1200px) {
    .chart-controls {
        flex-wrap: wrap;
    }
}

/* Gráfica principal */
.chart-card-main {
    max-width: 900px;
    margin: 0 auto;
}

/* Container de gráficas separadas */
.separadas-container {
    max-width: 1100px;
    margin: 1.5rem auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    clear: both;
    margin-top: 1.5rem;
}

.chart-card-separada {
    min-height: 350px;
    padding: 15px;
}

.chart-card-separada canvas {
    max-height: 280px !important;
}

.chart-title-small {
    color: #333;
    font-size: 1em;
    font-weight: bold;
}

/* Mensajes de error/info */
.mensaje-error,
.mensaje-info {
    max-width: 900px;
    margin: 1rem auto;
    padding: 15px 20px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
}

.mensaje-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef5350;
}

.mensaje-info {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #42a5f5;
}