/* ================================
   CLASSIFICA NF
   Interface principal
================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --azul-escuro: #0b2545;
    --fundo-logo: #062543;
    --azul: #1565c0;
    --azul-claro: #eaf3ff;

    --laranja: #ff7a00;
    --laranja-hover: #e96f00;
    --laranja-claro: #fff3e8;

    --fundo: #f5f7fb;
    --branco: #ffffff;

    --texto: #172033;
    --texto-secundario: #6c788a;

    --borda: #e3e8ef;

    --verde: #18a568;

    --sombra:
        0 10px 35px rgba(22, 40, 70, 0.08);
}


/* ================================
   PÁGINA
================================ */

body {
    font-family:
        Inter,
        "Segoe UI",
        Arial,
        sans-serif;

    background: var(--fundo);
    color: var(--texto);
}


/* ================================
   ESTRUTURA
================================ */

.app {
    display: grid;

    grid-template-columns:
        250px minmax(0, 1fr);

    min-height: 100vh;
    background:
        radial-gradient(ellipse at 90% 0%, #e8eff9 0%, transparent 55%),
        linear-gradient(180deg, #f5f7fb, #eef2f7);
}


/* ================================
   MENU LATERAL
================================ */

.sidebar {
    display: flex;
    flex-direction: column;
    /* O login exibe .app como flex; manter a mesma largura do grid. */
    flex: 0 0 250px;
    width: 250px;
    min-width: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    background:
        linear-gradient(
            180deg,
            var(--fundo-logo) 0px,
            var(--fundo-logo) 180px,
            var(--azul-escuro)
        );

    color: white;

    padding: 32px 20px 22px;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}


/* LOGO */

/* ================================
   IDENTIDADE DESCOM
================================ */

.logo {
    display: flex;
    align-items: center;

    margin-bottom: 28px;
    padding: 4px 8px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.logo-descom {
    width: 180px;
    max-width: 100%;
    height: auto;

    display: block;

    object-fit: contain;
}

/* Medidas da logo anteriores à troca, mantendo o asset e o fundo atuais. */
#telaLogin .login-logo {
    padding: 18px;
}

#telaLogin .login-logo img {
    width: 180px;
}

.produto {
    margin-bottom: 32px;

    padding: 13px 14px;

    border-left: 2px solid var(--laranja);

    background: rgba(255, 255, 255, 0.03);

    border-radius: 0 10px 10px 0;
}

.produto span {
    display: block;

    color: white;

    font-size: 13px;
    font-weight: 800;

    letter-spacing: 1px;
}

.produto small {
    display: block;

    margin-top: 4px;

    color: #b2c3d6;

    font-size: 11px;
    line-height: 1.6;
}


/* ================================
   MENU
================================ */

.menu {
    display: flex;
    flex-direction: column;

    gap: 8px;
}


.menu-item {
    width: 100%;

    display: flex;
    align-items: center;

    gap: 12px;

    padding: 13px 14px;

    border: 1px solid transparent;

    border-radius: 11px;

    background: transparent;

    color: #b9c9da;

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;

    text-align: left;

    cursor: pointer;

    transition: 0.2s;
}


.menu-item:hover {
    background:
        rgba(255, 255, 255, 0.06);

    color: white;
}


.menu-item.ativo {
    background:
        linear-gradient(100deg, rgba(21, 101, 192, 0.38), rgba(21, 101, 192, 0.16));

    color: white;
    border-color: rgba(141, 184, 235, 0.15);
    box-shadow: inset 3px 0 var(--laranja);
}


/* ================================
   CONTEÚDO PRINCIPAL
================================ */

.conteudo {
    flex: 1 1 0%;
    width: 100%;
    min-width: 0;
    max-width: 1560px;
    margin-inline: auto;
    padding: 40px clamp(24px, 3vw, 56px) 56px;
}


/* ================================
   CABEÇALHO
================================ */

.cabecalho {
    display: flex;

    justify-content:
        space-between;

    align-items:
        flex-start;

    gap: 30px;

    margin-bottom: 28px;
}


.subtitulo {
    display: block;

    margin-bottom: 8px;

    color: var(--azul);

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 1.3px;
}


.cabecalho h1 {
    font-size: clamp(25px, 2.2vw, 34px);
    line-height: 1.2;
    letter-spacing: -0.9px;
    color: var(--azul-escuro);
}


.cabecalho p {
    margin-top: 9px;

    color:
        var(--texto-secundario);

    font-size: 14px;
    line-height: 1.65;
}


/* STATUS */

.status {
    flex-shrink: 0;
    white-space: nowrap;
    margin-top: 6px;
    display: flex;

    align-items: center;

    gap: 9px;

    padding: 11px 15px;

    background: white;

    border:
        1px solid
        var(--borda);

    border-radius: 999px;

    box-shadow:
        0 5px 20px
        rgba(0, 0, 0, 0.04);

    color: #28704f;

    font-size: 12px;
    font-weight: 600;
}


.status-ponto {
    width: 8px;
    height: 8px;

    background:
        var(--verde);

    border-radius: 50%;

    box-shadow:
        0 0 0 4px
        rgba(24, 165, 104, 0.12);
}


/* ================================
   CARD
================================ */

.card {
    width: 100%;

    padding: clamp(24px, 2.6vw, 40px);

    background:
        var(--branco);

    border:
        1px solid
        var(--borda);

    border-radius: 20px;

    box-shadow: 0 4px 6px rgba(22, 40, 70, 0.02),
        0 16px 44px rgba(22, 40, 70, 0.045);
}


/* ================================
   TÍTULOS DOS CARDS
================================ */

.card-titulo {
    display: flex;

    align-items:
        flex-start;

    gap: 14px;
}


.card-titulo h2 {
    font-size: 19px;
    line-height: 1.4;
    letter-spacing: -0.3px;
}


.card-titulo p {
    margin-top: 4px;

    color:
        var(--texto-secundario);

    font-size: 13px;
    line-height: 1.6;
}


.numero-etapa {
    min-width: 40px;
    height: 40px;
    border: 1px solid rgba(21, 101, 192, 0.12);

    display: flex;

    align-items: center;
    justify-content: center;

    background:
        var(--azul-claro);

    color:
        var(--azul);

    border-radius: 10px;

    font-size: 15px;
    font-weight: 800;
}


.numero-etapa.laranja {
    border-color: #ffe0c4;
    background:
        var(--laranja-claro);

    color:
        #b95000;
}


/* ================================
   CAMPOS
================================ */

.campo {
    min-width: 0;
    margin-top: 20px;
}


.campo label {
    display: block;

    margin-bottom: 7px;

    color: #4e5e73;

    font-size: 13px;
    font-weight: 600;
}


.campo input {
    width: 100%;
    height: 48px;

    padding:
        0 15px;

    border:
        1px solid
        #dce4ed;

    border-radius: 12px;

    background:
        #fbfcfe;

    color:
        var(--texto);

    font-family: inherit;
    font-size: 14px;

    outline: none;

    transition: 0.2s;
}


.campo input:focus {
    background: white;

    border-color:
        var(--azul);

    box-shadow:
        0 0 0 4px
        rgba(21, 101, 192, 0.08);
}


/* ================================
   SEPARADOR
================================ */

.separador {
    height: 1px;

    margin:
        32px 0;

    background:
        var(--borda);
}


/* ================================
   UPLOAD
================================ */

.upload {
    position: relative;
    min-height: 206px;
    padding: 24px 16px;
    text-align: center;

    margin-top: 20px;

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    border:
        1.5px dashed
        #bdcbdc;

    border-radius: 16px;

    background:
        linear-gradient(
            180deg,
            #f8fbff,
            #ffffff
        );

    cursor: pointer;

    transition: 0.2s;
}


.upload:hover {
    border-color:
        var(--laranja);

    background:
        var(--laranja-claro);
}


.upload input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}


