:root {
  --bg: #0e1116;
  --panel: #161b22;
  --panel-hi: #1c232b;
  --border: #30363d;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #2ea043;
  --accent-strong: #3fb950;
  --warn: #d29922;
  --bad: #f85149;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100dvh;
}
.app {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

h1 { font-size: 22px; margin: 0; }
h2 { font-size: 16px; font-weight: 600; margin: 32px 0 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* Topbar */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.actions { display: flex; gap: 8px; }

/* Boutons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .08s ease, transform .04s ease;
}
.btn:hover { background: var(--panel-hi); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost { background: transparent; }
.btn-small { padding: 6px 12px; font-size: 12px; }

/* Login */
.login-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 24px;
  max-width: 400px;
  margin: 80px auto 0;
}
.login-card .sub { color: var(--muted); margin: 4px 0 24px; font-size: 13px; }
.login-card label { display: block; font-size: 13px; margin: 8px 0 6px; color: var(--muted); }
.login-card input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  margin-bottom: 16px;
}
.login-card input[type="password"]:focus {
  outline: none;
  border-color: var(--accent);
}
.login-card .btn { width: 100%; }
.divider {
  display: flex; align-items: center; text-align: center;
  color: var(--muted); font-size: 12px;
  margin: 16px 0;
}
.divider::before, .divider::after {
  content: ""; flex: 1; height: 1px; background: var(--border);
}
.divider span { padding: 0 12px; }
.error {
  color: var(--bad);
  font-size: 13px;
  margin-bottom: 12px;
  padding: 6px 10px;
  background: rgba(248, 81, 73, 0.1);
  border-radius: 6px;
}

/* Scan card */
.scan-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}
.scan-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.status-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.status-text { font-size: 20px; font-weight: 600; margin-top: 4px; }
.status-text.running { color: var(--warn); }
.status-text.done { color: var(--accent-strong); }
.status-text.error { color: var(--bad); }

.progress-wrap {
  display: flex; align-items: center; gap: 12px;
  margin-top: 16px;
}
.progress-bar {
  flex: 1;
  height: 8px;
  background: var(--bg);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.progress-fill {
  height: 100%;
  background: var(--accent-strong);
  transition: width .3s ease;
}
.progress-pct {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 12px;
  min-width: 40px;
  text-align: right;
}

.log {
  margin-top: 16px;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--muted);
  max-height: 240px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.log .phase { color: var(--accent-strong); font-weight: 600; }
.log .err { color: var(--bad); }

/* Reports list */
.reports-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.reports-list li a {
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  transition: border-color .08s ease, transform .04s ease;
}
.reports-list li a:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.r-name { font-weight: 600; }
.r-meta { color: var(--muted); font-size: 12px; }
.muted { color: var(--muted); font-size: 13px; }
