/* Fase 9.3 — CSS verbatim de los bloques de estilo de Pages/CCC/Components/ProgramacionAgente.razor. Igual que hoy, es global mientras el componente está en pantalla:
   se enlaza con <link> donde estaba el bloque. Cambios: @@ → @ y capas D-51. */
/* ═══════════════════════════════════════════════════════════════
           ProgramacionAgente.razor.css — Cobalt Elegante
           Vantastic ERP · Agente de Cobranza Inteligente
   ═══════════════════════════════════════════════════════════════ */

.root {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    font-size: 13px;
    color: #111827;
    background: #f3f4f6;
    min-height: 100vh;
    padding: 18px 22px 32px;
}

/* ══════════════════════════════════════════════════════════════
                           HEADER
   ══════════════════════════════════════════════════════════════ */
.pag-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.pag-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.pag-icon-wrap {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #1a4fba 0%, #0f3494 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 20px;
    box-shadow: 0 2px 8px rgba(26,79,186,.30);
}

.pag-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    line-height: 1.2;
}

.pag-subtitle {
    font-size: 12px;
    color: #4b5563;
    margin: 2px 0 0;
}

.pag-ruc {
    font-weight: 700;
    color: #1a4fba;
    background: #e8eef9;
    padding: 1px 7px;
    border-radius: 20px;
}

.pag-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Status badge header */
.pag-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.pag-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-active {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.status-active .pag-status-dot {
    background: #16a34a;
    animation: pulse-green 1.8s infinite;
}

.status-running {
    background: #e8eef9;
    color: #1a4fba;
    border: 1px solid #bfcfef;
}

.status-running .pag-status-dot {
    background: #1a4fba;
    animation: pulse-blue 1s infinite;
}

.status-paused {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
}

.status-paused .pag-status-dot {
    background: #d97706;
}

.status-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.status-error .pag-status-dot {
    background: #dc2626;
}

@keyframes pulse-green {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(22,163,74,.5);
    }
    50% {
        box-shadow: 0 0 0 5px rgba(22,163,74,0);
    }
}

@keyframes pulse-blue {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(26,79,186,.5);
    }
    50% {
        box-shadow: 0 0 0 5px rgba(26,79,186,0);
    }
}

/* Botones header */
.btn-icon-pag {
    width: 34px;
    height: 34px;
    border-radius: 5px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    color: #ffffff;
    transition: opacity .15s, transform .1s;
    box-shadow: 0 1px 2px rgba(0,0,0,.10);
}

.btn-icon-pag:hover:not(:disabled) {
    opacity: .85;
    transform: translateY(-1px);
}

.btn-icon-pag:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.btn-save {
    background: #1a4fba;
}

.btn-run {
    background: #16a34a;
}

.btn-pause {
    background: #d97706;
}

.btn-stop {
    background: #dc2626;
}

/* ══════════════════════════════════════════════════════════════
                           KPI STRIP
   ══════════════════════════════════════════════════════════════ */
.pag-kpi-strip {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.pag-kpi-card {
    background: #ffffff;
    border-radius: 5px;
    border: 1px solid #e5e7eb;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
}

.kpi-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.kpi-blue {
    background: #e8eef9;
    color: #1a4fba;
}

.kpi-green {
    background: #f0fdf4;
    color: #16a34a;
}

.kpi-amber {
    background: #fffbeb;
    color: #d97706;
}

.kpi-cobalt {
    background: #e8eef9;
    color: #2d6ae0;
}

.kpi-red {
    background: #fef2f2;
    color: #dc2626;
}

.kpi-value {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    line-height: 1;
}

.kpi-label {
    font-size: 11px;
    color: #4b5563;
    margin-top: 2px;
}

/* ══════════════════════════════════════════════════════════════
                         GRID PRINCIPAL
   ══════════════════════════════════════════════════════════════ */
.pag-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: start;
}

.pag-left, .pag-right {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ── Card base ── */
.pag-card {
    background: #ffffff;
    border-radius: 5px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
    overflow: hidden;
}

.pag-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #f0f4fb;
    border-bottom: 1px solid #e8eef9;
    font-size: 12px;
    font-weight: 700;
    color: #1a4fba;
}

.pag-card-header .fas {
    font-size: 13px;
}

.pag-card-header span:first-of-type {
    flex: 1;
}

.pag-card-badge {
    font-size: 11px;
    font-weight: 600;
    background: #e8eef9;
    color: #1a4fba;
    padding: 2px 8px;
    border-radius: 20px;
}

.pag-card-body {
    padding: 14px;
}

/* ══════════════════════════════════════════════════════════════
                         DÍAS DE SEMANA
   ══════════════════════════════════════════════════════════════ */
.pag-dias-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-bottom: 10px;
}

