:root {
  --bg: #0b0e13;
  --surface: #12161f;
  --surface-2: #171c27;
  --border: #222a38;
  --accent: #14b8a6;
  --accent-dim: #0d9488;
  --text: #e6e9ed;
  --muted: #8b93a1;
  --danger: #f87171;
  --warn: #fbbf24;
  --ok: #34d399;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

button {
  font: inherit;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 8px;
  transition: background .12s ease, border-color .12s ease;
}
button:hover { border-color: var(--accent); }
button.primary { background: var(--accent); border-color: var(--accent); color: #04110f; font-weight: 600; }
button.primary:hover { background: var(--accent-dim); }
button.ghost { background: transparent; border-color: transparent; color: var(--muted); }
button.ghost:hover { color: var(--text); border-color: transparent; }
button.small { padding: 4px 10px; font-size: 13px; border-radius: 6px; }
button:disabled { opacity: .5; cursor: not-allowed; }

input, select, textarea {
  font: inherit;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 8px;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
label { display: block; margin-bottom: 4px; color: var(--muted); font-size: 13px; }
.field { margin-bottom: 14px; }

/* shell */
.shell { max-width: 1040px; margin: 0 auto; padding: 0 20px 60px; }
nav {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}
.brand { font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.brand span { color: var(--accent); }
.links { display: flex; gap: 4px; flex: 1; }
.links a { color: var(--muted); padding: 6px 12px; border-radius: 8px; font-weight: 500; }
.links a:hover { color: var(--text); }
.links a.on { color: var(--accent); background: var(--surface-2); }
.user { display: flex; align-items: center; gap: 10px; font-size: 13px; }

/* cards + layout */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.card h2 { margin: 0 0 12px; font-size: 16px; font-weight: 600; }
.grid { display: grid; gap: 16px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .grid.cols-3 { grid-template-columns: 1fr; } }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.pill.active { background: rgba(52,211,153,.15); color: var(--ok); }
.pill.lapsed { background: rgba(251,191,36,.15); color: var(--warn); }
.pill.deceased, .pill.dnc { background: rgba(248,113,113,.15); color: var(--danger); }
.pill.prospect { background: rgba(139,147,161,.15); color: var(--muted); }

.list-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
}
.list-item:last-child { border-bottom: none; }
.list-item .name { font-weight: 600; }
.list-item .sub { color: var(--muted); font-size: 13px; }

/* stat band */
.statband { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
@media (max-width: 760px) { .statband { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.stat .num { font-size: 26px; font-weight: 700; }
.stat .lbl { color: var(--muted); font-size: 13px; }

/* auth */
.auth-wrap { max-width: 400px; margin: 8vh auto; }
.auth-wrap h1 { font-size: 24px; margin: 0 0 4px; }
.auth-wrap .tag { color: var(--muted); margin-bottom: 24px; }
.tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.tabs button { flex: 1; }
.tabs button.on { background: var(--accent); color: #04110f; border-color: var(--accent); font-weight: 600; }
.error { color: var(--danger); font-size: 13px; margin: 10px 0; min-height: 18px; }

/* empty state */
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty h3 { color: var(--text); margin: 0 0 8px; }

.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-head h2 { margin: 0; }
