/* ==========================================================================
   BIOMECH ANALYZER - ESTILO BIOMECÁNICO COMPLETO
   Réplica exacta de la interfaz biomecánica avanzada
   ========================================================================== */

:root {
    /* Paleta de colores biomecánica */
    --biomech-cyan: #00D4FF;
    --biomech-purple: #6B46C1;
    --biomech-green: #10B981;
    --biomech-dark-1: #0F172A;
    --biomech-dark-2: #1E293B;
    --biomech-dark-3: #1B365D;
    --biomech-text-primary: #FFFFFF;
    --biomech-text-secondary: #94A3B8;
    --biomech-accent-orange: #FFA500;
    --biomech-accent-red: #EF4444;
}

/* ==========================================================================
   LAYOUT PRINCIPAL Y BODY
   ========================================================================== */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--biomech-text-primary);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Gradiente animado de fondo */
.biomech-gradient {
   /* background: linear-gradient(135deg, 
        #0F172A 0%,
        #1E293B 25%, 
        #1E40AF 50%,
        #6B46C1 75%,
        #0F172A 100%); */
    background: linear-gradient(135deg, 
        #0F172A 0%,
        #1E293B 35%, 
        #1E3A8A 65%,
        #0F172A 100%);    
    background-size: 400% 400%;
    animation: shimmer 15s ease-in-out infinite;
    min-height: 100vh;
}

/* Animación shimmer para fondos */
@keyframes shimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ==========================================================================
   EFECTOS GLASSMORPHISM
   ========================================================================== */

.biomech-glass {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.biomech-glass:hover {
    border-color: rgba(0, 212, 255, 0.4);
    box-shadow: 0 12px 40px rgba(0, 212, 255, 0.2);
    transform: translateY(-2px);
}

/* ==========================================================================
   EFECTOS GLOW Y BRILLOS
   ========================================================================== */

.biomech-glow {
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.4);
}

.biomech-glow-purple {
    text-shadow: 0 0 10px rgba(107, 70, 193, 0.5);
    box-shadow: 0 10px 30px rgba(107, 70, 193, 0.4);
}

.biomech-glow-green {
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
}

/* ==========================================================================
   NAVBAR BIOMECÁNICO
   ========================================================================== */

.biomech-navbar {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.biomech-navbar .navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--biomech-cyan);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.biomech-navbar .navbar-brand:hover {
    color: var(--biomech-cyan);
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.8);
    transform: scale(1.05);
}

/* ==========================================================================
   BOTONES BIOMECÁNICOS
   ========================================================================== */

.biomech-button {
    background: linear-gradient(135deg, var(--biomech-cyan), var(--biomech-purple));
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    color: white;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.biomech-button: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.5s;
}

.biomech-button:hover:before {
    left: 100%;
}

.biomech-button:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 212, 255, 0.5);
}

.biomech-button:active {
    transform: translateY(0);
}

/* Botón secundario */
.biomech-button-outline {
    background: transparent;
    border: 2px solid var(--biomech-cyan);
    color: var(--biomech-cyan);
    border-radius: 12px;
    padding: 10px 22px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.biomech-button-outline:hover {
    background: var(--biomech-cyan);
    color: var(--biomech-dark-1);
    box-shadow: 0 10px 25px rgba(0, 212, 255, 0.3);
    transform: translateY(-1px);
}

/* ==========================================================================
   CARDS DE EJERCICIOS
   ========================================================================== */

.exercise-card {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.exercise-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--biomech-cyan), var(--biomech-purple));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.exercise-card:hover:before {
    opacity: 1;
}

.exercise-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 50px rgba(107, 70, 193, 0.3);
    border-color: rgba(0, 212, 255, 0.3);
    background: rgba(30, 41, 59, 0.95);
}

