:root {
  --bg: #0b0d10;
  --panel: #14181d;
  --panel-2: #1a1f26;
  --line: #262d36;
  --text: #e6eaef;
  --muted: #8b95a3;
  --accent: #b6ff3a;
  --accent-dim: #7fae2a;
  --blue: #5aa9ff;
  --red: #ff5d6c;
  --amber: #ffc14d;
  --radius: 14px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: radial-gradient(1200px 700px at 80% -10%, #16201a 0%, var(--bg) 55%) fixed;
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: rgba(11,13,16,.8); backdrop-filter: blur(10px); z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -.02em; color: var(--text); }
.brand .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px var(--accent); }
.brand .k { color: var(--accent); }
.nav-right { display: flex; align-items: center; gap: 14px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); }
.who { color: var(--muted); font-size: 14px; }

.wrap { max-width: 980px; margin: 0 auto; padding: 36px 24px 80px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 26px; gap: 16px; flex-wrap: wrap; }
h1 { font-size: 26px; letter-spacing: -.02em; margin: 0; }
.sub { color: var(--muted); margin: 4px 0 0; font-size: 14px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
  padding: 9px 16px; border-radius: 10px; font-size: 14px; font-weight: 600;
  font-family: inherit; transition: .15s; text-decoration: none;
}
.btn:hover { border-color: #36404c; text-decoration: none; }
.btn-primary { background: var(--accent); color: #0a1500; border-color: var(--accent); }
.btn-primary:hover { background: #c8ff5e; }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--red); border-color: #3a2a2e; }
.btn-danger:hover { background: #2a1a1e; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; transition: .15s; display: block; color: var(--text);
}
a.card:hover { border-color: #36404c; transform: translateY(-2px); text-decoration: none; }
.card h3 { margin: 0 0 4px; font-size: 17px; letter-spacing: -.01em; }
.card .repo { color: var(--muted); font-size: 13px; font-family: var(--mono); }
.card .url { color: var(--blue); font-size: 13px; font-family: var(--mono); margin-top: 10px; word-break: break-all; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }

.status { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--muted); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status.running { color: var(--accent); } .status.running::before { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.status.building { color: var(--amber); } .status.building::before { background: var(--amber); animation: pulse 1s infinite; }
.status.stopped::before { background: var(--muted); }
.status.failed, .status.crashed { color: var(--red); } .status.failed::before, .status.crashed::before { background: var(--red); }
@keyframes pulse { 50% { opacity: .35; } }

.empty { text-align: center; padding: 80px 20px; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty .big { font-size: 40px; margin-bottom: 10px; }

label { display: block; font-size: 13px; color: var(--muted); margin: 18px 0 6px; font-weight: 600; }
input[type=text], select {
  width: 100%; background: var(--panel); border: 1px solid var(--line); color: var(--text);
  padding: 11px 13px; border-radius: 10px; font-size: 15px; font-family: inherit;
}
input:focus, select:focus { outline: none; border-color: var(--accent-dim); }
.field-hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.field-hint .dom { color: var(--accent); font-family: var(--mono); }
.suffix-row { display: flex; align-items: stretch; }
.suffix-row input { border-radius: 10px 0 0 10px; }
.suffix { display: flex; align-items: center; padding: 0 13px; background: var(--panel-2); border: 1px solid var(--line); border-left: 0; border-radius: 0 10px 10px 0; color: var(--muted); font-family: var(--mono); font-size: 14px; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 18px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.meta { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; font-size: 14px; }
.meta dt { color: var(--muted); } .meta dd { margin: 0; font-family: var(--mono); }

.logs {
  background: #06080a; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.55; color: #c7d0da;
  white-space: pre-wrap; word-break: break-word; max-height: 460px; overflow-y: auto; margin: 0;
}
.logs:empty::before { content: "Waiting for output…"; color: var(--muted); }

.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 44px 40px; max-width: 400px; width: 100%; text-align: center; }
.login-card .logo { font-size: 30px; font-weight: 800; letter-spacing: -.03em; margin-bottom: 6px; }
.login-card p { color: var(--muted); margin: 0 0 28px; }
.gh-btn { width: 100%; justify-content: center; background: #1f242b; padding: 13px; font-size: 15px; }
.err { background: #2a1a1e; border: 1px solid #3a2a2e; color: var(--red); padding: 10px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 20px; }
.tag { font-family: var(--mono); font-size: 11px; padding: 2px 7px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.repo-list { max-height: 320px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.repo-opt { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.repo-opt:last-child { border-bottom: 0; }
.repo-opt:hover { background: var(--panel-2); }
.repo-opt input { width: auto; }
.repo-opt .nm { font-weight: 600; font-size: 14px; }
.repo-opt .ds { color: var(--muted); font-size: 12px; }
