/* Login Styles - Modern SaaS Login Page */

/* Variables CSS */
:root {
    --primary-color: #D8F9B8;
    --primary-hover: #D8F9B8;
    --primary-light: #dbeafe;
    --secondary-color: #6366f1;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: white;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --border-radius: 0.75rem;
    --border-radius-lg: 1rem;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background: #F3F2F1;
    min-height: 100vh;
    overflow-x: hidden;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

body.loaded {
    opacity: 1;
}

/* Container principal */
.login-container {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* Background decorativo */
.login-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    overflow: hidden;
}

.background-circles {
    position: relative;
    width: 100%;
    height: 100%;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    animation: float 6s ease-in-out infinite;
}

.circle-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.circle-2 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.circle-3 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 30%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-20px) scale(1.05);
    }
}

/* Elementos flotantes animados */
.floating-element {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: floatUp linear infinite;
}

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

/* Contenido principal */
.login-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    max-width: 1100px;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    min-height: 600px;
    animation: slideUp 0.6s ease-out;
}

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

/* Panel de branding (izquierdo) */
.login-branding {
    background-color: white;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: start;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.login-branding::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="rgba(255,255,255,0.05)" points="0,1000 1000,0 1000,1000"/></svg>');
    background-size: cover;
}

.branding-content {
    position: relative;
    z-index: 2;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.brand-logo i {
    font-size: 2.5rem;
    background: #EFF0F6;
    padding: 1rem;
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
}

.logo-image-login{
    width: 300px;
}

.logo-image-signup{
    width: 300px;
}

.branding-text h2 {
    font-size: 1.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.2;
    color:#161616;
}

.branding-text p {
    font-size: 1.125rem;
    opacity: 0.9;
    line-height: 1.6;
    margin-bottom: 2rem;
    color:#161616;
}

.branding-features {
    display: grid;
    gap: 1rem;
    color:#161616
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #EFF0F6;
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.feature:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
}

.feature i {
    font-size: 1.25rem;
    opacity: 0.9;
}

.feature span {
    font-weight: 500;
}

/* Panel del formulario (derecho) */
.login-form-panel {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #161616;
}

.login-form-content {
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

/* Header del formulario */
.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header h3 {
    font-size: 1.875rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--gray-600);
    font-size: 1rem;
    line-height: 1.5;
}

/* Notificaciones */
.login-notifications {
    margin-bottom: 1.5rem;
}

.notification {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.notification-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.notification-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.notification-info {
    background: var(--primary-light);
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* Formulario de login */
.login-form {
    margin-bottom: 2rem;
}

.google-login-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.google-login-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

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

.google-login-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.google-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-spinner {
    position: absolute;
    right: 1rem;
}

.login-help {
    margin-top: 1.5rem;
    text-align: center;
}

.help-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-600);
    margin: 0;
}

.help-text i {
    color: var(--success-color);
}

/* Footer del formulario */
.form-footer {
    text-align: center;
    border-top: 1px solid var(--gray-200);
    padding-top: 1.5rem;
    margin-top: 35px;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.footer-link {
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--primary-color);
}

.footer-separator {
    color: var(--gray-400);
}

.footer-note {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin: 0;
}

.support-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.support-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Media queries responsivas mejoradas */

/* Tablet landscape y desktop pequeño */
@media (max-width: 1024px) {
    .login-content {
        max-width: 900px;
    }
    
    .login-branding,
    .login-form-panel {
        padding: 2rem;
    }
}

/* Tablet portrait */
@media (max-width: 768px) {
    .login-container {
        padding: 1rem;
    }
    
    .login-content {
        grid-template-columns: 1fr;
        max-width: 500px;
        min-height: auto;
        /* Reorganizar el orden en mobile */
        display: flex;
        flex-direction: column;
    }
    
    /* Reorganizar el orden de los elementos en mobile */
    .login-branding {
        order: 2; /* Las características van al final */
        padding: 2rem 2rem 3rem 2rem;
        background: var(--gray-50);
        border-radius: 0;
    }
    
    .login-form-panel {
        order: 1; /* El formulario va primero */
        padding: 3rem 2rem 2rem 2rem;
    }
    
    /* Ajustar el branding para mobile */
    .branding-content {
        text-align: center;
    }
    
    .brand-logo {
        justify-content: center;
        margin-bottom: 1.5rem;
    }
    
    .brand-logo i {
        font-size: 2rem;
        color: var(--primary-color);
    }
    
    .brand-logo h1 {
        font-size: 1.5rem;
        color: var(--gray-800);
    }
    
    .branding-text {
        margin-bottom: 2rem;
    }
    
    .branding-text h2 {
        font-size: 1.25rem;
        color: #161616;
        margin-bottom: 0.5rem;
    }
    
    .branding-text p {
        font-size: 0.875rem;
        color: #161616;
    }
    
    .branding-features {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .feature {
        background: var(--white);
        padding: 1rem;
        border-radius: var(--border-radius);
        box-shadow: var(--shadow-sm);
        border: 1px solid var(--gray-200);
    }
    
    .feature i {
        color: var(--primary-color);
        font-size: 1.125rem;
        margin-bottom: 0.5rem;
    }
    
    .feature span {
        color: var(--gray-700);
        font-size: 0.875rem;
        font-weight: 500;
    }
    
    /* Ajustar el formulario para mobile */
    .form-header h3 {
        font-size: 1.5rem;
        text-align: center;
    }
    
    .form-header p {
        text-align: center;
        font-size: 0.875rem;
    }
}

/* Mobile pequeño */
@media (max-width: 480px) {
    .login-container {
        padding: 0.5rem;
    }
    
    .login-content {
        border-radius: 0.5rem;
        max-width: 100%;
        margin: 0;
    }
    
    .login-branding,
    .login-form-panel {
        padding: 1.5rem;
    }
    
    /* Hacer el logo más prominente en mobile */
    .brand-logo {
        margin-bottom: 2rem;
    }
    
    .brand-logo i {
        font-size: 2.5rem;
        margin-bottom: 0.5rem;
    }
    
    .brand-logo h1 {
        font-size: 1.75rem;
        font-weight: 700;
    }
    
    /* Botón de Google más grande en mobile */
    .google-login-btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        min-height: 56px;
    }
    
    /* Features en una sola columna en mobile pequeño */
    .branding-features {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .feature {
        padding: 0.75rem;
        text-align: center;
    }
    
    /* Ajustar círculos de fondo para mobile */
    .circle-1 {
        width: 120px;
        height: 120px;
        top: 5%;
        left: 5%;
    }
    
    .circle-2 {
        width: 80px;
        height: 80px;
        top: 70%;
        right: 10%;
    }
    
    .circle-3 {
        width: 60px;
        height: 60px;
        bottom: 15%;
        left: 20%;
    }
    
    /* Header del formulario más compacto */
    .form-header {
        margin-bottom: 2rem;
    }
    
    .form-header h3 {
        font-size: 1.375rem;
        margin-bottom: 0.5rem;
    }
    
    .form-header p {
        font-size: 0.8125rem;
        line-height: 1.5;
    }
}

/* Mobile extra pequeño */
@media (max-width: 360px) {
    .login-branding,
    .login-form-panel {
        padding: 1rem;
    }
    
    .brand-logo h1 {
        font-size: 1.5rem;
    }
    
    .branding-text h2 {
        font-size: 1.125rem;
    }
    
    .google-login-btn {
        font-size: 0.9375rem;
        padding: 0.875rem 1.25rem;
    }
}

/* Header mobile - oculto por defecto */
.mobile-header {
    display: none;
}

/* Animación suave para la transición de elementos */
.login-branding,
.login-form-panel,
.mobile-header {
    transition: var(--transition);
}

/* Añadir una sección especial para el header mobile */
@media (max-width: 768px) {
    /* Crear un header mobile especial que contenga logo + nombre */
    .mobile-header {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 2rem 2rem 1rem 2rem;
        background: white;
        border-bottom: 1px solid var(--gray-200);
        order: 0; /* Va primero de todo */
    }
    
    .mobile-header .brand-logo {
        margin-bottom: 0;
    }
    
    .mobile-header .brand-logo i {
        font-size: 3rem;
        color: var(--primary-color);
        margin-bottom: 0.75rem;
        display: block;
    }
    
    .mobile-header .brand-logo h1 {
        font-size: 2rem;
        font-weight: 700;
        color: var(--gray-800);
        margin: 0;
        letter-spacing: -0.025em;
    }
    
    /* Ocultar el logo del branding en mobile para evitar duplicación */
    .login-branding .brand-logo {
        display: none;
    }
    
    /* Ajustar el espaciado del formulario en mobile */
    .login-form-panel .login-form-content {
        padding-top: 0;
    }
    
    /* Mejorar la separación visual entre secciones */
    .login-form-panel {
        border-bottom: 1px solid var(--gray-200);
    }
    .login-branding{
        display:none;
    }
}

/* Asegurar que el dark mode funcione bien */
@media (prefers-color-scheme: dark) {
    :root {
        --gray-50: #1f2937;
        --gray-100: #374151;
        --gray-200: #4b5563;
        --gray-300: #6b7280;
        --gray-400: #9ca3af;
        --gray-500: #d1d5db;
        --gray-600: #e5e7eb;
        --gray-700: #f3f4f6;
        --gray-800: #f9fafb;
        --gray-900: #ffffff;
        --white: #1f2937;
    }
}

/* Reducir animaciones para usuarios que lo prefieran */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .floating-element {
        display: none;
    }
}

/* Mejorar la accesibilidad con focus visible */
.google-login-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.footer-link:focus-visible,
.support-link:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Estados de loading mejorados */
.google-login-btn.loading {
    background-color: var(--gray-100);
    color: var(--gray-400);
}

.google-login-btn.loading .login-text {
    opacity: 0.5;
}

/* Animaciones escalonadas para las features */
.feature:nth-child(1) { animation-delay: 0.1s; }
.feature:nth-child(2) { animation-delay: 0.2s; }
.feature:nth-child(3) { animation-delay: 0.3s; }
.feature:nth-child(4) { animation-delay: 0.4s; }

/* Efecto hover mejorado para el botón */
.google-login-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s;
    pointer-events: none;
}

