* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
    display: flex; /* Mantido para alinhar menu e conteúdo */
}

/* Ajuste para o container principal */
.main-content {
    margin-left: 250px; /* mesma largura do menu */
    padding: 2rem;
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Container da tabela no topo */
.table-container1 {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 2.5rem;
    margin: 0 auto 2rem auto; /* Margem apenas na base */
    max-width: 1200px;
    width: 100%;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.1),
        0 10px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: fadeInUp 0.8s ease-out;
    order: 1; /* Garante que fique no topo */
}
/* Título principal */
.table-container1 h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 2rem;
    text-align: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.table-container1 h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 2px;
}

/* Container de filtros */
.filters-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    align-items: center;
}

/* Inputs de filtro */
#searchCnpj,
#searchDate {
    flex: 1;
    min-width: 250px;
    padding: 1rem 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

#searchCnpj:focus,
#searchDate:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

#searchCnpj::placeholder {
    color: #a0aec0;
    font-style: italic;
}

/* Estilos da tabela */
.table {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border: none;
    margin-bottom: 0;
}

/* Cabeçalho da tabela */
.thead1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

.thead1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2, #667eea);
}

.thead1 th {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 1.5rem 1rem;
    text-align: center;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border: none;
    position: relative;
}

.thead1 th:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 25%;
    bottom: 25%;
    width: 1px;
    background: rgba(255, 255, 255, 0.2);
}

/* Corpo da tabela */
tbody tr {
    transition: all 0.3s ease;
    border: none;
}

tbody tr:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    transform: scale(1.01);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

tbody td {
    padding: 1.25rem 1rem;
    text-align: center;
    border: none;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 500;
    color: #4a5568;
    position: relative;
}

/* Efeito zebra nas linhas */
tbody tr:nth-child(even) {
    background-color: #f8fafc;
}

tbody tr:nth-child(even):hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
}

/* Mensagem quando não há dados */
.text-center {
    font-style: italic;
    color: #718096;
    font-size: 1.1rem;
    padding: 3rem !important;
}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsividade para tablets */
@media (max-width: 992px) {
    .sidebar {
        width: 220px;
    }
    .main-content {
        margin-left: 220px;
    }
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        min-height: auto;
        position: static;
    }
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    .table-container1 {
        max-width: 100%;
        padding: 1.5rem;
        margin: 1rem auto;
    }
    
    .table-container1 h1 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }
    
    .filters-container {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    #searchCnpj,
    #searchDate {
        min-width: 100%;
        padding: 0.875rem 1.25rem;
    }
    
    .thead1 th {
        padding: 1rem 0.5rem;
        font-size: 0.95rem;
    }
    
    tbody td {
        padding: 1rem 0.5rem;
        font-size: 0.9rem;
    }
}

/* Responsividade para mobile */
@media (max-width: 576px) {
    .table-container1 {
        padding: 1rem;
        border-radius: 12px;
    }
    
    .table-container1 h1 {
        font-size: 1.75rem;
    }
    
    .table {
        border-radius: 10px;
    }
    
    .thead1 th {
        padding: 0.875rem 0.25rem;
        font-size: 0.85rem;
    }
    
    tbody td {
        padding: 0.875rem 0.25rem;
        font-size: 0.8rem;
    }
    
    /* Tabela responsiva horizontal */
    .table-responsive {
        border-radius: 10px;
    }
}

/* Efeitos de hover nos inputs */
#searchCnpj:hover,
#searchDate:hover {
    border-color: #cbd5e0;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

/* Estilo para data placeholder (webkit) */
#searchDate::-webkit-input-placeholder {
    color: #a0aec0;
    font-style: italic;
}

#searchDate::-moz-placeholder {
    color: #a0aec0;
    font-style: italic;
}

/* Loading state para filtros */
.filters-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: translateX(-100%);
    animation: shimmer 1.5s infinite;
    pointer-events: none;
    opacity: 0;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Melhorias na acessibilidade */
.table th,
.table td {
    vertical-align: middle;
}

/* Foco visível para navegação por teclado */
.table th:focus,
.table td:focus,
#searchCnpj:focus,
#searchDate:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Estado vazio melhorado */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #718096;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    .table-container1 {
        margin-top: 0;
        padding: 1.5rem;
    }
}