.upload-icone {
    width: 50px;
    height: 50px;

    display: flex;

    align-items: center;
    justify-content: center;

    margin-bottom: 12px;

    background:
        linear-gradient(
            135deg,
            var(--azul),
            #3181df
        );

    color: white;

    border-radius: 14px;

    font-size: 25px;

    box-shadow:
        0 8px 20px
        rgba(21, 101, 192, 0.20);
}


.upload strong {
    font-size: 15px;
}


.upload span {
    margin-top: 4px;

    color:
        var(--texto-secundario);

    font-size: 13px;
}


.upload small {
    margin-top: 12px;

    padding: 5px 9px;

    background:
        var(--azul-claro);

    color:
        var(--azul);

    border-radius: 6px;

    font-size: 11px;
    font-weight: 700;
}


/* ================================
   BOTÕES
================================ */

.acoes {
    display: flex;
    flex-wrap: wrap;

    justify-content:
        flex-end;

    gap: 10px;

    margin-top: 20px;
}


.botao-principal,
.botao-secundario {
    height: 44px;

    padding:
        0 18px;

    border: none;

    border-radius: 11px;

    font-size: 10px;
    font-weight: 700;

    cursor: pointer;

    transition: 0.2s;
}


.botao-principal {
    display: flex;

    align-items: center;

    gap: 15px;

    background:
        linear-gradient(
            135deg,
            var(--laranja),
            #ff9130
        );

    color: white;

    box-shadow:
        0 8px 20px
        rgba(255, 122, 0, 0.22);
}


