﻿/* ==============================================
   TRADUCEHOMBRES — Login
   Mobile-first · Rosa/Púrpura · Consistente con Index
   ============================================== */

/* -----------------------------------------------
   VARIABLES (igual que Index)
----------------------------------------------- */
:root {
    --th-primary: #e91e8c;
    --th-primary-dark: #c2185b;
    --th-purple: #9c27b0;
    --th-purple-dark: #7b1fa2;
    --th-gradient: linear-gradient(135deg, #e91e8c 0%, #9c27b0 100%);
    --th-gradient-soft: linear-gradient(135deg, #fce4ec 0%, #f3e5f5 100%);
    --th-bg: #fff8fc;
    --th-surface: #ffffff;
    --th-text: #1a1a2e;
    --th-text-soft: #6b6b8a;
    --th-border: rgba(233, 30, 140, 0.15);
    --th-shadow-sm: 0 2px 8px rgba(233, 30, 140, 0.08);
    --th-shadow-md: 0 8px 24px rgba(233, 30, 140, 0.12);
    --th-shadow-lg: 0 20px 48px rgba(233, 30, 140, 0.18);
    --th-radius: 20px;
    --th-radius-sm: 12px;
    --th-radius-xl: 32px;
    --th-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --th-transition: all 0.3s var(--th-ease);
    --th-font: 'Nunito', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.th-login-wrapper,
.th-login-wrapper * {
    font-family: var(--th-font) !important;
}

/* -----------------------------------------------
   BASE
----------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--th-bg);
    color: var(--th-text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100svh;
}

/* -----------------------------------------------
   FONDO CON BLOBS (igual que Index)
----------------------------------------------- */
.th-login-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.th-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.22;
    animation: blobFloat 8s ease-in-out infinite;
}

.th-blob--1 {
    width: 280px;
    height: 280px;
    background: var(--th-primary);
    top: -60px;
    right: -80px;
    animation-delay: 0s;
}

.th-blob--2 {
    width: 200px;
    height: 200px;
    background: var(--th-purple);
    bottom: 15%;
    left: -60px;
    animation-delay: -3s;
}

.th-blob--3 {
    width: 150px;
    height: 150px;
    background: #ff6b9d;
    bottom: 5%;
    right: 10%;
    animation-delay: -5s;
}

@keyframes blobFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(12px, -16px) scale(1.05);
    }

    66% {
        transform: translate(-8px, 10px) scale(0.97);
    }
}

/* -----------------------------------------------
   CONTENEDOR PRINCIPAL
----------------------------------------------- */
.th-login-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
}

/* -----------------------------------------------
   CARD LOGIN
----------------------------------------------- */
.th-login-card {
    width: 100%;
    max-width: 420px;
    background: var(--th-surface);
    border-radius: var(--th-radius-xl);
    box-shadow: var(--th-shadow-lg);
    border: 1.5px solid var(--th-border);
    padding: 2rem 1.75rem 1.75rem;
    animation: fadeInUp 0.5s var(--th-ease) both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* -----------------------------------------------
   CABECERA — Logo + Título
----------------------------------------------- */
.th-login-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.th-login-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    margin-bottom: 1.25rem;
}

.th-login-logo__icon {
    font-size: 2rem;
    line-height: 1;
}

.th-login-logo__text {
    font-size: 1.1rem;
    font-weight: 900;
    background: var(--th-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.th-login-title {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--th-text);
    margin-bottom: 0.35rem;
}

.th-login-subtitle {
    font-size: 0.88rem;
    color: var(--th-text-soft);
}

/* -----------------------------------------------
   BOTÓN GOOGLE
----------------------------------------------- */
.th-btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: var(--th-surface);
    border: 1.5px solid var(--th-border);
    border-radius: var(--th-radius-sm);
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--th-text);
    text-decoration: none;
    cursor: pointer;
    transition: var(--th-transition);
    box-shadow: var(--th-shadow-sm);
}

    .th-btn-google:hover {
        border-color: var(--th-primary);
        box-shadow: var(--th-shadow-md);
        transform: translateY(-2px);
        color: var(--th-text);
        text-decoration: none;
    }

    .th-btn-google svg {
        width: 18px;
        height: 18px;
        flex-shrink: 0;
    }

