* {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    background-color: #fff;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #2c2c2c;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

input,
select {
    outline: none;
}

a {
    color: #2c2c2c;
}

h1 {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0px;
}

p {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
}

#conteudo {
    width: 100%;
    text-align: center;
    margin: auto;
    max-width: 1200px;
}

#logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: calc(2rem + var(--sa-top, 0px)) auto 1.5rem; /* respiro abaixo do notch no iOS (no Android --sa-top é 0) */
    max-width: 280px;
    width: 100%;
}

#form {
    margin: 1rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

/* Campos / grupos de formulário -------------------------------------- */

.campos {
    margin-bottom: 1rem;
}

.campos p {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
    text-align: start;
    margin: 0 0 0.5rem;
    font-size: 14px;
    font-weight: 500;
    color: #6b6b6b;
}

.campos p span {
    border-bottom: none;
    color: #2c2c2c;
    font-size: 14px;
    font-weight: 500;
}

#form input:not([type="radio"]):not([type="checkbox"]) {
    width: 100%;
    background-color: #FFFFFF;
    border: 1px solid #d8d5d2;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 16px;
    color: #2c2c2c;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#form input::placeholder {
    color: #9b9b9b;
}

select {
    outline: none;
}

input[type="radio"] {
    accent-color: #df2726;
}

#form input:focus,
#form select:focus {
    border-color: #df2726;
}

/* Campo de senha com botão de mostrar/ocultar --------------------------- */

.campo-senha {
    position: relative;
}

.campo-senha input {
    padding-right: 2.75rem;
}

#form button.toggle-senha,
#form button.toggle-senha:hover,
#form button.toggle-senha:focus,
#form button.toggle-senha:active {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    width: auto;
    background: none;
    border: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    color: #9b9b9b;
    cursor: pointer;
    opacity: 1;
}

.toggle-senha .icon-eye-off {
    display: none;
}

.toggle-senha.is-visible .icon-eye {
    display: none;
}

.toggle-senha.is-visible .icon-eye-off {
    display: block;
}

/* Botões --------------------------------------------------------------- */

#form button {
    font-size: 16px;
    color: #FFFFFF;
    font-weight: 500;
    border: none;
    background-color: #2c2c2c;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-bottom: 0px;
    margin-top: 0;
    width: 100%;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

#form button:hover {
    background-color: #df2726;
    color: #ffffff;
}

#form button:active {
    opacity: 0.9;
}

/* Seletor segmentado (tipo de conta, RG/IE) ----------------------------- */

.opcoes-segmentado {
    display: flex;
    gap: 0.5rem;
    margin: 0 0 0.5rem;
    background-color: #f3f1ef;
    padding: 0.25rem;
    border-radius: 12px;
}

#opcoes button.tipo-opcao,
#opcoes_rg_ie button.tipo-opcao {
    flex: 1 1 0;
    width: auto;
    margin: 0;
    padding: 0.75rem 0.5rem;
    font-size: 16px;
    font-weight: 400;
    border-radius: 9px;
}

#opcoes button.tipo-opcao,
#opcoes_rg_ie button.tipo-opcao {
    background-color: transparent;
    color: #2c2c2c;
}

#opcoes button.tipo-opcao:hover,
#opcoes_rg_ie button.tipo-opcao:hover {
    background-color: rgba(44, 44, 44, 0.08);
    color: #2c2c2c;
}

#opcoes button.tipo-opcao.ativo,
#opcoes_rg_ie button.tipo-opcao.ativo {
    background-color: #df2726;
    color: #ffffff;
    cursor: default;
}

#opcoes button.tipo-opcao.ativo:hover,
#opcoes_rg_ie button.tipo-opcao.ativo:hover {
    background-color: #df2726;
    color: #ffffff;
}

/* Divisor "ou" ----------------------------------------------------------*/

.line-container {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 0.8rem 0;
    font-size: 14px;
    color: #9b9b9b;
}

