:root {
    --bm-primary: #39b54a;
    --bm-primary-dark: #1f7a35;
    --bm-primary-light: #9cff73;
    --bm-dark: #111a17;
    --bm-text: #172033;
    --bm-muted: #6b778c;
    --bm-line: #dce5df;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
}

body.auth-page {
    display: grid;
    place-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 24px;
    color: var(--bm-text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 10% 10%, rgba(57, 181, 74, 0.13), transparent 28%),
        radial-gradient(circle at 90% 90%, rgba(57, 181, 74, 0.08), transparent 25%),
        #f3f7f4;
}

.auth-shell {
    width: min(100%, 920px);
}

.bm-login-card {
    display: grid;
    grid-template-columns: 1fr 0.92fr;
    min-height: 560px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 28px 70px rgba(17, 40, 24, 0.15);
    animation: bm-card-entry 0.55s ease both;
}

/* Painel esquerdo */

.bm-login-brand {
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 42px;
    color: #fff;
    background:
        radial-gradient(circle at 90% 10%, rgba(156, 255, 115, 0.15), transparent 28%),
        linear-gradient(145deg, #101713, #17271c 58%, #1c3924);
}

.bm-login-brand::before {
    position: absolute;
    inset: 0;
    content: "";
    opacity: 0.2;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 30px 30px;
}

.bm-brand-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

.bm-brand-logo {
    display: block;
    width: 92px;
    height: 92px;
    margin-bottom: 26px;
    padding: 5px;
    border-radius: 19px;
    object-fit: contain;
    background: #101010;
    box-shadow:
        0 18px 34px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(57, 181, 74, 0.13);
}

.bm-brand-eyebrow {
    display: block;
    margin-bottom: 8px;
    color: var(--bm-primary-light);
    font-size: 0.69rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.bm-brand-content h1 {
    margin: 0;
    font-size: clamp(2.65rem, 5vw, 3.65rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.06em;
}

.bm-brand-content > p {
    max-width: 420px;
    margin: 16px 0 25px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.9rem;
    line-height: 1.6;
}

.bm-brand-features {
    display: grid;
    gap: 9px;
}

.bm-brand-features div {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.055);
    transition: 0.2s ease;
}

.bm-brand-features div:hover {
    border-color: rgba(156, 255, 115, 0.22);
    background: rgba(255, 255, 255, 0.09);
    transform: translateX(4px);
}

.bm-brand-features i {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    color: var(--bm-primary-light);
    background: rgba(57, 181, 74, 0.12);
}

.bm-brand-features span {
    font-size: 0.82rem;
    font-weight: 750;
}

.bm-brand-content > small {
    display: block;
    margin-top: 23px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.71rem;
}

.bm-brand-content > small strong {
    color: var(--bm-primary-light);
}

.bm-brand-shape {
    position: absolute;
    pointer-events: none;
}

.bm-brand-shape-one {
    top: -75px;
    right: -55px;
    width: 210px;
    height: 210px;
    border-radius: 55px;
    transform: rotate(20deg);
    background: rgba(57, 181, 74, 0.1);
}

.bm-brand-shape-two {
    right: 38px;
    bottom: 46px;
    width: 85px;
    height: 85px;
    border: 1px solid rgba(156, 255, 115, 0.15);
    border-radius: 25px;
    transform: rotate(22deg);
}

/* Formulário */

.bm-login-area {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 42px;
    background:
        radial-gradient(circle at 100% 0%, rgba(57, 181, 74, 0.06), transparent 30%),
        #fff;
}

.bm-login-content {
    width: 100%;
    max-width: 360px;
}

.bm-login-header {
    margin-bottom: 25px;
}

.bm-login-header > span {
    color: var(--bm-primary-dark);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.bm-login-header h2 {
    margin: 7px 0 0;
    font-size: 2rem;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.bm-login-header p {
    margin: 9px 0 0;
    color: var(--bm-muted);
    font-size: 0.84rem;
    line-height: 1.5;
}

.bm-login-form {
    display: grid;
    gap: 17px;
}

.bm-field {
    display: grid;
    gap: 7px;
}

.bm-field > label {
    color: #283448;
    font-size: 0.78rem;
    font-weight: 800;
}

.bm-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.bm-input-group > i {
    position: absolute;
    left: 15px;
    z-index: 2;
    color: #8a98aa;
    pointer-events: none;
}

.bm-input-group input {
    width: 100%;
    height: 50px;
    padding: 0 47px;
    border: 1px solid var(--bm-line);
    border-radius: 13px;
    outline: none;
    color: var(--bm-text);
    font: inherit;
    font-size: 0.87rem;
    font-weight: 650;
    background: #f8fafb;
    transition: 0.2s ease;
}

.bm-input-group input::placeholder {
    color: #a1adba;
    font-weight: 500;
}

.bm-input-group input:focus {
    border-color: rgba(57, 181, 74, 0.7);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(57, 181, 74, 0.11);
}

.bm-input-group:focus-within > i {
    color: var(--bm-primary);
}

.bm-password-toggle {
    position: absolute;
    right: 7px;
    display: grid;
    place-items: center;
    width: 37px;
    height: 37px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    color: #8492a5;
    cursor: pointer;
    background: transparent;
}

.bm-password-toggle:hover {
    color: var(--bm-primary-dark);
    background: rgba(57, 181, 74, 0.09);
}

.bm-caps-warning {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #a16207;
    font-size: 0.7rem;
    font-weight: 700;
}

.bm-caps-warning[hidden] {
    display: none;
}

.bm-login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.bm-remember {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #657185;
    cursor: pointer;
    font-size: 0.76rem;
    font-weight: 700;
}

.bm-remember input {
    width: 16px;
    height: 16px;
    accent-color: var(--bm-primary);
}

.bm-login-options a {
    color: var(--bm-primary-dark);
    font-size: 0.76rem;
    font-weight: 800;
    text-decoration: none;
}

.bm-login-options a:hover {
    color: var(--bm-primary);
    text-decoration: underline;
}

.bm-login-button {
    display: grid;
    place-items: center;
    width: 100%;
    height: 50px;
    border: 0;
    border-radius: 13px;
    color: #fff;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 850;
    background: linear-gradient(100deg, #2fab42, #42c655);
    box-shadow: 0 13px 25px rgba(57, 181, 74, 0.22);
    transition: 0.2s ease;
}

.bm-login-button:hover {
    color: #fff;
    box-shadow: 0 17px 30px rgba(57, 181, 74, 0.28);
    transform: translateY(-2px);
}

.bm-login-button:disabled {
    cursor: wait;
    opacity: 0.78;
    transform: none;
}

.bm-button-default,
.bm-button-loading {
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.bm-button-default {
    display: flex;
}

.bm-button-loading {
    display: none;
}

.bm-login-button.is-loading .bm-button-default {
    display: none;
}

.bm-login-button.is-loading .bm-button-loading {
    display: flex;
}

.bm-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: bm-spin 0.7s linear infinite;
}

.bm-login-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 11px 13px;
    border-radius: 11px;
    font-size: 0.76rem;
    font-weight: 700;
}

.bm-login-alert-danger {
    color: #a7252d;
    background: #fff1f2;
}

.bm-login-alert-success {
    color: #247d3a;
    background: #ecfdf3;
}

.bm-login-footer {
    margin-top: 24px;
    color: #8a96a7;
    font-size: 0.68rem;
    font-weight: 650;
    text-align: center;
}

.bm-login-footer a {
    color: var(--bm-primary-dark);
    font-weight: 850;
    text-decoration: none;
}

@keyframes bm-card-entry {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.99);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes bm-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Notebook com pouca altura */

@media (max-height: 690px) and (min-width: 821px) {
    body.auth-page {
        padding: 15px;
    }

    .bm-login-card {
        min-height: 520px;
    }

    .bm-login-brand,
    .bm-login-area {
        padding-top: 30px;
        padding-bottom: 30px;
    }

    .bm-brand-logo {
        width: 78px;
        height: 78px;
        margin-bottom: 18px;
    }

    .bm-brand-content > p {
        margin-bottom: 18px;
    }

    .bm-brand-content > small {
        margin-top: 16px;
    }
}

/* Tablet e celular */

@media (max-width: 820px) {
    body.auth-page {
        display: block;
        padding: 14px;
    }

    .auth-shell {
        margin: 0 auto;
    }

    .bm-login-card {
        grid-template-columns: 1fr;
        min-height: auto;
        border-radius: 20px;
    }

    .bm-login-brand {
        padding: 28px;
    }

    .bm-brand-logo {
        width: 75px;
        height: 75px;
        margin-bottom: 18px;
    }

    .bm-brand-content h1 {
        font-size: 2.7rem;
    }

    .bm-brand-content > p {
        margin: 12px 0 19px;
    }

    .bm-brand-features {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .bm-brand-features div {
        justify-content: center;
        padding: 8px;
    }

    .bm-brand-features span {
        display: none;
    }

    .bm-brand-content > small {
        margin-top: 18px;
    }

    .bm-login-area {
        padding: 32px 26px;
    }

    .bm-login-content {
        max-width: 430px;
    }
}

@media (max-width: 480px) {
    body.auth-page {
        padding: 8px;
    }

    .bm-login-brand {
        padding: 24px 20px;
    }

    .bm-brand-content h1 {
        font-size: 2.35rem;
    }

    .bm-brand-content > p {
        font-size: 0.82rem;
    }

    .bm-login-area {
        padding: 28px 20px 24px;
    }

    .bm-login-header h2 {
        font-size: 1.75rem;
    }

    .bm-login-options {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bm-login-card,
    .bm-spinner {
        animation: none;
    }
}