/* =============================================
   ModVault — Main Stylesheet
   Theme: dark slate + grass green accent
   ============================================= */

:root {
  --green: #16a34a;
  --green-hover: #15803d;
  --green-light: #dcfce7;
  --green-text: #166534;
  --bg: #0f1117;
  --bg-card: #181c24;
  --bg-card-hover: #1e2330;
  --bg-sidebar: #141720;
  --border: #262c3a;
  --border-light: #1e2330;
  --text: #e8eaf0;
  --text-muted: #7c849a;
  --text-dim: #454d63;
  --accent: #16a34a;
  --red: #dc2626;
  --red-light: #fee2e2;
  --yellow: #d97706;
  --yellow-light: #fef3c7;
  --radius: 8px;
  --radius-lg: 12px;
}

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

html { font-size: 16px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

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

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.5rem;
  line-height: 1.2;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }

p { margin: 0 0 1rem; }

code {
  font-family: 'JetBrains Mono', 'Fira Mono', monospace;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.875em;
}

/* ── Container ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: 760px; }

/* ── Header ── */
.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.logo:hover { text-decoration: none; }
.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.site-nav a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
}
.site-nav a:hover { color: var(--text); }
.nav-avatar {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text) !important;
  font-weight: 500;
}
.nav-avatar img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}
.nav-avatar-initials {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.btn-primary:hover { background: var(--green-hover); border-color: var(--green-hover); text-decoration: none; color: white; }
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--bg-card-hover); color: var(--text); border-color: var(--border-light); text-decoration: none; }
.btn-ghost.active { background: var(--bg-card-hover); color: var(--text); }
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.82rem; }
.btn-full { width: 100%; justify-content: center; }
.btn-danger { background: var(--red); color: white; border-color: var(--red); }
.btn-danger:hover { background: #b91c1c; text-decoration: none; color: white; }
.btn-danger-ghost { color: var(--red) !important; }
.btn-danger-ghost:hover { background: #fee2e2 !important; color: var(--red) !important; border-color: #fca5a5 !important; }

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, #0d1421 0%, #0f1a0e 100%);
  border-bottom: 1px solid var(--border);
  padding: 5rem 0 4rem;
}
.hero .container { display: flex; flex-direction: column; gap: 3rem; }
.hero-content { max-width: 600px; }
.hero h1 { font-size: 3rem; margin-bottom: 1rem; }
.hero-accent { color: var(--green); }
.hero-sub { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 1.5rem; }
.hero-search {
  display: flex;
  gap: 0;
  max-width: 480px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.hero-search input {
  flex: 1;
  background: var(--bg-card);
  border: none;
  padding: 0.65rem 1rem;
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
}
.hero-search input::placeholder { color: var(--text-dim); }
.hero-search .btn { border-radius: 0; border: none; }
.hero-stats {
  display: flex;
  gap: 3rem;
}
.stat { display: flex; flex-direction: column; }
.stat-n { font-family: 'Space Grotesk', sans-serif; font-size: 2rem; font-weight: 700; color: var(--green); }
.stat-l { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }

/* ── Sections ── */
.section { padding: 3.5rem 0; }
.section-alt { background: var(--bg-card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.75rem; }
.section-header h2 { margin: 0; }
.section-more { font-size: 0.875rem; color: var(--text-muted); }
.section-more:hover { color: var(--green); }
.section-count { font-size: 0.875rem; color: var(--text-muted); font-weight: 400; margin-left: 0.5rem; }
.section-title { margin: 2rem 0 1.25rem; }

/* ── Mod card grid ── */
.mod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.mod-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}
.mod-card:hover { border-color: var(--green); transform: translateY(-2px); text-decoration: none; }
.mod-card-thumb { aspect-ratio: 16/9; overflow: hidden; background: var(--bg-sidebar); }
.mod-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mod-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a2620, #0d1a10);
}
.mod-card-placeholder span {
  font-size: 2.5rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: var(--green);
  text-transform: uppercase;
}
.mod-card-placeholder.sm .span { font-size: 1.2rem; }
.mod-card-placeholder.lg span { font-size: 3.5rem; }
.mod-card-body { padding: 1rem; flex: 1; }
.mod-card-name { font-size: 1rem; font-family: 'Space Grotesk', sans-serif; font-weight: 600; margin: 0 0 0.3rem; color: var(--text); }
.mod-card-summary { font-size: 0.82rem; color: var(--text-muted); margin: 0 0 0.75rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mod-card-meta { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; font-size: 0.78rem; color: var(--text-dim); }
.mod-card-author { color: var(--text-muted); }
.mod-card-dl { color: var(--text-muted); }
.mod-card-rating { color: #f59e0b; }

/* ── Browse layout ── */
.browse-layout { display: grid; grid-template-columns: 220px 1fr; gap: 2rem; align-items: start; }
.filter-sidebar { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; position: sticky; top: 76px; }
.filter-group { margin-bottom: 1.5rem; }
.filter-group:last-child { margin-bottom: 0; }
.filter-label { display: block; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-dim); margin-bottom: 0.6rem; }
.filter-option { display: flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0; font-size: 0.85rem; color: var(--text-muted); cursor: pointer; }
.filter-option input { accent-color: var(--green); }
.filter-option:hover { color: var(--text); }
.filter-count { margin-left: auto; color: var(--text-dim); font-size: 0.78rem; }
.filter-clear { display: block; font-size: 0.78rem; color: var(--text-dim); margin-top: 0.4rem; }
.filter-clear:hover { color: var(--red); }
.filter-select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0.4rem 0.7rem;
  font-size: 0.85rem;
  cursor: pointer;
}
.browse-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.browse-search { display: flex; gap: 0; flex: 1; max-width: 400px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.browse-search input { flex: 1; background: var(--bg-card); border: none; padding: 0.5rem 0.8rem; color: var(--text); font-size: 0.875rem; outline: none; }
.browse-search .btn { border-radius: 0; border: none; }
.sort-controls { display: flex; align-items: center; gap: 0.75rem; font-size: 0.85rem; color: var(--text-muted); }

/* ── Mod list items (browse) ── */
.mod-list { display: flex; flex-direction: column; gap: 0.75rem; }
.mod-list-item {
  display: flex;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  text-decoration: none;
  transition: border-color 0.15s;
}
.mod-list-item:hover { border-color: var(--green); text-decoration: none; }
.mod-list-thumb { width: 72px; height: 72px; flex-shrink: 0; border-radius: var(--radius); overflow: hidden; background: var(--bg-sidebar); }
.mod-list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mod-list-body { flex: 1; min-width: 0; }
.mod-list-top { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.25rem; }
.mod-list-name { font-size: 1.05rem; font-family: 'Space Grotesk', sans-serif; font-weight: 600; margin: 0; color: var(--text); }
.mod-list-summary { font-size: 0.85rem; color: var(--text-muted); margin: 0 0 0.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ── Mod detail ── */
.mod-detail-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  padding: 2rem 0;
}
.mod-detail-header {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.mod-detail-thumb { width: 120px; height: 120px; border-radius: var(--radius-lg); overflow: hidden; flex-shrink: 0; background: var(--bg-sidebar); }
.mod-detail-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mod-detail-top { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; }
.mod-detail-name { font-size: 1.75rem; margin-bottom: 0.4rem; }
.mod-detail-summary { color: var(--text-muted); font-size: 1rem; margin-bottom: 0.75rem; }
.mod-detail-meta { display: flex; align-items: center; gap: 0.75rem; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1rem; flex-wrap: wrap; }
.meta-sep { color: var(--text-dim); }
.mod-detail-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.mod-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.tag { background: var(--bg-sidebar); border: 1px solid var(--border); border-radius: 20px; padding: 3px 10px; font-size: 0.78rem; color: var(--text-muted); }
.mod-description {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  margin-bottom: 2rem;
  color: var(--text);
  line-height: 1.8;
}
.mod-description h1, .mod-description h2, .mod-description h3 { margin-top: 1.5rem; }
.mod-description code { font-size: 0.875em; }
.mod-description pre { background: var(--bg-sidebar); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; overflow-x: auto; }
.mod-section { border-top: 1px solid var(--border); padding-top: 1.5rem; margin-top: 1.5rem; }

/* ── Sidebar cards ── */
.mod-detail-sidebar { display: flex; flex-direction: column; gap: 1.25rem; }
.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.sidebar-card h3 { font-size: 0.95rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; margin-bottom: 0.85rem; }
.version-list { display: flex; flex-direction: column; gap: 0.75rem; }
.version-item { border-bottom: 1px solid var(--border-light); padding-bottom: 0.75rem; }
.version-item:last-child { border-bottom: none; padding-bottom: 0; }
.version-top { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 4px; }
.version-number { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 0.95rem; }
.version-mc, .version-loader { font-size: 0.78rem; color: var(--text-dim); }
.version-meta { display: flex; gap: 0.75rem; font-size: 0.78rem; color: var(--text-dim); margin: 4px 0; }
.version-changelog { font-size: 0.82rem; color: var(--text-muted); margin: 4px 0; }
.version-dl-btn { margin-top: 6px; }
.dep-list { display: flex; flex-direction: column; gap: 0.5rem; }
.dep-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.4rem 0; text-decoration: none; }
.dep-item:hover { text-decoration: none; }
.dep-thumb { width: 32px; height: 32px; border-radius: var(--radius); object-fit: cover; }
.dep-initial { width: 32px; height: 32px; border-radius: var(--radius); background: var(--bg-sidebar); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--green); font-size: 0.85rem; }
.dep-name { display: block; font-size: 0.9rem; color: var(--text); }
.dep-req { font-size: 0.75rem; color: var(--text-dim); }
.creator-card { display: flex; align-items: flex-start; gap: 0.75rem; text-decoration: none; }
.creator-card:hover { text-decoration: none; }
.creator-card-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.creator-card-initial { width: 44px; height: 44px; border-radius: 50%; background: var(--green); display: flex; align-items: center; justify-content: center; font-weight: 700; color: white; font-size: 1.1rem; }
.creator-card-bio { font-size: 0.82rem; color: var(--text-muted); margin: 0.25rem 0 0; }

/* Creator link in mod meta */
.creator-link { display: flex; align-items: center; gap: 6px; color: var(--green); font-size: 0.9rem; font-weight: 500; }
.creator-link:hover { text-decoration: underline; }
.creator-link-avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.creator-link-initial { width: 22px; height: 22px; border-radius: 50%; background: var(--green); color: white; font-size: 0.65rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* ── Star rating ── */
.star-rating { display: flex; flex-direction: row-reverse; gap: 2px; margin-bottom: 0.75rem; }
.star-rating input { display: none; }
.star-rating label { font-size: 1.6rem; color: var(--text-dim); cursor: pointer; transition: color 0.1s; }
.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label { color: #f59e0b; }
.rating-form { display: flex; flex-direction: column; gap: 0.5rem; }
.rating-summary { font-size: 0.82rem; color: var(--text-muted); margin: 0.5rem 0 0; }

/* ── Comments ── */
.comment-form { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.5rem; }
.comment-list { display: flex; flex-direction: column; gap: 1rem; }
.comment { border-left: 2px solid var(--border); padding-left: 1rem; }
.comment-author { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.35rem; font-size: 0.85rem; }
.comment-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.comment-initial { width: 24px; height: 24px; border-radius: 50%; background: var(--bg-sidebar); display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 700; color: var(--green); }
.comment-date { color: var(--text-dim); }
.comment-body { margin: 0; font-size: 0.9rem; color: var(--text-muted); white-space: pre-wrap; }

/* ── Creator profile ── */
.creator-profile { max-width: 900px; }
.creator-profile-header { display: flex; gap: 1.5rem; align-items: flex-start; margin-bottom: 2rem; }
.creator-profile-avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 3px solid var(--border); }
.creator-profile-initial { width: 96px; height: 96px; border-radius: 50%; background: var(--green); display: flex; align-items: center; justify-content: center; font-size: 2.5rem; font-weight: 700; color: white; flex-shrink: 0; }
.creator-profile-handle { color: var(--text-dim); font-size: 0.9rem; margin: 0.1rem 0 0.5rem; }
.creator-profile-bio { color: var(--text-muted); margin: 0.5rem 0; }
.creator-profile-stats { font-size: 0.85rem; color: var(--text-dim); margin: 0; }

/* ── Dashboard ── */
.dashboard-header { display: flex; align-items: center; justify-content: space-between; padding: 2rem 0 1.5rem; }
.page-sub { color: var(--text-muted); margin: 0.25rem 0 0; }
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}
.stat-card-n { font-family: 'Space Grotesk', sans-serif; font-size: 1.75rem; font-weight: 700; color: var(--green); }
.stat-card-l { font-size: 0.82rem; color: var(--text-dim); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 4px; }
.dashboard-mods { margin-bottom: 2rem; }
.dashboard-mods h2 { margin-bottom: 1rem; }
.dashboard-mod-list { display: flex; flex-direction: column; gap: 0.6rem; }
.dashboard-mod-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.9rem 1rem;
}
.dashboard-mod-thumb { width: 48px; height: 48px; border-radius: var(--radius); overflow: hidden; background: var(--bg-sidebar); flex-shrink: 0; }
.dashboard-mod-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dashboard-mod-info { flex: 1; min-width: 0; }
.dashboard-mod-top { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 3px; }
.dashboard-mod-meta { font-size: 0.8rem; color: var(--text-dim); margin: 0; }
.dashboard-mod-actions { display: flex; gap: 0.4rem; }
.dashboard-footer-links { display: flex; gap: 1.25rem; font-size: 0.875rem; color: var(--text-muted); padding: 1rem 0 2rem; }
.dashboard-footer-links a { color: var(--text-muted); }
.dashboard-footer-links a:hover { color: var(--green); }