.exercise-card h5 {
    color: var(--biomech-text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.exercise-card p {
    color: var(--biomech-text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex-grow: 1;
}

/* ==========================================================================
   ICONOS BIOMECÁNICOS
   ========================================================================== */

.biomech-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--biomech-cyan), var(--biomech-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.biomech-icon-wrapper:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: conic-gradient(from 0deg, var(--biomech-cyan), var(--biomech-purple), var(--biomech-green), var(--biomech-cyan));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.exercise-card:hover .biomech-icon-wrapper:before {
    opacity: 1;
    animation: spin 3s linear infinite;
}

.biomech-icon-wrapper i {
    font-size: 2rem;
    color: white;
    z-index: 1;
    position: relative;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   ANÁLISIS EN TIEMPO REAL
   ========================================================================== */

.analysis-panel {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 16px;
    padding: 24px;
}

.angle-display {
    font-size: 3rem;
    font-weight: 700;
    color: var(--biomech-cyan);
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
    margin: 0;
    text-align: center;
}

.angle-status {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
    text-align: center;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
}

.angle-status.normal {
    background: rgba(16, 185, 129, 0.2);
    color: var(--biomech-green);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.angle-status.warning {
    background: rgba(255, 165, 0, 0.2);
    color: var(--biomech-accent-orange);
    border: 1px solid rgba(255, 165, 0, 0.3);
}

.angle-status.danger {
    background: rgba(239, 68, 68, 0.2);
    color: var(--biomech-accent-red);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ==========================================================================
   PROGRESS BARS BIOMECÁNICAS
   ========================================================================== */

.biomech-progress {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 10px;
    height: 12px;
    overflow: hidden;
    position: relative;
}

.biomech-progress-bar {
    background: linear-gradient(90deg, var(--biomech-cyan), var(--biomech-purple));
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.biomech-progress-bar:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shine 2s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ==========================================================================
   CÁMARA Y VIDEO
   ========================================================================== */

.camera-container {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: var(--biomech-dark-2);
}

#camera-feed {
    width: 100%;
    height: auto;
    border-radius: 16px;
    background: var(--biomech-dark-2);
}

#pose-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    border-radius: 16px;
}

.camera-controls {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

/* ==========================================================================
   STATUS INDICATORS
   ========================================================================== */

.status-indicator {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-indicator.active {
    background: rgba(16, 185, 129, 0.2);
    color: var(--biomech-green);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-indicator.detecting {
    background: rgba(255, 165, 0, 0.2);
    color: var(--biomech-accent-orange);
    border: 1px solid rgba(255, 165, 0, 0.3);
}

.status-indicator.inactive {
    background: rgba(148, 163, 184, 0.2);
    color: var(--biomech-text-secondary);
    border: 1px solid rgba(148, 163, 184, 0.3);
}

/* ==========================================================================
   MÉTRICAS Y ESTADÍSTICAS
   ========================================================================== */

.metric-card {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: 0 10px 25px rgba(0, 212, 255, 0.1);
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--biomech-cyan);
    margin-bottom: 0.5rem;
}

.metric-label {
    color: var(--biomech-text-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 768px) {
    .biomech-navbar .navbar-brand {
        font-size: 1.25rem;
    }
    
    .exercise-card {
        padding: 20px;
        margin-bottom: 1rem;
    }
    
    .angle-display {
        font-size: 2.5rem;
    }
    
    .camera-controls {
        justify-content: center;
    }
    
    .biomech-button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* ==========================================================================
   ANIMACIONES ADICIONALES
   ========================================================================== */

.fade-in {
    animation: fadeIn 0.6s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(0, 212, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0); }
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */

.text-biomech-cyan { color: var(--biomech-cyan); }
.text-biomech-purple { color: var(--biomech-purple); }
.text-biomech-green { color: var(--biomech-green); }
.bg-biomech-dark { background-color: var(--biomech-dark-2); }

.mb-4 { margin-bottom: 1.5rem; }
.mt-4 { margin-top: 1.5rem; }
.p-4 { padding: 1.5rem; }
.w-100 { width: 100%; }
.text-center { text-align: center; }
.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-center { justify-content: center; }
.gap-3 { gap: 1rem; }

/* ==========================================================================
   LOGIN PAGE STYLES - NUEVOS ESTILOS PARA LOGIN
   ========================================================================== */

/* 🌊 FONDO ANIMADO ESPECÍFICO PARA LOGIN */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, 
        var(--biomech-dark-1) 0%, 
        var(--biomech-dark-2) 25%, 
        var(--biomech-dark-3) 50%, 
        var(--biomech-purple) 75%, 
        var(--biomech-cyan) 100%);
    background-size: 400% 400%;
    animation: shimmer 8s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

/* Partículas flotantes para login */
.login-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.login-particle {
    position: absolute;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 50%;
    pointer-events: none;
    animation: float 8s infinite ease-in-out;
}

.login-particle:nth-child(1) {
    width: 40px;
    height: 40px;
    left: 10%;
    top: 20%;
    animation-delay: 0s;
    animation-duration: 6s;
}

.login-particle:nth-child(2) {
    width: 30px;
    height: 30px;
    left: 80%;
    top: 80%;
    animation-delay: 2s;
    animation-duration: 8s;
}

.login-particle:nth-child(3) {
    width: 60px;
    height: 60px;
    left: 60%;
    top: 10%;
    animation-delay: 4s;
    animation-duration: 10s;
}

.login-particle:nth-child(4) {
    width: 20px;
    height: 20px;
    left: 30%;
    top: 70%;
    animation-delay: 1s;
    animation-duration: 7s;
}

.login-particle:nth-child(5) {
    width: 75px;
    height: 75px;
    left: 5%;
    top: 50%;
    animation-delay: 3s;
    animation-duration: 9s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg) scale(1);
        opacity: 0.3;
    }
    25% {
        transform: translateY(-20px) rotate(90deg) scale(1.1);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-40px) rotate(180deg) scale(0.9);
        opacity: 0.8;
    }
    75% {
        transform: translateY(-20px) rotate(270deg) scale(1.2);
        opacity: 0.4;
    }
}

/* 🪟 CONTENEDOR DE LOGIN */
.login-container {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

/* 🎨 CARD DE LOGIN USANDO ESTILOS EXISTENTES */
.login-card {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    animation: slideInUp 0.8s ease-out;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.4), transparent);
}

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

/* 🏃‍♂️ LOGO USANDO ICONOS BIOMECÁNICOS EXISTENTES */
.login-logo {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--biomech-dark-1), var(--biomech-dark-2));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
    animation: pulse 2s infinite;
}

.login-logo i {
    font-size: 50px;
    color: white;
}

.login-logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(1.1) contrast(1.1);
    transition: all 0.3s ease;
}

.login-logo:hover .login-logo-image {
    filter: brightness(1.3) contrast(1.2);
    transform: scale(1.05);
}

/* TÍTULOS DE LOGIN */
.login-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--biomech-text-primary);
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.login-subtitle {
    font-size: 16px;
    color: var(--biomech-text-secondary);
    margin-bottom: 30px;
    line-height: 1.5;
    text-align: center;
}

