
:root {
    --bg-main: #0a0e13;
    --bg-gradient-1: #131820;
    --bg-gradient-2: #0f1419;
    
    --bg-card: rgba(20, 25, 32, 0.75);
    --bg-input: rgba(30, 36, 45, 0.6);
    --border-soft: rgba(249, 192, 11, 0.1);
    --border-glow: rgba(249, 192, 11, 0.3);

    --primary: #f9c00b;
    --primary-light: #ffd84d;
    --primary-dark: #d4a009;
    --accent: #ffb800;

    --text-main: #f8f9fa;
    --text-muted: #a0a8b3;
    --text-dim: #6c757d;

    --shadow-soft: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 10px 30px rgba(0, 0, 0, 0.3);
    --shadow-strong: 0 20px 60px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(249, 192, 11, 0.15);
}

/* ==========================================
   RESET & BASE
   ========================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    height: 100vh;
    overflow: hidden;
    background: 
        radial-gradient(ellipse at 20% 30%, rgba(249, 192, 11, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(249, 192, 11, 0.05) 0%, transparent 50%),
        linear-gradient(135deg, var(--bg-gradient-1) 0%, var(--bg-main) 50%, var(--bg-gradient-2) 100%);
    font-family: 'Inter', 'Red Hat Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-main);
    position: relative;
}

/* Partículas animadas de fondo */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(249, 192, 11, 0.03) 1px, transparent 1px),
        radial-gradient(circle at 80% 80%, rgba(249, 192, 11, 0.03) 1px, transparent 1px);
    background-size: 50px 50px, 80px 80px;
    animation: particleFloat 20s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes particleFloat {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Ocultar elementos externos */
.navbar,
.card {
    display: none !important;
}

/* ==========================================
   LAYOUT
   ========================================== */
.container-fluid,
.row {
    height: 100vh;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.image-big-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

/* Efecto de resplandor detrás de la imagen */
.image-big-container::before {
    content: '';
    position: absolute;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(249, 192, 11, 0.15), transparent 70%);
    filter: blur(60px);
    animation: pulseGlow 4s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

/* ==========================================
   LOGIN WRAPPER
   ========================================== */
.login-wrapper {
    position: relative;
    width: 100%;
    max-width: 460px;
    padding: 1rem 2rem;
    z-index: 10;
    max-height: 100vh;
    overflow-y: auto;
}

/* ==========================================
   IMAGEN FONDO MOBILE
   ========================================== */
.image-bg-mobile {
    display: none;
}

/* ==========================================
   FORMULARIO
   ========================================== */
#login-form {
    position: relative;
    background: linear-gradient(
        145deg,
        rgba(25, 31, 40, 0.85),
        rgba(20, 25, 32, 0.9)
    );
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-soft);
    border-radius: 24px;
    padding: 2.5rem 2.5rem 2rem;
    box-shadow:
        var(--shadow-strong),
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 0 1px rgba(249, 192, 11, 0.05);
    animation: fadeSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#login-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    border-radius: 0 0 8px 8px;
    opacity: 0.6;
}

#login-form:hover {
    transform: translateY(-2px);
    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 0 1px rgba(249, 192, 11, 0.1);
}

/* Logo */
.img-login-center {
    display: block;
    margin: 0 auto 1.5rem;
    height: 72px;
    filter: drop-shadow(0 4px 20px rgba(249, 192, 11, 0.4));
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Título */
.login-title {
    text-align: center;
    font-weight: 700;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    animation: titleShine 3s ease-in-out infinite;
}

@keyframes titleShine {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

/* ==========================================
   INPUTS MEJORADOS
   ========================================== */
.input-container {
    margin-bottom: 1.2rem;
    position: relative;
}

.input-container::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.3s ease;
    border-radius: 2px;
}

.input-container:focus-within::before {
    width: 100%;
}

input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 1rem 1.2rem;
    background: var(--bg-input);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 400;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

input:hover {
    border-color: rgba(249, 192, 11, 0.2);
    background: rgba(30, 36, 45, 0.8);
}

input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(30, 36, 45, 0.9);
    box-shadow: 
        0 0 0 4px rgba(249, 192, 11, 0.1),
        inset 0 2px 4px rgba(0, 0, 0, 0.1),
        0 4px 12px rgba(249, 192, 11, 0.15);
    transform: translateY(-1px);
}

/* Checkbox personalizado */
.form-check {
    margin-bottom: 1.2rem;
    padding-left: 0;
    display: flex;
    align-items: center;
}

.form-check-input {
    width: 18px;
    height: 18px;
    margin-right: 0.75rem;
    border: 2px solid var(--border-soft);
    border-radius: 5px;
    background: var(--bg-input);
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    position: relative;
}

.form-check-input:checked {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-color: var(--primary);
}

.form-check-input:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--bg-main);
    font-size: 12px;
    font-weight: 700;
}

.form-check-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.form-check-input:hover ~ .form-check-label,
.form-check-label:hover {
    color: var(--text-main);
}

/* ==========================================
   BOTÓN PREMIUM
   ========================================== */
.btn-login {
    width: 100%;
    padding: 1rem 1.5rem;
    margin-top: 1rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.02em;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: var(--bg-main);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 15px rgba(249, 192, 11, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(249, 192, 11, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 
        0 4px 15px rgba(249, 192, 11, 0.4),
        inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ==========================================
   TEXTO SECUNDARIO
   ========================================== */
.forgot-password-info {
    margin-top: 1.2rem;
    font-size: 0.85rem;
    text-align: center;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ==========================================
   IMAGEN DESKTOP
   ========================================== */
.image-big {
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    object-fit: contain;
    filter: drop-shadow(0 10px 50px rgba(249, 192, 11, 0.2));
    animation: imageFloat 6s ease-in-out infinite;
}

@keyframes imageFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(1deg); }
}

/* ==========================================
   RESPONSIVE
   ========================================== */

/* Tablet y móvil */
@media (max-width: 991.98px) {
    .image-big-container {
        display: none;
    }

    .image-bg-mobile {
        display: block;
        position: absolute;
        inset: 0;
        z-index: 0;
        border-radius: 24px;
        overflow: hidden;
    }

    .image-bg-mobile img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: 0.15;
        filter: blur(3px);
        transform: scale(1.1);
    }

    .image-bg-mobile::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(
            180deg,
            rgba(10, 14, 19, 0.9) 0%,
            rgba(20, 25, 32, 0.95) 100%
        );
    }

    #login-form,
    .img-login-center {
        position: relative;
        z-index: 1;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {
    .login-wrapper {
        padding: 1rem;
    }

    #login-form {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }

    .login-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .img-login-center {
        height: 64px;
        margin-bottom: 1.5rem;
    }

    input[type="email"],
    input[type="password"] {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }

    .btn-login {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }
}

/* ==========================================
   ANIMACIONES
   ========================================== */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ==========================================
   ACCESIBILIDAD
   ========================================== */
input:focus-visible,
button:focus-visible,
.form-check-input:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

/* Reducir animaciones para usuarios que lo prefieran */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================
   MEJORAS DE RENDIMIENTO
   ========================================== */
#login-form,
.btn-login,
input {
    will-change: transform;
}

/* Optimización de GPU */
.image-big,
.img-login-center {
    transform: translateZ(0);
    backface-visibility: hidden;
}