:root {
    /* Cores principais - Sistema de Design */
    --primary-color: #4361ee;
    --primary-light: #eef2ff;
    --secondary-color: #3a0ca3;
    --accent-color: #4cc9f0;
    --success-color: #4ade80;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Reset e estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 0.875rem; /* 14px base */
}


/* ===== SMALL DEVICES (landscape phones, 576px and up) ===== */
@media (min-width: 576px) {
    body {
        font-size: 0.9375rem; /* 15px */
    }
    
    .main-container {
        padding: 1.25rem;
    }
    
    .navbar-brand span.d-sm-none {
        display: none !important;
    }
    
    .navbar-brand span.d-sm-inline {
        display: inline !important;
    }
    
    .user-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* ===== MEDIUM DEVICES (tablets, 768px and up) ===== */
@media (min-width: 768px) {
    body {
        font-size: 1rem; /* 16px */
    }
    
    .main-container {
        padding: 1.5rem;
    }
    
    /* Menu desktop aparece no medium */
    .nav-desktop {
        display: flex !important;
        flex-grow: 1;
    }
    
    .nav-link-desktop {
        padding: 0.5rem 1rem;
        margin: 0 0.25rem;
        border-radius: 0.375rem;
        transition: all 0.2s ease;
        color: var(--text-primary);
        text-decoration: none;
    }
    
    .nav-link-desktop:hover {
        background-color: var(--primary-light);
        color: var(--primary-color);
    }
    
    .nav-link-desktop.active {
        font-weight: 600;
    }
    
    .nav-link-desktop i {
        margin-right: 0.5rem;
    }
    
    /* Esconde menu mobile no medium */
    .navbar-collapse {
        display: none !important;
    }
    
    /* Mostra botão backup */
    .btn-outline-warning.d-none.d-md-inline {
        display: inline-block !important;
    }
    
    /* Mostra nome do usuário */
    .dropdown-toggle span.d-md-inline {
        display: inline !important;
    }
    
    /* Ajustes de layout */
    .card {
        margin-bottom: 1.75rem;
    }
    
    .table-responsive {
        border-radius: 12px;
        border: 1px solid var(--border-color);
    }
}

/* ===== LARGE DEVICES (desktops, 992px and up) ===== */
@media (min-width: 992px) {
    .main-container {
        padding: 2rem;
        max-width: 1200px;
        margin: 0 auto;
    }
    
    /* Menu desktop com mais espaçamento */
    .nav-link-desktop {
        padding: 0.625rem 1.25rem;
        margin: 0 0.375rem;
    }
    
    /* Header fixo com ajustes */
    .navbar {
        padding: 0.875rem 0;
    }
    
    .header-spacer {
        height: 64px;
    }
    
    /* Grid layouts aprimorados */
    .row {
        --bs-gutter-x: 1.5rem;
        --bs-gutter-y: 1.5rem;
    }
    
    /* Cards em grid */
    .card-deck {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    /* Formulários lado a lado */
    .form-row-lg {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* ===== X-LARGE DEVICES (large desktops, 1200px and up) ===== */
@media (min-width: 1200px) {
    .main-container {
        max-width: 1320px;
        padding: 2.5rem;
    }
    
    .navbar-brand {
        font-size: 1.75rem;
    }
    
    .nav-link-desktop {
        font-size: 1.05rem;
        padding: 0.75rem 1.5rem;
    }
    
    /* Layouts mais amplos */
    .container-xl {
        max-width: 1140px;
    }
    
    /* Cards maiores */
    .card {
        margin-bottom: 2rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    /* Tabelas com mais espaço */
    .table th,
    .table td {
        padding: 1rem 1.25rem;
    }
    
    /* Formulários com 3 colunas */
    .form-row-xl {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1.75rem;
    }
}

/* ===== XX-LARGE DEVICES (larger desktops, 1400px and up) ===== */
@media (min-width: 1400px) {
    .main-container {
        max-width: 1440px;
        padding: 3rem;
    }
    
    body {
        font-size: 1.05rem;
    }
    
    .navbar {
        padding: 1rem 0;
    }
    
    .header-spacer {
        height: 72px;
    }
    
    .navbar-brand {
        font-size: 1.875rem;
    }
    
    .nav-link-desktop {
        font-size: 1.1rem;
        padding: 0.875rem 1.75rem;
    }
    
    /* Layouts ultra wide */
    .container-xxl {
        max-width: 1320px;
    }
    
    /* Grid mais espaçado */
    .row {
        --bs-gutter-x: 2rem;
        --bs-gutter-y: 2rem;
    }
    
    /* Cards com mais conteúdo */
    .card-deck-xl {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem;
    }
}

/* ===== MOBILE FIRST (default - até 575.98px) ===== */
/* Header Mobile */
.navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 0.5rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary-color) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* Menu Mobile */
.navbar-collapse {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: white;
    z-index: 1020;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    max-height: calc(100vh - 56px);
    overflow-y: auto;
}

.nav-mobile {
    padding: 1rem;
}

.nav-link-mobile {
    padding: 0.75rem 1rem;
    margin: 0.25rem 0;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    color: var(--text-primary);
    text-decoration: none;
}

.nav-link-mobile.active {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

.nav-link-mobile i {
    width: 24px;
    margin-right: 0.75rem;
}

/* User Avatar */
.user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

/* Dropdown Menu */
.dropdown-menu {
    min-width: 280px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 6px;
    margin: 0.1rem 0.5rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.dropdown-divider {
    margin: 0.5rem 0;
    border-color: var(--border-color);
}

/* Layout principal */
.main-container {
    padding: 1rem;
    min-height: calc(100vh - 56px);
    background-color: var(--light-bg);
}

.header-spacer {
    height: 56px;
}

/* Cards */
.card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 1rem;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card-header {
    background-color: var(--primary-light);
    border-bottom: 1px solid var(--border-color);
    padding: 0.875rem 1rem;
    font-weight: 600;
    color: var(--primary-color);
}

.card-body {
    padding: 1rem;
}

/* Botões */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-1px);
}

/* Tabelas */
.table {
    color: var(--text-primary);
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    font-size: 0.875rem;
}

.table th {
    background-color: var(--primary-light);
    border-bottom: 2px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 600;
    padding: 0.625rem 0.875rem;
}

.table td {
    padding: 0.625rem 0.875rem;
    border-color: var(--border-color);
    vertical-align: middle;
}

/* Formulários */
.form-control, .form-select {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

/* Utilidades responsivas */
.text-responsive {
    font-size: calc(0.875rem + 0.3vw);
}

.padding-responsive {
    padding: calc(1rem + 1vw);
}

/* Container responsivo */
.container-responsive {
    width: 100%;
    padding-right: var(--bs-gutter-x, 0.75rem);
    padding-left: var(--bs-gutter-x, 0.75rem);
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 576px) {
    .container-responsive {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container-responsive {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container-responsive {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container-responsive {
        max-width: 1140px;
    }
}

@media (min-width: 1400px) {
    .container-responsive {
        max-width: 1320px;
    }
}

/* Ajustes de tipografia responsiva */
h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

@media (min-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }
}

@media (min-width: 992px) {
    h1 { font-size: 2.25rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.75rem; }
    h4 { font-size: 1.5rem; }
}

/* Grid responsivo */
.grid-responsive {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 576px) {
    .grid-responsive {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .grid-responsive {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 992px) {
    .grid-responsive {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1200px) {
    .grid-responsive {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Animações responsivas */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.3s ease-out;
}

@media (prefers-reduced-motion: reduce) {
    .fade-in-up {
        animation: none;
    }
}

/* Performance mobile */
@media (max-width: 767.98px) {
    img {
        max-width: 100%;
        height: auto;
    }
    
    .lazy-load {
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .lazy-load.loaded {
        opacity: 1;
    }
}

/* ===== HEADER STYLES ===== */

/* Header base */
.navbar-system {
    background: linear-gradient(135deg, var(--primary-light) 0%, #ffffff 100%);
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    height: 64px;
}

/* Container do header */
.header-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* Logo */
.navbar-brand-system {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand-system i {
    font-size: 1.8rem;
}

/* ===== DESKTOP NAVIGATION (992px and up) ===== */
@media (min-width: 992px) {
    .desktop-nav {
        display: flex !important;
        align-items: center;
        gap: 0.5rem;
        flex-grow: 1;

    }
    
    .nav-link-desktop {
        padding: 0.5rem 1rem;
        color: var(--text-primary);
        text-decoration: none;
        border-radius: 6px;
        font-weight: 500;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .nav-link-desktop:hover {
        background-color: var(--primary-light);
        color: var(--primary-color);
    }
    
    .nav-link-desktop.active {

        font-weight: 600;
    }
    
    /* Menu mobile não deve aparecer no desktop */
    .mobile-nav-toggle,
    .mobile-nav-menu {
        display: none !important;
    }
}

/* ===== MOBILE NAVIGATION (até 991.98px) ===== */
@media (max-width: 991.98px) {
    .desktop-nav {
        display: none !important;
    }
    
    .mobile-nav-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        background: transparent;
        border: 1px solid var(--border-color);
        border-radius: 6px;
        color: var(--text-primary);
        cursor: pointer;
        transition: all 0.2s ease;
    }
    
    .mobile-nav-toggle:hover {
        background-color: var(--primary-light);
        color: var(--primary-color);
        border-color: var(--primary-color);
    }
    
    .mobile-nav-menu {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        bottom: 0;
        background: white;
        z-index: 1020;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        box-shadow: var(--shadow-lg);
    }
    
    .mobile-nav-menu.active {
        transform: translateX(0);
    }
    
    .mobile-nav-content {
        padding: 1rem;
    }
    
    .nav-link-mobile {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.875rem 1rem;
        color: var(--text-primary);
        text-decoration: none;
        border-radius: 8px;
        margin-bottom: 0.25rem;
        transition: all 0.2s ease;
    }
    
    .nav-link-mobile:hover,
    .nav-link-mobile.active {
        background-color: var(--primary-light);
        color: var(--primary-color);
    }
    
    .nav-link-mobile.active {
        background-color: var(--primary-color);
        color: white;
        font-weight: 600;
    }
    
    .nav-link-mobile i {
        width: 24px;
        text-align: center;
    }
}

/* User menu (comum para desktop e mobile) */
.user-menu {
    position: relative;
}

.user-avatar-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.375rem 0.75rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-avatar-btn:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.user-name {
    font-weight: 500;
    color: var(--text-primary);
}

/* Dropdown do usuário */
.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    min-width: 280px;
    z-index: 1000;
    display: none;
}

.user-dropdown.show {
    display: block;
}

.dropdown-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dropdown-header .user-avatar {
    width: 48px;
    height: 48px;
    font-size: 1.1rem;
}

.user-info h6 {
    margin: 0;
    font-weight: 600;
    color: var(--text-primary);
}

.user-info small {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.dropdown-item {
    max-width: 100%;
    display: block;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 6px;
    margin: 0.125rem 0.5rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.dropdown-item i {
    width: 20px;
    text-align: center;
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 0.5rem 0;
}

/* Espaço para o header fixo */
.header-spacer {
    height: 64px;
}

/* Overlay para mobile */
.mobile-overlay {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1015;
    display: none;
}

.mobile-overlay.active {
    display: block;
}

/* Botão backup */
.backup-btn {
    background: transparent;
    border: 1px solid var(--warning-color);
    color: var(--warning-color);
    border-radius: 6px;
    padding: 0.375rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.backup-btn:hover {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

/* Responsividade adicional */
@media (max-width: 767.98px) {
    .user-name {
        display: none;
    }
    
    .backup-btn span {
        display: none;
    }
    
    .backup-btn {
        padding: 0.5rem;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .header-container {
        padding: 0 1.5rem;
    }
    
    .user-name {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

        /* Estilos para impressão */
        @media print {
            .no-print {
                display: none !important;
            }
            
            .print-only {
                display: block !important;
            }
            
            body {
                font-size: 12pt;
                background: white !important;
                color: black !important;
            }
            
            .container-fluid {
                width: 100% !important;
                max-width: 100% !important;
                padding: 0 !important;
                margin: 0 !important;
            }
            
            .card {
                border: 1px solid #000 !important;
                box-shadow: none !important;
                page-break-inside: avoid;
            }
            
            .card-header {
                background-color: #f8f9fa !important;
                color: #000 !important;
                border-bottom: 2px solid #000 !important;
            }
            
            .table {
                width: 100% !important;
                border-collapse: collapse !important;
            }
            
            .table th, .table td {
                border: 1px solid #000 !important;
                padding: 6px !important;
            }
            
            .table th {
                background-color: #f2f2f2 !important;
                font-weight: bold !important;
            }
            
            .text-end {
                text-align: right !important;
            }
            
            .text-center {
                text-align: center !important;
            }
            
            .border-bottom {
                border-bottom: 2px solid #000 !important;
            }
            
            .valor-total {
                font-size: 14pt !important;
                font-weight: bold !important;
            }
            
            /* Cabeçalho da impressão */
            .print-header {
                text-align: center;
                border-bottom: 3px double #000;
                margin-bottom: 20px;
                padding-bottom: 10px;
            }
            
            .print-header h1 {
                font-size: 18pt;
                margin: 5px 0;
            }
            
            .print-header p {
                margin: 3px 0;
                font-size: 11pt;
            }
            
            /* Rodapé da impressão */
            .print-footer {
                text-align: center;
                border-top: 1px solid #000;
                margin-top: 30px;
                padding-top: 10px;
                font-size: 10pt;
                position: fixed;
                bottom: 0;
                width: 100%;
            }
            
            /* Quebra de página */
            .page-break {
                page-break-before: always;
            }
            
            /* Esconder elementos não necessários */
            .sidebar, .navbar, .btn-toolbar, .alert, .print-hide {
                display: none !important;
            }
        }
        
        /* Estilos para tela */
        .print-only {
            display: none;
        }
        
        .print-area {
            background: white;
            padding: 20px;
            border: 1px solid #ddd;
            border-radius: 5px;
        }
        
        .btn-print-custom {
            background: #6c757d;
            color: white;
            border: none;
            padding: 8px 15px;
            border-radius: 4px;
            cursor: pointer;
        }
        
        .btn-print-custom:hover {
            background: #5a6268;
        }
/* ESTILO DE NOVA ENTRADA */
.item-row {
            margin-bottom: 15px;
            padding: 15px;
            border: 1px solid #ddd;
            border-radius: 5px;
            background: #f8f9fa;
        }
        .total-row {
            font-size: 1.2em;
            font-weight: bold;
            color: #28a745;
        }
        .select2-container {
            width: 100% !important;
        }
        .xml-section {
            border-left: 4px solid #17a2b8;
            padding-left: 15px;
            margin-bottom: 20px;
        }
        .dropzone {
            border: 2px dashed #007bff;
            border-radius: 5px;
            padding: 20px;
            text-align: center;
            cursor: pointer;
            margin-bottom: 15px;
        }
        .dropzone:hover {
            background-color: #f8f9fa;
        }
        .moeda-input {
            text-align: right;
        }
/* ESTILOS DE ESTOQUE BAIXO */

        .critical { background-color: #ffcccc !important; }
        .warning { background-color: #fff3cd !important; }
        .info { background-color: #d1ecf1 !important; }
        
        /* Estilos para impressão */
        @media print {
            .no-print {
                display: none !important;
            }
            
            .print-only {
                display: block !important;
            }
            
            body {
                font-size: 10pt !important;
                background: white !important;
                color: black !important;
            }
            
            .container-fluid {
                width: 100% !important;
                max-width: 100% !important;
                padding: 0 !important;
                margin: 0 !important;
            }
            
            .card {
                border: 1px solid #000 !important;
                box-shadow: none !important;
                page-break-inside: avoid;
            }
            
            .card-header {
                background-color: #f8f9fa !important;
                color: #000 !important;
                border-bottom: 2px solid #000 !important;
            }
            
            .table {
                width: 100% !important;
                border-collapse: collapse !important;
                font-size: 9pt !important;
            }
            
            .table th, .table td {
                border: 1px solid #000 !important;
                padding: 4px !important;
            }
            
            .table th {
                background-color: #f2f2f2 !important;
                font-weight: bold !important;
            }
            
            .text-end {
                text-align: right !important;
            }
            
            .text-center {
                text-align: center !important;
            }
            
            .border-bottom {
                border-bottom: 2px solid #000 !important;
            }
            
            .valor-total {
                font-size: 11pt !important;
                font-weight: bold !important;
            }
            
            /* Cabeçalho da impressão */
            .print-header {
                text-align: center;
                border-bottom: 3px double #000;
                margin-bottom: 15px;
                padding-bottom: 10px;
            }
            
            .print-header h1 {
                font-size: 14pt;
                margin: 5px 0;
            }
            
            .print-header p {
                margin: 3px 0;
                font-size: 10pt;
            }
            
            /* Rodapé da impressão */
            .print-footer {
                text-align: center;
                border-top: 1px solid #000;
                margin-top: 20px;
                padding-top: 8px;
                font-size: 8pt;
                position: fixed;
                bottom: 0;
                width: 100%;
            }
            
            /* Quebra de página */
            .page-break {
                page-break-before: always;
            }
            
            /* Esconder elementos não necessários */
            .sidebar, .navbar, .btn-toolbar, .alert, .print-hide,
            .dataTables_wrapper .dataTables_length,
            .dataTables_wrapper .dataTables_filter,
            .dataTables_wrapper .dataTables_info,
            .dataTables_wrapper .dataTables_paginate {
                display: none !important;
            }
            
            /* Classes de cores para impressão */
            .critical {
                background-color: #ffcccc !important;
                -webkit-print-color-adjust: exact;
                print-color-adjust: exact;
                color-adjust: exact;
            }
            
            .warning {
                background-color: #fff3cd !important;
                -webkit-print-color-adjust: exact;
                print-color-adjust: exact;
                color-adjust: exact;
            }
            
            .info {
                background-color: #d1ecf1 !important;
                -webkit-print-color-adjust: exact;
                print-color-adjust: exact;
                color-adjust: exact;
            }
            
            /* Badges para impressão */
            .badge {
                border: 1px solid #000 !important;
                font-weight: bold !important;
                padding: 2px 5px !important;
            }
            
            .bg-danger { background-color: #ffcccc !important; color: #000 !important; }
            .bg-warning { background-color: #fff3cd !important; color: #000 !important; }
            .bg-info { background-color: #d1ecf1 !important; color: #000 !important; }
            .bg-success { background-color: #d4edda !important; color: #000 !important; }
        }
        
        /* Estilos para tela */
        .print-only {
            display: none;
        }
        
        .print-area {
            background: white;
            padding: 20px;
            border: 1px solid #ddd;
            border-radius: 5px;
            margin-top: 20px;
        }
        
        .btn-print-custom {
            background: #6c757d;
            color: white;
            border: none;
            padding: 8px 15px;
            border-radius: 4px;
            cursor: pointer;
        }
        
        .btn-print-custom:hover {
            background: #5a6268;
        }
        
         .report-card {
            transition: transform 0.3s;
            height: 100%;
        }
        .report-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        }
        .report-icon {
            font-size: 3rem;
            margin-bottom: 15px;
        }
/* ESTILO DE FORNECEDORES */
         .top-fornecedor { background-color: #fff3cd !important; }
        .ativo { background-color: #d4edda !important; }
        .inativo { background-color: #f8d7da !important; }
        
        /* Estilos para impressão */
        @media print {
            .no-print {
                display: none !important;
            }
            
            .print-only {
                display: block !important;
            }
            
            body {
                font-size: 10pt !important;
                background: white !important;
                color: black !important;
            }
            
            .container-fluid {
                width: 100% !important;
                max-width: 100% !important;
                padding: 0 !important;
                margin: 0 !important;
            }
            
            .card {
                border: 1px solid #000 !important;
                box-shadow: none !important;
                page-break-inside: avoid;
            }
            
            .card-header {
                background-color: #f8f9fa !important;
                color: #000 !important;
                border-bottom: 2px solid #000 !important;
            }
            
            .table {
                width: 100% !important;
                border-collapse: collapse !important;
                font-size: 9pt !important;
            }
            
            .table th, .table td {
                border: 1px solid #000 !important;
                padding: 4px !important;
            }
            
            .table th {
                background-color: #f2f2f2 !important;
                font-weight: bold !important;
            }
            
            .text-end {
                text-align: right !important;
            }
            
            .text-center {
                text-align: center !important;
            }
            
            .border-bottom {
                border-bottom: 2px solid #000 !important;
            }
            
            .valor-total {
                font-size: 11pt !important;
                font-weight: bold !important;
            }
            
            /* Cabeçalho da impressão */
            .print-header {
                text-align: center;
                border-bottom: 3px double #000;
                margin-bottom: 15px;
                padding-bottom: 10px;
            }
            
            .print-header h1 {
                font-size: 14pt;
                margin: 5px 0;
            }
            
            .print-header p {
                margin: 3px 0;
                font-size: 10pt;
            }
            
            /* Rodapé da impressão */
            .print-footer {
                text-align: center;
                border-top: 1px solid #000;
                margin-top: 20px;
                padding-top: 8px;
                font-size: 8pt;
                position: fixed;
                bottom: 0;
                width: 100%;
            }
            
            /* Quebra de página */
            .page-break {
                page-break-before: always;
            }
            
            /* Esconder elementos não necessários */
            .sidebar, .navbar, .btn-toolbar, .alert, .print-hide,
            .dataTables_wrapper .dataTables_length,
            .dataTables_wrapper .dataTables_filter,
            .dataTables_wrapper .dataTables_info,
            .dataTables_wrapper .dataTables_paginate {
                display: none !important;
            }
            
            /* Classes de cores para impressão */
            .top-fornecedor {
                background-color: #fff3cd !important;
                -webkit-print-color-adjust: exact;
                print-color-adjust: exact;
                color-adjust: exact;
            }
            
            .ativo {
                background-color: #d4edda !important;
                -webkit-print-color-adjust: exact;
                print-color-adjust: exact;
                color-adjust: exact;
            }
            
            .inativo {
                background-color: #f8d7da !important;
                -webkit-print-color-adjust: exact;
                print-color-adjust: exact;
                color-adjust: exact;
            }
            
            /* Badges para impressão */
            .badge {
                border: 1px solid #000 !important;
                font-weight: bold !important;
                padding: 2px 5px !important;
            }
        }
        
        /* Estilos para tela */
        .print-only {
            display: none;
        }
        
        .print-area {
            background: white;
            padding: 20px;
            border: 1px solid #ddd;
            border-radius: 5px;
            margin-top: 20px;
        }
/* ESTILOS DE MOVIMENTAÇOES */
        .entrada-row { 
            background-color: #f0fff4; 
            border-left: 4px solid #28a745;
        }
        .saida-row { 
            background-color: #fff5f5; 
            border-left: 4px solid #dc3545;
        }
        .badge-entrada { 
            background-color: #28a745; 
            color: white;
            padding: 5px 10px;
            border-radius: 4px;
            font-size: 0.9em;
        }
        .badge-saida { 
            background-color: #dc3545; 
            color: white;
            padding: 5px 10px;
            border-radius: 4px;
            font-size: 0.9em;
        }
        .card-summary {
            border-radius: 10px;
            transition: transform 0.2s;
        }
        .card-summary:hover {
            transform: translateY(-5px);
        }
        .table th {
            background-color: #2c3e50;
            color: white;
            border: none;
        }
        .table td {
            vertical-align: middle;
        }
        
        .entrada { background-color: #d4edda !important; }
        .saida { background-color: #f8d7da !important; }
        .saldo-positivo { color: #28a745 !important; font-weight: bold; }
        .saldo-negativo { color: #dc3545 !important; font-weight: bold; }
        
        /* Estilos para impressão */
        @media print {
            .no-print {
                display: none !important;
            }
            
            .print-only {
                display: block !important;
            }
            
            body {
                font-size: 10pt !important;
                background: white !important;
                color: black !important;
            }
            
            .container-fluid {
                width: 100% !important;
                max-width: 100% !important;
                padding: 0 !important;
                margin: 0 !important;
            }
            
            .card {
                border: 1px solid #000 !important;
                box-shadow: none !important;
                page-break-inside: avoid;
            }
            
            .card-header {
                background-color: #f8f9fa !important;
                color: #000 !important;
                border-bottom: 2px solid #000 !important;
            }
            
            .table {
                width: 100% !important;
                border-collapse: collapse !important;
                font-size: 9pt !important;
            }
            
            .table th, .table td {
                border: 1px solid #000 !important;
                padding: 4px !important;
            }
            
            .table th {
                background-color: #f2f2f2 !important;
                font-weight: bold !important;
            }
            
            .text-end {
                text-align: right !important;
            }
            
            .text-center {
                text-align: center !important;
            }
            
            .border-bottom {
                border-bottom: 2px solid #000 !important;
            }
            
            .valor-total {
                font-size: 11pt !important;
                font-weight: bold !important;
            }
            
            /* Cabeçalho da impressão */
            .print-header {
                text-align: center;
                border-bottom: 3px double #000;
                margin-bottom: 15px;
                padding-bottom: 10px;
            }
            
            .print-header h1 {
                font-size: 14pt;
                margin: 5px 0;
            }
            
            .print-header p {
                margin: 3px 0;
                font-size: 10pt;
            }
            
            /* Rodapé da impressão */
            .print-footer {
                text-align: center;
                border-top: 1px solid #000;
                margin-top: 20px;
                padding-top: 8px;
                font-size: 8pt;
                position: fixed;
                bottom: 0;
                width: 100%;
            }
            
            /* Quebra de página */
            .page-break {
                page-break-before: always;
            }
            
            /* Esconder elementos não necessários */
            .sidebar, .navbar, .btn-toolbar, .alert, .print-hide,
            .dataTables_wrapper .dataTables_length,
            .dataTables_wrapper .dataTables_filter,
            .dataTables_wrapper .dataTables_info,
            .dataTables_wrapper .dataTables_paginate {
                display: none !important;
            }
            
            /* Classes de cores para impressão */
            .entrada {
                background-color: #d4edda !important;
                -webkit-print-color-adjust: exact;
                print-color-adjust: exact;
                color-adjust: exact;
            }
            
            .saida {
                background-color: #f8d7da !important;
                -webkit-print-color-adjust: exact;
                print-color-adjust: exact;
                color-adjust: exact;
            }
            
            /* Badges para impressão */
            .badge {
                border: 1px solid #000 !important;
                font-weight: bold !important;
                padding: 2px 5px !important;
            }
        }
        
        /* Estilos para tela */
        .print-only {
            display: none;
        }
        
        .print-area {
            background: white;
            padding: 20px;
            border: 1px solid #ddd;
            border-radius: 5px;
            margin-top: 20px;
        }
        
        /* Gráfico de barras */
        .barra-entrada {
            background-color: #28a745;
            height: 20px;
            border-radius: 3px;
        }
        
        .barra-saida {
            background-color: #dc3545;
            height: 20px;
            border-radius: 3px;
        }
/* ESTILO PRODUTOS MAIS VENDIDOS */
        .top-1 { background-color: #fff3cd !important; }
        .top-3 { background-color: #d1ecf1 !important; }
        .top-10 { background-color: #d4edda !important; }
        
        /* Estilos para impressão */
        @media print {
            .no-print {
                display: none !important;
            }
            
            .print-only {
                display: block !important;
            }
            
            body {
                font-size: 10pt !important;
                background: white !important;
                color: black !important;
            }
            
            .container-fluid {
                width: 100% !important;
                max-width: 100% !important;
                padding: 0 !important;
                margin: 0 !important;
            }
            
            .card {
                border: 1px solid #000 !important;
                box-shadow: none !important;
                page-break-inside: avoid;
            }
            
            .card-header {
                background-color: #f8f9fa !important;
                color: #000 !important;
                border-bottom: 2px solid #000 !important;
            }
            
            .table {
                width: 100% !important;
                border-collapse: collapse !important;
                font-size: 9pt !important;
            }
            
            .table th, .table td {
                border: 1px solid #000 !important;
                padding: 4px !important;
            }
            
            .table th {
                background-color: #f2f2f2 !important;
                font-weight: bold !important;
            }
            
            .text-end {
                text-align: right !important;
            }
            
            .text-center {
                text-align: center !important;
            }
            
            .border-bottom {
                border-bottom: 2px solid #000 !important;
            }
            
            .valor-total {
                font-size: 11pt !important;
                font-weight: bold !important;
            }
            
            /* Cabeçalho da impressão */
            .print-header {
                text-align: center;
                border-bottom: 3px double #000;
                margin-bottom: 15px;
                padding-bottom: 10px;
            }
            
            .print-header h1 {
                font-size: 14pt;
                margin: 5px 0;
            }
            
            .print-header p {
                margin: 3px 0;
                font-size: 10pt;
            }
            
            /* Rodapé da impressão */
            .print-footer {
                text-align: center;
                border-top: 1px solid #000;
                margin-top: 20px;
                padding-top: 8px;
                font-size: 8pt;
                position: fixed;
                bottom: 0;
                width: 100%;
            }
            
            /* Quebra de página */
            .page-break {
                page-break-before: always;
            }
            
            /* Esconder elementos não necessários */
            .sidebar, .navbar, .btn-toolbar, .alert, .print-hide,
            .dataTables_wrapper .dataTables_length,
            .dataTables_wrapper .dataTables_filter,
            .dataTables_wrapper .dataTables_info,
            .dataTables_wrapper .dataTables_paginate {
                display: none !important;
            }
            
            /* Classes de cores para impressão */
            .top-1 {
                background-color: #fff3cd !important;
                -webkit-print-color-adjust: exact;
                print-color-adjust: exact;
                color-adjust: exact;
            }
            
            .top-3 {
                background-color: #d1ecf1 !important;
                -webkit-print-color-adjust: exact;
                print-color-adjust: exact;
                color-adjust: exact;
            }
            
            .top-10 {
                background-color: #d4edda !important;
                -webkit-print-color-adjust: exact;
                print-color-adjust: exact;
                color-adjust: exact;
            }
            
            /* Badges para impressão */
            .badge {
                border: 1px solid #000 !important;
                font-weight: bold !important;
                padding: 2px 5px !important;
            }
        }
        
        /* Estilos para tela */
        .print-only {
            display: none;
        }
        
        .print-area {
            background: white;
            padding: 20px;
            border: 1px solid #ddd;
            border-radius: 5px;
            margin-top: 20px;
        }
/* ESTILO VALOR EM ESTOQUE */

        .high-value { background-color: #d4edda !important; }
        .medium-value { background-color: #fff3cd !important; }
        .low-value { background-color: #f8d7da !important; }
        
        /* Estilos para impressão */
        @media print {
            .no-print {
                display: none !important;
            }
            
            .print-only {
                display: block !important;
            }
            
            body {
                font-size: 10pt !important;
                background: white !important;
                color: black !important;
            }
            
            .container-fluid {
                width: 100% !important;
                max-width: 100% !important;
                padding: 0 !important;
                margin: 0 !important;
            }
            
            .card {
                border: 1px solid #000 !important;
                box-shadow: none !important;
                page-break-inside: avoid;
            }
            
            .card-header {
                background-color: #f8f9fa !important;
                color: #000 !important;
                border-bottom: 2px solid #000 !important;
            }
            
            .table {
                width: 100% !important;
                border-collapse: collapse !important;
                font-size: 9pt !important;
            }
            
            .table th, .table td {
                border: 1px solid #000 !important;
                padding: 4px !important;
            }
            
            .table th {
                background-color: #f2f2f2 !important;
                font-weight: bold !important;
            }
            
            .text-end {
                text-align: right !important;
            }
            
            .text-center {
                text-align: center !important;
            }
            
            .border-bottom {
                border-bottom: 2px solid #000 !important;
            }
            
            .valor-total {
                font-size: 11pt !important;
                font-weight: bold !important;
            }
            
            /* Cabeçalho da impressão */
            .print-header {
                text-align: center;
                border-bottom: 3px double #000;
                margin-bottom: 15px;
                padding-bottom: 10px;
            }
            
            .print-header h1 {
                font-size: 14pt;
                margin: 5px 0;
            }
            
            .print-header p {
                margin: 3px 0;
                font-size: 10pt;
            }
            
            /* Rodapé da impressão */
            .print-footer {
                text-align: center;
                border-top: 1px solid #000;
                margin-top: 20px;
                padding-top: 8px;
                font-size: 8pt;
                position: fixed;
                bottom: 0;
                width: 100%;
            }
            
            /* Quebra de página */
            .page-break {
                page-break-before: always;
            }
            
            /* Esconder elementos não necessários */
            .sidebar, .navbar, .btn-toolbar, .alert, .print-hide,
            .dataTables_wrapper .dataTables_length,
            .dataTables_wrapper .dataTables_filter,
            .dataTables_wrapper .dataTables_info,
            .dataTables_wrapper .dataTables_paginate {
                display: none !important;
            }
            
            /* Classes de cores para impressão */
            .high-value {
                background-color: #d4edda !important;
                -webkit-print-color-adjust: exact;
                print-color-adjust: exact;
                color-adjust: exact;
            }
            
            .medium-value {
                background-color: #fff3cd !important;
                -webkit-print-color-adjust: exact;
                print-color-adjust: exact;
                color-adjust: exact;
            }
            
            .low-value {
                background-color: #f8d7da !important;
                -webkit-print-color-adjust: exact;
                print-color-adjust: exact;
                color-adjust: exact;
            }
            
            /* Badges para impressão */
            .badge {
                border: 1px solid #000 !important;
                font-weight: bold !important;
                padding: 2px 5px !important;
            }
        }
        
        /* Estilos para tela */
        .print-only {
            display: none;
        }
        
        .print-area {
            background: white;
            padding: 20px;
            border: 1px solid #ddd;
            border-radius: 5px;
            margin-top: 20px;
        }
        
        /* Estilos para gráfico */
        .category-bar {
            height: 20px;
            background-color: #007bff;
            border-radius: 3px;
            margin-bottom: 5px;
        }
        
        .progress-bar {
            height: 10px;
            margin-bottom: 5px;
        }
/* estilo do menu financeiro */
        /* Desktop Dropdown */
        .desktop-nav-dropdown {
            position: relative;
            display: inline-block;
        }
        
        .desktop-nav-dropdown .dropdown-menu {
            position: absolute;
            background: white;
            box-shadow: 0 2px 15px rgba(0,0,0,0.1);
            border-radius: 8px;
            border: 1px solid #dee2e6;
            z-index: 1000;
            min-width: 220px;
        }
        
        .desktop-nav-dropdown .nav-link-desktop.dropdown-toggle::after {
            display: none;
        }
        
        /* Mobile Submenu */
        .mobile-submenu-content {
            display: none;
            padding-left: 20px;
            background: rgba(0,0,0,0.02);
            border-left: 3px solid var(--primary-color, #0d6efd);
        }
        
        .mobile-submenu-content.show {
            display: block;
        }
        
        .submenu-item {
            padding: 10px 20px !important;
            font-size: 0.9em;
            color: #666;
        }
        
        .submenu-divider {
            padding: 5px 20px;
            font-size: 0.8em;
            color: #999;
            font-weight: 600;
            text-transform: uppercase;
            margin-top: 10px;
        }
        
        .submenu-toggle .fa-chevron-down {
            transition: transform 0.3s;
        }
        
        .submenu-toggle .fa-chevron-up {
            transform: rotate(180deg);
        }