/* 📝 FORMULARIO DE LOGIN USANDO ESTILOS BIOMECÁNICOS */
.login-form-group {
    margin-bottom: 20px;
}

.login-form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-input-group {
    position: relative;
}

.login-input {
    width: 100%;
    padding: 16px 20px;
    padding-right: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    color: var(--biomech-text-primary);
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.login-input::placeholder {
    color: var(--biomech-text-secondary);
    font-weight: 400;
}

.login-input:focus {
    outline: none;
    border-color: var(--biomech-cyan);
    box-shadow: 
        0 0 0 3px rgba(0, 212, 255, 0.1),
        0 5px 20px rgba(0, 212, 255, 0.2);
    background: rgba(255, 255, 255, 0.15);
}

.login-input-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--biomech-text-secondary);
    font-size: 18px;
    pointer-events: none;
    transition: all 0.3s ease;
}

.login-input:focus + .login-input-icon {
    color: var(--biomech-cyan);
}

/* 🔽 SELECT DROPDOWN STYLING */
.login-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 16px 20px !important;
    padding-right: 50px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2300d4ff' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 18px center !important;
    background-size: 12px !important;
    cursor: pointer;
    font-weight: 500;
}

.login-select:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2300ffff' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") !important;
}

.login-select option {
    background: #0f1419;
    color: var(--biomech-text-primary);
    padding: 12px 16px;
    font-weight: 500;
    border: none;
}

.login-select option:hover,
.login-select option:checked {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(0, 150, 180, 0.2));
}

.login-select option:disabled {
    color: var(--biomech-text-secondary);
    font-style: italic;
}

/* Ocultar el ícono adicional en selects */
.login-select + .login-input-icon {
    display: none;
}

/* 👁️ TOGGLE PASSWORD */
.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--biomech-text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.password-toggle:hover {
    color: var(--biomech-cyan);
    background: rgba(0, 212, 255, 0.1);
}

/* 🚀 BOTÓN DE LOGIN USANDO BIOMECH-BUTTON */
.login-button {
    width: 100%;
    background: linear-gradient(135deg, var(--biomech-cyan), var(--biomech-purple));
    border: none;
    border-radius: 12px;
    padding: 16px 24px;
    color: white;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
}

.login-button::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: all 0.5s ease;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.4);
}

.login-button:hover::before {
    left: 100%;
}

/* 🔗 ENLACES DE AYUDA */
.login-help {
    text-align: center;
    margin-top: 30px;
}

.login-help-link {
    color: var(--biomech-text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.login-help-link:hover {
    color: var(--biomech-cyan);
    text-decoration: underline;
}

/* 🔑 PANELS DE INFO USANDO BIOMECH-GLASS */
.login-info-panel {
    position: absolute;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid rgba(0, 212, 255, 0.1);
    max-width: 300px;
}

.login-credentials-panel {
    bottom: 30px;
    left: 30px;
    animation: slideInLeft 1s ease-out 0.5s both;
}

.login-system-panel {
    top: 50px;
    right: 50px;
    animation: slideInRight 1s ease-out 0.8s both;
}

@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);
    }
}

.login-panel-title {
    color: var(--biomech-cyan);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    gap: 6px;
}

.login-panel-item {
    color: var(--biomech-text-secondary);
    font-size: 12px;
    font-family: 'Courier New', monospace;
    margin: 4px 0;
}

/* 🚨 MENSAJES USANDO ESTILOS BIOMECÁNICOS */
.login-alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-alert-error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ff9999;
}

.login-alert-success {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #99ffcc;
}

/* 📱 RESPONSIVE PARA LOGIN */
@media (max-width: 768px) {
    .login-container {
        padding: 15px;
    }
    
    .login-card {
        padding: 30px 25px;
        margin: 10px;
    }
    
    .login-credentials-panel,
    .login-system-panel {
        position: static;
        margin: 20px auto;
        max-width: 100%;
    }
    
    .login-system-panel {
        order: -1;
        margin-bottom: 30px;
    }
    
    .login-title {
        font-size: 28px;
    }
    
    .login-logo {
        width: 70px;
        height: 70px;
    }
    
    .login-logo i {
        font-size: 35px;
    }
}

/* ✨ EFECTOS ADICIONALES PARA LOGIN */
.login-shimmer {
    position: relative;
    overflow: hidden;
}

.login-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
}

/* 💧 RIPPLE EFFECT PARA BOTONES */
.login-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ==========================================================================
   DASHBOARD MODERNO - ESTILO MINIMALISTA
   ========================================================================== */

