/* ========================================
   RESET
======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


/* ========================================
   BASE
======================================== */

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f7fa;
    color: #172033;
}

button,
input {
    font-family: inherit;
}


/* ========================================
   PÁGINAS DE LOGIN / INICIAL
======================================== */

.container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #f5f7fa;
}

.card {
    width: 100%;
    max-width: 450px;
    background: #ffffff;
    padding: 50px 40px;
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.07);
}

.logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    border-radius: 14px;
    background: #174777;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 1px;
}

.card h1 {
    font-size: 30px;
    margin-bottom: 15px;
    color: #173f69;
}

.card p {
    color: #687386;
    line-height: 1.6;
    margin-bottom: 30px;
}


/* ========================================
   BOTÕES
======================================== */

button {
    border: none;
    cursor: pointer;
}

.card button {
    width: 100%;
    border-radius: 8px;
    padding: 15px;
    background: #174777;
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    transition: 0.2s;
}

.card button:hover {
    background: #12395f;
}


/* ========================================
   CAMPOS
======================================== */

.campo {
    text-align: left;
    margin-bottom: 20px;
}

.campo label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: bold;
    color: #172033;
}

.campo input {
    width: 100%;
    padding: 14px;
    border: 1px solid #d8dee7;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: 0.2s;
}

.campo input:focus {
    border-color: #174777;
    box-shadow: 0 0 0 3px rgba(23, 71, 119, 0.08);
}

.voltar {
    display: inline-block;
    margin-top: 22px;
    color: #174777;
    text-decoration: none;
    font-size: 14px;
}

.voltar:hover {
    text-decoration: underline;
}


/* ========================================
   TOPO DO DASHBOARD
======================================== */

.topo {
    height: 76px;
    background: #ffffff;
    border-bottom: 1px solid #e5e9ef;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 42px;

    position: sticky;
    top: 0;
    z-index: 100;
}


/* ========================================
   LOGO DO TOPO
======================================== */

.topo-logo {
    display: flex;
    align-items: center;
    gap: 13px;
}

.logo-mini {
    width: 43px;
    height: 43px;

    background: #174777;
    color: #ffffff;

    border-radius: 9px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 13px;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.topo-logo strong {
    display: block;
    color: #173f69;
    font-size: 15px;
}

.topo-logo span {
    display: block;
    margin-top: 3px;
    color: #8a94a3;
    font-size: 12px;
}


/* ========================================
   USUÁRIO
======================================== */

.usuario-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.usuario-info {
    text-align: right;
}

.usuario-info strong {
    display: block;
    color: #26364a;
    font-size: 14px;
}

.usuario-info span {
    display: block;
    margin-top: 3px;
    color: #7b8796;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-sair {
    padding: 9px 17px;
    border: 1px solid #d9dfe7;
    border-radius: 7px;
    background: #ffffff;
    color: #174777;
    font-size: 13px;
    font-weight: bold;
    transition: 0.2s;
}

.btn-sair:hover {
    background: #f3f6f9;
}


/* ========================================
   CONTEÚDO DO DASHBOARD
======================================== */

.dashboard {
    max-width: 1380px;
    margin: 0 auto;
    padding: 38px 42px 60px;
}


/* ========================================
   BOAS-VINDAS
======================================== */

.boas-vindas {
    margin-bottom: 30px;
}

.boas-vindas h1 {
    color: #173f69;
    font-size: 27px;
    font-weight: 600;
    margin-bottom: 8px;
}

.boas-vindas p {
    color: #7a8594;
    font-size: 14px;
}


/* ========================================
   CARDS DE RESUMO
======================================== */

.cards-resumo {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 38px;
}

.resumo-card {
    background: #ffffff;
    border: 1px solid #e6eaf0;
    border-radius: 10px;
    padding: 23px 24px;

    min-height: 125px;

    display: flex;
    flex-direction: column;
    justify-content: center;

    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.025);
}

.resumo-titulo {
    color: #7b8795;
    font-size: 13px;
    margin-bottom: 11px;
}

.resumo-valor {
    color: #173f69;
    font-size: 24px;
    font-weight: 600;
}


