 	/* =====================================================
   PlaneIA
   Autenticación: registro, login y recuperación
===================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --auth-primary: #4f46e5;
    --auth-primary-dark: #3730a3;
    --auth-primary-light: #eef2ff;
    --auth-text: #172033;
    --auth-muted: #64748b;
    --auth-border: #e2e8f0;
    --auth-background: #f6f8fc;
    --auth-white: #ffffff;
    --auth-danger: #dc2626;
    --auth-success: #15803d;
}

html {
    min-height: 100%;
}

body.auth-page {
    min-height: 100vh;
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background:
        radial-gradient(
            circle at 10% 10%,
            rgba(79, 70, 229, 0.09),
            transparent 30%
        ),
        radial-gradient(
            circle at 90% 85%,
            rgba(14, 165, 233, 0.08),
            transparent 30%
        ),
        var(--auth-background);

    color: var(--auth-text);
}


/* =====================================================
   ESTRUCTURA
===================================================== */

.auth-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(420px, 1fr) minmax(500px, 1fr);
}


/* =====================================================
   PANEL DE MARCA
===================================================== */

.auth-brand-panel {
    position: relative;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    min-height: 100vh;
    padding: 60px 70px;

    overflow: hidden;

    background:
        linear-gradient(
            145deg,
            #312e81 0%,
            #4338ca 55%,
            #4f46e5 100%
        );

    color: var(--auth-white);
}

.auth-brand-panel::before {
    content: "";

    position: absolute;
    top: -180px;
    right: -170px;

    width: 420px;
    height: 420px;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.07);
}

.auth-brand-panel::after {
    content: "";

    position: absolute;
    bottom: -130px;
    left: -110px;

    width: 300px;
    height: 300px;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.05);
}

