/* ==========================================================================
   VENDRIX POS - AUTH STYLESHEET (SPLIT SCREEN & DUAL THEME)
   ========================================================================== */

/* Tema Claro (Por Defecto) */
:root {
    --bg-main: #ffffff;
    --bg-secondary: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --input-bg: #f1f5f9;
    
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-glow: rgba(37, 99, 235, 0.2);
    
    --visual-bg: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
}

/* Tema Oscuro */
[data-theme="dark"] {
    --bg-main: #09090b;
    --bg-secondary: #18181b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --input-bg: #0f172a;
    
    --accent: #3b82f6;
    --accent-hover: #60a5fa;
    --accent-glow: rgba(59, 130, 246, 0.3);
    
    --visual-bg: linear-gradient(135deg, #020617 0%, #1e3a8a 100%);
    --glass-bg: rgba(0, 0, 0, 0.2);
    --glass-border: rgba(255, 255, 255, 0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', 'Segoe UI', sans-serif; }

body { background-color: var(--bg-main); color: var(--text-primary); transition: background-color 0.3s ease, color 0.3s ease; }

/* --- ESTRUCTURA PRINCIPAL --- */
.auth-layout { display: flex; min-height: 100vh; position: relative; overflow: hidden; }

/* --- PANEL VISUAL (IZQUIERDA) --- */
.auth-visual { flex: 1.2; background: var(--visual-bg); position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 40px; }

/* ========================================
   🎨 FONDO ANIMADO CON ORBES FLOTANTES
   ======================================== */

.animated-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Orbes grandes de fondo */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    mix-blend-mode: screen;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: #60a5fa;
    top: -150px;
    left: -150px;
    animation: float-slow 20s infinite ease-in-out;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: #a78bfa;
    bottom: -100px;
    right: -100px;
    animation: float-slow 25s infinite ease-in-out reverse;
    animation-delay: -5s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: #38bdf8;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: float-slow 18s infinite ease-in-out;
    animation-delay: -10s;
}

.floating-shape {
    position: absolute;
    opacity: 0.15;
    mix-blend-mode: multiply;
}

.shape-1 {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, #fff 0%, transparent 70%);
    top: 20%;
    left: 10%;
    animation: drift 15s infinite ease-in-out;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, #fff 0%, transparent 70%);
    bottom: 20%;
    right: 10%;
    animation: drift 18s infinite ease-in-out reverse;
    animation-delay: -3s;
}

@keyframes float-slow {
    0% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(40px) scale(1.05); }
    100% { transform: translateY(0px) scale(1); }
}

@keyframes drift {
    0% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(30px, -30px) rotate(180deg); }
    100% { transform: translate(0, 0) rotate(360deg); }
}

/* ========================================
   📍 CONTENEDOR DE ICONOS FLOTANTES
   ======================================== */

.floating-icons {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 5;
    pointer-events: none;
}

.icon-float {
    position: absolute;
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.icon-float:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-10px) scale(1.1);
    color: rgba(255, 255, 255, 1);
}

.icon-float-1 {
    top: 15%;
    left: 10%;
    animation: bob 4s ease-in-out infinite;
}

.icon-float-2 {
    top: 60%;
    right: 8%;
    animation: bob 5s ease-in-out infinite;
    animation-delay: -1s;
}

.icon-float-3 {
    bottom: 15%;
    left: 8%;
    animation: bob 4.5s ease-in-out infinite;
    animation-delay: -2s;
}

.icon-float-4 {
    top: 40%;
    right: 15%;
    animation: bob 5.5s ease-in-out infinite;
    animation-delay: -1.5s;
}

@keyframes bob {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* ========================================
   💎 TARJETA DE CRISTAL MEJORADA
   ======================================== */

.visual-content {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 55px;
    color: white;
    max-width: 480px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.3),
        inset 1px 1px 0 rgba(255, 255, 255, 0.1);
    animation: slideInUp 0.8s ease-out;
    position: relative;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header de la tarjeta */
.card-header-premium {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 30px;
}

.brand-icon-wrapper {
    width: 90px;
    height: 90px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    animation: pulse-icon 3s ease-in-out infinite;
}

@keyframes pulse-icon {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(96, 165, 250, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(96, 165, 250, 0);
        transform: scale(1.05);
    }
}

.brand-logo-icon {
    font-size: 55px;
    color: #93c5fd;
    animation: rotation 8s linear infinite;
}

@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.visual-title {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #fff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.visual-subtitle {
    font-size: 15px;
    line-height: 1.7;
    opacity: 0.9;
    margin-bottom: 35px;
}

/* ========================================
   📋 LISTA DE CARACTERÍSTICAS MEJORADA
   ======================================== */

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 30px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    animation: featureSlide 0.6s ease-out backwards;
}

