:root {
    --login-navy: #0b2a52;
    --login-blue: #1767d8;
    --login-blue-dark: #0d54ba;
    --login-text: #112b50;
    --login-muted: #677c9a;
    --login-line: #cdd9e9;
    --login-white: #ffffff;
    --login-shadow: rgba(3, 19, 44, .34);
    --login-danger: #9d2929;
    --login-danger-bg: #fff0f0;
    --login-success: #1d684b;
    --login-success-bg: #ecf9f3;
}

* {
    box-sizing: border-box;
}

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

body.cm-login-page {
    margin: 0;
    min-height: 100vh;
    color: var(--login-text);
    font:
        15px/1.45 system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    background:
        linear-gradient(
            180deg,
            rgba(7, 31, 65, .08),
            rgba(4, 20, 43, .58)
        ),
        url("../images/consult-login-bg.webp")
        center center / cover fixed;
}

body.cm-login-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(
            circle at 50% 27%,
            rgba(255, 255, 255, .16),
            transparent 36%
        ),
        linear-gradient(
            180deg,
            rgba(6, 39, 83, .08) 0%,
            rgba(4, 25, 55, .12) 52%,
            rgba(2, 16, 35, .54) 100%
        );
}

.cm-login-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 42px 22px 24px;
}

.cm-login-content {
    width: min(100%, 660px);
}

.cm-login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-bottom: 24px;
    color: #fff;
    text-shadow: 0 2px 14px rgba(0, 23, 55, .24);
}

.cm-login-mark {
    flex: 0 0 auto;
    width: 70px;
    height: 70px;
    display: grid;
    place-items: center;
    border: 3px solid rgba(255, 255, 255, .96);
    border-radius: 50%;
    background: rgba(7, 43, 86, .22);
    backdrop-filter: blur(7px);
    box-shadow:
        0 8px 22px rgba(0, 18, 42, .18),
        inset 0 0 0 1px rgba(255, 255, 255, .12);
}

.cm-login-mark svg {
    width: 34px;
    height: 34px;
}

.cm-brand-copy {
    min-width: 0;
}

.cm-brand-name {
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1;
    font-weight: 650;
    letter-spacing: -.04em;
    white-space: nowrap;
}

.cm-brand-name span {
    font-weight: 350;
    color: #b7d3fb;
}

.cm-brand-tagline {
    margin-top: 12px;
    padding-top: 11px;
    border-top: 1px solid rgba(255, 255, 255, .32);
    font-size: 16px;
    font-weight: 550;
    letter-spacing: .005em;
    color: rgba(255, 255, 255, .93);
}

.cm-login-card {
    width: min(100%, 550px);
    margin: 0 auto;
    padding: 32px 35px 28px;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 20px;
    background: rgba(255, 255, 255, .96);
    box-shadow:
        0 24px 70px var(--login-shadow),
        0 4px 18px rgba(8, 39, 79, .12);
    backdrop-filter: blur(16px);
}

.cm-card-heading {
    text-align: center;
    margin-bottom: 24px;
}

.cm-eyebrow {
    margin: 0 0 4px;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: 11px !important;
    font-weight: 800;
    color: var(--login-blue);
}

.cm-card-heading h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 34px);
    line-height: 1.14;
    letter-spacing: -.035em;
    color: var(--login-navy);
}

.cm-card-heading p {
    margin: 8px 0 0;
    color: var(--login-muted);
    font-size: 16px;
}

.cm-field {
    margin-bottom: 17px;
}

.cm-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 750;
    color: #17345c;
}

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

.cm-input-wrap input {
    width: 100%;
    min-height: 52px;
    margin: 0;
    padding: 12px 48px 12px 47px;
    border: 1px solid var(--login-line);
    border-radius: 10px;
    outline: 0;
    background: #fff;
    color: #152d50;
    font: inherit;
    font-size: 15px;
    box-shadow: 0 1px 2px rgba(9, 32, 63, .02);
    transition:
        border-color .15s ease,
        box-shadow .15s ease;
}

.cm-input-wrap input::placeholder {
    color: #93a3b9;
}

.cm-input-wrap input:focus {
    border-color: #5c96e7;
    box-shadow: 0 0 0 4px rgba(23, 103, 216, .12);
}

.cm-input-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    width: 20px;
    height: 20px;
    transform: translateY(-50%);
    color: #7e91ad;
    pointer-events: none;
}

.cm-input-icon svg,
.cm-password-toggle svg,
.cm-signin-btn svg,
.cm-feature-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.cm-password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    width: 35px;
    height: 35px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #7488a5;
    cursor: pointer;
}

.cm-password-toggle:hover,
.cm-password-toggle:focus-visible {
    background: #eef4fc;
    color: var(--login-blue);
    outline: 0;
}

