* { box-sizing: border-box; }
:root {
  --bg: #0b0f17; --panel: #111827; --panel2: #1a2332; --border: #263042;
  --text: #e5e7eb; --muted: #9ca3af; --accent: #7c3aed; --green: #22c55e;
  --red: #ef4444; --orange: #f59e0b; --blue: #3b82f6;
}
body {
  margin: 0; font-family: "Segoe UI", system-ui, Arial, sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px;
}
.muted { color: var(--muted); }
.small { font-size: 12px; }
.error { color: var(--red); margin-top: 10px; }

/* login */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 32px; width: 340px; box-shadow: 0 10px 30px rgba(0,0,0,.4);
}
.login-card h1 { margin: 0 0 4px; font-size: 22px; }
.login-card form label { display: block; margin: 14px 0 4px; color: var(--muted); font-size: 13px; }
.login-card input {
  width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--panel2); color: var(--text); font-size: 14px;
}
.login-card input:focus { outline: none; border-color: var(--accent); }

/* layout */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: 210px;
  background: var(--panel); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 20px 14px;
}
.sidebar h2 { margin: 0 0 18px; font-size: 18px; color: var(--accent); }
.nav-btn {
  display: block; width: 100%; text-align: left; padding: 10px 12px; margin: 2px 0;
  background: none; border: none; border-radius: 8px; color: var(--muted);
  font-size: 14px; cursor: pointer;
}
.nav-btn:hover { background: var(--panel2); color: var(--text); }
.nav-btn.active { background: var(--accent); color: #fff; }
.sidebar-foot { margin-top: auto; }
main { margin-left: 210px; padding: 28px 32px; }
.view { display: none; }
.view.active { display: block; }
h1 { margin: 0 0 18px; font-size: 24px; }
h2 { margin: 26px 0 12px; font-size: 17px; }

/* buttons */
.btn {
  background: var(--panel2); color: var(--text); border: 1px solid var(--border);
  padding: 8px 14px; border-radius: 8px; cursor: pointer; font-size: 13px;
}
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(1.15); }
.btn-ghost { background: none; }
.btn-danger { background: none; color: var(--red); border-color: var(--border); }
.btn-block { width: 100%; margin-top: 8px; }
.btn.sm { padding: 4px 9px; font-size: 12px; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.stat-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 18px;
}
.stat-card .num { font-size: 28px; font-weight: 700; }
.stat-card .lbl { color: var(--muted); font-size: 13px; margin-top: 4px; }

.platform-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.platform-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.platform-card .pf { display: flex; justify-content: space-between; align-items: center; }
.platform-card h3 { margin: 0; font-size: 15px; }
.platform-card input {
  width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--panel2); color: var(--text); font-size: 12px;
}
.platform-card .foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

/* tables */
table { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: 10px; overflow: hidden; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); font-size: 13px; }
th { background: var(--panel2); color: var(--muted); font-weight: 600; white-space: nowrap; }
td { word-break: break-all; }
td.mono, code { font-family: Consolas, monospace; font-size: 12px; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* badges */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; color: #fff; white-space: nowrap; }
.b-usable, .b-done { background: var(--green); }
.b-quota { background: var(--red); }
.b-busy, .b-queued { background: var(--orange); }
.b-running { background: var(--blue); }
.b-failed { background: var(--red); }
.b-unchecked { background: #6b7280; }

/* toolbar */
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar input, .toolbar select {
  padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--panel2); color: var(--text); font-size: 13px;
}

/* progress */
progress { width: 100%; height: 8px; border-radius: 4px; }
progress::-webkit-progress-bar { background: var(--panel2); border-radius: 4px; }
progress::-webkit-progress-value { background: var(--accent); border-radius: 4px; }

/* dialog */
.dialog {
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  color: var(--text); padding: 22px; width: 420px; max-width: 92vw;
}
.dialog::backdrop { background: rgba(0,0,0,.55); }
.dialog-title { font-size: 17px; font-weight: 700; margin-bottom: 12px; }
.dialog label { display: block; margin: 12px 0 4px; color: var(--muted); font-size: 13px; }
.dialog input, .dialog select {
  width: 100%; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--panel2); color: var(--text); font-size: 13px;
}
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.hunt-actions { display: flex; gap: 8px; align-items: center; }