.pag-dia-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 4px;
    border-radius: 5px;
    border: 1.5px solid #e5e7eb;
    background: #ffffff;
    cursor: pointer;
    transition: all .15s;
    gap: 3px;
}

.pag-dia-btn:hover {
    border-color: #2d6ae0;
    background: #f0f4fb;
}

.pag-dia-btn.dia-active {
    background: #1a4fba;
    border-color: #1a4fba;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(26,79,186,.25);
}

.dia-inicial {
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
}

.dia-nombre {
    font-size: 9px;
    opacity: .75;
}

.pag-dias-shortcuts {
    display: flex;
    gap: 6px;
}

.pag-shortcut {
    padding: 3px 10px;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
    background: #f3f4f6;
    color: #374151;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.pag-shortcut:hover {
    background: #e8eef9;
    color: #1a4fba;
    border-color: #e8eef9;
}

/* ══════════════════════════════════════════════════════════════
                           HORARIOS
   ══════════════════════════════════════════════════════════════ */
.pag-add-btn {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: none;
    background: #1a4fba;
    color: #ffffff;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pag-add-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.pag-horarios-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.pag-horario-item {
    display: flex;
    align-items: center;
    background: #f3f4f6;
    border-radius: 5px;
    border: 1px solid #e5e7eb;
    padding: 8px 12px;
    gap: 12px;
    transition: opacity .15s;
}

.horario-inactivo {
    opacity: .55;
}

.pag-horario-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.pag-horario-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pag-time-input {
    border: 1.5px solid #e8eef9;
    border-radius: 5px;
    padding: 4px 8px;
    font-size: 15px;
    font-weight: 700;
    color: #1a4fba;
    background: #ffffff;
    width: 96px;
    font-family: 'Courier New', monospace;
}

.pag-time-input:focus {
    outline: none;
    border-color: #1a4fba;
}

.horario-label {
    font-size: 11px;
    color: #4b5563;
}

.badge-proximo {
    font-size: 10px;
    font-weight: 700;
    color: #1a4fba;
    background: #e8eef9;
    padding: 1px 7px;
    border-radius: 20px;
    margin-left: 6px;
}

.btn-del-horario {
    width: 26px;
    height: 26px;
    border-radius: 4px;
    border: none;
    background: #fef2f2;
    color: #dc2626;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-del-horario:hover {
    background: #dc2626;
    color: #ffffff;
}

.pag-empty-horarios {
    text-align: center;
    color: #9ca3af;
    padding: 20px;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pag-horarios-hint {
    font-size: 11px;
    color: #4b5563;
    background: #f0f4fb;
    padding: 8px 10px;
    border-radius: 5px;
    border: 1px solid #e8eef9;
}

.pag-horarios-hint .fas {
    color: #1a4fba;
    margin-right: 4px;
}

/* Toggle switch */
.pag-toggle {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    cursor: pointer;
}

.pag-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.pag-toggle-slider {
    position: absolute;
    inset: 0;
    background: #e5e7eb;
    border-radius: 20px;
    transition: .2s;
}

.pag-toggle-slider::before {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    left: 3px;
    top: 3px;
    background: #ffffff;
    border-radius: 50%;
    transition: .2s;
    box-shadow: 0 1px 2px rgba(0,0,0,.15);
}

.pag-toggle input:checked + .pag-toggle-slider {
    background: #1a4fba;
}

.pag-toggle input:checked + .pag-toggle-slider::before {
    transform: translateX(16px);
}

/* ══════════════════════════════════════════════════════════════
                           PARÁMETROS
   ══════════════════════════════════════════════════════════════ */
.pag-params-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.pag-param-full {
    grid-column: 1 / -1;
}

.pag-param-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.pag-param-label {
    font-size: 11px;
    font-weight: 600;
    color: #4b5563;
}

.pag-param-input-wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid #e5e7eb;
    border-radius: 5px;
    overflow: hidden;
    background: #ffffff;
}

.pag-param-input {
    border: none;
    outline: none;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    width: 70px;
    background: transparent;
}

.pag-param-unit {
    padding: 6px 8px;
    background: #f3f4f6;
    font-size: 11px;
    color: #4b5563;
    border-left: 1px solid #e5e7eb;
    white-space: nowrap;
}

.pag-param-select {
    border: 1.5px solid #e5e7eb;
    border-radius: 5px;
    padding: 6px 10px;
    font-size: 12px;
    color: #111827;
    background: #ffffff;
    width: 100%;
    outline: none;
}

.pag-param-select:focus {
    border-color: #1a4fba;
}

/* Filtro riesgo */
.pag-riesgo-filter {
    display: flex;
    gap: 6px;
}

.pag-riesgo-btn {
    flex: 1;
    padding: 5px 0;
    border-radius: 4px;
    border: 1.5px solid #e5e7eb;
    background: #f3f4f6;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s;
}

