/**
 * ================================================================
 * LOGIN - puntoventamx
 * Estilo Apple: fondo luminoso con degradado sutil
 * Logo brillante, particulas, barcode, boton negro neon
 * ================================================================
 */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
    background: #f5f5f7;
}

.login-container {
    min-height: 100vh;
    display: flex;
}

/* ============================================
   IZQUIERDA - Luminoso con resplandor central
   ============================================ */
.left-panel {
    flex: 1;
    background: #2c2c2e;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

/* Resplandor central luminoso - MÁS INTENSO */
.left-panel::before {
    content: '';
    position: absolute;
    width: 700px;
    height: 700px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle,
        rgba(140, 160, 255, 0.35) 0%,
        rgba(100, 200, 255, 0.22) 25%,
        rgba(180, 140, 255, 0.15) 45%,
        rgba(255, 255, 255, 0.04) 65%,
        transparent 80%);
    border-radius: 50%;
    filter: blur(50px);
    animation: breatheLight 6s ease-in-out infinite;
}

/* Segundo resplandor - más visible */
.left-panel::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle,
        rgba(255, 255, 255, 0.12) 0%,
        rgba(200, 220, 255, 0.06) 40%,
        transparent 65%);
    border-radius: 50%;
    animation: breatheLight 6s ease-in-out infinite reverse;
}

@keyframes breatheLight {
    0%, 100% { transform: translate(-50%, -50%) scale(0.95); opacity: 0.85; }
    50%      { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}

/* Particulas */
.particles {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    bottom: -60px;
    animation: rise linear infinite;
}

@keyframes rise {
    0%   { transform: translateY(0) translateX(0) scale(1); opacity: 0; }
    10%  { opacity: 0.8; }
    90%  { opacity: 0.8; }
    100% { transform: translateY(-110vh) translateX(30px) scale(0.5); opacity: 0; }
}

/* Contenido */
.left-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 380px;
}

/* Logo brillante */
.logo-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 1.75rem;
    animation: logoFloat 5s ease-in-out infinite;
}

.logo-glow {
    position: absolute;
    inset: -25px;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(180, 200, 255, 0.7) 0%,
        rgba(150, 180, 255, 0.35) 35%,
        rgba(120, 160, 255, 0.12) 60%,
        transparent 75%);
    animation: glowBreath 3s ease-in-out infinite;
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 1;
    filter:
        drop-shadow(0 0 24px rgba(200, 215, 255, 0.8))
        drop-shadow(0 0 48px rgba(160, 180, 255, 0.45))
        drop-shadow(0 0 80px rgba(140, 160, 255, 0.2))
        drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25));
}

.logo-svg {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
    filter:
        drop-shadow(0 0 24px rgba(200, 215, 255, 0.8))
        drop-shadow(0 0 48px rgba(160, 180, 255, 0.45))
        drop-shadow(0 0 80px rgba(140, 160, 255, 0.2));
}

.logo-svg svg {
    width: 100%;
    height: 100%;
}

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

@keyframes glowBreath {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50%      { transform: scale(1.25); opacity: 1; }
}

/* Brand */
.brand-title {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: white;
    margin-bottom: 0.5rem;
}

/* Barcode */
.barcode {
    height: 32px;
    display: flex;
    justify-content: center;
    gap: 3px;
    margin: 0.75rem 0 1.25rem;
}

.barcode span {
    width: 3px;
    background: rgba(255, 255, 255, 0.5);
    display: inline-block;
    border-radius: 2px;
    animation: barPulse 2.5s ease-in-out infinite;
}

.barcode span:nth-child(odd) { height: 100%; }
.barcode span:nth-child(even) { height: 60%; align-self: flex-end; }
.barcode span:nth-child(3n) { height: 80%; }
.barcode span:nth-child(4n) { height: 50%; align-self: center; }

.barcode span:nth-child(1)  { animation-delay: 0s; }
.barcode span:nth-child(2)  { animation-delay: 0.04s; }
.barcode span:nth-child(3)  { animation-delay: 0.08s; }
.barcode span:nth-child(4)  { animation-delay: 0.12s; }
.barcode span:nth-child(5)  { animation-delay: 0.16s; }
.barcode span:nth-child(6)  { animation-delay: 0.2s; }
.barcode span:nth-child(7)  { animation-delay: 0.24s; }
.barcode span:nth-child(8)  { animation-delay: 0.28s; }
.barcode span:nth-child(9)  { animation-delay: 0.32s; }
.barcode span:nth-child(10) { animation-delay: 0.36s; }
.barcode span:nth-child(11) { animation-delay: 0.4s; }
.barcode span:nth-child(12) { animation-delay: 0.44s; }
.barcode span:nth-child(13) { animation-delay: 0.48s; }
.barcode span:nth-child(14) { animation-delay: 0.52s; }
.barcode span:nth-child(15) { animation-delay: 0.56s; }

@keyframes barPulse {
    0%, 100% { opacity: 0.5; transform: scaleY(1); }
    50%      { opacity: 1; transform: scaleY(1.15); }
}

