:root {
  --bg: #0f1115;
  --panel: #1a1d24;
  --border: #2a2e38;
  --text: #e6e8ec;
  --muted: #8a909c;
  --accent: #4f8cff;
  --pass: #2ecc71;
  --fail: #e74c3c;
  --flag: #f1c40f;
  --review: #e67e22;
  --na: #7f8c8d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

header h1 { font-size: 1.4rem; margin: 0; }

.tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
}

.trigger, .results {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

form { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; }

label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.85rem; flex: 1 1 240px; }

.muted { color: var(--muted); font-weight: normal; }

input {
  background: #0c0e12;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 0.55rem 0.7rem;
  font-size: 0.9rem;
}

button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1.1rem;
  font-size: 0.9rem;
  cursor: pointer;
}

button:disabled { opacity: 0.5; cursor: progress; }

.status { color: var(--muted); font-size: 0.85rem; margin: 0.75rem 0 0; }
.status.error { color: var(--fail); }

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.results-header .meta { margin-bottom: 0; }

#pdf-btn { background: #0F2A43; white-space: nowrap; }

.meta { color: var(--muted); font-size: 0.8rem; margin-bottom: 1rem; }

table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th, td { text-align: left; padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; }
td.num { color: var(--muted); width: 2.5rem; }

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  color: #0c0e12;
}
.badge.PASS { background: var(--pass); }
.badge.FAIL { background: var(--fail); color: #fff; }
.badge.FLAG { background: var(--flag); }
.badge.NEEDS_REVIEW { background: var(--review); color: #fff; }
.badge.NA { background: var(--na); color: #fff; }

.detail { color: var(--text); }
.detail .incomplete { color: var(--review); font-size: 0.78rem; }
