﻿/* =========================================================
   BASE / RESET
   ========================================================= */
body {
    /* Margens/paddings consolidados (mantém padding-top 50px e bottom 20px) */
    margin: 0;
    padding: 50px 0 20px;
}

/* Limita largura padrão de elementos de formulário (Bootstrap deixa 100%) */
/*input,
select,
textarea {
    max-width: 500px;
}*/

label {
    color: maroon;
    text-align: left;
    margin-top: 8px;
    margin-left: 2px;
}

/* =========================================================
   CONTEÚDO PRINCIPAL / LAYOUT GERAL
   ========================================================= */
/* Evita colar conteúdo nas bordas em telas menores */
.body-content {
    padding: 0 15px;
    /*max-width: 1200px;*/
    margin: 50px auto 0 auto;
    min-height: calc(100vh - 130px);
    max-width: none !important;
    width: 100% !important;
}
    
/* Rodapé centralizado e com largura limitada */
footer {
    max-width: 1200px;
    text-align: center;
    margin: 0 auto;
}

/* Green utility */
.green {
    background-color: #0F0;
}

/* Lista de descrição extensa não quebra termos */
.dl-horizontal dt {
    white-space: normal;
}

#overlay {
    display: none;
    position: fixed;
    top: 0%;
    left: 0%;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2005;
}
/* =========================================================
   NAVBAR / MENU
   ========================================================= */
/* Centraliza o menu dentro do collapse */
.navbar-collapse {
    text-align: center;
    line-height: 0 !important; /* remove espaço vertical extra */
}

/* Faz o UL do menu ficar inline e remove o float padrão do Bootstrap */
.navbar-nav {
    display: inline-block;
    float: none;
}

/* Abre dropdown ao passar o mouse (desktop) */
.navbar-nav > li.dropdown:hover > .dropdown-menu {
    display: block;
}

/* Evita "pulo" ao abrir dropdown */
.navbar-nav > li.dropdown > .dropdown-menu {
    margin-top: 0;
}

/* Remove espaço inferior do menu fixo (Bootstrap usa 20px) */
.navbar {
    margin-bottom: 0;
}

/* =========================================================
   CABEÇALHO, LOGO E USUÁRIO
   ========================================================= */
.cabecalho {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.logo {
    margin: 10px 20px 20px 10px;
}

/* Título do sistema (mantido como no original) */
.titulo_sistema {
    font: 200 large 'Lucida Sans','Lucida Sans Regular','Lucida Grande', 'Lucida Sans Unicode',Geneva,Verdana,sans-serif;
    height: 50px;
    color: black;
}

.menu-voltar {
    margin-left: 20px;
}

.usuario-logado {
    text-align: right;
    padding: 0 20px;
}

/* Container para botões + usuário logado na mesma linha */
.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
}

/* =========================================================
   VISIBILIDADE (SEÇÕES NCM E FOOTER)
   ========================================================= */
#ncm1.visible, #ncm2.visible, #ncm3.visible, #footer.visible {
    display: grid;
    visibility: visible;
}

#ncm1.hidden, #ncm2.hidden, #ncm3.hidden, #footer.hidden {
    display: none;
    visibility: hidden;
}
/* =========================================================
   MODAL
   ========================================================= */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content-container {
    max-width: 90%;
    width: 800px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #dee2e6;
    background-color: #f8f9fa;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #dee2e6;
    background-color: #f8f9fa;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.modal-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.modal-table th {
    background-color: #6c757d;
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.modal-table td {
    padding: 12px;
    vertical-align: top;
    border-bottom: 1px solid #dee2e6;
}

.modal-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.modal-table tr:hover {
    background-color: #e9ecef;
}

/* =========================================================
   CARD E GRID LAYOUTS
   ========================================================= */
.card {
    background-color: #f0f0f0;
    border-radius: 8px;
    border: 1px solid black;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 16px;
    margin: 20px;
    width: 100% !important;
}

/* Cabeçalho do card (2 colunas) */
/*.card-header {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    align-items: center;
}*/

.card-header {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
    margin: 8px 0;
    align-items: center;
    height: 100%;
}

.card-header > fieldset {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 8px;
    margin: 0;
    border: 1px solid #ccc;
    border-radius: 5px;
    min-height: 20px;
    box-sizing: border-box;
    min-width: 0;
    height: 90%;
}

/* Botões centralizados */
.card-button {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.card-button2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    align-items: center;
}

.card-button3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    align-items: center;
}

.card-button4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    align-items: center;
}

.card-status {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.card-footer {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.card-Descr {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
}

.card-radio {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 5px;
    align-items: center;
    width: 100%;
}

.card-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

/* =========================================================
   FORMULÁRIOS / INPUTS / SELECTS
   ========================================================= */
input {
    gap: 10%; /* (não influencia layout, mas mantendo) */
    height: 40px;
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: transform .3s ease;
    align-self: center;
    padding-left: 16px;
}

input:hover {
    transform: translateZ(10px);
}

.form-input {
    display: block;
    width: 100%;
    font-size: 130%;
    color: black;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

/* Aplica em inputs/textarea com readonly */
.form-control[readonly],
input[readonly],
textarea[readonly],
select[readonly],
select[disabled]{
    background-color: #eee; /* mesmo cinza do Bootstrap */
    color: #555;
    border-color: #ccc;
    opacity: 1; /* evita ficar “apagado” demais */
    cursor: default; /* indica que não edita */
}

input[type="text"], input[type="password"], input[type="email"], input[type="number"], input[type="date"] {
    margin: 1px 5px 1px 5px;
    gap: 10%;
    /*height: 35px;*/
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: transform 0.3s ease;
    align-self: center;
}

/* Remove realce de foco */
.form-control[readonly]:focus,
input[readonly]:focus,
textarea[readonly]:focus,
select[readonly]:focus,
select[disabled]:focus{
    box-shadow: none;
    outline: 0;
    border-color: #ccc;
}

select {
    height: 100%;
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 10px; /* padding duplicado removido */
    transition: transform .3s ease;
}

select:hover {
    transform: translateZ(10px);
}

/* Campos select específicos */
.select-NCM,
.select-MODALIDADE {
    height: 100%;
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 10px;
    transition: transform .3s ease;
}

/* Hover isolado para input NCM */
.input-NCM:hover {
    transform: translateZ(10px);
}

/* Alinha conteúdo inline */
.row-content {
    display: inline-block;
    justify-content: center;
    /*align-items: center;*/
}

/* Centralização específica de um botão */
.botaobuscar {
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* =========================================================
   CHECKBOX CUSTOM
   ========================================================= */
input[type="checkbox"]:checked + label::before {
    background-color: #2196F3;
    color: white;
}

/* =========================================================
   MODAL / POPUP
   ========================================================= */
.modal-dialog {
    top:30%;
}

#popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px;
    background-color: #fff;
    border: 3px solid #ccc;
    box-shadow: 0 0 10px rgba(0,0,0,.1);
    z-index: 3000;
}

#overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,.5);
    z-index: 2005;
}