.botao-principal:hover {
    transform:
        translateY(-1px);

    box-shadow:
        0 10px 24px
        rgba(255, 122, 0, 0.30);
}


.botao-secundario {
    background:
        #eef2f7;

    color:
        #53647a;
}


.botao-secundario:hover {
    background:
        #e3e9f0;
}


/* ================================
   RESPONSIVO
================================ */

@media (max-width: 800px) {

    .app {
        grid-template-columns: 1fr;
    }


    .sidebar {
        display: none;
    }


    .conteudo {
        padding: 25px 18px;
    }


    .cabecalho {
        flex-direction: column;
    }


    .card {
        padding: 22px;
    }

}
/* ================================
   RESULTADO DA NF-E
================================ */

.oculto {
    display: none;
}

.resultado {
    width: 100%;

    margin-top: 24px;

    padding: 30px;

    background: var(--branco);

    border: 1px solid var(--borda);

    border-radius: 20px;

    box-shadow: var(--sombra);
}

.resultado-cabecalho {
    margin-bottom: 22px;
}

.resultado-cabecalho h2 {
    margin-top: 2px;

    font-size: 20px;
}

.resultado-cabecalho p {
    margin-top: 6px;

    color: var(--texto-secundario);

    font-size: 10px;
}

.lista-itens {
    display: flex;

    flex-direction: column;

    gap: 14px;
}

.item-nota {
    padding: 18px;

    border: 1px solid var(--borda);

    border-radius: 15px;

    background:
        linear-gradient(
            180deg,
            #ffffff,
            #fbfcfe
        );
}

.item-nota-topo {
    display: flex;

    justify-content: space-between;

    gap: 20px;

    align-items: flex-start;
}

.item-nota-numero {
    display: block;

    margin-bottom: 5px;

    color: var(--azul);

    font-size: 9px;

    font-weight: 800;
}

.item-nota h3 {
    font-size: 13px;

    line-height: 1.4;
}

.item-valor {
    color: var(--laranja);

    font-size: 13px;

    font-weight: 800;

    white-space: nowrap;
}

.item-dados {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 8px;

    margin-top: 15px;
}

.item-dado {
    padding: 10px;

    background: #f5f8fc;

    border-radius: 10px;
}

.item-dado span {
    display: block;

    color: var(--texto-secundario);

    font-size: 8px;
}

.item-dado strong {
    display: block;

    margin-top: 4px;

    color: var(--texto);

    font-size: 10px;
}

@media (max-width: 800px) {

    .item-dados {
        grid-template-columns:
            repeat(2, 1fr);
    }

}
/* ================================
   CLASSIFICAÇÃO DO ITEM
================================ */

.analise-item {
    margin-top: 18px;

    padding-top: 18px;

    border-top: 1px solid var(--borda);
}


.analise-topo {
    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 20px;
}


.analise-label {
    display: block;

    color: var(--texto-secundario);

    font-size: 8px;

    font-weight: 800;

    letter-spacing: 1px;
}


.analise-finalidade {
    display: block;

    margin-top: 5px;

    color: var(--azul-escuro);

    font-size: 15px;
}


.confianca {
    padding: 7px 10px;

    border-radius: 8px;

    font-size: 9px;

    font-weight: 800;
}


.confianca.alta {
    background: #eaf8f1;

    color: #16875a;
}


.confianca.média {
    background: #fff7dc;

    color: #a97800;
}


.confianca.baixa {
    background: #fff0f0;

    color: #c34a4a;
}


.barra-confianca {
    width: 100%;

    height: 7px;

    margin-top: 14px;

    background: #edf1f5;

    border-radius: 999px;

    overflow: hidden;
}


.barra-preenchida {
    height: 100%;

    background:
        linear-gradient(
            90deg,
            var(--azul),
            var(--laranja)
        );

    border-radius: 999px;
}


.justificativa {
    margin-top: 13px;

    color: var(--texto-secundario);

    font-size: 10px;

    line-height: 1.6;
}


.scores {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 8px;

    margin-top: 15px;
}


.scores div {
    padding: 10px;

    background: #f6f8fb;

    border-radius: 10px;
}


