* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background: #f5f7fb;
  color: #222;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #ffffff;
  border-bottom: 1px solid #e0e4f0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-logo img {
  height: 32px;
  width: 32px;
  border-radius: 8px;
  object-fit: cover;
}

.header-title {
  font-weight: 600;
  font-size: 1.1rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-actions input[type="text"] {
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid #ccd1e0;
  min-width: 200px;
}

.header-actions input[type="text"]:focus {
  outline: none;
  border-color: #4f46e5;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}

.toggle input {
  width: 36px;
  height: 18px;
}

/* Layout principal */

.container {
  max-width: 1120px;
  margin: 16px auto;
  padding: 0 12px;
}

/* Grade de produtos */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.product-card {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.product-image-wrapper {
  width: 100%;
  padding-top: 70%;
  position: relative;
  overflow: hidden;
}

.product-image-wrapper img {
  border-radius: 16px 16px 0 0;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-content {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-title {
  font-size: 0.95rem;
  font-weight: 600;
}

.product-meta {
  font-size: 0.8rem;
  color: #6b7280;
}

.product-actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn-primary {
  background: #4f46e5;
  color: #fff;
}

.btn-primary:disabled {
  background: #c7d2fe;
  cursor: not-allowed;
}

.btn-primary:not(:disabled):hover {
  background: #4338ca;
  transform: translateY(-1px);
}

/* Dashboard / Tabela */

.dashboard {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  background: #ffffff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
}

.card h2 {
  font-size: 1rem;
  margin-bottom: 12px;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

thead {
  background: #f3f4f6;
}

th, td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

tr:last-child td {
  border-bottom: none;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #ffffff;
}

.status-green {
  background: #10b981;
}

.status-orange {
  background: #f97316;
}

.status-red {
  background: #ef4444;
}

.legend {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.75rem;
  color: #ffffff;
}

.badge.green {
  background: #10b981;
}

.badge.orange {
  background: #f97316;
}

.badge.red {
  background: #ef4444;
}

/* Responsivo */

@media (max-width: 600px) {
  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .header-actions {
    width: 100%;
  }

  .header-actions input[type="text"] {
    flex: 1;
    width: 100%;
  }
}