/* ========================================
   SEÇÕES
======================================== */

.acoes,
.ultimos {
    margin-bottom: 38px;
}

.secao-cabecalho {
    margin-bottom: 18px;
}

.secao-cabecalho h2 {
    color: #26384d;
    font-size: 19px;
    font-weight: 600;
    margin-bottom: 5px;
}

.secao-cabecalho p {
    color: #8993a1;
    font-size: 13px;
}


/* ========================================
   AÇÕES
======================================== */

.acoes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.acao-card {
    background: #ffffff;
    border: 1px solid #e3e8ee;
    border-radius: 10px;

    min-height: 145px;

    padding: 23px;

    text-align: left;

    display: flex;
    flex-direction: column;
    align-items: flex-start;

    transition: 0.2s;

    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.025);
}

.acao-card:hover {
    border-color: #174777;
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.07);
}

.acao-icone {
    width: 35px;
    height: 35px;

    border-radius: 8px;

    background: #edf3f8;
    color: #174777;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 18px;
    font-weight: bold;

    margin-bottom: 15px;
}

.acao-card strong {
    color: #26384d;
    font-size: 14px;
    margin-bottom: 6px;
}

.acao-card small {
    color: #8993a1;
    font-size: 12px;
    line-height: 1.4;
}


/* ========================================
   ÚLTIMOS PAGAMENTOS
======================================== */

.tabela-vazia {
    background: #ffffff;
    border: 1px solid #e5e9ef;
    border-radius: 10px;

    min-height: 190px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
}

.tabela-icone {
    width: 42px;
    height: 42px;

    border-radius: 50%;

    background: #edf3f8;
    color: #174777;

    display: flex;
    align-items: center;
    justify-content: center;

    font-weight: bold;
    margin-bottom: 12px;
}

.tabela-vazia strong {
    color: #344457;
    font-size: 14px;
    margin-bottom: 5px;
}

.tabela-vazia span {
    color: #8a94a3;
    font-size: 12px;
}


/* ========================================
   RESPONSIVIDADE
======================================== */

@media (max-width: 1000px) {

    .cards-resumo,
    .acoes-grid {
        grid-template-columns: repeat(2, 1fr);
    }

}


@media (max-width: 700px) {

    .topo {
        height: auto;
        padding: 16px 20px;
        gap: 15px;
    }

    .usuario-info {
        display: none;
    }

    .dashboard {
        padding: 28px 20px 50px;
    }

    .cards-resumo,
    .acoes-grid {
        grid-template-columns: 1fr;
    }

    .boas-vindas h1 {
        font-size: 23px;
    }

}
/* ========================================
   PÁGINA DE IMPORTAÇÃO DE DAJEs
======================================== */

.pagina-cabecalho {
    margin-bottom: 28px;
}

.voltar-dashboard {
    display: inline-block;
    margin-bottom: 12px;
    color: #174777;
    text-decoration: none;
    font-size: 13px;
}

.voltar-dashboard:hover {
    text-decoration: underline;
}

.pagina-cabecalho h1 {
    color: #173f69;
    font-size: 27px;
    font-weight: 600;
    margin-bottom: 7px;
}

.pagina-cabecalho p {
    color: #7a8594;
    font-size: 14px;
}


/* ========================================
   CARD DE IMPORTAÇÃO
======================================== */

.importacao-card {
    background: #ffffff;
    border: 1px solid #e3e8ee;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.025);
}


/* ========================================
   ÁREA DE UPLOAD
======================================== */

.upload-area {
    min-height: 270px;

    border: 2px dashed #cbd5e1;
    border-radius: 10px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;

    padding: 40px 20px;

    background: #fafbfd;

    transition: 0.2s;
}

.upload-area:hover {
    border-color: #174777;
    background: #f7fafd;
}

.upload-icone {
    width: 58px;
    height: 58px;

    border-radius: 50%;

    background: #edf3f8;
    color: #174777;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 30px;
    font-weight: bold;

    margin-bottom: 17px;
}

