:root {
  --bg: #0f1420;
  --panel: #182031;
  --panel-2: #1f2a3f;
  --border: #2a3750;
  --text: #e6ecf5;
  --muted: #8fa0bd;
  --accent: #4f8cff;
  --green: #38c172;
  --amber: #f0a020;
  --red: #ef5b6e;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}
header h1 { font-size: 18px; margin: 0; }
.health { color: var(--muted); font-size: 12px; }

main { display: flex; min-height: calc(100vh - 55px); }
#sidebar {
  width: 220px;
  border-right: 1px solid var(--border);
  padding: 16px;
  background: var(--panel);
}
#sidebar h2 { font-size: 13px; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
#batch-list { list-style: none; margin: 0; padding: 0; }
#batch-list li {
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 4px;
  border: 1px solid transparent;
}
#batch-list li:hover { background: var(--panel-2); }
#batch-list li.active { background: var(--panel-2); border-color: var(--accent); }
#batch-list .b-name { font-weight: 600; }
#batch-list .b-meta { color: var(--muted); font-size: 11px; }
.hint { color: var(--muted); font-size: 11px; margin-top: 14px; }

#content { flex: 1; padding: 20px; overflow: auto; }
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 20px;
}
.card h2 { margin-top: 0; font-size: 15px; }
.hidden { display: none; }

label { display: block; margin-bottom: 12px; color: var(--muted); font-size: 12px; }
input[type=text], input[type=search], textarea, select {
  width: 100%;
  margin-top: 4px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
}
textarea { resize: vertical; }

button, .btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}
button:disabled { opacity: 0.5; cursor: default; }
.msg { margin-left: 12px; color: var(--muted); }
.msg.error { color: var(--red); }

.results-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.results-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.results-actions input, .results-actions select { width: auto; margin: 0; }

button.ghost {
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 500;
  font-size: 12px;
  padding: 7px 12px;
}
button.ghost:hover { border-color: var(--accent); }
button.danger { background: var(--red); }
button.danger:hover { background: #f3707f; }
button.danger-ghost { color: var(--red); }
button.danger-ghost:hover { border-color: var(--red); }

.select-bar { display: flex; gap: 8px; margin: 12px 0; align-items: center; flex-wrap: wrap; }

.progress { display: flex; gap: 18px; margin: 14px 0; flex-wrap: wrap; }
.progress .bar-group { flex: 1; min-width: 220px; }
.progress .bar-label { font-size: 12px; color: var(--muted); margin-bottom: 4px; display: flex; justify-content: space-between; }
.progress .bar { height: 8px; background: var(--panel-2); border-radius: 4px; overflow: hidden; display: flex; }
.progress .seg { height: 100%; }
.seg.available { background: var(--green); }
.seg.registered { background: var(--red); }
.seg.error { background: var(--amber); }
.seg.pending { background: var(--panel-2); }

table { width: 100%; border-collapse: collapse; margin-top: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); font-size: 13px; }
th { color: var(--muted); font-size: 12px; cursor: pointer; user-select: none; white-space: nowrap; }
th[data-sort]:hover { color: var(--text); }
tbody tr:hover { background: var(--panel-2); }
th.sel, td.sel { width: 28px; padding-right: 0; }
td.sel input { margin: 0; cursor: pointer; }

.pill { padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; cursor: pointer; }
.pill:hover { outline: 1px solid var(--accent); }
.pill.available { background: rgba(56,193,114,0.18); color: var(--green); }
.pill.registered { background: rgba(239,91,110,0.18); color: var(--red); }
.pill.error { background: rgba(240,160,32,0.18); color: var(--amber); }
.pill.pending { background: var(--panel-2); color: var(--muted); }
.status-edit { width: auto; padding: 3px 6px; font-size: 12px; margin: 0; }
.approx { color: var(--amber); font-weight: 700; cursor: help; margin-left: 4px; }

.domain-link { color: var(--text); text-decoration: none; border-bottom: 1px dotted var(--muted); }
.domain-link:hover { color: var(--accent); border-bottom-color: var(--accent); }

td.links { white-space: nowrap; }
.mini-btn {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
}
.mini-btn + .mini-btn { margin-left: 5px; }
.mini-btn.wayback { background: #3a4457; border: 1px solid #4a5568; color: #c3cddd; }
.mini-btn.wayback:hover { background: #46516a; color: #e6ecf5; }
.mini-btn.ahrefs { background: #ff6b00; border: 1px solid #ff6b00; color: #fff; }
.mini-btn.ahrefs:hover { background: #ff8329; }

.footnote { color: var(--muted); font-size: 11px; margin-top: 12px; }
.muted { color: var(--muted); }
