/**
 * Estilos para a lista de pedidos do Bling
 * 
 * Este arquivo contém todos os estilos específicos da lista de pedidos,
 * separados do arquivo template para melhor organização e manutenção.
 */

/* Variáveis CSS */
:root {
    /* Cores */
    --cor-primaria: #0d6efd; 
    --cor-perigo: #dc3545;
    --cor-alerta: #ffc107;
    --cor-sucesso: #198754;
    --cor-borda: #dee2e6;
    --cor-fundo: #f8f9fa;
    --cor-texto-muted: #6c757d;
    --cor-roxo: #71619c;
    
    /* Cores dos Status */
    --status-em-andamento: #7ea1dd;
    --status-pedir-frete: #b81abf;
    --status-aguardando-retirada: #11a5c1;
    --status-atendido: #b5e667;
    --status-em-producao: #d36a24;
    --status-enviado: #a88d2f;
    --status-frete-solicitado: #c4ba91;
    --status-problema: #bb1314;
    --status-entrega-agendada: #70609a;
    --status-em-aberto: #fff1c7;
    
    /* Fonte padrão do plugin */
    --fonte-plugin: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Força a fonte do plugin para todos os elementos de heading dentro do contexto do plugin */
.nb-pedidos-container h1,
.nb-pedidos-container h2,
.nb-pedidos-container h3,
.nb-pedidos-container h4,
.nb-pedidos-container h5,
.nb-pedidos-container h6,
#modalRoteirizador h1,
#modalRoteirizador h2,
#modalRoteirizador h3,
#modalRoteirizador h4,
#modalRoteirizador h5,
#modalRoteirizador h6,
.modal-content h1,
.modal-content h2,
.modal-content h3,
.modal-content h4,
.modal-content h5,
.modal-content h6 {
    font-family: var(--fonte-plugin) !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    color: #333 !important;
    letter-spacing: -0.01em !important;
}

/* Tamanhos específicos para cada nível de heading */
.nb-pedidos-container h1,
#modalRoteirizador h1,
.modal-content h1 {
    font-size: 2rem !important;
    margin-bottom: 1rem !important;
}

.nb-pedidos-container h2,
#modalRoteirizador h2,
.modal-content h2 {
    font-size: 1.75rem !important;
    margin-bottom: 0.875rem !important;
}

.nb-pedidos-container h3,
#modalRoteirizador h3,
.modal-content h3 {
    font-size: 1.5rem !important;
    margin-bottom: 0.75rem !important;
}

.nb-pedidos-container h4,
#modalRoteirizador h4,
.modal-content h4 {
    font-size: 1.25rem !important;
    margin-bottom: 0.625rem !important;
}

.nb-pedidos-container h5,
#modalRoteirizador h5,
.modal-content h5 {
    font-size: 1.125rem !important;
    margin-bottom: 0.5rem !important;
}

.nb-pedidos-container h6,
#modalRoteirizador h6,
.modal-content h6 {
    font-size: 1rem !important;
    margin-bottom: 0.5rem !important;
}

/* Força a fonte também para elementos específicos que podem ter headings */
.nb-card-header h1,
.nb-card-header h2,
.nb-card-header h3,
.nb-card-header h4,
.nb-card-header h5,
.nb-card-header h6,
.nb-detalhes-pedido h1,
.nb-detalhes-pedido h2,
.nb-detalhes-pedido h3,
.nb-detalhes-pedido h4,
.nb-detalhes-pedido h5,
.nb-detalhes-pedido h6,
.card-title h1,
.card-title h2,
.card-title h3,
.card-title h4,
.card-title h5,
.card-title h6 {
    font-family: var(--fonte-plugin) !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    color: #333 !important;
    letter-spacing: -0.01em !important;
}

/* Regras mais específicas para contextos do WordPress e modais */
body .nb-pedidos-container h1,
body .nb-pedidos-container h2,
body .nb-pedidos-container h3,
body .nb-pedidos-container h4,
body .nb-pedidos-container h5,
body .nb-pedidos-container h6,
body #modalRoteirizador h1,
body #modalRoteirizador h2,
body #modalRoteirizador h3,
body #modalRoteirizador h4,
body #modalRoteirizador h5,
body #modalRoteirizador h6,
body .modal-dialog h1,
body .modal-dialog h2,
body .modal-dialog h3,
body .modal-dialog h4,
body .modal-dialog h5,
body .modal-dialog h6,
.wp-admin .nb-pedidos-container h1,
.wp-admin .nb-pedidos-container h2,
.wp-admin .nb-pedidos-container h3,
.wp-admin .nb-pedidos-container h4,
.wp-admin .nb-pedidos-container h5,
.wp-admin .nb-pedidos-container h6 {
    font-family: var(--fonte-plugin) !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    color: #333 !important;
    letter-spacing: -0.01em !important;
    text-rendering: optimizeLegibility !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

/*custom emanuel*/
.nb-card-resumo-content h3.nb-card-resumo-title{
    font-size: 16px !important;
    color: #666 !important;
    font-weight: normal !important;
  }

/* Força a fonte para titles específicos do plugin */
.modal-title,
.card-title,
.nb-header-title,
.nb-filtros-title,
.nb-detalhes-secao h4,
.nb-detalhes-cabecalho h3,
.section-title {
    font-family: var(--fonte-plugin) !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    color: #333 !important;
    letter-spacing: -0.01em !important;
}

/* Garante que os elementos do Bootstrap também usem a fonte do plugin */
.modal-dialog .modal-title,
.modal-dialog .card-title,
.modal-dialog h1,
.modal-dialog h2,
.modal-dialog h3,
.modal-dialog h4,
.modal-dialog h5,
.modal-dialog h6 {
    font-family: var(--fonte-plugin) !important;
}

/* Override específico para headings do WordPress que podem estar interferindo */
.wp-core-ui .nb-pedidos-container h1,
.wp-core-ui .nb-pedidos-container h2,
.wp-core-ui .nb-pedidos-container h3,
.wp-core-ui .nb-pedidos-container h4,
.wp-core-ui .nb-pedidos-container h5,
.wp-core-ui .nb-pedidos-container h6,
.wp-core-ui #modalRoteirizador h1,
.wp-core-ui #modalRoteirizador h2,
.wp-core-ui #modalRoteirizador h3,
.wp-core-ui #modalRoteirizador h4,
.wp-core-ui #modalRoteirizador h5,
.wp-core-ui #modalRoteirizador h6 {
    font-family: var(--fonte-plugin) !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    color: #333 !important;
}

/* Estilos gerais do container */
.nb-pedidos-container {
    font-family: var(--fonte-plugin);
    color: #333;
    margin: 20px 0;
}

/* Classes para colorir o prazo */
.nb-prazo-normal {
    color: #0066cc !important; /* Azul - No Prazo */
}

.nb-prazo-atencao {
    color: #f39c12 !important; /* Laranja - Atenção */
}

.nb-prazo-limite {
    color: #e67e22 !important; /* Laranja mais intenso - Limite */
}

.nb-prazo-atrasado {
    color: #e74c3c !important; /* Vermelho - Atrasado */
    font-weight: 600 !important;
}

/* Estilos para os filtros */
.nb-filtros-container {
    margin-bottom: 24px;
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #eaeaea;
}

.nb-filtros-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.nb-filtro-group {
    min-width: 160px;
    flex: 1;
    position: relative;
}

/* Removendo os pseudoelementos que não estão funcionando */
/* 
.nb-filtro-group::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-family: "Bootstrap Icons";
    color: #6c757d;
    z-index: 2;
    font-size: 14px;
    opacity: 0.7;
}

.nb-filtro-group.status::before {
    content: "\F1E2";
}

.nb-filtro-group.estado::before {
    content: "\F3E8";
}

.nb-filtro-group.prazo::before {
    content: "\F553";
}
*/

.nb-filtro-busca {
    flex: 2;
    min-width: 250px;
}

.nb-busca-wrapper {
    position: relative;
    display: flex;
}

/* Removendo o pseudoelemento da busca */
/*
.nb-busca-wrapper::before {
    content: "\F52A";
    font-family: "Bootstrap Icons";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    z-index: 2;
    font-size: 14px;
    opacity: 0.7;
}
*/

/* Nova classe para os ícones nos selects e input */
.nb-input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 15px;
    opacity: 0.7;
    z-index: 2;
    pointer-events: none; /* Para não interferir nos cliques */
}

