.lf-auth {
    align-items: center;
    inset: 0;
    justify-content: center;
    padding: 20px;
    position: fixed;
    z-index: 999999;
    display: flex;
    --lf-primary: #0F3D5E;
    --lf-primary-dark: #0B2E47;
    --lf-primary-disabled: #9AAEBC;
    --lf-input-bg: #F1F5F8;
    --lf-input-border: #D8E2E9;
}

.lf-auth[hidden] {
    display: none;
}

.lf-auth__overlay {
    background: rgba(0, 0, 0, 0.62);
    inset: 0;
    position: absolute;
}

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

.lf-auth__dialog {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
    color: #222222;
    max-height: calc(100vh - 40px);
    max-width: 680px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 28px;
    position: relative;
    width: 100%;
}

.lf-auth__close {
    background: transparent;
    border: 0;
    color: #6b7684;
    cursor: pointer;
    font-size: 26px;
    line-height: 1;
    padding: 4px;
    position: absolute;
    right: 16px;
    top: 14px;
}

.lf-auth__close:hover {
    color: #111111;
}

.lf-auth__title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 18px;
    padding-right: 24px;
}

.lf-auth__tabs {
    border-bottom: 1px solid #e6eaef;
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
}

.lf-auth__tab {
    background: transparent;
    border: 0;
    border-bottom: 3px solid transparent;
    color: #6b7684;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: -1px;
    padding: 10px 16px;
}

.lf-auth__tab.is-active {
    border-bottom-color: var(--lf-primary);
    color: #2b2b34;
}

.lf-auth__pane {
    display: none;
    flex-direction: column;
    gap: 14px;
}

.lf-auth__pane.is-active {
    display: flex;
}

.lf-auth__section {
    color: #6b7684;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.03em;
    margin: 8px 0 -2px;
    text-transform: uppercase;
}

.lf-auth__req {
    color: #e02424;
    font-weight: 700;
}

.lf-auth__intro-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 14px;
}

.lf-auth__intro p {
    font-size: 15px;
    line-height: 1.5;
    margin: 0 0 12px;
}

.lf-auth__intro-subtitle {
    font-weight: 700;
    margin-top: 18px !important;
}

.lf-auth__intro-list {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
}

.lf-auth__intro-list li {
    font-size: 15px;
    line-height: 1.5;
    margin: 0 0 7px;
}

.lf-auth__intro .lf-auth__checkbox {
    background: var(--lf-input-bg);
    border-radius: 8px;
    margin: 16px 0;
    padding: 12px 14px;
}

.lf-auth__intro .lf-auth__submit {
    width: 100%;
}

.lf-auth__fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.lf-auth__choice-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px;
}

.lf-auth__choice-options {
    display: flex;
    gap: 12px;
}

.lf-auth .lf-auth__choice-btn {
    background: var(--lf-input-bg) !important;
    border: 1px solid var(--lf-input-border) !important;
    border-radius: 10px !important;
    cursor: pointer;
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 18px 16px !important;
    text-align: left;
    white-space: normal;
    width: auto;
}

.lf-auth__choice-btn strong,
.lf-auth__choice-btn span {
    white-space: normal;
    overflow-wrap: anywhere;
}

.lf-auth .lf-auth__choice-btn:hover {
    border-color: var(--lf-primary) !important;
}

.lf-auth__choice-btn strong {
    color: #2b2b34;
    font-size: 16px;
}

.lf-auth__choice-btn span {
    color: #6b7684;
    font-size: 13px;
    line-height: 1.4;
}

.lf-auth .lf-auth__back {
    align-self: flex-start;
    background: transparent !important;
    border: 0 !important;
    color: var(--lf-primary) !important;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    padding: 0 !important;
    width: auto !important;
}

