/* ============================================
   DESKTOP ENHANCEMENTS (>1024px)
   Centraliza Argo - Melhorias Desktop
   Foco: Otimização de espaços em branco
   ============================================ */

@media (min-width: 1025px) {
    
    /* ============================================
       OTIMIZAÇÃO DE ESPAÇOS EM BRANCO
       ============================================ */
    
    /* Reduzir padding de containers */
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Reduzir padding interno de cards */
    .card-body {
        padding: 1rem 1.25rem !important;
    }
    
    .card-header {
        padding: 0.75rem 1.25rem !important;
    }
    
    /* Otimizar margens entre seções */
    .mb-4 {
        margin-bottom: 1rem !important;
    }
    
    .mb-3 {
        margin-bottom: 0.75rem !important;
    }
    
    .mb-2 {
        margin-bottom: 0.5rem !important;
    }
    
    /* Reduzir espaçamento em grids */
    .row.g-3 {
        --bs-gutter-y: 0.75rem;
        --bs-gutter-x: 0.75rem;
    }
    
    .row.g-2 {
        --bs-gutter-y: 0.5rem;
        --bs-gutter-x: 0.5rem;
    }
    
    /* Compactar espaçamento vertical em formulários */
    .row.g-3 > *,
    .row.g-2 > * {
        padding-top: calc(var(--bs-gutter-y) * 0.5);
        padding-bottom: calc(var(--bs-gutter-y) * 0.5);
    }
    
    /* ============================================
       TIPOGRAFIA OTIMIZADA
       ============================================ */
    
    /* Reduzir line-height para economizar espaço vertical */
    body {
        line-height: 1.5;
    }
    
    h1, h2, h3, h4, h5, h6 {
        line-height: 1.4;
        margin-bottom: 0.5rem;
    }
    
    /* Títulos mais compactos */
    h1 { 
        font-size: 2rem;
        font-weight: 600;
        margin-bottom: 0.75rem;
    }
    
    h2 { 
        font-size: 1.75rem;
        font-weight: 600;
        margin-bottom: 0.75rem;
    }
    
    h3 { 
        font-size: 1.5rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
    }
    
    h4 { 
        font-size: 1.25rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
    }
    
    h5 { 
        font-size: 1.1rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
    }
    
    h6 { 
        font-size: 1rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
    }
    
    .card-title {
        margin-bottom: 0.5rem;
        font-weight: 600;
    }
    
    /* ============================================
       TABELAS COMPACTAS
       ============================================ */
    
    /* Reduzir padding de células */
    .table th,
    .table td {
        padding: 0.5rem 0.75rem !important;
        vertical-align: middle;
    }
    
    .table thead th {
        padding: 0.6rem 0.75rem !important;
        font-weight: 600;
        font-size: 0.875rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        border-bottom: 2px solid #dee2e6;
    }
    
    /* Hover state mais sutil */
    .table tbody tr:hover {
        background-color: #f8f9fa;
        transition: background-color 0.15s ease;
    }
    
    /* Zebra striping mais sutil */
    .table-striped > tbody > tr:nth-of-type(odd) > td {
        background-color: #fafbfc;
    }
    
    /* Compactar tabelas responsivas */
    .table-responsive {
        margin-bottom: 0.75rem;
    }
    
    /* ============================================
       FORMULÁRIOS COMPACTOS
       ============================================ */
    
    /* Reduzir espaçamento entre campos */
    .form-label {
        margin-bottom: 0.25rem;
        font-size: 0.875rem;
        font-weight: 500;
    }
    
    .form-control,
    .form-select {
        padding: 0.4rem 0.75rem;
        font-size: 0.875rem;
        min-height: 38px;
        line-height: 1.5;
    }
    
    /* Focus states mais evidentes */
    .form-control:focus,
    .form-select:focus {
        border-color: #5e72e4;
        box-shadow: 0 0 0 0.2rem rgba(94, 114, 228, 0.15);
    }
    
    /* Compactar grupos de formulários */
    .row.g-3 .form-group,
    .row.g-2 .form-group {
        margin-bottom: 0.5rem;
    }
    
    /* ============================================
       BOTÕES OTIMIZADOS
       ============================================ */
    
    .btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.875rem;
        font-weight: 500;
        line-height: 1.5;
        transition: all 0.2s ease;
    }
    
    .btn-sm {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 0.95rem;
    }
    
    /* Hover states mais evidentes */
    .btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }
    
    .btn:active {
        transform: translateY(0);
    }
    
    /* ============================================
       CARDS COMPACTOS COM HOVER
       ============================================ */
    
    .card {
        margin-bottom: 1rem;
        border-radius: 0.5rem;
        transition: all 0.2s ease;
    }
    
    .card:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        transform: translateY(-2px);
    }
    
    /* Cards de métricas mais compactos */
    .metric-card .card-body {
        padding: 1rem !important;
    }
    
    .metric-card h3,
    .metric-card h4 {
        margin-bottom: 0.25rem;
    }
    
    /* ============================================
       DASHBOARD ESPECÍFICO
       ============================================ */
    
    /* Cards de métricas mais compactos */
    .card[data-metric] .card-body {
        padding: 0.75rem 1rem !important;
        min-height: auto !important;
    }
    
    .card[data-metric] {
        min-height: auto !important;
    }
    
    .metric-value {
        font-size: 1.4rem !important;
        line-height: 1.2;
        margin-bottom: 0;
    }
    
    .metric-card h4 {
        margin-bottom: 0.5rem !important;
        font-size: 0.75rem !important;
    }
    
    /* Reduzir espaçamento entre cards de métricas */
    .row.g-2 .metric-card {
        margin-bottom: 0.5rem;
    }
    
    /* Otimizar cards com padding inline */
    .card-body[style*="padding: 15px"] {
        padding: 0.75rem 1rem !important;
    }
    
    .card[style*="min-height: 110px"] {
        min-height: auto !important;
    }
    
    /* Compactar filtros do dashboard */
    .marketplace-filter-group {
        gap: 0;
    }
    
    /* ============================================
       AJUSTES DOS BOTÕES DE FILTRO DE MARKETPLACE NO DASHBOARD (APENAS DESKTOP)
       ============================================ */
    
    /* Layout do card de filtros - distribuição: esquerda | centro | direita */
    .container-fluid .card-body.dashboard-filters-card .row {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
    
    /* Label "Marketplaces" - canto esquerdo */
    .container-fluid .card-body.dashboard-filters-card .row .col-lg-2.col-md-3.col-sm-12:first-child {
        flex: 0 0 auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        padding-left: 0 !important;
        padding-right: 1rem !important;
    }
    
    /* Botões de marketplace - centralizados */
    .container-fluid .card-body.dashboard-filters-card .row .col-lg-7.col-md-6.col-sm-12 {
        flex: 1 1 auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    
    /* Grupo de botões centralizado */
    .container-fluid .card-body.dashboard-filters-card .marketplace-filter-group {
        max-width: 500px !important;
        width: 100% !important;
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 0 !important;
        margin: 0 auto !important;
    }
    
    /* Ajustar tamanho e espaçamento dos botões no desktop */
    .container-fluid .card-body.dashboard-filters-card .marketplace-filter-group .btn {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        padding: 0.4rem 0.5rem !important;
        font-size: 0.875rem !important;
        border-radius: 0.375rem !important;
        margin-right: 0.25rem !important;
    }
    
    .container-fluid .card-body.dashboard-filters-card .marketplace-filter-group .btn:last-child {
        margin-right: 0 !important;
    }
    
    /* Ajustar tamanho das imagens nos botões */
    .container-fluid .card-body.dashboard-filters-card .marketplace-filter-group .btn img {
        height: 18px !important;
        width: auto !important;
        max-width: 100% !important;
    }
    
    /* Filtro de período - canto direito */
    .container-fluid .card-body.dashboard-filters-card .row .col-lg-3.col-md-3.col-sm-12:last-child {
        flex: 0 0 auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        flex-direction: column !important;
        padding-left: 1rem !important;
        padding-right: 0 !important;
    }
    
    /* Ajustar label "Marketplaces" */
    .container-fluid .card-body.dashboard-filters-card .row .col-lg-2.col-md-3.col-sm-12 h5.card-title {
        margin-bottom: 0 !important;
    }
    
    /* ============================================
       HEADERS E NAVEGAÇÃO COMPACTOS
       ============================================ */
    
    /* Reduzir padding em headers */
    .card-header {
        padding: 0.75rem 1.25rem !important;
    }
    
    .card-header h6 {
        margin-bottom: 0.25rem;
    }
    
    .card-header p {
        margin-bottom: 0;
        font-size: 0.8rem;
    }
    
    /* ============================================
       MODAIS E DROPDOWNS COMPACTOS
       ============================================ */
    
    .modal-body {
        padding: 1rem 1.25rem;
    }
    
    .modal-header {
        padding: 0.75rem 1.25rem;
    }
    
    .modal-footer {
        padding: 0.75rem 1.25rem;
    }
    
    .dropdown-menu {
        padding: 0.375rem 0;
    }
    
    .dropdown-item {
        padding: 0.4rem 1rem;
        font-size: 0.875rem;
    }
    
    /* ============================================
       PAGINAÇÃO COMPACTA
       ============================================ */
    
    .pagination {
        margin-bottom: 0.75rem;
    }
    
    .page-link {
        padding: 0.4rem 0.75rem;
        font-size: 0.875rem;
    }
    
    /* ============================================
       BADGES E ALERTAS COMPACTOS
       ============================================ */
    
    .badge {
        padding: 0.35rem 0.6rem;
        font-size: 0.75rem;
        font-weight: 500;
    }
    
    .alert {
        padding: 0.75rem 1rem;
        margin-bottom: 0.75rem;
    }
    
    /* ============================================
       ESPAÇAMENTO VERTICAL OTIMIZADO
       ============================================ */
    
    /* Reduzir espaçamento vertical geral */
    .py-4 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
    
    .py-3 {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }
    
    .py-2 {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }
    
    .pt-4 {
        padding-top: 1rem !important;
    }
    
    .pb-4 {
        padding-bottom: 1rem !important;
    }
    
    .mt-4 {
        margin-top: 1rem !important;
    }
    
    .mt-3 {
        margin-top: 0.75rem !important;
    }
    
    /* ============================================
       REGRAS GLOBAIS PARA COMPACTAR FILTROS NO DESKTOP
       ============================================ */
    
    /* Aplicar compactação em todos os formulários de filtros */
    form[class*="filters"],
    form.invoices-filters,
    form.rebates-filters,
    form.retiradas-filters,
    form.controle-retiradas-filters,
    form.promotion-filters,
    form.performance-filters,
    form.pedidos-filters {
        margin-bottom: 0.5rem !important;
    }
    
    /* Reduzir tamanho dos labels em todos os filtros */
    form[class*="filters"] .form-label,
    form.invoices-filters .form-label,
    form.rebates-filters .form-label,
    form.retiradas-filters .form-label,
    form.controle-retiradas-filters .form-label,
    form.promotion-filters .form-label,
    form.performance-filters .form-label,
    form.pedidos-filters .form-label {
        font-size: 0.7rem !important;
        margin-bottom: 0.25rem !important;
        font-weight: 600;
        line-height: 1.2;
    }
    
    /* Reduzir tamanho e padding dos inputs e selects em todos os filtros */
    form[class*="filters"] .form-control,
    form[class*="filters"] .form-select,
    form.invoices-filters .form-control,
    form.invoices-filters .form-select,
    form.rebates-filters .form-control,
    form.rebates-filters .form-select,
    form.retiradas-filters .form-control,
    form.retiradas-filters .form-select,
    form.controle-retiradas-filters .form-control,
    form.controle-retiradas-filters .form-select,
    form.promotion-filters .form-control,
    form.promotion-filters .form-select,
    form.performance-filters .form-control,
    form.performance-filters .form-select,
    form.pedidos-filters .form-control,
    form.pedidos-filters .form-select {
        font-size: 0.75rem !important;
        padding: 0.3rem 0.5rem !important;
        min-height: 32px !important;
        border-radius: 0.375rem;
    }
    
    /* Reduzir tamanho dos botões em filtros */
    form[class*="filters"] .btn,
    form.invoices-filters .btn,
    form.rebates-filters .btn,
    form.retiradas-filters .btn,
    form.controle-retiradas-filters .btn,
    form.promotion-filters .btn,
    form.performance-filters .btn,
    form.pedidos-filters .btn {
        font-size: 0.75rem !important;
        padding: 0.3rem 0.6rem !important;
        min-height: 32px !important;
        font-weight: 500;
    }
    
    /* Reduzir espaçamento entre elementos dos filtros */
    form[class*="filters"].row > div,
    form.invoices-filters.row > div,
    form.rebates-filters.row > div,
    form.retiradas-filters.row > div,
    form.controle-retiradas-filters.row > div,
    form.promotion-filters.row > div,
    form.performance-filters.row > div,
    form.pedidos-filters.row > div {
        margin-bottom: 0.4rem !important;
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
    }
    
    /* Reduzir gaps em rows de filtros */
    form[class*="filters"].row.g-2,
    form[class*="filters"].row.g-3 {
        --bs-gutter-x: 0.5rem;
        --bs-gutter-y: 0.4rem;
    }
    
    /* Otimizar cards com padding inline */
    .card.p-2,
    .card[class*="p-2"] {
        padding: 0.75rem !important;
    }
    
    .card-body.p-2,
    .card-body[class*="p-2"] {
        padding: 0.75rem !important;
    }
    
    /* Compactar cards de filtros */
    .card.shadow-sm {
        margin-bottom: 0.75rem;
    }
    
    /* Reduzir espaçamento em cards de alertas */
    .alert-compact-btn {
        padding: 0.35rem 0.6rem !important;
        font-size: 0.8rem !important;
    }
    
    /* ============================================
       ESPAÇAMENTO EM LISTAS E ITENS
       ============================================ */
    
    .list-group-item {
        padding: 0.5rem 0.75rem;
    }
    
    /* ============================================
       OTIMIZAÇÕES ESPECÍFICAS ADICIONAIS
       ============================================ */
    
    /* Reduzir espaçamento em seções de cabeçalho */
    .row.mb-2 {
        margin-bottom: 0.75rem !important;
    }
    
    /* Compactar espaçamento em contadores e badges */
    .badge.fs-6 {
        font-size: 0.875rem !important;
        padding: 0.35rem 0.6rem;
    }
    
    /* Otimizar espaçamento em grupos de botões */
    .d-flex.gap-2 > * {
        margin-right: 0.5rem;
    }
    
    .d-flex.gap-2 > *:last-child {
        margin-right: 0;
    }
    
    /* Compactar espaçamento em headers de página */
    h2.mb-0 {
        margin-bottom: 0.5rem !important;
    }
    
    /* Reduzir espaçamento em containers de tabelas */
    .table-responsive.p-0 {
        padding: 0 !important;
    }
    
    /* Otimizar espaçamento em paginação */
    #pagination-wrapper {
        margin-top: 0.75rem !important;
    }
    
    /* ============================================
       MELHORIAS VISUAIS (sem aumentar espaço)
       ============================================ */
    
    /* Transições suaves */
    * {
        transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    }
    
    /* Melhor contraste */
    .text-muted {
        color: #6c757d !important;
    }
    
    /* Sombras sutis para profundidade */
    .card {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    }
    
    .card.shadow-sm {
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05) !important;
    }
    
    .card.shadow-lg {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
    }
    
    /* ============================================
       OTIMIZAÇÕES FINAIS DE ESPAÇO
       ============================================ */
    
    /* Reduzir espaçamento em containers principais */
    .container-fluid.py-4 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
    
    .container-fluid.py-2 {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }
    
    /* Compactar espaçamento em seções */
    .col-12.mb-0 {
        margin-bottom: 0 !important;
    }
    
    .col-12.mb-2 {
        margin-bottom: 0.75rem !important;
    }
    
    /* Otimizar espaçamento em rows */
    .row.mb-2 {
        margin-bottom: 0.75rem !important;
    }
    
    .row.mb-3 {
        margin-bottom: 1rem !important;
    }
    
    .row.mb-4 {
        margin-bottom: 1.25rem !important;
    }
    
    /* Compactar espaçamento em elementos de texto */
    p.mb-0 {
        margin-bottom: 0 !important;
    }
    
    small {
        font-size: 0.8rem;
        line-height: 1.4;
    }
    
    /* Otimizar espaçamento em ícones */
    .me-2 {
        margin-right: 0.5rem !important;
    }
    
    .ms-2 {
        margin-left: 0.5rem !important;
    }
    
    /* Compactar espaçamento em grupos flex */
    .d-flex.align-items-center {
        gap: 0.5rem;
    }
    
    /* Reduzir espaçamento em cards de estatísticas */
    .card-hover {
        margin-bottom: 0.75rem;
    }
    
    /* Otimizar espaçamento em tabelas de dados */
    .table {
        margin-bottom: 0.75rem;
    }
    
    /* Compactar espaçamento em modais */
    .modal-content {
        margin: 1rem auto;
    }
    
    /* Reduzir espaçamento em dropdowns */
    .dropdown-toggle::after {
        margin-left: 0.5rem;
    }
    
    /* Otimizar espaçamento em badges dentro de botões */
    .btn .badge {
        margin-left: 0.25rem;
        padding: 0.25rem 0.4rem;
    }
    
    /* ============================================
       OTIMIZAÇÕES ESPECÍFICAS POR COMPONENTE
       ============================================ */
    
    /* Cards de estatísticas compactos */
    .card.shadow-sm .card-body.p-3 {
        padding: 0.75rem 1rem !important;
    }
    
    /* Cards com padding específico */
    .card-body.p-3 {
        padding: 0.75rem 1rem !important;
    }
    
    .card-body.p-2 {
        padding: 0.5rem 0.75rem !important;
    }
    
    .card-body.py-2 {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }
    
    /* Headers de cards compactos */
    .card-header.p-3 {
        padding: 0.75rem 1rem !important;
    }
    
    .card-header.pb-0 {
        padding-bottom: 0 !important;
    }
    
    /* Reduzir espaçamento em rows com g-1 */
    .row.g-1 {
        --bs-gutter-y: 0.25rem;
        --bs-gutter-x: 0.5rem;
    }
    
    /* Otimizar cards de filtros */
    .card-filter .card-body {
        padding: 0.75rem 1rem !important;
    }
    
    /* Compactar badges grandes */
    .badge.px-3 {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    
    .badge.py-2 {
        padding-top: 0.35rem !important;
        padding-bottom: 0.35rem !important;
    }
    
    /* Otimizar espaçamento em headers de página */
    .row.mb-3 {
        margin-bottom: 1rem !important;
    }
    
    /* Cards de promoções/catálogo */
    .catalog-card {
        padding: 12px 14px !important;
        margin-bottom: 12px !important;
    }
    
    /* Formulários com labels pequenos */
    .form-label.mb-1 {
        margin-bottom: 0.25rem !important;
    }
    
    .form-label.text-sm {
        font-size: 0.8rem !important;
    }
    
    /* Reduzir espaçamento em grupos de cards */
    .row.g-2 .col-lg-2,
    .row.g-2 .col-lg-3,
    .row.g-2 .col-lg-4 {
        margin-bottom: 0.5rem;
    }
    
    /* Otimizar espaçamento em seções de detalhes */
    .card-body .row.mb-3 {
        margin-bottom: 0.75rem !important;
    }
    
    /* Compactar espaçamento em tabelas dentro de cards */
    .card-body .table-responsive {
        margin-bottom: 0.5rem;
    }
    
    /* Reduzir espaçamento em modais específicos */
    .modal-body .row {
        margin-bottom: 0.75rem;
    }
    
    /* Otimizar espaçamento em cards de estatísticas com ícones */
    .card-body .d-flex.align-items-center {
        gap: 0.75rem;
    }
    
    /* Compactar espaçamento em badges dentro de cards */
    .card-body .badge {
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
    }
    
    /* Reduzir espaçamento em elementos de texto pequeno */
    .text-xs {
        font-size: 0.75rem;
        line-height: 1.4;
    }
    
    .text-sm {
        font-size: 0.85rem;
        line-height: 1.5;
    }
    
    /* Otimizar espaçamento em grids de produtos */
    #sku-grid.row.g-3 {
        --bs-gutter-y: 0.75rem;
        --bs-gutter-x: 0.75rem;
    }
    
    /* Compactar espaçamento em paginação */
    .d-flex.justify-content-between.align-items-center.px-3 {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    
    .d-flex.justify-content-between.align-items-center.py-3 {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }
    
    /* Reduzir espaçamento em cards de resumo */
    .col-lg-3.ms-auto .d-flex.justify-content-between {
        margin-bottom: 0.5rem;
    }
    
    /* Otimizar espaçamento em seções horizontais */
    .horizontal.dark {
        margin-top: 0.75rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    /* Compactar espaçamento em avatares e imagens */
    .avatar {
        margin-right: 0.75rem !important;
    }
    
    /* Reduzir espaçamento em grupos de botões */
    .d-flex.gap-2 {
        gap: 0.5rem !important;
    }
    
    /* Otimizar espaçamento em cards de métricas com ícones grandes */
    .card-body .me-3 {
        margin-right: 0.75rem !important;
    }
    
    /* Compactar espaçamento em cards de status */
    .card-filter {
        margin-bottom: 0.5rem;
    }
    
    /* Reduzir espaçamento em headers de cards */
    .card-header .d-flex.justify-content-between {
        margin-bottom: 0;
    }
    
    /* Otimizar espaçamento em formulários compactos */
    .form-control-sm,
    .form-select-sm {
        padding: 0.35rem 0.6rem;
        font-size: 0.8rem;
    }
    
    /* Compactar espaçamento em badges de status */
    .badge.bg-warning,
    .badge.bg-success,
    .badge.bg-danger {
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
    }
    
    /* Reduzir espaçamento em ícones dentro de cards */
    .card-body i[style*="font-size"] {
        margin-right: 0.5rem;
    }
    
    /* Otimizar espaçamento em cards de dashboard */
    .card.shadow-sm.border-0 {
        margin-bottom: 0.75rem;
    }
    
    /* Compactar espaçamento em seções de filtros */
    .card.shadow-sm.border-0 .card-body {
        padding: 0.75rem 1rem !important;
    }
    
    /* Reduzir espaçamento em elementos de texto com mb-0 */
    .text-sm.mb-0 {
        margin-bottom: 0 !important;
    }
    
    /* Otimizar espaçamento em cards de resumo de pedidos */
    .col-lg-3 .h6.mb-3 {
        margin-bottom: 0.75rem !important;
    }
    
    /* Compactar espaçamento em elementos flex com justify-content-between */
    .d-flex.justify-content-between.mt-4 {
        margin-top: 1rem !important;
    }
    
    /* Reduzir espaçamento em cards de detalhes */
    .card.my-5 {
        margin-top: 1.5rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    /* Otimizar espaçamento em rows com mb-lg-5 */
    .row.mb-lg-5 {
        margin-bottom: 1.5rem !important;
    }
    
    /* ============================================
       OTIMIZAÇÕES PARA ESTILOS INLINE ESPECÍFICOS
       ============================================ */
    
    /* Sobrescrever padding inline em card-body */
    .card-body[style*="padding: 15px"] {
        padding: 0.75rem 1rem !important;
    }
    
    .card-body[style*="padding:0.75rem"] {
        padding: 0.75rem 1rem !important;
    }
    
    /* Sobrescrever min-height inline em cards */
    .card[style*="min-height: 110px"] {
        min-height: auto !important;
    }
    
    /* Otimizar padding inline em botões */
    .btn[style*="padding: 0.4rem"] {
        padding: 0.4rem 0.75rem !important;
    }
    
    /* Reduzir font-size inline em botões pequenos */
    .btn-sm[style*="font-size: 0.875rem"] {
        font-size: 0.875rem !important;
    }
    
    /* Otimizar espaçamento em badges com padding inline */
    .badge[style*="border-radius:18px"] {
        padding: 0.35rem 0.6rem !important;
    }
    
    /* Compactar cards de catálogo */
    .catalog-status-grid {
        gap: 0.5rem;
    }
    
    .catalog-status-item {
        padding: 0.4rem 0.6rem;
        margin-bottom: 0.25rem;
    }
    
    /* Otimizar espaçamento em formulários de catálogo */
    .catalog-filters .row > div {
        margin-bottom: 0.5rem;
    }
    
    /* Reduzir espaçamento em cards de métricas de catálogo */
    .card.shadow-sm.border-0.h-100 .card-body.p-3 {
        padding: 0.75rem 1rem !important;
    }
    
    /* Compactar espaçamento em badges de porcentagem */
    .badge.bg-light.text-muted.text-xxs {
        padding: 0.25rem 0.4rem;
        font-size: 0.7rem;
    }
    
    /* Otimizar espaçamento em headers com flex */
    .d-flex.justify-content-between.align-items-center.mb-2 {
        margin-bottom: 0.75rem !important;
    }
    
    /* Reduzir espaçamento em cards de filtros de catálogo */
    .card.shadow-sm.border-0.mb-3 {
        margin-bottom: 1rem !important;
    }
    
    .card.shadow-sm.border-0.mb-3 .card-body {
        padding: 0.75rem 1rem !important;
    }
    
    /* Compactar espaçamento em cards de resumo */
    .card-body.pb-1 {
        padding-bottom: 0.5rem !important;
    }
    
    /* Otimizar espaçamento em grids de status */
    .catalog-status-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }
    
    /* Reduzir espaçamento em elementos de texto com estilo inline */
    h2[style*="color:#1f2933"] {
        margin-bottom: 0.5rem;
    }
    
    h4[style*="color:#1f2933"] {
        margin-bottom: 0.25rem;
    }
    
    /* Compactar espaçamento em cards de boost */
    .boost-item {
        padding: 0.4rem 0.6rem;
        margin-bottom: 0.25rem;
    }
    
    /* Otimizar espaçamento em tabelas de catálogo */
    .catalog-table .table th,
    .catalog-table .table td {
        padding: 0.5rem 0.75rem !important;
    }
    
    /* Reduzir espaçamento em cards de competição */
    .competition-card {
        padding: 0.75rem 1rem !important;
        margin-bottom: 0.75rem;
    }
    
    /* Compactar espaçamento em elementos de ação */
    .action-buttons {
        gap: 0.5rem;
    }
    
    /* Otimizar espaçamento em modais de detalhes */
    .modal-dialog .card-body {
        padding: 0.75rem 1rem !important;
    }
    
    /* Reduzir espaçamento em seções de resumo */
    .summary-section {
        margin-bottom: 0.75rem;
    }
    
    /* Compactar espaçamento em elementos de timeline */
    .timeline-item {
        padding: 0.5rem 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    /* Otimizar espaçamento em cards de status com ícones */
    .status-card .card-body {
        padding: 0.75rem 1rem !important;
    }
    
    /* Reduzir espaçamento em grupos de filtros avançados */
    .advanced-filters .row {
        margin-bottom: 0.5rem;
    }
    
    /* Compactar espaçamento em cards de métricas com badges */
    .metric-card-with-badge {
        padding: 0.75rem 1rem !important;
    }
    
    /* Otimizar espaçamento em elementos de comparação */
    .comparison-item {
        padding: 0.5rem 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    /* Reduzir espaçamento em cards de gráficos */
    .chart-card .card-body {
        padding: 0.75rem 1rem !important;
    }
    
    /* Compactar espaçamento em elementos de lista */
    .list-item {
        padding: 0.5rem 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    /* Otimizar espaçamento em cards de detalhes expandidos */
    .expanded-details {
        padding: 0.75rem 1rem !important;
        margin-top: 0.5rem;
    }
    
    /* Reduzir espaçamento em seções de ações rápidas */
    .quick-actions {
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }
    
    /* Compactar espaçamento em elementos de feedback */
    .feedback-item {
        padding: 0.5rem 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    /* Otimizar espaçamento em cards de histórico */
    .history-card {
        padding: 0.75rem 1rem !important;
        margin-bottom: 0.75rem;
    }
    
    /* Reduzir espaçamento em elementos de navegação secundária */
    .secondary-nav {
        margin-bottom: 0.75rem;
        padding: 0.5rem 0;
    }
    
    /* Compactar espaçamento em cards de informações adicionais */
    .info-card {
        padding: 0.75rem 1rem !important;
        margin-bottom: 0.75rem;
    }
    
    /* Otimizar espaçamento em elementos de tooltip */
    .tooltip-wrapper {
        margin: 0.25rem;
    }
    
    /* Reduzir espaçamento em cards de alertas */
    .alert-card {
        padding: 0.75rem 1rem !important;
        margin-bottom: 0.75rem;
    }
    
    /* Compactar espaçamento em elementos de progresso */
    .progress-item {
        margin-bottom: 0.5rem;
    }
    
    /* Otimizar espaçamento em cards de estatísticas resumidas */
    .stats-summary {
        padding: 0.75rem 1rem !important;
    }
    
    /* Reduzir espaçamento em elementos de filtro avançado */
    .filter-advanced {
        padding: 0.75rem 1rem !important;
        margin-bottom: 0.75rem;
    }
    
    /* ============================================
       FILTROS DE PEDIDOS - TODOS OS FILTROS EM UMA LINHA
       ============================================ */
    
    /* Forçar todos os 6 filtros em uma linha no desktop */
    form.pedidos-filters.row {
        margin-bottom: 0.5rem !important;
    }
    
    /* Todos os filtros (exceto botões) em uma linha */
    form.pedidos-filters.row > div:not(.pedidos-actions) {
        flex: 0 0 auto !important;
        width: auto !important;
        max-width: none !important;
        min-width: 0;
        margin-bottom: 0 !important;
    }
    
    /* Larguras específicas para cada filtro - Produto, SKU, Order ID, Marca */
    form.pedidos-filters.row > div.col-12.col-md-6.col-xl-2:not(.pedidos-actions) {
        flex: 0 0 calc(16.666% - 0.5rem) !important;
        width: calc(16.666% - 0.5rem) !important;
    }
    
    /* Status - menor largura */
    form.pedidos-filters.row > div.col-6.col-md-4.col-xl-1:not(.pedidos-actions) {
        flex: 0 0 calc(10% - 0.5rem) !important;
        width: calc(10% - 0.5rem) !important;
    }
    
    /* Marketplace - mesma largura dos outros */
    form.pedidos-filters.row > div.col-6.col-md-4.col-xl-2:not(.pedidos-actions) {
        flex: 0 0 calc(16.666% - 0.5rem) !important;
        width: calc(16.666% - 0.5rem) !important;
    }
    
    /* Reduzir tamanho dos inputs e selects de todos os campos */
    form.pedidos-filters.row > div .form-control,
    form.pedidos-filters.row > div .form-select {
        font-size: 0.8rem !important;
        padding: 0.35rem 0.6rem !important;
        min-height: 36px;
    }
    
    /* Reduzir tamanho dos labels de todos os campos */
    form.pedidos-filters.row > div .form-label {
        font-size: 0.75rem !important;
        margin-bottom: 0.2rem !important;
        line-height: 1.2;
    }
    
    /* Ajustar gap entre os campos para ficarem mais próximos */
    form.pedidos-filters.row.g-3 > div:not(.pedidos-actions) {
        padding-left: 0.375rem !important;
        padding-right: 0.375rem !important;
    }
    
    /* Mover botões para linha separada abaixo */
    form.pedidos-filters.row > div.pedidos-actions {
        flex: 0 0 100% !important;
        width: 100% !important;
        margin-top: 0.5rem !important;
        margin-bottom: 0 !important;
        padding-left: 0.375rem !important;
        padding-right: 0.375rem !important;
    }
    
    /* Ajustar botões para ficarem em linha */
    form.pedidos-filters.row > div.pedidos-actions {
        display: flex !important;
        flex-direction: row !important;
        gap: 0.5rem !important;
        justify-content: flex-start !important;
    }
    
    form.pedidos-filters.row > div.pedidos-actions .btn {
        flex: 0 0 auto !important;
        min-width: 120px;
    }
    
    /* ============================================
       PADRÃO DE COR DOS HEADERS DE TABELAS
       Aplicar estilo da tabela de ranking do dashboard em todas as tabelas
       ============================================ */
    
    /* Aplicar estilo padrão em todos os headers de tabelas - usando cinza mais claro */
    .table thead th,
    table thead th,
    thead th {
        background-color: #6B6B6D !important;
        background-image: none !important;
        color: #ffffff !important;
        font-weight: 600 !important;
        font-size: 0.75rem !important;
        border-bottom: 2px solid #246973 !important;
        vertical-align: middle !important;
        padding: 0.6rem 0.75rem !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        border-right: 1px solid rgba(255, 255, 255, 0.15) !important;
    }
    
    .table thead th:last-child,
    table thead th:last-child,
    thead th:last-child {
        border-right: none !important;
    }
    
    /* Hover state nos headers */
    .table thead th:hover,
    table thead th:hover,
    thead th:hover {
        background-color: #5A5A5C !important;
    }
    
    /* Headers ordenáveis (sortable) */
    .table thead th.sortable,
    table thead th.sortable,
    thead th.sortable {
        cursor: pointer;
        position: relative;
        transition: all 0.3s ease;
    }
    
    .table thead th.sortable:hover,
    table thead th.sortable:hover,
    thead th.sortable:hover {
        background-color: #495057 !important;
        border-left: 2px solid #ffffff;
    }
    
    /* Ícones de ordenação nos headers */
    .table thead th.sortable i,
    table thead th.sortable i,
    thead th.sortable i {
        margin-left: 0.5rem;
        font-size: 0.875rem;
        font-weight: bold;
        color: #ffffff !important;
        opacity: 0.8;
    }
    
    .table thead th.sortable:hover i,
    table thead th.sortable:hover i,
    thead th.sortable:hover i {
        color: #ffffff !important;
        opacity: 1;
    }
    
    /* Ícones de ordenação ativos (verde) */
    .table thead th.sortable i.fa-sort-up,
    .table thead th.sortable i.fa-sort-down,
    table thead th.sortable i.fa-sort-up,
    table thead th.sortable i.fa-sort-down,
    thead th.sortable i.fa-sort-up,
    thead th.sortable i.fa-sort-down {
        color: #28a745 !important;
        opacity: 1;
        font-weight: bold;
    }
    
    /* Sobrescrever classes Bootstrap que possam interferir */
    .table-dark thead th,
    .table-dark th {
        background-color: #6B6B6D !important;
        color: #ffffff !important;
    }
    
    /* Garantir que headers com classes específicas também recebam o estilo */
    .table thead.table-dark th,
    table thead.table-dark th {
        background-color: #6B6B6D !important;
        color: #ffffff !important;
        border-bottom: 2px solid #246973 !important;
    }
    
    /* Headers de tabelas dentro de cards */
    .card .table thead th,
    .card table thead th {
        background-color: #6B6B6D !important;
        color: #ffffff !important;
    }
    
    /* Headers de tabelas responsivas */
    .table-responsive .table thead th,
    .table-responsive table thead th {
        background-color: #6B6B6D !important;
        color: #ffffff !important;
    }
    
    /* Garantir contraste em headers com texto */
    .table thead th *,
    table thead th *,
    thead th * {
        color: #ffffff !important;
    }
    
    /* Exceção: manter estilo original da tabela de ranking se já tiver estilo específico */
    #refactored-top-vendas-thead th,
    #top-vendas-table thead th {
        background-color: #6B6B6D !important;
        color: #ffffff !important;
    }
    
    /* Reduzir espaçamento vertical entre linhas da tabela de ranking */
    #refactored-top-vendas-table tbody td {
        padding-top: 0.4rem !important;
        padding-bottom: 0.4rem !important;
    }
    
    #refactored-top-vendas-table tbody tr {
        line-height: 1.3 !important;
    }
    
    /* Ajustar espaçamento interno do conteúdo das células */
    #refactored-top-vendas-table tbody td .d-flex {
        gap: 0.25rem !important;
    }
    
    #refactored-top-vendas-table tbody td .lh-sm {
        line-height: 1.2 !important;
    }
    
    #refactored-top-vendas-table tbody td small {
        margin-top: 0.1rem !important;
    }
    
    /* ============================================
       MELHORIAS NO PAINEL DE FILTROS DE PEDIDOS
       ============================================ */
    
    /* Card de filtros melhorado - mais sutil */
    .card.shadow-sm.border-1.mb-2.p-2 {
        border: 1px solid #e3e8ef !important;
        border-radius: 0.5rem !important;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06) !important;
        background: #ffffff;
    }
    
    /* Seção de contador e alertas - mais sutil */
    .card.shadow-sm.border-1.mb-2.p-2 .row.mb-2 {
        background: #f8f9fa;
        padding: 0.75rem 1rem;
        border-radius: 0.375rem;
        margin-bottom: 0.75rem !important;
        border: 1px solid #e9ecef;
    }
    
    /* Contador de pedidos melhorado */
    .card.shadow-sm.border-1.mb-2.p-2 .d-flex.align-items-center i.fa-shopping-cart {
        font-size: 1rem;
        color: #5e72e4;
    }
    
    .card.shadow-sm.border-1.mb-2.p-2 .fw-bold.text-dark {
        font-size: 0.9rem;
        font-weight: 600;
        color: #495057;
    }
    
    .card.shadow-sm.border-1.mb-2.p-2 .badge.bg-primary.fs-6 {
        font-size: 0.85rem !important;
        padding: 0.35rem 0.6rem;
        border-radius: 0.375rem;
        font-weight: 600;
    }
    
    /* Botões de alerta melhorados - mais conservadores */
    .alert-compact-btn {
        border-radius: 0.375rem !important;
        padding: 0.35rem 0.65rem !important;
        font-weight: 500 !important;
        transition: transform 0.15s ease, box-shadow 0.15s ease !important;
        border-width: 1px !important;
    }
    
    .alert-compact-btn:hover:not(:disabled) {
        transform: translateY(-1px);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12) !important;
    }
    
    .alert-danger-compact {
        background: #dc3545 !important;
        border-color: #dc3545 !important;
        color: #ffffff !important;
    }
    
    .alert-danger-compact:hover:not(:disabled) {
        background: #c82333 !important;
    }
    
    .alert-warning-compact {
        background: #ffc107 !important;
        border-color: #ffc107 !important;
        color: #212529 !important;
    }
    
    .alert-warning-compact:hover:not(:disabled) {
        background: #e0a800 !important;
    }
    
    .alert-disabled-compact {
        background: #e9ecef !important;
        border-color: #dee2e6 !important;
        color: #6c757d !important;
        cursor: not-allowed !important;
    }
    
    .alert-compact-btn .badge {
        background: rgba(255, 255, 255, 0.25) !important;
        color: inherit !important;
        padding: 0.15rem 0.4rem !important;
        border-radius: 0.25rem !important;
        font-weight: 700 !important;
    }
    
    /* Botão de execuções melhorado */
    .card.shadow-sm.border-1.mb-2.p-2 .btn-outline-info {
        border-width: 1px;
        border-radius: 0.375rem;
        transition: transform 0.15s ease, box-shadow 0.15s ease;
    }
    
    .card.shadow-sm.border-1.mb-2.p-2 .btn-outline-info:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 6px rgba(13, 202, 240, 0.2);
    }
    
    /* Formulário de filtros melhorado - mais sutil */
    form.pedidos-filters {
        background: #f8f9fa;
        padding: 0.75rem;
        border-radius: 0.375rem;
        border: 1px solid #e9ecef;
        margin-bottom: 0.5rem !important;
    }
    
    /* Labels dos filtros melhorados */
    form.pedidos-filters .form-label {
        font-size: 0.75rem !important;
        font-weight: 600 !important;
        color: #495057 !important;
        margin-bottom: 0.3rem !important;
        text-transform: uppercase;
        letter-spacing: 0.2px;
    }
    
    /* Inputs e selects melhorados */
    form.pedidos-filters .form-control,
    form.pedidos-filters .form-select {
        border: 1px solid #dee2e6 !important;
        border-radius: 0.375rem !important;
        transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
        background: #ffffff !important;
    }
    
    form.pedidos-filters .form-control:focus,
    form.pedidos-filters .form-select:focus {
        border-color: #5e72e4 !important;
        box-shadow: 0 0 0 0.15rem rgba(94, 114, 228, 0.12) !important;
        background: #ffffff !important;
    }
    
    form.pedidos-filters .form-control:hover:not(:focus),
    form.pedidos-filters .form-select:hover:not(:focus) {
        border-color: #adb5bd;
    }
    
    /* Botões de ação melhorados */
    .pedidos-actions .btn {
        border-radius: 0.375rem !important;
        font-weight: 500 !important;
        transition: transform 0.15s ease, box-shadow 0.15s ease !important;
        border-width: 1px !important;
        padding: 0.4rem 0.7rem !important;
    }
    
    .pedidos-actions .btn-primary {
        background: #5e72e4 !important;
        border-color: #5e72e4 !important;
        box-shadow: 0 1px 3px rgba(94, 114, 228, 0.25) !important;
    }
    
    .pedidos-actions .btn-primary:hover {
        background: #4c63d2 !important;
        transform: translateY(-1px);
        box-shadow: 0 3px 6px rgba(94, 114, 228, 0.35) !important;
    }
    
    .pedidos-actions .btn-secondary {
        background: #6c757d !important;
        border-color: #6c757d !important;
        color: #ffffff !important;
        box-shadow: 0 1px 3px rgba(108, 117, 125, 0.25) !important;
    }
    
    .pedidos-actions .btn-secondary:hover {
        background: #5a6268 !important;
        transform: translateY(-1px);
        box-shadow: 0 3px 6px rgba(108, 117, 125, 0.35) !important;
    }
    
    .pedidos-actions .btn-outline-primary:hover {
        background: #5e72e4 !important;
        border-color: #5e72e4 !important;
        color: #ffffff !important;
        transform: translateY(-1px);
        box-shadow: 0 3px 6px rgba(94, 114, 228, 0.3) !important;
    }
    
    .pedidos-actions .btn-outline-secondary:hover {
        background: #6c757d !important;
        border-color: #6c757d !important;
        color: #ffffff !important;
        transform: translateY(-1px);
        box-shadow: 0 3px 6px rgba(108, 117, 125, 0.3) !important;
    }
    
    /* Melhorar grupo de botões de ação */
    .pedidos-actions {
        gap: 0.5rem !important;
    }
    
    .pedidos-actions .btn {
        flex: 1;
        min-width: 0;
    }
    
    /* Melhorar contraste e legibilidade */
    form.pedidos-filters .form-control::placeholder {
        color: #adb5bd;
        opacity: 0.7;
    }
    
    /* ============================================
       FILTROS DE INVOICES - COMPACTO PARA DESKTOP
       ============================================ */
    
    /* Reduzir espaçamento geral do form */
    form.invoices-filters {
        margin-bottom: 0.5rem !important;
    }
    
    /* Reduzir tamanho dos labels */
    form.invoices-filters .form-label {
        font-size: 0.7rem !important;
        margin-bottom: 0.25rem !important;
        font-weight: 600;
        line-height: 1.2;
    }
    
    /* Reduzir tamanho e padding dos inputs e selects */
    form.invoices-filters .form-control,
    form.invoices-filters .form-select {
        font-size: 0.75rem !important;
        padding: 0.3rem 0.5rem !important;
        min-height: 32px !important;
        border-radius: 0.375rem;
    }
    
    /* Ajustar larguras para mais filtros por linha */
    form.invoices-filters > div.col-12.col-md-6.col-lg-2 {
        flex: 0 0 calc(12.5% - 0.5rem) !important;
        width: calc(12.5% - 0.5rem) !important;
        max-width: calc(12.5% - 0.5rem) !important;
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
        margin-bottom: 0.4rem !important;
    }
    
    /* Campos de data - mesma largura */
    form.invoices-filters > div.col-6.col-md-3.col-lg-2 {
        flex: 0 0 calc(12.5% - 0.5rem) !important;
        width: calc(12.5% - 0.5rem) !important;
        max-width: calc(12.5% - 0.5rem) !important;
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
        margin-bottom: 0.4rem !important;
    }
    
    /* Botão Filtrar e Por página - menores e mais compactos */
    /* Usando nth-last-child para pegar os últimos dois elementos */
    form.invoices-filters > div.col-12.col-md-6.col-lg-2:nth-last-child(2),
    form.invoices-filters > div.col-12.col-md-6.col-lg-2:nth-last-child(1) {
        flex: 0 0 calc(8% - 0.5rem) !important;
        width: calc(8% - 0.5rem) !important;
        max-width: calc(8% - 0.5rem) !important;
    }
    
    /* Botão Filtrar específico - menor */
    form.invoices-filters button.btn-primary {
        font-size: 0.75rem !important;
        padding: 0.3rem 0.6rem !important;
        height: 32px !important;
        font-weight: 500;
        width: 100%;
    }
    
    /* Select Por página - menor */
    form.invoices-filters select[name="per_page"] {
        font-size: 0.75rem !important;
        padding: 0.3rem 0.5rem !important;
        min-height: 32px !important;
    }
    
    /* Label vazio do botão Filtrar - ocultar espaço */
    form.invoices-filters > div.col-12.col-md-6.col-lg-2:nth-last-child(1) .form-label {
        display: none;
    }
    
    /* Reduzir gap entre elementos */
    form.invoices-filters.row.g-2 {
        --bs-gutter-x: 0.5rem;
        --bs-gutter-y: 0.4rem;
    }
    
    /* Ajustar placeholder */
    form.invoices-filters .form-control::placeholder {
        font-size: 0.7rem;
        color: #adb5bd;
        opacity: 0.7;
    }
    
    /* ============================================
       CARDS DE RETIRADAS - 7 CARDS EM UMA LINHA
       ============================================ */
    
    /* Forçar todos os 7 cards em uma linha ocupando 100% da largura */
    .retiradas-index .row.mb-3.g-1 {
        margin-left: 0 !important;
        margin-right: 0 !important;
        --bs-gutter-x: 0;
        width: 100% !important;
    }
    
    .retiradas-index .row.mb-3.g-1 > div,
    .retiradas-index .row.mb-3.g-1 > div[class*="col-lg"],
    .retiradas-index .row.mb-3.g-1 > div[class*="col-md"],
    .retiradas-index .row.mb-3.g-1 > div[class*="col-sm"] {
        flex: 0 0 calc((100% - 1.5rem) / 7) !important;
        width: calc((100% - 1.5rem) / 7) !important;
        max-width: calc((100% - 1.5rem) / 7) !important;
        margin-bottom: 0.5rem !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-right: 0.25rem !important;
    }
    
    /* Remover margin-right do último card */
    .retiradas-index .row.mb-3.g-1 > div:last-child {
        margin-right: 0 !important;
    }
    
    /* Compactar conteúdo dos cards */
    .retiradas-index .card.shadow-sm.border-0 .card-body.p-3 {
        padding: 0.75rem 0.5rem !important;
    }
    
    /* Reduzir tamanho dos ícones - sobrescrever estilos inline */
    .retiradas-index .card .fas[class*="fa-"],
    .retiradas-index .card i[style*="font-size"],
    .retiradas-index .card i[style*="font-size: 1.5rem"],
    .retiradas-index .card i[style*="font-size: 1.2rem"] {
        font-size: 1rem !important;
    }
    
    /* Reduzir tamanho específico dos ícones maiores */
    .retiradas-index .card .fas.fa-file-invoice,
    .retiradas-index .card .fas.fa-dollar-sign,
    .retiradas-index .card .fas.fa-boxes {
        font-size: 1.1rem !important;
    }
    
    /* Reduzir tamanho dos textos */
    .retiradas-index .card .text-sm {
        font-size: 0.7rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    .retiradas-index .card h5,
    .retiradas-index .card h6 {
        font-size: 0.9rem !important;
        margin-bottom: 0 !important;
    }
    
    /* Reduzir tamanho dos badges */
    .retiradas-index .card .badge {
        font-size: 0.65rem !important;
        padding: 0.2rem 0.4rem !important;
    }
    
    /* Reduzir espaçamento interno dos cards */
    .retiradas-index .card .d-flex.align-items-center {
        gap: 0.5rem !important;
    }
    
    .retiradas-index .card .me-3,
    .retiradas-index .card .me-2 {
        margin-right: 0.5rem !important;
    }
    
    /* ============================================
       FILTROS DE RETIRADAS - COMPACTO PARA DESKTOP
       ============================================ */
    
    /* Ocultar botões Hoje/Amanhã dentro do campo Entrega Prevista no desktop */
    .retiradas-index form.retiradas-filters.row .retiradas-date-buttons {
        display: none !important;
    }
    
    /* Ocultar coluna de botões Buscar/Limpar dentro do form no desktop */
    .retiradas-index form.retiradas-filters.row .filtros-retiradas-actions {
        display: none !important;
    }
    
    /* Colocar todos os filtros em uma linha */
    .retiradas-index form.retiradas-filters.row > div:not(.filtros-retiradas-actions) {
        flex: 0 0 auto !important;
        width: auto !important;
        max-width: none !important;
        margin-bottom: 0 !important;
    }
    
    /* Larguras específicas para cada filtro */
    .retiradas-index form.retiradas-filters.row > div.col-12.col-md-6.col-xl-3:nth-of-type(1),
    .retiradas-index form.retiradas-filters.row > div.col-12.col-md-6.col-xl-3:nth-of-type(2) {
        flex: 0 0 calc(23% - 0.5rem) !important;
        width: calc(23% - 0.5rem) !important;
    }
    
    .retiradas-index form.retiradas-filters.row > div.col-6.col-md-4.col-xl-2:nth-of-type(3),
    .retiradas-index form.retiradas-filters.row > div.col-6.col-md-4.col-xl-2:nth-of-type(4) {
        flex: 0 0 calc(15% - 0.5rem) !important;
        width: calc(15% - 0.5rem) !important;
    }
    
    /* Remover margin-bottom do campo Entrega Prevista */
    .retiradas-index form.retiradas-filters.row > div.col-6.col-md-4.col-xl-2:nth-of-type(4) .form-control {
        margin-bottom: 0 !important;
    }
    
    /* Compactar texto pequeno abaixo dos campos */
    .retiradas-index form.retiradas-filters.row small.text-muted {
        font-size: 0.65rem !important;
        line-height: 1.2;
        margin-top: 0.15rem !important;
        display: block;
    }
    
    /* Estilizar linha de botões separada */
    .retiradas-index .retiradas-buttons-row {
        display: flex !important;
        gap: 0.5rem;
        margin-top: 0.5rem;
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }
    
    .retiradas-index .retiradas-buttons-row .btn {
        font-size: 0.75rem !important;
        padding: 0.3rem 0.6rem !important;
        min-height: 32px !important;
    }
    
    /* ============================================
       CARDS DE CONTROLE DE RETIRADAS - 4 CARDS EM UMA LINHA
       Aplicado APENAS em desktop (>1024px) - NÃO afeta mobile
       ============================================ */
    
    /* Ajustar row para ocupar toda a largura */
    .controle-retiradas-index .row.mb-3 {
        margin-left: 0 !important;
        margin-right: 0 !important;
        --bs-gutter-x: 0;
        width: 100% !important;
    }
    
    /* Forçar todos os 4 cards em uma linha ocupando 100% da largura */
    /* Seletor específico para garantir que só afete desktop */
    .controle-retiradas-index .row.mb-3 > div.col-lg-3.col-md-6 {
        flex: 0 0 calc((100% - 0.45rem) / 4) !important;
        width: calc((100% - 0.45rem) / 4) !important;
        max-width: calc((100% - 0.45rem) / 4) !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-right: 0.15rem !important;
    }
    
    /* Remover margin-right do último card */
    .controle-retiradas-index .row.mb-3 > div.col-lg-3.col-md-6:last-child {
        margin-right: 0 !important;
    }
    
    /* Compactar card de filtros */
    .controle-retiradas-index .card.shadow-sm.border-0.mb-3 .card-body.p-3 {
        padding: 0.5rem 0.75rem !important;
    }
    
    /* Reduzir espaçamento entre filtros e botões */
    .controle-retiradas-index form.controle-retiradas-filters.row {
        margin-bottom: 0.25rem !important;
    }
    
    /* Reduzir espaçamento entre elementos do form */
    .controle-retiradas-index form.controle-retiradas-filters.row.g-2 {
        --bs-gutter-y: 0.25rem;
        --bs-gutter-x: 0.5rem;
    }
    
    /* Reduzir margin-bottom dos campos */
    .controle-retiradas-index form.controle-retiradas-filters.row > div {
        margin-bottom: 0.25rem !important;
    }
    
    /* Compactar labels */
    .controle-retiradas-index form.controle-retiradas-filters .form-label {
        margin-bottom: 0.15rem !important;
        font-size: 0.7rem !important;
    }
    
    /* Compactar inputs e selects */
    .controle-retiradas-index form.controle-retiradas-filters .form-control,
    .controle-retiradas-index form.controle-retiradas-filters .form-select {
        padding: 0.25rem 0.5rem !important;
        font-size: 0.75rem !important;
        min-height: 30px !important;
    }
    
    /* Compactar botões */
    .controle-retiradas-index form.controle-retiradas-filters .btn {
        padding: 0.25rem 0.5rem !important;
        font-size: 0.75rem !important;
        min-height: 30px !important;
    }
    
    /* Compactar conteúdo dos cards - apenas desktop */
    .controle-retiradas-index .row.mb-3 > div.col-lg-3.col-md-6 .card.shadow-sm.border-0 .card-body.p-3 {
        padding: 0.75rem 0.5rem !important;
    }
    
    /* ============================================
       FILTROS DE REBATES - TODOS EM UMA LINHA
       ============================================ */
    
    /* Ocultar botões dentro do form no desktop */
    .rebates-filters .rebates-actions {
        display: none !important;
    }
    
    /* Colocar todos os filtros em uma linha */
    .rebates-filters .row.g-3 > div:not(.rebates-actions) {
        flex: 0 0 auto !important;
        width: auto !important;
        max-width: none !important;
        margin-bottom: 0 !important;
    }
    
    /* Larguras específicas para cada filtro */
    /* Nome */
    .rebates-filters .row.g-3 > div.col-12.col-md-6.col-xl-3:not(.rebates-actions) {
        flex: 0 0 calc(18% - 0.5rem) !important;
        width: calc(18% - 0.5rem) !important;
    }
    
    /* Status e Aplicação */
    .rebates-filters .row.g-3 > div.col-6.col-md-3.col-xl-2:not(.rebates-actions) {
        flex: 0 0 calc(14% - 0.5rem) !important;
        width: calc(14% - 0.5rem) !important;
    }
    
    /* Tipo Rebate */
    .rebates-filters .row.g-3 > div.col-12.col-md-6.col-xl-2:not(.rebates-actions) {
        flex: 0 0 calc(14% - 0.5rem) !important;
        width: calc(14% - 0.5rem) !important;
    }
    
    /* Data Início e Data Fim */
    .rebates-filters .row.g-3 > div.col-6.col-md-3.col-xl-1:not(.rebates-actions) {
        flex: 0 0 calc(10% - 0.5rem) !important;
        width: calc(10% - 0.5rem) !important;
    }
    
    /* Reduzir gaps */
    .rebates-filters .row.g-3 {
        --bs-gutter-x: 0.5rem;
        --bs-gutter-y: 0.25rem;
        margin-bottom: 0.5rem !important;
    }
    
    /* Criar linha separada para botões */
    .rebates-filters::after {
        content: '';
        display: block;
        width: 100%;
        clear: both;
        margin-top: 0.5rem;
    }
    
    /* Linha de botões separada */
    .rebates-buttons-row {
        display: flex !important;
        gap: 0.5rem;
        margin-top: 0.5rem;
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }
    
    .rebates-buttons-row .btn {
        font-size: 0.75rem !important;
        padding: 0.3rem 0.6rem !important;
        min-height: 32px !important;
    }
    
    /* Reduzir tamanho dos ícones - apenas desktop */
    .controle-retiradas-index .row.mb-3 > div.col-lg-3.col-md-6 .card i[style*="font-size: 1.5rem"] {
        font-size: 1.2rem !important;
    }
    
    /* Reduzir tamanho dos textos - apenas desktop */
    .controle-retiradas-index .row.mb-3 > div.col-lg-3.col-md-6 .card .text-sm {
        font-size: 0.7rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    .controle-retiradas-index .row.mb-3 > div.col-lg-3.col-md-6 .card h5 {
        font-size: 0.9rem !important;
        margin-bottom: 0 !important;
    }
    
    /* Reduzir espaçamento interno dos cards - apenas desktop */
    .controle-retiradas-index .row.mb-3 > div.col-lg-3.col-md-6 .card .d-flex.align-items-center {
        gap: 0.5rem !important;
    }
    
    .controle-retiradas-index .row.mb-3 > div.col-lg-3.col-md-6 .card .me-3 {
        margin-right: 0.5rem !important;
    }
    
    /* ============================================
       PÁGINA DE ENVIOS FBA - 4 CARDS NA MESMA LINHA
       ============================================ */
    
    .fba-metrics-cards {
        --bs-gutter-x: 0 !important;
        --bs-gutter-y: 0 !important;
        display: flex !important;
        flex-wrap: nowrap !important;
    }
    
    .fba-metrics-cards > div {
        flex: 1 1 0 !important;
        max-width: 25% !important;
        width: 25% !important;
        margin-right: 0.25rem !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    .fba-metrics-cards > div:last-child {
        margin-right: 0 !important;
    }
    
    /* Reduzir padding interno dos cards FBA */
    .fba-metrics-cards .card-body {
        padding: 0.75rem 1rem !important;
    }
    
    /* Reduzir tamanho dos ícones nos cards FBA */
    .fba-metrics-cards .fa-2x {
        font-size: 1.5rem !important;
    }
    
    /* Reduzir tamanho dos textos nos cards FBA */
    .fba-metrics-cards .text-xs {
        font-size: 0.7rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    .fba-metrics-cards .h5 {
        font-size: 1.1rem !important;
        margin-bottom: 0 !important;
    }
}

