/* blr-clojure.org — a dark, REPL-inspired theme */

:root {
  --bg:            #0f1115;
  --bg-alt:        #15181f;
  --bg-card:       #1a1e26;
  --border:        #2a2f3a;
  --text:          #e4e6eb;
  --text-muted:    #8b909c;
  --accent:        #7ee787;
  --accent-dim:    #3fb950;
  --accent-2:      #79c0ff;
  --danger:        #f85149;
  --danger-dim:    #3a1d1d;
  --ok-dim:        #16301c;
  --radius:        8px;
  --mono: "SFMono-Regular", "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.5;
}

#app { min-height: 100vh; display: flex; flex-direction: column; }

.boot-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  font-family: var(--mono);
  color: var(--text-muted);
}

code, .footer-code {
  font-family: var(--mono);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.4em;
  color: var(--accent);
  font-size: 0.9em;
}

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

h1, h2, h3 { font-family: var(--mono); font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 2rem; margin: 0 0 0.5rem; }
h2 { font-size: 1.4rem; margin: 0 0 1rem; color: var(--accent); }
h3 { font-size: 1.1rem; margin: 0 0 0.4rem; }

.app-shell { display: flex; flex-direction: column; min-height: 100vh; }

/* ---------- navbar ---------- */

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
  position: sticky;
  top: 0;
  z-index: 10;
}

.navbar-brand a {
  font-family: var(--mono);
  font-size: 1.2rem;
  color: var(--text);
}

.brand-accent { color: var(--accent); }

.navbar-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.nav-link {
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--text-muted);
}

.nav-link:hover { color: var(--text); text-decoration: none; }
.nav-link.active { color: var(--accent); }

.navbar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: 0.5rem;
  padding-left: 1rem;
  border-left: 1px solid var(--border);
}

.navbar-username { font-family: var(--mono); color: var(--accent-2); }

.link-button {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0;
}

.link-button:hover { color: var(--accent-2); text-decoration: underline; }

/* ---------- banner ---------- */

.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 2rem;
  font-family: var(--mono);
  font-size: 0.9rem;
}

.banner-ok    { background: var(--ok-dim); color: var(--accent); }
.banner-error { background: var(--danger-dim); color: var(--danger); }

.banner-close {
  background: none;
  border: none;
  color: inherit;
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}

/* ---------- layout ---------- */

.main-content { flex: 1; }

.page { max-width: 1080px; margin: 0 auto; padding: 2.5rem 2rem 4rem; }
.page-narrow { max-width: 420px; }

.section { margin-top: 2.5rem; }
.section-alt {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.muted { color: var(--text-muted); }

/* ---------- hero ---------- */

.hero { padding: 2rem 0 1rem; }
.hero-tagline { font-family: var(--mono); color: var(--accent-2); font-size: 1.1rem; margin: 0 0 1rem; }
.hero-body { max-width: 640px; color: var(--text-muted); }
.hero-actions { display: flex; gap: 1rem; margin-top: 1.5rem; flex-wrap: wrap; }

/* ---------- buttons ---------- */

.button {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.95rem;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
}

.button:hover { border-color: var(--accent-2); text-decoration: none; }

.button-primary {
  background: var(--accent-dim);
  border-color: var(--accent-dim);
  color: #06240b;
  font-weight: 600;
}

.button-primary:hover { background: var(--accent); border-color: var(--accent); }

/* ---------- cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  position: relative;
}

.card-meta { font-family: var(--mono); font-size: 0.82rem; color: var(--text-muted); margin: 0.15rem 0 0.6rem; }

.card-status {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  margin-bottom: 0.6rem;
}

.status-proposed { background: #2d2a13; color: #e3c766; }
.status-accepted { background: var(--ok-dim); color: var(--accent); }
.status-rejected { background: var(--danger-dim); color: var(--danger); }
.status-done     { background: #14232f; color: var(--accent-2); }

/* ---------- feature grid ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.feature p { color: var(--text-muted); margin: 0; }

/* ---------- forms ---------- */

.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 480px;
}

.form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.form input,
.form textarea,
.form select {
  font-family: var(--sans);
  font-size: 0.95rem;
  padding: 0.6rem 0.7rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
}

.form input:focus,
.form textarea:focus,
.form select:focus {
  outline: none;
  border-color: var(--accent-2);
}

.form textarea { min-height: 90px; resize: vertical; }

/* ---------- admin ---------- */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}

.stat-number { font-family: var(--mono); font-size: 2rem; color: var(--accent); }
.stat-label  { font-family: var(--mono); font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; }

.tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.tab {
  font-family: var(--mono);
  font-size: 0.9rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  padding: 0.6rem 0.2rem;
  margin-right: 1.25rem;
  cursor: pointer;
}

.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-table th {
  text-align: left;
  font-family: var(--mono);
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: 0.6rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

.footer p { margin: 0.25rem 0; }