.scores span {
    display: block;

    color: var(--texto-secundario);

    font-size: 8px;
}


.scores strong {
    display: block;

    margin-top: 4px;

    color: var(--azul-escuro);

    font-size: 11px;
}


@media (max-width: 800px) {

    .scores {
        grid-template-columns:
            repeat(2, 1fr);
    }


    .analise-topo {
        flex-direction: column;

        align-items: flex-start;
    }

}
/* ================================
   CONFERÊNCIA DA CLASSIFICAÇÃO
================================ */

.revisao-acoes {
    display: flex;
    align-items: center;
    gap: 10px;

    margin-top: 20px;
    padding-top: 18px;

    border-top: 1px solid var(--borda);
}


.btn-confirmar,
.btn-aplicar-correcao {
    border: 0;
    border-radius: 9px;

    padding: 10px 14px;

    font-size: 9px;
    font-weight: 700;

    cursor: pointer;

    transition: 0.2s;
}


.btn-confirmar {
    background: var(--azul);
    color: white;
}


.btn-confirmar:hover {
    opacity: 0.9;
}


.btn-aplicar-correcao {
    background: var(--laranja);
    color: white;
}


.btn-aplicar-correcao:hover {
    opacity: 0.9;
}


.select-correcao {
    flex: 1;

    min-width: 180px;

    padding: 10px 12px;

    border: 1px solid var(--borda);

    border-radius: 9px;

    background: white;

    color: var(--texto);

    font-size: 9px;

    outline: none;
}


.status-revisao {
    margin-top: 12px;
}


.status-confirmado,
.status-corrigido {
    display: inline-block;

    padding: 8px 10px;

    border-radius: 8px;

    font-size: 9px;
    font-weight: 700;
}


.status-confirmado {
    background: #eaf8f1;
    color: #16875a;
}


.status-corrigido {
    background: #fff3e8;
    color: #c65f00;
}


.status-corrigido small {
    display: block;

    margin-top: 4px;

    font-weight: 500;
}


@media (max-width: 800px) {

    .revisao-acoes {
        flex-direction: column;
        align-items: stretch;
    }

}
/* ================================
   HISTÓRICO
================================ */

.historico-tela {
    width: 100%;

    margin-top: 24px;

    padding: 30px;

    background: white;

    border: 1px solid var(--borda);

    border-radius: 20px;

    box-shadow: var(--sombra);
}


.historico-topo {
    display: flex;

    justify-content: space-between;

    align-items: flex-start;

    gap: 20px;

    margin-bottom: 25px;
}


.historico-topo h2 {
    margin-top: 3px;

    font-size: 20px;
}


.historico-topo p {
    margin-top: 5px;

    color: var(--texto-secundario);

    font-size: 10px;
}


.lista-historico {
    display: flex;

    flex-direction: column;

    gap: 12px;
}


.historico-card {
    padding: 18px;

    border: 1px solid var(--borda);

    border-radius: 14px;

    background: #fff;
}


.historico-card-topo {
    display: flex;

    justify-content: space-between;

    align-items: flex-start;

    gap: 15px;
}


.historico-data {
    display: block;

    margin-bottom: 5px;

    color: var(--texto-secundario);

    font-size: 8px;
}


.historico-card h3 {
    font-size: 12px;

    line-height: 1.4;
}


.historico-finalidade {
    padding: 7px 10px;

    background: #eaf3ff;

    color: var(--azul);

    border-radius: 8px;

    font-size: 9px;

    font-weight: 800;

    white-space: nowrap;
}


.historico-finalidade.manual {
    background: #fff3e8;

    color: var(--laranja);
}


.historico-infos {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 8px;

    margin-top: 15px;
}


.historico-infos div {
    padding: 9px;

    background: #f7f9fc;

    border-radius: 9px;
}


.historico-infos span {
    display: block;

    color: var(--texto-secundario);

    font-size: 7px;
}


.historico-infos strong {
    display: block;

    margin-top: 3px;

    font-size: 9px;
}


.historico-rodape {
    display: flex;

    justify-content: space-between;

    gap: 15px;

    margin-top: 14px;

    padding-top: 12px;

    border-top: 1px solid var(--borda);

    color: var(--texto-secundario);

    font-size: 8px;
}


.historico-vazio {
    padding: 35px;

    text-align: center;

    background: #f7f9fc;

    border-radius: 12px;
}


.historico-vazio strong {
    display: block;

    color: var(--azul-escuro);

    font-size: 12px;
}


