.sidebar-header img {
    width: 180px;         /* Ajuste o tamanho da imagem conforme necessário */
    height: auto;
}

/* Estilos dos Cards de Estoque */
.card-entrada {
    background-color: #d1e7dd; /* Verde suave */
    border-left: 5px solid #198754 !important;
}

.card-saida {
    background-color: #f8d7da; /* Vermelho suave */
    border-left: 5px solid #dc3545 !important;
}

.card-visualizacao {
    background-color: #cfe2ff; /* Azul suave */
    border-left: 5px solid #0d6efd !important;
}

.clickable-card {
    transition: all 0.3s ease;
    cursor: pointer;
    margin-top: 15px !important;
}

.clickable-card:hover {
    transform: translateX(8px);
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.1) !important;
}

.clickable-card .card-title {
    color: #333;
}

.clickable-card .card-text {
    color: #666 !important;
}

/* Global Styles */
body {
    background-color: #f8f9fa;
}

/* Dashboard & General Components */
.card {
    border-radius: 12px;
    margin-top: 30px;
}

.shadow-sm {
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.075)!important;
}

/* QR Code Button in Table */
.btn-qr {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: none !important;
    padding: 0;
    min-width: 32px;
    min-height: 32px;
    transition: transform 0.2s;
}

.btn-qr img {
    width: 24px;
    height: auto;
    display: block;
}

.btn-qr:hover {
    transform: scale(1.15);
}

/* Drag and Drop page specific styles */
.blue-banner {
    background-color: #0d6efd;
    color: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 500;
    width: fit-content;
    margin: 0 auto;
}

.drop-area {
    width: 100%;
    border: 2px dashed #0d6efd;
    border-radius: 12px;
    padding: 100px 20px;
    text-align: center;
    background: #f8fbff;
    cursor: pointer;
    transition: background 0.3s;
}

.drop-area.dragover {
    background: #eff6ff;
    border-color: #0d6efd;
}

.btn-remove {
    background-color: transparent;
    color: #dc3545;
    border: 1px solid #dc3545;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-remove:hover {
    background-color: #dc3545;
    color: white;
}

.drop-area p {
    margin: 0;
    color: #6c757d;
}

.drop-area strong {
    color: #0d6efd;
}

/* File Table Adjustments */
.file-table {
    margin-top: 20px;
}

.table td:nth-child(2), .table th:nth-child(2) {
    text-align: center;
}

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

.table td:nth-child(4), .table th:nth-child(4) {
    text-align: center;
}

.table td:nth-child(5), .table th:nth-child(5) {
    text-align: center;
}

.table td:nth-child(2) {
    text-align: center;
    border-left: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
}

.table td:nth-child(3) {
    border-left: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
}

.table td:nth-child(4){
    border-left: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
}

.table td:nth-child(5) {
    border-left: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
}

.table td, .table th {
    vertical-align: middle;
    padding: 10px 30px; 
}

.table {
    font-size: 0.95rem;
}

.file-table td:first-child {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Responsive Sidebar Toggle (if needed) */
@media (max-width: 768px) {
    .blue-banner {
        width: 100%;
    }
}

/* Barras de progresso das op's */
.barra {
  width: 150px;
  height: 16px;
  background: #eee;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}

.progresso {
  height: 100%;
  border-radius: 20px;
  transition: width 0.6s ease-in-out;
}

.bg-danger {
  background-color: #f44336 !important;
}

.bg-warning {
  background-color: #ff9800 !important;
}

.bg-success {
  background-color: #24cc5c !important;
}

.texto-progresso {
  color: rgb(0, 0, 0);
  font-size: 14px;
  font-weight: bold;
}

/* Card Nova OP */
.card-nova-op {
    border: 2px dashed #dee2e6;
    background-color: transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-nova-op:hover {
    border-color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.05);
}

.card-nova-op .card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

.card-nova-op:hover .card-body {
    color: #0d6efd;
}   

.card-nova-op i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/*Estilo da tabela de resultados das etiquetas */
#tabela-resultados { width: 100%; border-collapse: collapse; margin-top: 20px; }
#tabela-resultados th, td { border: 1px solid #ddd; padding: 12px; text-align: left; }
#tabela-resultados th { background-color: #f4f4f4; }

/* Sobrescrevendo o table-success para um verde mais forte */
.table-success {
    background-color: #7de19e !important;
    color: rgb(0, 0, 0) !important;
}

.table-success td {
    background-color: inherit !important;
    color: inherit !important;
}

/* Estilo do fundo escurido btn erro */
.overlayE {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.25); 
    backdrop-filter: blur(4px); /* Borra o fundo sutilmente */
    z-index: 9999 !important;
}

/* Caixa do popup: mais respiro, bordas arredondadas e sombra suave */
.popupE {
    background: #ffffff;
    color: #1a1a1a; /* Quase preto, mais elegante que o #333 */
    width: 90%;
    max-width: 360px; /* Um pouco mais estreito para ficar elegante */
    padding: 32px 24px; /* Mais espaço interno */
    border-radius: 16px; /* Cantos mais modernos */
    border: 2px solid #e63946; /* Linha de contorno super sutil */
    text-align: center;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08); /* Sombra bem difusa e leve */
    animation: fadeIn 0.3s ease;
}