.upload-area h2 {
    color: #26384d;
    font-size: 18px;
    margin-bottom: 8px;
}

.upload-area p {
    color: #8993a1;
    font-size: 13px;
    margin-bottom: 20px;
}


/* ========================================
   BOTÃO SELECIONAR PDFs
======================================== */

.btn-selecionar {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 12px 22px;

    border-radius: 7px;

    background: #174777;
    color: #ffffff;

    font-size: 13px;
    font-weight: bold;

    cursor: pointer;

    transition: 0.2s;
}

.btn-selecionar:hover {
    background: #12395f;
}

.upload-info {
    display: block;
    margin-top: 13px;

    color: #9aa3af;

    font-size: 11px;
}


/* ========================================
   ARQUIVOS SELECIONADOS
======================================== */

.arquivos-selecionados {
    margin-top: 25px;
}

.lista-cabecalho {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding-bottom: 15px;

    border-bottom: 1px solid #e7ebf0;
}

.lista-cabecalho strong {
    display: block;

    color: #26384d;
    font-size: 14px;
}

.lista-cabecalho span {
    display: block;

    margin-top: 4px;

    color: #8993a1;
    font-size: 12px;
}

.btn-limpar {
    padding: 8px 14px;

    border: 1px solid #d9dfe7;
    border-radius: 7px;

    background: #ffffff;
    color: #174777;

    font-size: 12px;
    font-weight: bold;

    cursor: pointer;
}

.btn-limpar:hover {
    background: #f3f6f9;
}


/* ========================================
   LISTA DE ARQUIVOS
======================================== */

.lista-arquivos {
    max-height: 380px;
    overflow-y: auto;
}

.arquivo-item {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 13px 4px;

    border-bottom: 1px solid #edf0f4;
}

.arquivo-info {
    display: flex;
    align-items: center;

    gap: 12px;

    min-width: 0;
}

.arquivo-pdf {
    width: 38px;
    height: 38px;

    flex-shrink: 0;

    border-radius: 7px;

    background: #edf3f8;
    color: #174777;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 10px;
    font-weight: bold;
}

.arquivo-detalhes {
    min-width: 0;
}

.arquivo-detalhes strong {
    display: block;

    max-width: 600px;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    color: #344457;
    font-size: 13px;
}

.arquivo-detalhes span {
    display: block;

    margin-top: 4px;

    color: #9aa3af;
    font-size: 11px;
}

.btn-remover {
    width: 30px;
    height: 30px;

    flex-shrink: 0;

    border-radius: 6px;

    background: transparent;
    color: #8a94a3;

    font-size: 20px;

    cursor: pointer;
}

.btn-remover:hover {
    background: #f3f5f7;
    color: #c0392b;
}


/* ========================================
   RODAPÉ DA IMPORTAÇÃO
======================================== */

.rodape-importacao {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-top: 20px;
    padding-top: 20px;

    border-top: 1px solid #e7ebf0;
}

.resumo-importacao span {
    display: block;

    color: #8993a1;
    font-size: 11px;
}

.resumo-importacao strong {
    display: block;

    margin-top: 3px;

    color: #173f69;
    font-size: 20px;
}

.btn-analisar {
    padding: 12px 22px;

    border-radius: 7px;

    background: #174777;
    color: #ffffff;

    font-size: 13px;
    font-weight: bold;

    cursor: pointer;

    transition: 0.2s;
}

.btn-analisar:hover:not(:disabled) {
    background: #12395f;
}

.btn-analisar:disabled {
    background: #cbd2da;
    cursor: not-allowed;
}


/* ========================================
   COMO FUNCIONA
======================================== */

.informacao-importacao {
    margin-top: 35px;
}

.informacao-importacao h2 {
    color: #26384d;
    font-size: 19px;
    font-weight: 600;
    margin-bottom: 18px;
}

.passos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.passo {
    display: flex;
    align-items: flex-start;

    gap: 12px;

    background: #ffffff;

    border: 1px solid #e5e9ef;
    border-radius: 10px;

    padding: 20px;

    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.02);
}

