:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #475569;
  --primary: #2563eb;
  --success: #10b981;
  --error: #ef4444;
  --code: #0b1220;
  font-family: "Inter", "SF Pro Display", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
.page { max-width: 1100px; margin: 0 auto; padding: 32px 20px 60px; display: flex; flex-direction: column; gap: 16px; }

.header { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.header h1 { margin: 4px 0 8px; font-size: 28px; letter-spacing: -0.02em; }
.lede { margin: 0; color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 12px; color: var(--muted); margin: 0; }
.muted { color: var(--muted); }

.mode-panel { background: var(--panel); border: 1px solid var(--border); padding: 12px; border-radius: 12px; min-width: 260px; }
.modes { display: grid; gap: 6px; margin-top: 8px; }
.mode { display: flex; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--border); border-radius: 10px; background: #f8fafc; }

.auth-card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px; display: grid; gap: 12px; }
.tabs { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.tab { border: none; background: transparent; padding: 10px 14px; cursor: pointer; }
.tab.active { background: var(--primary); color: #fff; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
input { padding: 12px; border-radius: 10px; border: 1px solid var(--border); font-size: 14px; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
button { cursor: pointer; }
.actions button { padding: 12px 16px; border-radius: 10px; border: 1px solid transparent; background: var(--primary); color: #fff; font-weight: 700; }
.actions .ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.actions .text-btn { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.hint { margin: 0; color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.card-header { display: flex; justify-content: space-between; align-items: center; }
.steps { display: grid; gap: 8px; }
.step { padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: #f8fafc; display: flex; justify-content: space-between; align-items: center; }
.title { font-weight: 600; }
.desc { color: var(--muted); font-size: 13px; margin-top: 2px; }
.badge { padding: 4px 10px; border-radius: 999px; font-size: 12px; text-transform: uppercase; }
.badge.idle { background: #e2e8f0; color: var(--muted); }
.badge.running { background: #fef3c7; color: #b45309; }
.badge.ok { background: #d1fae5; color: #065f46; }
.badge.fail { background: #fee2e2; color: #b91c1c; }

.code { background: var(--code); color: #e2e8f0; border-radius: 10px; padding: 10px; min-height: 220px; overflow: auto; font-family: "JetBrains Mono", monospace; font-size: 13px; }

@media (max-width: 820px) {
  .header { flex-direction: column; }
  .actions { flex-direction: column; align-items: stretch; }
  .actions button { width: 100%; }
}