.feature-item:nth-child(1) { animation-delay: 0.1s; }
.feature-item:nth-child(2) { animation-delay: 0.2s; }
.feature-item:nth-child(3) { animation-delay: 0.3s; }

@keyframes featureSlide {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(8px);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #60a5fa, #60a5fa);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    flex-shrink: 0;
}

.feature-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.feature-title {
    font-size: 14px;
    font-weight: 700;
    display: block;
    color: #fff;
}

.feature-desc {
    font-size: 12px;
    opacity: 0.8;
    display: block;
    color: #d4d4ff;
}

/* ========================================
   🎖️ BADGE DE VERSIÓN
   ======================================== */

.version-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    width: fit-content;
    margin: 0 auto;
    animation: fadeInScale 1s ease-out 0.5s both;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- PANEL FORMULARIO (DERECHA) --- */
.auth-form-container { flex: 1; background-color: var(--bg-main); position: relative; display: flex; align-items: center; justify-content: center; padding: 40px; }
.form-wrapper { width: 100%; max-width: 400px; position: relative; }

.theme-toggle-wrapper { position: absolute; top: -10px; right: 0px; }
.theme-btn { background: var(--bg-secondary); border: 1px solid var(--border-color); color: var(--text-primary); width: 45px; height: 45px; border-radius: 50%; font-size: 22px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.3s ease; }
.theme-btn:hover { background: var(--border-color); }

/* --- ESTILOS DEL LOGO / AVATAR CENTRAL --- */
.form-brand-header { display: flex; justify-content: center; margin-bottom: 20px; margin-top: 15px; }
.brand-avatar {
    width: 90px;
    height: 90px;
    background-color: var(--bg-main);
    border: 2px solid var(--border-color);
    border-radius: 24px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}
.brand-avatar:hover { transform: translateY(-3px); box-shadow: 0 15px 30px rgba(0,0,0,0.12); }
.avatar-img { max-width: 100%; max-height: 100%; object-fit: contain; }
.avatar-icon { font-size: 55px; color: var(--accent); }

.centered-header { text-align: center; margin-bottom: 35px; }
.centered-header h1 { font-size: 26px; font-weight: 700; margin-bottom: 8px; color: var(--text-primary); }
.centered-header p { font-size: 14px; color: var(--text-secondary); }

/* --- INPUTS Y BOTONES --- */
.alert { padding: 14px 16px; border-radius: 10px; margin-bottom: 25px; font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 10px; }
.alert-danger { background-color: var(--danger-bg); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.3); }

.input-group { margin-bottom: 22px; }
.input-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.input-icon-wrapper { position: relative; }
.input-icon { position: absolute; top: 50%; left: 16px; transform: translateY(-50%); font-size: 20px; color: var(--text-secondary); transition: color 0.3s; }

.input-control { width: 100%; background-color: var(--input-bg); border: 1px solid var(--border-color); color: var(--text-primary); padding: 14px 16px 14px 45px; border-radius: 12px; font-size: 15px; transition: all 0.3s ease; outline: none; }
.input-control:focus { border-color: var(--accent); background-color: var(--bg-main); box-shadow: 0 0 0 4px var(--accent-glow); }
.input-control:focus + .input-icon, .input-control:not(:placeholder-shown) + .input-icon { color: var(--accent); }

.btn { display: flex; justify-content: center; align-items: center; gap: 8px; font-weight: 600; border: none; padding: 15px 24px; font-size: 16px; border-radius: 12px; cursor: pointer; transition: all 0.3s ease; }
.btn-block { width: 100%; }
.btn-primary { background-color: var(--accent); color: white; box-shadow: 0 4px 15px var(--accent-glow); }
.btn-primary:hover { background-color: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4); }

.form-footer { margin-top: 35px; text-align: center; font-size: 13px; color: var(--text-secondary); }
.form-footer i { margin-right: 5px; }

/* ==========================================================================
   DISEÑO MÓVIL PREMIUM
   ========================================================================== */
@media (max-width: 900px) {
    .auth-layout { flex-direction: column; justify-content: center; align-items: center; }
    .auth-visual { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; padding: 0; display: block; }
    .glass-card { display: none; }
    .auth-form-container { z-index: 2; background-color: transparent; padding: 20px; min-height: auto; width: 100%; }
    .form-wrapper { background-color: var(--bg-main); padding: 40px 30px; border-radius: 24px; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.6); border: 1px solid var(--border-color); }
    .theme-toggle-wrapper { top: 20px; right: 20px; }
}

/* --- ESTILOS PARA EL LOGO DINÁMICO DE LA EMPRESA (SI EXISTE) --- */
.custom-logo-desktop { max-width: 250px; max-height: 100px; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3)); margin-bottom: 10px; }
.custom-logo-mobile { max-width: 200px; max-height: 80px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)); }
[data-theme="dark"] .custom-logo-mobile { filter: drop-shadow(0 2px 4px rgba(255,255,255,0.1)); }