:root {
  --bg: #0d1117;
  --card: #121a24;
  --line: #2f3a4a;
  --text: #e5ecf5;
  --muted: #9fb0c6;
  --ok: #42b883;
  --warn: #f2c14e;
  --bad: #e45757;
  --accent: #5aa3ff;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: radial-gradient(circle at 20% -20%, #1a2434, var(--bg));
  color: var(--text);
  font-family: "SF Pro Text", "Segoe UI", Roboto, Arial, sans-serif;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 14, 20, 0.7);
  backdrop-filter: blur(12px);
}
.top h1 { margin: 0; font-size: 24px; }
.muted { color: var(--muted); margin: 4px 0 0; }
.meta-line { font-size: 13px; color: var(--muted); margin-bottom: 6px; text-align: right; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

.layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
}

.steps {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(18, 26, 36, 0.9);
  padding: 14px;
  min-height: calc(100vh - 120px);
}
.steps ol {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}
.steps li {
  color: var(--muted);
  font-size: 13px;
}
.steps li.active { color: var(--text); }
.steps li.done { color: var(--ok); }
.hint {
  margin-top: 16px;
  border-top: 1px dashed var(--line);
  padding-top: 12px;
  color: var(--muted);
  font-size: 12px;
}
.wrap { word-break: break-all; }

.content { min-width: 0; display: grid; gap: 12px; }
.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(18, 26, 36, 0.9);
  padding: 14px;
}
.card h2 { margin-top: 0; font-size: 20px; }
.card h3 { margin: 12px 0 8px; font-size: 16px; color: #d7e4f5; }
.hidden { display: none; }

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
label { display: grid; gap: 6px; margin-bottom: 10px; color: var(--muted); font-size: 13px; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #0f1722;
  color: var(--text);
  border-radius: 10px;
  padding: 10px;
  font-size: 14px;
}
textarea { resize: vertical; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.btn {
  border: 1px solid #3f79c7;
  background: linear-gradient(180deg, #3b82f6, #2868cc);
  color: #f5f9ff;
  padding: 9px 12px;
  border-radius: 10px;
  cursor: pointer;
}
.btn.ghost {
  background: rgba(20, 28, 39, 0.8);
  border-color: var(--line);
  color: var(--muted);
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.notice {
  min-height: 24px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 6px 10px;
  color: var(--muted);
}
.notice.ok { border-color: rgba(66, 184, 131, 0.5); color: #9de2c4; }
.notice.warn { border-color: rgba(242, 193, 78, 0.5); color: #f3dd9f; }
.notice.bad { border-color: rgba(228, 87, 87, 0.5); color: #f3b2b2; }

.dn-block {
  border-top: 1px dashed var(--line);
  padding-top: 10px;
}
.dn-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.dn-grid code {
  display: block;
  margin-top: 4px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0f1722;
  color: #d2e1f5;
}

.inst-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
ul { margin: 0; padding-left: 18px; }
li { margin-bottom: 6px; }
.cmd {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0f1722;
  padding: 10px;
  margin-top: 8px;
}
.cmd pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: #b9d4ff;
  font-size: 12px;
}
.cmd .btn { margin-top: 8px; }

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.contact {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--muted);
  margin-bottom: 12px;
}

dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #101823;
  color: var(--text);
  width: min(460px, calc(100vw - 20px));
}
dialog::backdrop { background: rgba(0, 0, 0, 0.45); }
menu {
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .steps { min-height: auto; }
  .grid, .dn-grid, .inst-grid { grid-template-columns: 1fr; }
  .top { flex-direction: column; gap: 12px; }
  .meta-line { text-align: left; }
}

