.bg {
    display: flex;
    position: fixed;
    max-width: 100% !important;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    background-image: url('/Content/images/LOGIN BG.svg');
    background-position-x: center;
    background-position-y: center;
    background-size: auto 135%;
    background-repeat: no-repeat;
    background-color: #219BB8;
}

/* Garante rolagem do documento quando o conteúdo exceder a viewport */
html, body {
    height: 100%;
    overflow-y: auto;
}

.centro {
    display: flex;
    width: 100%;
    border-radius: 4px;
    align-content: flex-start;
    justify-content: center;
}

.logo-div {
    width: 270px;
    height: 437px;
    background-image: url('/Content/images/LOGIN BG 2.svg');
    background-position-x: center;
    background-repeat: no-repeat;
    display: flex;
    float: left;
    border-radius: 4px 0px 0px 4px;
}

.logo-img {
    width: 174px;
    margin: auto;
    z-index: 10;
}

.retangulo-preto {
    width: 270px;
    height: 437px;
    background-color: black;
    opacity: 0.1;
    position: absolute;
    border-radius: 4px 0px 0px 4px;
}

.form-div {
    float: left;
    font-family: Roboto;
    font-style: normal;
    font-weight: 500;
    font-size: 14px;
    line-height: 18px;
    border-radius: 0px 4px 4px 0px;
    overflow: auto;
    min-width: 800px;
}

.form-div-container-interno {
    max-width: 800px;
    margin: auto;
}

.form-registrar {
    margin-top: 13px;
    margin-bottom: 13px;
    margin-right: 0px;
    margin-left: 0px;
}

/* =================== */
/* Novos ajustes para layout conforme imagem */
/* =================== */

/* Disposição em duas colunas com espaçamento */
.input-duplo {
    display: flex;
    flex-direction: row;
    gap: 16px;
}

/* Cada grupo de formulário ocupa o mesmo espaço */
.form-group {
    flex: 1;
    margin-bottom: 12px;
    width: calc(100% - 10px);
    margin-left: 5px;
    position: relative;
}

/* Ajuste para inputs com bordas arredondadas e padding */
.form-input-txt {
    width: 100%;
    padding: 10px !important;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
}

/* Ajuste para a área de cadastro com bordas arredondadas */
.registro-passos {
    display: flex;
    transition: 2s;
    flex-direction: column;
    width: 100%;
    background: #FFF;
    padding: 16px;
    border-radius: 8px;
}

/* Fim dos ajustes para layout */

/* Classes já existentes a seguir */
.form-group-metade {
    margin-left: 5px;
    margin-right: 5px;
    float: left;
}

.label-logo {
    font-family: 'Roboto';
    font-weight: 600;
    font-size: 21px;
    margin-left: 6px;
    margin-bottom: 0px;
    vertical-align: sub;
    color: #FFF;
}

.container-passos-registro {
    display: flex;
}


.form-btn {
    width: fit-content;
}

.form-btn-secondary {
    width: fit-content;
}

.interacao-registrar-botoes {
    display: flex;
    justify-content: flex-end;
    flex-direction: row;
    gap: 10px;
    flex-wrap: wrap;
}
.interacao-registrar-botoes .form-btn,
.interacao-registrar-botoes .form-btn-secondary {
    flex: 0 0 auto;
}
.interacao-registrar-botoes .form-btn-secondary { order: 1; }
.interacao-registrar-botoes .form-btn { order: 2; }

.template-conteudo {
    padding: unset !important;
    height: unset !important;
}

.header-form {
    margin: unset !important;
    width: 100%;
    padding: 40px;
    text-align: center;
    color: #FFF;
    font-family: Roboto;
    font-style: normal;
    font-weight: bold;
    font-size: 24px;
    line-height: 28px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 4px 4px 0px 0px;
}

.barra-progresso-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
}

.status-registro {
    display: flex;
    gap: 2px;
    align-items: center;
}

.barra-progresso {
    width: 32px;
    height: 2px;
}

.titulo-sessao-cadastro {
    font-family: Roboto;
    font-style: normal;
    font-weight: bold;
    font-size: 16px;
    line-height: 19px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

/* Espaçamento consistente de labels */
label {
    margin-bottom: 4px;
}

.s-numero {
    width: 20px;
    height: 20px;
    text-align: center;
    border-radius: 10px;
    border: 1px solid;
}

.s-numero-ativo {
    width: 20px;
    height: 20px;
    text-align: center;
    border-radius: 10px;
    color: #FFF;
}

.progresso-concluido {
    text-align: center;
    width: 20px;
    height: 20px;
    border-radius: 8px;
    background: #4CBE22;
    color: #FFF;
}

.barra-concluido {
    width: 32px;
    height: 2px;
    background: #4CBE22;
}

.alert-campos p {
    padding: 8px;
    width: fit-content;
    text-align: center;
    background: #dc3545;
    color: #fff;
    border-radius: 4px;
}

.ui-autocomplete {
    position: fixed;
}

#registrar-erro-validacao {
    width: fit-content;
    text-align: center;
    background: #dc3545;
    color: #fff;
    border-radius: 4px;
}

