body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f1f5f9;
}

.sidebar {
    width: 240px;
    height: 100vh;
    background: #0f172a;
    color: white;
    position: fixed;
    padding: 20px;
    top: 0;
    left: 0;
}

.sidebar h2 {
    margin-top: 0;
    font-size: 20px;
}

.menu {
    margin-top: 30px;
}

.menu a {
    display: block;
    padding: 12px;
    margin-bottom: 8px;
    color: white;
    text-decoration: none;
    border-radius: 6px;
}

.menu a:hover {
    background: #1e293b;
}

.main {
    margin-left: 260px;
    padding: 30px;
}

.card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.topbar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
}


/* =========================
   ESPACIADO INTERNO CARD
========================= */

.card > * + * {
    margin-top: 20px;
}

/* =========================
   ESPACIADO ENTRE CARDS
========================= */

.main .card + .card {
    margin-top: 20px;
}

.grafico-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.grafico-item {
    background: #f8fafc;
    padding: 15px;
    border-radius: 10px;
}

.grafico-full {
    margin-top: 25px;
    background: white;
    border: 1px solid #e5e7eb;
    padding: 15px;
    border-radius: 10px;

    max-width: 700px;   /* 🔥 CLAVE */
    margin-left: auto;
    margin-right: auto;
}

canvas {
    width: 100% !important;
    height: 220px !important; /* 🔥 bajar altura mejora nitidez */
}
