/* ============================================
   Login Moderno - imBroker
   Diseño con Glassmorphism y Gradientes
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-dark: #0A2143;
    --primary-darker: #0B1C33;
    --primary-cyan: #08A4EA;
    --white: #ffffff;
    --gray-light: #f4f7f6;
    --gray-medium: #e0e6e4;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --error: #e74c3c;
    --success: #27ae60;
}

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

body.login-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0B1C33 0%, #0A2143 25%, #08A4EA 50%, #0A2143 75%, #0B1C33 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 20px;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

/* Animación del gradiente de fondo */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Patrón de puntos decorativos */
body.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px, 80px 80px;
    opacity: 0.3;
    pointer-events: none;
}

/* Contenedor principal del login */
.login-container {
    width: 100%;
    max-width: 1100px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    overflow: visible;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-height: 600px;
    position: relative;
    z-index: 1;
}

/* Columna izquierda - Bienvenida */
.login-welcome {
    background: linear-gradient(135deg, rgba(10, 33, 67, 0.9) 0%, rgba(11, 28, 51, 0.9) 50%, rgba(8, 164, 234, 0.8) 100%);
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-welcome::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(8, 164, 234, 0.2) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.login-logo-section {
    position: relative;
    z-index: 1;
    margin-bottom: 40px;
}

.login-logo-section img {
    max-width: 200px;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.welcome-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 20px;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

.welcome-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.welcome-features {
    list-style: none;
    position: relative;
    z-index: 1;
}

.welcome-features li {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.welcome-features li i {
    color: var(--primary-cyan);
    font-size: 20px;
}

/* Columna derecha - Formulario */
.login-form-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-header {
    margin-bottom: 40px;
}

.form-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.form-header p {
    font-size: 16px;
    color: var(--text-light);
}

/* Mensaje de error */
.error-message {
    background: rgba(231, 76, 60, 0.1);
    border-left: 4px solid var(--error);
    color: var(--error);
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 14px;
    font-weight: 500;
}

/* Grupos de formulario */
.form-group-modern {
    margin-bottom: 25px;
    position: relative;
}

.form-group-modern label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.form-group-modern .input-wrapper {
    position: relative;
}

.form-group-modern input {
    width: 100%;
    height: 56px;
    padding: 0 20px 0 50px;
    font-size: 16px;
    color: var(--text-dark);
    background: var(--gray-light);
    border: 2px solid var(--gray-medium);
    border-radius: 12px;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.form-group-modern input:focus {
    outline: none;
    border-color: var(--primary-cyan);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(8, 164, 234, 0.1);
}

.form-group-modern .input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 18px;
    pointer-events: none;
    transition: color 0.3s ease;
}

.form-group-modern input:focus + .input-icon {
    color: var(--primary-cyan);
}

/* Recaptcha */
.recaptcha-wrapper {
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
}

/* Botones */
.btn-modern {
    width: 100%;
    height: 56px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary-modern {
    background: linear-gradient(135deg, var(--primary-cyan) 0%, #06a0d8 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(8, 164, 234, 0.3);
}

.btn-primary-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(8, 164, 234, 0.4);
}

.btn-primary-modern:active {
    transform: translateY(0);
}

.btn-secondary-modern {
    background: var(--white);
    color: var(--primary-cyan);
    border: 2px solid var(--primary-cyan);
}

.btn-secondary-modern:hover {
    background: var(--primary-cyan);
    color: var(--white);
}

/* Links */
.form-footer {
    margin-top: 30px;
    text-align: center;
    font-size: 14px;
    color: var(--text-light);
}

.form-footer a {
    color: var(--primary-cyan);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.form-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.recovery-link {
    display: inline-block;
    margin-bottom: 15px;
    color: var(--primary-cyan);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(8, 164, 234, 0.1);
}

.recovery-link:hover {
    background: rgba(8, 164, 234, 0.2);
    color: var(--primary-dark);
    transform: translateY(-2px);
}

.recovery-link i {
    margin-right: 8px;
}

.success-message {
    background: rgba(39, 174, 96, 0.1);
    border-left: 4px solid var(--success);
    color: var(--success);
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 14px;
    font-weight: 500;
}

/* Navegador no compatible */
.browser-warning {
    background: rgba(231, 76, 60, 0.1);
    border: 2px solid var(--error);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    color: var(--error);
    text-align: center;
}

.browser-warning a {
    display: inline-block;
    margin-top: 15px;
}

/* Responsive */
@media (max-width: 968px) {
    .login-container {
        grid-template-columns: 1fr;
        max-width: 500px;
        min-height: auto;
    }
    
    .login-welcome {
        padding: 40px 30px;
        min-height: auto;
    }
    
    .welcome-title {
        font-size: 32px;
        margin-bottom: 15px;
    }
    
    .welcome-subtitle {
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    .welcome-features {
        margin-top: 20px;
    }
    
    .welcome-features li {
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    .login-form-section {
        padding: 40px 30px;
    }
    
    .form-header {
        margin-bottom: 30px;
    }
    
    .form-header h2 {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    body.login-page {
        padding: 10px;
        min-height: 100vh;
        height: auto;
        align-items: flex-start;
        padding-top: 20px;
        padding-bottom: 20px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
    }
    
    .login-container {
        border-radius: 16px;
        min-height: auto;
        max-width: 100%;
        margin: 0;
        overflow: visible;
    }
    
    .login-welcome {
        padding: 25px 20px;
        min-height: auto;
    }
    
    .login-logo-section {
        margin-bottom: 25px;
        text-align: center;
    }
    
    .login-logo-section img {
        max-width: 150px;
    }
    
    .welcome-title {
        font-size: 24px;
        margin-bottom: 12px;
        text-align: center;
    }
    
    .welcome-subtitle {
        font-size: 14px;
        margin-bottom: 20px;
        text-align: center;
    }
    
    .welcome-features {
        margin-top: 15px;
    }
    
    .welcome-features li {
        font-size: 13px;
        margin-bottom: 10px;
    }
    
    .welcome-features li i {
        font-size: 16px;
    }
    
    .login-form-section {
        padding: 25px 20px;
    }
    
    .form-header {
        margin-bottom: 25px;
        text-align: center;
    }
    
    .form-header h2 {
        font-size: 22px;
        margin-bottom: 8px;
    }
    
    .form-header p {
        font-size: 14px;
    }
    
    .form-group-modern {
        margin-bottom: 20px;
    }
    
    .form-group-modern label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .form-group-modern input {
        height: 50px;
        padding: 0 15px 0 45px;
        font-size: 15px;
    }
    
    .form-group-modern .input-icon {
        left: 15px;
        font-size: 16px;
    }
    
    .recaptcha-wrapper {
        margin-bottom: 20px;
        overflow: hidden;
    }
    
    .recaptcha-wrapper > div {
        transform: scale(0.85);
        transform-origin: 0 0;
        margin-left: -10%;
    }
    
    .btn-modern {
        height: 50px;
        font-size: 15px;
    }
    
    .form-footer {
        margin-top: 25px;
        font-size: 13px;
    }
    
    .recovery-link {
        padding: 6px 12px;
        font-size: 13px;
        display: block;
        margin-bottom: 12px;
        text-align: center;
    }
    
    .form-footer a {
        font-size: 13px;
    }
    
    .error-message {
        padding: 12px 15px;
        font-size: 13px;
        margin-bottom: 20px;
    }
    
    .browser-warning {
        padding: 15px;
        font-size: 13px;
        margin-bottom: 20px;
    }
    
    .browser-warning p {
        margin-bottom: 8px;
        font-size: 12px;
    }
    
    .browser-warning img {
        max-width: 120px !important;
    }
    
    .success-message {
        padding: 12px 15px;
        font-size: 13px;
        margin-bottom: 20px;
    }
}

@media (max-width: 360px) {
    body.login-page {
        padding: 8px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
    }
    
    .login-welcome,
    .login-form-section {
        padding: 20px 15px;
    }
    
    .login-logo-section img {
        max-width: 120px;
    }
    
    .welcome-title {
        font-size: 22px;
    }
    
    .welcome-subtitle {
        font-size: 13px;
    }
    
    .form-header h2 {
        font-size: 20px;
    }
    
    .recaptcha-wrapper > div {
        transform: scale(0.75);
    }
}

