.cms-auth-body {
    min-height: 100vh;
    background:
        radial-gradient(
            circle at top left,
            var(--cms-primary-subtle),
            transparent 34%
        ),
        var(--cms-bg);
}


/* =========================================================
 * SHELL
 * ========================================================= */

.cms-auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 40px 20px;
}


/* =========================================================
 * CARD
 * ========================================================= */

.cms-auth-card {
    width: min(100%, 450px);
    padding: 38px;
    border: 1px solid var(--cms-border);
    border-radius: 20px;
    background: var(--cms-surface);
    box-shadow: var(--cms-shadow);
}


/* =========================================================
 * BRAND
 * ========================================================= */

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


.cms-auth-logo {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 9px;

    border: 1px solid var(--cms-border);
    border-radius: 16px;

    background:
        linear-gradient(
            145deg,
            var(--cms-surface),
            var(--cms-surface-secondary)
        );

    box-shadow:
        0 8px 24px rgba(0, 0, 0, .06);
}


.cms-auth-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}


.cms-auth-brand-copy {
    min-width: 0;
}


.cms-auth-brand-copy strong {
    display: block;

    margin: 0;

    color: var(--cms-text);

    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;

    letter-spacing: -.02em;
}


.cms-auth-brand-copy span {
    display: block;

    margin-top: 4px;

    color: var(--cms-text-muted);

    font-size: .76rem;
    line-height: 1.4;
}


/* =========================================================
 * HEADING
 * ========================================================= */

.cms-auth-heading {
    margin-bottom: 28px;
}


.cms-auth-heading .cms-eyebrow {
    color: var(--cms-primary);

    font-size: .7rem;
    font-weight: 700;

    letter-spacing: .11em;
}


.cms-auth-heading h1 {
    margin: 0 0 9px;

    color: var(--cms-text);

    font-size: 2rem;
    font-weight: 700;

    line-height: 1.15;
    letter-spacing: -.045em;
}


.cms-auth-heading > p:last-child {
    max-width: 340px;

    margin: 0;

    color: var(--cms-text-muted);

    font-size: .86rem;
    line-height: 1.65;
}


/* =========================================================
 * FORM
 * ========================================================= */

.cms-auth-form .form-label {
    color: var(--cms-text);

    font-size: .79rem;
    font-weight: 600;
}


.cms-input-wrap,
.cms-password-wrap {
    position: relative;
}


.cms-input-icon {
    position: absolute;

    top: 50%;
    left: 15px;

    z-index: 4;

    transform: translateY(-50%);

    color: var(--cms-text-muted);

    font-size: 1.05rem;

    pointer-events: none;
}


.cms-auth-form .form-control {
    min-height: 48px;

    border-color: var(--cms-border);
    border-radius: 11px;

    background: var(--cms-surface-secondary);
    color: var(--cms-text);

    font-size: .86rem;

    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}


.cms-auth-form .form-control::placeholder {
    color: var(--cms-text-muted);
    opacity: .65;
}


.cms-auth-form .cms-input-with-icon {
    padding-left: 43px;
}


.cms-auth-form .cms-password-input {
    padding-right: 48px;
}


.cms-auth-form .form-control:focus {
    border-color: var(--cms-primary);

    background: var(--cms-surface);

    box-shadow:
        0 0 0 3px var(--cms-primary-subtle);
}


/* =========================================================
 * PASSWORD TOGGLE
 * ========================================================= */

.cms-password-toggle {
    position: absolute;

    top: 50%;
    right: 7px;

    z-index: 5;

    width: 36px;
    height: 36px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 0;
    border-radius: 8px;

    transform: translateY(-50%);

    background: transparent;
    color: var(--cms-text-muted);

    font-size: 1.1rem;

    transition:
        color .2s ease,
        background .2s ease;
}


.cms-password-toggle:hover {
    background: var(--cms-primary-subtle);
    color: var(--cms-primary);
}


.cms-password-toggle:focus-visible {
    outline: 2px solid var(--cms-primary);
    outline-offset: 1px;
}


/* =========================================================
 * SUBMIT
 * ========================================================= */

.cms-auth-submit {
    min-height: 48px;

    border-radius: 11px;

    font-size: .86rem;
    font-weight: 650;

    box-shadow:
        0 8px 20px rgba(0, 0, 0, .08);
}


.cms-auth-submit:disabled {
    cursor: wait;
    opacity: .75;
}


/* =========================================================
 * ALERT
 * ========================================================= */

#login-error {
    margin-bottom: 20px;

    border-radius: 10px;

    font-size: .8rem;
}


/* =========================================================
 * CARD FOOTER
 * ========================================================= */

.cms-auth-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    margin-top: 26px;
    padding-top: 22px;

    border-top: 1px solid var(--cms-border);

    color: var(--cms-text-muted);

    font-size: .68rem;
}


.cms-auth-footer-dot {
    width: 3px;
    height: 3px;

    border-radius: 50%;

    background: var(--cms-text-muted);

    opacity: .6;
}


/* =========================================================
 * THEME TOGGLE
 * ========================================================= */

.cms-auth-theme-toggle {
    position: fixed;

    top: 20px;
    right: 20px;

    z-index: 20;

    width: 42px;
    height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 1px solid var(--cms-border);
    border-radius: 11px;

    background: var(--cms-surface);
    color: var(--cms-text);

    box-shadow:
        0 8px 24px rgba(0, 0, 0, .05);
}


.cms-auth-theme-toggle:hover {
    background: var(--cms-surface-secondary);
    color: var(--cms-primary);
}


/* =========================================================
 * SELECT WEBSITE
 * ========================================================= */

.cms-select-website-card {
    width: min(100%, 560px);
}


.cms-select-placeholder {
    margin-top: 28px;
    padding: 30px 22px;

    border: 1px dashed var(--cms-border);
    border-radius: 12px;

    text-align: center;

    background: var(--cms-surface-secondary);
}


.cms-select-placeholder .cms-empty-icon {
    margin-inline: auto;
}


.cms-select-placeholder h2 {
    margin: 0 0 6px;

    font-size: .95rem;
}


.cms-select-placeholder p {
    margin: 0;

    color: var(--cms-text-muted);

    font-size: .8rem;
}


/* =========================================================
 * MOBILE
 * ========================================================= */

@media (max-width: 575.98px) {

    .cms-auth-shell {
        align-items: start;

        padding:
            84px
            16px
            26px;
    }


    .cms-auth-card {
        padding: 28px 23px;

        border-radius: 17px;
    }


    .cms-auth-brand {
        margin-bottom: 30px;
    }


    .cms-auth-logo {
        width: 52px;
        height: 52px;
        flex-basis: 52px;

        border-radius: 14px;
    }


    .cms-auth-heading h1 {
        font-size: 1.75rem;
    }


    .cms-auth-theme-toggle {
        top: 16px;
        right: 16px;
    }

}