﻿

.predictive-dialog {
    backdrop-filter: blur(12px) saturate(150%);
    background-color: rgba(13, 17, 23, 0.8);
    border-radius: 18px;
}

    .predictive-dialog .mud-dialog-content {
        background: linear-gradient(135deg, #0d1117 0%, #1c1f26 100%);
        color: #e4e6eb;
        padding: 20px;
        border-radius: 0 !important;
        border-top-left-radius: 0 !important;
        border-top-right-radius: 0 !important;
        box-shadow: 0 0 25px rgba(59,130,246,0.3);
        min-height: 80vh;
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255,255,255,0.05);
    }

.predictive-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 10px;
    color: #E4E6EB;
    background: radial-gradient(circle at top left, #0D1117, #0B0F13 80%);
    border-radius: 18px;
    box-shadow: 0 0 30px rgba(0,0,0,0.4);
    overflow: hidden;
}


/* Cabecera */
.predictive-header .glow-title {
    color: #3B82F6;
    text-shadow: 0 0 10px rgba(59,130,246,0.8);
    font-weight: 600;
}

.predictive-header .subtitle {
    opacity: .8;
    margin-top: 4px;
}

/* Grid */
.predictive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* Tarjetas */
.predictive-dialog .glass-card {
    background: linear-gradient(145deg, rgba(30,35,50,.85), rgba(18,22,30,.9));
    border-radius: 16px;
    padding: 20px;
    box-shadow: inset 0 0 20px rgba(59,130,246,.1);
    border: 1px solid rgba(255,255,255,.08);
    transition: all .3s ease;
}

    .predictive-dialog .glass-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(59,130,246,.25);
    }

    .predictive-dialog .glass-card.wide {
        grid-column: span 2;
    }

/* Texto KPI */
.predictive-dialog .metric-title {
    font-size: .9rem;
    opacity: .8;
    text-transform: uppercase;
    letter-spacing: .03rem;
}

.predictive-dialog .metric-value {
    font-size: 2rem;
    font-weight: 600;
    margin-top: 4px;
}

    .predictive-dialog .metric-value.accent {
        color: #8B5CF6;
        text-shadow: 0 0 10px rgba(139,92,246,.5);
    }

/* Mapa placeholder */
.predictive-dialog .map-placeholder {
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255,255,255,.03);
    font-size: 1.4rem;
    color: rgba(255,255,255,.4);
    text-shadow: 0 0 8px rgba(59,130,246,.3);
}

/* Botón flotante */
.predictive-dialog .predictor-orb {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #3B82F6, #8B5CF6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 0 25px rgba(139,92,246,.6);
    cursor: pointer;
    transition: all .25s ease;
    animation: orbPulse 3s infinite;
}

    .predictive-dialog .predictor-orb:hover {
        transform: scale(1.1);
        box-shadow: 0 0 45px rgba(59,130,246,.9);
    }

@keyframes orbPulse {
    0%,100% {
        transform: scale(1)
    }

    50% {
        transform: scale(1.05)
    }
}

.predictive-dialog .mud-dialog .mud-dialog-content {
    margin: 0 !important;
}


.predictive-dialog .header-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
}

.predictive-dialog .glow-button {
    background: linear-gradient(90deg, #3B82F6, #8B5CF6);
    color: white;
    font-weight: 600;
    border-radius: 8px;
    padding: 8px 20px;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
    transition: all 0.3s ease;
}

    .predictive-dialog .glow-button:hover {
        transform: translateY(-1px);
        box-shadow: 0 0 30px rgba(139, 92, 246, 0.6);
    }


.predictive-dialog .predictive-grid-advanced {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(180px, auto);
    gap: 24px;
    padding: 5px 5px;
}

.predictive-dialog .kpi-card, .predictive-dialog .panel-large, .predictive-dialog .panel-wide, .panel-2-3 {
    background: rgba(18, 25, 38, 0.8);
    border-radius: 16px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    padding: 20px;
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.predictive-dialog .metric-title {
    color: #9CA3AF;
    font-weight: 500;
    margin-bottom: 8px;
}

.predictive-dialog .metric-value {
    color: #E4E6EB;
    font-weight: 700;
}

    .predictive-dialog .metric-value.glow {
        text-shadow: 0 0 10px rgba(59, 130, 246, 0.6);
    }

    .predictive-dialog .metric-value.accent {
        color: #8B5CF6;
    }

    .predictive-dialog .metric-value.warning {
        color: #F59E0B;
    }

.predictive-dialog .panel-large {
    grid-column: span 1;
    min-height: 300px;
}

.predictive-dialog .panel-2-3 {
    grid-column: span 2;
    min-height: 360px;
}

.predictive-dialog .panel-wide {
    grid-column: span 3;
    min-height: 360px;
}


.predictive-dialog .mud-progress-linear .mud-progress-linear-bar {
    box-shadow: 0 0 10px rgba(59,130,246,0.6);
    transition: all 0.4s ease;
}


.predictive-dialog .trend-up {
    color: #4ade80; /* verde neon suave */
    font-weight: 500;
}

.predictive-dialog .trend-down {
    color: #f87171; /* rojo pastel */
    font-weight: 500;
}

.predictive-dialog .trend-neutral {
    color: #cbd5e1;
}

.predictive-dialog .metric-value {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    letter-spacing: 0.5px;
}

.predictive-dialog .metric-sub {
    margin-top: 8px;
    opacity: 0.9;
}

.predictive-dialog .stock-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    transition: all 0.3s ease;
    padding: 1rem;
    border-radius: 14px;
    position: relative;
}

    .predictive-dialog .stock-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 4px 20px rgba(0, 255, 255, 0.08);
    }

