/* ── tokens ─────────────────────────────────────────────────────────────── */
:root {
  --bg:        #0f1117;
  --bg-2:      #161b27;
  --bg-3:      #1e2436;
  --border:    #2a3347;
  --border-2:  #3a4a66;
  --text:      #c8d0e0;
  --text-2:    #7a8aa8;
  --text-3:    #4a5878;
  --accent:    #4f9cf9;
  --accent-dim:#1a3d6e;
  --green:     #3ddc84;
  --green-dim: #1a3d28;
  --red:       #ff5f6d;
  --red-dim:   #3d1820;
  --amber:     #f5a623;
  --amber-dim: #3d2a0a;
  --purple:    #a78bfa;
  --radius:    6px;
  --mono:      'IBM Plex Mono', 'Courier New', monospace;
  --sans:      'Inter', system-ui, sans-serif;
}

/* ── reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── layout ─────────────────────────────────────────────────────────────── */
.container { max-width: 860px; margin: 0 auto; padding: 0 20px; }
.site-main { flex: 1; padding: 36px 0 60px; }

/* ── header ─────────────────────────────────────────────────────────────── */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
}
.site-header .container { display: flex; align-items: center; gap: 20px; }
.site-logo {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.site-logo:hover { text-decoration: none; color: var(--accent); }
.logo-bracket { color: var(--accent); }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.nav-username { font-family: var(--mono); font-size: 0.8rem; color: var(--text-2); }
.nav-link { font-size: 0.875rem; color: var(--text-2); }
.nav-link:hover { color: var(--text); text-decoration: none; }
.nav-link--cta {
  background: var(--accent-dim);
  color: var(--accent);
  padding: 5px 12px;
  border-radius: var(--radius);
  font-size: 0.8rem;
}
.nav-link--cta:hover { background: var(--accent); color: #fff; }
.btn-link { background: none; border: none; cursor: pointer; font: inherit; }

/* ── footer ─────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 14px 0;
  font-size: 0.78rem;
  color: var(--text-3);
  font-family: var(--mono);
}

/* ── breadcrumb ─────────────────────────────────────────────────────────── */
.breadcrumb {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-2);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-2); }
.breadcrumb a:hover { color: var(--accent); text-decoration: none; }
.crumb-sep { color: var(--text-3); }

