/* =========================================================
   CONFIGURAÇÕES GERAIS
========================================================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;

    font-family: Arial, Helvetica, sans-serif;

    background: #f4f5f7;

    color: #222222;
}


/* =========================================================
   PÁGINA
========================================================= */

.pagina {
    width: 100%;
    max-width: 1500px;

    margin: 0 auto;

    padding: 5px 12px 8px;
}


h1 {
    margin: 0 0 7px;

    text-align: center;

    font-size: 26px;

    line-height: 1.1;
}


/* =========================================================
   CHAVE DA NF-E
========================================================= */

.bloco-chave {
    background: #ffffff;

    padding: 7px 10px;

    border-radius: 6px;

    margin-bottom: 4px;
}


.bloco-chave label {
    display: block;

    margin-bottom: 3px;

    font-size: 16px;

    font-weight: bold;
}


.linha-chave {
    display: flex;

    align-items: center;

    gap: 10px;
}


.bloco-chave input {
    width: 550px;
    max-width: 100%;

    flex-shrink: 0;

    height: 38px;

    padding: 5px 9px;

    font-size: 17px;

    border: 1px solid #aaaaaa;

    border-radius: 5px;

    outline: none;
}


.bloco-chave input:focus {
    border-color: #333333;

    box-shadow:
        0 0 0 1px
        rgba(0, 0, 0, 0.05);
}


/* =========================================================
   MENSAGEM DA NOTA
========================================================= */

.mensagem {
    margin: 0;

    min-height: 19px;

    flex: 1;

    font-size: 15px;

    font-weight: bold;

    white-space: nowrap;
}


.mensagem.erro {
    color: #b00020;
}


.mensagem.sucesso {
    color: #16752b;
}


/* =========================================================
   BOTÕES DA NOTA
========================================================= */

.acoes-nota {
    display: flex;

    align-items: center;

    gap: 7px;

    margin-left: auto;

    flex-shrink: 0;
}


.acoes-nota button {
    height: 36px;

    padding: 0 14px;

    border: 0;

    border-radius: 5px;

    font-size: 15px;

    font-weight: bold;

    cursor: pointer;

    white-space: nowrap;

    transition:
        opacity 0.15s,
        transform 0.05s;
}


.acoes-nota button:active:not(:disabled) {
    transform: translateY(1px);
}


.acoes-nota button:disabled {
    opacity: 0.45;

    cursor: not-allowed;
}


/* ATUALIZAR */

.btn-atualizar {
    background: #1565c0;

    color: #ffffff;
}


.btn-atualizar:hover:not(:disabled) {
    background: #0d56a8;
}


/* FECHAR */

.btn-fechar {
    background: #c62828;

    color: #ffffff;
}


.btn-fechar:hover:not(:disabled) {
    background: #a91f1f;
}


/* =========================================================
   DADOS DA NOTA
========================================================= */

.dados-nota {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 10px;

    background: #ffffff;

    padding: 6px 10px;

    border-radius: 6px;

    margin-bottom: 4px;

    font-size: 16px;

    line-height: 1.2;
}


.dados-fornecedor {
    display: flex;

    align-items: center;

    gap: 7px;

    min-width: 0;

    font-size: 16px;
}


.dados-fornecedor span {
    white-space: nowrap;
}


.dados-fornecedor strong {
    font-size: 16px;
}


.separador {
    color: #aaaaaa;
}


/* =========================================================
   RESUMO
========================================================= */

.resumo-nota {
    display: flex;

    align-items: center;

    gap: 14px;

    flex-shrink: 0;

    white-space: nowrap;

    font-size: 16px;
}


.resumo-nota strong {
    font-size: 17px;
}


.resumo-divergentes,
.resumo-divergentes strong {
    color: #b00020;
}


/* =========================================================
   ÁREA DA CONFERÊNCIA
========================================================= */

.area-conferencia {
    background: #ffffff;

    padding: 8px 10px;

    border-radius: 6px;
}


.campos-conferencia {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 12px;

    margin-bottom: 4px;
}


.campo-codigo {
    width: 100%;
}


.campo-codigo label {
    display: block;

    margin-bottom: 3px;

    font-size: 16px;

    font-weight: bold;
}


.campo-codigo input {
    width: 100%;

    height: 42px;

    padding: 5px 10px;

    font-size: 20px;

    font-weight: 500;

    border: 1px solid #aaaaaa;

    border-radius: 5px;

    outline: none;
}


.campo-codigo input:focus {
    border-color: #333333;

    box-shadow:
        0 0 0 1px
        rgba(0, 0, 0, 0.05);
}


.referencia-lida {
    margin-top: 3px;

    min-height: 19px;

    font-size: 15px;

    line-height: 1.1;
}


.referencia-lida strong {
    font-size: 16px;
}


/* =========================================================
   RESULTADO
========================================================= */

.resultado-conferencia {
    min-height: 0;

    margin-bottom: 4px;

    border-radius: 5px;

    font-size: 17px;

    font-weight: bold;

    text-align: center;

    line-height: 1.15;
}


.resultado-conferencia:not(:empty) {
    padding: 6px 9px;
}


.resultado-correto {
    background: #dff5e3;

    color: #146b29;

    border: 1px solid #b7e4c0;
}


.resultado-erro {
    background: #ffe0e0;

    color: #a11616;

    border: 1px solid #f2bcbc;
}


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

.tabela-container {
    width: 100%;

    overflow-x: auto;
}


table {
    width: 100%;

    min-width: 1000px;

    border-collapse: collapse;

    font-size: 16px;
}


