﻿/* login.css - Versión Moderna Corregida para Móviles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

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

body {
    background: linear-gradient(135deg, #0d3d47 0%, #1a5f6f 50%, #0d3d47 100%);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    /* CORRECCIÓN: Se cambió hidden por auto para permitir scroll vertical */
    overflow-y: auto;
    overflow-x: hidden;
}

/* Formas animadas de fondo */
.background-shapes {
    position: absolute; /* Cambiado a absolute para que no interfiera con el scroll */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none; /* Asegura que no bloquee clicks */
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    bottom: -50px;
    right: -50px;
    animation-delay: 7s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    top: 50%;
    left: 80%;
    animation-delay: 14s;
}

.shape-4 {
    width: 150px;
    height: 150px;
    top: 50%;
    left: 0%;
    animation-delay: 14s;
}

.shape-5 {
    width: 100px;
    height: 100px;
    top: 80%;
    left: 10%;
    animation-delay: 14s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 30px) scale(0.9);
    }
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1000px;
    /* Asegura margen en móviles si la pantalla es pequeña */
    margin-top: auto;
    margin-bottom: auto;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

    .login-card.fade-in {
        opacity: 1;
        transform: translateY(0);
    }

/* Sección de branding */
.login-branding {
    background: linear-gradient(135deg, #0d3d47 0%, #1a5f6f 100%);
    padding: 60px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

    .login-branding::before {
        content: '';
        position: absolute;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
        top: -50%;
        left: -50%;
        animation: rotate 30s linear infinite;
    }

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.brand-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
}

.logo-circle {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 36px;
    animation: pulse 2s ease-in-out infinite;
}

.logo-container-brand {
    margin-bottom: 24px;
}

.brand-logo {
    width: 140px;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
}

.brand-title {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 4px;
    letter-spacing: 2px;
}

.brand-highlight {
    color: #d4a55a;
    font-size: 38px;
}

.brand-subtitle {
    font-size: 16px;
    opacity: 0.95;
    margin-bottom: 8px;
    font-weight: 500;
    letter-spacing: 1px;
}

.brand-tagline {
    font-size: 13px;
    opacity: 0.85;
    margin-bottom: 40px;
    font-style: italic;
}

.feature-list {
    text-align: left;
    max-width: 280px;
    margin: 0 auto;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 14px;
}

    .feature-item i {
        margin-right: 12px;
        font-size: 18px;
        color: #d4a55a;
    }

/* Sección del formulario */
.login-form-section {
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.form-content {
    flex: 1;
}

.login-title {
    font-size: 32px;
    font-weight: 800;
    color: #1a202c;
    margin-bottom: 8px;
}

.login-subtitle {
    color: #718096;
    font-size: 14px;
    margin-bottom: 40px;
}

.login-form {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 24px;
}

.input-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #2d3748;
    margin-bottom: 10px;
}

.input-wrapper {
    position: relative;
}

    .input-wrapper i {
        position: absolute;
        left: 16px;
        top: 50%;
        transform: translateY(-50%);
        color: #a0aec0;
        font-size: 20px;
        transition: color 0.3s;
    }

.custom-input {
    width: 100%;
    background-color: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px 14px 48px;
    font-size: 15px;
    color: #2d3748;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
}

    .custom-input:focus {
        background-color: #ffffff;
        border-color: #1a5f6f;
        outline: none;
        box-shadow: 0 0 0 4px rgba(26, 95, 111, 0.1);
    }

        .custom-input:focus + .toggle-password,
        .custom-input:focus ~ i {
            color: #1a5f6f;
        }

.password-input {
    padding-right: 48px;
}

.toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    padding: 8px;
    transition: color 0.3s;
}

    .toggle-password:hover {
        color: #1a5f6f;
    }

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.remember-me {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #4a5568;
}

    .remember-me input[type="checkbox"] {
        margin-right: 8px;
        width: 18px;
        height: 18px;
        cursor: pointer;
    }

