* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
}

body {
    background:
        radial-gradient(
            circle at top,
            #ffffff 0%,
            #f5f8fc 45%,
            #e9f0f7 100%
        );

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;

    color: #172033;

    overscroll-behavior: none;
}


/* ---------------------------------------------------------
   PÁGINA
--------------------------------------------------------- */

.pagina-login-touch {
    width: 100%;
    min-height: 100dvh;

    display: flex;
    justify-content: center;
    align-items: center;

    padding:
        max(20px, env(safe-area-inset-top))
        20px
        max(20px, env(safe-area-inset-bottom));
}


/* ---------------------------------------------------------
   CARD
--------------------------------------------------------- */

.caixa-login-touch {
    width: min(100%, 480px);

    padding: 28px;

    background:
        rgba(255, 255, 255, 0.96);

    border: 1px solid
        rgba(218, 226, 238, 0.9);

    border-radius: 26px;

    box-shadow:
        0 24px 70px
        rgba(34, 52, 80, 0.12);
}


/* ---------------------------------------------------------
   MARCA
--------------------------------------------------------- */

.marca-sistema {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-bottom: 26px;
}

.marca-icone {
    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 15px;

    background:
        linear-gradient(
            135deg,
            #2563eb,
            #1d4ed8
        );

    color: #ffffff;

    font-size: 16px;
    font-weight: 800;

    box-shadow:
        0 8px 18px
        rgba(37, 99, 235, 0.25);
}

.marca-textos {
    display: flex;
    flex-direction: column;
}

.marca-textos strong {
    font-size: 17px;
    color: #172033;
}

.marca-textos span {
    margin-top: 2px;

    font-size: 12px;
    color: #8b97aa;
}


/* ---------------------------------------------------------
   CABEÇALHO
--------------------------------------------------------- */

.cabecalho-login {
    margin-bottom: 20px;
}

.cabecalho-login h1 {
    margin: 0 0 8px;

    font-size: clamp(25px, 4vw, 32px);
    line-height: 1.15;

    color: #111827;
}

.cabecalho-login p {
    margin: 0;

    color: #68758a;

    font-size: 15px;
    line-height: 1.55;
}


/* ---------------------------------------------------------
   OPERAÇÃO
--------------------------------------------------------- */

.operacao-escolhida {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-bottom: 20px;
    padding: 14px 15px;

    border-radius: 16px;

    background: #f2f7ff;

    border: 1px solid #dbe8ff;
}

.icone-operacao {
    width: 42px;
    height: 42px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 13px;

    background: #ffffff;

    color: #2563eb;

    font-size: 24px;
    font-weight: 800;

    box-shadow:
        0 4px 12px
        rgba(37, 99, 235, 0.09);
}

.operacao-escolhida > div:last-child {
    display: flex;
    flex-direction: column;
}

