/* Pantallas de acceso: login, registro, recuperar contraseña, magic link */
.auth-page,
.login,
.register,
.passwords_email,
.passwords_reset {
    min-height: 100vh;
}

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    box-sizing: border-box;
    background: transparent;
}

.auth-page__inner {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
}

.auth-card {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(42, 63, 84, 0.14), 0 4px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    backdrop-filter: blur(6px);
}

@media (min-width: 768px) {
    .auth-card {
        flex-direction: row;
        min-height: 480px;
    }
}

.auth-card__brand {
    flex: 0 0 auto;
    padding: 32px 28px;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f6 100%);
    border-bottom: 1px solid #e6e9ed;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 768px) {
    .auth-card__brand {
        width: 38%;
        min-width: 280px;
        max-width: 340px;
        padding: 40px 32px;
        border-bottom: none;
        border-right: 1px solid #e6e9ed;
    }
}

.auth-card__body {
    flex: 1 1 auto;
    padding: 32px 28px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (min-width: 768px) {
    .auth-card__body {
        padding: 40px 44px 36px;
    }
}

/* Branding */
.auth-brand {
    text-align: center;
    width: 100%;
}

.auth-brand__sofi {
    display: inline-block;
    line-height: 0;
}

.auth-brand__sofi-img {
    max-width: 220px;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.auth-brand__divider {
    width: 48px;
    height: 2px;
    margin: 22px auto;
    background: #d0d7de;
    border-radius: 1px;
}

.auth-brand__empresa-img {
    max-width: 100%;
    max-height: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0 auto 12px;
    display: block;
    background: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0,  0, 0.15);
}

.auth-brand__empresa-name {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    color: #2a3f54;
    word-break: break-word;
}

/* Formulario — cargado en @section('head') para ganar a app.css / custom.css */
.auth-page .auth-form {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.auth-page .auth-title {
    margin: 0 0 24px;
    font-size: 26px;
    font-weight: 700;
    color: #2a3f54;
    text-align: center;
}

.auth-page .auth-subtitle {
    margin: -12px 0 20px;
    font-size: 13px;
    color: #73879c;
    text-align: center;
    line-height: 1.45;
}

.auth-page .auth-field {
    margin-bottom: 14px;
    text-align: left;
}

.auth-page .auth-field .form-control,
.auth-page .auth-form > .form-control,
.auth-page .auth-form input.form-control {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    height: 46px;
    padding: 10px 14px;
    font-size: 15px;
    line-height: 1.4;
    color: #2a3f54;
    background-color: #fff;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    box-shadow: none !important;
    margin: 0 !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}

.auth-page .auth-field .form-control::placeholder,
.auth-page .auth-form input.form-control::placeholder {
    color: #9aa5b1;
}

.auth-page .auth-field .form-control:focus,
.auth-page .auth-form input.form-control:focus {
    border-color: #3498db;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2) !important;
}

/* Botones */
.auth-page .auth-btn {
    display: block;
    width: 100%;
    padding: 12px 18px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
    border-radius: 8px !important;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none !important;
    box-shadow: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
    margin: 0 0 10px;
    box-sizing: border-box;
}

.auth-page .auth-btn:hover,
.auth-page .auth-btn:focus {
    text-decoration: none !important;
    outline: 0;
}

.auth-page .auth-btn--primary,
.auth-page .auth-form button[type="submit"].auth-btn,
.auth-page .auth-form button[type="submit"] {
    background: linear-gradient(180deg, #3498db 0%, #2980b9 100%) !important;
    border-color: #2980b9 !important;
    color: #fff !important;
    margin-top: 6px;
    margin-bottom: 16px;
    width: 100%;
}

.auth-page .auth-btn--primary:hover,
.auth-page .auth-form button[type="submit"]:hover {
    background: linear-gradient(180deg, #3da5e4 0%, #2e8bc7 100%) !important;
    color: #fff !important;
}

.auth-page .auth-btn--secondary {
    background: #fff !important;
    border-color: #d0d7de !important;
    color: #2a3f54 !important;
}

.auth-page .auth-btn--secondary:hover {
    background: #f4f6f8 !important;
    border-color: #b8c4ce !important;
    color: #2a3f54 !important;
}

.auth-page .auth-link {
    display: block;
    text-align: center;
    margin: 4px 0 0;
    font-size: 13px;
    font-weight: 500;
    color: #3498db;
    text-decoration: none;
}

.auth-page .auth-link:hover {
    color: #2980b9;
    text-decoration: underline;
}

.auth-page .auth-form .checkbox {
    margin: 2px 0 16px;
    text-align: left;
}

.auth-page .auth-form .checkbox label {
    font-size: 14px;
    color: #5a6c7d;
    font-weight: 400;
    cursor: pointer;
}

.auth-page .auth-form .checkbox input[type="checkbox"] {
    margin-right: 6px;
    vertical-align: -2px;
}

.auth-page .auth-form .alert {
    margin-bottom: 14px;
    border-radius: 8px;
    text-align: left;
    font-size: 14px;
}

.auth-page .auth-form .login-background-line {
    margin: 4px 0 14px;
    text-align: center;
    position: relative;
}

.auth-page .auth-form .login-background-line::after {
    display: none !important;
}

.auth-page .auth-form .login-background-line::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: #e6e9ed;
    z-index: 0;
    border: none;
    transform: none;
}

.auth-page .auth-form .login-background-line-text {
    position: relative;
    z-index: 1;
    display: inline-block;
    padding: 0 14px;
    background: #fff !important;
    color: #9aa5b1;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-page .auth-form .separator {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #eef0f2;
    text-align: center;
}

.auth-page .auth-form .separator span {
    display: block;
    margin-bottom: 10px;
    color: #73879c;
    font-size: 12px;
}

.auth-page .auth-form .to_register {
    color: #3498db;
    font-weight: 600;
}

/* Login social */
.auth-page .auth-form .btn-google-plus {
    background-color: #dd4b39;
    border-color: #dd4b39;
}

.auth-page .auth-form .btn-facebook {
    background-color: #3b5998;
    border-color: #3b5998;
}

.auth-page .auth-form .btn-twitter {
    background-color: #1da1f2;
    border-color: #1da1f2;
}

/* Anular Gentelella / btn-default en pantallas de acceso */
.auth-page .auth-form .btn-default {
    border-radius: 8px;
}

.auth-footer {
    margin-top: 20px;
    text-align: center;
}

.auth-footer__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #5a738e;
    font-size: 12px;
    text-decoration: none;
}

.auth-footer__link:hover {
    color: #2a3f54;
    text-decoration: none;
}

.auth-footer__logo {
    width: 28px;
    height: auto;
    vertical-align: middle;
}

/* Ocultar estructura Gentelella antigua si queda markup suelto */
.auth-page .login_wrapper,
.auth-page .login_content {
    width: 100%;
    padding: 0;
    margin: 0;
    background: transparent;
    box-shadow: none;
}

.auth-page .logo_sofi_login {
    display: none;
}