/* ── page header ────────────────────────────────────────────────────────── */
.page-header {
  margin-bottom: 32px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.page-header--project { padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.page-title {
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.02em;
}
.page-subtitle { color: var(--text-2); font-size: 0.9rem; margin-top: 6px; }
.page-header__actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* ── buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-family: var(--sans);
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.btn--primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn--primary:hover { background: #3a82e0; text-decoration: none; color: #fff; }
.btn--ghost { background: transparent; color: var(--text-2); border-color: var(--border-2); }
.btn--ghost:hover { background: var(--bg-3); color: var(--text); text-decoration: none; }
.btn--danger { background: var(--red-dim); color: var(--red); border-color: var(--red-dim); }
.btn--danger:hover { background: var(--red); color: #fff; text-decoration: none; }
.btn--sm { padding: 5px 10px; font-size: 0.8rem; }
.btn--xs { padding: 3px 8px; font-size: 0.75rem; }

/* ── project grid ───────────────────────────────────────────────────────── */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.project-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  display: block;
  transition: border-color 0.15s, background 0.15s;
}
.project-card:hover { border-color: var(--accent); background: var(--bg-3); text-decoration: none; }
.project-card__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.project-card__title { font-family: var(--mono); font-size: 0.95rem; font-weight: 500; color: var(--text); }
.project-card__desc { font-size: 0.85rem; color: var(--text-2); line-height: 1.5; margin-bottom: 12px; }

/* ── board list ─────────────────────────────────────────────────────────── */
.board-list { display: flex; flex-direction: column; gap: 2px; }
.board-row {
  display: grid;
  grid-template-columns: 40px 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s;
}
.board-row:hover { border-color: var(--border-2); text-decoration: none; }
.board-row__icon { font-size: 1.2rem; text-align: center; }
.board-row__title { font-weight: 500; color: var(--text); font-size: 0.9rem; }
.board-row__desc { font-size: 0.8rem; color: var(--text-2); margin-top: 2px; }
.board-row__stats { display: flex; gap: 8px; flex-wrap: wrap; }
.board-row__last { text-align: right; min-width: 100px; }
.last-post-time { font-size: 0.78rem; color: var(--text-2); display: block; font-family: var(--mono); }
.last-post-by { font-size: 0.75rem; color: var(--text-3); font-family: var(--mono); }

/* ── thread list ────────────────────────────────────────────────────────── */
.thread-list { display: flex; flex-direction: column; gap: 2px; }
.thread-row {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s;
}
.thread-row:hover { border-color: var(--border-2); text-decoration: none; }
.thread-row--pinned { border-color: var(--accent-dim); background: #111827; }
.thread-row__meta-left { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.thread-row__title { font-size: 0.9rem; font-weight: 500; color: var(--text); }
.thread-row__byline { font-size: 0.78rem; color: var(--text-2); margin-top: 3px; font-family: var(--mono); }
.thread-row__stats { text-align: right; }
.stat { font-size: 0.8rem; color: var(--text-2); display: block; font-family: var(--mono); }

/* ── thread header ──────────────────────────────────────────────────────── */
.thread-header { margin-bottom: 28px; border-bottom: 1px solid var(--border); padding-bottom: 20px; }
.thread-title { font-family: var(--mono); font-size: 1.3rem; font-weight: 500; margin-bottom: 10px; color: var(--text); }
.thread-header__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.thread-header__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ── posts ──────────────────────────────────────────────────────────────── */
.post-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 36px; }
.post {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 20px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
}
.post--op { border-color: var(--accent-dim); }
.post__author { border-right: 1px solid var(--border); padding-right: 16px; }
.avatar-circle {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 1rem;
  margin-bottom: 8px;
}
.post__author-name { font-family: var(--mono); font-size: 0.8rem; color: var(--accent); }
.post__author-time { font-size: 0.75rem; color: var(--text-3); margin-top: 4px; font-family: var(--mono); }
.post__edited { font-size: 0.7rem; color: var(--text-3); margin-top: 4px; font-style: italic; }
.post__body { font-size: 0.9rem; line-height: 1.75; min-width: 0; }
.post__actions { margin-top: 16px; display: flex; gap: 8px; }
.post__edit-form { margin-top: 12px; }

/* markdown body */
.post__body h1, .post__body h2, .post__body h3 { font-family: var(--mono); font-weight: 500; color: var(--text); margin: 18px 0 8px; }
.post__body p { margin-bottom: 12px; }
.post__body code { font-family: var(--mono); font-size: 0.82em; background: var(--bg-3); color: var(--green); padding: 2px 5px; border-radius: 3px; }
.post__body pre { background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; overflow-x: auto; margin-bottom: 12px; }
.post__body pre code { background: none; padding: 0; color: var(--text); }
.post__body blockquote { border-left: 3px solid var(--border-2); padding-left: 14px; color: var(--text-2); margin-bottom: 12px; }
.post__body ul, .post__body ol { padding-left: 20px; margin-bottom: 12px; }
.post__body li { margin-bottom: 4px; }
.post__body a { color: var(--accent); }
.post__body hr { border: none; border-top: 1px solid var(--border); margin: 18px 0; }

/* ── reply box ──────────────────────────────────────────────────────────── */
.reply-box {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
}
.reply-box--locked { text-align: center; }
.reply-box__title { font-family: var(--mono); font-size: 0.95rem; font-weight: 500; margin-bottom: 6px; }
.reply-box__hint { font-size: 0.78rem; color: var(--text-2); margin-bottom: 14px; font-family: var(--mono); }

/* ── forms ──────────────────────────────────────────────────────────────── */
.form-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px;
  max-width: 640px;
}
.form-group { margin-bottom: 20px; }
.label { display: block; font-size: 0.82rem; font-weight: 500; color: var(--text-2); margin-bottom: 6px; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.04em; }
.label-hint { font-weight: 400; text-transform: none; letter-spacing: 0; font-family: var(--sans); color: var(--text-3); }
.input {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.9rem;
  padding: 9px 12px;
  transition: border-color 0.15s;
  outline: none;
  appearance: none;
}
.input:focus { border-color: var(--accent); }
.textarea { resize: both; }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.status-select {
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  padding: 4px 8px;
  font-size: 0.8rem;
  cursor: pointer;
}

/* ── auth ───────────────────────────────────────────────────────────────── */
.auth-wrap { max-width: 400px; margin: 0 auto; }
.auth-title { font-family: var(--mono); font-size: 1.4rem; margin-bottom: 8px; }
.auth-note { font-size: 0.82rem; color: var(--text-2); margin-bottom: 20px; }
.auth-switch { margin-top: 16px; font-size: 0.85rem; color: var(--text-2); }

/* ── badges and status ──────────────────────────────────────────────────── */
.status-badge {
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}
.status--active, .status-badge--status-open { background: var(--green-dim); color: var(--green); }
.status--paused, .status-badge--status-planned, .status-badge--status-confirmed { background: var(--amber-dim); color: var(--amber); }
.status--archived, .status-badge--status-wontfix { background: var(--bg-3); color: var(--text-3); }
.status-badge--status-fixed, .status-badge--status-shipped { background: var(--accent-dim); color: var(--accent); }
.status-badge--status-open { background: var(--green-dim); color: var(--green); }

.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.status-dot--open { background: var(--green); }
.status-dot--confirmed { background: var(--amber); }
.status-dot--fixed, .status-dot--shipped { background: var(--accent); }
.status-dot--wontfix, .status-dot--planned { background: var(--text-3); }

.pin-badge {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.lock-badge {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── tags ───────────────────────────────────────────────────────────────── */
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag-list--sm { margin-top: 6px; }
.tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--purple);
  background: #1e1a36;
  border: 1px solid #3a2f6e;
  padding: 2px 7px;
  border-radius: 10px;
}

/* ── stat pills ─────────────────────────────────────────────────────────── */
.stat-pill {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-3);
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 10px;
}

/* ── filter row ─────────────────────────────────────────────────────────── */
.filter-row { display: flex; gap: 8px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.filter-label { font-family: var(--mono); font-size: 0.78rem; color: var(--text-3); }
.filter-chip {
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--text-2);
  background: var(--bg-2);
}
.filter-chip:hover, .filter-chip--active { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ── alerts ─────────────────────────────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: var(--radius); font-size: 0.875rem; margin-bottom: 20px; }
.alert--error { background: var(--red-dim); border: 1px solid var(--red); color: var(--red); }

/* ── empty state ────────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-title { font-family: var(--mono); font-size: 1rem; color: var(--text-2); margin-bottom: 16px; }
.empty-sub { font-size: 0.85rem; color: var(--text-3); }

/* ── error page ─────────────────────────────────────────────────────────── */
.error-page { text-align: center; padding: 80px 20px; }
.error-page__title { font-family: var(--mono); font-size: 1.5rem; margin-bottom: 12px; }
.error-page__message { color: var(--text-2); margin-bottom: 24px; }

/* ── utils ──────────────────────────────────────────────────────────────── */
.muted { color: var(--text-3); }

/* ── responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .post { grid-template-columns: 1fr; }
  .post__author { border-right: none; border-bottom: 1px solid var(--border); padding-right: 0; padding-bottom: 12px; margin-bottom: 12px; display: flex; gap: 12px; align-items: center; }
  .board-row { grid-template-columns: 30px 1fr; }
  .board-row__stats, .board-row__last { display: none; }
  .thread-row { grid-template-columns: 20px 1fr; }
  .thread-row__stats { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ── header search ──────────────────────────────────────────────────────── */
.header-inner { display: flex; align-items: center; gap: 16px; }
.header-search { flex: 1; max-width: 260px; }
.header-search__input {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.82rem;
  padding: 6px 10px;
  outline: none;
  transition: border-color 0.15s;
}
.header-search__input:focus { border-color: var(--accent); }
.header-search__input::placeholder { color: var(--text-3); }

/* ── footer ─────────────────────────────────────────────────────────────── */
.footer-inner { display: flex; justify-content: space-between; align-items: center; }
.footer-links { display: flex; gap: 16px; }
.footer-link { color: var(--text-3); font-size: 0.78rem; font-family: var(--mono); }
.footer-link:hover { color: var(--text-2); }

/* ── nav rss icon ───────────────────────────────────────────────────────── */
.nav-link--icon { display: flex; align-items: center; gap: 4px; }

/* ── search page ────────────────────────────────────────────────────────── */
.search-form { margin-bottom: 28px; }
.search-input-wrap { display: flex; gap: 10px; }
.search-input { flex: 1; }
.search-meta { margin-bottom: 16px; font-size: 0.85rem; }
.search-results { display: flex; flex-direction: column; gap: 2px; }
.search-result {
  display: block;
  padding: 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s;
}
.search-result:hover { border-color: var(--border-2); text-decoration: none; }
.search-result__crumb { font-family: var(--mono); font-size: 0.72rem; color: var(--text-3); margin-bottom: 4px; }
.search-result__title { font-size: 0.9rem; font-weight: 500; color: var(--text); margin-bottom: 6px; }
.search-result__snippet { font-size: 0.82rem; color: var(--text-2); line-height: 1.5; margin-bottom: 8px; font-family: var(--mono); }
.search-result__meta { font-family: var(--mono); font-size: 0.72rem; color: var(--text-3); }

/* ── profile ────────────────────────────────────────────────────────────── */
.profile-header {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.profile-avatar__img {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-2);
}
.profile-avatar__placeholder {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono);
  font-size: 1.8rem;
  font-weight: 500;
  flex-shrink: 0;
}
.profile-info { flex: 1; }
.profile-username { font-family: var(--mono); font-size: 1.4rem; font-weight: 500; margin-bottom: 8px; }
.profile-meta { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.profile-bio { font-size: 0.88rem; color: var(--text-2); line-height: 1.6; max-width: 500px; }
.profile-joined, .profile-posts { font-family: var(--mono); font-size: 0.78rem; }

.role-badge {
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.role-badge--owner { background: var(--amber-dim); color: var(--amber); }
.role-badge--mod { background: var(--accent-dim); color: var(--accent); }
.role-badge--member { background: var(--bg-3); color: var(--text-3); border: 1px solid var(--border); }

.section-title { font-family: var(--mono); font-size: 0.9rem; font-weight: 500; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 16px; }

/* ── activity list ──────────────────────────────────────────────────────── */
.activity-list { display: flex; flex-direction: column; gap: 2px; }
.activity-row {
  display: block;
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s;
}
.activity-row:hover { border-color: var(--border-2); text-decoration: none; }
.activity-row__meta { font-family: var(--mono); font-size: 0.72rem; color: var(--text-3); margin-bottom: 4px; }
.activity-project { color: var(--accent); }
.activity-sep { margin: 0 4px; }
.activity-board { color: var(--text-3); }
.activity-row__thread { font-size: 0.88rem; font-weight: 500; color: var(--text); margin-bottom: 4px; }
.activity-row__snippet { font-size: 0.8rem; color: var(--text-2); line-height: 1.5; margin-bottom: 6px; }
.activity-row__time { font-family: var(--mono); font-size: 0.72rem; }

/* ── avatar upload ──────────────────────────────────────────────────────── */
.avatar-upload { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.avatar-preview { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border-2); }
.avatar-placeholder {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--accent-dim); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 1.8rem; font-weight: 500;
}

/* ── nav username as link ───────────────────────────────────────────────── */
.nav-username {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-2);
  text-decoration: none;
}
.nav-username:hover { color: var(--accent); text-decoration: none; }

/* ── responsive additions ───────────────────────────────────────────────── */
@media (max-width: 600px) {
  .header-search { display: none; }
  .profile-header { flex-direction: column; }
  .footer-inner { flex-direction: column; gap: 8px; text-align: center; }
}

/* ── nav role badge ─────────────────────────────────────────────────────── */
.nav-role-badge {
  font-family: var(--mono);
  font-size: 0.62rem;
  padding: 1px 5px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  vertical-align: middle;
  margin-left: 4px;
}
.nav-role-badge--mod { background: var(--accent-dim); color: var(--accent); }
.nav-role-badge--owner { background: var(--amber-dim); color: var(--amber); }

/* ── alert success ──────────────────────────────────────────────────────── */
.alert--success { background: var(--green-dim); border: 1px solid var(--green); color: var(--green); }

/* ── admin table ────────────────────────────────────────────────────────── */
.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 40px;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.admin-table thead th {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}
.admin-table__row { border-bottom: 1px solid var(--border); transition: background 0.1s; }
.admin-table__row:last-child { border-bottom: none; }
.admin-table__row:hover { background: var(--bg-2); }
.admin-table__row--mod { background: #0d1d2e; }
.admin-table__row--mod:hover { background: #101f30; }
.admin-table td { padding: 12px 16px; vertical-align: middle; }
.admin-table__user { display: flex; align-items: center; gap: 10px; }
.admin-table__num { font-family: var(--mono); font-size: 0.82rem; color: var(--text-2); }
.admin-table__date { font-family: var(--mono); font-size: 0.75rem; color: var(--text-3); white-space: nowrap; }
.admin-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.admin-avatar-placeholder {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent-dim); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 0.75rem; font-weight: 500;
  flex-shrink: 0;
}
.admin-username { font-family: var(--mono); font-size: 0.85rem; color: var(--text); }
.admin-username:hover { color: var(--accent); text-decoration: none; }
.role-form { display: inline; }
.role-select {
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  padding: 4px 8px;
  font-size: 0.8rem;
  font-family: var(--mono);
  cursor: pointer;
}
.role-select:focus { outline: none; border-color: var(--accent); }

/* ── permissions legend ─────────────────────────────────────────────────── */
.admin-legend { margin-top: 8px; }
.perm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.perm-col {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}
.perm-col__header { display: block; margin-bottom: 14px; }
.perm-list { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.perm-list li { font-size: 0.82rem; padding-left: 18px; position: relative; }
.perm-yes::before { content: '✓'; position: absolute; left: 0; color: var(--green); font-weight: 500; }
.perm-no::before  { content: '✗'; position: absolute; left: 0; color: var(--text-3); }
.perm-yes { color: var(--text); }
.perm-no  { color: var(--text-3); }

@media (max-width: 600px) {
  .perm-grid { grid-template-columns: 1fr; }
}

/* ── project description markdown ──────────────────────────────────────── */
.project-desc { color: var(--text-2); font-size: 0.9rem; line-height: 1.7; margin-top: 6px; }
.project-desc p { margin-bottom: 6px; }
.project-desc p:last-child { margin-bottom: 0; }
.project-desc a { color: var(--accent); }
.project-desc a:hover { text-decoration: underline; }
.project-desc code { font-family: var(--mono); font-size: 0.82em; background: var(--bg-3); color: var(--green); padding: 2px 5px; border-radius: 3px; }

/* ── contributor role ───────────────────────────────────────────────────── */
.role-badge--contributor { background: #1a2e1a; color: var(--green); border: 1px solid #2a4a2a; }
.nav-role-badge--contributor { background: #1a2e1a; color: var(--green); }
.admin-table__row--contributor { background: #0d1a0d; }
.admin-table__row--contributor:hover { background: #0f1e0f; }

/* ── 4-col perm grid ────────────────────────────────────────────────────── */
.perm-grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ── project byline ─────────────────────────────────────────────────────── */
.project-byline { font-size: 0.8rem; margin-top: 6px; font-family: var(--mono); }
.project-byline a { color: var(--text-2); }
.project-byline a:hover { color: var(--accent); }

@media (max-width: 700px) {
  .perm-grid--4 { grid-template-columns: repeat(2, 1fr); }
}

/* ── post author role badge ─────────────────────────────────────────────── */
.role-badge--sm {
  font-size: 0.65rem;
  padding: 1px 6px;
  display: inline-block;
  margin-top: 3px;
}
.post__author-name {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
  display: block;
}
.post__author-name:hover { text-decoration: underline; }

/* ── danger zone ────────────────────────────────────────────────────────── */
.danger-zone {
  margin-top: 32px;
  border: 1px solid var(--red);
  border-radius: 10px;
  padding: 20px 24px;
  max-width: 640px;
  background: var(--red-dim);
}
.danger-zone__title {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.danger-zone__desc {
  font-size: 0.85rem;
  color: var(--text-2);
  margin-bottom: 16px;
  line-height: 1.5;
}

/* ── honeypot ────────────────────────────────────────────────────────────── */
.hp-field {
  display: none;
}

/* ── captcha input ───────────────────────────────────────────────────────── */
.captcha-input { max-width: 140px; font-family: var(--mono); }

/* ── pending / verify box ────────────────────────────────────────────────── */
.auth-wrap--wide { max-width: 500px; }
.pending-box {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 32px;
  text-align: center;
}
.pending-icon { font-size: 2.5rem; margin-bottom: 16px; }
.pending-desc { color: var(--text-2); font-size: 0.9rem; line-height: 1.6; margin-bottom: 12px; }
.pending-note { font-size: 0.82rem; color: var(--text-3); font-family: var(--mono); }

/* ── verified badges ─────────────────────────────────────────────────────── */
.verified-badge {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--green);
  background: var(--green-dim);
  padding: 2px 7px;
  border-radius: 10px;
}
.unverified-badge {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--amber);
  background: var(--amber-dim);
  padding: 2px 7px;
  border-radius: 10px;
}
