/* ===== Página ===== */
.auth-page {
    min-height: 100vh;
    background: #0a1a3a;
    display: flex;
    flex-direction: column;
}
 
/* ===== Header ===== */
.login-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    box-sizing: border-box;
}
 
.login-header .logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}


 /* tamaño logo (el mismo logo2.png del index, es ancho: se fija el alto y el ancho se ajusta solo) */
.login-header .logo-img {
    height: 68px;
    width: auto;
    object-fit: contain;
}
 
.login-header .logo-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #eafcff;
}
 
.login-header .btn-volver {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #1db87e, #0d954a);
    color: #1a2535;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 15px 30px;
    border-radius: 8px;
    box-shadow: 0 0 18px rgba(29, 184, 126, 0.4);
    transition: all 0.2s ease;
}
 
.login-header .btn-volver:hover {
    box-shadow: 0 0 26px rgba(29, 184, 126, 0.6);
    transform: translateX(-2px);
}
 
/* ===== Footer ===== */
.login-footer {
    text-align: center;
    color: #e8f0f8;
    font-size: 0.78rem;
    padding: 20px 16px;
    background: linear-gradient(176deg, #0a1f6e 8%, #0d2a5e 42%, #0a1a3a 92%);
}
 
.auth-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}
 
/* ===== Card partida ===== */
.auth-wrapper {
    position: relative;
    width: min(920px, 94vw);
    min-height: 500px;
    background: #0d2140;
    border: 2px solid #1db87e;
    border-radius: 18px;
    box-shadow: 0 0 30px rgba(29, 184, 126, 0.4), 0 0 60px rgba(29, 184, 126, 0.12);
    overflow: hidden;
    display: flex;
}
 
/* Lado del formulario */
.auth-form-side {
    flex: 1 1 55%;
    padding: 48px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
}
 
.auth-form-side h1 {
    color: #eafcff;
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 6px;
}
 
.auth-form-side .subtitle {
    color: rgba(234, 252, 255, 0.55);
    font-size: 14px;
    margin-bottom: 24px;
}
 
/* Lado informativo */
.auth-info-side {
    flex: 1 1 45%;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #eafcff;
    background: linear-gradient(160deg, #0a1a3a 0%, #0d954a 60%, #1db87e 100%);
}

.auth-info-side::before {
    content: "";
    position: absolute;
    inset: -30%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.35), transparent 55%);
    z-index: -1;
    pointer-events: none;
    animation: auroraGlow 7s ease-in-out infinite;
}

@keyframes auroraGlow {
    0%   { transform: translate(0%, 0%) scale(1); }
    50%  { transform: translate(20%, 15%) scale(1.15); }
    100% { transform: translate(0%, 0%) scale(1); }
}
 
.auth-info-side--right {
    clip-path: polygon(18% 0, 100% 0, 100% 100%, 0% 100%);
    margin-left: -70px;
    padding: 48px 44px 48px 110px;
}
 
.auth-info-side--left {
    order: -1;
    clip-path: polygon(0 0, 82% 0, 100% 100%, 0% 100%);
    margin-right: -70px;
    padding: 48px 110px 48px 44px;
}
 
.auth-info-side h2 {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 12px;
    color: #ffffff;
}
 
.auth-info-side p {
    font-size: 14px;
    line-height: 1.55;
    max-width: 240px;
    color: rgba(255, 255, 255, 0.85);
}

/* Botón dentro del panel verde para alternar login/registro */
.info-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
    background: #dca309;
    color: #000000fc;
    font-weight: 700;
    font-size: 14px;
    padding: 10px 22px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    transition: transform .15s, box-shadow .15s;
}

.info-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}
 
/* ===== Inputs ===== */
.auth-form-side label {
    color: rgba(234, 252, 255, 0.7);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
    display: block;
}
 
.auth-form-side .input-group {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(234, 252, 255, 0.18);
    border-radius: 30px;
    padding: 11px 18px;
    margin-bottom: 6px;
    transition: border-color .15s;
}
 
