/* ================================================================
   LOGIN PAGE - PUNTOVENTAMX
   Pagina de inicio de sesion
   ================================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    overflow: hidden;
    background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%);
}

/* Contenedor principal */
.login-container {
    min-height: 100vh;
    display: flex;
    position: relative;
}

/* Lado izquierdo - Imagen/Fondo */
.left-side {
    flex: 1;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.9) 0%, rgba(56, 189, 248, 0.9) 100%),
                url('https://images.unsplash.com/photo-1557683316-973673baf926?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

/* Efecto de particulas animadas */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: float 15s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) translateX(100px); opacity: 0; }
}

/* Logo y texto del lado izquierdo */
.left-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
}

/* Logo Container */
.logo-container {
    margin-bottom: 30px;
    animation: fadeInDown 1s ease;
}

/* Cart Icon Animated */
.cart-icon-animated {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    animation: cartFloat 3s ease-in-out infinite;
}

.cart-icon-animated svg {
    width: 100%;
    height: 100%;
    fill: #ffffff;
    filter: drop-shadow(0 10px 30px rgba(255, 255, 255, 0.3));
}

@keyframes cartFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
        filter: drop-shadow(0 10px 30px rgba(255, 255, 255, 0.3));
    }
    50% {
        transform: translateY(-15px) scale(1.05);
        filter: drop-shadow(0 15px 40px rgba(255, 255, 255, 0.5));
    }
}

/* Brand Name Animated */
.brand-name-animated {
    font-size: 3rem !important;
    font-weight: 900 !important;
    color: white !important;
    letter-spacing: -1px;
    margin-bottom: 15px !important;
    text-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    animation: fadeInLeft 1s ease 0.2s both;
}

/* Barcode Animated */
.barcode-animated {
    height: 40px;
    display: flex;
    justify-content: center;
    gap: 3px;
    margin: 15px 0;
    animation: fadeInUp 1s ease 0.4s both;
}

.barcode-animated span {
    width: 4px;
    background: rgba(255, 255, 255, 0.9);
    display: inline-block;
    animation: barcodeFlicker 3s ease-in-out infinite;
}

.barcode-animated span:nth-child(odd) {
    height: 100%;
    animation-delay: 0s;
}

.barcode-animated span:nth-child(even) {
    height: 70%;
    align-self: flex-end;
    animation-delay: 0.1s;
}

.barcode-animated span:nth-child(3n) {
    height: 85%;
    animation-delay: 0.2s;
}

.barcode-animated span:nth-child(4n) {
    height: 60%;
    align-self: center;
    animation-delay: 0.3s;
}

@keyframes barcodeFlicker {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 1; }
}

.left-content p {
    font-size: 1.3rem;
    font-weight: 300;
    margin-bottom: 40px;
    opacity: 0.95;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    animation: fadeInLeft 1s ease 0.4s both;
}

.features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 40px;
    animation: fadeInUp 1s ease 0.6s both;
}

.feature-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.feature-item i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

/* Lado derecho - Formulario */
.right-side {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #ffffff;
    padding: 40px;
    position: relative;
}

/* Formulario con glassmorphism */
.login-form-wrapper {
    width: 100%;
    max-width: 450px;
    animation: fadeInRight 1s ease;
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.form-header .logo-small {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

.form-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.form-header p {
    color: #666;
    font-size: 0.95rem;
}

/* Estilo del formulario */
.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
    font-size: 0.9rem;
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #0ea5e9;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.form-control {
    width: 100%;
    padding: 15px 20px 15px 55px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-control:focus {
    outline: none;
    border-color: #0ea5e9;
    background: white;
    box-shadow: 0 5px 20px rgba(14, 165, 233, 0.2);
}

.form-control:focus + i {
    color: #0284c7;
    transform: translateY(-50%) scale(1.1);
}

.form-control.is-invalid {
    border-color: #dc3545;
    background: #fff5f5;
}

.invalid-feedback {
    display: block;
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 8px;
    padding-left: 20px;
}

/* Checkbox de recordar */
.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.remember-me {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
}

.remember-me label {
    margin: 0;
    cursor: pointer;
    font-size: 0.9rem;
    color: #666;
}

.forgot-password {
    color: #0ea5e9;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.forgot-password:hover {
    color: #0284c7;
    text-decoration: underline;
}

/* Boton de login */
.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(14, 165, 233, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.5);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-login:hover::before {
    width: 300px;
    height: 300px;
}

.btn-login span {
    position: relative;
    z-index: 1;
}

/* Atajos de teclado info */
.keyboard-hint {
    text-align: center;
    margin-top: 20px;
    color: #1a1a1a !important;
    font-size: 0.85rem;
    font-weight: 500;
}

.keyboard-hint kbd {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 2px 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    box-shadow: 0 2px 0 rgba(0,0,0,0.1);
    color: #0ea5e9;
    font-weight: 600;
}

/* Version del sistema */
.version-info {
    position: absolute;
    bottom: 20px;
    right: 20px;
    color: #999;
    font-size: 0.8rem;
}

/* Animaciones */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Efecto de loading */
.btn-login.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-login.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 992px) {
    .left-side {
        display: none;
    }

    .right-side {
        flex: 1;
    }

    .login-container {
        background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%);
    }

    .right-side {
        background: transparent;
    }

    .login-form-wrapper {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        padding: 40px;
        border-radius: 20px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    }
}

@media (max-width: 576px) {
    .left-content h1 {
        font-size: 2rem;
    }

    .left-content p {
        font-size: 1rem;
    }

    .login-form-wrapper {
        padding: 30px 20px;
    }

    .form-header h2 {
        font-size: 1.5rem;
    }

    .features {
        grid-template-columns: 1fr;
    }
}
