/* ==========================================================================
   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; }
.shape { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.5; animation: float 10s infinite ease-in-out alternate; }
.shape-1 { width: 400px; height: 400px; background: #60a5fa; top: -100px; left: -100px; }
.shape-2 { width: 300px; height: 300px; background: #93c5fd; bottom: -50px; right: -50px; animation-delay: -5s; }

@keyframes float { 0% { transform: translateY(0px) scale(1); } 100% { transform: translateY(30px) scale(1.1); } }

.glass-card { position: relative; z-index: 10; background: var(--glass-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--glass-border); border-radius: 24px; padding: 50px; color: white; max-width: 500px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3); }

/* --- CENTRADO DEL BRANDING DESKTOP --- */
.dynamic-brand-desktop { 
    margin-bottom: 25px; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    text-align: center; 
}
.brand-logo-icon { font-size: 55px; margin-bottom: 10px; color: #60a5fa; }
.visual-title { font-size: 32px; font-weight: 800; letter-spacing: 1px; margin-bottom: 0px; }

.visual-subtitle { font-size: 16px; line-height: 1.6; opacity: 0.9; margin-bottom: 30px; text-align: left; }

.feature-list { display: flex; flex-direction: column; gap: 15px; }
.feature-item { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; }
.feature-item i { font-size: 20px; color: #93c5fd; }

/* --- 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)); }