/* Para o ícone dentro da busca rápida */
.nb-busca-wrapper .nb-input-icon {
    top: 50%; /* Centralizado no container relativo */
}

.nb-select {
    width: 100%;
    padding: 10px 12px 10px 35px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 14px;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    transition: all 0.2s ease-in-out;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23495057' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 16px 12px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.nb-select:hover {
    border-color: #b8c2cc;
    background-color: #fbfbfb;
}

.nb-select:focus {
    border-color: var(--cor-primaria);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.nb-input {
    width: 100%;
    padding: 10px 95px 10px 35px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 14px;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.nb-input:hover {
    border-color: #b8c2cc;
    background-color: #fbfbfb;
}

.nb-input:focus {
    border-color: var(--cor-primaria);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.nb-btn-filtro {
    position: absolute;
    top: 2px;
    height: calc(100% - 4px);
    border: none;
    border-left: 1px solid #e9e9e9;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    background-color: transparent;
    color: #6c757d;
    font-size: 14px;
}

.nb-btn-filtro:hover {
    background-color: rgba(0, 0, 0, 0.03);
    color: #495057;
}

.nb-btn-filtro:active {
    background-color: rgba(0, 0, 0, 0.05);
}

#btn-aplicar-filtro {
    right: 1px;
    border-radius: 0 4px 4px 0;
    color: var(--cor-primaria);
    font-weight: 500;
}

#btn-aplicar-filtro:hover {
    background-color: rgba(13, 110, 253, 0.08);
    color: var(--cor-primaria);
}

#btn-limpar-filtro {
    right: 45px;
    border-radius: 0;
    width: 40px;
    padding: 0;
}

