@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

:root {
  --bg: #10141a;
  --panel: #171d25;
  --panel-2: #1e2530;
  --line: #2b3340;
  --text: #edeff2;
  --text-dim: #94a0b2;
  --text-faint: #5c6675;
  --accent: #ffb454;
  --accent-dim: #b8863d;
  --accent-soft: rgba(255, 180, 84, 0.14);
  --good: #5fd98a;
  --bad: #ff6b6b;
  --warn: #ffd166;
  --radius: 10px;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --font-sans: 'IBM Plex Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(255, 180, 84, 0.08), transparent 60%),
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: auto, 42px 42px, 42px 42px;
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-mono); font-weight: 600; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; color: var(--text-dim); }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
  background: rgba(16, 20, 26, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-weight: 700; font-size: 18px; text-decoration: none; color: var(--text); }
.brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.nav-links { display: flex; align-items: center; gap: 10px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-mono); font-size: 14px; font-weight: 600;
  padding: 10px 18px; border-radius: 8px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; transition: transform .12s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #201404; }
.btn-primary:hover { background: #ffc677; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent-dim); color: var(--accent); }
.btn-danger { background: transparent; color: var(--bad); border-color: rgba(255,107,107,0.35); }
.btn-danger:hover { background: rgba(255,107,107,0.1); }
.btn-sm { padding: 7px 12px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- panels / cards ---------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.panel-2 { background: var(--panel-2); }
.card { padding: 22px; }
.eyebrow {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
}
.eyebrow::before { content: ''; width: 16px; height: 1px; background: var(--accent); }

/* ---------- forms ---------- */
label { display: block; font-family: var(--font-mono); font-size: 12.5px; color: var(--text-dim); margin-bottom: 6px; }
input, textarea, select {
  width: 100%; background: var(--bg); border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 11px 13px; font-family: var(--font-sans); font-size: 14px;
  outline: none; transition: border-color .15s ease;
}
textarea { resize: vertical; min-height: 90px; font-family: var(--font-mono); }
input:focus, textarea:focus, select:focus { border-color: var(--accent-dim); }
.field { margin-bottom: 16px; }
.hint { font-size: 12.5px; color: var(--text-faint); margin-top: 6px; }

/* ---------- status LEDs ---------- */
.status {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-dim);
}
.status .led { width: 8px; height: 8px; border-radius: 50%; background: var(--text-faint); flex-shrink: 0; }
.status.running .led { background: var(--good); box-shadow: 0 0 8px var(--good); }
.status.running { color: var(--good); }
.status.starting .led { background: var(--warn); animation: blink 1s ease-in-out infinite; }
.status.starting { color: var(--warn); }
.status.error .led { background: var(--bad); box-shadow: 0 0 8px var(--bad); }
.status.error { color: var(--bad); }
.status.stopped .led { background: var(--text-faint); }
.status.draft .led { background: var(--text-faint); }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* ---------- toast ---------- */
#toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  padding: 12px 18px; border-radius: 8px; font-size: 13.5px; font-family: var(--font-mono);
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
  z-index: 100; max-width: 90vw;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.muted { color: var(--text-faint); }
.tag {
  display: inline-block; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  padding: 3px 8px; border-radius: 5px; background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(255,180,84,.3);
}

::selection { background: var(--accent-soft); color: var(--accent); }

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  h1 { font-size: 32px !important; }
}
