/* ============================================================================
   Graficos del sistema (Radzen 12) - linea grafica CTH360 5.0.
   Estilo global para TODOS los RadzenChart: la paleta (--rz-series-N) vive en
   cth-tema.css; aqui van rejilla, ejes, trazos, marcadores, leyenda y tooltip.
   Los graficos no deben fijar colores propios (Fill/Stroke) salvo que el color
   tenga significado (p. ej. niveles de riesgo); asi heredan la paleta.
   ============================================================================ */

:root {
    --rz-chart-area-opacity: .14;
    --rz-chart-animation-duration: 900ms;
}

.rz-chart {
    font-family: inherit;
}

    /* Rejilla: punteada y muy suave, para que los datos sean lo protagonista. */
    .rz-chart .rz-grid-line {
        stroke: var(--o-b-e9edf3, #E9EDF3);
        stroke-dasharray: 4 5;
    }

    /* Ejes: sin linea dura; textos en gris pizarra. */
    .rz-chart .rz-axis line,
    .rz-chart .rz-axis path {
        stroke: var(--o-sup-3, #E5E7EB);
    }

    .rz-chart text,
    .rz-chart .rz-tick-text {
        fill: #64748B;
        font-size: 12px;
        font-weight: 500;
    }

    .rz-chart .rz-axis-title {
        fill: #94A3B8;
        font-size: 11.5px;
        font-weight: 600;
        letter-spacing: .02em;
    }

    /* Trazos de linea/area: extremos redondeados. */
    .rz-chart .rz-line-series path,
    .rz-chart .rz-area-series path {
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    /* Marcadores: pequeno halo para separarlos de la linea. */
    .rz-chart .rz-marker circle,
    .rz-chart .rz-marker path {
        filter: drop-shadow(0 1px 2px rgba(15, 23, 42, .18));
        transition: r .15s ease;
    }

    /* Columnas y barras: realce al pasar el cursor. */
    .rz-chart .rz-column-series path,
    .rz-chart .rz-bar-series path {
        transition: filter .2s ease, opacity .2s ease;
    }

        .rz-chart .rz-column-series path:hover,
        .rz-chart .rz-bar-series path:hover {
            filter: brightness(1.08) drop-shadow(0 4px 8px rgba(15, 23, 42, .18));
        }

    /* Tortas y donas: separacion blanca entre porciones. */
    .rz-chart .rz-pie-series path,
    .rz-chart .rz-donut-series path {
        stroke: var(--o-b-ffffff, #ffffff);
        stroke-width: 2px;
        transition: filter .2s ease, transform .2s ease;
    }

        .rz-chart .rz-pie-series path:hover,
        .rz-chart .rz-donut-series path:hover {
            filter: drop-shadow(0 4px 10px rgba(15, 23, 42, .22));
        }

    .rz-chart .rz-series-data-label {
        fill: #0F172A;
        font-weight: 700;
    }

/* Leyenda: pildoras. */
.rz-legend .rz-legend-items {
    gap: 6px;
}

.rz-legend .rz-legend-item {
    padding: 4px 12px;
    border-radius: 50px;
    background: var(--o-sup-2, #F8FAFC);
    border: 1px solid var(--o-b-eef1f5, #EEF1F5);
    font-size: .78rem;
    font-weight: 600;
    color: var(--o-txt-2, #334155);
}

    .rz-legend .rz-legend-item:hover {
        background: var(--o-f-eef4fb, #EEF4FB);
        color: var(--o-marca, #0B3C82);
    }

/* Tooltip: tarjeta blanca con sombra suave (el borde de color por serie lo pone Radzen). */
.rz-chart-tooltip .rz-chart-tooltip-content {
    background: var(--o-sup, #ffffff) !important;
    color: var(--o-txt, #0F172A) !important;
    border-radius: 12px !important;
    padding: 10px 14px !important;
    box-shadow: 0 14px 30px -10px rgba(15, 23, 42, .28), 0 2px 6px rgba(15, 23, 42, .06) !important;
    font-family: inherit;
}

.rz-chart-tooltip .rz-chart-tooltip-title {
    color: var(--o-txt-3, #64748B);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.rz-chart-tooltip .rz-chart-tooltip-item-value {
    color: var(--o-marca, #0B3C82);
    font-weight: 800;
}

@media (prefers-reduced-motion: reduce) {
    :root { --rz-chart-animation-duration: 0ms; }
}