.lf-auth__branch {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

@media (max-width: 600px) {
    .lf-auth__choice-options {
        flex-direction: column;
    }
}

.lf-auth__row {
    display: flex;
    gap: 12px;
}

.lf-auth__row .lf-auth__field {
    flex: 1 1 0;
    min-width: 0;
}

.lf-auth__field--sm {
    flex: 0 0 120px !important;
}

.lf-auth__field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.lf-auth__field span {
    font-size: 13px;
    font-weight: 600;
}

.lf-auth__field input,
.lf-auth__field select {
    background: var(--lf-input-bg);
    border: 1px solid var(--lf-input-border);
    border-radius: 8px;
    font-size: 15px;
    padding: 12px 14px;
    width: 100%;
}

.lf-auth__field input:focus,
.lf-auth__field select:focus {
    border-color: var(--lf-primary);
    box-shadow: 0 0 0 3px rgba(15, 61, 94, 0.15);
    outline: none;
}

.lf-auth__pass {
    display: block;
    position: relative;
}

.lf-auth__pass input {
    padding-right: 44px;
}

.lf-auth__eye {
    background: transparent;
    border: 0;
    color: #8a94a6;
    cursor: pointer;
    font-size: 17px;
    line-height: 1;
    opacity: 0.7;
    padding: 4px;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
}

.lf-auth__eye.is-on,
.lf-auth__eye:hover {
    opacity: 1;
}

.lf-auth__inline {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.lf-auth__checkbox--inline {
    margin: 0;
}

.lf-auth__persontype {
    display: flex;
    gap: 18px;
}

.lf-auth__radio,
.lf-auth__checkbox {
    align-items: center;
    display: flex;
    font-size: 14px;
    gap: 8px;
    line-height: 1.4;
}

.lf-auth__checkbox {
    align-items: flex-start;
}

.lf-auth__submit {
    background: var(--lf-primary);
    border: 0;
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    margin-top: 6px;
    padding: 14px 20px;
}

.lf-auth__submit:hover {
    background: var(--lf-primary-dark);
}

.lf-auth__submit[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.lf-auth__submit.is-loading {
    align-items: center;
    display: inline-flex;
    gap: 10px;
    justify-content: center;
}

.lf-auth__submit.is-loading::before {
    animation: lf-auth-spin 0.7s linear infinite;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    border-top-color: #ffffff;
    content: "";
    height: 16px;
    width: 16px;
}

.lf-auth__cep-status {
    font-size: 12px;
    line-height: 1.3;
}

.lf-auth__cep-status--loading {
    color: #0F3D5E;
}

.lf-auth__cep-status--success {
    color: #157347;
}

.lf-auth__cep-status--error {
    color: #b42318;
}

@keyframes lf-auth-spin {
    to {
        transform: rotate(360deg);
    }
}

.lf-auth__link {
    color: var(--lf-primary);
    font-size: 14px;
    text-decoration: none;
}

.lf-auth__link:hover {
    text-decoration: underline;
}

.lf-auth__message {
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.4;
    padding: 12px 14px;
}

.lf-auth__message--error {
    background: #fdecec;
    color: #b42318;
}

.lf-auth__message--success {
    background: #e8f6ef;
    color: #157347;
}

.lf-auth__hp {
    left: -9999px;
    position: absolute;
}

body.lf-auth-open {
    overflow: hidden;
}

@media (max-width: 600px) {
    .lf-auth {
        padding: 10px;
    }

    .lf-auth__dialog {
        padding: 22px 18px;
    }

    .lf-auth__row {
        flex-direction: column;
        gap: 14px;
    }

    .lf-auth__field--sm {
        flex: 1 1 auto !important;
    }
}

/* ------------------------------------------------------------------ *
 * Blindagem contra estilos de botão/input do tema do site (Elementor)
 * Selectores com maior especificidade + !important para não serem
 * sobrescritos por regras globais de button do tema.
 * ------------------------------------------------------------------ */
.lf-auth button {
    -webkit-appearance: none;
    appearance: none;
    box-shadow: none !important;
    text-shadow: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    min-height: 0 !important;
    width: auto;
}

.lf-auth .lf-auth__tab {
    background: transparent !important;
    border: 0 !important;
    border-bottom: 3px solid transparent !important;
    border-radius: 0 !important;
    color: #6b7684 !important;
    font-weight: 700 !important;
    padding: 10px 16px !important;
}

.lf-auth .lf-auth__tab.is-active {
    border-bottom: 3px solid var(--lf-primary) !important;
    color: #2b2b34 !important;
}

.lf-auth .lf-auth__submit {
    background: var(--lf-primary) !important;
    border: 0 !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    width: 100%;
}

.lf-auth .lf-auth__submit:hover {
    background: var(--lf-primary-dark) !important;
}

.lf-auth .lf-auth__submit[disabled] {
    background: var(--lf-primary-disabled) !important;
    color: #ffffff !important;
}

.lf-auth .lf-auth__close {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    color: #6b7684 !important;
    padding: 4px !important;
    width: auto !important;
}

.lf-auth .lf-auth__eye {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    color: #8a94a6 !important;
    padding: 4px !important;
    width: auto !important;
}

.lf-auth .lf-auth__field input,
.lf-auth .lf-auth__field select {
    background: var(--lf-input-bg) !important;
    border: 1px solid var(--lf-input-border) !important;
    border-radius: 8px !important;
    color: #222222 !important;
}