.auth-brand {
    position: relative;
    z-index: 1;

    display: flex;
    align-items: center;
    gap: 13px;

    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.auth-brand-symbol {
    flex: 0 0 auto;

    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    border-radius: 13px;

    background: var(--auth-white);
    color: var(--auth-primary);

    font-size: 20px;
    font-weight: 900;

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.auth-brand-content {
    position: relative;
    z-index: 1;

    max-width: 540px;
}

.auth-eyebrow {
    display: inline-block;

    margin-bottom: 20px;
    padding: 7px 12px;

    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.08);

    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.auth-brand-content h1 {
    margin-bottom: 24px;

    font-size: clamp(38px, 4vw, 62px);
    line-height: 1.04;
    letter-spacing: -2px;
}

.auth-brand-content p {
    max-width: 490px;

    color: rgba(255, 255, 255, 0.82);

    font-size: 18px;
    line-height: 1.65;
}

.auth-benefits {
    display: grid;
    gap: 16px;

    margin-top: 38px;
}

.auth-benefit {
    display: flex;
    align-items: center;
    gap: 12px;

    color: rgba(255, 255, 255, 0.92);

    font-size: 14px;
    line-height: 1.5;
}

.auth-check {
    flex: 0 0 auto;

    width: 24px;
    height: 24px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.14);

    font-size: 13px;
    font-weight: 800;
}

.auth-brand-footer {
    position: relative;
    z-index: 1;

    color: rgba(255, 255, 255, 0.55);

    font-size: 12px;
}


/* =====================================================
   PANEL DEL FORMULARIO
===================================================== */

.auth-form-panel {
    display: flex;
    justify-content: center;
    align-items: center;

    min-height: 100vh;
    padding: 50px;
}

.auth-form-container {
    width: 100%;
    max-width: 470px;
}

.auth-mobile-brand {
    display: none;
}

.auth-form-header {
    margin-bottom: 32px;
}

.auth-form-header h2 {
    margin-bottom: 10px;

    font-size: 32px;
    line-height: 1.15;
    letter-spacing: -1px;
}

.auth-form-header p {
    color: var(--auth-muted);

    font-size: 15px;
    line-height: 1.55;
}


/* =====================================================
   CAMPOS
===================================================== */

.auth-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.auth-field {
    margin-bottom: 19px;
}

.auth-field label {
    display: block;

    margin-bottom: 8px;

    color: #334155;

    font-size: 13px;
    font-weight: 700;
}

.auth-field input {
    width: 100%;
    height: 50px;

    padding: 0 15px;

    border: 1px solid var(--auth-border);
    border-radius: 11px;
    outline: none;

    background: var(--auth-white);
    color: var(--auth-text);

    font-size: 15px;

    transition:
        border-color 0.2s,
        box-shadow 0.2s,
        background 0.2s;
}

.auth-field input::placeholder {
    color: #a0aec0;
}

.auth-field input:hover {
    border-color: #cbd5e1;
}

.auth-field input:focus {
    border-color: var(--auth-primary);

    box-shadow:
        0 0 0 4px rgba(79, 70, 229, 0.10);
}


/* =====================================================
   CONTRASEÑA
===================================================== */

.auth-password-wrap {
    position: relative;
}

.auth-password-wrap input {
    padding-right: 78px;
}

.auth-show-password {
    position: absolute;
    top: 50%;
    right: 13px;

    transform: translateY(-50%);

    border: 0;
    outline: none;

    background: transparent;
    color: var(--auth-primary);

    font-family: inherit;
    font-size: 12px;
    font-weight: 700;

    cursor: pointer;
}

.auth-show-password:hover {
    color: var(--auth-primary-dark);
}

.auth-password-help {
    margin-top: 7px;

    color: var(--auth-muted);

    font-size: 11px;
    line-height: 1.45;
}


/* =====================================================
   TÉRMINOS
===================================================== */

.auth-terms {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    margin: 4px 0 24px;
}

.auth-terms input {
    flex: 0 0 auto;

    width: 17px;
    height: 17px;

    margin-top: 2px;

    accent-color: var(--auth-primary);
}

.auth-terms label {
    color: var(--auth-muted);

    font-size: 12px;
    line-height: 1.5;
}

.auth-terms a {
    color: var(--auth-primary);

    font-weight: 600;
    text-decoration: none;
}

.auth-terms a:hover {
    text-decoration: underline;
}


/* =====================================================
   BOTÓN PRINCIPAL
===================================================== */

.auth-submit-btn {
    width: 100%;
    min-height: 52px;

    border: 0;
    border-radius: 11px;

    background: var(--auth-primary);
    color: var(--auth-white);

    font-family: inherit;
    font-size: 15px;
    font-weight: 750;

    cursor: pointer;

    box-shadow:
        0 10px 24px rgba(79, 70, 229, 0.20);

    transition:
        transform 0.15s,
        background 0.2s,
        box-shadow 0.2s;
}

.auth-submit-btn:hover {
    background: var(--auth-primary-dark);

    box-shadow:
        0 12px 28px rgba(79, 70, 229, 0.25);
}

.auth-submit-btn:active {
    transform: translateY(1px);
}

.auth-submit-btn:focus-visible {
    outline: 3px solid rgba(79, 70, 229, 0.25);
    outline-offset: 3px;
}


/* =====================================================
   ENLACE DE LOGIN
===================================================== */

.auth-login-link {
    margin-top: 25px;

    text-align: center;

    color: var(--auth-muted);

    font-size: 13px;
}

.auth-login-link a {
    color: var(--auth-primary);

    font-weight: 700;
    text-decoration: none;
}

.auth-login-link a:hover {
    text-decoration: underline;
}


/* =====================================================
   NOTA DE SEGURIDAD
===================================================== */

.auth-security-note {
    margin-top: 30px;
    padding-top: 20px;

    border-top: 1px solid var(--auth-border);

    text-align: center;

    color: #94a3b8;

    font-size: 11px;
    line-height: 1.5;
}


/* =====================================================
   MENSAJES
   Se utilizarán después con PHP
===================================================== */

.auth-message {
    margin-bottom: 22px;
    padding: 13px 15px;

    border-radius: 10px;

    font-size: 13px;
    line-height: 1.5;
}

.auth-message-error {
    border: 1px solid #fecaca;

    background: #fef2f2;
    color: #991b1b;
}

.auth-message-success {
    border: 1px solid #bbf7d0;

    background: #f0fdf4;
    color: #166534;
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 900px) {

    .auth-layout {
        display: block;
    }

    .auth-brand-panel {
        display: none;
    }

    .auth-form-panel {
        min-height: 100vh;
        padding: 38px 22px;
    }

    .auth-mobile-brand {
        display: flex;
        align-items: center;
        gap: 10px;

        margin-bottom: 40px;

        color: var(--auth-primary);

        font-size: 22px;
        font-weight: 800;
    }

    .auth-mobile-brand .auth-brand-symbol {
        width: 38px;
        height: 38px;

        border: 1px solid #e0e7ff;

        background: var(--auth-primary-light);

        box-shadow: none;
    }
}


@media (max-width: 520px) {

    .auth-form-panel {
        align-items: flex-start;

        padding:
            28px
            20px
            40px;
    }

    .auth-field-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .auth-form-header h2 {
        font-size: 28px;
    }
}