body {
  font-family: 'Segoe UI', sans-serif;
  background: #0f1115;
  color: #e2e8f0;
  padding: 40px 20px;
  margin: 0;
  transition: background 0.3s ease, color 0.3s ease;
}

h1 {
  text-align: center;
  font-size: 30px;
  margin-bottom: 30px;
  color: #fefefe;
}

.controls {
  max-width: 1200px;
  margin: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding: 0 10px 30px;
  align-items: center;
}

#searchInput {
  padding: 10px;
  font-size: 14px;
  border-radius: 8px;
  border: none;
  width: 250px;
  background: #1c1f26;
  color: white;
}

.filters button {
  margin-right: 10px;
  padding: 10px 14px;
  font-size: 13px;
  border: none;
  border-radius: 20px;
  background: #1c1f26;
  color: #e2e8f0;
  cursor: pointer;
}

.filters button.active,
.filters button:hover {
  background: #4c8bfa;
  color: white;
}

.section {
  margin-bottom: 50px;
}

.section h2 {
  font-size: 18px;
  padding: 0 10px;
  color: #cbd5e1;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section h2 .toggle {
  font-size: 14px;
  color: #7c8794;
  background: #1c1f26;
  border-radius: 4px;
  padding: 2px 6px;
  border: 1px solid #2a2f3b;
}.section h2 {
  font-size: 18px;
  margin: 0 0 20px;
  color: #cbd5e1;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  padding-left: 10px;
  max-width: 1200px;
  margin-inline: auto;
}

.arrow {
  display: inline-block;
  transition: transform 0.3s ease;
  font-size: 14px;
  color: #8a8f99;
}

.toggle {
  font-size: 14px;
  font-weight: normal;
  margin-left: 10px;
  color: #94a3b8;
}

.wrapper {
  transition: max-height 0.5s ease, opacity 0.3s ease;
  max-height: 1000px;
  opacity: 1;
  overflow: visible; /* <-- Corrige o corte */
}

.wrapper.hidden {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}

.container {
  max-width: 1200px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.card {
  background: #1c1f26;
  padding: 24px 20px;
  border-radius: 16px;
  border: 1px solid #2d313b;
  transition: all 0.3s ease;
  text-align: center;
}

.card:hover {
  border-color: #4c8bfa;
  box-shadow: 0 0 12px rgba(76, 139, 250, 0.2);
  transform: translateY(-3px);
}

.card h2 {
  font-size: 16px;
  color: #f8fafc;
  margin: 0 0 10px;
}

.card .quantidade {
  font-size: 28px;
  font-weight: 600;
  color: #ffffff;
  margin: 8px 0;
}

.status {
  font-size: 13px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 999px;
  display: inline-block;
  margin-top: 10px;
  background-color: #475569;
  color: #f1f5f9;
}

.green {
  background-color: #22c55e1a;
  color: #22c55e;
}

.red {
  background-color: #ef44441a;
  color: #ef4444;
}

.count {
  margin-left: 4px;
  font-weight: normal;
  color: #a5b4c4;
}

.theme-dark {
  background-color: #0f1115;
  color: #e2e8f0;
}

.theme-light {
  background-color: #f9fafb;
  color: #1f2937;
}

.theme-light .card {
  background: #ffffff;
  border-color: #d1d5db;
}

.theme-light .card:hover {
  border-color: #4c8bfa;
  box-shadow: 0 0 12px rgba(76, 139, 250, 0.1);
}

.theme-light .status {
  background-color: #e5e7eb;
  color: #111827;
}

.theme-light .green {
  background-color: #dcfce7;
  color: #15803d;
}

.theme-light .red {
  background-color: #fee2e2;
  color: #b91c1c;
}



.theme-switch-inline {
  display: flex;
  align-items: center;
}

.theme-switch-inline button {
  padding: 6px 12px;
  border: none;
  border-radius: 20px;
  background: #4c8bfa;
  color: white;
  cursor: pointer;
  font-size: 13px;
}

#themeToggle {
  padding: 6px 12px;
  border: none;
  border-radius: 20px;
  background: #4c8bfa;
  color: white;
  cursor: pointer;
  font-size: 13px;
}

.theme-light .card h2 {
  color: #111827;
}

.theme-light .quantidade {
  color: #1f2937;
}

.theme-light .filters button {
  background-color: #e2e8f0;
  color: #1f2937;
}

.theme-light .filters button.active,
.theme-light .filters button:hover {
  background-color: #4c8bfa;
  color: #ffffff;
}

.theme-light .section h2 {
  color: #1e293b;
}

.theme-light .arrow {
  color: #64748b;
}

.theme-light h1 {
  color: #1f2937;
}

.theme-light .card h2 {
  color: #1f2937;
}

.theme-light .quantidade {
  color: #111827;
}

.theme-light .filters button {
  background-color: #e2e8f0;
  color: #1e293b;
}

.theme-light .filters button.active {
  background-color: #4c8bfa;
  color: #fff;
}

.theme-light .section h2 {
  color: #1e293b;
}

.theme-light .arrow {
  color: #64748b;
}

.theme-toggle-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.theme-toggle-wrapper button {
  padding: 8px 14px;
  font-size: 13px;
  background: #4c8bfa;
  color: white;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.theme-toggle-wrapper button:hover {
  background: #3b82f6;
}

@media (max-width: 768px) {
  h1 {
    font-size: 22px;
    margin-bottom: 20px;
  }

  .controls {
    flex-direction: column;
    align-items: stretch;
  }

  .filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
  }

  .theme-toggle-wrapper {
    justify-content: center;
    margin-bottom: 10px;
  }

  .container {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
  }

  .card {
    padding: 18px 14px;
  }

  .card h2 {
    font-size: 14px;
  }

  .card .quantidade {
    font-size: 22px;
  }

  .status {
    font-size: 12px;
    padding: 4px 10px;
  }

  .section h2 {
    font-size: 16px;
    justify-content: center;
  }
}