thead {
    background: #f0f0f0;
}


th,
td {
    padding: 3px 8px;

    border-bottom: 1px solid #dddddd;

    text-align: left;

    vertical-align: middle;

    line-height: 1.15;
}


th {
    padding-top: 6px;

    padding-bottom: 6px;

    font-size: 16px;

    font-weight: bold;
}


th:nth-child(2),
td:nth-child(2) {
    width: 38%;
}


th:nth-child(3),
td:nth-child(3) {
    text-align: center;

    white-space: nowrap;
}


th:nth-child(4),
td:nth-child(4) {
    white-space: nowrap;
}


th:nth-child(5),
td:nth-child(5) {
    white-space: nowrap;
}


th:nth-child(6),
td:nth-child(6) {
    text-align: center;

    white-space: nowrap;
}


td:nth-child(6) strong {
    display: inline-block;

    min-width: 42px;

    padding: 2px 7px;

    border-radius: 4px;

    background: #eeeeee;

    font-size: 16px;

    line-height: 19px;
}


/* =========================================================
   ESTADO DAS LINHAS
========================================================= */

.linha-pendente {
    background: #ffffff;
}


.linha-correta {
    background: #e4f7e8;
}


.linha-correta td:nth-child(6) strong {
    background: #c9edcf;

    color: #126425;
}


.linha-excedente {
    background: #ffe2e2;
}


.linha-excedente td:nth-child(6) strong {
    background: #ffcaca;

    color: #a11616;
}


/* =========================================================
   OCULTO
========================================================= */

.oculto {
    display: none !important;
}


/* =========================================================
   NOTEBOOK
========================================================= */

@media (max-width: 1200px) {

    .pagina {
        padding-left: 7px;

        padding-right: 7px;
    }


    h1 {
        font-size: 25px;
    }


    .bloco-chave input {
        width: 480px;
    }


    .acoes-nota button {
        padding: 0 10px;

        font-size: 14px;
    }


    .dados-nota {
        font-size: 15px;
    }


    .dados-fornecedor,
    .dados-fornecedor strong {
        font-size: 15px;
    }


    .resumo-nota {
        font-size: 15px;
    }


    .resumo-nota strong {
        font-size: 16px;
    }


    table {
        font-size: 15px;
    }


    th {
        font-size: 15px;
    }

}


/* =========================================================
   TELAS MENORES
========================================================= */

@media (max-width: 900px) {

    .linha-chave {
        flex-wrap: wrap;
    }


    .mensagem {
        white-space: normal;
    }


    .acoes-nota {
        margin-left: 0;
    }


    .dados-nota {
        display: block;
    }


    .dados-fornecedor {
        flex-wrap: wrap;
    }


    .resumo-nota {
        margin-top: 4px;
    }

}


/* =========================================================
   CELULAR
========================================================= */

@media (max-width: 700px) {

    .pagina {
        padding: 4px;
    }


    h1 {
        margin-bottom: 5px;

        font-size: 22px;
    }


    .bloco-chave {
        padding: 6px;
    }


    .bloco-chave label {
        font-size: 15px;
    }


    .linha-chave {
        display: flex;

        flex-direction: column;

        align-items: stretch;

        gap: 5px;
    }


    .bloco-chave input {
        width: 100%;

        height: 40px;

        padding: 5px 8px;

        font-size: 16px;
    }


    .mensagem {
        margin-top: 1px;

        font-size: 14px;

        white-space: normal;
    }


    .acoes-nota {
        display: grid;

        grid-template-columns: 1fr 1fr;

        width: 100%;

        margin-left: 0;
    }


    .acoes-nota button {
        width: 100%;

        height: 38px;
    }


    .dados-nota {
        display: block;

        padding: 5px 7px;

        font-size: 14px;
    }


    .dados-fornecedor {
        display: block;

        font-size: 14px;

        line-height: 1.35;
    }


    .dados-fornecedor strong {
        font-size: 14px;
    }


    .dados-fornecedor > span:not(.separador) {
        display: block;
    }


    .dados-fornecedor .separador {
        display: none;
    }


    .resumo-nota {
        display: flex;

        flex-wrap: wrap;

        gap: 4px 10px;

        margin-top: 4px;

        font-size: 14px;

        white-space: normal;
    }


    .resumo-nota strong {
        font-size: 15px;
    }


    .area-conferencia {
        padding: 6px;
    }


    .campos-conferencia {
        grid-template-columns: 1fr;

        gap: 5px;

        margin-bottom: 3px;
    }


    .campo-codigo label {
        margin-bottom: 2px;

        font-size: 15px;
    }


    .campo-codigo input {
        height: 42px;

        padding: 5px 8px;

        font-size: 18px;
    }


    .referencia-lida {
        margin-top: 2px;

        font-size: 14px;
    }


    .referencia-lida strong {
        font-size: 15px;
    }


    .resultado-conferencia {
        font-size: 15px;
    }


    .tabela-container {
        margin-top: 2px;

        -webkit-overflow-scrolling: touch;
    }


    table {
        min-width: 950px;

        font-size: 14px;
    }


    th {
        font-size: 14px;
    }


    th,
    td {
        padding: 3px 6px;
    }


    td:nth-child(6) strong {
        font-size: 14px;
    }

}


@media (max-width: 420px) {

    h1 {
        font-size: 21px;
    }


    .campo-codigo input {
        font-size: 17px;
    }


    .resultado-conferencia {
        font-size: 14px;
    }

}