html,
body.auth-page {
    min-height: 100%;
}

body.auth-page {
    margin: 0;
    overflow-x: hidden;
    background: #eff6ff;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.auth-home-background {
    position: fixed;
    inset: -18px;
    z-index: 0;
    overflow: hidden;
    background: #eff6ff;
}

.auth-home-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    pointer-events: none;
    filter: blur(7px);
    transform: scale(1.035);
}

.auth-home-background::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .48);
    backdrop-filter: blur(1px);
}

.auth-layer {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 38px 18px;
}

.auth-dialog {
    position: relative;
    width: min(650px, 100%);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 32px 80px rgba(15, 23, 42, .34);
}

.auth-close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 4;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 4px;
    color: #fff;
    background: rgba(15, 23, 42, .18);
    font-size: 1.25rem;
    text-decoration: none;
}

.auth-masthead {
    padding: 34px 76px 28px 34px;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.auth-logo {
    width: 60px;
    height: 60px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 5px;
    color: #2563eb;
    background: #fff;
    font-size: 1.6rem;
    font-weight: 850;
}

.auth-masthead h1 {
    margin: 0;
    font-size: clamp(1.7rem, 4vw, 2.35rem);
    font-weight: 850;
    letter-spacing: -.04em;
}

.auth-masthead p {
    margin: 6px 0 0;
    color: rgba(255, 255, 255, .88);
    font-size: .94rem;
}

.auth-content {
    padding: 30px 34px 34px;
}

.auth-title {
    margin-bottom: 24px;
    text-align: center;
}

.auth-title h2 {
    margin: 0 0 7px;
    color: #172033;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -.035em;
}

.auth-title p {
    margin: 0;
    color: #64748b;
    line-height: 1.55;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 24px;
    padding: 0;
    list-style: none;
}

.auth-tabs .nav-link {
    width: 100%;
    min-height: 48px;
    border: 1px solid #bfdbfe;
    border-radius: 4px;
    color: #1d4ed8;
    background: #fff;
    font-weight: 750;
}

.auth-tabs .nav-link.active {
    border-color: #2563eb;
    color: #fff;
    background: #2563eb;
}

.auth-dialog .form-label {
    margin-bottom: 7px;
    color: #172033;
    font-size: .9rem;
    font-weight: 750;
}

.auth-dialog .form-control {
    min-height: 53px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 12px 14px;
}

.auth-dialog .form-control:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.auth-password-field {
    position: relative;
}

.auth-password-field .form-control {
    padding-right: 56px;
}

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    padding: 0;
    transform: translateY(-50%);
    border: 0;
    border-radius: 4px;
    color: #475569;
    background: transparent;
    font-size: 1.08rem;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus-visible {
    color: #1d4ed8;
    background: #eff6ff;
    outline: 2px solid transparent;
}

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: -4px 0 22px;
    font-size: .9rem;
}

.auth-options .form-check {
    margin: 0;
}

.auth-forgot-link {
    border: 0;
    padding: 0;
    color: #1d4ed8;
    background: transparent;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-primary {
    min-height: 52px;
    border-radius: 4px !important;
    font-weight: 800;
}

.auth-forgot-box {
    padding: 22px;
    border: 1px solid #bfdbfe;
    border-radius: 5px;
    background: #eff6ff;
}

.auth-forgot-box h3 {
    margin-bottom: 8px;
    color: #172033;
    font-size: 1.25rem;
    font-weight: 800;
}

.auth-forgot-box p {
    color: #475569;
    line-height: 1.55;
}

.auth-back-login {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    color: #1d4ed8;
    font-weight: 700;
    text-decoration: none;
}

.auth-dialog .alert {
    border-radius: 4px;
}

.auth-dialog .bsscos-password-strength {
    border-radius: 4px;
}

@media (max-width: 575.98px) {
    .auth-layer {
        align-items: start;
        padding: 16px 10px;
    }

    .auth-masthead {
        padding: 25px 62px 22px 22px;
    }

    .auth-logo {
        width: 50px;
        height: 50px;
    }

    .auth-content {
        padding: 24px 20px 28px;
    }

    .auth-options {
        align-items: flex-start;
        flex-direction: column;
    }

}
