/* ================================================================
   auth/login.css
   Las imágenes pc.png / celular.png son el fondo completo.
   Solo se superpone contenido encima.
   ================================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Poppins:wght@500;600;700;800;900&display=swap');

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

html, body {
    height: 100%;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
}

/* ── Wrapper: pc.png como fondo de TODA la pantalla ──── */
.auth-wrapper {
    position: relative;
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;

    background-image: url('../../img/auth/pc.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* ── Columna izquierda (zona roja del PNG) ──────────── */
.auth-panel {
    width: 46%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem 0 2.5rem; /* Padding superior es 0 porque el header tiene posición absoluta */
    background: transparent;
    position: relative;
    overflow: hidden;
}

/* ── Contenedor Superior (Flecha + Logo) ────────────── */
.auth-header-top {
    position: absolute;
    top: 2rem;
    left: 2.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    z-index: 10;
}

/* Botón de regreso */
.auth-back {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,0.22);
    border: 2px solid rgba(255,255,255,0.6);
    color: #fff;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    backdrop-filter: blur(5px);
    transition: background .2s, transform .2s;
}
.auth-back:hover {
    background: rgba(255,255,255,0.38);
    color: #fff;
    transform: scale(1.08);
}

/* Logo blanco al lado de la flecha */
.auth-logo {
    width: 145px;
    filter: brightness(0) invert(1);
}

/* Grupo de Textos */
.auth-text-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem; /* Espaciado muy ajustado como en la referencia */
    margin-top: 24vh; /* Empuja el texto más hacia abajo */
    margin-bottom: auto;
}

/* Textos sobre la zona roja con tipografía Poppins (geométrica y moderna) */
.auth-panel-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2.3rem; /* Mucho más grande */
    font-weight: 800;
    color: #fff;
    text-align: center;
    line-height: 1.1;
    letter-spacing: -0.6px; /* Tracking ajustado */
}
.auth-panel-sub {
    font-family: 'Poppins', sans-serif;
    font-size: 1.05rem;
    font-weight: 500;
    color: rgba(255,255,255,0.92);
    text-align: center;
    max-width: 450px; /* Ampliado para que quede en 2 líneas exactas */
    line-height: 1.4;
    letter-spacing: -0.2px;
    margin-top: 0.4rem;
}

/* Personaje pegado abajo y 50% más grande */
.auth-personaje {
    width: 100%;
    max-width: 570px;
    display: block;
    margin-top: auto;
    margin-bottom: 0;
}

/* ── Columna derecha (zona blanca del PNG) ──────────── */
.auth-form-col {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 2.5rem;
    background: transparent;
    overflow-y: auto;
}

.auth-form-inner {
    width: 100%;
    max-width: 320px;
}

/* Título del formulario */
.auth-form-inner h1 {
    font-size: 1.7rem;
    font-weight: 800;
    color: #111;
    margin-bottom: 0.3rem;
}
.auth-sub {
    font-size: 0.84rem;
    color: #888;
    margin-bottom: 1.8rem;
}

/* Etiqueta */
.auth-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 0.2rem;
}

