/* VULPSEC GLOBAL THEME - ORANGE & DARK */
:root {
    --vulp-orange: #FB923C;
    --vulp-dark-bg: #0d1117;
    --vulp-card-bg: #161b22;
    --vulp-input-bg: #010409;
    --vulp-border: #30363d;
    --vulp-text-main: #c9d1d9;
    --vulp-text-muted: #8b949e;
    --vulp-purple: #a855f7; /* tailwind purple-500 */
}

/* Base Body Overrides */
body {
    background-color: var(--vulp-dark-bg) !important;
    color: var(--vulp-text-main) !important;
}

/* Dashboard Cards - Forced Dark */
.card {
    background-color: var(--vulp-card-bg) !important;
    color: var(--vulp-text-main) !important;
    border: 1px solid var(--vulp-border) !important;
}

.card-title, h1, h2, h3, h4, h5 {
    color: var(--vulp-orange) !important;
}

.card-text {
    color: var(--vulp-text-muted) !important;
}

/* Navbars & Dropdowns */
.navbar {
    background-color: #010409 !important; /* Un tono más oscuro que el fondo */
    border-bottom: 2px solid var(--vulp-orange) !important; /* Línea naranja de acento */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5); /* Sombra para dar profundidad */
}

.navbar-brand {
    color: var(--vulp-orange) !important;
}

/* Efecto de brillo suave también en el logo al pasar el ratón */
.vulp-logo-img {
    transition: filter 0.3s ease;
}

/* Estilo base del rectángulo del nombre */
.vulp-brand-box {
    border-color: var(--vulp-orange) !important;
    color: var(--vulp-orange);
    letter-spacing: 1px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Efecto Hover Intenso (Vulpine Glow) */
.navbar-brand:hover .vulp-brand-box {
    background-color: rgba(251, 146, 60, 0.2) !important;
    color: #ffffff !important;
    box-shadow: 0 0 15px rgba(251, 146, 60, 0.6), 
                inset 0 0 10px rgba(251, 146, 60, 0.4);
    transform: scale(1.05);
    border-color: #ffffff !important;
}

.navbar-brand:hover .vulp-logo-img {
    filter: drop-shadow(0 0 8px rgba(251, 146, 60, 0.8));
}

.dropdown-menu {
    background-color: var(--vulp-card-bg) !important;
    border: 1px solid var(--vulp-border) !important;
}

.dropdown-item {
    color: var(--vulp-text-main) !important;
}

.dropdown-item:hover {
    background-color: var(--vulp-border) !important;
    color: var(--vulp-orange) !important;
}

/* Buttons */
.btn-info, .btn-primary {
    background-color: var(--vulp-orange) !important;
    border-color: var(--vulp-orange) !important;
    color: #000000 !important;
    font-weight: bold;
}

.btn-outline-primary, .btn-outline-info {
    color: var(--vulp-orange) !important;
    border-color: var(--vulp-orange) !important;
}

.btn-outline-primary:hover, .btn-outline-info:hover {
    background-color: var(--vulp-orange) !important;
    color: #000000 !important;
}

/* Badges & Tags */
.badge {
    font-weight: 500;
}

.badge.bg-dark {
    background-color: var(--vulp-input-bg) !important;
    border: 1px solid var(--vulp-orange) !important;
    color: var(--vulp-orange) !important;
}

.table {
    color: #c9d1d9 !important; /* Texto gris claro/blanco */
}

.table td, .table th {
    border-color: #30363d !important;
}

/* Forzar que el texto con clase .text-muted en tablas NO sea negro */
.table .text-muted {
    color: #8b949e !important; 
}

/* 3. Corregir cabeceras de Threat Intelligence */
.bg-info {
    background-color: var(--vulp-orange) !important; /* De azul a Naranja Vulpini */
    color: #000000 !important; /* Texto negro para contraste sobre naranja */
}

/* 4. Estilo de los items de la lista en detalles */
.list-group-item {
    background-color: transparent !important;
    color: #c9d1d9 !important;
    border-color: #30363d !important;
}

/* Generic Utilities */
.text-info {
    color: var(--vulp-orange) !important;
}

.text-white-50 {
    color: var(--vulp-text-muted) !important;
}

.text-purple { color: var(--vulp-purple) !important; }
.bg-purple-subtle { background-color: rgba(168, 85, 247, 0.1) !important; }
.border-purple-subtle { border-color: rgba(168, 85, 247, 0.25) !important; }

/* Breadcrumbs */
.breadcrumb-item + .breadcrumb-item::before {
    color: var(--vulp-text-muted);
}

.breadcrumb-item a {
    color: var(--vulp-orange);
    text-decoration: none;
}

/* Estilo general para todas las alertas flash */
.alert {
    background-color: #1c2128 !important; /* Fondo gris oscuro tipo terminal */
    color: #f0f6fc !important;
    border: 1px solid #30363d !important;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.alert-warning {
    border-left: 5px solid var(--vulp-orange) !important; /* Línea naranja gruesa */
    background-color: rgba(251, 146, 60, 0.05) !important; /* Brillo naranja de fondo */
}

/* Iconos o botones de cierre dentro de la alerta */
.btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.8;
}