/* Título: cor menos agressiva e tipografia ajustada */
.popupE h2 {
    color: #e63946; /* Um vermelho/coral moderno, menos "alerta de sistema" */
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 8px;
}

/* Texto do erro (adicione essa classe se usar uma tag <p> dentro do modal) */
.popupE p {
    color: #666666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 24px;
}

/* Botão: sem bordas, cantos suaves e com transição de hover */
.popupE button {
    background: #333333; /* Botão escuro fica mais clean que o vermelho sólido */
    color: #ffffff;
    border: none;
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    width: 100%; /* Botões que ocupam 100% da largura do card são muito usados no minimalismo */
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.popupE button:hover {
    background: #e63946;
}

/* Efeito de "clique" para dar feedback físico na tela */
.popupE button:active {
    transform: scale(0.98);
}

/* Animação */
@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -60%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

.overlayS {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.25); 
    backdrop-filter: blur(4px); /* Borra o fundo sutilmente */
    z-index: 9999 !important;
}

/* Caixa do popup: mais respiro, bordas arredondadas e sombra suave */
.popupS {
    background: #ffffff;
    color: #1a1a1a; /* Quase preto, mais elegante que o #333 */
    width: 90%;
    max-width: 360px; /* Um pouco mais estreito para ficar elegante */
    padding: 32px 24px; /* Mais espaço interno */
    border-radius: 16px; /* Cantos mais modernos */
    border: 2px solid #44e85a; /* Linha de contorno super sutil */
    text-align: center;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08); /* Sombra bem difusa e leve */
    animation: fadeIn 0.3s ease;
}

/* Título: cor menos agressiva e tipografia ajustada */
.popupS h2 {
    color: #44e85a; /* Um vermelho/coral moderno, menos "alerta de sistema" */
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 8px;
}

/* Texto do erro (adicione essa classe se usar uma tag <p> dentro do modal) */
.popupS p {
    color: #666666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 24px;
}

/* Botão: sem bordas, cantos suaves e com transição de hover */
.popupS button {
    background: #333333; /* Botão escuro fica mais clean que o vermelho sólido */
    color: #ffffff;
    border: none;
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    width: 100%; /* Botões que ocupam 100% da largura do card são muito usados no minimalismo */
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.popupS button:hover {
    background: #44e85a;
}

/* Efeito de "clique" para dar feedback físico na tela */
.popupS button:active {
    transform: scale(0.98);
}

.overlayC {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999 !important;
}

.popupC {
    background: #fff;
    color: #333;
    width: 400px;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    animation: fadeIn 0.3s ease;
}

.popupC h2 {
    color: #849b89;
    margin-bottom: 10px;
}

.overlayA {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.25); 
    backdrop-filter: blur(4px); /* Borra o fundo sutilmente */
    z-index: 9999 !important;
}

/* Caixa do popup: mais respiro, bordas arredondadas e sombra suave */
.popupA {
    background: #ffffff;
    color: #1a1a1a; /* Quase preto, mais elegante que o #333 */
    width: 90%;
    max-width: 360px; /* Um pouco mais estreito para ficar elegante */
    padding: 32px 24px; /* Mais espaço interno */
    border-radius: 16px; /* Cantos mais modernos */
    border: 2px solid #34aad8; /* Linha de contorno super sutil */
    text-align: center;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08); /* Sombra bem difusa e leve */
    animation: fadeIn 0.3s ease;
}

/* Título: cor menos agressiva e tipografia ajustada */
.popupA h2 {
    color: #34aad8; 
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 8px;
}

.popupA p {
    color: #666666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 24px;
}

.popupA button {
    background: #333333;
    color: #ffffff;
    border: none;
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    width: 100%; 
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.popupA button:hover {
    background: #34aad8;
}

/* Efeito de "clique" para dar feedback físico na tela */
.popupA button:active {
    transform: scale(0.98);
}

/* Estilização da página de Notas fiscais aguardando para a liberação */

.card-nf {
    border-radius: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #eef2f7;
}

.card-nf:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08) !important;
}

.nf-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #f1f3f5;
    padding: 1rem;
    border-radius: 15px 15px 0 0;
}

.item-list {
    max-height: 250px;
    overflow-y: auto;
}

.item-row {
    padding: 12px 15px;
    border-bottom: 1px solid #f1f3f5;
    transition: background-color 0.2s;
}

.item-row:last-child {
    border-bottom: none;
}

.item-row:hover {
    background-color: #f8f9fa;
}