/* Input línea inferior */
.auth-input {
    width: 100%;
    border: none;
    border-bottom: 1.5px solid #ccc;
    padding: 0.55rem 0.1rem;
    font-size: 0.9rem;
    color: #111;
    background: transparent;
    outline: none;
    transition: border-color .2s;
    margin-bottom: 1.2rem;
    display: block;
}
.auth-input::placeholder { color: #bbb; }
.auth-input:focus { border-bottom-color: #FF0000; }

/* Fila Recordarme + olvidé */
.auth-check-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .82rem;
    color: #555;
    margin-bottom: 1.4rem;
}
.auth-check-row input { accent-color: #FF0000; }
.auth-forgot {
    margin-left: auto;
    font-size: .8rem;
    color: #FF0000;
    font-weight: 600;
    text-decoration: none;
}
.auth-forgot:hover { text-decoration: underline; }

/* Botón principal rojo */
.btn-rosver {
    display: block;
    width: 100%;
    background: #FF0000;
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .15s;
    margin-bottom: .5rem;
}
.btn-rosver:hover { background: #CC0000; transform: translateY(-1px); }

/* Divisor */
.auth-divider {
    display: flex;
    align-items: center;
    gap: .7rem;
    font-size: .78rem;
    color: #bbb;
    margin: 1.1rem 0;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e8e8e8;
}

/* Redes sociales */
.auth-social {
    display: flex;
    gap: .6rem;
    margin-bottom: 1rem;
}
.btn-social {
    flex: 1;
    border: 1.5px solid #e5e5e5;
    border-radius: 10px;
    padding: 8px;
    font-size: .82rem;
    font-weight: 600;
    color: #222;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: background .15s;
}
.btn-social:hover { background: #f5f5f5; }

/* Pie */
.auth-footer {
    text-align: center;
    font-size: .83rem;
    color: #777;
    margin-top: .8rem;
}
.auth-footer a {
    color: #FF0000;
    font-weight: 700;
    text-decoration: none;
}
.auth-footer a:hover { text-decoration: underline; }

/* Alertas inline (AJAX) */
.auth-alert {
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    font-size: 0.82rem;
    margin-bottom: 1rem;
}
.auth-alert-danger {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}
.auth-alert-success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.auth-match-hint {
    font-size: 0.75rem;
    margin: 0.15rem 0 1rem;
    min-height: 1.1rem;
}
.auth-match-ok { color: #15803d; font-weight: 600; }
.auth-match-error { color: #dc2626; font-weight: 600; }

/* Campo contraseña + desplegable */
.auth-field-wrap {
    position: relative;
    margin-bottom: 0.35rem;
}
.auth-field-wrap .auth-input {
    margin-bottom: 0;
}

.pwd-strength-dropdown {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 50;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    padding: 0.75rem 0.85rem;
    font-size: 0.78rem;
}
.pwd-strength-dropdown.is-visible {
    display: block;
}
.pwd-dropdown-title {
    font-weight: 700;
    color: #333;
    margin-bottom: 0.45rem;
}
.pwd-rules {
    list-style: none;
    padding: 0;
    margin: 0;
}
.pwd-rules li {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.2rem;
    color: #666;
}
.pwd-rules li:last-child { margin-bottom: 0; }
.pwd-rules li.pwd-ok { color: #15803d; }
.pwd-rules li.pwd-ok .bi { color: #15803d; }

/* Barra: Baja / Media / Segura */
.pwd-strength-bar {
    margin: 0.2rem 0 1rem;
    font-size: 0.78rem;
}
.pwd-strength-bar[hidden] {
    display: none !important;
}
.pwd-level {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}
.pwd-level-bar {
    flex: 1;
    height: 5px;
    border-radius: 4px;
    background: #e5e7eb;
    transition: background 0.2s ease;
}
.pwd-level-text {
    font-weight: 700;
    white-space: nowrap;
    min-width: 3.5rem;
    text-align: right;
}
.pwd-level-baja .pwd-level-text { color: #dc2626; }
.pwd-level-media .pwd-level-text { color: #d97706; }
.pwd-level-segura .pwd-level-text { color: #15803d; }

/* Google único — ancho completo */
.auth-social-single .btn-social {
    width: 100%;
}
.btn-social-disabled {
    opacity: 0.55;
    pointer-events: none;
    cursor: not-allowed;
}

/* ================================================================
   RESPONSIVE MÓVIL — celular.png como fondo, solo logo
   ================================================================ */
@media (max-width: 767px) {
    html, body { overflow-y: auto; }

    .auth-wrapper {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        background-image: url('../../img/auth/celular.png');
        background-size: 100% auto;
        background-position: top center;
    }

    /* Zona superior (roja): solo logo */
    .auth-panel {
        width: 100%;
        min-height: 220px;
        padding: 2rem 1rem 2.5rem;
        justify-content: center;
        align-items: center;
        background: transparent;
    }

    /* Ocultar personaje y textos en móvil */
    .auth-personaje,
    .auth-text-group { display: none; }

    /* Ajuste del contenedor de Logo y Flecha para móvil */
    .auth-header-top {
        position: static;
        display: block;
        width: 100%;
        text-align: center; /* Centra el logo horizontalmente */
        margin-bottom: 1.5rem;
    }

    /* Flecha anclada libremente arriba a la izquierda */
    .auth-back {
        position: absolute;
        top: 1.2rem;
        left: 1.2rem;
    }

    /* Logo centrado e independiente de la flecha */
    .auth-logo { 
        width: 190px; /* Agrandado un 10% */
        margin-top: 1rem; /* Subido para centrarlo en la zona roja */
        display: inline-block;
    }

    /* Zona inferior (blanca): formulario */
    .auth-form-col {
        background: #fff;
        border-radius: 28px 28px 0 0;
        padding: 2rem 1.5rem;
        margin-top: -10px;
    }
}