.historico-vazio span {
    display: block;

    margin-top: 6px;

    color: var(--texto-secundario);

    font-size: 9px;
}


@media (max-width: 800px) {

    .historico-infos {
        grid-template-columns:
            repeat(2, 1fr);
    }

}
/* ================================
   EMPRESAS
================================ */

.empresas-tela {
    width: 100%;

    margin-top: 24px;

    padding: 30px;

    background: white;

    border: 1px solid var(--borda);

    border-radius: 20px;

    box-shadow: var(--sombra);
}


.empresas-topo {
    margin-bottom: 25px;
}


.empresas-topo h2 {
    margin-top: 3px;

    font-size: 20px;
}


.empresas-topo p {
    margin-top: 5px;

    color: var(--texto-secundario);

    font-size: 10px;
}


.empresa-formulario {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 18px;
}


.empresa-formulario textarea {
    width: 100%;

    min-height: 100px;

    padding: 12px;

    border: 1px solid var(--borda);

    border-radius: 10px;

    resize: vertical;

    font-family: inherit;

    font-size: 14px;
    line-height: 1.65;
    background: #fbfcfe;
}


.empresa-formulario .acoes {
    grid-column:
        1 / -1;
}


.empresas-listagem {
    margin-top: 28px;
}


.empresas-listagem-topo {
    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 15px;
}


.empresas-listagem-topo h3 {
    font-size: 13px;
}


.empresas-listagem-topo span {
    color: var(--texto-secundario);

    font-size: 9px;
}


.lista-empresas {
    display: flex;

    flex-direction: column;

    gap: 10px;
}


@media (max-width: 800px) {

    .empresa-formulario {
        grid-template-columns:
            1fr;
    }

}
.campo select {
    width: 100%;
    min-width: 0;
    height: 48px;

    padding: 13px 14px;

    border: 1px solid var(--borda);

    border-radius: 10px;

    background: #fbfcfe;

    color: var(--texto);

    font-family: inherit;

    font-size: 14px;

    outline: none;
}


.campo select:focus {
    border-color: var(--azul);

    box-shadow:
        0 0 0 3px
        rgba(21, 101, 192, 0.08);
}


.campo input[readonly] {
    background: #f7f9fc;

    color: var(--texto-secundario);

    cursor: default;
}
.campo textarea[readonly] {
    width: 100%;
    min-height: 96px;

    padding: 13px 14px;

    border: 1px solid var(--borda);
    border-radius: 10px;

    background: #f7f9fc;

    color: var(--texto-secundario);

    font-family: inherit;
    font-size: 14px;
    line-height: 1.65;

    resize: vertical;
}


.resultado-pesquisa-atividade {
    margin-top: -5px;
    margin-bottom: 18px;

    padding: 12px;

    border: 1px solid var(--borda);

    border-radius: 10px;

    background: #f7f9fc;
}


.atividade-encontrada {
    display: flex;
    align-items: flex-start;

    gap: 10px;

    padding: 9px 6px;

    border-bottom: 1px solid var(--borda);
}


.atividade-encontrada:last-child {
    border-bottom: 0;
}


.atividade-encontrada span {
    min-width: 65px;

    color: var(--azul);

    font-size: 8px;
    font-weight: 800;
}


.atividade-encontrada strong {
    color: var(--texto);

    font-size: 9px;
    line-height: 1.5;
}


.atividade-nao-encontrada {
    color: var(--texto-secundario);

    font-size: 9px;
}
/* =========================================================
   CLASSIFICA NF
   COMPLEMENTO VISUAL - CONFERÊNCIA EM LOTE
   ========================================================= */


/* =========================================================
   ARQUIVOS XML SELECIONADOS
   ========================================================= */

.resumo-arquivos-xml {
    margin-top: 20px;
    padding: 18px;
    background: #f8fafc;
    border: 1px solid #e5eaf0;
    border-radius: 14px;
}

.resumo-arquivos-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.resumo-arquivos-topo strong {
    color: #172033;
    font-size: 15px;
    font-weight: 700;
}

.resumo-arquivos-topo span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 62px;
    height: 28px;
    padding: 0 10px;
    background: #eaf3ff;
    color: #1769c2;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

#listaArquivosXml {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.arquivo-xml-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 42px;
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid #e5eaf0;
    border-radius: 9px;
    transition: 0.2s ease;
}

.arquivo-xml-item:hover {
    border-color: #cfd8e4;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.arquivo-xml-item-nome {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #344054;
    font-size: 13px;
    font-weight: 500;
}

.arquivo-xml-item-status {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
}

