/* =================================================================
   SIGEIM - Alertas Page Styles
   Archivo: alertas.css
   Estilo: Minimalista con fondo blanco
   ================================================================= */

* {
    font-family: 'Montserrat', 'Segoe UI', system-ui, sans-serif;
}

body {
    background: #ffffff;
    min-height: 100vh;
    color: #1a1a1a;
}

/* Header minimalista */
header {
    background: linear-gradient(135deg, #1B3A5C 0%, #2E6BA6 100%) !important;
    border-bottom: none !important;
}

.alerta-card {
    transition: all 0.3s ease;
    animation: fadeIn 0.4s ease-out;
    background: #ffffff !important;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.alerta-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #1B3A5C 0%, #2E6BA6 100%);
}

.alerta-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    border-color: #1B3A5C;
    box-shadow: 0 12px 30px rgba(27, 58, 92, 0.12);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.alerta-critical {
    border: 2px solid #fecaca !important;
    background: linear-gradient(to bottom, #fff5f5 0%, #ffffff 100%) !important;
}

.alerta-critical::before {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.alerta-critical:hover {
    border-color: #dc2626 !important;
    box-shadow: 0 12px 30px rgba(220, 38, 38, 0.15);
}

.alerta-high {
    border: 2px solid #fed7aa !important;
    background: linear-gradient(to bottom, #fffbeb 0%, #ffffff 100%) !important;
}

.alerta-high::before {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.alerta-high:hover {
    border-color: #f59e0b !important;
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.15);
}

.alerta-normal {
    border: 2px solid #bbf7d0 !important;
    background: linear-gradient(to bottom, #f0fdf4 0%, #ffffff 100%) !important;
}

.alerta-normal::before {
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
}

.alerta-normal:hover {
    border-color: #16a34a !important;
    box-shadow: 0 12px 30px rgba(22, 163, 74, 0.15);
}

/* Texto en modo claro */
.alerta-card h3 {
    color: #1a1a1a !important;
    font-weight: 700 !important;
}

.alerta-card p {
    color: #4b5563 !important;
}

.alerta-card .text-gray-400,
.alerta-card .text-sm {
    color: #6b7280 !important;
}

.live-dot {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

.carousel-dot {
    transition: all 0.3s ease;
    background: #d1d5db;
}

.carousel-dot.active {
    width: 20px;
    background: #1B3A5C;
}

.col-btn {
    transition: all 0.2s ease;
    color: white;
}

.col-btn.active {
    background: white;
    color: #1e293b;
}

select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.4rem center;
    background-repeat: no-repeat;
    background-size: 1.2em 1.2em;
    padding-right: 2rem;
}

/* Footer minimalista */
footer {
    background: #f9fafb !important;
    border-top: 1px solid #e5e7eb;
}

footer span {
    color: #6b7280 !important;
}

/* Contenedor principal */
.container {
    background: transparent;
}

/* Grid de alertas */
#alertasGrid {
    background: transparent;
}

/* Scrollbar minimalista */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* =================================================================
   RESPONSIVE — Mobile
   ================================================================= */
@media (max-width: 768px) {
    /* Filter row: stack vertically */
    .flex.gap-3,
    .flex.gap-4,
    .flex.items-center.gap-3 {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    /* Filter selects: full width */
    .flex.gap-3 select,
    .flex.gap-4 select {
        width: 100% !important;
        min-width: 0 !important;
    }

    /* Alert cards grid: single column */
    .grid.grid-cols-1.md\:grid-cols-2,
    .grid.md\:grid-cols-2 {
        grid-template-columns: 1fr !important;
    }

    /* Container padding */
    .container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    /* Column toggle btns */
    .col-btn {
        font-size: 0.7rem;
        padding: 4px 8px;
    }

    /* Header text */
    header .text-2xl,
    header .text-xl {
        font-size: 1.1rem !important;
    }

    /* SweetAlert modals */
    .swal2-popup {
        width: 95vw !important;
        max-width: 95vw !important;
    }
}

@media (max-width: 480px) {
    .alerta-card {
        border-radius: 12px;
    }

    .alerta-card h3 {
        font-size: 0.9rem !important;
    }
}