:root {
    /* Sistema de colores moderno */
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #eef2ff;
    --success: #10b981;
    --success-dark: #059669;
    --danger: #ef4444;
    --danger-dark: #dc2626;
    --warning: #f59e0b;
    --info: #3b82f6;
    
    /* Sistema de grises */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Sistema de sombras */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    /* Sistema de bordes */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    
    /* Espaciado */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Cards modernas */
.card {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--gray-200);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Botones modernos */
.btn-primary {
    background: var(--primary);
    color: white;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius);
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: white;
    color: var(--gray-700);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius);
    font-weight: 500;
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--gray-50);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
    border-color: var(--gray-300);
}

/* Navegación inferior moderna */
.bottom-nav {
    background: white;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    padding: var(--space-3) 0;
    box-shadow: 0 -1px 3px rgba(0,0,0,0.1);
    backdrop-filter: blur(8px);
    background-color: rgba(255, 255, 255, 0.9);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--gray-500);
    font-size: 0.75rem;
    transition: all 0.3s ease;
    padding: var(--space-2);
    border-radius: var(--radius);
}

.nav-item:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.nav-item.active {
    color: var(--primary);
    background: var(--primary-light);
}

.nav-icon {
    font-size: 1.25rem;
    margin-bottom: var(--space-1);
}

/* Notificaciones modernas - máxima prioridad visual */
.notification {
    position: fixed !important;
    top: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    padding: 16px 20px !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
    display: flex !important;
    align-items: center !important;
    z-index: 999998 !important; /* Por encima de todo excepto modales */
    max-width: 90% !important;
    min-width: 300px !important;
    backdrop-filter: blur(8px) !important;
    border: 1px solid var(--gray-200) !important;
    animation: slideDownNotification 0.3s ease-out !important;
    pointer-events: auto !important;
}

@keyframes slideDownNotification {
    from {
        transform: translate(-50%, -100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* Responsive para notificaciones en móvil */
@media (max-width: 768px) {
    .notification {
        left: 10px !important;
        right: 10px !important;
        transform: none !important;
        max-width: none !important;
        min-width: auto !important;
        width: calc(100% - 20px) !important;
    }
    
    @keyframes slideDownNotification {
        from {
            transform: translateY(-100%);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
}

.notification.success { 
    border-left: 4px solid var(--success);
    background: linear-gradient(to right, rgba(16, 185, 129, 0.1), white);
}

.notification.error { 
    border-left: 4px solid var(--danger);
    background: linear-gradient(to right, rgba(239, 68, 68, 0.1), white);
}

.notification.info { 
    border-left: 4px solid var(--info);
    background: linear-gradient(to right, rgba(59, 130, 246, 0.1), white);
}

/* Indicador de estado */
.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--danger);
    display: inline-block;
    margin-right: var(--space-2);
    position: relative;
}

.live-dot::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--danger);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

.live-dot.inactive {
    background: var(--gray-400);
}

.live-dot.inactive::after {
    display: none;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
}

.notification.success { border-left: 4px solid var(--success); }
.notification.error { border-left: 4px solid var(--danger); }
.notification.info { border-left: 4px solid var(--primary); } 

/* ===== ESTILOS DEL DASHBOARD ===== */
/* Fondo y estructura consistente para todas las páginas del dashboard */
body {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
    padding-top: 0;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(79, 70, 229, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Header fijo para todas las páginas del dashboard */
header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    background-color: white !important;
    border-bottom: 1px solid #e5e7eb !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

/* Contenedor principal del dashboard */
.dashboard-container {
    margin-top: 60px;
    min-height: calc(100vh - 160px);
    overflow-y: auto;
    padding-bottom: 80px;
    padding-top: 2rem; /* 32px de espacio entre navbar y contenido */
}

/* Asegurar altura consistente del header */
header {
    height: 60px !important;
    min-height: 60px !important;
    display: flex !important;
    align-items: center !important;
}

/* Las notificaciones ya tienen z-index: 999998 definido arriba */

