.rm-auth {
    --rm-auth-charcoal: #171a1a;
    --rm-auth-charcoal-deep: #0f1211;
    --rm-auth-charcoal-soft: #2e3332;
    --rm-auth-green: #13b98e;
    --rm-auth-green-dark: #29876e;
    --rm-auth-warm: #f7f5f1;
    --rm-auth-surface: #fffefa;
    --rm-auth-text: #171a1a;
    --rm-auth-muted: #64706d;
    --rm-auth-line: #d8dfdc;
    min-width: 320px;
    margin: 0;
    background: var(--rm-auth-warm);
    color: var(--rm-auth-text);
    font-family: "Inter", sans-serif;
}

.rm-auth *,
.rm-auth *::before,
.rm-auth *::after {
    box-sizing: border-box;
}

.rm-auth-shell {
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    grid-template-columns: minmax(26rem, 43%) minmax(0, 57%);
    background: var(--rm-auth-warm);
}

.rm-auth-brand {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    padding: clamp(2rem, 5.5vw, 5.5rem);
    background:
        radial-gradient(circle at 24% 18%, rgba(46, 51, 50, 0.7), transparent 30%),
        linear-gradient(145deg, var(--rm-auth-charcoal) 0%, var(--rm-auth-charcoal-deep) 100%);
    color: #fff;
}

.rm-auth-brand-content {
    position: relative;
    z-index: 2;
    height: 100%;
    min-height: calc(100svh - clamp(4rem, 11vw, 11rem));
    display: flex;
    flex-direction: column;
}

.rm-auth-logo-link {
    display: inline-flex;
    width: fit-content;
    border-radius: 0.5rem;
}

.rm-auth-logo {
    display: block;
    width: clamp(13rem, 24vw, 20.5rem);
    height: auto;
}

.rm-auth-message {
    width: min(31rem, 100%);
    margin: auto 0;
    padding: 5rem 0 8rem;
}

.rm-auth-accent {
    display: block;
    width: 3rem;
    height: 0.2rem;
    margin-bottom: 2rem;
    border-radius: 999px;
    background: var(--rm-auth-green);
}

.rm-auth-message h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(2.6rem, 4vw, 4.25rem);
    font-weight: 650;
    letter-spacing: -0.055em;
    line-height: 1.04;
}

.rm-auth-message p {
    max-width: 29rem;
    margin: 1.75rem 0 0;
    color: #adb6b3;
    font-size: clamp(1.05rem, 1.45vw, 1.35rem);
    line-height: 1.55;
}

.rm-auth-geometry {
    position: absolute;
    z-index: 1;
    bottom: -35vh;
    right: -0.5%;
    left: auto;
    display: block;
    width: 115%;
    height: auto;
    overflow: visible;
    pointer-events: none;
}

.rm-auth-piece {
    transform-box: fill-box;
    transform-origin: center;
}

.rm-auth-main {
    min-width: 0;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    padding: clamp(2rem, 5vw, 5.5rem);
    background:
        radial-gradient(circle at 86% 8%, rgba(255, 255, 255, 0.86), transparent 28%),
        var(--rm-auth-warm);
}

.rm-auth-main-inner {
    width: 100%;
    max-width: 42rem;
    margin: auto;
}

.rm-auth-view {
    width: 100%;
}

.rm-auth-card,
.rm-auth-main .card {
    width: 100%;
    border: 1px solid rgba(46, 51, 50, 0.08);
    border-radius: 1.25rem;
    background: rgba(255, 254, 250, 0.96);
    box-shadow: 0 1.5rem 4.5rem rgba(30, 38, 36, 0.11);
}

.rm-auth-card {
    padding: clamp(2rem, 4vw, 3.75rem);
}

.rm-auth-card-header {
    margin-bottom: 2.25rem;
}

.rm-auth-card-header h1 {
    margin: 0;
    color: var(--rm-auth-text);
    font-size: clamp(2.25rem, 4vw, 3.25rem);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 1.05;
}

.rm-auth-card-header p {
    margin: 0.7rem 0 0;
    color: var(--rm-auth-muted);
    font-size: 1.125rem;
}

.rm-auth-form {
    display: grid;
    gap: 1.3rem;
}

.rm-auth-field label {
    display: inline-block;
    margin-bottom: 0.55rem;
    color: var(--rm-auth-text);
    font-size: 0.95rem;
    font-weight: 600;
}

.rm-auth .rm-auth-field .form-control {
    min-height: 3.5rem;
    border: 1px solid #cbd4d1;
    border-radius: 0.7rem;
    padding: 0.85rem 1rem;
    background: #fbfcfb;
    color: var(--rm-auth-text);
    font-size: 1rem;
    box-shadow: none;
}

.rm-auth .rm-auth-field .form-control:hover {
    border-color: #aab8b4;
}

.rm-auth .rm-auth-field .form-control:focus {
    border-color: var(--rm-auth-green-dark);
    background: #fff;
    box-shadow: 0 0 0 0.22rem rgba(19, 185, 142, 0.18);
}

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

.rm-auth .rm-auth-password .form-control {
    padding-right: 3.5rem;
}

.rm-auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 0.45rem;
    width: 2.65rem;
    height: 2.65rem;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 0.55rem;
    background: transparent;
    color: var(--rm-auth-muted);
    font-size: 1.15rem;
    transform: translateY(-50%);
}

.rm-auth-password-toggle:hover {
    background: #edf2f0;
    color: var(--rm-auth-text);
}

.rm-auth-password-toggle:focus-visible,
.rm-auth a:focus-visible,
.rm-auth button:focus-visible,
.rm-auth .form-check-input:focus-visible {
    outline: 0.2rem solid rgba(19, 185, 142, 0.42);
    outline-offset: 0.18rem;
}