.google-login-btn:hover:before {
    transform: translateX(100%);
}

/* Animación de pulso sutil */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

.google-login-btn.loading {
    animation: pulse 2s infinite;
}

/* Mejorar las notificaciones */
.notification {
    animation: slideDownNotification 0.5s ease-out;
    border-left: 4px solid;
    padding-left: 1rem;
}

@keyframes slideDownNotification {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ajustes finales para mobile */
@media (max-width: 480px) {
    .login-content {
        box-shadow: none;
        border-radius: 0;
        min-height: 100vh;
    }
    
    .login-container {
        padding: 0;
        align-items: stretch;
    }
} 

.signup-link{
    color:#D8F9B8;
}

.signup-link-header {
    color: #D8F9B8;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.signup-link-header:hover {
    color: #C5E89A;
    text-decoration: underline;
}

#emailLoginBtn, .full-width-btn {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    background: #D8F9B8;
    border: 1px solid #D8F9B8;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #161616;
    transition: var(--transition);
}

#emailLoginBtn:hover, .full-width-btn:hover {
    background: #161616;
    color: white;
    border: 1px solid white;
}

.login-separator {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    text-align: center;
}

.login-separator::before,
.login-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-300);
}

.login-separator span {
    padding: 0 1rem;
    color: var(--gray-500);
    font-size: 0.875rem;
    font-weight: 500;
}