.auth-form-side .input-group:focus-within {
    border-color: #1db87e;
}
 
.auth-form-side .input-group.input-error {
    border-color: #ef4444;
}
 
.auth-form-side .input-group i {
    color: rgba(234, 252, 255, 0.5);
    font-size: 14px;
    width: 16px;
    text-align: center;
    transition: color .2s ease, transform .2s ease;
}

.auth-form-side .input-group:focus-within i:first-child {
    color: #1db87e;
    transform: scale(1.15);
}
 
.auth-form-side .input-group input {
    background: transparent;
    border: none;
    outline: none;
    color: #eafcff;
    width: 100%;
    font-size: 14px;
}
 
.auth-form-side .input-group input::placeholder {
    color: rgba(234, 252, 255, 0.3);
}
 
.auth-form-side .field-error {
    display: block;
    color: #ff9d9d;
    font-size: 12px;
    margin-bottom: 14px;
    min-height: 14px;
}
 
.auth-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 12px;
}
 
/* ===== Botón ===== */
.auth-btn {
    width: 100%;
    border: none;
    border-radius: 30px;
    padding: 13px;
    margin-top: 10px;
    background: linear-gradient(135deg, #1db87e, #0d954a);
    color: #000000;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 0 18px rgba(29, 184, 126, 0.4);
    transition: transform .15s, box-shadow .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
 
.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 26px rgba(29, 184, 126, 0.6);
}

.auth-btn:disabled {
    cursor: not-allowed;
    opacity: .85;
    transform: none;
}

.auth-btn .btn-spinner {
    display: none;
    width: 15px;
    height: 15px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: btnSpin .6s linear infinite;
}

.auth-btn.is-loading .btn-spinner {
    display: inline-block;
}

@keyframes btnSpin {
    to { transform: rotate(360deg); }
}

/* Ícono de mostrar/ocultar contraseña */
.auth-form-side .input-group .toggle-password {
    cursor: pointer;
    pointer-events: auto;
}

.auth-form-side .input-group .toggle-password:hover {
    color: #1db87e;
}
 
/* ===== Links y textos secundarios ===== */
.auth-form-side .forgot-password,
.auth-form-side .register a,
.auth-form-side .register p a {
    color: #3ddc97;
    text-decoration: none;
    font-size: 13px;
}
 
.auth-form-side .forgot-password:hover,
.auth-form-side .register a:hover {
    text-decoration: underline;
}
 
.auth-form-side .forgot-password {
    display: block;
    text-align: center; /* Alinea el enlace al centro */
    margin-top: 14px;
}
 
.auth-form-side .register {
    margin-top: 22px;
    text-align: center;
}
 
.auth-form-side .register p {
    color: rgba(234, 252, 255, 0.55);
    font-size: 13px;
}
 
/* ===== Alertas ===== */
.auth-form-side .alert {
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 16px;
    border: 1px solid transparent;
}
 
.auth-form-side .alert-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #ff9d9d;
    border-color: rgba(239, 68, 68, 0.3);
}
 
.auth-form-side .alert-success {
    background: rgba(29, 184, 126, 0.12);
    color: #3ddc97;
    border-color: rgba(29, 184, 126, 0.3);
}
 
.auth-form-side .alert ul {
    padding-left: 18px;
    margin: 0;
}
 
/* ===== Responsive ===== */
@media (max-width: 760px) {
    .auth-wrapper {
        flex-direction: column;
        min-height: 0;
    }
 
    .auth-info-side--right,
    .auth-info-side--left {
        order: 0;
        clip-path: none;
        margin: 0;
        padding: 32px 32px 40px;
    }
 
    .auth-info-side p {
        max-width: none;
    }
 
    .auth-form-side {
        padding: 32px 28px;
        order: 1;
    }
 
    .auth-fields-grid {
        grid-template-columns: 1fr;
    }
}
 