.nb-filtros-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    margin-bottom: 5px;
    padding-left: 2px;
}

.nb-filtros-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eaeaea;
}

.nb-filtros-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nb-filtros-title i {
    color: var(--cor-primaria);
    font-size: 18px;
}

.nb-btn-reset-all {
    font-size: 13px;
    color: #6c757d;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.2s;
}

.nb-btn-reset-all:hover {
    background-color: #f0f0f0;
    color: #495057;
}

.nb-btn-reset-all.active {
    background-color: var(--cor-alerta, #ffc107);
    color: #000;
    font-weight: 500;
}

.nb-btn-reset-all.active:hover {
    background-color: #e0a800;
}

/* Badge para filtros ativos */
.nb-filter-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background-color: var(--cor-primaria);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s ease;
    z-index: 3; /* Garante que o badge fique acima de outros elementos */
}

.nb-filter-active .nb-filter-badge {
    opacity: 1;
    transform: scale(1);
}

/* Responsividade para os filtros */
@media (max-width: 1080px) {
    .nb-filtros-row {
        flex-wrap: wrap;
    }
    
    .nb-filtro-group {
        min-width: 140px;
        flex: 1 0 calc(33% - 12px);
    }
    
    .nb-filtro-busca {
        flex: 1 0 100%;
        margin-top: 10px;
    }
}

@media (max-width: 768px) {
    .nb-filtros-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .nb-filtro-group,
    .nb-filtro-busca {
        width: 100%;
        min-width: 100%;
        margin-top: 0;
    }
    
    .nb-filtros-container {
        padding: 12px;
    }
}

/* Estilos do card */
.nb-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

.nb-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.nb-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nb-header-title h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.nb-exibindo-info {
    font-size: 14px;
    font-weight: normal;
    color: #6c757d;
    margin-left: 10px;
}

.nb-icon-cart {
    font-size: 20px;
    color: #007bff;
}

.nb-card-body {
    padding: 20px;
    background-color: #fcfcfc;
}

/* Estilos para botões */
.nb-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.nb-btn-icon {
    margin-right: 6px;
}

.nb-btn-primary {
    background-color: #007bff;
    color: white;
}

.nb-btn-primary:hover {
    background-color: #0069d9;
}

.nb-btn-sm {
    padding: 4px 8px;
    font-size: 12px;
}

.nb-btn-container {
    display: flex;
    gap: 10px;
}

/* Estilos para avisos */
.nb-notice {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nb-notice-info {
    background-color: #e8f4fd;
    border-left: 4px solid #007bff;
    color: #0c5460;
}

.nb-alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
}

.nb-alert-info {
    background-color: #e8f4fd;
    color: #0c5460;
}

.nb-mb-3 {
    margin-bottom: 16px;
}

/* Estilos para filtros */
.nb-top-filters {
    padding: 16px 20px;
    border-bottom: 1px solid #e9ecef;
}

