:root {
    --vermelho: #e42320;
    --verde: #046a30;
    --amarelo: #ffff00;
    --fundo: #eeeeee;
    --branco: #ffffff;
    --texto: #222222;
    --texto-suave: #626262;
    --borda: #d7d7d7;
    --sombra-card: 0 8px 18px rgba(0, 0, 0, 0.12);
    --sombra-botao: 0 3px 6px rgba(0, 0, 0, 0.18);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    color: var(--texto);
    background: var(--fundo);
    font-family: Arial, Helvetica, sans-serif;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.4;
}

h1,
h2,
h3,
p {
    margin: 0;
}

.pagina-com-fundo,
.pagina-splash,
.pagina-chat {
    min-height: 100vh;
}

.pagina-com-fundo {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 30px;
    background: var(--fundo);
}

.pagina-splash {
    display: grid;
    place-items: center;
    background: #ffffff;
}

.logo-splash {
    width: 180px;
    height: 180px;
    object-fit: contain;
    opacity: 0;
    animation: entradaLogo 2s ease-out forwards;
}

@keyframes entradaLogo {
    0% {
        opacity: 0;
        transform: rotate(0deg);
    }

    50% {
        opacity: 1;
        transform: rotate(360deg);
    }

    100% {
        opacity: 1;
        transform: rotate(360deg);
    }
}

.fundo-marcas {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.marca-fundo {
    position: absolute;
    width: var(--tamanho);
    height: var(--tamanho);
    object-fit: contain;
    opacity: var(--opacidade);
    transform: rotate(var(--rotacao));
    will-change: transform, left, top;
}

.cartao {
    position: relative;
    z-index: 1;
    background: var(--branco);
    border-radius: 12px;
    box-shadow: var(--sombra-card);
}

.cartao-login {
    display: grid;
    justify-items: center;
    width: min(500px, 90vw);
    padding: 24px;
}

.logo-login {
    width: 60%;
    min-width: 250px;
    max-width: 300px;
    height: 64px;
    margin-bottom: 24px;
    object-fit: contain;
}

.formulario-login {
    display: grid;
    gap: 16px;
    width: 100%;
}

.campo-contornado {
    position: relative;
    display: grid;
}

.campo-contornado span {
    position: absolute;
    top: -9px;
    left: 14px;
    z-index: 1;
    padding: 0 5px;
    color: #565656;
    background: var(--branco);
    font-size: 14px;
    line-height: 18px;
}

.campo-contornado input,
.campo-contornado select {
    width: 100%;
    min-height: 56px;
    padding: 13px 16px;
    color: var(--texto);
    background: var(--branco);
    border: 1px solid #7d7d7d;
    border-radius: 4px;
    outline: 0;
}

.campo-contornado input {
    font-size: 18px;
}

.campo-contornado select {
    appearance: auto;
    font-size: 16px;
}

.campo-contornado input:focus,
.campo-contornado select:focus {
    border-color: #5e35b1;
    box-shadow: 0 0 0 1px #5e35b1;
}

.botao-principal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 42px;
    padding: 0 18px;
    color: var(--branco);
    border: 0;
    border-radius: 4px;
    box-shadow: var(--sombra-botao);
    font-weight: 600;
}

.botao-principal:disabled {
    cursor: not-allowed;
    opacity: 0.68;
}

.botao-vermelho {
    background: var(--vermelho);
}

.botao-verde {
    background: var(--verde);
}

.formulario-login .botao-principal {
    width: 100%;
    margin-top: 8px;
}

.link-texto {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    justify-self: center;
    padding: 2px 4px;
    color: #4f5b93;
    background: transparent;
    border: 0;
    font-size: 14px;
}

.titulo-central {
    color: var(--verde);
    font-size: 22px;
    text-align: center;
}

.cartao-home,
.cartao-documentos {
    width: min(1078px, 94vw);
    max-height: calc(100vh - 60px);
    padding: 36px;
    overflow: hidden;
    border-radius: 16px;
}

.cartao-documentos {
    display: flex;
    flex-direction: column;
}