/* 🎯 HERO SECTION */
.dashboard-hero {
    background: linear-gradient(135deg, 
        rgba(0, 212, 255, 0.1) 0%, 
        rgba(107, 70, 193, 0.1) 100%);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 24px;
    padding: 60px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.dashboard-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;                                    /* ✅ Más grueso */
    background: linear-gradient(90deg, 
        var(--biomech-cyan) 0%, 
        var(--biomech-purple) 25%, 
        var(--biomech-green) 50%, 
        var(--biomech-cyan) 75%, 
        var(--biomech-purple) 100%
    );
    background-size: 200% 100%;
    animation: shimmer-hero 3s ease-in-out infinite;
    border-radius: 24px 24px 0 0;                   /* ✅ Solo bordes superiores */
    opacity: 0.9;
}

@keyframes shimmer-hero {
    0%, 100% { 
        background-position: 0% 50%;
        opacity: 0.9;
    }
    50% { 
        background-position: 100% 50%;
        opacity: 1;
    }
}

.dashboard-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--biomech-text-primary);
    margin-bottom: 12px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.dashboard-subtitle {
    font-size: 18px;
    color: var(--biomech-text-secondary);
    margin-bottom: 24px;
    line-height: 1.4;
}

/* BOTONES DEL DASHBOARD */
.dashboard-button {
    background: linear-gradient(135deg, var(--biomech-cyan), var(--biomech-purple));
    border: none;
    border-radius: 12px;
    padding: 14px 28px;
    color: white;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.dashboard-button: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.5s;
}

.dashboard-button:hover:before {
    left: 100%;
}

.dashboard-button:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 212, 255, 0.5);
}

.dashboard-button:active {
    transform: translateY(0);
}

/* TARJETAS DEL DASHBOARD */
.dashboard-card {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.dashboard-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--biomech-cyan), var(--biomech-purple));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dashboard-card:hover:before {
    opacity: 1;
}

.dashboard-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 50px rgba(107, 70, 193, 0.3);
    border-color: rgba(0, 212, 255, 0.3);
    background: rgba(30, 41, 59, 0.95);
}

.dashboard-card h5 {
    color: var(--biomech-text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.dashboard-card p {
    color: var(--biomech-text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex-grow: 1;
}

/* ICONOS DEL DASHBOARD */
.dashboard-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--biomech-cyan), var(--biomech-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.dashboard-icon-wrapper:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: conic-gradient(from 0deg, var(--biomech-cyan), var(--biomech-purple), var(--biomech-green), var(--biomech-cyan));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dashboard-card:hover .dashboard-icon-wrapper:before {
    opacity: 1;
    animation: spin 3s linear infinite;
}

.dashboard-icon-wrapper i {
    font-size: 2rem;
    color: white;
    z-index: 1;
    position: relative;
}

/* ==========================================================================
   ESTILOS ADICIONALES PARA EL DASHBOARD
   ========================================================================== */

/* Fondo del dashboard */
.dashboard-background {
    background: linear-gradient(135deg, 
        var(--biomech-dark-1) 0%, 
        var(--biomech-dark-2) 25%, 
        var(--biomech-dark-3) 50%, 
        var(--biomech-purple) 75%, 
        var(--biomech-cyan) 100%);
    background-size: 400% 400%;
    animation: shimmer 8s ease-in-out infinite;
    min-height: 100vh;
}

/* Paneles del dashboard */
.dashboard-panel {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.dashboard-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: conic-gradient(from 0deg, rgba(0, 212, 255, 0.1), rgba(107, 70, 193, 0.1), rgba(16, 185, 129, 0.1), rgba(0, 212, 255, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 16px;
}

.dashboard-panel:hover::before {
    opacity: 1;
    animation: spin 4s linear infinite;
}

/* Grillas del dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

/* ==========================================================================
   NUEVOS ESTILOS PARA EL DASHBOARD
   ========================================================================== */

/* 🎯 HERO SECTION */
.dashboard-hero {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 24px;
    padding: 60px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

.dashboard-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;                                    /* ✅ Más grueso */
    background: linear-gradient(90deg, 
        var(--biomech-cyan) 0%, 
        var(--biomech-purple) 25%, 
        var(--biomech-green) 50%, 
        var(--biomech-cyan) 75%, 
        var(--biomech-purple) 100%
    );
    background-size: 200% 100%;
    animation: shimmer-hero 3s ease-in-out infinite;
    border-radius: 24px 24px 0 0;                   /* ✅ Solo bordes superiores */
    opacity: 0.9;
}

@keyframes shimmer-hero {
    0%, 100% { 
        background-position: 0% 50%;
        opacity: 0.9;
    }
    50% { 
        background-position: 100% 50%;
        opacity: 1;
    }
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    margin-bottom: 1rem;
}

.gradient-text {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #FFFFFF, var(--biomech-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
}

.hero-subtitle {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--biomech-text-primary);
    display: block;
    margin-top: 0.5rem;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--biomech-text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-button {
    padding: 14px 28px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.hero-button.primary {
    background: linear-gradient(135deg, var(--biomech-cyan), var(--biomech-purple));
    color: white;
}

.hero-button.primary:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 212, 255, 0.4);
}

.hero-button.secondary {
    background: transparent;
    border: 2px solid var(--biomech-cyan);
    color: var(--biomech-cyan);
}

.hero-button.secondary:hover {
    background: var(--biomech-cyan);
    color: var(--biomech-dark-1);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 212, 255, 0.3);
}

/* 📊 MÉTRICAS PROFESIONALES */
.metric-card-modern {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.metric-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--biomech-cyan), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.metric-card-modern:hover::before {
    opacity: 1;
}

.metric-card-modern:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 212, 255, 0.4);
    box-shadow: 0 15px 35px rgba(0, 212, 255, 0.2);
}

.metric-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 24px;
    background: linear-gradient(135deg, var(--biomech-cyan), var(--biomech-purple));
    color: white;
}

