:root {
  --bg: #0d1117;
  --surface: #161b22;
  --surface-2: #1c2230;
  --border: #30363d;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #2f81f7;
  --green: #3fb950;
  --amber: #d29922;
  --red: #f85149;
  --radius: 10px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f8fa;
    --surface: #ffffff;
    --surface-2: #f0f3f6;
    --border: #d0d7de;
    --text: #1f2328;
    --muted: #636c76;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

code, pre, .mono { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace; }

.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky; top: 0; z-index: 10;
}
.brand { font-weight: 600; font-size: 16px; }
.logo { font-size: 18px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.who { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.who img { width: 22px; height: 22px; border-radius: 50%; }

main { max-width: 1040px; margin: 0 auto; padding: 24px 16px 64px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
}
.card h2 { margin: 0 0 12px; font-size: 16px; display: flex; align-items: center; gap: 10px; }
.step {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 700;
}

label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
input[type=text], input[type=password], input[type=number], select {
  width: 100%;
  padding: 8px 10px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

.row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 14px; }
.field { flex: 1 1 220px; }
.field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }

.toggles {
  border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 14px 14px; margin: 16px 0 0;
  display: flex; gap: 20px; flex-wrap: wrap;
}
.toggles legend { font-size: 12px; color: var(--muted); padding: 0 6px; }
.toggles label { display: flex; align-items: center; gap: 6px; margin: 0; font-weight: 500; }
.toggles input { accent-color: var(--accent); }

.muted { color: var(--muted); font-size: 13px; }
.hint { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
a { color: var(--accent); }

.actions { margin-top: 18px; display: flex; gap: 10px; }
.btn {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  padding: 8px 14px; border-radius: 6px; cursor: pointer;
  font-size: 14px; font-weight: 500;
}
.btn:hover:not(:disabled) { border-color: var(--accent); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.ghost { background: transparent; }
.btn.small { padding: 5px 10px; font-size: 13px; }

.progress { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
#progress-bar { height: 100%; width: 0; background: var(--accent); transition: width .2s; }

.results-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.spacer { flex: 1; }

.repo {
  border: 1px solid var(--border); border-radius: 8px;
  margin-bottom: 10px; background: var(--surface-2);
}
.repo-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; cursor: pointer; user-select: none;
}
.repo-head .name { font-weight: 600; }
.repo-head .badge {
  font-size: 12px; padding: 1px 8px; border-radius: 20px;
  background: var(--accent); color: #fff;
}
.repo-head .pr-link { margin-left: auto; font-size: 13px; }
.repo-body { padding: 0 14px 12px; }
.manifest-path { font-size: 12px; color: var(--muted); margin: 10px 0 4px; }

table.deps { width: 100%; border-collapse: collapse; font-size: 13px; }
table.deps td, table.deps th { padding: 5px 8px; border-bottom: 1px solid var(--border); text-align: left; }
table.deps th { color: var(--muted); font-weight: 500; font-size: 12px; }
table.deps td.ver { font-family: ui-monospace, monospace; }
.bump { font-size: 11px; padding: 1px 7px; border-radius: 20px; text-transform: uppercase; letter-spacing: .3px; }
.bump.patch { background: rgba(63,185,80,.18); color: var(--green); }
.bump.minor { background: rgba(47,129,247,.18); color: var(--accent); }
.bump.major { background: rgba(248,81,73,.18); color: var(--red); }

.log {
  background: var(--bg); border: 1px solid var(--border); border-radius: 6px;
  padding: 10px; max-height: 240px; overflow: auto;
  font-size: 12px; white-space: pre-wrap; margin: 0; color: var(--muted);
}
.log .err { color: var(--red); }
.log .ok { color: var(--green); }

footer { text-align: center; padding: 20px; font-size: 12px; color: var(--muted); }
.hidden { display: none !important; }

@media (max-width: 620px) {
  .toggles { gap: 12px; }
  table.deps th:nth-child(5), table.deps td:nth-child(5) { display: none; }
}