.btn-close-white:hover {
    opacity: 1;
}

.card-body h5.text-muted, 
.card-body .text-muted.border-bottom {
    color: var(--vulp-orange) !important; /* Cambiamos a Naranja Vulpini */
    opacity: 1 !important; /* Eliminamos la transparencia de Bootstrap */
    font-weight: bold !important;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* El contenido lead debajo del título (el análisis técnico en sí) */
.card-body p.lead {
    color: #f0f6fc !important; /* Blanco hueso para lectura cómoda */
}

/* En el dashboard, las descripciones cortas */
.card-text.text-muted {
    color: #8b949e !important; /* Gris claro */
    opacity: 1 !important;
}

/* dashboard.html */
/* Forzar visibilidad del texto en los inputs dinámicos */
    .suggest-input, .date-input-trigger {
        background: transparent !important;
        color: white !important;
        border: none !important;
        outline: none !important;
        font-size: 0.85rem;
        width: 100%;
    }

    /* El dropdown de sugerencias con scroll */
    .autocomplete-dropdown {
        position: absolute;
        top: 100%;
        left: 0;
        width: 250px;
        max-height: 200px;
        overflow-y: auto;
        background-color: #161b22 !important; /* var(--vulp-card-bg) */
        border: 1px solid #fb923c !important; /* var(--vulp-orange) */
        z-index: 9999;
        border-radius: 4px;
        box-shadow: 0 10px 25px rgba(0,0,0,0.8);
    }

    .suggest-item {
        padding: 10px 15px;
        cursor: pointer;
        color: #c9d1d9;
        border-bottom: 1px solid #30363d;
        font-size: 0.85rem;
    }

    .suggest-item:hover {
        background-color: #fb923c !important;
        color: #000000 !important;
    }

    .autocomplete-dropdown::-webkit-scrollbar { width: 6px; }
    .autocomplete-dropdown::-webkit-scrollbar-thumb { background: #fb923c; border-radius: 10px; }

/* Forzar esquema oscuro en inputs de fecha */
input[type="date"] {
    color-scheme: dark; /* Hace que el selector nativo sea oscuro */
    color: white !important;
}

/* Ajuste del icono del calendario para que sea visible */
.date-input-trigger::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
    opacity: 0.7;
}

.date-input-trigger::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}


.x-small { font-size: 0.75rem; }
/* Scrollbar fino para observables */
.bg-black { background-color: #000000 !important; }
.text-white-50 { color: rgba(255, 255, 255, 0.6) !important; }
.italic { font-style: italic; }
.x-small { font-size: 0.7rem; }

/* Estilo para los cuadros de texto legal tipo Terminal */
.font-monospace {
    font-family: 'Courier New', Courier, monospace !important;
}

/* Scrollbar personalizado para que no se vea el gris feo de Windows */
.custom-scrollbar::-webkit-scrollbar { width: 5px; }
.custom-scrollbar::-webkit-scrollbar-track { background: #000; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #333; border-radius: 10px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: #FB923C; }

.spin { animation: rotation 2s infinite linear; display: inline-block; }
@keyframes rotation { from { transform: rotate(0deg); } to { transform: rotate(359deg); } }

/* Correcciones de legibilidad VulpSec */
pre {
    color: #e6edf3 !important; /* Blanco azulado tipo GitHub */
    margin: 0;
}

/* Scrollbar para que se vea en el fondo negro */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #000;
}
::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #FB923C;
}

/* Forzar color en etiquetas de formulario */
.form-check-label {
    color: #ffffff !important;
    cursor: pointer;
}

.form-control {
    background-color: #010409 !important; /* negro vulpsec */
    color: #ffffff !important;
    border: 1px solid #30363d !important;
}



/* Mejora de contraste para textos secundarios en zonas oscuras */
.card-body .text-muted, 
.list-group-item .text-muted {
    color: rgba(255, 255, 255, 0.5) !important; /* Forzamos un gris claro legible */
}

/* Específicamente para la fecha de las fuentes */
.source-ref-item .text-muted {
    color: #a0a0a0 !important; 
}

/* 1. Texto de Marcador de Posición (Placeholder) */
.form-control::placeholder {
    color: rgba(255, 255, 255, 0.7) !important; /* Blanco con 70% de opacidad para máximo contraste */
    opacity: 1 !important; /* Forzar opacidad total en Firefox */
}