.nb-filter-row {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.nb-filter-group {
    flex: 1;
    min-width: 200px;
}

.nb-search-group {
    position: relative;
    flex: 2;
    min-width: 300px;
}

.nb-btn-search,
.nb-btn-clear {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.nb-btn-search {
    right: 5px;
}

.nb-btn-clear {
    right: 30px;
    color: #6c757d;
}

/* Estilos para tabela */
.nb-table-responsive {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.nb-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
    border: 1px solid #e9ecef;
}

.nb-table th,
.nb-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

/* Alterna cores das linhas para melhor legibilidade */
.nb-table tbody tr:nth-child(even) {
    background-color: rgba(0, 123, 255, 0.03);
}

.nb-table tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.08);
    transition: background-color 0.2s ease;
}

.nb-table th {
    font-weight: 600;
    background-color: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 10;
    white-space: nowrap;
    padding: 14px 16px;
}

/* Ícones nos cabeçalhos das colunas */
.nb-col-icon {
    margin-right: 5px;
    font-size: 14px;
    color: #afb8c1;
    vertical-align: middle;
}

.nb-text-center {
    text-align: center;
}

/* Estilos para checkboxes */
.nb-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Estilos para campos específicos */
.nb-numero-pedido {
    font-weight: 600;
    color: #007bff;
}

.nb-nome-cliente {
    font-weight: 500;
}

.nb-cidade-cliente {
    color: #6c757d;
}

.nb-data-pedido {
    font-weight: 500;
}

.nb-prazo-container {
    line-height: 1.3;
}

/* Estilos para badges de status */
.nb-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}

/* Estilo para o texto de observações internas */
.nb-obs-texto {
    font-size: 13px;
    font-weight: 500;
    color: #555;
    background: #e4b426;
    padding: 4px;
    border-radius: 4px;
    cursor: help;
    text-decoration: underline dotted;
    text-underline-offset: 2px;
}

.nb-status-id {
    display: inline-block;
    background-color: rgba(0, 0, 0, 0.1);
    padding: 2px 4px;
    border-radius: 3px;
    margin-right: 4px;
    font-size: 10px;
    font-weight: 600;
}

