/* Estilos específicos del dashboard */
.dashboard-container {
    background: linear-gradient(135deg, var(--primary-bg) 0%, var(--secondary-bg) 50%, var(--accent-bg) 100%);
    background-attachment: fixed;
    min-height: 100vh;
    transition: var(--transition);
}

/* Animaciones mejoradas */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.6);
    }
}

.entry-row {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    animation-fill-mode: both;
}

.entry-row:nth-child(1) { animation-delay: 0.1s; }
.entry-row:nth-child(2) { animation-delay: 0.2s; }
.entry-row:nth-child(3) { animation-delay: 0.3s; }
.entry-row:nth-child(4) { animation-delay: 0.4s; }
.entry-row:nth-child(5) { animation-delay: 0.5s; }

.entry-expanded {
    animation: scaleIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Estados de hover mejorados */
.entry-row:hover,
.entry-expanded:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    border-color: rgba(102, 126, 234, 0.4);
}

.entry-row:hover::before,
.entry-expanded:hover::before {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(102, 126, 234, 0.05) 100%);
}

/* Indicadores de estado mejorados */
.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    position: relative;
    animation: pulse 2s infinite;
}

.status-indicator::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    opacity: 0.3;
    animation: pulse 2s infinite;
}

.status-active {
    background: var(--success-gradient);
    box-shadow: 0 0 10px rgba(72, 187, 120, 0.5);
}

.status-active::before {
    background: var(--success-gradient);
}

.status-pending {
    background: var(--warning-gradient);
    box-shadow: 0 0 10px rgba(237, 137, 54, 0.5);
}

.status-pending::before {
    background: var(--warning-gradient);
}

.status-inactive {
    background: var(--danger-gradient);
    box-shadow: 0 0 10px rgba(245, 101, 101, 0.5);
}

.status-inactive::before {
    background: var(--danger-gradient);
}

.status-high-risk {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.6);
    animation: glow 1.5s infinite;
}

.status-medium-risk {
    background: linear-gradient(135deg, #ffa726 0%, #ff9800 100%);
    box-shadow: 0 0 10px rgba(255, 167, 38, 0.5);
}

.status-low-risk {
    background: linear-gradient(135deg, #66bb6a 0%, #4caf50 100%);
    box-shadow: 0 0 8px rgba(102, 187, 106, 0.4);
}

/* Mejoras en los controles */
.control-group {
    position: relative;
    transition: var(--transition);
}

.control-group:hover {
    transform: translateY(-2px);
}

.control-group:hover .control-value {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.2);
}

.control-value {
    position: relative;
    transition: var(--transition);
    cursor: pointer;
}

.control-value:hover {
    transform: scale(1.05);
}

.control-arrows {
    position: absolute;
    right: -35px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: var(--transition);
}

.control-group:hover .control-arrows {
    opacity: 1;
    right: -35px;
}

/* Botones de acción mejorados */
.action-btn {
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.action-btn:active {
    transform: translateY(-1px) scale(0.98);
}

/* Efectos especiales para botones primarios */
.btn-primary.action-btn:hover {
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
    animation: pulse 0.6s ease-in-out;
}

/* Mensajes de estado mejorados */
.status-message {
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    margin-top: 12px;
    position: relative;
    overflow: hidden;
    animation: slideInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    color: #ffffff;
}

.status-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.status-message.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.9) 0%, rgba(5, 150, 105, 0.9) 100%);
    color: #ffffff;
    border: 1px solid rgba(16, 185, 129, 0.5);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.status-message.error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9) 0%, rgba(220, 38, 38, 0.9) 100%);
    color: #ffffff;
    border: 1px solid rgba(239, 68, 68, 0.5);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.status-message.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.9) 0%, rgba(217, 119, 6, 0.9) 100%);
    color: #ffffff;
    border: 1px solid rgba(245, 158, 11, 0.5);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

/* Scrollbar personalizado mejorado */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: linear-gradient(135deg, var(--primary-bg) 0%, var(--secondary-bg) 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 5px;
    border: 2px solid var(--primary-bg);
    transition: var(--transition);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #667eea 100%);
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

::-webkit-scrollbar-corner {
    background: var(--primary-bg);
}

/* Efectos de carga mejorados */
.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid rgba(102, 126, 234, 0.2);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    backdrop-filter: blur(2px);
    border-radius: inherit;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, var(--accent-bg) 25%, var(--secondary-bg) 50%, var(--accent-bg) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--border-radius-sm);
}

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

/* Tooltips mejorados */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(22, 33, 62, 0.95) 100%);
    backdrop-filter: blur(20px);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: var(--border-radius-sm);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow);
    pointer-events: none;
}

.tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    border: 5px solid transparent;
    border-top-color: rgba(26, 26, 46, 0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    pointer-events: none;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-8px);
}

.tooltip:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(92%);
}

/* Mejoras en la accesibilidad */
.btn:focus,
.arrow-btn:focus,
.delete-btn:focus {
    outline: 3px solid rgba(102, 126, 234, 0.5);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

/* Transiciones suaves para todos los elementos interactivos */
* {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Efectos de profundidad mejorados */
.dashboard-header,
.entry-row,
.entry-expanded {
    position: relative;
}

.dashboard-header::before,
.entry-row::before,
.entry-expanded::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
}

/* Efectos de partículas de fondo */
.dashboard-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(118, 75, 162, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(72, 187, 120, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
    animation: float 20s ease-in-out infinite;
    transition: var(--transition);
}

/* Ajustes para tema claro con tonos gris-azul oscuro */
[data-theme="light"] .dashboard-container::before {
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(75, 85, 99, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(30, 41, 59, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(100, 116, 139, 0.06) 0%, transparent 50%);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-20px) rotate(1deg);
    }
    66% {
        transform: translateY(10px) rotate(-1deg);
    }
}

