:root {
  --bg: #0f1115;
  --panel: #171a21;
  --panel-2: #1d212b;
  --text: #e6e8ec;
  --muted: #8a93a3;
  --accent: #6ea8fe;
  --border: #2a2f3a;
  --danger: #ff6b6b;
  --ok: #51cf66;
  --radius: 8px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

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

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}
.brand { font-weight: 700; font-size: 1.1rem; color: var(--text); }
.nav-right { display: flex; gap: 1rem; }

.container { max-width: 900px; margin: 0 auto; padding: 1.5rem 1.25rem; }

.muted { color: var(--muted); }
code { font-family: var(--mono); }

h1 { margin: 0 0 1rem; font-size: 1.4rem; }

.row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

.flashes { margin-bottom: 1rem; }
.flash { padding: 0.6rem 0.9rem; border-radius: var(--radius); margin-bottom: 0.5rem; }
.flash-error { background: rgba(255,107,107,0.12); border: 1px solid var(--danger); }
.flash-success { background: rgba(81,207,102,0.12); border: 1px solid var(--ok); }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.card.narrow { max-width: 380px; margin: 3rem auto; }

label { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 1rem; font-weight: 600; font-size: 0.9rem; }
small { font-weight: 400; }

input, textarea {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0.55rem 0.7rem;
  font-size: 0.95rem;
  font-family: inherit;
}
input:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { font-family: var(--mono); resize: vertical; width: 100%; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #0b1220;
  border: none;
  border-radius: var(--radius);
  padding: 0.5rem 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn-link {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  padding: 0;
}
.btn-link.danger { color: var(--danger); }

.script-list { list-style: none; padding: 0; }
.script-list li { padding: 0.6rem 0; border-bottom: 1px solid var(--border); }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--border); }
.table th { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
.actions { display: flex; gap: 1rem; align-items: center; }

.code {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  overflow: auto;
  font-family: var(--mono);
  font-size: 0.9rem;
  white-space: pre;
}
.code.scroll { max-height: 60vh; }
