:root {
  color-scheme: dark;
  --bg: #101114;
  --surface: #181a20;
  --surface2: #20232b;
  --border: #30333d;
  --text: #f4f6fb;
  --muted: #9aa3b2;
  --accent: #30c48d;
  --warn: #f5b84b;
  --bad: #ef6060;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
.shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
h1, h2, p { margin: 0; }
h1 { font-size: 26px; line-height: 1.1; }
h2 { font-size: 14px; }
.topbar p { color: var(--muted); margin-top: 6px; font-size: 14px; }
.install {
  color: #06130e;
  background: var(--accent);
  padding: 10px 14px;
  border-radius: 7px;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.stats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 14px;
}
.stat, .panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.stat { padding: 16px; }
.stat strong { display: block; font-size: 26px; }
.stat span { color: var(--muted); font-size: 12px; }
.panel { padding: 14px; margin-bottom: 14px; }
.notice {
  padding: 12px 14px;
  background: rgba(48,196,141,.14);
  border: 1px solid rgba(48,196,141,.35);
  color: var(--accent);
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 700;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface2);
  color: var(--muted);
  font-size: 12px;
}
.badge.ok { background: rgba(48,196,141,.14); color: var(--accent); }
.badge.bad { background: rgba(239,96,96,.14); color: var(--bad); }
.list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--border);
  background: var(--surface2);
  border-radius: 7px;
  min-width: 0;
}
.row .title { font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.row .meta { font-size: 12px; color: var(--muted); margin-top: 3px; overflow-wrap: anywhere; }
.empty { color: var(--muted); font-size: 13px; padding: 12px; }
.project-form {
  display: grid;
  gap: 14px;
}
label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
select,
textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface2);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}
select {
  padding: 0 10px;
}
textarea {
  min-height: 150px;
  padding: 10px;
  resize: vertical;
  font-family: "SFMono-Regular", Consolas, monospace;
  line-height: 1.45;
}
.form-grid,
.env-grid {
  display: grid;
  gap: 12px;
}
.form-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.env-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
button {
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  background: var(--accent);
  color: #06130e;
  padding: 0 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.save-message {
  color: var(--muted);
  font-size: 13px;
}
@media (max-width: 760px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .grid, .stats, .form-grid, .env-grid { grid-template-columns: 1fr; }
  .install { width: 100%; text-align: center; }
}