.metric-icon.success {
    background: linear-gradient(135deg, var(--biomech-green), var(--biomech-cyan));
}

.metric-icon.warning {
    background: linear-gradient(135deg, var(--biomech-accent-orange), var(--biomech-cyan));
}

.metric-icon.info {
    background: linear-gradient(135deg, var(--biomech-purple), var(--biomech-cyan));
}

.metric-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--biomech-cyan);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.metric-label {
    font-size: 0.875rem;
    color: var(--biomech-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 🎯 SECCIÓN DE ACCESO RÁPIDO */
.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--biomech-text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.section-title i {
    color: var(--biomech-cyan);
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--biomech-text-secondary);
    margin: 0;
}

/* 🚀 TARJETAS DE ACCESO RÁPIDO */
.quick-access-card {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.quick-access-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--biomech-cyan), var(--biomech-purple));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.quick-access-card:hover::before {
    opacity: 1;
}

.quick-access-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 212, 255, 0.4);
    box-shadow: 0 25px 50px rgba(0, 212, 255, 0.3);
}

.card-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.5rem;
    color: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card-icon.shoulder {
    background: linear-gradient(135deg, #FF6B6B, #4ECDC4);
}

.card-icon.knee {
    background: linear-gradient(135deg, #A8E6CF, #88D8C0);
}

.card-icon.elbow {
    background: linear-gradient(135deg, #FFD93D, #FF6B6B);
}

.card-icon.hip {
    background: linear-gradient(135deg, #6B46C1, #9D7BE0);
}

.card-icon.ankle {
    background: linear-gradient(135deg, #10B981, #34D399);
}

.quick-access-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 25px rgba(0, 212, 255, 0.4);
}

.card-content h4 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--biomech-text-primary);
    margin-bottom: 12px;
}

.card-content p {
    color: var(--biomech-text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
    flex-grow: 1;
}

.quick-button {
    background: linear-gradient(135deg, var(--biomech-cyan), var(--biomech-purple));
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin-top: auto;
}

.quick-button:hover {
    color: white;
    transform: translateX(5px);
    box-shadow: 0 8px 20px rgba(0, 212, 255, 0.3);
}

/* 📋 TARJETA "VER TODOS" */
.all-exercises-card {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.all-exercises-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--biomech-green), transparent);
}

.exercises-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--biomech-text-primary);
    margin-bottom: 12px;
}

.exercises-content p {
    color: var(--biomech-text-secondary);
    margin-bottom: 24px;
    font-size: 1.1rem;
}

.view-all-button {
    background: transparent;
    border: 2px solid var(--biomech-green);
    color: var(--biomech-green);
    padding: 14px 28px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    font-size: 16px;
}

.view-all-button:hover {
    background: var(--biomech-green);
    color: var(--biomech-dark-1);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

/* 📱 RESPONSIVE */
@media (max-width: 768px) {
    .gradient-text,
    .hero-subtitle {
        font-size: 2rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-button {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .section-title {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 8px;
    }
    
    .metric-number {
        font-size: 2rem;
    }
    
    .card-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }
}

/* ==========================================================================
   DASHBOARD PROFESIONAL - ESTILO DE LA IMAGEN
   ========================================================================== */

/* 🎯 HERO SECTION MEJORADA */
.dashboard-hero {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 24px;
    padding: 60px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

.dashboard-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;                                    /* ✅ Más grueso */
    background: linear-gradient(90deg, 
        var(--biomech-cyan) 0%, 
        var(--biomech-purple) 25%, 
        var(--biomech-green) 50%, 
        var(--biomech-cyan) 75%, 
        var(--biomech-purple) 100%
    );
    background-size: 200% 100%;
    animation: shimmer-hero 3s ease-in-out infinite;
    border-radius: 24px 24px 0 0;                   /* ✅ Solo bordes superiores */
    opacity: 0.9;
}

@keyframes shimmer-hero {
    0%, 100% { 
        background-position: 0% 50%;
        opacity: 0.9;
    }
    50% { 
        background-position: 100% 50%;
        opacity: 1;
    }
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    margin-bottom: 1rem;
}

.gradient-text {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #FFFFFF, var(--biomech-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
}

.hero-subtitle {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--biomech-text-primary);
    display: block;
    margin-top: 0.5rem;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--biomech-text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-button {
    padding: 14px 28px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.hero-button.primary {
    background: linear-gradient(135deg, var(--biomech-cyan), var(--biomech-purple));
    color: white;
}

.hero-button.primary:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 212, 255, 0.4);
}

.hero-button.secondary {
    background: transparent;
    border: 2px solid var(--biomech-cyan);
    color: var(--biomech-cyan);
}

.hero-button.secondary:hover {
    background: var(--biomech-cyan);
    color: var(--biomech-dark-1);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 212, 255, 0.3);
}