/* -----------------------------------------------
   DIVISOR
----------------------------------------------- */
.th-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0;
    color: var(--th-text-soft);
    font-size: 0.8rem;
}

    .th-divider::before,
    .th-divider::after {
        content: '';
        flex: 1;
        height: 1px;
        background: var(--th-border);
    }

/* -----------------------------------------------
   FORMULARIO
----------------------------------------------- */
.th-form-group {
    margin-bottom: 1.1rem;
}

.th-form-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--th-text-soft);
    margin-bottom: 0.45rem;
}

    .th-form-label i {
        color: var(--th-primary);
        font-size: 0.8rem;
    }

.th-form-input {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--th-bg);
    border: 1.5px solid var(--th-border);
    border-radius: var(--th-radius-sm);
    font-family: inherit;
    font-size: 0.92rem;
    color: var(--th-text);
    transition: var(--th-transition);
    outline: none;
    -webkit-appearance: none;
}

    .th-form-input:focus {
        border-color: var(--th-primary);
        background: var(--th-surface);
        box-shadow: 0 0 0 3px rgba(233, 30, 140, 0.1);
    }

    .th-form-input.is-invalid {
        border-color: #ef4444;
    }

/* Campo password con toggle */
.th-password-wrap {
    position: relative;
}

    .th-password-wrap .th-form-input {
        padding-right: 3rem;
    }

.th-password-toggle {
    position: absolute;
    right: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--th-text-soft);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    transition: var(--th-transition);
}

    .th-password-toggle:hover {
        color: var(--th-primary);
    }

/* -----------------------------------------------
   OPCIONES (recordarme + olvidaste)
----------------------------------------------- */
.th-form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.th-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    color: var(--th-text-soft);
    cursor: pointer;
    user-select: none;
}

    .th-checkbox-label input[type="checkbox"] {
        width: 15px;
        height: 15px;
        accent-color: var(--th-primary);
        cursor: pointer;
    }

.th-forgot-link {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--th-primary);
    text-decoration: none;
    transition: var(--th-transition);
}

    .th-forgot-link:hover {
        color: var(--th-primary-dark);
        text-decoration: underline;
    }

/* -----------------------------------------------
   ALERT DE ERROR
----------------------------------------------- */
.th-error-alert {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #fff3f3;
    border: 1px solid #fecaca;
    border-radius: var(--th-radius-sm);
    color: #ef4444;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

/* -----------------------------------------------
   CAPTCHA
----------------------------------------------- */
.th-captcha-wrap {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
}

/* -----------------------------------------------
   BOTÓN PRINCIPAL
----------------------------------------------- */
.th-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.95rem 1.5rem;
    background: var(--th-gradient);
    border: none;
    border-radius: var(--th-radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
    cursor: pointer;
    transition: var(--th-transition);
    box-shadow: 0 4px 16px rgba(233, 30, 140, 0.35);
    letter-spacing: 0.01em;
}

    .th-btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(233, 30, 140, 0.45);
    }

    .th-btn-primary:active {
        transform: translateY(0);
    }

    .th-btn-primary:disabled {
        opacity: 0.65;
        cursor: not-allowed;
        transform: none;
    }

/* -----------------------------------------------
   PIE DE TARJETA — registro
----------------------------------------------- */
.th-login-footer {
    text-align: center;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--th-border);
}

    .th-login-footer p {
        font-size: 0.85rem;
        color: var(--th-text-soft);
    }

.th-register-link {
    font-weight: 700;
    color: var(--th-primary);
    text-decoration: none;
    transition: var(--th-transition);
}

    .th-register-link:hover {
        color: var(--th-primary-dark);
        text-decoration: underline;
    }

/* -----------------------------------------------
   RESPONSIVE
----------------------------------------------- */
@media (min-width: 600px) {
    .th-login-card {
        padding: 2.5rem 2.25rem 2rem;
    }
}

/* -----------------------------------------------
   ACCESIBILIDAD
----------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    .th-blob {
        animation: none;
    }
}
