:root {
  color-scheme: light dark;
  --bg: #0f1115;
  --surface: #171a21;
  --border: #2a2e38;
  --text: #e6e8eb;
  --muted: #9aa1ac;
  --accent: #5b8cff;
  --danger: #e5533d;
  --ok: #3ecf8e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

header .brand {
  font-weight: 700;
  font-size: 1.1rem;
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem;
}

a {
  color: var(--accent);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

th {
  color: var(--muted);
  font-weight: 600;
}

code, textarea, input[type="text"], input[type="url"] {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

input[type="text"], input[type="url"], select, textarea {
  width: 100%;
  padding: 0.5rem;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
}

textarea {
  min-height: 6rem;
}

label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
  margin-top: 0.75rem;
}

button, .btn {
  display: inline-block;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 0.9rem;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
}

button.danger, .btn.danger {
  background: var(--danger);
}

button.secondary, .btn.secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.status {
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-delivered { background: rgba(62, 207, 142, 0.15); color: var(--ok); }
.status-matched { background: rgba(91, 140, 255, 0.15); color: var(--accent); }
.status-pending { background: rgba(154, 161, 172, 0.15); color: var(--muted); }
.status-filtered { background: rgba(154, 161, 172, 0.15); color: var(--muted); }
.status-deduped { background: rgba(154, 161, 172, 0.15); color: var(--muted); }
.status-failed { background: rgba(229, 83, 61, 0.15); color: var(--danger); }

.muted { color: var(--muted); font-size: 0.85rem; }

.login-box {
  max-width: 360px;
  margin: 4rem auto;
  text-align: center;
}
