:root {
    --login-navy: #18253b;
    --login-navy-2: #263b5d;
    --login-blue: #385783;
    --login-red: #bc2935;
    --login-ink: #172033;
    --login-muted: #718097;
    --login-border: #dbe2ec;
    --login-canvas: #eef2f7;
}

* {
    box-sizing: border-box;
}

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

body.rh-auth-page {
    margin: 0;
    color: var(--login-ink);
    background:
        radial-gradient(circle at 8% 8%, rgba(56, 87, 131, 0.14), transparent 27rem),
        radial-gradient(circle at 92% 90%, rgba(188, 41, 53, 0.09), transparent 24rem),
        var(--login-canvas);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.rh-auth-shell {
    position: relative;
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: clamp(1rem, 3vw, 2.75rem);
    overflow: hidden;
}

.rh-auth-shell::before {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(44, 63, 91, 0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(44, 63, 91, 0.028) 1px, transparent 1px);
    background-size: 34px 34px;
    content: "";
    mask-image: linear-gradient(to bottom, #000, transparent 86%);
}

.rh-auth-container {
    position: relative;
    z-index: 1;
    width: min(1120px, 100%);
}

.rh-auth-card {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
    min-height: 680px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(210, 218, 229, 0.92);
    border-radius: 22px;
    box-shadow: 0 28px 75px rgba(24, 37, 59, 0.16);
}

.rh-auth-brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: clamp(2.25rem, 4vw, 4rem);
    color: #fff;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 45%),
        linear-gradient(145deg, var(--login-navy), var(--login-navy-2));
    isolation: isolate;
}

.rh-auth-brand-panel::after {
    position: absolute;
    right: -90px;
    bottom: -90px;
    z-index: -1;
    width: 310px;
    height: 310px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 50%;
    content: "";
    box-shadow:
        0 0 0 45px rgba(255, 255, 255, 0.025),
        0 0 0 90px rgba(255, 255, 255, 0.018);
}

.rh-brand-glow {
    position: absolute;
    z-index: -1;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    filter: blur(2px);
}

.rh-brand-glow-one {
    top: -120px;
    right: -90px;
    background: rgba(188, 41, 53, 0.2);
}

.rh-brand-glow-two {
    bottom: 20%;
    left: -190px;
    background: rgba(92, 128, 178, 0.17);
}

.rh-brand-content {
    position: relative;
    z-index: 1;
}

.rh-logo-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 190px;
    min-height: 96px;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 15px;
    box-shadow: 0 14px 30px rgba(7, 15, 29, 0.22);
}

.rh-login-logo {
    width: min(230px, 100%);
    height: 76px;
    object-fit: contain;
}

.rh-portal-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.48rem;
    margin-top: clamp(2.3rem, 5vh, 4rem);
    padding: 0.46rem 0.76rem;
    color: #eef4ff;
    background: rgba(255, 255, 255, 0.085);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.075em;
    text-transform: uppercase;
}

.rh-portal-badge i {
    color: #ff818b;
    font-size: 1rem;
}

.rh-auth-brand-panel h1 {
    max-width: 510px;
    margin: 1.35rem 0 0.85rem;
    color: #fff;
    font-size: clamp(2rem, 3.2vw, 3.15rem);
    font-weight: 750;
    letter-spacing: -0.045em;
    line-height: 1.08;
}

.rh-brand-copy {
    max-width: 500px;
    margin: 0;
    color: #bac7d9;
    font-size: 0.98rem;
    line-height: 1.75;
}

.rh-trust-list {
    display: grid;
    gap: 0.85rem;
    margin-top: 2rem;
}