.predictive-dialog .stock-value {
    color: #ffcc70;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 0 10px rgba(255, 204, 112, 0.6);
}

.predictive-dialog .stock-bar {
    height: 6px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
}

.predictive-dialog .trend-comment {
    opacity: 0.8;
    font-style: italic;
    margin-top: 4px;
}

.predictive-dialog .text-danger {
    color: #ff6b6b;
    font-weight: 600;
}

.predictive-dialog .text-info {
    color: #58b4ff;
    font-weight: 600;
}

.predictive-dialog .alerta-pulso::before {
    content: "";
    position: absolute;
    top: -15%;
    left: -15%;
    width: 130%;
    height: 130%;
    background: radial-gradient(circle, rgba(255, 90, 90, 0.35) 0%, transparent 70%);
    border-radius: 16px;
    animation: pulsoCritico 2.2s infinite ease-out;
    z-index: 0;
}

@keyframes pulsoCritico {
    0% {
        transform: scale(0.8);
        opacity: 0.8;
    }

    70% {
        transform: scale(1.3);
        opacity: 0;
    }

    100% {
        transform: scale(0.8);
        opacity: 0;
    }
}


/* hace que el bloque ocupe el ancho completo del grid */
.predictive-dialog .panel-full {
    grid-column: 1 / -1;
}

/* tarjetita con el look oscuro del resto del diálogo */
.predictive-dialog .forecast-container {
    background: rgba(18,18,28,0.95);
    border-radius: 16px;
    backdrop-filter: blur(12px);
    box-shadow: 0 0 30px rgba(0,150,255,0.18);
    padding: 1rem 1.25rem;
}

/* si ya tienes glow-title, perfecto; esto por si faltaba */
.predictive-dialog .glow-title {
    color: #5bc0ff;
    text-shadow: 0 0 10px rgba(91,192,255,.7);
}

/* altura del chart ya se fija inline, pero por si prefieres clase */
.predictive-dialog .forecast-chart {
    width: 100%;
}

/* Ajusta el tamaño y proporciones de las cards de eventos */
.predictive-dialog .event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); /* más anchas */
    gap: 1.5rem;
    width: 100%;
}

.predictive-dialog .event-card {
    min-width: 220px;
    min-height: 160px;
    background-color: rgba(20, 24, 36, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(91, 192, 255, 0.1);
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.35);
}

/* Alinea los textos dentro de cada card */
.predictive-dialog .event-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: #aab4ff;
}

.predictive-dialog .event-date {
    color: #bfc8e6;
    font-size: 0.9rem;
}

.predictive-dialog .event-impact {
    font-weight: 600;
    font-size: 1rem;
    margin-top: 0.5rem;
}

.predictive-dialog .text-success {
    color: #00c896;
}

.predictive-dialog .text-error {
    color: #ff4f6d;
}


/* Corrige MudPaper dentro de los eventos */
.predictive-dialog .event-card.mud-paper {
    background-color: rgba(20, 24, 36, 0.85) !important;
    color: var(--mud-palette-text-primary) !important;
    box-shadow: 0 0 15px rgba(91,192,255,0.08);
    border: 1px solid rgba(255,255,255,0.06);
}


/* Fondo del header y título del MudDialog */
.predictive-dialog .mud-dialog-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.4rem !important;
    font-weight: 600;
    color: #7dd3fc;
    background: linear-gradient(90deg, rgba(11,18,30,0.95), rgba(25,35,55,0.9));
    text-shadow: 0 0 12px rgba(59,130,246,0.6);
    border-bottom: 1px solid rgba(59,130,246,0.2);
    padding: 16px 28px;
    box-shadow: inset 0 -2px 10px rgba(59,130,246,0.15);
}

    /* Ícono de cierre más integrado */
    .predictive-dialog .mud-dialog-title .mud-icon-button {
        color: #93c5fd;
        transition: all 0.25s ease;
    }

        .predictive-dialog .mud-dialog-title .mud-icon-button:hover {
            color: #38bdf8;
            transform: rotate(90deg);
        }

/* Elimina el fondo blanco general del diálogo */
.predictive-dialog .mud-dialog {
    background: transparent;
}

/* Ajusta el contenedor principal del diálogo */
.predictive-dialog .mud-dialog-container {
    background: linear-gradient(180deg, rgba(13,15,25,0.95), rgba(10,12,20,0.9));
    box-shadow: 0 0 25px rgba(139,92,246,0.3);
    border-radius: 12px;
}

/* Ajusta el botón de cierre */
.predictive-dialog .mud-dialog-title .mud-icon-button {
    color: #a5b4fc;
    transition: color 0.2s ease;
}

    .predictive-dialog .mud-dialog-title .mud-icon-button:hover {
        color: #60a5fa;
    }