.operacao-escolhida span {
    color: #7c899d;

    font-size: 11px;

    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.operacao-escolhida strong {
    margin-top: 3px;

    color: #245edb;

    font-size: 15px;
}


/* ---------------------------------------------------------
   MENSAGENS
--------------------------------------------------------- */

.mensagem-erro,
.mensagem-sucesso {
    margin-bottom: 18px;
    padding: 13px 15px;

    border-radius: 13px;

    font-size: 14px;
    font-weight: 600;
}

.mensagem-erro {
    background: #fff1f2;

    border: 1px solid #fecdd3;

    color: #be123c;
}

.mensagem-sucesso {
    background: #ecfdf3;

    border: 1px solid #bbf7d0;

    color: #15803d;
}


/* ---------------------------------------------------------
   CPF
--------------------------------------------------------- */

.campo-cpf {
    margin-bottom: 17px;
}

.campo-cpf label {
    display: block;

    margin-bottom: 8px;

    font-size: 13px;
    font-weight: 700;

    color: #3d485c;
}

.input-cpf-container {
    position: relative;

    width: 100%;
}

.input-cpf-container input {
    width: 100%;
    height: 68px;

    padding:
        0 145px
        0 54px;

    border: 2px solid #dce4ef;
    border-radius: 17px;

    outline: none;

    background: #f9fbfd;

    color: #172033;

    font-size: 21px;
    font-weight: 700;

    letter-spacing: 1.2px;

    cursor: pointer;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.input-cpf-container input:focus,
.input-cpf-container input.ativo {
    border-color: #2563eb;

    background: #ffffff;

    box-shadow:
        0 0 0 4px
        rgba(37, 99, 235, 0.1);
}

.icone-cpf {
    position: absolute;

    left: 19px;
    top: 50%;

    transform: translateY(-50%);

    color: #2563eb;

    font-size: 21px;
    font-weight: 800;

    pointer-events: none;
}

.toque-cpf {
    position: absolute;

    right: 17px;
    top: 50%;

    transform: translateY(-50%);

    padding: 6px 8px;

    border-radius: 8px;

    background: #edf4ff;

    color: #2563eb;

    font-size: 10px;
    font-weight: 700;

    pointer-events: none;
}


/* ---------------------------------------------------------
   CONTINUAR
--------------------------------------------------------- */

.botao-continuar {
    width: 100%;
    height: 60px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;

    border: 0;
    border-radius: 16px;

    background:
        linear-gradient(
            135deg,
            #2563eb,
            #1e55cf
        );

    color: #ffffff;

    font-size: 16px;
    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 10px 25px
        rgba(37, 99, 235, 0.23);

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.botao-continuar:active {
    transform: scale(0.985);
}

.seta-botao {
    font-size: 21px;
}


/* ---------------------------------------------------------
   DIVISOR
--------------------------------------------------------- */

.linha-divisoria {
    display: flex;
    align-items: center;
    gap: 12px;

    margin: 22px 0 15px;

    color: #9ba5b5;

    font-size: 12px;
}

.linha-divisoria::before,
.linha-divisoria::after {
    content: "";

    flex: 1;

    height: 1px;

    background: #e3e8ef;
}


/* ---------------------------------------------------------
   CADASTRO
--------------------------------------------------------- */

.botao-cadastro {
    width: 100%;
    height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #d9e2ef;
    border-radius: 15px;

    background: #ffffff;

    color: #334155;

    font-size: 14px;
    font-weight: 700;

    text-decoration: none;
}

.botao-cadastro:active {
    background: #f5f8fc;
}


/* ---------------------------------------------------------
   VOLTAR
--------------------------------------------------------- */

.voltar-inicio {
    display: block;

    margin-top: 19px;

    text-align: center;

    color: #748196;

    font-size: 13px;
    font-weight: 600;

    text-decoration: none;
}


/* =========================================================
   FUNDO DO TECLADO
========================================================= */

.fundo-teclado {
    position: fixed;

    inset: 0;

    z-index: 900;

    background:
        rgba(9, 18, 32, 0.38);

    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);

    opacity: 0;

    visibility: hidden;

    transition:
        opacity 0.22s ease,
        visibility 0.22s ease;
}

.fundo-teclado.ativo {
    opacity: 1;
    visibility: visible;
}


/* =========================================================
   TECLADO CPF
========================================================= */

.teclado-cpf {
    position: fixed;

    left: 50%;
    bottom: max(
        16px,
        env(safe-area-inset-bottom)
    );

    z-index: 1000;

    width: min(
        calc(100% - 24px),
        430px
    );

    transform:
        translate(-50%, calc(100% + 50px));

    opacity: 0;

    visibility: hidden;

    transition:
        transform 0.26s ease,
        opacity 0.22s ease,
        visibility 0.22s ease;
}

.teclado-cpf.ativo {
    transform:
        translate(-50%, 0);

    opacity: 1;

    visibility: visible;
}

.teclado-conteudo {
    padding: 18px;

    background: #ffffff;

    border: 1px solid #e2e8f0;
    border-radius: 25px;

    box-shadow:
        0 28px 80px
        rgba(7, 18, 36, 0.28);
}


/* ---------------------------------------------------------
   TOPO
--------------------------------------------------------- */

.teclado-topo {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 16px;

    margin-bottom: 16px;
}

.teclado-topo > div:first-child {
    display: flex;
    flex-direction: column;
}

.teclado-topo span {
    margin-bottom: 4px;

    color: #7c899b;

    font-size: 12px;
    font-weight: 600;
}

.teclado-topo strong {
    color: #172033;

    font-size: 22px;
    letter-spacing: 1px;
}

.fechar-teclado {
    width: 42px;
    height: 42px;

    flex-shrink: 0;

    border: 0;
    border-radius: 13px;

    background: #f0f3f7;

    color: #697588;

    font-size: 27px;
    line-height: 1;

    cursor: pointer;
}


/* ---------------------------------------------------------
   NÚMEROS
--------------------------------------------------------- */

.teclado-numerico {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 10px;
}

.tecla-numero,
.tecla-acao {
    height: 62px;

    border: 1px solid #dce4ef;
    border-radius: 15px;

    background: #f8fafc;

    color: #182235;

    font-size: 23px;
    font-weight: 700;

    cursor: pointer;

    touch-action: manipulation;

    transition:
        transform 0.08s ease,
        background 0.08s ease;
}

.tecla-numero:active,
.tecla-acao:active {
    transform: scale(0.95);

    background: #e8eef7;
}

.tecla-acao {
    font-size: 13px;
}

.tecla-acao.limpar {
    color: #be123c;

    background: #fff5f5;
}

.tecla-acao.apagar {
    color: #2563eb;

    background: #f0f6ff;

    font-size: 23px;
}


/* ---------------------------------------------------------
   CONCLUIR
--------------------------------------------------------- */

.confirmar-teclado {
    width: 100%;
    height: 56px;

    margin-top: 12px;

    border: 0;
    border-radius: 15px;

    background: #2563eb;

    color: #ffffff;

    font-size: 15px;
    font-weight: 700;

    cursor: pointer;
}


/* =========================================================
   TABLET / TOUCH
========================================================= */

@media (max-width: 600px) {

    .pagina-login-touch {
        align-items: flex-start;

        padding:
            15px
            12px
            18px;
    }

    .caixa-login-touch {
        padding: 21px;

        border-radius: 22px;
    }

    .marca-sistema {
        margin-bottom: 20px;
    }

    .cabecalho-login {
        margin-bottom: 16px;
    }

    .input-cpf-container input {
        height: 64px;

        padding-right: 55px;
    }

    .toque-cpf {
        display: none;
    }

}


/* =========================================================
   TELAS BAIXAS
========================================================= */

@media (max-height: 700px) {

    .pagina-login-touch {
        align-items: flex-start;

        padding-top: 12px;
    }

    .caixa-login-touch {
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .marca-sistema {
        margin-bottom: 15px;
    }

    .cabecalho-login {
        margin-bottom: 13px;
    }

    .cabecalho-login p {
        font-size: 13px;
    }

    .operacao-escolhida {
        margin-bottom: 13px;

        padding: 10px 13px;
    }

    .input-cpf-container input {
        height: 58px;
    }

    .botao-continuar {
        height: 54px;
    }

    .linha-divisoria {
        margin: 15px 0 12px;
    }

    .tecla-numero,
    .tecla-acao {
        height: 52px;
    }

    .confirmar-teclado {
        height: 50px;
    }

}