.brand-tagline {
    font-size: 1.0625rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 2.5rem;
    font-weight: 400;
    line-height: 1.5;
}

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.625rem;
}

.feat {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.125rem 0.875rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: default;
}

.feat:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-3px);
}

.feat i {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.85);
}

.feat span {
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}

/* ============================================
   DERECHA - Formulario blanco
   ============================================ */
.right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    background: #ffffff;
    position: relative;
}

.form-wrapper {
    width: 100%;
    max-width: 420px;
}

.form-mobile-logo {
    display: none;
    text-align: center;
    margin-bottom: 2rem;
}

.form-mobile-logo img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.form-wrapper h2 {
    font-size: 2rem;
    font-weight: 800;
    color: #1d1d1f;
    letter-spacing: -0.03em;
    margin-bottom: 0.25rem;
}

.form-sub {
    color: #86868b;
    font-size: 0.9375rem;
    margin-bottom: 2rem;
}

/* ============================================
   CAMPOS
   ============================================ */
form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.field label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 0.375rem;
}

.field-input {
    position: relative;
}

.field-input i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #86868b;
    font-size: 1.125rem;
    transition: all 0.2s ease;
    z-index: 1;
}

.field-input input {
    width: 100%;
    padding: 0.9375rem 1rem 0.9375rem 3rem;
    border: 1.5px solid #d2d2d7;
    border-radius: 12px;
    font-size: 1rem;
    color: #1d1d1f;
    font-family: inherit;
    font-weight: 500;
    background: #fbfbfd;
    transition: all 0.25s ease;
    outline: none;
}

.field-input input::placeholder {
    color: #aeaeb2;
    font-weight: 400;
}

.field-input input:focus {
    background: #ffffff;
    border-color: #0071e3;
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12);
}

.field-input input:focus + i {
    color: #0071e3;
    transform: translateY(-50%) scale(1.1);
}

.field-input input.is-invalid {
    border-color: #ff3b30;
    background: #fff5f5;
}

.field-err {
    display: block;
    color: #ff3b30;
    font-size: 0.75rem;
    margin-top: 0.375rem;
    font-weight: 500;
}

/* ============================================
   OPTIONS
   ============================================ */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.remember input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #0071e3;
    cursor: pointer;
}

.remember label {
    margin: 0;
    font-size: 0.875rem;
    color: #6e6e73;
    font-weight: 500;
    cursor: pointer;
}

.forgot {
    color: #0071e3;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: color 0.2s;
}

.forgot:hover { color: #0077ed; }

/* ============================================
   BOTON NEGRO NEON
   ============================================ */
.btn-login {
    width: 100%;
    padding: 1rem;
    background: #1d1d1f;
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.0625rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 0.25rem;
    box-shadow:
        0 0 0 1px rgba(0, 113, 227, 0.2),
        0 0 24px rgba(0, 113, 227, 0.15),
        0 4px 16px rgba(0, 0, 0, 0.2);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow:
        0 0 0 1px rgba(0, 113, 227, 0.4),
        0 0 40px rgba(0, 113, 227, 0.3),
        0 0 80px rgba(0, 113, 227, 0.1),
        0 8px 24px rgba(0, 0, 0, 0.25);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow:
        0 0 0 1px rgba(0, 113, 227, 0.3),
        0 0 16px rgba(0, 113, 227, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-default {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
}

.btn-loading {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.spin { animation: spinAnim 0.8s linear infinite; }
@keyframes spinAnim { to { transform: rotate(360deg); } }

.btn-login.is-loading .btn-default { display: none; }
.btn-login.is-loading .btn-loading { display: flex; }
.btn-login.is-loading {
    pointer-events: none;
    box-shadow: 0 0 12px rgba(0, 113, 227, 0.1), 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ============================================
   HINT
   ============================================ */
.hint {
    text-align: center;
    margin-top: 1.25rem;
    color: #aeaeb2;
    font-size: 0.8125rem;
}

.hint kbd {
    background: #f5f5f7;
    border: 1px solid #d2d2d7;
    border-radius: 5px;
    padding: 2px 8px;
    font-family: inherit;
    font-size: 0.75rem;
    color: #1d1d1f;
    font-weight: 700;
    box-shadow: 0 1px 0 #c7c7cc;
}

.version {
    position: absolute;
    bottom: 1.25rem;
    right: 1.5rem;
    font-size: 0.6875rem;
    color: #c7c7cc;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .left-panel { display: none; }

    .login-container {
        background: #1d1d1f;
    }

    .right-panel {
        background: transparent;
    }

    .form-wrapper {
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 2.5rem 2rem;
        border-radius: 24px;
        box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
    }

    .form-mobile-logo { display: block; }
}

@media (max-width: 576px) {
    .right-panel { padding: 1.25rem; }
    .form-wrapper { padding: 2rem 1.5rem; border-radius: 20px; }
    .form-wrapper h2 { font-size: 1.5rem; }
}