/* 📊 MÉTRICAS PROFESIONALES */
.metric-card-modern {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.metric-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--biomech-cyan), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.metric-card-modern:hover::before {
    opacity: 1;
}

.metric-card-modern:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 212, 255, 0.4);
    box-shadow: 0 15px 35px rgba(0, 212, 255, 0.2);
}

.metric-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 24px;
    background: linear-gradient(135deg, var(--biomech-cyan), var(--biomech-purple));
    color: white;
}

.metric-icon.success {
    background: linear-gradient(135deg, var(--biomech-green), var(--biomech-cyan));
}

.metric-icon.warning {
    background: linear-gradient(135deg, var(--biomech-accent-orange), var(--biomech-cyan));
}

.metric-icon.info {
    background: linear-gradient(135deg, var(--biomech-purple), var(--biomech-cyan));
}

.metric-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--biomech-cyan);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.metric-label {
    font-size: 0.875rem;
    color: var(--biomech-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 🎯 SECCIÓN DE ACCESO RÁPIDO */

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--biomech-text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.section-title i {
    color: var(--biomech-cyan);
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--biomech-text-secondary);
    margin: 0;
}

/* 🚀 TARJETAS DE ACCESO RÁPIDO */
.quick-access-card {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.quick-access-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--biomech-cyan), var(--biomech-purple));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.quick-access-card:hover::before {
    opacity: 1;
}

.quick-access-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 212, 255, 0.4);
    box-shadow: 0 25px 50px rgba(0, 212, 255, 0.3);
}

.card-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.5rem;
    color: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card-icon.shoulder {
    background: linear-gradient(135deg, #FF6B6B, #4ECDC4);
}

.card-icon.knee {
    background: linear-gradient(135deg, #A8E6CF, #88D8C0);
}

.card-icon.elbow {
    background: linear-gradient(135deg, #FFD93D, #FF6B6B);
}

.card-icon.hip {
    background: linear-gradient(135deg, #6B46C1, #9D7BE0);
}

.card-icon.ankle {
    background: linear-gradient(135deg, #10B981, #34D399);
}

.quick-access-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 25px rgba(0, 212, 255, 0.4);
}

.card-content h4 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--biomech-text-primary);
    margin-bottom: 12px;
}

.card-content p {
    color: var(--biomech-text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
    flex-grow: 1;
}

.quick-button {
    background: linear-gradient(135deg, var(--biomech-cyan), var(--biomech-purple));
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin-top: auto;
}

.quick-button:hover {
    color: white;
    transform: translateX(5px);
    box-shadow: 0 8px 20px rgba(0, 212, 255, 0.3);
}

/* 📋 TARJETA "VER TODOS" */
.all-exercises-card {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.all-exercises-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--biomech-green), transparent);
}

.exercises-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--biomech-text-primary);
    margin-bottom: 12px;
}

.exercises-content p {
    color: var(--biomech-text-secondary);
    margin-bottom: 24px;
    font-size: 1.1rem;
}

.view-all-button {
    background: transparent;
    border: 2px solid var(--biomech-green);
    color: var(--biomech-green);
    padding: 14px 28px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    font-size: 16px;
}

.view-all-button:hover {
    background: var(--biomech-green);
    color: var(--biomech-dark-1);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

/* 📱 RESPONSIVE */
@media (max-width: 768px) {
    .gradient-text,
    .hero-subtitle {
        font-size: 2rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-button {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .section-title {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 8px;
    }
    
    .metric-number {
        font-size: 2rem;
    }
    
    .card-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }
}

/* ==========================================================================
   NAVBAR BIOTRACK ENHANCED - COMBINANDO LO MEJOR DE AMBOS ESTILOS
   ========================================================================== */

.biotrack-navbar-enhanced {
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.navbar-content-enhanced {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 3rem;                             /* ✅ MÁS PADDING HORIZONTAL */
    max-width: 1600px;                              /* ✅ MÁS ANCHO */
    margin: 0 auto;
    width: 100%;                                    /* ✅ USAR TODO EL ANCHO */
}

/* 🏷️ BRAND/LOGO MEJORADO */
.navbar-brand-enhanced {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--biomech-text-primary);
}

.brand-icon-enhanced {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95)); /* Fondo oscuro biomecánico */
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
    border: 1px solid rgba(0, 212, 255, 0.3); /* Borde sutil cyan */
}

.brand-icon-enhanced i {
    font-size: 22px;
    color: white;
}

.brand-logo-img {
    width: 48px;  /* 50% más grande (antes 32px) */
    height: 48px;
    object-fit: contain;
    filter: brightness(1.2) contrast(1.1);
    transition: all 0.3s ease;
}

.navbar-brand-enhanced:hover .brand-logo-img {
    filter: brightness(1.4) contrast(1.2);
    transform: scale(1.1); /* Efecto zoom en hover */
}

.brand-text-enhanced {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #FFFFFF, var(--biomech-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.navbar-brand-enhanced:hover .brand-icon-enhanced {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.4);
}