.arquivo-xml-sucesso {
    border-left: 4px solid #22a06b;
}

.arquivo-xml-sucesso .arquivo-xml-item-status {
    color: #18794e;
}

.arquivo-xml-alerta {
    border-left: 4px solid #f59e0b;
}

.arquivo-xml-alerta .arquivo-xml-item-status {
    color: #b45309;
}

.arquivo-xml-erro {
    border-left: 4px solid #dc3545;
}

.arquivo-xml-erro .arquivo-xml-item-status {
    color: #b42318;
}


/* =========================================================
   ÁREA GERAL DE RESULTADOS
   ========================================================= */

.resultado {
    margin-top: 26px;
    padding: 28px;
    background: #ffffff;
    border: 1px solid #e5eaf0;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.resultado-cabecalho {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.resultado-cabecalho .subtitulo {
    display: block;
    margin-bottom: 6px;
    color: #f58220;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.resultado-cabecalho h2 {
    margin: 0;
    color: #172033;
    font-size: 25px;
    line-height: 1.2;
}

#resumoNota {
    margin-top: 8px;
    color: #667085;
    font-size: 13px;
}


/* =========================================================
   RESUMO DO LOTE
   ========================================================= */

.resumo-lote,
.resumo-lote-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.resumo-lote-card {
    position: relative;
    min-height: 95px;
    padding: 16px 17px;
    background: #f8fafc;
    border: 1px solid #e5eaf0;
    border-radius: 12px;
    overflow: hidden;
}

.resumo-lote-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #1769c2;
}

.resumo-lote-card:nth-child(2)::before {
    background: #f58220;
}

.resumo-lote-card:nth-child(3)::before {
    background: #22a06b;
}

.resumo-lote-card:nth-child(4)::before {
    background: #f59e0b;
}

.resumo-lote-card span {
    display: block;
    margin-bottom: 7px;
    color: #667085;
    font-size: 12px;
    font-weight: 600;
}

.resumo-lote-card strong {
    display: block;
    color: #172033;
    font-size: 27px;
    line-height: 1;
    font-weight: 800;
}


/* =========================================================
   FILTROS DO RESULTADO
   ========================================================= */

.filtros-resultado {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5eaf0;
}

