:root {
  --bg: #0a0e1a;
  --panel: #121826;
  --panel2: #1a2234;
  --line: #2a3548;
  --txt: #e8ecf4;
  --mut: #8b9ab8;
  --acc: #6366f1;
  --acc2: #818cf8;
  --ok: #34d399;
  --warn: #fbbf24;
  --err: #f87171;
  --radius: 12px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font: 14px/1.5 system-ui, Segoe UI, Roboto, sans-serif;
  background: radial-gradient(1000px 500px at 10% -5%, #1e1b4b 0%, var(--bg) 50%);
  color: var(--txt);
  min-height: 100vh;
}
a { color: var(--acc2); text-decoration: none; }
a:hover { text-decoration: underline; }
.shell { max-width: 1100px; margin: 0 auto; padding: 24px 20px 48px; }
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand .icon { font-size: 28px; }
.brand h1 { margin: 0; font-size: 18px; }
.brand p { margin: 2px 0 0; font-size: 12px; color: var(--mut); }
.nav { display: flex; gap: 8px; flex-wrap: wrap; }
.nav a, .btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel); color: var(--txt); font-size: 13px; cursor: pointer;
  text-decoration: none;
}
.nav a.active, .btn.primary { background: linear-gradient(135deg, var(--acc), var(--acc2)); border-color: transparent; color: #fff; font-weight: 600; }
.btn.ok { background: var(--ok); color: #042; border: 0; font-weight: 600; }
.btn.danger { background: var(--err); color: #fff; border: 0; font-weight: 600; }
.btn.danger:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.sm { padding: 4px 10px; font-size: 0.85rem; }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin-bottom: 16px;
}
.card h2 { margin: 0 0 4px; font-size: 15px; }
.card .sub { color: var(--mut); font-size: 12px; margin-bottom: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 768px) { .grid2 { grid-template-columns: 1fr; } }
label { display: block; font-size: 12px; color: var(--mut); margin-bottom: 6px; }
input, textarea, select {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel2); color: var(--txt); font: inherit;
}
textarea { min-height: 88px; resize: vertical; }
.field { margin-bottom: 14px; }
.steps { display: flex; flex-direction: column; gap: 8px; }
.step {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel2);
}
.step.done { border-color: rgba(52,211,153,.4); opacity: .85; }
.step.current { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc); }
.step .num {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--line); font-weight: 700; font-size: 12px; flex-shrink: 0;
}
.step.done .num { background: var(--ok); color: #042; }
.step.current .num { background: var(--acc); color: #fff; }
.step .hint { font-size: 12px; color: var(--mut); margin-top: 2px; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.table th { color: var(--mut); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
.badge { font-size: 11px; padding: 2px 8px; border-radius: 6px; background: var(--panel2); border: 1px solid var(--line); }
.badge.ok { color: var(--ok); border-color: rgba(52,211,153,.3); }
.prompt-box {
  font-family: ui-monospace, monospace; font-size: 12px; line-height: 1.55;
  white-space: pre-wrap; background: #0d1117; border: 1px solid var(--line);
  border-radius: 10px; padding: 16px; max-height: 420px; overflow: auto;
}
.login-wrap { max-width: 400px; margin: 60px auto; padding: 0 20px; }
.login-wrap .card { text-align: center; }
.login-wrap .brand { justify-content: center; margin-bottom: 20px; }
.err { color: var(--err); font-size: 13px; margin-top: 8px; }
.ok-msg { color: var(--ok); font-size: 13px; }
.qr { margin: 16px auto; max-width: 200px; }
.muted { color: var(--mut); font-size: 12px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; align-items: center; }
td.actions { margin-top: 0; white-space: nowrap; }
td.actions .btn { margin: 0; }
.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-list li {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px;
}
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--panel2); border: 1px solid var(--line); padding: 12px 20px;
  border-radius: 10px; z-index: 100; box-shadow: 0 8px 30px rgba(0,0,0,.4);
}