.line-container::before,
.line-container::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e3e0dd;
    margin: 0 0.5rem;
}

/* Ação secundária ("Já tenho login") -------------------------------------*/

button#button_baixo {
    margin-top: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #2c2c2c;
    background-color: #ffffff;
    border: 1px solid #d8d5d2;
}

button#button_baixo:hover {
    background-color: #faf9f8;
    border-color: #2c2c2c;
    color: #2c2c2c;
}

p.aviso {
    color: #7a7a7a;
    font-size: 12px;
    font-weight: 400;
    text-align: center;
    margin: 0;
}

button#button_baixo + p.aviso {
    margin-top: 0.5rem;
}

#conteudo_aviso {
    width: 100%;
    margin: 1rem 0;
}

#conteudo_aviso p.aviso {
    text-align: start;
}

#conteudo_aviso .termo-link {
    color: #df2726;
    cursor: pointer;
}

p#baixo {
    color: #4a4a4a;
    cursor: pointer;
    margin: 0;
}

p#baixo:hover {
    color: #df2726;
    transition: color 0.2s ease;
}

/* Endereço (fornecedor) --------------------------------------------------*/

.endereco h2 {
    font-size: 16px;
    font-weight: 600;
    text-align: start;
    margin: 0 0 1rem;
    color: #2c2c2c;
}

#parte_cima,
#parte_baixo {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    margin: auto;
    flex-direction: column;
}

/* dentro do endereço o espaço entre campos vem só do gap (sem somar a margem do .campos) */
#parte_cima .campos,
#parte_baixo .campos {
    margin-bottom: 0;
}

#parte_cima + #parte_baixo {
    margin-top: 1rem;
}

#endereco_inicial,
#endereco_final {
    margin: 0 auto 1.5rem;
    background-color: #fafafa;
    color: #2c2c2c;
    border: 1px solid #e8e5e2;
    border-radius: 12px;
    padding: 1.5rem 1rem 0.5rem;
    display: flex;
    flex-direction: column;
}

/* Modal de termos ----------------------------------------------------- */

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 0 1rem;
}

.modal-content h2 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

#termos-conteudo {
    font-size: 12px;
    line-height: 1.6;
    color: #cfcbd1;
    max-height: 60vh;
    overflow-y: auto;
    scrollbar-width: none;
    text-align: start;
}

#termos-conteudo::-webkit-scrollbar {
    display: none;
}

@media (min-width: 600px) {
    #form {
        max-width: 560px;
        margin-left: auto;
        margin-right: auto;
    }

    #parte_cima,
    #parte_baixo {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

/* Tipo de conta vindo da tela de login */
.tipo-fixo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    margin: 0 0 1.5rem;
    text-align: center;
}

.tipo-fixo p {
    margin: 0;
    font-size: 14px;
    color: #7a7a7a;
}

.tipo-fixo a {
    font-size: 14px;
    color: #df2726;
    text-decoration: none;
}

/* Requisitos e confirmação da senha em tempo real (js/senha.js) */
.senha_requisitos {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.25rem;
    font-size: 13px;
    line-height: 1.4;
    text-align: left;
    color: #9b9b9b;
}

.senha_requisitos li::before {
    content: '\25CB';
    display: inline-block;
    width: 1.1rem;
}

.senha_requisitos li.ok {
    color: #1a8f3a;
}

.senha_requisitos li.ok::before {
    content: '\2713';
}

.senha_confirma {
    margin: 0.5rem 0 0;
    font-size: 13px;
    text-align: left;
}

.senha_confirma.ok {
    color: #1a8f3a;
}

.senha_confirma.erro {
    color: #df2726;
}

/* Cadastro abre direto no tipo escolhido no login: o <head> põe cadastro-comprador ou cadastro-fornecedor no <html> */
html.cadastro-comprador .so-fornecedor,
html.cadastro-fornecedor .so-comprador {
    display: none !important;
}

.tipo-fixo h1 {
    margin: 0 0 0.25rem;
    text-align: center;
}