.forgot-password-link {
    text-align: center;
    margin-top: 1rem;
}

.forgot-link {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
}

.forgot-link:hover {
    color: #D8F9B8;
    text-decoration: underline;
}

/* Password reset specific styles */
.password-input-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
    font-size: 1rem;
    padding: 4px;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #374151;
}

.password-requirements {
    margin-top: 0.5rem;
}

.password-requirements small {
    color: #6b7280;
    font-size: 0.75rem;
}

.back-to-login {
    text-align: center;
    margin-bottom: 1rem;
}

.back-to-login p {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0;
}

/* Ajustar padding para inputs con toggle */
.password-input-container input {
    padding-right: 3rem;
}

/* Estilos específicos para páginas de password reset */
.login-form-panel .form-group label {
    color: #f7f7f7 !important;
    font-weight: 500;
    font-size: 14px;
}

.login-form-panel .form-group input[type="text"],
.login-form-panel .form-group input[type="email"],
.login-form-panel .form-group input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fff;
    box-sizing: border-box;
    color: #161616;
}

.login-form-panel .form-group input:focus {
    outline: none;
    border-color: #D8F9B8;
    box-shadow: 0 0 0 3px rgba(216, 249, 184, 0.1);
}

.login-form-panel .form-group input::placeholder {
    color: #9ca3af;
    opacity: 1;
}