.passo > span {
    width: 30px;
    height: 30px;

    flex-shrink: 0;

    border-radius: 50%;

    background: #edf3f8;
    color: #174777;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 12px;
    font-weight: bold;
}

.passo strong {
    display: block;

    color: #344457;
    font-size: 13px;

    margin-bottom: 6px;
}

.passo p {
    color: #8993a1;
    font-size: 11px;
    line-height: 1.5;
}


/* ========================================
   RESPONSIVIDADE - IMPORTAÇÃO
======================================== */

@media (max-width: 1000px) {

    .passos {
        grid-template-columns: repeat(2, 1fr);
    }

}


@media (max-width: 700px) {

    .importacao-card {
        padding: 18px;
    }

    .passos {
        grid-template-columns: 1fr;
    }

    .rodape-importacao {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .btn-analisar {
        width: 100%;
    }

    .arquivo-detalhes strong {
        max-width: 220px;
    }

}
/* ========================================
   RESULTADO DA ANÁLISE DE DAJEs
======================================== */

.resultado-analise {
    margin-top: 30px;
}

.resultado-cabecalho {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.resultado-cabecalho h2 {
    margin: 0 0 6px;
    font-size: 24px;
    color: #123f6d;
}

.resultado-cabecalho p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.btn-nova-importacao {
    border: 1px solid #d7e0ea;
    background: #ffffff;
    color: #164b7a;
    border-radius: 8px;
    padding: 11px 16px;
    font-weight: 600;
    cursor: pointer;
}

.btn-nova-importacao:hover {
    background: #f4f8fc;
}


/* ========================================
   CARDS DE RESUMO
======================================== */

.cards-analise {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.analise-card {
    background: #ffffff;
    border: 1px solid #e1e8f0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(15, 45, 75, 0.04);
}

.analise-card span {
    display: block;
    color: #64748b;
    font-size: 13px;
    margin-bottom: 8px;
}

.analise-card strong {
    display: block;
    color: #173f67;
    font-size: 25px;
}

.analise-card.destaque {
    background: #164b7a;
    border-color: #164b7a;
}

.analise-card.destaque span,
.analise-card.destaque strong {
    color: #ffffff;
}


/* ========================================
   TABELA
======================================== */

.tabela-analise-container {
    background: #ffffff;
    border: 1px solid #e1e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(15, 45, 75, 0.04);
}

.tabela-analise-topo {
    padding: 20px 22px;
    border-bottom: 1px solid #e8edf3;
}

.tabela-analise-topo h3 {
    margin: 0 0 5px;
    color: #173f67;
    font-size: 18px;
}

.tabela-analise-topo span {
    color: #64748b;
    font-size: 13px;
}

.tabela-scroll {
    width: 100%;
    overflow-x: auto;
}

.tabela-analise {
    width: 100%;
    min-width: 950px;
    border-collapse: collapse;
}

.tabela-analise th {
    background: #f6f8fb;
    color: #52657a;
    font-size: 12px;
    font-weight: 700;
    text-align: left;
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.tabela-analise td {
    padding: 16px;
    border-bottom: 1px solid #edf1f5;
    color: #334155;
    font-size: 13px;
    vertical-align: middle;
}

.tabela-analise tbody tr:hover {
    background: #f8fbfe;
}

.tabela-analise tbody tr:last-child td {
    border-bottom: none;
}


/* ========================================
   BOTÃO DAJE
======================================== */

.btn-detalhes {
    border: none;
    background: transparent;
    color: #1261a0;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}

.btn-detalhes:hover {
    text-decoration: underline;
}


/* ========================================
   CÉLULAS
======================================== */

.celula-contribuinte,
.celula-ato {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.celula-contribuinte strong,
.celula-ato strong {
    color: #243b53;
}

.celula-contribuinte small,
.celula-ato small {
    color: #7a8a9b;
    font-size: 11px;
    max-width: 280px;
}

.celula-ato small {
    max-width: 260px;
    line-height: 1.35;
}


/* ========================================
   STATUS
======================================== */

.status-daje {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.status-daje.ok {
    background: #e8f7ee;
    color: #18794e;
}

.status-daje.problema {
    background: #fff1f1;
    color: #c53030;
}


/* ========================================
   DETALHES DO DAJE
======================================== */

.detalhes-daje {
    margin-top: 24px;
    background: #ffffff;
    border: 1px solid #e1e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(15, 45, 75, 0.04);
}

.detalhes-cabecalho {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px;
    border-bottom: 1px solid #e8edf3;
}

.detalhes-cabecalho h3 {
    margin: 0 0 4px;
    color: #173f67;
    font-size: 18px;
}

.detalhes-cabecalho span {
    color: #64748b;
    font-size: 12px;
}

.btn-fechar-detalhes {
    width: 34px;
    height: 34px;
    border: 1px solid #dbe3eb;
    background: #ffffff;
    color: #64748b;
    border-radius: 7px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.btn-fechar-detalhes:hover {
    background: #f4f7fa;
}


/* ========================================
   GRID DOS DETALHES
======================================== */

.detalhes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: #e8edf3;
}

.detalhe-item {
    background: #ffffff;
    padding: 16px 18px;
    min-height: 70px;
}

.detalhe-item span {
    display: block;
    color: #7a8a9b;
    font-size: 11px;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.detalhe-item strong {
    display: block;
    color: #263f58;
    font-size: 13px;
    line-height: 1.4;
    word-break: break-word;
}


/* ========================================
   COMPOSIÇÃO
======================================== */

.composicao-daje {
    padding: 22px;
    border-top: 1px solid #e8edf3;
}

.composicao-daje h4 {
    margin: 0 0 16px;
    color: #173f67;
    font-size: 15px;
}

.composicao-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.composicao-grid > div {
    border: 1px solid #e4eaf0;
    border-radius: 8px;
    padding: 13px;
    background: #fafcfe;
}

.composicao-grid span {
    display: block;
    color: #718096;
    font-size: 11px;
    margin-bottom: 5px;
}

.composicao-grid strong {
    color: #263f58;
    font-size: 13px;
}


/* ========================================
   LINHA DIGITÁVEL
======================================== */

.linha-digitavel-box {
    margin: 0 22px 22px;
    padding: 16px;
    background: #f5f8fb;
    border: 1px solid #dfe7ef;
    border-radius: 8px;
}

.linha-digitavel-box span {
    display: block;
    color: #718096;
    font-size: 11px;
    margin-bottom: 7px;
}

.linha-digitavel-box strong {
    display: block;
    color: #173f67;
    font-size: 14px;
    letter-spacing: 0.5px;
    word-break: break-all;
    font-family: Consolas, monospace;
}


/* ========================================
   AÇÕES DO RESULTADO
======================================== */

.acoes-resultado {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: 24px;
    padding-bottom: 30px;
}

.btn-secundario {
    border: 1px solid #d7e0ea;
    background: #ffffff;
    color: #52657a;
    border-radius: 8px;
    padding: 12px 18px;
    font-weight: 600;
    cursor: pointer;
}

.btn-secundario:hover {
    background: #f5f8fb;
}

.btn-continuar {
    border: none;
    background: #164b7a;
    color: #ffffff;
    border-radius: 8px;
    padding: 12px 20px;
    font-weight: 700;
    cursor: pointer;
}

.btn-continuar:hover:not(:disabled) {
    background: #123f67;
}

.btn-continuar:disabled {
    background: #b8c5d2;
    cursor: not-allowed;
}


/* ========================================
   RESPONSIVIDADE
======================================== */

@media (max-width: 1000px) {

    .cards-analise {
        grid-template-columns: repeat(2, 1fr);
    }

    .detalhes-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .composicao-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


@media (max-width: 650px) {

    .resultado-cabecalho {
        flex-direction: column;
        align-items: flex-start;
    }

    .cards-analise {
        grid-template-columns: 1fr;
    }

    .detalhes-grid {
        grid-template-columns: 1fr;
    }

    .composicao-grid {
        grid-template-columns: 1fr;
    }

    .acoes-resultado {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .btn-secundario,
    .btn-continuar {
        width: 100%;
    }
}