* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  min-height: 100vh;
  color: #fff;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

/* Header e Logo */
.header {
  text-align: center;
  padding: 30px 0;
  margin-bottom: 30px;
}

.logo {
  font-size: 4rem;
  font-weight: 800;
  color: #ff6b35;
  text-shadow: 0 4px 20px rgba(255, 107, 53, 0.4);
  letter-spacing: -2px;
}

.logo span {
  color: #fff;
}

.subtitle {
  font-size: 1.1rem;
  color: #94a3b8;
  margin-top: 10px;
  font-weight: 400;
}

/* Cards de Estatísticas */
.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 107, 53, 0.3);
  border: 3px dashed #ff6b35;
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.stat-icon {
  font-size: 2.5rem;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #ff6b35;
}

.stat-label {
  font-size: 0.9rem;
  color: #94a3b8;
}

/* Ferramentas de Pesquisa */
.search-container {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 20px;
}

.search-box, .filter-box {
  flex: 1;
  min-width: 250px;
}

.search-box label, .filter-box label {
  display: block;
  font-size: 0.9rem;
  color: #94a3b8;
  margin-bottom: 8px;
  font-weight: 500;
}

.search-box input, .filter-box select {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s ease;
}

.search-box input::placeholder {
  color: #64748b;
}

.search-box input:focus, .filter-box select:focus {
  outline: none;
  border-color: #ff6b35;
  background: rgba(255, 107, 53, 0.1);
}

.filter-box select option {
  background: #1a1a2e;
  color: #fff;
}

.btn-search, .btn-clear {
  padding: 14px 28px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Poppins', sans-serif;
}

.btn-search {
  background: linear-gradient(135deg, #ff6b35, #f7931e);
  color: #fff;
}

.btn-search:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
}

.btn-clear {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-clear:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Botões de Exportação */
.export-container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.export-label {
  color: #94a3b8;
  font-size: 0.95rem;
  font-weight: 500;
}

.btn-export {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: transparent;
  border: 2px solid #ff6b35;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #ff6b35;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Poppins', sans-serif;
}

.btn-export .btn-icon {
  font-size: 1.1rem;
}

.btn-export:hover {
  background: rgba(255, 107, 53, 0.3);
  border-style: dashed;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.btn-excel,
.btn-pdf,
.btn-txt {
  background: transparent;
  color: #ff6b35;
}

.btn-export:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Informação de resultados */
.results-info {
  margin-bottom: 16px;
  padding: 0 8px;
}

.results-info span {
  color: #94a3b8;
  font-size: 0.95rem;
}

/* Tabela */
.table-container {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: rgba(255, 107, 53, 0.2);
}

th {
  padding: 16px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  color: #ff6b35;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid rgba(255, 107, 53, 0.3);
}

td {
  padding: 14px 12px;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
}

tr:hover td {
  background: rgba(255, 107, 53, 0.05);
}

td.loading {
  text-align: center;
  padding: 40px;
  color: #94a3b8;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 107, 53, 0.2);
  border-top-color: #ff6b35;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

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

.cnpj-cell {
  font-family: 'Courier New', monospace;
  font-weight: 600;
  color: #ff6b35;
}

.cidade-cell {
  font-weight: 500;
}

/* Status Simples Nacional */
.simples-sim {
  color: #22c55e;
  font-weight: 600;
  text-align: center;
}

.simples-nao {
  color: #ef4444;
  font-weight: 600;
  text-align: center;
}

.no-data {
  text-align: center;
  padding: 40px;
  color: #94a3b8;
}

/* Paginação */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.page-btn {
  padding: 10px 16px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Poppins', sans-serif;
}

.page-btn:hover:not(.active):not(:disabled) {
  background: rgba(255, 107, 53, 0.2);
  border-color: #ff6b35;
}

.page-btn.active {
  background: linear-gradient(135deg, #ff6b35, #f7931e);
  border-color: #ff6b35;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-info {
  color: #94a3b8;
  font-size: 0.9rem;
  padding: 0 16px;
}

/* Footer */
.footer {
  text-align: center;
  padding: 20px;
  color: #64748b;
  font-size: 0.9rem;
}

.logo-small {
  font-weight: 700;
  color: #ff6b35;
}

.logo-small span {
  color: #fff;
}

/* Responsivo */
@media (max-width: 768px) {
  .logo {
    font-size: 2.5rem;
  }

  .search-container {
    flex-direction: column;
  }

  .search-box, .filter-box {
    width: 100%;
  }

  .btn-search, .btn-clear {
    width: 100%;
  }

  .table-container {
    overflow-x: auto;
  }

  table {
    min-width: 800px;
  }

  th, td {
    padding: 10px 8px;
    font-size: 0.8rem;
  }
}

/* Animações */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.3s ease forwards;
}
