:root {
  --bg: #0f1115; --panel: #181b22; --line: #2a2f3a; --fg: #e6e8ec;
  --muted: #8b93a3; --accent: #4f8cff; --ok: #35c46b; --err: #ff5d5d; --danger: #ff6b6b;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 15px/1.5 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; }

header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px; border-bottom: 1px solid var(--line); background: var(--panel);
}
.brand { font-weight: 700; font-size: 18px; color: var(--fg); }
.brand span { color: var(--accent); }
header nav { display: flex; align-items: center; gap: 18px; }

main { max-width: 920px; margin: 0 auto; padding: 26px 22px 60px; }
h1 { font-size: 22px; margin: 0 0 18px; }
h2 { font-size: 16px; margin: 0 0 12px; }

.row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.right { text-align: right; }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 22px; margin-bottom: 18px;
}
.card.narrow { max-width: 380px; margin: 8vh auto 0; }

label { display: block; margin: 0 0 16px; font-weight: 600; }
label .muted { font-weight: 400; }
label.check { font-weight: 400; }
input[type=text], input:not([type]), input[type=password], input[type=email] {
  width: 100%; margin-top: 6px; padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--line); background: #0e1016; color: var(--fg); font-size: 15px;
}
input[type=checkbox] { margin-right: 6px; }

button, .btn {
  display: inline-block; cursor: pointer; border: 0; border-radius: 8px;
  padding: 10px 16px; font-size: 14px; font-weight: 600;
  background: var(--accent); color: #fff;
}
button:hover, .btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--fg); margin-left: 8px; }
.inline { display: inline; margin: 0; }
button.link {
  background: none; padding: 4px 6px; color: var(--accent); font-weight: 600;
}
button.link.danger { color: var(--danger); }

table { width: 100%; border-collapse: collapse; margin-top: 8px; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; }
td.actions form { margin-left: 6px; }
table.kv td { border: 0; padding: 4px 10px 4px 0; }
table.kv td:first-child { color: var(--muted); width: 90px; }

.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(53,196,107,.15); }
.dot.off { background: #555; }

.err { color: var(--err); }
.badge { font-size: 13px; padding: 4px 10px; border-radius: 20px; font-weight: 600; }
.badge.ok { background: rgba(53,196,107,.15); color: var(--ok); }
.badge.err { background: rgba(255,93,93,.15); color: var(--err); }
.badge.run { background: rgba(79,140,255,.15); color: var(--accent); }

.creds { border-color: var(--accent); }

.log {
  background: #0a0c10; border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; overflow-x: auto; white-space: pre-wrap; word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px;
  line-height: 1.5; max-height: 60vh; overflow-y: auto; margin: 8px 0 18px;
}

.spin {
  display: inline-block; width: 11px; height: 11px; border: 2px solid currentColor;
  border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite;
  vertical-align: -1px;
}
@keyframes spin { to { transform: rotate(360deg); } }