.btn-action {
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 500;
    transition: all 0.2s;
}

.badge-qty {
    background-color: #e9ecef;
    color: #495057;
    font-weight: 600;
}

.empty-state {
    padding: 4rem 2rem;
    text-align: center;
    background: white;
    border-radius: 20px;
    border: 2px dashed #dee2e6;
}

.empty-state i {
    font-size: 4rem;
    color: #adb5bd;
    margin-bottom: 1rem;
}

.nav-tabs .nav-link {
    border: none;
    color: #6c757d;
    font-weight: 500;
    padding: 1rem 1.5rem;
    cursor: pointer;
}

.stats-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

/* Efeito para suavizar a transição entre os itens */
.nav-tabs .nav-link.active {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
    background: transparent;
    background-color: transparent !important;
    color: #0d6efd !important; /* Azul padrão do Bootstrap */
    border: none; /* Remove as bordas padrão do Bootstrap */
    border-bottom: 3px solid #0d6efd !important; /* Aplica apenas a de baixo */
    font-weight: 600;
}

.nav-link .badge {
    transition: transform 0.3s ease;
}

.nav-link.active .badge {
    transform: scale(1.1);
}

/* Efeito ao passar o mouse */
.nav-tabs .nav-link:hover {
    color: #0d6efd; 
    background-color: rgba(13, 110, 253, 0.05);
    border-color: #dee2e6;
}

/* Config para a melhoria da proporção entre as paginas das etiquetas*/
.header-estatico {
    min-height: 80px; /* Ajuste conforme a altura do Bloco 2 com os cards */
    display: flex;
    align-items: center;
}

.spinner-btn-liberar {
    border: 3px solid rgba(255, 255, 255, 0.3); /* Borda branca transparente */
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 50%;
    border-left-color: #ffffff; /* Linha de giro branca sólida */
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
}

.spinner-btn-imprimir {
    border: 3px solid rgba(255, 255, 255, 0.3); /* Borda branca transparente */
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 50%;
    border-left-color: #29a4e7; /* Linha de giro branca sólida */
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Tela de login */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f8f9fa;
    height: 100 vh;
}
.login-container {
    margin-top: 5%;
    max-width: 400px;
    background: rgb(30, 68, 139);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 7px 12px rgba(0,0,0,0.7);
}
.form-label{
    color: white;
}

/* Modal de Validação */

.modal-custom-width {
    max-width: 85%;
}

.modal-historico-custom-width {
    max-width: 90%;
}

.modal-cadastro-custom-width {
    max-width: 90%;
}

/* Suaviza a transição do card */
.hover-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

/* Levanta o card e aumenta a sombra ao passar o mouse */
.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.15) !important;
}

.card-hover {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-hover:hover {
    transform: translateY(-3px);
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.15)!important; /* shadow-md do bootstrap */
}

/* Corta o texto em no máximo 2 linhas caso a descrição seja muito grande */
.texto-limitado {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* stylelint-disable-next-line */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#badgeUN {
    width: 45px;
    font-size: 14px;
}

/* Trava a altura do contêiner da tabela no modal */
.container-tabela-historico {
    min-height: 400px; /* Garante que o modal não encolha quando tiver 0 ou 1 resultado */
    max-height: 55vh;  /* Evita que o modal passe da altura da tela (cria scroll) */
    overflow-y: auto;  /* Habilita a rolagem vertical */
    background-color: #fff;
    transition: all 0.3s ease; /* Transição suave caso a altura mude */
}

/* Deixa a rolagem mais elegante e moderna (Opcional, funciona no Chrome/Edge) */
.container-tabela-historico::-webkit-scrollbar {
    width: 8px;
}
.container-tabela-historico::-webkit-scrollbar-track {
    background: #f1f1f1; 
}
.container-tabela-historico::-webkit-scrollbar-thumb {
    background: #c1c1c1; 
    border-radius: 4px;
}
.container-tabela-historico::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8; 
}

.action-card {
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.05) !important;
}
.action-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.1) !important;
    border-color: rgba(0,0,0,0.1) !important;
}

#modalEntradaNF .modal-dialog {
    max-width: 95%; 
}

.input-autofill-pulse {
    border-color: #47b380 !important;
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25) !important;
    transition: all 0.3s ease-in-out;
}

#modalTabelaCorpo table {
    table-layout: fixed;
}

#modalDetalhesEstoque .modal-dialog {
    max-width: 80%;
}

.modal-custom-wide {
    max-width: 90vw !important; 
}

/* Faz a tabela ter no máximo 55% da altura da tela (impede o vazamento vertical) */
.tabela-responsiva-altura {
    max-height: 55vh; 
    overflow-y: auto;
}

/* Ajusta o tamanho da área de "Fila Vazia" para ser proporcional à tabela */
.linha-vazia-altura {
    height: 45vh; 
}