:root {
  --bg: #0b0f14;
  --bg-card: #131a22;
  --bg-card-hover: #1a2330;
  --border: #223041;
  --text: #e8edf2;
  --text-dim: #94a3b3;
  --accent: #22c55e;
  --accent-dim: #16a34a;
  --accent-soft: rgba(34, 197, 94, 0.12);
  --danger: #ef4444;
  --warn: #f59e0b;
  --radius: 12px;
  --max-width: 880px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

header.site {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(11, 15, 20, 0.9);
  backdrop-filter: blur(8px);
  z-index: 10;
}

header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}

.brand .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.badge-unofficial {
  font-size: 11px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 999px;
}

nav.top a {
  color: var(--text-dim);
  margin-left: 20px;
  font-size: 14px;
}

nav.top a:hover {
  color: var(--text);
}

main {
  padding: 48px 0 80px;
}

.hero {
  text-align: center;
  padding: 40px 0 24px;
}

.hero h1 {
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.2;
  margin: 0 0 16px;
}

.hero h1 span {
  color: var(--accent);
}

.hero p.lead {
  color: var(--text-dim);
  font-size: 17px;
  max-width: 560px;
  margin: 0 auto 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #06210f;
}

.btn-primary:hover {
  background: var(--accent-dim);
}

.btn-secondary {
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
}

.btn-block {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 40px 0;
}

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

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 12px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 14px;
}

.section {
  margin: 48px 0;
}

.section h2 {
  font-size: 22px;
  margin: 0 0 8px;
}

.section .sub {
  color: var(--text-dim);
  margin: 0 0 20px;
  font-size: 14px;
}

.wizard-step {
  display: flex;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  margin-bottom: 16px;
}

.wizard-step .num {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.wizard-step .body h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.wizard-step .body p {
  margin: 0 0 12px;
  color: var(--text-dim);
  font-size: 14px;
}

.wizard-step .body ol,
.wizard-step .body ul {
  margin: 0 0 12px;
  padding-left: 18px;
  color: var(--text-dim);
  font-size: 14px;
}

.wizard-step .body li {
  margin-bottom: 4px;
}

.pill {
  display: inline-block;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 10px;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.field input[type="text"],
.field input[type="password"],
.field textarea,
.field select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}

.field textarea {
  resize: vertical;
  min-height: 100px;
}

.field .hint {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 6px;
}

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  overflow-x: auto;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.alert-warn {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.alert-info {
  background: var(--accent-soft);
  border-color: rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

.progress-wrap {
  margin: 16px 0;
}

.progress-bar-bg {
  width: 100%;
  height: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.2s ease;
}

.progress-label {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
}

table.log-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

table.log-table th,
table.log-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

table.log-table th {
  color: var(--text-dim);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.status-ok {
  color: var(--accent);
}

.status-fail {
  color: var(--danger);
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-dim);
  font-size: 14px;
}

.template-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 10px;
  background: var(--bg-card);
}

.template-item .name {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
}

.template-item .preview {
  color: var(--text-dim);
  font-size: 12px;
  max-width: 400px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-actions button {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 13px;
  padding: 4px 8px;
}

.template-actions button:hover {
  color: var(--text);
}

.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.row > * {
  flex: 1;
  min-width: 160px;
}

footer.site {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
}

footer.site .wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.setup-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.setup-banner .msg {
  font-size: 14px;
}

.setup-banner .msg strong {
  color: var(--text);
}

code, .code {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