/* 2. Etiquetas de los campos (Labels) */
.form-label, .modal-body label {
    color: rgba(255, 255, 255, 0.9) !important; /* Casi blanco para las instrucciones */
    text-shadow: 0px 1px 2px rgba(0,0,0,0.5);
}

/* 3. Estilo al enfocar el cuadro de texto */
.form-control:focus {
    background-color: #000000 !important;
    color: #ffffff !important;
}


/* 4. Forzar color en navegadores que usan autocompletado */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-text-fill-color: white !important;
    -webkit-box-shadow: 0 0 0px 1000px #1a1a1a inset !important;
}

.hover-underline:hover { text-decoration: underline !important; }





/* Corrección de legibilidad en Charts */
canvas {
    max-height: 250px !important; /* Evita que las gráficas crezcan infinito */
    margin-bottom: 10px;
}

/* Forzar que jsVectorMap use colores CTI */
.jvm-tooltip {
    background: #161b22 !important;
    border: 1px solid #fb923c !important;
    color: #c9d1d9 !important;
    font-family: 'Segoe UI', sans-serif;
}

/* Colores Cyberpunk para los KPIs */
#kpi-total { color: var(--vulp-orange) !important; text-shadow: 0 0 10px rgba(251, 146, 60, 0.3); } 
#kpi-campaigns { color: #20c997 !important; text-shadow: 0 0 10px rgba(32, 201, 151, 0.3); }
#kpi-top-apt { color: #dc3545 !important; }
/* Top malware en Morado Cyberpunk */
#kpi-top-malware { color: #9933ff !important; text-shadow: 0 0 10px rgba(153, 51, 255, 0.3); }

.alert-danger {
    border-left: 5px solid #dc3545 !important;
    background-color: rgba(220, 53, 69, 0.08) !important;
    color: #f8d7da !important;
    border-top: 1px solid #30363d !important;
    border-right: 1px solid #30363d !important;
    border-bottom: 1px solid #30363d !important;
}

.alert-danger strong, .alert-danger i {
    color: #ff6b6b !important;
}

.bg-warning.bg-opacity-10 {
    animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
    0% { border-color: rgba(255, 193, 7, 0.25); }
    50% { border-color: rgba(255, 193, 7, 0.6); }
    100% { border-color: rgba(255, 193, 7, 0.25); }
}

.pulse-warning {
    animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
    0% { box-shadow: 0 0 0 0px rgba(255, 193, 7, 0.7); }
    70% { box-shadow: 0 0 0 5px rgba(255, 193, 7, 0); }
    100% { box-shadow: 0 0 0 0px rgba(255, 193, 7, 0); }
}

.vulp-alert-bubble {
        position: absolute;
        bottom: 100%; /* Lo empuja justo encima del podcast */
        right: 10px;  /* Alineado un poco a la derecha */
        margin-bottom: 8px; /* Separación entre la burbuja y el widget */
        z-index: 100;
        transform: translateY(10px) scale(0.95);
        opacity: 0;
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        pointer-events: none; /* Para que los clics pasen a través si está oculta */
    }

.vulp-alert-bubble.show {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.vulp-alert-content {
    background-color: #161b22;
    border: 1px solid #30363d;
    border-bottom: 3px solid #0dcaf0; /* Línea Cyan apuntando al widget */
    border-radius: 6px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.6);
    position: relative;
}

/* El "piquito" (triángulo) que apunta hacia abajo */
.vulp-alert-content::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 15px;
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: #0dcaf0 transparent transparent transparent;
}

/* Botón de cierre */
.vulp-alert-close {
    position: absolute;
    top: 2px;
    right: 4px;
    background: none;
    border: none;
    color: #8b949e;
    font-size: 1.2rem;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    transition: color 0.2s;
}

.vulp-alert-close:hover {
    color: #fb923c;
}

/* --- VULPSEC TIMELINE --- */
.vulp-timeline {
    border-left: 2px solid var(--vulp-purple);
    padding-left: 1.5rem;
    position: relative;
    margin-left: 0.5rem;
}

.vulp-timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.vulp-timeline-item:last-child {
    margin-bottom: 0;
}

.vulp-timeline-item::before {
    content: '';
    position: absolute;
    left: -1.85rem; /* Ajustado para centrar con el borde */
    top: 0.2rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--vulp-orange);
    border: 2px solid var(--vulp-dark-bg);
}

.vulp-timeline-date {
    font-size: 0.85rem;
    color: var(--vulp-orange);
    font-weight: 700;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vulp-timeline-desc {
    font-size: 0.9rem;
    color: var(--vulp-text-main);
    line-height: 1.4;
}