/* ── Forms ── */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 1.25rem; }
.form-group:last-child { margin-bottom: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group label { font-size: 0.875rem; font-weight: 600; color: var(--text-muted); }
.form-actions { display: flex; gap: 0.75rem; margin-top: 1.5rem; }
.required { color: var(--red); }
.input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0.55rem 0.85rem;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
}
.input:focus { border-color: var(--green); }
.input:disabled { opacity: 0.5; cursor: not-allowed; }
.input-sm { padding: 0.35rem 0.65rem; font-size: 0.82rem; }
.textarea { resize: vertical; min-height: 80px; }
.input-file {
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 0.65rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  cursor: pointer;
  width: 100%;
}
.input-hint { font-size: 0.78rem; color: var(--text-dim); }
.current-thumb { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0; color: var(--text-muted); font-size: 0.85rem; }
.current-thumb img { width: 48px; height: 48px; border-radius: var(--radius); object-fit: cover; border: 1px solid var(--border); }

/* Mc version grid */
.mc-version-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 0.4rem; }
.mc-version-check { display: flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: var(--text-muted); cursor: pointer; }
.mc-version-check input { accent-color: var(--green); }

/* Edit tabs */
.edit-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; }
.edit-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  margin-bottom: -1px;
  font-family: 'Inter', sans-serif;
  transition: color 0.15s, border-color 0.15s;
}
.edit-tab:hover { color: var(--text); }
.edit-tab.active { color: var(--green); border-bottom-color: var(--green); }