@media only screen and (max-width: 768px) {
    .centro {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .centro {
        background-image: url('/Content/images/LOGIN BG 2.svg');
        background-position-x: center;
        background-size: cover;
        background-repeat: no-repeat;
        overflow: auto;
    }

    .logo-div {
        background-image: none;
        width: 100%;
        height: 130px;
        margin-top: 40px;
        margin-bottom: 40px;
    }

    .retangulo-preto {
        display: none;
    }

    .form-div {
        width: 100%;
        height: auto;
        background-color: transparent;
        color: #FFFFFF;
    }

    .form-registrar {
        margin-top: 0px;
        margin-right: 35px;
        margin-left: 35px;
        margin-bottom: 0px;
    }

    #form-group-senha {
        margin-bottom: -3px;
    }
}

@media (max-width: 900px) {
    .form-div {
        min-width: unset;
    }

    label {
        color: #000;
    }

    .input-duplo {
        flex-direction: column;
    }

    .form-div {
        margin-bottom: 80px;
        margin-top: 16px;
    }

    .barra-progresso-container {
        display: flex;
        justify-content: space-between;
        flex-direction: column-reverse;
        gap: 16px;
    }

    .status-registro {
        align-self: center;
    }

    .ui-autocomplete {
        position: fixed;
        width:65% !important;
    }
}
/* =========================================
   Media Query para telas menores que 768px
   ========================================= */
@media (max-width: 768px) {
    /* Ajuste geral do body para fundo cinza */
    body {
        background-color: #f5f5f5 !important;
        margin: 0;
        padding: 0;
    }

    /* ===== Cartão branco (Formulário) ===== */
    .form-div {
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        background-color: #fff;
        margin: 20px auto; /* Centraliza no mobile */
        max-width: 400px;  /* Largura máxima do "cartão" */
        width: 90%;        /* Preenche 90% da tela no mobile */
    }
    .form-div-container-interno {
        padding: 20px !important; /* reduz o padding interno */
        margin: 0 auto !important;
    }

    /* ===== Ajustes de títulos e labels ===== */
    .header-form {
        background: none !important;
        color: #f7941d;
        text-align: left;
        margin: 0;
        padding: 0;
    }
    .header-form h1,
    .header-form p {
        display: none !important;
    }

    .titulo-sessao-cadastro {
        font-weight: bold;
        font-size: 1.2rem;
        color: #f7941d;
        margin-bottom: 27px;
        margin-top: 0;
    }

    label {
        margin-top: 8px !important;
        margin-bottom: 2px !important;
        color: #333;
        font-size: 0.95rem;
    }
    .form-input-txt {
        border-radius: 6px;
        border: 1px solid #ccc;
        padding: 10px; !important;
        margin-top: 4px;
        width: 100% !important;
        font-size: 0.95rem;
        margin-bottom: 10px; /* espaço entre inputs */
    }

    /* ===== Passo (bolinhas) ===== */
    .barra-progresso-container {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-bottom: 20px !important;
        margin-top: 20px !important;
    }
    .status-registro {
        display: flex;
        align-items: center;
        gap: 1px;
    }
    .s-numero-ativo {
        background-color: #f7941d !important;
        color: #fff !important;
    }
    .s-numero,
    .s-numero-ativo {
        width: 32px !important;
        height: 32px !important;
        font-size: 1rem !important;
    }
    .barra-progresso {
        width: 40px !important;
        background-color: #ccc;
        height: 2px;
        flex: unset;
    }

    /* ===== Zera espaçamento das linhas flex ===== */
    .linha-dados-pessoais,
    .linha-cpf-data {
        display: flex;
        flex-direction: column; /* empilha tudo no mobile */
        gap: 0px !important;
        margin-bottom: 0px !important;
    }
    .form-group-endereco {
        display: block !important;
        margin-bottom: 0px !important;
        padding: 0 !important;
    }

    /* ===== Botões ===== */
    .interacao-registrar-botoes {
        /* Empilhar botões em ordem invertida:
           O segundo (Voltar) vem em cima do primeiro (Próximo). */
        display: flex;
        flex-direction: column-reverse;
        gap: 10px; /* espaço vertical entre eles */
    }
    .interacao-registrar-botoes .form-btn-secondary { order: unset !important; }
    .interacao-registrar-botoes .form-btn { order: unset !important; }
    .form-btn {
        width: 100%;
        border-radius: 6px;
        background-color: #f7941d !important;
        color: #fff !important;
        border: none;
        padding: 14px 20px;
        font-size: 1rem;
        text-align: center;
        cursor: pointer;
        margin: 0 !important;
    }
    .form-btn:hover {
        opacity: 0.9;
    }

    /* Agora exibimos o Voltar normalmente e em 100% de largura */
    .form-btn-secondary {
        display: block !important;
        width: 100%;
        margin-left: 0 !important;
        border-radius: 6px;
        background-color: #ccc !important;
        color: #333 !important;
    }
}


/*@media only screen and (max-height: 532px) {
    .centro {
        height: auto;
    }
}*/