/* ===== Animación de entrada de la tarjeta ===== */
@keyframes authCardIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
 
.auth-wrapper {
    animation: authCardIn .5s ease;
}
 
/* ===== Variante con deslizamiento ===== */
.auth-wrapper--toggle {
    display: block;
    min-height: 620px;
}
 
.auth-wrapper--toggle .auth-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    display: flex;
    transition: transform .6s cubic-bezier(.65, 0, .35, 1);
}
 
.auth-wrapper--toggle.mode-registro .auth-slider {
    transform: translateX(-50%);
}
 
.auth-wrapper--toggle .auth-form-side {
    width: 50%;
    flex: 0 0 50%;
    box-sizing: border-box;
    pointer-events: none;
}
 
.auth-wrapper--toggle .auth-form-inner {
    max-width: 440px;
    pointer-events: auto;
}
 
.auth-wrapper--toggle .auth-form-side--registro .auth-form-inner {
    margin-left: auto;
}
 
.auth-wrapper--toggle .auth-info-side {
    position: absolute;
    top: 0;
    height: 100%;
    width: 45%;
    left: 55%;
    z-index: 3;
    clip-path: polygon(18% 0, 100% 0, 100% 100%, 0% 100%);
    padding: 48px 44px 48px 110px;
    border-radius: 0 16px 16px 0;
    transition: left .6s cubic-bezier(.65, 0, .35, 1), clip-path .6s ease, border-radius .6s ease;
}
 
.auth-wrapper--toggle.mode-registro .auth-info-side {
    left: 0;
    clip-path: polygon(0 0, 82% 0, 100% 100%, 0% 100%);
    padding: 48px 110px 48px 44px;
    border-radius: 16px 0 0 16px;
}
 
.auth-info-side .info-content {
    display: none;
}
 
.auth-info-side .info-content.active {
    display: block;
}

/* ===== Fix responsive: panel diagonal en mobile (auth-wrapper--toggle) ===== */
/* El diseño diagonal usa paddings fijos en px + el panel verde en %, así que
   solo cuadra bien cerca del ancho máximo de la tarjeta (~920px). Por debajo
   de eso (ventana angosta, DevTools abierto, laptops chicas) el panel verde
   y el formulario pueden llegar a pisarse, por eso el corte se sube a 920px
   en vez de 760px: así cualquier ancho más chico ya usa el layout apilado
   seguro, sin dejar una franja intermedia rota. */
@media (max-width: 920px) {
    .auth-wrapper--toggle {
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    .auth-wrapper--toggle .auth-slider {
        position: relative !important;
        order: 2;
        width: 100% !important;
        height: auto !important;
        display: block;
        transition: none !important;
        transform: none !important;
    }

    .auth-wrapper--toggle .auth-form-side {
        display: none;
        width: 100% !important;
        flex: none !important;
        box-sizing: border-box;
        padding: 32px 28px;
    }

    .auth-wrapper--toggle .auth-form-side.active-mobile {
        display: flex;
    }

    .auth-wrapper--toggle .auth-info-side {
        position: relative !important;
        order: 1;
        top: auto !important;
        left: auto !important;
        width: 100% !important;
        height: auto !important;
        clip-path: none !important;
        padding: 32px 28px 40px !important;
        border-radius: 0 !important;
    }

    .auth-info-side p {
        max-width: none;
    }

    .auth-fields-grid {
        grid-template-columns: 1fr;
    }

    /* Centra el formulario (login y registro quedan alineados igual) */
    .auth-wrapper--toggle .auth-form-inner {
        margin: 0 auto !important;
        max-width: 100% !important;
        width: 100%;
    }

    /* Botón del panel verde: más chico y con color que resalte sobre el verde */
    .info-toggle-btn {
        margin-top: 14px;
        font-size: 12px;
        padding: 7px 16px;
        background: #ffd166;
        color: #1a2535;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    }
}