.rh-trust-list > div {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.rh-trust-list > div > span {
    display: grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    color: #fff;
    background: rgba(255, 255, 255, 0.085);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    place-items: center;
}

.rh-trust-list p {
    display: grid;
    gap: 0.04rem;
    margin: 0;
}

.rh-trust-list strong {
    color: #f7f9fc;
    font-size: 0.82rem;
    font-weight: 700;
}

.rh-trust-list small {
    color: #9eacc1;
    font-size: 0.74rem;
}

.rh-brand-footer {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: auto;
    padding-top: 2rem;
    color: #a9b6c9;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.rh-status-dot {
    width: 8px;
    height: 8px;
    background: #48d7a0;
    border-radius: 50%;
    box-shadow: 0 0 0 5px rgba(72, 215, 160, 0.12);
}

.rh-auth-form-panel {
    display: grid;
    min-width: 0;
    background: #fff;
    place-items: center;
}

.rh-form-inner {
    width: min(410px, calc(100% - 3rem));
    min-width: 0;
    padding-block: 2.5rem;
}

.rh-mobile-logo {
    display: none;
}

.rh-form-heading {
    margin-bottom: 1.75rem;
}

.rh-eyebrow {
    display: block;
    margin-bottom: 0.65rem;
    color: var(--login-red);
    font-size: 0.69rem;
    font-weight: 800;
    letter-spacing: 0.11em;
}

.rh-form-heading h2 {
    margin: 0 0 0.45rem;
    color: var(--login-ink);
    font-size: clamp(1.75rem, 2.4vw, 2.25rem);
    font-weight: 750;
    letter-spacing: -0.035em;
}

.rh-form-heading p {
    margin: 0;
    color: var(--login-muted);
    line-height: 1.55;
}

.rh-login-form .form-label {
    margin-bottom: 0.46rem;
    color: #344055;
    font-size: 0.78rem;
    font-weight: 700;
}

.rh-input-wrap {
    position: relative;
}

.rh-input-icon {
    position: absolute;
    top: 50%;
    left: 0.95rem;
    z-index: 2;
    color: #8895a8;
    font-size: 1.05rem;
    transform: translateY(-50%);
    pointer-events: none;
}

.rh-login-form .form-control {
    min-height: 50px;
    padding: 0.72rem 3rem 0.72rem 2.75rem;
    color: var(--login-ink);
    background: #fbfcfe;
    border: 1px solid var(--login-border);
    border-radius: 10px;
    box-shadow: none;
    transition: border-color 0.17s ease, box-shadow 0.17s ease, background-color 0.17s ease;
}

.rh-login-form .form-control::placeholder {
    color: #9ca7b6;
}

.rh-login-form .form-control:hover {
    border-color: #bac5d4;
}

.rh-login-form .form-control:focus {
    background: #fff;
    border-color: #7d91af;
    box-shadow: 0 0 0 0.22rem rgba(56, 87, 131, 0.12);
}

.rh-password-toggle {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 3;
    display: grid;
    width: 48px;
    height: 50px;
    padding: 0;
    color: #7a879a;
    border: 0;
    place-items: center;
    text-decoration: none;
}

.rh-password-toggle:hover,
.rh-password-toggle:focus {
    color: var(--login-blue);
}

.rh-forgot-link {
    color: var(--login-blue);
    font-size: 0.76rem;
    font-weight: 700;
    text-decoration: none;
}

.rh-forgot-link:hover {
    color: var(--login-red);
}

.rh-login-form .form-check-label {
    color: #647188;
    font-size: 0.78rem;
}

.rh-login-form .form-check-input {
    border-color: #aeb9c8;
}

.rh-login-form .form-check-input:checked {
    background-color: var(--login-blue);
    border-color: var(--login-blue);
}

.rh-secure-caption {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #8190a4;
    font-size: 0.69rem;
    font-weight: 650;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.rh-secure-caption i {
    color: #3ba77d;
}

.rh-login-button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    gap: 0.65rem;
    color: #fff;
    background: linear-gradient(135deg, var(--login-blue), #2b4264);
    border: 0;
    border-radius: 10px;
    box-shadow: 0 10px 22px rgba(44, 66, 100, 0.22);
    font-weight: 700;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.rh-login-button:hover,
.rh-login-button:focus {
    color: #fff;
    background: linear-gradient(135deg, #2f4b76, #223651);
    box-shadow: 0 13px 27px rgba(44, 66, 100, 0.28);
    transform: translateY(-1px);
}

.rh-login-button i {
    font-size: 1.05rem;
    transition: transform 0.16s ease;
}

.rh-login-button:hover i {
    transform: translateX(3px);
}

.rh-auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.8rem 2.4rem 0.8rem 0.85rem;
    border-radius: 9px;
    font-size: 0.78rem;
}

.rh-auth-alert > i {
    margin-top: 0.05rem;
    font-size: 1rem;
}

.rh-auth-alert .btn-close {
    padding: 0.9rem;
}

.rh-help-note {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin-top: 1.5rem;
    padding: 0.75rem 0.85rem;
    color: #6b788d;
    background: #f5f7fa;
    border: 1px solid #e4e8ef;
    border-radius: 9px;
    font-size: 0.73rem;
    line-height: 1.5;
}

.rh-help-note i {
    margin-top: 0.05rem;
    color: var(--login-blue);
    font-size: 1rem;
}

.rh-auth-copyright {
    margin-top: 1.6rem;
    color: #9aa5b5;
    font-size: 0.69rem;
    text-align: center;
}

@media (max-width: 991.98px) {
    .rh-auth-card {
        grid-template-columns: minmax(0, 0.9fr) minmax(390px, 1.1fr);
    }

    .rh-auth-brand-panel {
        padding: 2.5rem 2rem;
    }

    .rh-auth-brand-panel h1 {
        font-size: 2.15rem;
    }

    .rh-trust-list small {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .rh-auth-shell {
        display: block;
        padding: 0;
        background: #fff;
    }

    .rh-auth-container {
        width: 100%;
    }

    .rh-auth-card {
        display: block;
        min-height: 100vh;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .rh-auth-brand-panel {
        display: none;
    }

    .rh-auth-form-panel {
        display: block;
        width: 100%;
        min-height: 100vh;
        padding: 1rem;
        overflow-x: hidden;
    }

    .rh-form-inner {
        width: 100%;
        max-width: 430px;
        min-width: 0;
        margin-inline: auto;
        padding-block: 2rem;
    }

    .rh-login-form,
    .rh-input-wrap,
    .rh-login-form .form-control {
        width: 100%;
        min-width: 0;
    }

    .rh-forgot-link {
        white-space: nowrap;
    }

    .rh-form-heading p,
    .rh-help-note,
    .rh-auth-copyright {
        overflow-wrap: anywhere;
    }

    .rh-mobile-logo {
        display: flex;
        justify-content: center;
        margin-bottom: 2rem;
    }

    .rh-mobile-logo img {
        width: 190px;
        height: 86px;
        object-fit: contain;
    }

    .rh-form-heading {
        text-align: center;
    }
}

@media (max-width: 380px) {
    .rh-secure-caption {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
