/* ============================================
   PREMIUM ENHANCEMENTS - FASE 1
   Tipografía, Micro-interacciones, Sombras
   ============================================ */

/* === TIPOGRAFÍA PREMIUM === */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h2 {
    font-size: 1.875rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.stat-info h3 {
    font-weight: 700;
    letter-spacing: -0.03em;
}

/* === MICRO-INTERACCIONES === */

/* Ripple effect en botones */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

/* Input focus animation */
.form-control:focus {
    animation: inputFocus 0.3s ease;
}

@keyframes inputFocus {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
    }
}

/* Transiciones suaves globales */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* === SOMBRAS MULTICAPA === */

/* Stats cards con sombras premium */
.stat-card {
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.12),
        0 1px 2px rgba(0, 0, 0, 0.24),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

.stat-card:hover {
    box-shadow:
        0 14px 28px rgba(0, 0, 0, 0.25),
        0 10px 10px rgba(0, 0, 0, 0.22),
        0 0 0 1px rgba(217, 119, 6, 0.3),
        0 0 20px rgba(217, 119, 6, 0.1);
}

/* Chart cards con sombras */
.chart-card {
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.1),
        0 4px 8px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

.chart-card:hover {
    box-shadow:
        0 8px 16px rgba(0, 0, 0, 0.2),
        0 4px 8px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Modales con sombras dramáticas */
.modal-content {
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.3),
        0 10px 10px -5px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Navbar con sombra sutil */
.navbar {
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.1),
        0 1px 2px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* === COMPONENTES PREMIUM === */

/* Navbar con blur premium */
.navbar {
    background: rgba(15, 23, 42, 0.8) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Cards con borde superior luminoso */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent,
            rgba(217, 119, 6, 0.5),
            transparent);
}

/* Badges con animación de pulso */
.badge {
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.4);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(217, 119, 6, 0);
    }
}

/* === DETALLES VISUALES PREMIUM === */

/* Gradientes animados en iconos */
.stat-icon {
    background: linear-gradient(135deg,
            #d97706 0%,
            #f59e0b 50%,
            #d97706 100%);
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Bordes luminosos en cards */
.stat-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg,
            rgba(217, 119, 6, 0.3),
            transparent,
            rgba(217, 119, 6, 0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover::after {
    opacity: 1;
}

/* === PERFORMANCE OPTIMIZATIONS === */

/* Will-change para elementos animados */
.stat-card,
.chart-card,
.btn,
.modal-content {
    will-change: transform;
}

/* Optimizar animaciones */
.stat-card:hover,
.chart-card:hover {
    transform: translateY(-4px) translateZ(0);
}

/* === ACCESIBILIDAD === */

/* Focus visible mejorado */
*:focus-visible {
    outline: 2px solid rgba(217, 119, 6, 0.5);
    outline-offset: 2px;
}

/* Reducir movimiento para usuarios que lo prefieren */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}