.filtro-resultado {
    appearance: none;
    border: 1px solid #d9e0e8;
    background: #ffffff;
    color: #475467;
    border-radius: 8px;
    min-height: 36px;
    padding: 7px 13px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

.filtro-resultado:hover {
    border-color: #1769c2;
    color: #1769c2;
    background: #f5f9ff;
}

.filtro-resultado.ativo {
    background: #1769c2;
    border-color: #1769c2;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(23, 105, 194, 0.18);
}


/* =========================================================
   LISTA DE NOTAS
   ========================================================= */

.lista-itens {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.nota-grupo {
    padding: 0;
    margin: 0;
    background: #ffffff;
    border: 1px solid #dde4ed;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 18px rgba(15, 23, 42, 0.04);
}

.nota-grupo-topo {
    padding: 18px 20px;
    background: linear-gradient(
        135deg,
        #f8fafc 0%,
        #f4f7fb 100%
    );
    border-bottom: 1px solid #e5eaf0;
}

.nota-grupo-topo h3 {
    margin: 0 0 6px 0;
    color: #172033;
    font-size: 18px;
    font-weight: 800;
}

.nota-grupo-topo p {
    margin: 0;
    color: #667085;
    font-size: 12px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.nota-grupo-resumo {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 13px;
}

.nota-grupo-resumo span {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    padding: 4px 10px;
    background: #ffffff;
    border: 1px solid #e5eaf0;
    border-radius: 20px;
    color: #475467;
    font-size: 11px;
    font-weight: 700;
}

.nota-grupo-itens {
    padding: 20px;
    background: #ffffff;
}


/* =========================================================
   CARD DO ITEM
   ========================================================= */

.item-resultado {
    padding: 20px;
    margin-bottom: 18px;
    background: #ffffff;
    border: 1px solid #e5eaf0;
    border-radius: 13px;
    transition: 0.2s ease;
}

.item-resultado:last-child {
    margin-bottom: 0;
}

.item-resultado:hover {
    border-color: #cfd8e4;
    box-shadow: 0 7px 18px rgba(15, 23, 42, 0.05);
}

.item-topo {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 17px;
    margin-bottom: 17px;
    border-bottom: 1px solid #edf0f4;
}

.item-topo > div:first-child {
    flex: 1;
    min-width: 0;
}

.item-topo .subtitulo {
    display: block;
    margin-bottom: 5px;
    color: #1769c2;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.09em;
}

.item-topo h3 {
    margin: 0;
    color: #172033;
    font-size: 18px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}


/* =========================================================
   CLASSIFICAÇÃO EM DESTAQUE
   ========================================================= */

.classificacao-destaque {
    min-width: 190px;
    max-width: 260px;
    padding: 12px 15px;
    background: #eef6ff;
    border: 1px solid #d8eaff;
    border-radius: 10px;
}

.classificacao-destaque span {
    display: block;
    margin-bottom: 4px;
    color: #667085;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.classificacao-destaque strong {
    display: block;
    color: #1769c2;
    font-size: 15px;
    line-height: 1.3;
}

.classificacao-destaque small {
    display: block;
    margin-top: 4px;
    color: #475467;
    font-size: 11px;
}


/* =========================================================
   DADOS DO ITEM
   ========================================================= */

.dados-item {
    display: grid;
    grid-template-columns:
        repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 17px;
}

.dados-item > div {
    min-height: 65px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #edf0f4;
    border-radius: 9px;
}

.dados-item span {
    display: block;
    margin-bottom: 5px;
    color: #667085;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.dados-item strong {
    color: #172033;
    font-size: 13px;
    overflow-wrap: anywhere;
}


/* =========================================================
   DESCRIÇÃO NCM
   ========================================================= */

.descricao-ncm {
    margin-bottom: 17px;
    padding: 14px 15px;
    background: #f8fafc;
    border-left: 3px solid #1769c2;
    border-radius: 0 9px 9px 0;
}

.descricao-ncm > strong {
    display: block;
    margin-bottom: 7px;
    color: #344054;
    font-size: 12px;
}

.descricao-ncm p {
    margin: 0;
    color: #475467;
    font-size: 12px;
    line-height: 1.6;
}


/* =========================================================
   SCORES
   ========================================================= */

.scores-grid {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 17px;
}

.score-card {
    padding: 13px 12px;
    background: #ffffff;
    border: 1px solid #e5eaf0;
    border-radius: 9px;
    text-align: center;
}

.score-card span {
    display: block;
    min-height: 28px;
    margin-bottom: 4px;
    color: #667085;
    font-size: 10px;
    line-height: 1.3;
    font-weight: 700;
}

.score-card strong {
    color: #172033;
    font-size: 22px;
    line-height: 1;
}


/* =========================================================
   JUSTIFICATIVA
   ========================================================= */

.justificativa {
    margin-bottom: 18px;
    padding: 14px 15px;
    background: #fffbf5;
    border: 1px solid #fde7cf;
    border-radius: 9px;
}

.justificativa > strong {
    display: block;
    margin-bottom: 6px;
    color: #b54708;
    font-size: 12px;
}

.justificativa p {
    margin: 0;
    color: #475467;
    font-size: 12px;
    line-height: 1.65;
}


/* =========================================================
   AÇÕES DA CLASSIFICAÇÃO
   ========================================================= */

.acoes-classificacao {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.acoes-classificacao .botao-principal,
.acoes-classificacao .botao-secundario {
    min-height: 39px;
}

.confirmar-classificacao {
    padding-left: 17px;
    padding-right: 17px;
}

.correcao-classificacao {
    min-width: 190px;
    min-height: 39px;
    padding: 0 34px 0 12px;
    background: #ffffff;
    border: 1px solid #d9e0e8;
    border-radius: 8px;
    color: #344054;
    font-family: inherit;
    font-size: 12px;
    outline: none;
    cursor: pointer;
}

.correcao-classificacao:focus {
    border-color: #1769c2;
    box-shadow: 0 0 0 3px rgba(23, 105, 194, 0.10);
}


/* =========================================================
   BOTÕES DA TELA
   ========================================================= */

.botao-principal {
    border: 0;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 9px;
    background: #ff7a12;
    color: #ffffff;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

.botao-principal:hover {
    background: #ea6906;
    transform: translateY(-1px);
}

.botao-principal:disabled {
    opacity: 0.65;
    cursor: wait;
    transform: none;
}

.botao-secundario {
    border: 1px solid #e5eaf0;
    min-height: 42px;
    padding: 0 17px;
    border-radius: 9px;
    background: #f3f6fa;
    color: #475467;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

.botao-secundario:hover {
    background: #e9eef5;
    border-color: #d2dae5;
}


/* =========================================================
   MENSAGEM SEM RESULTADOS
   ========================================================= */

.vazio {
    padding: 25px;
    background: #f8fafc;
    border: 1px dashed #cfd8e4;
    border-radius: 10px;
    color: #667085;
    font-size: 13px;
    text-align: center;
}


/* =========================================================
   RESPONSIVIDADE
   ========================================================= */

@media (max-width: 1100px) {

    .dados-item {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

    .resumo-lote,
    .resumo-lote-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


@media (max-width: 800px) {

    .resultado {
        padding: 18px;
    }

    .nota-grupo-itens {
        padding: 14px;
    }

    .item-resultado {
        padding: 16px;
    }

    .item-topo {
        flex-direction: column;
    }

    .classificacao-destaque {
        width: 100%;
        max-width: none;
    }

    .dados-item {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .scores-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .arquivo-xml-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .arquivo-xml-item-nome {
        width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
    }

}


@media (max-width: 520px) {

    .resumo-lote,
    .resumo-lote-grid {
        grid-template-columns: 1fr;
    }

    .dados-item {
        grid-template-columns: 1fr;
    }

    .scores-grid {
        grid-template-columns: 1fr;
    }

    .filtros-resultado {
        flex-direction: column;
    }

    .filtro-resultado {
        width: 100%;
    }

    .acoes-classificacao {
        flex-direction: column;
        align-items: stretch;
    }

    .acoes-classificacao button,
    .correcao-classificacao {
        width: 100%;
    }
}

/* Acabamentos do aplicativo; o login mantém seus estilos próprios. */
.sidebar .usuario-logado {
    margin-top: auto;
    padding: 22px 12px 0;
    overflow-wrap: anywhere;
    font-size: 13px;
    line-height: 1.5;
}

.sidebar .menu {
    padding-bottom: 32px;
}

.sidebar .usuario-logado .botao-secundario {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.16);
    color: #dce7f4;
}

.sidebar .usuario-logado .botao-secundario:hover {
    background: rgba(255, 255, 255, 0.12);
}

.app .botao-principal,
.app .botao-secundario {
    height: auto;
    min-height: 46px;
    padding: 11px 18px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.4;
    justify-content: center;
    transition: background-color 160ms ease, border-color 160ms ease,
        box-shadow 160ms ease, transform 160ms ease;
}

.app .botao-principal {
    background: linear-gradient(135deg, var(--laranja), #f58320);
    box-shadow: 0 4px 10px rgba(230, 105, 0, 0.14);
}

.app .botao-principal:hover:not(:disabled) {
    background: var(--laranja-hover);
    box-shadow: 0 6px 14px rgba(230, 105, 0, 0.20);
}

.app button:focus-visible,
.upload:focus-within {
    outline: 3px solid var(--azul);
    outline-offset: 3px;
}

.sidebar button:focus-visible {
    outline-color: #a9d1ff;
}

.campo textarea:focus {
    outline: none;
    border-color: var(--azul);
    box-shadow: 0 0 0 4px rgba(21, 101, 192, 0.08);
}

.campo input::placeholder,
.campo textarea::placeholder {
    color: #69788b;
    opacity: 1;
}

#resumoArquivosXml {
    margin-top: 20px;
    padding: 18px;
    border: 1px solid var(--borda);
    border-radius: 12px;
    background: #f8fafc;
}

.resumo-lote-card,
.card-titulo > div,
.cabecalho > div:first-child {
    min-width: 0;
}

.card-titulo,
.cabecalho,
.historico-topo,
.empresas-topo {
    overflow-wrap: anywhere;
}

@media (max-width: 1100px) and (min-width: 801px) {
    .cabecalho {
        flex-wrap: wrap;
        gap: 16px;
    }
}

@media (max-width: 800px) {
    .conteudo {
        padding: 28px 20px 40px;
    }

    .cabecalho {
        gap: 16px;
        margin-bottom: 24px;
    }

    .historico-tela,
    .empresas-tela {
        padding: 22px;
    }

    .historico-topo {
        flex-wrap: wrap;
    }
}

@media (max-width: 520px) {
    .conteudo {
        padding: 24px 14px 32px;
    }

    .card,
    .historico-tela,
    .empresas-tela {
        padding: 20px 16px;
        border-radius: 16px;
    }

    .campo input,
    .campo select,
    .campo textarea[readonly],
    .empresa-formulario textarea {
        font-size: 16px;
    }

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

    .empresas-listagem-topo {
        flex-wrap: wrap;
        gap: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .app *,
    .app *::before,
    .app *::after {
        transition: none;
        animation: none;
    }

    .app .botao-principal:hover {
        transform: none;
    }
}
