:root {
  --ink: #17201c;
  --muted: #64706a;
  --line: #d8ded9;
  --soft: #eef5f0;
  --accent: #0f7b6c;
  --danger: #b3345a;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: #f8faf8;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: white;
}

.topbar a { color: var(--accent); font-weight: 700; text-decoration: none; }

.shell {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  min-height: calc(100vh - 58px);
}

.list-panel {
  border-right: 1px solid var(--line);
  background: white;
  overflow: auto;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

h1, h2 { margin: 0; letter-spacing: 0; }
h1 { font-size: 24px; }

button {
  min-height: 38px;
  border: 1px solid var(--accent);
  border-radius: 7px;
  padding: 8px 13px;
  color: white;
  background: var(--accent);
  font-weight: 700;
  cursor: pointer;
}

#deleteProduct {
  border-color: var(--danger);
  background: var(--danger);
}

.product-item {
  width: 100%;
  display: block;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 14px 18px;
  color: var(--ink);
  background: white;
  text-align: left;
}

.product-item:hover, .product-item.active { background: var(--soft); }
.product-item span { display: block; color: var(--muted); font-size: 13px; }

.editor {
  padding: 24px;
  overflow: auto;
}

form {
  display: grid;
  gap: 14px;
  max-width: 1040px;
  margin-top: 18px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
}

input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  color: var(--ink);
  background: white;
  font: inherit;
}

.grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.actions { display: flex; gap: 10px; }

#result {
  max-width: 1040px;
  min-height: 64px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  background: #101816;
  color: #d8f7e6;
}

@media (max-width: 900px) {
  .shell, .grid-two { grid-template-columns: 1fr; }
  .list-panel { border-right: 0; border-bottom: 1px solid var(--line); }
}
