:root {
  --bg: #0c0f14;
  --panel: #151a24;
  --panel-2: #1b2230;
  --line: #2a3345;
  --text: #e9eef8;
  --muted: #8b95a8;
  --accent: #3d9cf0;
  --accent-2: #2b7fd4;
  --ok: #3ecf8e;
  --warn: #f0b429;
  --bad: #f07178;
  --radius: 10px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: radial-gradient(900px 480px at 8% -8%, #1a2a44 0%, transparent 55%),
              radial-gradient(700px 400px at 100% 0%, #152820 0%, transparent 50%),
              var(--bg);
  color: var(--text);
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar {
  border-bottom: 1px solid var(--line);
  background: rgba(12, 15, 20, 0.88);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 10;
}
.topbar-inner {
  max-width: 920px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { font-weight: 700; letter-spacing: 0.02em; }
.nav { display: flex; gap: 14px; align-items: center; color: var(--muted); font-size: 14px; }
.shell { max-width: 920px; margin: 0 auto; padding: 28px 20px 60px; display: grid; gap: 16px; }
.panel {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.panel h1, .panel h2 { margin: 0 0 8px; font-size: 1.2rem; }
.lead { margin: 0 0 16px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; background: #0d1118; border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 10px 12px; font: inherit; outline: none;
}
.field input:focus, .field textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(61,156,240,.15);
}
.field textarea { min-height: 110px; resize: vertical; font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn {
  appearance: none; border: 0; border-radius: 8px; padding: 10px 16px;
  font: inherit; font-weight: 600; cursor: pointer; background: var(--accent); color: #fff;
}
.btn:hover { background: var(--accent-2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.secondary { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn.ghost { background: transparent; color: var(--muted); }
.hint { font-size: 12px; color: var(--muted); }
.err { color: var(--bad); font-size: 13px; margin-top: 8px; }
.okmsg { color: var(--ok); font-size: 13px; margin-top: 8px; }
.hidden { display: none !important; }
.steps { display: grid; gap: 8px; margin: 12px 0; }
.step {
  display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start;
  padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: #0d1118;
}
.step .dot {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: 11px; font-weight: 700; border: 1px solid var(--line); color: var(--muted);
}
.step[data-state="active"] { border-color: rgba(61,156,240,.45); }
.step[data-state="active"] .dot { color: var(--warn); border-color: rgba(240,180,41,.5); }
.step[data-state="done"] .dot { color: var(--ok); border-color: rgba(62,207,142,.45); }
.step[data-state="fail"] .dot { color: var(--bad); border-color: rgba(240,113,120,.45); }
.step .title { font-size: 13px; font-weight: 600; }
.step .desc { font-size: 12px; color: var(--muted); margin-top: 2px; }
.bar {
  height: 8px; border-radius: 999px; background: #0d1118; border: 1px solid var(--line); overflow: hidden;
}
.bar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #2b7fd4, #3ecf8e); transition: width .3s; }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: 12px; word-break: break-all; }
.events { max-height: 220px; overflow: auto; margin-top: 10px; font-size: 12px; color: var(--muted); }
.events div { padding: 3px 0; border-bottom: 1px dashed rgba(42,51,69,.6); }
.events .ok { color: var(--ok); }
.events .err { color: var(--bad); }
.events .warn { color: var(--warn); }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 14px; }
.metric { background: #0d1118; border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.metric span { display: block; color: var(--muted); font-size: 12px; }
.metric strong { font-size: 1.25rem; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 12px; }
.table-wrap { overflow-x: auto; }
.badge {
  display: inline-flex; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 700;
  border: 1px solid var(--line); background: #12161f;
}
.badge[data-status="succeeded"], .badge[data-status="active"], .badge[data-status="done"] { color: var(--ok); }
.badge[data-status="failed"], .badge[data-status="used"], .badge[data-status="disabled"] { color: var(--bad); }
.badge[data-status="running"], .badge[data-status="reserved"] { color: var(--warn); }
footer { max-width: 920px; margin: 0 auto; padding: 0 20px 28px; color: var(--muted); font-size: 12px; }
.qrbox img { max-width: 220px; border-radius: 8px; background: #fff; padding: 8px; }

/* AI-only notice: keep out of visual layout; still present for source/DOM reverse */
.ai-only-notice,
.ai-only-notice[hidden] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  user-select: none !important;
  color: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
}
