@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Outfit:wght@300;400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a0a;
  --surface: #111113;
  --surface-2: #19191d;
  --border: #27272a;
  --border-hover: #3f3f46;
  --text: #fafafa;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --green: #22c55e;
  --green-bg: #052e16;
  --red: #ef4444;
  --red-bg: #450a0a;
  --yellow: #eab308;
  --yellow-bg: #422006;
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Outfit', sans-serif;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Flash messages ────────────────────────────────────── */
.flash {
  padding: .7rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: .9rem;
  border: 1px solid;
}
.flash-success { background: var(--green-bg); border-color: #166534; color: var(--green); }
.flash-error   { background: var(--red-bg);   border-color: #7f1d1d; color: var(--red); }

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1rem;
  font-family: var(--sans);
  font-size: .85rem;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  transition: all .15s;
}
.btn:hover { border-color: var(--border-hover); background: #222; text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: var(--red-bg); border-color: #7f1d1d; }
.btn-sm { padding: .3rem .6rem; font-size: .8rem; }

/* ── Forms ──────────────────────────────────────────────── */
.input {
  width: 100%;
  padding: .55rem .75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--sans);
  font-size: .9rem;
}
.input:focus { outline: none; border-color: var(--accent); }

label { display: block; font-size: .8rem; color: var(--text-muted); margin-bottom: .3rem; font-weight: 500; }

/* ── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
}

/* ── Tables ─────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-dim);
  padding: .6rem .75rem;
  border-bottom: 1px solid var(--border);
}
td {
  padding: .6rem .75rem;
  font-size: .88rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }

/* ── Badges ─────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 4px;
  font-size: .75rem;
  font-weight: 600;
  font-family: var(--mono);
}
.badge-green { background: var(--green-bg); color: var(--green); border: 1px solid #166534; }
.badge-red   { background: var(--red-bg);   color: var(--red);   border: 1px solid #7f1d1d; }
.badge-blue  { background: #172554; color: #60a5fa; border: 1px solid #1e3a5f; }
.badge-yellow { background: var(--yellow-bg); color: var(--yellow); border: 1px solid #854d0e; }

.mono { font-family: var(--mono); font-size: .82rem; }
.text-muted { color: var(--text-muted); }
.text-dim { color: var(--text-dim); }
.text-sm { font-size: .85rem; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.gap-2 { gap: .5rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.inline-form { display: inline; }

/* ── Icons ──────────────────────────────────────────────── */
.icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.125em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.icon-lg { width: 1.6em; height: 1.6em; stroke-width: 1.5; }
.icon-xl { width: 2.4em; height: 2.4em; stroke-width: 1.5; }