/* 📍 MENÚ PRINCIPAL CON PUNTO ACTIVO */
.navbar-menu-enhanced {
    display: flex;
    align-items: center;
    gap: 2.5rem;                                    /* ✅ MÁS ESPACIO ENTRE LINKS */
    flex: 1;
    justify-content: center;
    margin-right: 50px;                             /* ✅ DAR MÁS ESPACIO AL USUARIO */
}

.nav-link-enhanced {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    text-decoration: none;
    color: #94A3B8;
    font-weight: 500;
    font-size: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: visible;                              /* ✅ PERMITIR QUE SE VEA EL PUNTO */
}

/* ✨ ESTADO ACTIVO CON PUNTO (EL EFECTO QUE QUERÍAS) */
.nav-link-enhanced.active {
    color: var(--biomech-cyan) !important;
    background: transparent;                         /* ✅ Sin fondo */
    border: none;                                   /* ✅ Sin borde */
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    position: relative;
}

/* CAMBIAR el punto para que esté DEBAJO del texto */
.nav-link-enhanced.active::after {
    content: '';
    position: absolute;
    bottom: -6px;                                   /* ✅ MÁS CERCA, era -12px */
    left: 50%;
    transform: translateX(-50%);
    width: 8px;                                     /* ✅ LIGERAMENTE MÁS GRANDE */
    height: 8px;                                    /* ✅ LIGERAMENTE MÁS GRANDE */
    background: var(--biomech-cyan);
    border-radius: 50%;
    box-shadow: 
        0 0 15px rgba(0, 212, 255, 1),
        0 0 30px rgba(0, 212, 255, 0.5);           /* ✅ MÁS BRILLO */
    animation: pulse-dot-enhanced 2s infinite;
    z-index: 10;                                   /* ✅ ASEGURAR QUE ESTÉ ENCIMA */
}

/* 🔵 EL PUNTO ACTIVO ANIMADO */
.nav-link-enhanced.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 55%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--biomech-cyan);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0,  212, 255, 0.8);
    animation: pulse-dot-enhanced  2s infinite;
}

@keyframes pulse-dot-enhanced {
    0%, 100% { 
        box-shadow: 0 0 10px rgba(0, 212, 255, 0.8);
        transform: translateX(-50%) scale(1.5);
    }
    50% { 
        box-shadow: 0 0 20px rgba(0, 212, 255, 1);
        transform: translateX(-50%) scale(1.7);
    }
}

/* HOVER EFFECTS */
.nav-link-enhanced:hover {
    color: var(--biomech-cyan) !important;
    background: rgba(0, 212, 255, 0.05);
    transform: translateY(-1px);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.nav-link-enhanced:hover i {
    transform: scale(1.1);
    color: var(--biomech-cyan);
}

/* 👤 USUARIO MEJORADO */
.navbar-user-enhanced {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;                              /* ✅ EMPUJAR HACIA LA DERECHA */
    padding-right: 20px;                            /* ✅ MÁS SEPARACIÓN DEL BORDE */
}
.user-info-enhanced {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 18px 4px 4px;                      /* ✅ Padding más ajustado */
    border-radius: 50px;                            /* ✅ MÁS REDONDEADO */
    /* background: #3B82F6;                            /* ✅ AZUL MÁS BRILLANTE */
    border: none;
    box-shadow: none;                               /* ✅ Sin sombra */
    transition: all 0.3s ease;
}

.user-avatar-enhanced {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(14, 131, 189, 0.25);
    border-radius: 50%;
    color: white;
    font-size: 60px;
    margin-right: 2px;
    cursor: pointer; /* Cursor pointer para indicar clickeable */
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden; /* Para que la imagen no se salga */
    border: 2px solid transparent;
}

.user-avatar-enhanced:hover {
    border-color: var(--biomech-cyan);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
    transform: scale(1.05);
}

.user-avatar-enhanced img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* La imagen cubrirá todo el círculo */
    border-radius: 50%;
}

.user-avatar-enhanced i {
    font-size: 24px; /* Icono más pequeño cuando no hay foto */
}

/* Input oculto para subir foto */
#profileImageInput {
    display: none;
}

.user-details-enhanced {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.1;
}

.user-name-enhanced {
    font-size: 17px;                                /* ✅ Ajustar tamaño */
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 1px;
}

.user-role-enhanced {
    font-size: 15px;
    color: #00D4FF;                                 /* ✅ CYAN EXACTO */
    font-weight: 500;
}