/* Estilos para exibição de produtos na tabela */
.nb-produto-linha {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.nb-produto-codigo {
    font-weight: 600;
    font-size: 12px;
    color: #333;
    cursor: help;
    text-decoration: underline dotted;
    text-underline-offset: 3px;
}

.nb-produto-quantidade {
    font-size: 13px;
    color: #444;
    font-weight: 500;
}

.nb-badge-warning {
    background-color: #fff3cd;
    color: #856404;
}

.nb-badge-primary {
    background-color: #cce5ff;
    color: #004085;
}

.nb-badge-success {
    background-color: #d4edda;
    color: #155724;
}

.nb-badge-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

.nb-badge-secondary {
    background-color: #e9ecef;
    color: #383d41;
}

.nb-badge-concluido {
    background-color: #d4edda;
    color: #155724;
}

.nb-badge-cancelado {
    background-color: #f8d7da;
    color: #721c24;
}

.nb-badge-em-andamento {
    background-color: var(--status-em-andamento) !important;
    color: #fff !important;
}

.nb-badge-pedir-frete {
    background-color: var(--status-pedir-frete) !important;
    color: #fff !important;
}

.nb-badge-aguardando-retirada {
    background-color: var(--status-aguardando-retirada) !important;
    color: #fff !important;
}

.nb-badge-atendido {
    background-color: var(--status-atendido) !important;
    color: #333 !important;
}

.nb-badge-em-producao {
    background-color: var(--status-em-producao) !important;
    color: #fff !important;
}

.nb-badge-enviado {
    background-color: var(--status-enviado) !important;
    color: #fff !important;
}

.nb-badge-frete-solicitado {
    background-color: var(--status-frete-solicitado) !important;
    color: #333 !important;
}

.nb-badge-problema {
    background-color: var(--status-problema) !important;
    color: #fff !important;
}

.nb-badge-entrega-agendada {
    background-color: var(--status-entrega-agendada) !important;
    color: #fff !important;
}

.nb-badge-em-aberto {
    background-color: var(--status-em-aberto) !important;
    color: #665521 !important;
}

/* Estilos para o resumo de pedidos */
.nb-resumo-pedidos {
    display: flex;
    justify-content: flex-end;
    padding: 10px 0;
}

.nb-resumo-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nb-resumo-label {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nb-resumo-label i {
    color: #007bff;
    font-size: 16px;
}

.nb-resumo-valor-destaque {
    font-weight: 600;
    color: #007bff;
    font-size: 16px;
}

/* Estilos para modal de detalhes */
.nb-detalhes-pedido {
    padding: 15px;
}

.nb-detalhes-cabecalho {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.nb-detalhes-cabecalho h3 {
    margin: 0;
    color: #007bff;
    font-size: 24px;
}

.nb-detalhes-status {
    text-align: right;
}

.nb-detalhes-secao {
    margin-bottom: 25px;
}

.nb-detalhes-secao h4 {
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
    color: #495057;
    font-size: 18px;
}

.nb-detalhes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.nb-detalhes-item {
    display: flex;
    flex-direction: column;
}

.nb-detalhes-label {
    font-weight: 500;
    color: #6c757d;
    margin-bottom: 5px;
    font-size: 14px;
}

.nb-detalhes-valor {
    font-weight: 400;
    color: #212529;
}

.nb-tabela-produtos {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    border: 1px solid #e9ecef;
}

.nb-tabela-produtos th,
.nb-tabela-produtos td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.nb-tabela-produtos th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

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

.nb-item-info {
    padding: 6px 12px;
    font-size: 13px;
    color: #666;
}

.nb-item-info-label {
    font-weight: 500;
    margin-right: 5px;
}

.nb-total-label {
    text-align: right;
    font-weight: 600;
}

.nb-total-valor {
    font-weight: 600;
    color: #007bff;
}

.nb-detalhes-observacoes, 
.nb-detalhes-observacoes-internas {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.nb-detalhes-observacoes-internas {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
}

/* Estilos para tela de depuração */
.nb-admin-debug-panel {
    margin-bottom: 20px;
}

/* Estilos para barra fixa de resumo dos pedidos selecionados */
.nb-barra-selecao {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #f8f9fa;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    border-top: 1px solid #ddd;
    padding: 15px 20px;
    z-index: 1000;
    display: none; /* Inicialmente oculta */
    transition: transform 0.3s ease;
}

.nb-selecao-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.nb-selecao-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
}

.nb-selecao-label {
    font-size: 14px;
    color: #495057;
    margin-bottom: 6px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.nb-selecao-label i {
    color: #007bff;
    font-size: 16px;
}

.nb-selecao-valor {
    font-weight: 600;
    font-size: 16px;
    color: #007bff;
    word-wrap: break-word;
    line-height: 1.3;
}

.nb-selecao-acoes {
    display: flex;
    align-items: center;
    margin-left: 20px;
}

.nb-selecao-acoes .nb-btn {
    min-width: 200px;
    font-weight: 500;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s;
}

.nb-selecao-acoes .nb-btn:hover {
    background-color: #0069d9;
}

.nb-selecao-acoes .nb-btn i {
    font-size: 18px;
}

/* Responsividade da barra de seleção */
@media (max-width: 1200px) {
    .nb-selecao-container {
        gap: 25px;
    }
    
    .nb-selecao-item {
        min-width: 100px;
    }
}

@media (max-width: 992px) {
    .nb-selecao-container {
        flex-wrap: wrap;
        gap: 20px;
        justify-content: space-between;
    }
    
    .nb-selecao-acoes {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
        justify-content: center;
    }
}

/* Estilos específicos para campos da tabela */
.nb-col-nfe {
    min-width: 80px;
}

/* Estilos para NFe vazio */
.nb-nfe-vazio {
    color: #999;
    font-style: italic;
}

/* Estilos para os cards de resumo */
.nb-cards-resumo {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.nb-card-resumo {
    flex: 1;
    min-width: 220px;
    background-color: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.nb-card-resumo:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nb-card-resumo.active {
    box-shadow: 0 0 0 2px #0d6efd, 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nb-card-resumo-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.nb-card-resumo-content {
    flex: 1;
}

.nb-card-resumo-title {
    margin: 0 0 5px 0;
    font-size: 15px;
    font-weight: 500;
    color: #666;
}

.nb-card-resumo-value {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1;
}

.nb-card-resumo-desc {
    font-size: 13px;
    color: #888;
}

/* Cores específicas para cada tipo de card */
.nb-resumo-ativos .nb-card-resumo-icon {
    background-color: rgba(13, 110, 253, 0.15);
    color: #0d6efd;
}

.nb-resumo-ativos {
    background-color: rgba(13, 110, 253, 0.03);
}

.nb-resumo-atraso .nb-card-resumo-icon {
    background-color: rgba(220, 53, 69, 0.15);
    color: #dc3545;
}

.nb-resumo-atraso {
    background-color: rgba(220, 53, 69, 0.03);
}

.nb-resumo-alerta .nb-card-resumo-icon {
    background-color: rgba(255, 193, 7, 0.15);
    color: #ffc107;
}

.nb-resumo-alerta {
    background-color: rgba(255, 193, 7, 0.03);
}

.nb-resumo-producao .nb-card-resumo-icon {
    background-color: rgba(111, 66, 193, 0.15);
    color: #6f42c1;
}

.nb-resumo-producao {
    background-color: rgba(111, 66, 193, 0.03);
}

/* Responsividade para tablets e dispositivos menores */
@media (max-width: 992px) {
    .nb-cards-resumo {
        flex-wrap: wrap;
    }
    
    .nb-card-resumo {
        min-width: calc(50% - 20px);
    }
}

/* Responsividade para celulares */
@media (max-width: 576px) {
    .nb-card-resumo {
        min-width: 100%;
    }
}

.nb-resumo-ativos .nb-card-resumo-value {
    color: #0d6efd;
}

.nb-resumo-atraso .nb-card-resumo-value {
    color: #dc3545;
}

.nb-resumo-alerta .nb-card-resumo-value {
    color: #ffc107;
}

.nb-resumo-producao .nb-card-resumo-value {
    color: #6f42c1;
}

/* Estilos para os badges de status */
.col-status .badge {
    padding: 6px 12px !important;
    border-radius: 4px !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    text-transform: capitalize !important;
    transition: all 0.2s ease !important;
}

.col-status .badge[data-status="Em andamento"] {
    background-color: var(--status-em-andamento) !important;
    color: #fff !important;
}

.col-status .badge[data-status="Pedir Frete"] {
    background-color: var(--status-pedir-frete) !important;
    color: #fff !important;
}

.col-status .badge[data-status="Aguardando Retirada"] {
    background-color: var(--status-aguardando-retirada) !important;
    color: #fff !important;
}

.col-status .badge[data-status="Atendido"] {
    background-color: var(--status-atendido) !important;
    color: #333 !important;
}

.col-status .badge[data-status="Em produção"] {
    background-color: var(--status-em-producao) !important;
    color: #fff !important;
}

.col-status .badge[data-status="Enviado"] {
    background-color: var(--status-enviado) !important;
    color: #fff !important;
}

.col-status .badge[data-status="Frete Solicitado"] {
    background-color: var(--status-frete-solicitado) !important;
    color: #333 !important;
}

.col-status .badge[data-status="Problema"] {
    background-color: var(--status-problema) !important;
    color: #fff !important;
} 

.col-status .badge[data-status="Entrega AGENDADA"] {
    background-color: var(--status-entrega-agendada) !important;
    color: #fff !important;
} 

.col-status .badge[data-status="Em aberto"] {
    background-color: var(--status-em-aberto) !important;
    color: #665521 !important;
} 

/* === REGRAS GLOBAIS DE FONTE DO PLUGIN === */

/* Reset global para elementos do plugin - máxima especificidade */
html body .nb-pedidos-container *,
html body #modalRoteirizador *,
html body .modal-dialog *,
html body .nb-card *,
html body .nb-filtros-container *,
html body .nb-detalhes-pedido *,
html body .nb-barra-selecao *,
html body .nb-cards-resumo * {
    font-family: var(--fonte-plugin) !important;
}

/* Regras específicas para headings - máxima prioridade */
html body .nb-pedidos-container h1,
html body .nb-pedidos-container h2,
html body .nb-pedidos-container h3,
html body .nb-pedidos-container h4,
html body .nb-pedidos-container h5,
html body .nb-pedidos-container h6,
html body #modalRoteirizador h1,
html body #modalRoteirizador h2,
html body #modalRoteirizador h3,
html body #modalRoteirizador h4,
html body #modalRoteirizador h5,
html body #modalRoteirizador h6,
html body .modal-dialog h1,
html body .modal-dialog h2,
html body .modal-dialog h3,
html body .modal-dialog h4,
html body .modal-dialog h5,
html body .modal-dialog h6 {
    font-family: var(--fonte-plugin) !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    color: #333 !important;
    letter-spacing: -0.01em !important;
    text-rendering: optimizeLegibility !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

/* Força para contextos específicos do WordPress */
.wp-admin .nb-pedidos-container *,
.wp-core-ui .nb-pedidos-container *,
.post-type-page .nb-pedidos-container *,
.admin-color-scheme .nb-pedidos-container *,
body.wp-admin .nb-pedidos-container *,
body.wp-core-ui .nb-pedidos-container * {
    font-family: var(--fonte-plugin) !important;
}

/* Override específico para temas WordPress populares */
.theme-astra .nb-pedidos-container *,
.theme-oceanwp .nb-pedidos-container *,
.theme-generatepress .nb-pedidos-container *,
.theme-twentytwentyone .nb-pedidos-container *,
.theme-twentytwentytwo .nb-pedidos-container *,
.theme-twentytwentythree .nb-pedidos-container *,
.theme-twentytwentyfour .nb-pedidos-container * {
    font-family: var(--fonte-plugin) !important;
}

/* Força para modais Bootstrap especificamente */
.modal.show .modal-dialog *,
.modal.show .modal-content *,
.modal.show .modal-header *,
.modal.show .modal-body *,
.modal.show .modal-footer * {
    font-family: var(--fonte-plugin) !important;
}

/* Regra final de fallback com máxima especificidade */
html body div.nb-pedidos-container h1,
html body div.nb-pedidos-container h2,
html body div.nb-pedidos-container h3,
html body div.nb-pedidos-container h4,
html body div.nb-pedidos-container h5,
html body div.nb-pedidos-container h6,
html body div#modalRoteirizador h1,
html body div#modalRoteirizador h2,
html body div#modalRoteirizador h3,
html body div#modalRoteirizador h4,
html body div#modalRoteirizador h5,
html body div#modalRoteirizador h6 {
    font-family: var(--fonte-plugin) !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    color: #333 !important;
    letter-spacing: -0.01em !important;
}

/* Força fonte para todos os elementos de texto comuns */
html body .nb-pedidos-container p,
html body .nb-pedidos-container span,
html body .nb-pedidos-container div,
html body .nb-pedidos-container label,
html body .nb-pedidos-container input,
html body .nb-pedidos-container select,
html body .nb-pedidos-container textarea,
html body .nb-pedidos-container button,
html body .nb-pedidos-container a,
html body .nb-pedidos-container td,
html body .nb-pedidos-container th,
html body #modalRoteirizador p,
html body #modalRoteirizador span,
html body #modalRoteirizador div,
html body #modalRoteirizador label,
html body #modalRoteirizador input,
html body #modalRoteirizador select,
html body #modalRoteirizador textarea,
html body #modalRoteirizador button,
html body #modalRoteirizador a,
html body #modalRoteirizador td,
html body #modalRoteirizador th {
    font-family: var(--fonte-plugin) !important;
}

/* === FIM DAS REGRAS GLOBAIS DE FONTE === */

/* Estilos para o cálculo assíncrono de caixas */
.nb-caixas-loading {
    color: #6c757d;
    font-style: italic;
    animation: pulse 1.5s ease-in-out infinite alternate;
}

.nb-caixas-loading i {
    margin-right: 4px;
    animation: spin 2s linear infinite;
}

@keyframes pulse {
    from {
        opacity: 0.6;
    }
    to {
        opacity: 1;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.nb-caixas-valor[data-status-calculo="erro"] {
    color: #dc3545;
}

.nb-caixas-valor[data-status-calculo="calculado"] {
    color: #283b32;
    font-weight: 500;
}

.nb-caixas-valor[data-status-calculo="sem_dados"] {
    color: #6c757d;
    font-style: italic;
}

.nb-caixas-valor[data-status-calculo="pendente"] {
    color: #6c757d;
}

/* Força a fonte também para elementos específicos que podem ter headings */
.nb-card-header h1,
.nb-card-header h2,
.nb-card-header h3,
.nb-card-header h4,
.nb-card-header h5,
.nb-card-header h6,
.nb-detalhes-pedido h1,
.nb-detalhes-pedido h2,
.nb-detalhes-pedido h3,
.nb-detalhes-pedido h4,
.nb-detalhes-pedido h5,
.nb-detalhes-pedido h6,
.card-title h1,
.card-title h2,
.card-title h3,
.card-title h4,
.card-title h5,
.card-title h6 {
    font-family: var(--fonte-plugin) !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    color: #333 !important;
    letter-spacing: -0.01em !important;
} 