﻿.auth-page {
    min-height: 100vh;
    padding: 18px 16px;
    background: radial-gradient(circle at 8% 55%, rgba(38,151,213,.35) 0, rgba(38,151,213,.16) 28%, transparent 29%), radial-gradient(circle at 98% 45%, rgba(35,135,208,.30) 0, rgba(35,135,208,.14) 32%, transparent 33%), linear-gradient(135deg, #003f7d 0%, #00699d 45%, #00447d 100%);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-shell {
    width: 1120px;
    max-width: 96%;
    max-height: calc(100vh - 36px);
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(0,0,0,.28);
    display: flex;
    flex-direction: column;
}

.auth-header {
    height: 88px;
    padding: 0 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.logo-uthgra, .logo-osuthgra {
    width: 240px;
    max-height: 58px;
    object-fit: contain;
}

/* Modificado: Ahora el contenedor de pestañas se alinea en base al Grid del contenido */
.auth-tabs {
    height: 68px;
    display: grid;
    grid-template-columns: 58% 42%;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

/* Agregado: Envuelve los dos botones dentro del espacio asignado al formulario (58%) */
.auth-tabs-inner {
    grid-column: 1;
    display: flex;
    height: 100%;
}

.auth-tabs button {
    flex: 1;
    border: 0;
    background: transparent;
    color: #667085;
    font-size: 22px;
    font-weight: 800;
    cursor: pointer;
    position: relative;
    margin: 0;
    height: 100%;
}

    .auth-tabs button.active {
        color: #00a651;
    }

        /* Modificado: Ajuste de los porcentajes para que la barra calce perfecto con los inputs */
        .auth-tabs button.active::after {
            content: "";
            position: absolute;
            left: 70px; /* Alineado al inicio del padding del formulario */
            right: 70px; /* Alineado al final del padding del formulario */
            bottom: -1px;
            height: 4px;
            background: #00a651;
            border-radius: 4px;
        }

.auth-content {
    display: grid;
    grid-template-columns: 58% 42%;
    flex: 1;
    min-height: 0;
}

.auth-left {
    padding: 34px 70px 24px;
    overflow-y: auto;
    /* Ajuste fino para ocultar la barra de scroll clásica manteniendo el scroll funcional si es necesario */
    scrollbar-width: thin;
    scrollbar-color: #cfd8e3 transparent;
}

    .auth-left h1 {
        margin: 0 0 10px;
        color: #08305f;
        font-size: 29px;
        font-weight: 900;
    }

    .auth-left p {
        margin: 0 0 24px;
        color: #667085;
        font-size: 18px;
        line-height: 1.35;
    }

.auth-form label {
    display: block;
    color: #0c2d57;
    font-size: 15px;
    font-weight: 900;
    margin: 0 0 6px;
}

.required {
    color: #c62828;
    font-weight: 900;
    margin-left: 4px;
}

.input-icon {
    height: 48px;
    border: 1px solid #cfd8e3;
    border-radius: 8px;
    display: flex;
    align-items: center;
    background: #fff;
    margin-bottom: 6px;
    overflow: hidden;
}

    .input-icon > span {
        width: 50px;
        text-align: center;
        color: #667085;
        font-size: 18px;
    }

    .input-icon input {
        flex: 1;
        width: auto;
        border: 0 !important;
        outline: none;
        height: 100%;
        padding: 0 12px 0 0;
        font-size: 16px;
        color: #0c2d57;
        margin: 0 !important;
        background: transparent;
        box-sizing: border-box;
    }

    .input-icon:has(.input-validation-error) {
        border-color: #c62828;
        background: #fff8f8;
    }

.eye-btn {
    width: 48px;
    height: 100%;
    border: 0;
    background: transparent;
    color: #52637a;
    cursor: pointer;
    font-size: 16px;
    margin: 0;
    padding: 0;
}

.field-error {
    display: block;
    min-height: 15px;
    color: #c62828;
    font-size: 12px;
    font-weight: 700;
    margin: 0 0 8px;
}

.show-password {
    display: flex !important;
    align-items: center;
    gap: 10px;
    color: #0c2d57 !important;
    font-weight: 800 !important;
    margin: 6px 0 20px !important;
}

    .show-password input {
        width: 20px;
        height: 20px;
        margin: 0;
    }

.btn-primary-auth {
    display: block;
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, #0070c9, #004f9e);
    color: #fff;
    font-size: 17px;
    font-weight: 900;
    cursor: pointer;
    margin: 0 0 18px;
    box-shadow: 0 8px 18px rgba(0,94,180,.25);
}

    .btn-primary-auth:hover {
        background: linear-gradient(135deg, #005fae, #00468d);
    }

.forgot-link {
    display: block;
    text-align: center;
    color: #0067b1;
    font-size: 16px;
    font-weight: 700;
    text-decoration: underline;
}

.auth-right {
    border-left: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(0,123,194,.08), transparent 55%), #fff;
    padding: 30px;
}

.security-panel {
    max-width: 320px;
    text-align: center;
}

.shield-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: #eef7ff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 34px;
    box-shadow: 0 0 0 18px rgba(238,247,255,.65);
}

    .shield-circle span {
        font-size: 66px;
    }

.security-panel h2 {
    margin: 0 0 18px;
    color: #0b66c3;
    font-size: 34px;
    font-weight: 800;
}

.security-panel p {
    margin: 0;
    color: #5f6673;
    font-size: 15px;
    line-height: 1.6;
}

.auth-footer {
    border-top: 1px solid #e2e8f0;
    padding: 16px;
    text-align: center;
    color: #667085;
    font-size: 15px;
    flex-shrink: 0;
}

.input-validation-error {
    background: transparent !important;
}

/* MEDIA QUERIES REVISADAS */
@media (max-width: 900px) {
    .auth-page {
        min-height: 100vh;
        padding: 12px;
        align-items: flex-start;
    }

    .auth-shell {
        max-width: 100%;
        max-height: none;
        border-radius: 14px;
    }

    .auth-header {
        height: auto;
        padding: 20px;
        gap: 16px;
        flex-direction: column;
    }

    .logo-uthgra, .logo-osuthgra {
        width: 210px;
    }

    .auth-tabs {
        height: 64px;
        display: flex; /* Se cambia de Grid a Flex en mobile */
    }

    .auth-tabs-inner {
        width: 100%;
        display: flex;
    }

    .auth-tabs button {
        font-size: 18px;
    }

        .auth-tabs button.active::after {
            left: 7%;
            right: 7%;
        }

    .auth-content {
        display: block;
    }

    .auth-left {
        padding: 28px 22px;
        overflow: visible;
    }

    .auth-right {
        display: none;
    }

    .auth-footer {
        font-size: 13px;
        padding: 14px;
    }
}

@media (max-width: 600px) {
    .auth-page {
        min-height: 100vh;
        padding: 8px;
        align-items: flex-start;
    }

    .auth-shell {
        width: 100%;
        max-width: 100%;
        border-radius: 12px;
        box-shadow: none;
    }

    .auth-header {
        padding: 18px 14px;
        gap: 12px;
    }

    .logo-uthgra, .logo-osuthgra {
        width: 170px;
        max-height: 46px;
    }

    .auth-tabs {
        height: 58px;
    }

        .auth-tabs button {
            font-size: 16px;
        }

    .auth-left {
        padding: 24px 18px;
    }

        .auth-left h1 {
            font-size: 26px;
        }

        .auth-left p {
            font-size: 15px;
            margin-bottom: 22px;
        }

    .input-icon {
        height: 46px;
    }

        .input-icon > span {
            width: 44px;
            font-size: 16px;
        }

        .input-icon input {
            font-size: 15px;
        }

    .btn-primary-auth {
        height: 48px;
        font-size: 16px;
    }

    .auth-footer {
        font-size: 12px;
        padding: 12px;
    }
}

@media (max-height: 500px) {
    .auth-page {
        padding: 8px;
        align-items: flex-start;
    }

    .auth-shell {
        max-height: none;
        width: 100%;
    }

    .auth-right {
        display: none;
    }

    .auth-left {
        padding: 20px;
    }

    .auth-header {
        padding: 12px 20px;
    }

    .logo-uthgra, .logo-osuthgra {
        width: 170px;
        max-height: 42px;
    }

    .auth-tabs {
        height: 52px;
    }

        .auth-tabs button {
            font-size: 16px;
        }

    .auth-footer {
        display: none;
    }
}