.rm-auth-remember {
    min-height: 1.5rem;
    margin: 0;
}

.rm-auth .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.1rem;
    border-color: #aab8b4;
}

.rm-auth .form-check-input:checked {
    border-color: var(--rm-auth-green-dark);
    background-color: var(--rm-auth-green-dark);
}

.rm-auth .form-check-label {
    margin-left: 0.3rem;
    color: var(--rm-auth-text);
}

.rm-auth .rm-auth-submit {
    min-height: 3.6rem;
    border: 1px solid var(--rm-auth-green-dark);
    border-radius: 0.7rem;
    background: var(--rm-auth-green-dark);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 650;
    box-shadow: 0 0.7rem 1.5rem rgba(41, 135, 110, 0.18);
}

.rm-auth .rm-auth-submit:hover,
.rm-auth .rm-auth-submit:focus-visible {
    border-color: #236e5b;
    background: #236e5b;
    color: #fff;
}

.rm-auth-alternatives {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.4rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--rm-auth-line);
    text-align: center;
}

.rm-auth-alternatives span {
    width: 1px;
    height: 1rem;
    background: #bcc6c3;
}

.rm-auth a {
    color: var(--rm-auth-green-dark);
    text-underline-offset: 0.2em;
}

.rm-auth a:hover {
    color: #1f6d59;
}

.rm-auth .alert {
    border-width: 1px;
    border-radius: 0.7rem;
}

.rm-auth-footer {
    margin-top: 2rem;
    color: #84908d;
    font-size: 0.8rem;
    text-align: center;
}

/* Existing Shield views inherit the shell without changing their forms. */
.rm-auth-main .container {
    width: 100%;
    max-width: none;
    min-height: auto !important;
    padding: 0 !important;
}

.rm-auth-main .container > [class*="col-"] {
    width: 100%;
    max-width: 36rem;
    margin: 0 auto;
}

.rm-auth-main .mosaic-logo {
    display: none;
}

.rm-auth-main .container > [class*="col-"] > a:first-child {
    display: none !important;
}

.rm-auth-main .card.card-body:not(.rm-auth-card),
.rm-auth-main .card:not(.card-body) .card-body {
    padding: clamp(1.75rem, 4vw, 3rem) !important;
}

.rm-auth-main .card:not(.rm-auth-card) h4,
.rm-auth-main .card:not(.rm-auth-card) h5 {
    color: var(--rm-auth-text);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.035em;
}

.rm-auth-main .btn-primary {
    border-color: var(--rm-auth-green-dark);
    background: var(--rm-auth-green-dark);
}

@media (prefers-reduced-motion: no-preference) {
    .rm-auth-brand-content {
        animation: rm-auth-enter 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    .rm-auth-piece-dark {
        animation: rm-auth-dark-piece 2000ms cubic-bezier(0.22, 0.65, 0.32, 1) both;
    }

    .rm-auth-piece-green {
        animation: rm-auth-green-piece 2000ms cubic-bezier(0.22, 0.65, 0.32, 1) both;
    }
}

@keyframes rm-auth-enter {
    from {
        opacity: 0;
        transform: translateY(0.75rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rm-auth-dark-piece {
    from {
        opacity: 0;
        transform: translate(-0.7rem, -0.3rem);
    }

    to {
        opacity: 1;
        transform: translate(0, 0);
    }
}

@keyframes rm-auth-green-piece {
    from {
        opacity: 0;
        transform: translate(0.7rem, 0.35rem);
    }

    to {
        opacity: 1;
        transform: translate(0, 0);
    }
}

@media (max-width: 899.98px) {
    .rm-auth-shell {
        display: block;
    }

    .rm-auth-brand {
        min-height: 15rem;
        padding: 1.75rem clamp(1.25rem, 6vw, 3rem);
    }

    .rm-auth-brand-content {
        min-height: 11.5rem;
    }

    .rm-auth-logo {
        width: min(13.5rem, 62vw);
    }

    .rm-auth-message {
        margin: auto 0 0;
        padding: 2rem 0 0;
    }

    .rm-auth-accent {
        display: none;
    }

    .rm-auth-message h2 {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
        line-height: 1.05;
    }

    .rm-auth-message p {
        max-width: 25rem;
        margin-top: 0.7rem;
        font-size: 0.95rem;
        line-height: 1.4;
    }

    .rm-auth-geometry {
        right: -20%;
        bottom: -38%;
        left: auto;
        width: 58%;
        height: auto;
        opacity: 0.78;
    }

    .rm-auth-main {
        min-height: auto;
        padding: clamp(1.25rem, 6vw, 3rem);
    }

    .rm-auth-main-inner {
        margin: 0 auto;
    }

    .rm-auth-card {
        padding: clamp(1.5rem, 6vw, 2.25rem);
    }

    .rm-auth-footer {
        margin-top: 1.5rem;
    }

}

@media (max-width: 479.98px) {
    .rm-auth-brand {
        min-height: 13.5rem;
    }

    .rm-auth-brand-content {
        min-height: 10rem;
    }

    .rm-auth-message p {
        max-width: 18rem;
    }

    .rm-auth-main {
        padding: 2rem 1rem 1rem;
    }

    .rm-auth-card,
    .rm-auth-main .card {
        border-radius: 1rem;
    }

    .rm-auth-card-header {
        margin-bottom: 1.75rem;
    }

    .rm-auth-card-header h1 {
        font-size: 2rem;
    }

    .rm-auth-card-header p {
        font-size: 1rem;
    }

    .rm-auth-alternatives {
        align-items: stretch;
        flex-direction: column;
        gap: 0.85rem;
    }

    .rm-auth-alternatives span {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rm-auth *,
    .rm-auth *::before,
    .rm-auth *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
