/* ── reset + tokens ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0b0d14;
  --surface: #131720;
  --surface-2: #1a1f2e;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.12);
  --text: #e2e8f0;
  --text-dim: #94a3b8;
  --text-faint: #64748b;
  --text-fainter: #475569;
  --accent: #14b8a6;
  --teal: #14b8a6;
  --amber: #f59e0b;
  --green: #22c55e;
  --red: #ef4444;
  --orange: #f97316;
  --purple: #a78bfa;
  --rose: #f43f5e;
  --sky: #38bdf8;
  --radius: 10px;
}

html { color-scheme: dark; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── buttons ─────────────────────────────────────────────────────────── */
.btn-ghost {
  background: transparent; color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 12px; font-size: 12px; font-weight: 500;
  transition: border-color .15s, color .15s;
}
.btn-ghost:hover { border-color: var(--border-strong); color: var(--text); }

.btn-primary {
  background: var(--accent); color: #04212a;
  border: none; border-radius: 8px;
  padding: 10px 20px; font-size: 13px; font-weight: 600;
  font-family: inherit;
}
.btn-primary:hover { background: #0d9488; }

/* ── login page ──────────────────────────────────────────────────────── */
.login-shell {
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 24px;
}
.login-card {
  width: min(100%, 340px);
  padding: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.login-card .brand-mark {
  width: 44px; height: 44px;
  margin: 0 auto 18px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--teal), var(--purple));
  color: white;
  font-size: 13px; font-weight: 700; letter-spacing: .02em;
}
.login-card h1 {
  margin-bottom: 6px;
  font-size: 22px; font-weight: 700;
}
.login-card p {
  margin-bottom: 28px;
  color: var(--text-faint);
  font-size: 13px;
}
.google-button {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  padding: 12px 18px;
  background: white;
  color: #1e293b;
  border-radius: 8px;
  font-size: 14px; font-weight: 600;
  text-decoration: none;
  transition: background .15s;
}
.google-button:hover { background: #f1f5f9; text-decoration: none; }
.login-card small {
  display: block;
  margin-top: 16px;
  color: var(--text-fainter);
  font-size: 11px;
}

/* ── pills (generic) ─────────────────────────────────────────────────── */
.pills { display: flex; gap: 4px; flex-wrap: wrap; }
.pill {
  background: var(--surface); color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 4px 10px; font-size: 11px; font-weight: 500;
  transition: border-color .12s, color .12s, background .12s;
}
.pill:hover { color: var(--text); border-color: var(--border-strong); }
.pill.active {
  background: rgba(20, 184, 166, 0.12);
  border-color: rgba(20, 184, 166, 0.4);
  color: var(--accent);
}
.pill.danger.active {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--red);
}

/* ── splash / loading + auth gate ────────────────────────────────────── */
.splash {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .25s;
}
.splash.splash-static { position: static; height: 100vh; }
.splash.hidden { opacity: 0; pointer-events: none; }
.splash-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 36px 40px; text-align: center; max-width: 380px;
}
.splash-mark {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, var(--teal), var(--purple));
  margin: 0 auto 14px;
  display: grid; place-items: center;
  color: white; font-size: 12px; font-weight: 700;
}
.splash-mark::after { content: "EI"; }
.splash-card h1 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.splash-card p { font-size: 13px; color: var(--text-faint); margin-bottom: 16px; }
.splash-error { color: var(--red); font-size: 12px; margin-top: 8px; }

/* ── modal shell (chrome only; contents are page-specific) ───────────── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0, 0, 0, 0.7);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-backdrop[hidden] { display: none; }
.modal-card {
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 14px;
  width: 100%; max-width: 760px; max-height: 86vh; display: flex; flex-direction: column;
}
.modal-head {
  padding: 18px 22px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.modal-head h2 { font-size: 15px; font-weight: 700; color: var(--text); }
.modal-close {
  background: none; border: none; color: var(--text-faint);
  font-size: 26px; line-height: 1; padding: 0 4px;
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 18px 22px; overflow-y: auto; }