.cm-password-toggle svg {
    width: 21px;
    height: 21px;
}

.cm-signin-btn {
    width: 100%;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    margin-top: 7px;
    border: 0;
    border-radius: 10px;
    background:
        linear-gradient(
            135deg,
            var(--login-blue),
            #1261cf
        );
    color: #fff;
    font: inherit;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    box-shadow:
        0 10px 24px rgba(23, 103, 216, .25),
        inset 0 1px 0 rgba(255, 255, 255, .15);
    transition:
        transform .15s ease,
        box-shadow .15s ease,
        background .15s ease;
}

.cm-signin-btn:hover {
    transform: translateY(-1px);
    background:
        linear-gradient(
            135deg,
            #1d70e8,
            var(--login-blue-dark)
        );
    box-shadow:
        0 13px 28px rgba(23, 103, 216, .31),
        inset 0 1px 0 rgba(255, 255, 255, .18);
}

.cm-signin-btn:active {
    transform: translateY(0);
}

.cm-signin-btn svg {
    width: 19px;
    height: 19px;
}

.cm-security-note {
    margin: 17px 0 0;
    text-align: center;
    color: #8191a8;
    font-size: 12px;
}

.cm-alert {
    margin: 0 0 18px;
    padding: 11px 13px;
    border: 1px solid;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 650;
}

.cm-alert-error {
    color: var(--login-danger);
    border-color: #efc7c7;
    background: var(--login-danger-bg);
}

.cm-alert-success {
    color: var(--login-success);
    border-color: #bfe5d4;
    background: var(--login-success-bg);
}

.cm-login-features {
    width: min(100%, 610px);
    margin: 25px auto 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.cm-feature {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 13px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 14px;
    color: #fff;
    background: rgba(6, 30, 61, .28);
    box-shadow: 0 10px 28px rgba(0, 15, 35, .12);
    backdrop-filter: blur(10px);
}

.cm-feature-icon {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    color: #fff;
}

.cm-feature div {
    min-width: 0;
}

.cm-feature strong,
.cm-feature span {
    display: block;
}

.cm-feature strong {
    font-size: 13px;
    line-height: 1.25;
}

.cm-feature div span {
    margin-top: 2px;
    color: rgba(255, 255, 255, .76);
    font-size: 11px;
    line-height: 1.25;
}

.cm-login-footer {
    margin-top: 20px;
    color: rgba(255, 255, 255, .64);
    font-size: 11px;
    text-shadow: 0 1px 8px rgba(0, 0, 0, .28);
}

.cm-login-footer span {
    margin: 0 7px;
}

@media (max-height: 820px) and (min-width: 681px) {
    .cm-login-shell {
        justify-content: flex-start;
        padding-top: 25px;
    }

    .cm-login-mark {
        width: 58px;
        height: 58px;
    }

    .cm-login-brand {
        margin-bottom: 17px;
    }

    .cm-login-card {
        padding-top: 25px;
        padding-bottom: 23px;
    }

    .cm-login-features {
        margin-top: 17px;
    }
}

@media (max-width: 680px) {
    body.cm-login-page {
        background-position: 68% center;
        background-attachment: scroll;
    }

    .cm-login-shell {
        justify-content: flex-start;
        min-height: 100svh;
        padding: 27px 15px 20px;
    }

    .cm-login-brand {
        gap: 12px;
        margin-bottom: 18px;
    }

    .cm-login-mark {
        width: 52px;
        height: 52px;
        border-width: 2px;
    }

    .cm-login-mark svg {
        width: 27px;
        height: 27px;
    }

    .cm-brand-name {
        white-space: normal;
        font-size: clamp(26px, 8vw, 35px);
    }

    .cm-brand-tagline {
        display: none;
    }

    .cm-login-card {
        padding: 25px 20px 22px;
        border-radius: 17px;
    }

    .cm-card-heading {
        margin-bottom: 20px;
    }

    .cm-login-features {
        grid-template-columns: 1fr;
        width: min(100%, 550px);
        margin-top: 15px;
    }

    .cm-feature {
        padding: 9px 12px;
    }
}

@media (max-width: 390px) {
    .cm-login-mark {
        display: none;
    }

    .cm-login-brand {
        text-align: center;
    }

    .cm-login-card {
        padding-left: 17px;
        padding-right: 17px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}


/* Google Sign-In */
.cm-google-signin {
    display: flex;
    justify-content: center;
    min-height: 44px;
    margin: 4px 0 18px;
}

.cm-google-signin .g_id_signin {
    width: 100%;
    display: flex;
    justify-content: center;
}

.cm-login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 18px;
    color: #8a99ae;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.cm-login-divider::before,
.cm-login-divider::after {
    content: '';
    height: 1px;
    flex: 1;
    background: #dce4ef;
}

.cm-login-divider span {
    white-space: nowrap;
}