.cabecalho-home,
.cabecalho-documentos {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.logo-home,
.logo-documentos {
    width: min(466px, 58vw);
    height: 132px;
    object-fit: contain;
    object-position: left center;
}

.acoes-home,
.usuario-documentos {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
    padding-top: 16px;
}

.usuario-documentos span {
    font-size: 18px;
    font-weight: 700;
}

.botao-icone-topo {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: var(--verde);
    background: transparent;
    border: 0;
    border-radius: 50%;
}

.botao-icone-topo svg {
    width: 28px;
    height: 28px;
}

.botao-icone-topo.usuario {
    color: var(--branco);
    background: var(--verde);
}

.botao-icone-topo.usuario svg {
    width: 25px;
    height: 25px;
    stroke: var(--branco);
    stroke-width: 2.2;
}

.botao-icone-topo.sair {
    color: var(--vermelho);
}

.botao-icone-topo.sair svg {
    width: 30px;
    height: 30px;
}

.botao-icone-topo:hover {
    background: rgba(0, 0, 0, 0.05);
}

.cartao-home h1,
.cartao-documentos h1 {
    margin-top: 12px;
    color: var(--verde);
    font-size: 29px;
    font-weight: 700;
}

.painel-home {
    display: grid;
    justify-items: start;
    gap: 16px;
    margin-top: 28px;
    padding: 24px;
    background: #fafafa;
    border: 1px solid var(--borda);
    border-radius: 16px;
}

.painel-home p {
    color: #222222;
    font-size: 15px;
    line-height: 1.5;
}

.painel-home small {
    color: var(--texto-suave);
    font-size: 12px;
}

.botao-com-icone {
    min-height: 44px;
    padding-inline: 22px;
}

.caixa-documentos {
    flex: 1;
    min-height: 0;
    min-height: 296px;
    margin-top: 36px;
    padding: 29px 30px 31px;
    overflow: hidden;
    border: 1px solid var(--borda);
    border-radius: 19px;
}

.entrada-arquivos {
    display: none;
}

.conteudo-arquivos {
    display: grid;
    gap: 24px;
    min-height: 0;
}

.linha-arquivos {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    min-height: 65px;
}

.estado-arquivos {
    min-width: 0;
    padding-top: 55px;
    color: #797979;
    font-size: 18px;
}

.estado-arquivos.com-lista {
    padding-top: 54px;
    color: #2f2f2f;
}

.botao-adicionar,
.botao-enviar-arquivos {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--branco);
    border: 0;
    border-radius: 22px;
    box-shadow: var(--sombra-botao);
    font-size: 18px;
    font-weight: 600;
}

.botao-adicionar {
    min-width: 158px;
    height: 41px;
    margin-top: 48px;
    padding: 0 23px;
    background: var(--vermelho);
}

.botao-adicionar svg,
.botao-enviar-arquivos svg {
    width: 22px;
    height: 22px;
}

.lista-documentos {
    max-height: clamp(130px, 24vh, 236px);
    margin: 0 0 -3px;
    padding: 0;
    overflow-y: auto;
    list-style: none;
    scrollbar-color: #bdbdbd transparent;
    scrollbar-width: thin;
}

.lista-documentos li {
    position: relative;
    display: grid;
    gap: 4px;
    min-height: 60px;
    padding: 6px 44px 8px 0;
    border-bottom: 1px solid #cecad2;
    color: #303030;
    font-size: 16px;
}

.lista-documentos strong {
    display: block;
    max-width: 100%;
    overflow: hidden;
    font-weight: 400;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lista-documentos small {
    color: #7a7a7a;
    font-size: 14px;
}

.botao-remover {
    position: absolute;
    top: 13px;
    right: 11px;
    width: 26px;
    height: 26px;
    color: #4d4850;
    background: transparent;
    border: 0;
    font-size: 30px;
    line-height: 20px;
}

.botao-limpar {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    gap: 11px;
    margin-left: 13px;
    color: #5e4287;
    background: transparent;
    border: 0;
    font-size: 18px;
}

.botao-limpar svg {
    width: 22px;
    height: 22px;
}

.formatos-aceitos,
.instrucao-envio {
    color: #858585;
    font-size: 16px;
}

.formatos-aceitos {
    margin-top: -6px;
}

.botao-enviar-arquivos {
    width: 100%;
    flex: 0 0 auto;
    height: 40px;
    background: var(--verde);
}

.instrucao-envio {
    margin-top: -4px;
}

.barra-aplicacao {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding: 0 18px;
    color: var(--branco);
    background: var(--verde);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.barra-aplicacao h1 {
    font-size: 21px;
    font-weight: 600;
}

.botao-voltar,
.botao-menu-chat {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: var(--branco);
    background: transparent;
    border: 0;
    border-radius: 50%;
}

.botao-voltar:hover,
.botao-menu-chat:hover {
    background: rgba(255, 255, 255, 0.12);
}

.pagina-chat {
    display: grid;
    grid-template-rows: auto 1fr auto;
    background: var(--fundo);
}

.barra-chat {
    background: var(--vermelho);
}

.botao-menu-chat {
    margin-left: auto;
}

.area-mensagens {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 12px;
    padding: 12px;
    overflow-y: auto;
}

.mensagem-vazia {
    align-self: center;
    justify-self: center;
    margin: auto;
    color: #707070;
}

.bolha-mensagem {
    display: grid;
    gap: 2px;
    max-width: min(72vw, 620px);
}

.bolha-mensagem.enviada {
    align-self: flex-end;
}

.bolha-mensagem.recebida {
    align-self: flex-start;
}

.texto-bolha {
    padding: 10px 14px;
    border-radius: 16px 16px 4px 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.14);
}

.bolha-mensagem.enviada .texto-bolha {
    color: var(--branco);
    background: var(--verde);
}

.bolha-mensagem.recebida .texto-bolha {
    color: var(--texto);
    background: var(--branco);
    border-radius: 16px 16px 16px 4px;
}

.hora-mensagem {
    color: #666666;
    font-size: 10px;
}

.bolha-mensagem.enviada .hora-mensagem {
    text-align: right;
}

.compositor-chat {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 8px 12px;
    background: var(--branco);
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.12);
}