.riesgo-bajo {
    color: #16a34a;
}

.riesgo-medio {
    color: #1a4fba;
}

.riesgo-alto {
    color: #d97706;
}

.riesgo-critico {
    color: #dc2626;
}

.riesgo-bajo.riesgo-sel {
    background: #f0fdf4;
    border-color: #16a34a;
}

.riesgo-medio.riesgo-sel {
    background: #e8eef9;
    border-color: #1a4fba;
}

.riesgo-alto.riesgo-sel {
    background: #fffbeb;
    border-color: #d97706;
}

.riesgo-critico.riesgo-sel {
    background: #fef2f2;
    border-color: #dc2626;
}

.pag-toggle-row {
    flex-direction: row !important;
    align-items: center;
    justify-content: space-between;
    background: #f3f4f6;
    padding: 8px 12px;
    border-radius: 5px;
    border: 1px solid #e5e7eb;
}

/* ══════════════════════════════════════════════════════════════
                      ESTADO EN TIEMPO REAL
   ══════════════════════════════════════════════════════════════ */
.pag-card-status .pag-card-header .pag-card-badge {
    margin-left: auto;
}

.pag-status-dot-sm {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}

.status-active .pag-status-dot-sm {
    background: #16a34a;
}

.status-running .pag-status-dot-sm {
    background: #1a4fba;
    animation: pulse-blue 1s infinite;
}

.status-paused .pag-status-dot-sm {
    background: #d97706;
}

.status-error .pag-status-dot-sm {
    background: #dc2626;
}

/* Ejecución activa */
.pag-exec-progress {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pag-exec-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #1a4fba;
    font-weight: 600;
}

.pag-exec-time {
    font-family: monospace;
    font-size: 13px;
    color: #4b5563;
}

.pag-progress-bar {
    height: 6px;
    background: #e8eef9;
    border-radius: 3px;
    overflow: hidden;
}

.pag-progress-fill {
    height: 100%;
    background: #1a4fba;
    border-radius: 3px;
    transition: width .5s ease;
    animation: shimmer 1.5s infinite;
    background-size: 200% 100%;
    background-image: linear-gradient(90deg, #1a4fba 0%, #2d6ae0 50%, #1a4fba 100%);
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.pag-exec-stats {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #4b5563;
}

.text-green {
    color: #16a34a;
    font-weight: 700;
}

.text-red {
    color: #dc2626;
    font-weight: 700;
}

.pag-exec-log {
    background: #111827;
    border-radius: 5px;
    padding: 8px 10px;
    font-family: monospace;
    font-size: 11px;
    max-height: 90px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pag-log-line {
    display: flex;
    gap: 8px;
}

.log-time {
    color: #9ca3af;
    flex-shrink: 0;
}

.log-ok {
    color: #4ade80;
}

.log-err {
    color: #f87171;
}

.log-info {
    color: #93c5fd;
}

/* Sin ejecución */
.pag-next-exec {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    background: #f0f4fb;
    border-radius: 5px;
    border: 1px solid #e8eef9;
    margin-bottom: 12px;
}

.pag-next-icon {
    font-size: 28px;
    color: #1a4fba;
    flex-shrink: 0;
}

.pag-next-label {
    font-size: 11px;
    color: #4b5563;
    font-weight: 600;
}

.pag-next-time {
    font-size: 22px;
    font-weight: 700;
    color: #1a4fba;
    line-height: 1;
}

.pag-next-sub {
    font-size: 11px;
    color: #4b5563;
    margin-top: 2px;
}

/* Timeline del día */
.pag-timeline-day {
    margin-top: 4px;
}

.pag-timeline-title {
    font-size: 11px;
    font-weight: 700;
    color: #4b5563;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.pag-timeline-track {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.pag-timeline-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 60px;
    padding: 8px 6px;
    border-radius: 5px;
    border: 1px solid #e5e7eb;
    background: #f3f4f6;
    transition: all .15s;
}

.pag-tl-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #9ca3af;
}

.pag-tl-time {
    font-size: 12px;
    font-weight: 700;
    color: #374151;
}

.pag-tl-badge {
    font-size: 9px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    background: #e5e7eb;
    color: #4b5563;
}

.tl-done {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.tl-done .pag-tl-dot {
    background: #16a34a;
}

.tl-done .pag-tl-badge {
    background: #bbf7d0;
    color: #16a34a;
}

.tl-running {
    border-color: #e8eef9;
    background: #f0f4fb;
}

.tl-running .pag-tl-dot {
    background: #1a4fba;
    animation: pulse-blue 1s infinite;
}

.tl-running .pag-tl-badge {
    background: #e8eef9;
    color: #1a4fba;
}

.tl-pending {
    border-color: #e5e7eb;
}

.tl-pending .pag-tl-dot {
    background: #9ca3af;
}

.pag-no-timeline {
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
    width: 100%;
    padding: 10px;
}

/* ══════════════════════════════════════════════════════════════
                           HISTORIAL
   ══════════════════════════════════════════════════════════════ */
.pag-link-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: #1a4fba;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.pag-link-btn:hover {
    text-decoration: underline;
}

.pag-historial-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 14px;
}

.pag-historial-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 5px;
    border: 1px solid #e5e7eb;
    background: #f3f4f6;
}