.logout-btn-enhanced {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;                              /* ✅ Padding más compacto */
    border-radius: 10px;                            /* ✅ MÁS REDONDEADO */
    text-decoration: none;
    color: white;
    font-size: 17px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    background: linear-gradient(135deg,#960775, #F472B6, #EC4899); /* ✅ ROSA/MAGENTA MÁS VIBRANTE */
    box-shadow: none;                               /* ✅ Sin sombra inicial */
}

.logout-btn-enhanced:hover {
    color: white;
    transform: translateY(-10px);
    box-shadow: 0 4px 12px rgba(244, 114, 182, 0.4);
    background: linear-gradient(135deg, #FB7185, #F472B6);
}

.logout-btn-enhanced i {
    font-size: 22px;
}

/* 🌊 LÍNEA ANIMADA BAJO EL NAVBAR (EFECTO BREATHING - NO LOADING) */
.navbar-border-enhanced {
    position: relative;
    width: 100%;
    height: 3px;
    background: rgba(30, 41, 59, 0.8);
    overflow: hidden;
}

.animated-border-enhanced {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        var(--biomech-cyan) 0%,
        var(--biomech-purple) 50%,
        var(--biomech-green) 100%
    );
    background-size: 100% 100%;
    animation: breathing-glow-enhanced 3s ease-in-out infinite;
    opacity: 0.7;
}

@keyframes breathing-glow-enhanced {
    0%, 100% { 
        opacity: 0.6;
        filter: brightness(0.9);
    }
    50% { 
        opacity: 0.85;
        filter: brightness(1.1);
    }
}

/* 🎨 MAIN CONTENT */
.main-content-enhanced {
    padding: 2rem;
    min-height: calc(100vh - 76px);
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 300px;
    animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.7s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.toast-success {
    background: linear-gradient(135deg, #10B981, #059669);
    border-left: 4px solid #065F46;
}

.toast-error {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    border-left: 4px solid #7F1D1D;
}

.toast i {
    font-size: 18px;
}

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

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* ==========================================================================
   ANÁLISIS VIDEO STYLES
   ========================================================================== */

.camera-container {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: var(--biomech-dark-2);
    border: 2px solid rgba(0, 212, 255, 0.2);
}

.analysis-video {
    width: 100%;
    height: auto;
    max-height: 480px;
    border-radius: 14px;
    background: #000;
}

.analysis-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    border-radius: 14px;
}

.analysis-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    padding: 16px;
    border-radius: 12px;
    color: white;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.angle-display {
    text-align: center;
    margin-bottom: 12px;
}

.angle-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--biomech-cyan);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.angle-label {
    font-size: 0.875rem;
    color: #ccc;
    margin-top: 4px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--biomech-cyan);
    animation: pulse 2s infinite;
}

.status-text {
    font-size: 0.875rem;
    font-weight: 500;
}

.status-text.active {
    color: #10B981;
}

.status-text.loading {
    color: #F59E0B;
}

.status-text.error {
    color: #EF4444;
}

.status-text.inactive {
    color: #6B7280;
}

/* Responsive para cámara */
@media (max-width: 768px) {
    .analysis-overlay {
        position: relative;
        top: auto;
        right: auto;
        margin-top: 10px;
        background: rgba(15, 23, 42, 0.95);
    }
    
    .angle-value {
        font-size: 1.5rem;
    }
}

/* Agregar al final de biomech_styles.css */

.analysis-stream {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-badge.loading {
    background-color: #fff3cd;
    color: #856404;
}

.status-badge.active {
    background-color: #d1e7dd;
    color: #0f5132;
}

.status-badge.error {
    background-color: #f8d7da;
    color: #721c24;
}

.status-badge.inactive {
    background-color: #e2e3e5;
    color: #41464b;
}

.stream-container {
    position: relative;
    background: #f8f9fa;
    border-radius: 8px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* historial */

.card-header2 {
 padding-bottom:16px;
 transform:translatex(3px) translatey(0px);
 background-color:transparent;
 background-image:linear-gradient(to right, #667db6 0%, #0082c8 25%, #0082c8 50%, #667db6 100%);
 left:-2.7px;
 bottom:2px;
}

/* ==========================================================================
   ICONOS SVG DE ARTICULACIONES
   ========================================================================== */

.joint-icon {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.4));
    transition: all 0.3s ease;
    color: var(--biomech-cyan);
}

.card-icon:hover .joint-icon {
    filter: drop-shadow(0 0 15px rgba(0, 212, 255, 0.8));
    transform: scale(1.1);
}

/* Colores específicos por articulación */
.card-icon.shoulder .joint-icon {
    color: var(--biomech-cyan);
    transform: scale(1.25); /* 25% más grande */
}

.card-icon.elbow .joint-icon {
    color: var(--biomech-purple);
}

.card-icon.hip .joint-icon {
    color: var(--biomech-green);
}

.card-icon.knee .joint-icon {
    color: #FFA500;
    transform: scale(1.25); /* 25% más grande */
}

.card-icon.ankle .joint-icon {
    color: #10B981;
}

/* Ajustar hover para mantener el zoom base */
.card-icon.shoulder:hover .joint-icon,
.card-icon.knee:hover .joint-icon {
    filter: drop-shadow(0 0 15px rgba(0, 212, 255, 0.8));
    transform: scale(1.35); /* 1.25 base + 0.1 hover = 1.35 total */
}

/* ==========================================================================
   🎬 ANIMACIONES PARA NOTIFICACIONES DE CÁMARA
   ========================================================================== */

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

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

/* Estilos para notificación de cámara */
.camera-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: none;
    animation: slideIn 0.3s ease;
}

.camera-notification.success {
    background: var(--biomech-cyan);
    color: var(--biomech-dark-1);
}

.camera-notification.error {
    background: var(--biomech-accent-red);
    color: white;
}

/* ==========================================================================
   OCULTAR EJERCICIOS NO LISTOS PARA PRODUCCIÓN
   ========================================================================== */

/* Ocultar rotación interna de cadera (no listo para producción) */
a[href*="hip"][href*="internal_rotation"],
.exercise-selection-card:has(a[href*="hip"][href*="internal_rotation"]) {
    display: none !important;
}