.compositor-chat textarea {
    flex: 1;
    min-height: 48px;
    max-height: 140px;
    padding: 12px 16px;
    resize: none;
    border: 1px solid #777777;
    border-radius: 22px;
    outline: 0;
}

.botao-enviar-chat {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    color: var(--branco);
    background: var(--vermelho);
    border: 0;
    border-radius: 50%;
}

.botao-enviar-chat svg {
    width: 19px;
    height: 19px;
    transform: rotate(-15deg);
}

.barra-mensagem {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10;
    min-height: 52px;
    padding: 16px 30px;
    color: var(--branco);
    background: #f23855;
    font-size: 16px;
}

.barra-mensagem.sucesso {
    background: #2e9d45;
}

.modal-envio {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: grid;
    place-items: center;
    padding: 28px;
    background: rgba(0, 0, 0, 0.55);
}

.caixa-carregando-envio {
    display: grid;
    justify-items: center;
    gap: 18px;
    color: var(--verde);
    font-size: 18px;
    font-weight: 700;
}

.logo-carregando-envio {
    width: 118px;
    height: 118px;
    object-fit: contain;
    animation: girarLogoEnvio 1.1s linear infinite;
}

@keyframes girarLogoEnvio {
    to {
        transform: rotate(360deg);
    }
}

.caixa-confirmacao-envio {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 16px;
    width: min(760px, calc(100vw - 48px));
    max-height: min(76vh, 640px);
    padding: 22px 24px 24px;
    color: #17442b;
    background: #f1fbf5;
    border: 1px solid #c8ead4;
    border-radius: 10px;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.28);
}

.cabecalho-confirmacao-envio {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.cabecalho-confirmacao-envio h2 {
    font-size: 24px;
    font-weight: 700;
}

.botao-fechar-confirmacao {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: var(--verde);
    background: #ffffff;
    border: 1px solid #b7dfc5;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
}

.lista-confirmacao-envio {
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    list-style: none;
    scrollbar-color: #94caa8 transparent;
    scrollbar-width: thin;
}

.lista-confirmacao-envio li {
    padding: 8px 0;
    border-bottom: 1px solid #d4efdd;
    font-size: 14px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.modal-feedback {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.36);
}

.conteudo-modal {
    display: grid;
    gap: 18px;
    width: min(420px, 100%);
    padding: 24px;
    background: var(--branco);
    border-radius: 12px;
    box-shadow: var(--sombra-card);
}

.conteudo-modal h2 {
    font-size: 22px;
}

.conteudo-modal p {
    color: #333333;
    white-space: pre-line;
}

.modal-troca-senha {
    width: min(460px, 100%);
}

.mensagem-modal {
    padding: 10px 12px;
    color: #0f6f38;
    background: #eefaf2;
    border: 1px solid #c8ead4;
    border-radius: 6px;
    font-size: 14px;
}

.mensagem-modal.erro {
    color: #9f1239;
    background: #fff1f2;
    border-color: #fecdd3;
}

.botao-modal {
    justify-self: end;
    min-width: 70px;
    min-height: 38px;
    color: #4f5b93;
    background: transparent;
    border: 0;
    font-weight: 700;
}

.oculto {
    display: none !important;
}

@media (max-width: 720px) {
    .pagina-com-fundo {
        padding: 18px;
    }

    .cartao-home,
    .cartao-documentos {
        padding: 22px;
    }

    .cabecalho-home,
    .cabecalho-documentos {
        align-items: flex-start;
        flex-direction: column;
    }

    .logo-home,
    .logo-documentos {
        width: 100%;
        height: 90px;
    }

    .acoes-home,
    .usuario-documentos {
        display: flex;
        align-self: flex-end;
        margin-left: 0;
        padding-top: 0;
    }

    .linha-arquivos {
        align-items: stretch;
        flex-direction: column;
    }

    .botao-adicionar {
        align-self: flex-end;
        margin-top: 0;
    }

    .estado-arquivos {
        padding-top: 18px;
    }
}
