/* Reset e tipografia (Herda as variaveis e fontes do hub.css) */
/* Container Principal sobrescreve do hub local para ter o grid DataTables */
.dashboard-container {
    width: 95%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
}

/* ============================================================
   Header Navbar do Portal Venda (Bootstrap) gerencia o topo
   ============================================================ */

.navbar-brand {
    color: #36221c !important;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.5px;
}

/* Botões Custom (Secondary foca em exportação) */
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--accent-secondary);
    background: var(--bg-card);
    color: var(--accent-secondary);
    text-decoration: none;
}

.btn-secondary:hover {
    background: var(--accent-secondary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(86, 115, 69, 0.3);
}

/* Grid de Estatísticas (Stats) Light Mode */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.65rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(204, 111, 58, 0.2);
    box-shadow: 0 15px 35px rgba(43, 16, 8, 0.06);
}

.stat-icon {
    font-size: 1.2rem;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(204, 111, 58, 0.08);
    border-radius: 10px;
    color: var(--accent-primary);
}

.success-card .stat-icon {
    color: #238636;
    background: rgba(35, 134, 54, 0.1);
}

.success-card {
    border-left: 4px solid #238636;
}

.warning-card .stat-icon {
    color: var(--accent-secondary);
    background: rgba(86, 115, 69, 0.1);
}

.warning-card {
    border-left: 4px solid var(--accent-secondary);
}

.danger-card .stat-icon {
    color: #d73a49;
    background: rgba(215, 58, 73, 0.1);
}

.danger-card {
    border-left: 4px solid #d73a49;
}

.stat-info h3 {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Tabela e DataTables Wrapper Light Mode */
.table-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.table-header h2 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: #d73a49;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Personalização do DataTables pro Light Mode */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_processing,
.dataTables_wrapper .dataTables_paginate {
    color: var(--text-secondary) !important;
    margin-bottom: 1rem;
    font-family: var(--font-body);
}

.dataTables_wrapper .dataTables_filter input {
    border: 1px solid var(--border-color);
    background: #f9f5ed;
    border-radius: 6px;
    color: var(--text-primary);
    padding: 0.4rem 0.8rem;
    margin-left: 0.5rem;
}

.dataTables_wrapper .dataTables_length select {
    border: 1px solid var(--border-color);
    background: #f9f5ed;
    color: var(--text-primary);
    border-radius: 6px;
    padding: 0.2rem;
}

table.dataTable {
    border-collapse: collapse !important;
    font-size: 0.95rem;
    width: 100% !important;
}

table.dataTable thead th {
    background: var(--bg-primary);
    border-bottom: 2px solid var(--border-color) !important;
    color: var(--text-secondary);
    font-weight: 600;
    padding: 1rem !important;
}

table.dataTable tbody tr {
    background-color: transparent !important;
    border-bottom: 1px solid var(--border-color);
}

table.dataTable tbody tr:hover {
    background-color: rgba(204, 111, 58, 0.03) !important;
}

table.dataTable tbody td {
    padding: 1rem !important;
    vertical-align: middle;
    color: var(--text-secondary);
}

table.dataTable.no-footer {
    border-bottom: 1px solid var(--border-color) !important;
}

/* Paginação Customizada Light Mode */
.dataTables_wrapper .dataTables_paginate .paginate_button {
    color: var(--text-secondary) !important;
    border: 1px solid transparent !important;
    border-radius: 6px !important;
    background: transparent !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: rgba(204, 111, 58, 0.1) !important;
    border-color: rgba(204, 111, 58, 0.1) !important;
    color: var(--accent-primary) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--accent-primary) !important;
    color: white !important;
    border-color: var(--accent-primary) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    color: white !important;
}

/* Badges da Tabela */
.badge-code {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text-primary);
}

/* Highlight para produtos encontrados nos XMLs do módulo NFe */
.xml-match-row {
    background: rgba(35, 134, 54, 0.06) !important;
    border-left: 3px solid #238636;
}

.xml-match-row:hover {
    background: rgba(35, 134, 54, 0.12) !important;
}