* {
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  margin: 0;
  padding: 0;
  background: #f3f4f6;
}

.container {
  max-width: 900px;
  margin: 20px auto;
  padding: 16px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

h1 {
  text-align: center;
  margin-bottom: 24px;
}

.panel {
  margin-bottom: 20px;
  padding: 16px;
  border-radius: 8px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.panel h2 {
  margin-top: 0;
  margin-bottom: 12px;
}

#category-form {
  display: flex;
  gap: 8px;
}

#category-form input {
  flex: 1;
  padding: 8px;
  border-radius: 4px;
  border: 1px solid #d1d5db;
}

button {
  padding: 8px 12px;
  border-radius: 4px;
  border: none;
  background: #2563eb;
  color: white;
  cursor: pointer;
  font-size: 14px;
}

button:hover {
  background: #1d4ed8;
}

button.danger {
  background: #dc2626;
}

button.danger:hover {
  background: #b91c1c;
}

.category {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
  background: #ffffff;
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.category-header h3 {
  margin: 0;
}

.product-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.product {
  display: grid;
  grid-template-columns: 1fr 120px auto;
  gap: 8px;
  align-items: center;
}

.product input[type="text"],
.product input[type="number"] {
  width: 100%;
  padding: 6px;
  border-radius: 4px;
  border: 1px solid #d1d5db;
}

.product input[type="number"] {
  text-align: right;
}

.actions {
  text-align: center;
}

@media (max-width: 640px) {
  .product {
    grid-template-columns: 1fr;
  }
}
