/* Минималистичная палитра (выровнена с marketplace storefront). */
:root {
  --ink: #0a0a0f;
  --muted: #6b6f7a;
  --soft: #b5b8c2;
  --line: #e8e9ec;
  --paper: #ffffff;
  --cream: #f8f7f3;
  --accent: #0c8e62;
  --bad: #c22e2e;
  --radius: 6px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.45;
}

.studio {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
}

header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

header h1 {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.muted { color: var(--muted); font-size: 0.875rem; }
.error { background: #fff4f4; border-left: 3px solid var(--bad); padding: 0.75rem 1rem; margin-bottom: 1rem; }
.loading { padding: 0.5rem 1rem; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}

.panel.sub { background: var(--cream); border-style: dashed; }
.panel h2 { margin: 0 0 0.75rem; font-size: 1.1rem; }
.panel h3 { margin: 1rem 0 0.5rem; font-size: 0.95rem; color: var(--muted); }

ul.concepts, ul.attrs { list-style: none; padding: 0; margin: 0; }

.concept-row {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.1s;
}
.concept-row:hover { background: var(--cream); }
.concept-row.active { background: rgba(12, 142, 98, 0.1); }
.concept-row .label { font-weight: 600; }

.attrs li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
}
.attrs li:last-child { border-bottom: 0; }
.attr-label { font-weight: 500; }
.attr-restrs { font-size: 0.8rem; margin-top: 0.25rem; }

label {
  display: block;
  margin-bottom: 0.75rem;
}
label > span {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

input[type="text"], textarea, select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  background: white;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
}
textarea { min-height: 70px; resize: vertical; }

button {
  padding: 0.5rem 1rem;
  background: var(--ink);
  color: white;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  font: inherit;
  font-weight: 500;
}
button:hover:not(:disabled) { background: var(--accent); }
button:disabled { opacity: 0.4; cursor: not-allowed; }

/* Inline delete buttons (concept/attribute) */
button.delete-btn {
  background: transparent;
  color: var(--soft);
  padding: 0.15rem 0.5rem;
  font-size: 0.9rem;
  line-height: 1;
  border-radius: 3px;
  font-weight: 400;
}
button.delete-btn:hover:not(:disabled) {
  background: #fee;
  color: var(--bad);
}

.concept-row-head, .attr-row-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

/* Restriction tag в строке атрибута */
.restr-tag {
  display: inline-block;
  background: rgba(12, 142, 98, 0.08);
  border: 1px solid rgba(12, 142, 98, 0.25);
  border-radius: 3px;
  padding: 0.05rem 0.45rem;
  font-size: 0.75rem;
  margin-right: 0.25rem;
  margin-top: 0.15rem;
}
.restr-x {
  cursor: pointer;
  color: var(--soft);
  margin-left: 0.25rem;
}
.restr-x:hover { color: var(--bad); }

/* Concept graph SVG */
.concept-graph .graph-container {
  overflow-x: auto;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.5rem;
}
.graph-svg {
  display: block;
  max-width: 100%;
  height: auto;
}
.graph-node { cursor: pointer; }
.graph-node:hover .node-box {
  stroke: var(--accent);
  stroke-width: 1.5;
}
.graph-node.selected .node-box {
  filter: drop-shadow(0 1px 3px rgba(12, 142, 98, 0.3));
}
.graph-edge {
  pointer-events: none;
}

/* Vendor picker — стартовый экран без ?vendor-id */
.vendor-picker {
  max-width: 720px;
  margin: 1.5rem auto;
}
.vendor-list { list-style: none; padding: 0; margin: 1rem 0 0; }
.vendor-row {
  display: flex;
  align-items: baseline;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.1s;
  border-bottom: 1px solid var(--line);
}
.vendor-row:last-child { border-bottom: 0; }
.vendor-row:hover { background: var(--cream); }
.vendor-row .label { font-weight: 600; }
.vendor-meta { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; }
code { font-family: 'JetBrains Mono', monospace; font-size: 0.85em; background: var(--cream); padding: 0 0.25rem; border-radius: 3px; }

/* Tab navigation */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.25rem;
}
.tabs .tab {
  background: transparent;
  color: var(--muted);
  padding: 0.6rem 1.2rem;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  font-weight: 500;
  margin-bottom: -1px;
}
.tabs .tab:hover:not(:disabled) {
  background: var(--cream);
  color: var(--ink);
}
.tabs .tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: transparent;
}

.lint-panel { border-left: 3px solid #d49b00; background: #fff8e6; padding-left: 0.75rem; }
.lint-panel h3 { color: #b88600; margin-top: 0.5rem; }
.lint-list { margin: 0; padding-left: 1.25rem; }
.lint-list li { margin: 0.2rem 0; font-size: 0.9rem; }
.lint-kind { font-weight: 500; }
.lint-states { font-size: 0.85rem; }