.forgot-password {
    font-size: 14px;
    color: #1a5f6f;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

    .forgot-password:hover {
        color: #d4a55a;
    }

.btn-login {
    width: 100%;
    background: linear-gradient(135deg, #0d3d47 0%, #1a5f6f 100%);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(13, 61, 71, 0.3);
}

    .btn-login::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: rgba(255, 255, 255, 0.2);
        transition: left 0.5s;
    }

    .btn-login:hover::before {
        left: 100%;
    }

    .btn-login:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 25px rgba(13, 61, 71, 0.4);
    }

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

.divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

    .divider::before,
    .divider::after {
        content: '';
        position: absolute;
        top: 50%;
        width: calc(50% - 60px);
        height: 1px;
        background: #e2e8f0;
    }

    .divider::before {
        left: 0;
    }

    .divider::after {
        right: 0;
    }

    .divider span {
        background: white;
        padding: 0 20px;
        color: #a0aec0;
        font-size: 13px;
        font-weight: 500;
    }

.btn-google {
    width: 100%;
    background: white;
    border: 2px solid #e2e8f0;
    padding: 14px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #2d3748;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

    .btn-google:hover {
        border-color: #cbd5e0;
        background: #f7fafc;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }

.signup-text {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: #718096;
}

    .signup-text a {
        color: #1a5f6f;
        text-decoration: none;
        font-weight: 600;
        transition: color 0.3s;
    }

        .signup-text a:hover {
            color: #d4a55a;
        }

.footer-text {
    text-align: center;
    margin-top: 20px;
    font-size: 12px;
    color: #a0aec0;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

/* Responsive Design */

/* Monitores grandes y pantallas 4K (1920px+) */
@media (min-width: 1920px) {
    .login-container {
        max-width: 1200px;
    }

    .login-card {
        border-radius: 32px;
    }

    .login-branding {
        padding: 80px 60px;
    }

    .login-form-section {
        padding: 80px 70px;
    }

    .brand-title {
        font-size: 52px;
    }

    .brand-subtitle {
        font-size: 20px;
    }

    .brand-logo {
        width: 180px;
    }

    .login-title {
        font-size: 38px;
    }

    .custom-input {
        padding: 18px 18px 18px 52px;
        font-size: 16px;
    }

    .btn-login {
        padding: 18px;
        font-size: 18px;
    }
}

/* Laptops y monitores estándar (1024px - 1919px) */
@media (min-width: 1024px) and (max-width: 1919px) {
    .login-container {
        max-width: 1000px;
    }
}

/* Tablets horizontales (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .login-container {
        max-width: 700px;
    }

    .login-card {
        grid-template-columns: 1fr;
    }

    .login-branding {
        padding: 50px 40px;
    }

    .brand-logo {
        width: 120px;
    }

    .brand-title {
        font-size: 36px;
    }

    .brand-subtitle {
        font-size: 15px;
    }

    .feature-list {
        max-width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .login-form-section {
        padding: 50px 40px;
    }

    .login-title {
        font-size: 28px;
    }
}

/* Tablets verticales (481px - 767px) */
@media (min-width: 481px) and (max-width: 767px) {
    body {
        /* CORRECCIÓN: Permitir alineación superior para scroll */
        align-items: flex-start;
    }

    .login-card {
        grid-template-columns: 1fr;
        margin-top: 20px;
        margin-bottom: 20px;
    }

    .login-branding {
        padding: 40px 30px;
    }

    .brand-logo {
        width: 100px;
    }

    .brand-title {
        font-size: 32px;
    }

    .brand-subtitle {
        font-size: 14px;
    }

    .brand-tagline {
        font-size: 12px;
    }

    .feature-list {
        display: none;
    }

    .login-form-section {
        padding: 40px 30px;
    }

    .login-title {
        font-size: 26px;
    }

    .login-subtitle {
        font-size: 13px;
    }

    .custom-input {
        padding: 13px 13px 13px 45px;
        font-size: 14px;
    }

    .btn-login {
        padding: 15px;
        font-size: 15px;
    }

    .btn-google {
        padding: 13px;
        font-size: 14px;
    }
}

/* Móviles (320px - 480px) */
@media (max-width: 480px) {
    body {
        padding: 15px;
        /* CORRECCIÓN: Alinear al inicio para evitar cortes al hacer scroll */
        align-items: flex-start;
        height: auto;
    }

    .background-shapes {
        display: none;
    }

    .login-container {
        margin: 20px 0;
    }

    .login-card {
        grid-template-columns: 1fr;
        border-radius: 20px;
        /* Permitir que la tarjeta crezca libremente */
        height: auto;
    }

    .login-branding {
        padding: 30px 20px;
    }

    .brand-logo {
        width: 80px;
    }

    .brand-title {
        font-size: 28px;
    }

    .brand-highlight {
        font-size: 26px;
    }

    .brand-subtitle {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .brand-tagline {
        font-size: 11px;
        margin-bottom: 30px;
    }

    .feature-list {
        display: none;
    }

    .login-form-section {
        padding: 30px 20px;
    }

    .login-title {
        font-size: 24px;
        margin-bottom: 6px;
    }

    .login-subtitle {
        font-size: 12px;
        margin-bottom: 30px;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .input-label {
        font-size: 13px;
        margin-bottom: 8px;
    }

    .input-wrapper i {
        font-size: 18px;
        left: 14px;
    }

    .custom-input {
        padding: 12px 12px 12px 42px;
        font-size: 14px;
        border-radius: 10px;
    }

    .toggle-password {
        right: 14px;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 20px;
    }

    .remember-me {
        font-size: 13px;
    }

    .forgot-password {
        font-size: 13px;
    }

    .btn-login {
        padding: 14px;
        font-size: 15px;
        border-radius: 10px;
    }

    .divider {
        margin: 24px 0;
    }

        .divider::before,
        .divider::after {
            width: calc(50% - 50px);
        }

        .divider span {
            font-size: 12px;
            padding: 0 15px;
        }

    .btn-google {
        padding: 12px;
        font-size: 14px;
        border-radius: 10px;
    }

        .btn-google svg {
            width: 18px;
            height: 18px;
        }

    .signup-text {
        font-size: 13px;
        margin-top: 20px;
    }

    .footer-text {
        font-size: 11px;
        margin-top: 16px;
        padding-top: 16px;
    }
}

/* Móviles muy pequeños (menos de 360px) */
@media (max-width: 359px) {
    body {
        padding: 10px;
        align-items: flex-start;
    }

    .login-container {
        margin: 10px 0;
    }

    .login-card {
        border-radius: 16px;
    }

    .login-branding {
        padding: 24px 16px;
    }

    .brand-logo {
        width: 70px;
    }

    .brand-title {
        font-size: 24px;
    }

    .brand-highlight {
        font-size: 22px;
    }

    .login-form-section {
        padding: 24px 16px;
    }

    .login-title {
        font-size: 22px;
    }

    .custom-input {
        padding: 11px 11px 11px 40px;
        font-size: 13px;
    }

    .btn-login {
        padding: 13px;
        font-size: 14px;
    }
}

/* Orientación horizontal en móviles y tablets */
@media (max-height: 600px) and (orientation: landscape) {
    body {
        align-items: flex-start;
        padding: 20px;
    }

    .login-card {
        grid-template-columns: 1fr 1fr;
        max-height: none;
        overflow-y: visible;
        margin-bottom: 20px;
    }

    .login-branding {
        padding: 30px 25px;
    }

    .brand-logo {
        width: 60px;
    }

    .brand-title {
        font-size: 24px;
    }

    .brand-subtitle {
        font-size: 12px;
        margin-bottom: 4px;
    }

    .brand-tagline {
        font-size: 10px;
        margin-bottom: 20px;
    }

    .feature-list {
        display: none;
    }

    .login-form-section {
        padding: 30px 25px;
    }

    .login-title {
        font-size: 22px;
        margin-bottom: 4px;
    }

    .login-subtitle {
        font-size: 11px;
        margin-bottom: 20px;
    }

    .form-group {
        margin-bottom: 16px;
    }

    .btn-login {
        padding: 12px;
    }

    .divider {
        margin: 16px 0;
    }
}

/* Print styles */
@media print {
    .background-shapes {
        display: none;
    }

    .login-card {
        box-shadow: none;
        border: 1px solid #e2e8f0;
    }
}