.pag-hist-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

.hist-icon-green {
    background: #f0fdf4;
    color: #16a34a;
}

.hist-icon-red {
    background: #fef2f2;
    color: #dc2626;
}

.hist-icon-blue {
    background: #e8eef9;
    color: #1a4fba;
}

.hist-icon-gray {
    background: #e5e7eb;
    color: #4b5563;
}

.pag-hist-body {
    flex: 1;
}

.pag-hist-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.pag-hist-fecha {
    font-size: 12px;
    font-weight: 600;
    color: #111827;
}

.pag-hist-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
}

.badge-completado {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.badge-fallido {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.badge-ejecutando {
    background: #e8eef9;
    color: #1a4fba;
    border: 1px solid #bfcfef;
}

.pag-hist-stats {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: #4b5563;
}

.pag-hist-stats .fas {
    margin-right: 3px;
}

.pag-empty-msg {
    text-align: center;
    color: #9ca3af;
    padding: 24px;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

.pag-empty-msg .fas {
    font-size: 24px;
}

/* ══════════════════════════════════════════════════════════════
                         CHART BARRAS
   ══════════════════════════════════════════════════════════════ */
.pag-chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 80px;
    margin-bottom: 8px;
}

.pag-bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    height: 100%;
}

.pag-bar-wrap {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.pag-bar-fill {
    width: 70%;
    min-height: 4px;
    border-radius: 3px 3px 0 0;
    background: #e5e7eb;
    transition: height .4s ease;
}

.pag-bar-fill.bar-active {
    background: #1a4fba;
}

.pag-bar-label {
    font-size: 10px;
    color: #4b5563;
}

.pag-bar-val {
    font-size: 10px;
    font-weight: 700;
    color: #111827;
}

.pag-chart-legend {
    display: flex;
    gap: 14px;
    font-size: 11px;
    color: #4b5563;
}

.legend-blue {
    color: #1a4fba;
    font-weight: 600;
}

.legend-red {
    color: #dc2626;
    font-weight: 600;
}

/* ══════════════════════════════════════════════════════════════
                           SPINNERS
   ══════════════════════════════════════════════════════════════ */
.pag-spinner-sm {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ══════════════════════════════════════════════════════════════
                            TOAST
   ══════════════════════════════════════════════════════════════ */
.pag-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0,0,0,.15);
    z-index: var(--z-toast);
    animation: slide-in .25s ease;
    max-width: 340px;
}

@keyframes slide-in {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.toast-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.toast-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.toast-warning {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
}

.toast-info {
    background: #e8eef9;
    color: #1a4fba;
    border: 1px solid #bfcfef;
}

.pag-toast .fas {
    font-size: 16px;
}

/* ══════════════════════════════════════════════════════════════
                          RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
    .pag-grid {
        grid-template-columns: 1fr;
    }
    .pag-kpi-strip {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 680px) {
    .root {
        padding: 10px 10px 24px;
    }
    .pag-kpi-strip {
        grid-template-columns: repeat(2, 1fr);
    }
    .pag-dias-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .pag-params-grid {
        grid-template-columns: 1fr;
    }
    .pag-riesgo-filter {
        flex-wrap: wrap;
    }
    .pag-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
/* ══ OVERLAY ══════════════════════════════════════════════════ */
.mag-overlay {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.52);
backdrop-filter: blur(3px);
z-index: var(--z-modal);
display: flex;
align-items: center;
justify-content: center;
padding: 16px;
animation: mag-fade-in 0.18s ease;
}

@keyframes mag-fade-in {
from {
    opacity: 0
}

to {
    opacity: 1
}
}

/* ══ MODAL ════════════════════════════════════════════════════ */
.mag-modal {
background: #fff;
border-radius: 13px;
width: min(96vw, 1020px);
max-height: min(94vh, 840px);
padding:35px;
overflow-y:auto;
display: flex;
flex-direction: column;
box-shadow: 0 28px 70px rgba(15, 52, 148, 0.22), 0 6px 20px rgba(0,0,0,0.12);
/* overflow: hidden; */
animation: mag-slide-up 0.22s cubic-bezier(.22,.68,0,1.2);
}

@keyframes mag-slide-up {
from {
    transform: translateY(28px);
    opacity: 0
}

to {
    transform: translateY(0);
    opacity: 1
}
}
