/* ========================================================================== STAYU APP - LOGIN / ACCESS CONTROL (REDESIGN PREMIUM SAAS) Modern Dark UI | Glassmorphism | Mobile-Optimized ========================================================================== */
:root { 
/* Paleta base de la marca */
--auth-brand: #ff385c; --auth-brand-hover: #ff1f48; --auth-brand-2: #ff6b86; --auth-accent: #38bdf8; 
/* Tema Oscuro SaaS Premium */
--auth-bg-main: #030712; 
/* Fondo ultra oscuro */
--auth-surface: #0f172a; 
/* Paneles y tarjetas */
--auth-surface-hover: #1e293b; --auth-surface-glass: rgba(15, 23, 42, 0.65); 
/* Textos y Bordes */
--auth-text-main: #f8fafc; --auth-text-soft: #cbd5e1; --auth-text-muted: #64748b; --auth-border: rgba(255, 255, 255, 0.08); --auth-border-focus: rgba(255, 56, 92, 0.4); 
/* Sombras y Transiciones */
--auth-shadow-card: 0 25px 50px -12px rgba(0, 0, 0, 0.6); --auth-glow: 0 0 20px rgba(255, 56, 92, 0.15); --auth-ease: cubic-bezier(0.2, 0.8, 0.2, 1); }
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { min-height: 100%; scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; color: var(--auth-text-main); background-color: var(--auth-bg-main); background-image: radial-gradient(circle at 0% 0%, rgba(255, 56, 92, 0.06), transparent 40%), radial-gradient(circle at 100% 100%, rgba(56, 189, 248, 0.05), transparent 40%), radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.02), transparent 60%); background-attachment: fixed; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; }
/* Patrón sutil de fondo tipo grilla SaaS */
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px); background-size: 60px 60px; mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 90%); z-index: 0; }
/* ========================================================================== LOADER (Sincronización 0-100%) - Intacto estructuralmente ========================================================================== */
.stayu-loader-overlay { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity 0.35s ease, visibility 0.35s ease; background: rgba(3, 7, 18, 0.95); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.stayu-loader-overlay.active { opacity: 1; visibility: visible; }
.stayu-loader-content { width: min(560px, calc(100vw - 32px)); padding: 40px 32px; border-radius: 24px; border: 1px solid var(--auth-border); background: var(--auth-surface); box-shadow: var(--auth-shadow-card); text-align: center; animation: authRise 0.55s var(--auth-ease) forwards; }
.stayu-loader-brand { margin-bottom: 24px; color: #fff; font-size: 1.1rem; font-weight: 800; letter-spacing: -0.02em; }
.stayu-loader-brand span { color: var(--auth-brand); }
.stayu-loader-pct { margin-bottom: 20px; color: #fff; font-size: clamp(3rem, 8vw, 4.5rem); line-height: 1; font-weight: 900; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.stayu-loader-bar-bg { height: 8px; border-radius: 999px; overflow: hidden; background: rgba(255, 255, 255, 0.05); margin-bottom: 20px; }
.stayu-loader-bar-fill { width: 0%; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--auth-brand) 0%, var(--auth-accent) 100%); box-shadow: 0 0 15px rgba(255, 56, 92, 0.5); transition: width 0.1s linear; }
.stayu-loader-text { color: var(--auth-text-muted); font-size: 0.95rem; line-height: 1.5; font-weight: 500; }
/* ========================================================================== LAYOUT PRINCIPAL ========================================================================== */
.stayu-auth-shell { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px; position: relative; z-index: 1; }
.stayu-auth-card { width: min(1100px, 100%); min-height: 680px; display: flex; border-radius: 28px; background: var(--auth-surface-glass); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border: 1px solid var(--auth-border); box-shadow: var(--auth-shadow-card); overflow: hidden; }
.stayu-auth-left { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px; position: relative; }
/* Si la estructura original incluía panel derecho, esto lo formatea hermoso. Si no, se oculta sin romper nada */
.stayu-auth-right { flex: 1; display: none; 
/* Oculto por defecto si es 1 columna */
background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(3, 7, 18, 0.9)); position: relative; border-left: 1px solid var(--auth-border); overflow: hidden; }
@media (min-width: 900px) { 
/* Solo activamos el flex si el HTML tiene elementos dentro del panel derecho */
.stayu-auth-card:has(.stayu-auth-right > *) .stayu-auth-right { display: flex; align-items: center; justify-content: center; }
}
.stayu-auth-form-wrapper { width: 100%; max-width: 420px; animation: authRise 0.6s var(--auth-ease) both; }
/* ========================================================================== CABECERA Y MARCA ========================================================================== */
.stayu-auth-kicker { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; margin-bottom: 20px; border-radius: 999px; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08); color: var(--auth-text-soft); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }
.stayu-auth-kicker-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--auth-brand); box-shadow: 0 0 10px var(--auth-brand); animation: dotPulse 2s infinite; }
.stayu-auth-brand { display: flex; align-items: center; gap: 16px; margin-bottom: 32px; }
.stayu-brand-logo { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; color: #fff; background: linear-gradient(135deg, var(--auth-brand), var(--auth-brand-2)); box-shadow: var(--auth-glow); }
.stayu-auth-brand h2 { color: #fff; font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em; }
.stayu-auth-brand h2 span { color: var(--auth-brand); }
/* ========================================================================== TABS / SELECTOR DE MODO ========================================================================== */
.stayu-auth-mode-switch { display: flex; background: rgba(0, 0, 0, 0.2); border: 1px solid var(--auth-border); padding: 5px; border-radius: 16px; margin-bottom: 24px; }
.stayu-auth-mode-btn { flex: 1; border: none; background: transparent; padding: 10px 16px; border-radius: 12px; color: var(--auth-text-muted); font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all 0.3s var(--auth-ease); }
.stayu-auth-mode-btn:hover { color: var(--auth-text-main); }
.stayu-auth-mode-btn.is-active { background: var(--auth-surface-hover); color: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); }
/* ========================================================================== FORMULARIOS Y CAMPOS ========================================================================== */
.stayu-auth-panel-group { position: relative; }
.stayu-auth-panel { display: none; opacity: 0; transform: translateY(10px); transition: opacity 0.4s var(--auth-ease), transform 0.4s var(--auth-ease); }
.stayu-auth-panel.is-active { display: block; opacity: 1; transform: translateY(0); animation: panelReveal 0.4s var(--auth-ease) forwards; }
.stayu-form { display: flex; flex-direction: column; gap: 16px; }
.stayu-form-register { grid-template-columns: 1fr; 
/* Mejor en 1 columna para móviles, más limpio */
}
.stayu-field { display: flex; flex-direction: column; gap: 6px; }
.stayu-field label { color: var(--auth-text-soft); font-size: 0.85rem; font-weight: 500; margin-left: 4px; }
.stayu-field input { width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--auth-border); background: rgba(0, 0, 0, 0.15); color: #fff; font-size: 0.95rem; font-family: inherit; transition: all 0.2s var(--auth-ease); outline: none; }
.stayu-field input::placeholder { color: var(--auth-text-muted); }
.stayu-field input:focus { background: rgba(0, 0, 0, 0.3); border-color: var(--auth-brand); box-shadow: 0 0 0 4px rgba(255, 56, 92, 0.1); }
/* ========================================================================== BOTONES Y ACCIONES ========================================================================== */
.stayu-auth-options { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; margin-bottom: 8px; }
.stayu-checkbox { display: flex; align-items: center; gap: 8px; color: var(--auth-text-muted); font-size: 0.85rem; cursor: pointer; }
.stayu-checkbox input { width: 16px; height: 16px; accent-color: var(--auth-brand); cursor: pointer; }
.stayu-forgot-link { background: transparent; border: none; color: var(--auth-text-muted); font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: color 0.2s; }
.stayu-forgot-link:hover { color: var(--auth-text-main); text-decoration: underline; }
.stayu-btn-login { width: 100%; padding: 14px 20px; border-radius: 14px; border: none; background: var(--auth-brand); color: #fff; font-size: 1rem; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; transition: all 0.3s var(--auth-ease); box-shadow: 0 4px 14px rgba(255, 56, 92, 0.25); }
.stayu-btn-login:hover:not(:disabled) { background: var(--auth-brand-hover); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255, 56, 92, 0.35); }
.stayu-btn-login:disabled { opacity: 0.7; cursor: not-allowed; }
.g_id_signin { display: flex; justify-content: center; margin-bottom: 8px; }
.stayu-auth-divider { display: flex; align-items: center; text-align: center; margin: 20px 0; color: var(--auth-text-muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
.stayu-auth-divider::before, .stayu-auth-divider::after { content: ''; flex: 1; border-bottom: 1px solid var(--auth-border); }
.stayu-auth-divider span { padding: 0 16px; }
/* ========================================================================== FOOTER Y PANELES SECUNDARIOS ========================================================================== */
.stayu-register-intro { margin-bottom: 24px; }
.stayu-register-intro h3 { color: #fff; font-size: 1.25rem; font-weight: 700; }
.stayu-register-intro p { color: var(--auth-text-muted); font-size: 0.9rem; margin-top: 6px; }
.stayu-auth-footer { text-align: center; margin-top: 32px; font-size: 0.9rem; color: var(--auth-text-muted); }
.stayu-auth-footer a, .stayu-auth-back-link { color: var(--auth-brand); font-weight: 600; text-decoration: none; background: transparent; border: none; cursor: pointer; font-size: 0.9rem; }
.stayu-auth-footer a:hover, .stayu-auth-back-link:hover { text-decoration: underline; }
/* Mensajes de Alerta */
.stayu-login-note, .stayu-login-error, .stayu-auth-banner-visible { padding: 12px 16px; border-radius: 12px; font-size: 0.85rem; font-weight: 500; display: flex; align-items: center; gap: 12px; margin-bottom: 20px; animation: softRise 0.3s var(--auth-ease) forwards; }
.stayu-login-note.is-success { background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.2); color: #34d399; }
.stayu-login-error { background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.2); color: #f87171; }
.stayu-auth-banner-hidden { display: none; }
/* ========================================================================== ANIMACIONES ========================================================================== */
@keyframes authRise { from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes panelReveal { from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes dotPulse { 0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 56, 92, 0.4); }
70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(255, 56, 92, 0); }
100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 56, 92, 0); }
}
@keyframes softRise { from { opacity: 0; transform: translateY(-5px); }
to { opacity: 1; transform: translateY(0); }
}
/* ========================================================================== MEDIA QUERIES (RESPONSIVE EXTREMO PARA MÓVILES) ========================================================================== */
@media (max-width: 768px) { 
/* En móvil, hacemos que parezca una app nativa: sin bordes ni padding del contenedor */
.stayu-auth-shell { padding: 0; align-items: flex-start; 
/* Sube el formulario para evitar que lo tape el teclado */
}
.stayu-auth-card { border-radius: 0; border: none; background: var(--auth-bg-main); 
/* Fondo sólido nativo */
box-shadow: none; min-height: 100dvh; }
.stayu-auth-left { padding: 32px 24px; align-items: flex-start; 
/* Para pantallas pequeñas, alinear arriba */
}
.stayu-auth-form-wrapper { margin-top: 4vh; 
/* Ligero margen superior */
}
.stayu-auth-brand { margin-bottom: 24px; }
.stayu-auth-brand h2 { font-size: 1.5rem; }
.stayu-field input { padding: 16px; 
/* Campos más grandes, fáciles de tocar en móvil */
font-size: 1rem; 
/* Previene el auto-zoom de iOS */
}
.stayu-btn-login { padding: 16px; font-size: 1.05rem; }
.stayu-loader-content { width: calc(100vw - 40px); padding: 30px 20px; }
}
/* Optimización para teclados abiertos en móvil (dispositivos en modo paisaje/muy cortos) */
@media (max-height: 600px) { .stayu-auth-left { padding-top: 20px; padding-bottom: 20px; }
.stayu-auth-form-wrapper { margin-top: 0; }
.stayu-auth-brand { margin-bottom: 16px; }
}