/* Dep rows */
.dep-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.dep-req-label { font-size: 0.85rem; color: var(--text-muted); white-space: nowrap; }

/* Danger zone */
.danger-zone h3 { color: var(--red); }
.danger-zone p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1rem; }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--bg-sidebar);
  color: var(--text-muted);
  border: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.badge-green { background: #14532d; color: #86efac; border-color: #166534; }
.badge-warn  { background: #451a03; color: #fcd34d; border-color: #92400e; }
.badge-gray  { background: var(--bg-sidebar); color: var(--text-dim); }

/* ── Alerts ── */
.alert { padding: 0.75rem 1rem; border-radius: var(--radius); font-size: 0.875rem; margin-bottom: 1.25rem; }
.alert-error { background: #450a0a; border: 1px solid #991b1b; color: #fca5a5; }
.alert-success { background: #052e16; border: 1px solid #166534; color: #86efac; }

/* ── Auth page ── */
.auth-page { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 120px); padding: 2rem; }
.auth-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2.5rem; width: 100%; max-width: 420px; }
.auth-logo { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.5rem; font-family: 'Space Grotesk', sans-serif; font-size: 1.2rem; font-weight: 700; }
.auth-card h1 { font-size: 1.5rem; margin-bottom: 0.25rem; }
.auth-subtitle { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 1.25rem; }
.auth-form { display: flex; flex-direction: column; gap: 1rem; margin: 1.25rem 0; }
.auth-alt { text-align: center; font-size: 0.875rem; color: var(--text-muted); margin: 1rem 0 0; }

/* ── Admin ── */
.admin-nav { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 2rem; flex-wrap: wrap; }
.admin-nav-link {
  padding: 0.65rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.admin-nav-link:hover { color: var(--text); text-decoration: none; }
.admin-nav-link.active { color: var(--green); border-bottom-color: var(--green); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.admin-table th { text-align: left; padding: 0.65rem 0.75rem; color: var(--text-dim); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--border); }
.admin-table td { padding: 0.75rem 0.75rem; border-bottom: 1px solid var(--border-light); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr.row-used td { opacity: 0.5; }
.admin-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.invite-code { font-size: 0.75rem; user-select: all; }
.comment-preview { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-muted); }

/* ── Pagination ── */
.pagination { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 2rem; }
.page-link {
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg-card);
  transition: border-color 0.15s, color 0.15s;
}
.page-link:hover { border-color: var(--green); color: var(--green); text-decoration: none; }
.page-link.active { background: var(--green); border-color: var(--green); color: white; }

/* ── Misc ── */
.back-link { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--text-muted); font-size: 0.875rem; margin: 1.5rem 0 0.75rem; }
.back-link:hover { color: var(--green); }
.page-title { margin: 2rem 0 1.5rem; }
.page-title + .page-sub { margin-top: -1.25rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.empty-state { color: var(--text-dim); font-size: 0.9rem; }
.empty-state.sm { font-size: 0.82rem; }
.empty-state-box {
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
}
.empty-state-box p { margin-bottom: 1rem; }
.text-muted { color: var(--text-dim); }

/* ── Footer ── */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  margin-top: auto;
}
.footer-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-logo { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 0.95rem; color: var(--text-muted); }
.footer-copy { font-size: 0.82rem; color: var(--text-dim); flex: 1; }
.footer-nav { display: flex; gap: 1.25rem; }
.footer-nav a { font-size: 0.82rem; color: var(--text-dim); }
.footer-nav a:hover { color: var(--green); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .browse-layout { grid-template-columns: 1fr; }
  .filter-sidebar { position: static; display: flex; gap: 1rem; flex-wrap: wrap; }
  .filter-group { margin-bottom: 0; }
  .mod-detail-layout { grid-template-columns: 1fr; }
  .admin-two-col { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.2rem; }
}

@media (max-width: 600px) {
  .mod-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-stats { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .mod-detail-header { flex-direction: column; }
  .hero-stats { gap: 1.5rem; }
  .site-nav .btn { display: none; }
}

/* ── Approval / scan additions ── */

/* Notification badge on nav */
.nav-dashboard-link { position: relative; }
.notif-badge {
  position: absolute;
  top: -6px; right: -10px;
  background: var(--red);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}
.admin-indicator {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  margin-left: 4px;
  vertical-align: middle;
}

/* Notification panel on dashboard */
.notif-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.75rem;
}
.notif-panel-title { font-size: 1rem; margin-bottom: 0.85rem; }
.notif-list { display: flex; flex-direction: column; gap: 0.6rem; }
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  border-left: 3px solid var(--border);
  background: var(--bg);
}
.notif-item.notif-read { opacity: 0.65; }
.notif-success { border-left-color: var(--green); }
.notif-danger  { border-left-color: var(--red); }
.notif-info    { border-left-color: #3b82f6; }
.notif-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.notif-body { flex: 1; font-size: 0.875rem; }
.notif-body strong { display: block; margin-bottom: 2px; color: var(--text); }
.notif-body p { margin: 0 0 4px; color: var(--text-muted); font-size: 0.82rem; }
.notif-body a { font-size: 0.82rem; }
.notif-date { font-size: 0.75rem; color: var(--text-dim); white-space: nowrap; margin-top: 2px; }

/* Review queue */
.review-section { margin-bottom: 2.5rem; }
.review-list { display: flex; flex-direction: column; gap: 1rem; }
.review-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.review-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
.review-meta { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; font-size: 0.82rem; }
.review-detail { font-size: 0.82rem; color: var(--text-muted); margin: 0.25rem 0; }
.review-changelog { font-size: 0.82rem; color: var(--text-muted); background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.5rem 0.75rem; margin: 0.5rem 0; }
.review-actions { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.85rem; }
.review-form { display: flex; gap: 0.5rem; align-items: center; }

/* Badge danger */
.badge-danger { background: #450a0a; color: #fca5a5; border-color: #991b1b; }

/* Notif dot in admin nav */
.notif-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--red);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  padding: 0 4px;
  margin-left: 5px;
}
.threat-name { font-size: 0.78rem; color: #fca5a5; }

/* "scan: X" badge label fix */
.nav-dashboard-link { display: inline-flex; align-items: center; gap: 4px; }
